From 3b8156f3494c6fdfe7a6b2e45a2e44a6093e7a9b Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Wed, 3 Jul 2024 16:45:03 -0400 Subject: [PATCH 01/18] minor style fixes --- _styles/anchor.scss | 7 ++++--- _styles/button.scss | 2 +- _styles/heading.scss | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/_styles/anchor.scss b/_styles/anchor.scss index 65c18d8d2c..874720d47c 100644 --- a/_styles/anchor.scss +++ b/_styles/anchor.scss @@ -4,12 +4,13 @@ .anchor { display: inline-block; position: relative; - width: 0; - margin: 0; + top: -0.15em; left: 0.5em; + width: 0; + margin: 0 !important; color: var(--primary) !important; opacity: 0; - font-size: 0.75em; + font-size: 0.75em !important; text-decoration: none; transition: opacity var(--transition), color var(--transition); } diff --git a/_styles/button.scss b/_styles/button.scss index ed497f0051..93c0edf9d3 100644 --- a/_styles/button.scss +++ b/_styles/button.scss @@ -16,7 +16,7 @@ button { gap: 10px; max-width: calc(100% - 5px - 5px); margin: 5px; - padding: 10px 15px; + padding: 8px 15px; border: none; border-radius: var(--rounded); background: var(--primary); diff --git a/_styles/heading.scss b/_styles/heading.scss index 2ea35a4289..f739e58a8d 100644 --- a/_styles/heading.scss +++ b/_styles/heading.scss @@ -15,6 +15,7 @@ h6 { } h1 { + margin: 40px 0; font-size: 1.6rem; font-weight: var(--regular); text-transform: uppercase; From 08d92f283ce51c76d678befc0f9a664126821bf8 Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 19:37:15 -0400 Subject: [PATCH 02/18] dont flex shrink logo --- _styles/header.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/_styles/header.scss b/_styles/header.scss index 045e29354f..8c1930dee1 100644 --- a/_styles/header.scss +++ b/_styles/header.scss @@ -148,6 +148,7 @@ header[data-big] { .logo { height: $logo-big; + flex-shrink: 0; } .title-text { From b45cf2c6b6adeb583366d055dc8301cf2de62183 Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 19:44:39 -0400 Subject: [PATCH 03/18] rename yaml files --- .github/workflows/{on-pull-request.yml => on-pull-request.yaml} | 0 .github/workflows/{on-push.yml => on-push.yaml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{on-pull-request.yml => on-pull-request.yaml} (100%) rename .github/workflows/{on-push.yml => on-push.yaml} (100%) diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yaml similarity index 100% rename from .github/workflows/on-pull-request.yml rename to .github/workflows/on-pull-request.yaml diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yaml similarity index 100% rename from .github/workflows/on-push.yml rename to .github/workflows/on-push.yaml From af870fde29ed2d4ae9d6d3fe5805dc70540c09d6 Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 19:49:23 -0400 Subject: [PATCH 04/18] give debug workflow steps names --- .github/workflows/build-preview.yaml | 8 ++++---- .github/workflows/build-site.yaml | 8 ++++---- .github/workflows/first-time-setup.yaml | 8 ++++---- .github/workflows/update-citations.yaml | 8 ++++---- .github/workflows/update-url.yaml | 8 ++++---- .github/workflows/versioning.yaml | 12 ++++++------ 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-preview.yaml b/.github/workflows/build-preview.yaml index 3ef0404422..f986814a9a 100644 --- a/.github/workflows/build-preview.yaml +++ b/.github/workflows/build-preview.yaml @@ -21,8 +21,8 @@ jobs: runs-on: ubuntu-latest steps: - # for debugging - - uses: crazy-max/ghaction-dump-context@v2 + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents uses: actions/checkout@v4 @@ -42,8 +42,8 @@ jobs: id: pages uses: actions/configure-pages@v4 - # for debugging - - if: runner.debug == '1' + - name: SSH debug + if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 - name: Build preview version of site diff --git a/.github/workflows/build-site.yaml b/.github/workflows/build-site.yaml index 6194c83b5a..08a9426c4e 100644 --- a/.github/workflows/build-site.yaml +++ b/.github/workflows/build-site.yaml @@ -20,8 +20,8 @@ jobs: runs-on: ubuntu-latest steps: - # for debugging - - uses: crazy-max/ghaction-dump-context@v2 + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents uses: actions/checkout@v4 @@ -36,8 +36,8 @@ jobs: id: pages uses: actions/configure-pages@v4 - # for debugging - - if: runner.debug == '1' + - name: SSH debug + if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 - name: Set root url diff --git a/.github/workflows/first-time-setup.yaml b/.github/workflows/first-time-setup.yaml index 415e2842a0..1fd174aab0 100644 --- a/.github/workflows/first-time-setup.yaml +++ b/.github/workflows/first-time-setup.yaml @@ -13,8 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - # for debugging - - uses: crazy-max/ghaction-dump-context@v2 + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 - name: Create Pages branch uses: peterjgrainger/action-create-branch@v3.0.0 @@ -28,8 +28,8 @@ jobs: with: ref: gh-pages - # for debugging - - if: runner.debug == '1' + - name: SSH debug + if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 # clean slate, as if starting from orphan branch diff --git a/.github/workflows/update-citations.yaml b/.github/workflows/update-citations.yaml index f6ff6ec23a..c32d6d55ae 100644 --- a/.github/workflows/update-citations.yaml +++ b/.github/workflows/update-citations.yaml @@ -28,8 +28,8 @@ jobs: timeout-minutes: 15 steps: - # for debugging - - uses: crazy-max/ghaction-dump-context@v2 + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents uses: actions/checkout@v4 @@ -48,8 +48,8 @@ jobs: run: | python -m pip install --upgrade --requirement ./_cite/requirements.txt - # for debugging - - if: runner.debug == '1' + - name: SSH debug + if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 - name: Build updated citations diff --git a/.github/workflows/update-url.yaml b/.github/workflows/update-url.yaml index b3573a547b..f42296d79c 100644 --- a/.github/workflows/update-url.yaml +++ b/.github/workflows/update-url.yaml @@ -19,8 +19,8 @@ jobs: runs-on: ubuntu-latest steps: - # for debugging - - uses: crazy-max/ghaction-dump-context@v2 + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 - name: Get Pages url id: pages @@ -29,8 +29,8 @@ jobs: - name: Checkout branch contents uses: actions/checkout@v4 - # for debugging - - if: runner.debug == '1' + - name: SSH debug + if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 # update link to site in readme diff --git a/.github/workflows/versioning.yaml b/.github/workflows/versioning.yaml index e148f366b7..bb537fde10 100644 --- a/.github/workflows/versioning.yaml +++ b/.github/workflows/versioning.yaml @@ -20,8 +20,8 @@ jobs: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - # for debugging - - uses: crazy-max/ghaction-dump-context@v2 + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 - if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 @@ -85,8 +85,8 @@ jobs: github.event_name == 'push' runs-on: ubuntu-latest steps: - # for debugging - - uses: crazy-max/ghaction-dump-context@v2 + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents uses: actions/checkout@v4 @@ -94,8 +94,8 @@ jobs: - name: Install packages run: npm install yaml semver - # for debugging - - if: runner.debug == '1' + - name: SSH debug + if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 - name: Get version and body From a8ff1201e1ba7c4549987c5b06cf6984c4d98e8c Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 20:33:59 -0400 Subject: [PATCH 05/18] add details styling --- _styles/details.scss | 43 +++++++++++++++++++++++++++++++++++++++++++ testbed.md | 7 +++++++ 2 files changed, 50 insertions(+) create mode 100644 _styles/details.scss diff --git a/_styles/details.scss b/_styles/details.scss new file mode 100644 index 0000000000..b40448833a --- /dev/null +++ b/_styles/details.scss @@ -0,0 +1,43 @@ +--- +--- + +details { + margin: 20px 0; + padding: 0 20px; + border-radius: var(--rounded); + background: var(--theme-light); + border: solid 1px var(--light-gray); + text-align: left; + overflow: hidden; +} + +summary { + list-style: none; + margin: 0 -20px; + padding: 10px; + line-height: var(--compact); + transition: background var(--transition); + cursor: pointer; +} + +summary:hover { + background: var(--light-gray); +} + +details[open] summary { + background: var(--light-gray); +} + +summary::before { + content: "❯"; + display: inline-flex; + justify-content: center; + align-items: center; + margin-right: 5px; + width: 1em; + height: 1em; +} + +details[open] summary::before { + transform: rotate(90deg); +} diff --git a/testbed.md b/testbed.md index 6b343a5eca..1877abfe34 100644 --- a/testbed.md +++ b/testbed.md @@ -104,6 +104,13 @@ Consectetur adipiscing elit. Sed do eiusmod tempor incididunt. {:.right} +
+Hidden content + +**Lorem** _ipsum_ [dolor sit amet](), consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + +
+ {% include section.html %} # Jekyll Spaceship From 0c6ad96e6542cb2c003ce57c76555d6469fa3bd1 Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 22:42:28 -0400 Subject: [PATCH 06/18] use find-current-pr action for best reliability --- .github/workflows/build-preview.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-preview.yaml b/.github/workflows/build-preview.yaml index f986814a9a..61c3905a10 100644 --- a/.github/workflows/build-preview.yaml +++ b/.github/workflows/build-preview.yaml @@ -42,6 +42,11 @@ jobs: id: pages uses: actions/configure-pages@v4 + - uses: jwalton/gh-find-current-pr@master + id: pr + with: + state: all + - name: SSH debug if: runner.debug == '1' uses: mxschmitt/action-tmate@v3 @@ -49,7 +54,9 @@ jobs: - name: Build preview version of site if: github.event.action != 'closed' run: | - JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}" + JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ env.pr }}" + env: + pr: ${{ steps.pr.outputs.pr }} - name: Commit preview to Pages branch uses: rossjrw/pr-preview-action@v1.4.7 From 5d4899b0f182793c57d4d26e0bf45335e906f2ad Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 22:42:59 -0400 Subject: [PATCH 07/18] fix first time setup description bug --- .github/workflows/first-time-setup.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/first-time-setup.yaml b/.github/workflows/first-time-setup.yaml index 1fd174aab0..eb0274a865 100644 --- a/.github/workflows/first-time-setup.yaml +++ b/.github/workflows/first-time-setup.yaml @@ -70,8 +70,8 @@ jobs: run: | user="${{ github.repository_owner }}" description="An engaging 1-3 sentence description of your lab." - printf "USER=${user}" >> $GITHUB_ENV - printf "DESCRIPTION=${description}" >> $GITHUB_ENV + printf "\nUSER=${user}" >> $GITHUB_ENV + printf "\nDESCRIPTION=${description}" >> $GITHUB_ENV - name: Personalize readme for user run: | From 7d47dae57df08f66f6afa9e1139fe7ded83d9654 Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 23:04:05 -0400 Subject: [PATCH 08/18] add body message to generated pr --- .github/workflows/update-citations.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-citations.yaml b/.github/workflows/update-citations.yaml index c32d6d55ae..89e1936f2f 100644 --- a/.github/workflows/update-citations.yaml +++ b/.github/workflows/update-citations.yaml @@ -79,6 +79,8 @@ jobs: with: branch: citation-update title: Periodic citation update + body: | + To see a live preview of this PR, close (not merge) and reopen it. outputs: changed: ${{ steps.changed.outputs.files_changed }} From b27efcf4dc925f1229a082233b1197a6e7c9735d Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Tue, 6 Aug 2024 23:28:46 -0400 Subject: [PATCH 09/18] skip steps on pr close --- .github/workflows/build-preview.yaml | 1 + .github/workflows/update-citations.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build-preview.yaml b/.github/workflows/build-preview.yaml index 61c3905a10..c5469b8996 100644 --- a/.github/workflows/build-preview.yaml +++ b/.github/workflows/build-preview.yaml @@ -43,6 +43,7 @@ jobs: uses: actions/configure-pages@v4 - uses: jwalton/gh-find-current-pr@master + if: github.event.action != 'closed' id: pr with: state: all diff --git a/.github/workflows/update-citations.yaml b/.github/workflows/update-citations.yaml index 89e1936f2f..d0a979180b 100644 --- a/.github/workflows/update-citations.yaml +++ b/.github/workflows/update-citations.yaml @@ -26,6 +26,7 @@ jobs: update-citations: runs-on: ubuntu-latest timeout-minutes: 15 + if: github.event.action != 'closed' steps: - name: Debug dump From b33e0e4989a40456edff380dc54312b1bb078196 Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Wed, 7 Aug 2024 00:55:57 -0400 Subject: [PATCH 10/18] html escape attrs where necessary --- _includes/button.html | 4 ++-- _includes/card.html | 12 ++++++------ _includes/citation.html | 12 ++++++------ _includes/content.html | 4 ++-- _includes/feature.html | 8 ++++---- _includes/figure.html | 8 ++++---- _includes/footer.html | 2 +- _includes/header.html | 8 ++++---- _includes/meta.html | 10 +++++----- _includes/portrait.html | 6 +++--- _includes/post-excerpt.html | 12 ++++++------ _includes/post-nav.html | 4 ++-- _includes/tags.html | 6 +++--- _layouts/member.html | 4 ++-- 14 files changed, 50 insertions(+), 50 deletions(-) diff --git a/_includes/button.html b/_includes/button.html index 8d1730d739..47ed98bd2e 100644 --- a/_includes/button.html +++ b/_includes/button.html @@ -7,13 +7,13 @@ class="button" href="{{ button.link | replace: "$LINK", button.link | relative_url }}" {% if button.tooltip %} - data-tooltip="{{ button.tooltip }}" + data-tooltip="{{ button.tooltip | xml_escape }}" {% endif %} data-style="{{ include.style }}" {% if include.flip %} data-flip {% endif %} - aria-label="{{ button.tooltip | default: button.icon | default: "button" }}" + aria-label="{{ button.tooltip | default: button.icon | default: "button" | xml_escape }}" > {% include icon.html icon=button.icon %} {% if button.text and button.text != "" %} diff --git a/_includes/card.html b/_includes/card.html index 600cc9714a..77614b1e12 100644 --- a/_includes/card.html +++ b/_includes/card.html @@ -2,14 +2,14 @@
{{ include.title | default: @@ -19,10 +19,10 @@ {% if include.title %} diff --git a/_includes/citation.html b/_includes/citation.html index 3eb8b2b46d..ce6130aa23 100644 --- a/_includes/citation.html +++ b/_includes/citation.html @@ -13,14 +13,14 @@ {% if include.style == "rich" %} {{ citation.title | default: @@ -33,7 +33,7 @@ @@ -43,7 +43,7 @@
10 %} - data-tooltip="{{ citation.authors | join: ", " }} " + data-tooltip="{{ citation.authors | join: ", " | xml_escape }}" {% endif %} tabindex="0" > diff --git a/_includes/content.html b/_includes/content.html index f9d01c896a..da84666f6a 100644 --- a/_includes/content.html +++ b/_includes/content.html @@ -11,7 +11,7 @@ {% for section in sections %} {% assign dark = section | regex_scan: "dark: (.*);" | default: "" %} - {% assign background = section + {% assign image = section | regex_scan: "background: (.*);" | default: nil %} @@ -24,7 +24,7 @@ data-dark="{{ dark }}" {% endif %} {% if background %} - style="--image: url('{{ background | relative_url }}')" + style="--image: url('{{ image | relative_url | xml_escape }}')" {% endif %} > {{ section }} diff --git a/_includes/feature.html b/_includes/feature.html index 27e33fae7a..ce7cee9530 100644 --- a/_includes/feature.html +++ b/_includes/feature.html @@ -6,15 +6,15 @@ > {{ include.title | default: diff --git a/_includes/figure.html b/_includes/figure.html index a426ff4382..25421ec33e 100644 --- a/_includes/figure.html +++ b/_includes/figure.html @@ -1,18 +1,18 @@
{{ include.caption | default: diff --git a/_includes/footer.html b/_includes/footer.html index 8230d53718..e5ff785431 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -3,7 +3,7 @@