This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from wpengine/update-latest-changes-from-portfo…
…lio-1 Update latest changes from portfolio theme
- Loading branch information
Showing
8 changed files
with
103 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Blueprint Export Diff | ||
on: pull_request | ||
jobs: | ||
blueprint_export_diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Check for changes | ||
id: check-for-export-changes | ||
run: echo ::set-output name=check::$(git diff --name-only origin/main --exit-code -- acm-blueprint.zip) | ||
- name: Setup | ||
if: steps.check-for-export-changes.outputs.check != 0 | ||
run: | | ||
wget https://github.com/wpengine/atlas-blueprint-portfolio/raw/main/acm-blueprint.zip -O /tmp/acm-blueprint-base.zip | ||
unzip -j /tmp/acm-blueprint-base.zip -d /tmp/acm-blueprint-base | ||
unzip -j ./acm-blueprint.zip -d /tmp/acm-blueprint-compare | ||
- name: Create Diff | ||
if: steps.check-for-export-changes.outputs.check != 0 | ||
run: | | ||
diff -ry --suppress-common-lines /tmp/acm-blueprint-base/ /tmp/acm-blueprint-compare/ || true > /tmp/diff-output.txt | ||
cat /tmp/diff-output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import appConfig from 'app.config'; | ||
import { useRef, useEffect, useState } from 'react'; | ||
|
||
/** | ||
* The `useFocusFirstNewResult` hook provides the ability to set the focus | ||
* on the first new post result in order to improve accessibility. | ||
* | ||
* @param {array} posts An array of posts. | ||
* @returns {{firstNewResultRef: HTMLDivElement, firstNewResultIndex: number}} Result object | ||
*/ | ||
export default function useFocusFirstNewResult(posts) { | ||
const firstNewResultRef = useRef(); | ||
const [firstNewResultIndex, setFirstnewResultIndex] = useState(0); | ||
|
||
useEffect(() => { | ||
const isPaginated = posts.length > appConfig.postsPerPage; | ||
|
||
if (isPaginated) { | ||
firstNewResultRef.current?.focus(); | ||
|
||
setFirstnewResultIndex(() => { | ||
const partialSetLength = posts.length % appConfig.postsPerPage; | ||
const delta = | ||
partialSetLength === 0 ? appConfig.postsPerPage : partialSetLength; | ||
const focusIndex = posts.length - delta; | ||
|
||
return focusIndex; | ||
}); | ||
} | ||
}, [posts, firstNewResultIndex]); | ||
|
||
return { firstNewResultRef, firstNewResultIndex }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
$font-family: Inter, Verdana, Arial, Helvetica, sans-serif; | ||
$font-weight-normal: 300; | ||
$font-weight-normal: 400; | ||
$font-weight-bold: 600; | ||
$font-weight-extra-bold: 700; | ||
|
||
$breakpoint-extra-small: 640px; | ||
$breakpoint-small: 768px; | ||
$breakpoint-medium: 1024px; | ||
|
||
$grid-max-width: 62rem; | ||
$container-max-width: 102.4rem; | ||
$container-max-width-sm: 64rem; | ||
$container-max-width: 1200px; | ||
$content-max-width: 620px; | ||
|
||
$box-shadow: 0px 0px 50px rgba(0, 0, 0, 0.1); |
e09ea52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Branch main was deployed successfully
Your environment main of app atlas-bp-basic was successfully updated
View build logs: https://my.wpengine.com/atlas#/atlas-bp-basic/v1tecse1xf1ytykaqqgur5qz/560g0ly3hacbq7m66zmtcecs
View your environment URL: https://hv1tecse1xf1ytykaqqgur5qz.js.wpenginepowered.com