From 48f2dde58999fb976599919eec2cbeffa6301dbe Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Fri, 8 Mar 2024 16:29:25 -0500 Subject: [PATCH] V1.2.0 (#244) - add discussion templates. be more aggressive requiring fields. - update to latest version of all github actions (checking for breaking changes) - add debug step to each workflow to allow ssh access in - fix site.location vs page.url bug (see issue) - add html-proofer plugin to check for broken images and links, disabled by default because it adds a lot of time to hot-reload, but set explicitly as false in config so users can easily flip it on - update bundler version and re-bundle gems - add "remove" option for cite-process that allows a user to remove a source from a metasource. e.g., an ORCID returns a source that the user doesn't want on their site, so in their sources.yaml they put the id and remove: true. - by default, ignore sources that manubot can't cite if they're from metasources (see changelog) - add markdownify to more component params - fix bug in citation (and other) components where when lookup is blank, first entry in list is always chosen - make use of newly widely available CSS container queries - remove compilation-time wrapping of tables because it breaks nested tables, and is not (practically) possible to support them in the same way. replace with run-time js plugin for wrapping. - upgrade font awesome and improve loading mechanism - fix header title/subtitle CSS bug reported by @Maruuka - add "image" param to post excerpt component, so blog posts can have thumbnails - fix bug that prevents manual passing of tags to tag component - add heading 5/6 styles/support - tweak dark mode plugin - various style tweaks New template version checklist: - [x] I have updated CITATION and CHANGELOG as appropriate. - [x] I have updated lab-website-template-docs as appropriate. - [x] I have checked the testbed as appropriate. - [x] I have tested changed workflows on a freshly generated and forked repo. --- .github/DISCUSSION_TEMPLATE/general.yaml | 35 +++++ .github/DISCUSSION_TEMPLATE/q-a.yaml | 35 +++++ .github/ISSUE_TEMPLATE/issue.yaml | 6 +- .github/workflows/build-preview.yaml | 19 +-- .github/workflows/build-site.yaml | 23 +-- .github/workflows/first-time-setup.yaml | 26 ++-- .github/workflows/update-citations.yaml | 17 ++- .github/workflows/update-url.yaml | 19 +-- .github/workflows/versioning.yaml | 28 ++-- CHANGELOG.md | 22 ++- CITATION.cff | 4 +- Gemfile | 2 + Gemfile.lock | 48 +++++- _cite/.cache/cache.db | Bin 45056 -> 49152 bytes _cite/cite.py | 6 +- _config.yaml | 1 + _data/citations.yaml | 92 ++++++++++++ _includes/card.html | 4 +- _includes/citation.html | 181 ++++++++++++----------- _includes/content.html | 6 - _includes/fonts.html | 10 +- _includes/header.html | 6 +- _includes/meta.html | 4 +- _includes/portrait.html | 13 +- _includes/post-excerpt.html | 87 +++++++---- _layouts/post.html | 2 + _plugins/misc.rb | 30 +++- _posts/2023-02-23-example-post-3.md | 1 + _scripts/anchors.js | 2 +- _scripts/dark-mode.js | 11 +- _scripts/table-wrap.js | 25 ++++ _styles/-theme.scss | 9 +- _styles/alert.scss | 4 +- _styles/all.scss | 8 +- _styles/anchor.scss | 4 +- _styles/body.scss | 9 +- _styles/button.scss | 5 +- _styles/card.scss | 7 +- _styles/citation.scss | 15 +- _styles/code.scss | 2 - _styles/cols.scss | 4 +- _styles/dark-toggle.scss | 5 +- _styles/feature.scss | 2 +- _styles/grid.scss | 2 +- _styles/header.scss | 17 +-- _styles/heading.scss | 40 ++--- _styles/link.scss | 2 +- _styles/list.scss | 5 + _styles/portrait.scss | 3 +- _styles/post-excerpt.scss | 54 ++++++- _styles/post-info.scss | 2 +- _styles/post-nav.scss | 9 +- _styles/quote.scss | 4 +- _styles/section.scss | 2 +- _styles/table.scss | 8 +- _styles/tags.scss | 4 +- _styles/textbox.scss | 1 - testbed.md | 22 ++- 58 files changed, 709 insertions(+), 305 deletions(-) create mode 100644 .github/DISCUSSION_TEMPLATE/general.yaml create mode 100644 .github/DISCUSSION_TEMPLATE/q-a.yaml create mode 100644 _scripts/table-wrap.js diff --git a/.github/DISCUSSION_TEMPLATE/general.yaml b/.github/DISCUSSION_TEMPLATE/general.yaml new file mode 100644 index 0000000000..66b2c499f0 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/general.yaml @@ -0,0 +1,35 @@ +body: + - type: checkboxes + attributes: + label: Checks + options: + - label: I have searched **[the docs](https://greene-lab.gitbook.io/lab-website-template-docs)**, [existing issues](https://github.com/greenelab/lab-website-template/issues), and [existing discussions](https://github.com/greenelab/lab-website-template/discussions) for answers first. + required: true + + - type: input + id: repo + attributes: + label: Link to your website repo + description: "In almost all cases, **we cannot help you if you don't provide this**." + placeholder: ex. https://github.com/greenelab/greenelab.com + validations: + required: true + + - type: input + id: version + attributes: + label: Version of Lab Website Template you are using + description: See your `CITATION.cff` file. + placeholder: ex. 1.0.0 + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: | + Describe your issue in as much detail as possible. For example: What happened? What did you expect to happen? How can we reproduce the problem? What browser are you seeing the problem in? + placeholder: Description + validations: + required: true diff --git a/.github/DISCUSSION_TEMPLATE/q-a.yaml b/.github/DISCUSSION_TEMPLATE/q-a.yaml new file mode 100644 index 0000000000..66b2c499f0 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/q-a.yaml @@ -0,0 +1,35 @@ +body: + - type: checkboxes + attributes: + label: Checks + options: + - label: I have searched **[the docs](https://greene-lab.gitbook.io/lab-website-template-docs)**, [existing issues](https://github.com/greenelab/lab-website-template/issues), and [existing discussions](https://github.com/greenelab/lab-website-template/discussions) for answers first. + required: true + + - type: input + id: repo + attributes: + label: Link to your website repo + description: "In almost all cases, **we cannot help you if you don't provide this**." + placeholder: ex. https://github.com/greenelab/greenelab.com + validations: + required: true + + - type: input + id: version + attributes: + label: Version of Lab Website Template you are using + description: See your `CITATION.cff` file. + placeholder: ex. 1.0.0 + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: | + Describe your issue in as much detail as possible. For example: What happened? What did you expect to happen? How can we reproduce the problem? What browser are you seeing the problem in? + placeholder: Description + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/issue.yaml b/.github/ISSUE_TEMPLATE/issue.yaml index 4d09efb61a..d812555039 100644 --- a/.github/ISSUE_TEMPLATE/issue.yaml +++ b/.github/ISSUE_TEMPLATE/issue.yaml @@ -13,8 +13,10 @@ body: id: repo attributes: label: Link to your website repo - description: "**Strongly recommended** so we can help troubleshoot your issue." + description: "In almost all cases, **we cannot help you if you don't provide this**." placeholder: ex. https://github.com/greenelab/greenelab.com + validations: + required: true - type: input id: version @@ -22,6 +24,8 @@ body: label: Version of Lab Website Template you are using description: See your `CITATION.cff` file. placeholder: ex. 1.0.0 + validations: + required: true - type: textarea id: description diff --git a/.github/workflows/build-preview.yaml b/.github/workflows/build-preview.yaml index 52842860fe..3ef0404422 100644 --- a/.github/workflows/build-preview.yaml +++ b/.github/workflows/build-preview.yaml @@ -22,28 +22,29 @@ jobs: steps: # for debugging - - name: Print contexts - uses: crazy-max/ghaction-dump-context@v1 + - uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} - name: Install Ruby packages if: github.event.action != 'closed' - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@v1.172.0 with: - ruby-version: "3.0" + ruby-version: "3.1" bundler-cache: true - name: Get Pages url if: github.event.action != 'closed' id: pages - uses: actions/configure-pages@v2 - with: - enablement: false + uses: actions/configure-pages@v4 + + # for debugging + - if: runner.debug == '1' + uses: mxschmitt/action-tmate@v3 - name: Build preview version of site if: github.event.action != 'closed' @@ -51,7 +52,7 @@ jobs: JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}" - name: Commit preview to Pages branch - uses: rossjrw/pr-preview-action@v1 + uses: rossjrw/pr-preview-action@v1.4.7 with: source-dir: _site umbrella-dir: ${{ env.PREVIEWS_FOLDER }} diff --git a/.github/workflows/build-site.yaml b/.github/workflows/build-site.yaml index 9b71767f07..6aa3e5a489 100644 --- a/.github/workflows/build-site.yaml +++ b/.github/workflows/build-site.yaml @@ -21,30 +21,35 @@ jobs: steps: # for debugging - - name: Print contexts - uses: crazy-max/ghaction-dump-context@v1 + - uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Ruby packages - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@v1.172.0 with: - ruby-version: "3.0" + ruby-version: "3.1" bundler-cache: true - name: Get Pages url id: pages - uses: actions/configure-pages@v2 - with: - enablement: false + uses: actions/configure-pages@v4 + + # for debugging + - if: runner.debug == '1' + uses: mxschmitt/action-tmate@v3 + + - name: Set root url + run: | + echo "\n\nurl: ${{ steps.pages.outputs.origin }}" >> _config.yaml - name: Build live version of site run: | JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}" - name: Commit live site to Pages branch - uses: JamesIves/github-pages-deploy-action@v4 + uses: JamesIves/github-pages-deploy-action@v4.5.0 with: folder: _site clean-exclude: ${{ env.PREVIEWS_FOLDER }} diff --git a/.github/workflows/first-time-setup.yaml b/.github/workflows/first-time-setup.yaml index bf227f7da4..51d3273b0a 100644 --- a/.github/workflows/first-time-setup.yaml +++ b/.github/workflows/first-time-setup.yaml @@ -14,21 +14,24 @@ jobs: steps: # for debugging - - name: Print contexts - uses: crazy-max/ghaction-dump-context@v1 + - uses: crazy-max/ghaction-dump-context@v2 - name: Create Pages branch - uses: peterjgrainger/action-create-branch@v2.4.0 + uses: peterjgrainger/action-create-branch@v3.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: branch: "gh-pages" - name: Checkout Pages branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: gh-pages + # for debugging + - if: runner.debug == '1' + uses: mxschmitt/action-tmate@v3 + # clean slate, as if starting from orphan branch - name: Clear Pages branch run: rm -rf * .github .docker .gitignore @@ -41,13 +44,13 @@ jobs: run: echo "Placeholder homepage" > index.html - name: Commit changes to Pages branch - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: gh-pages commit_message: "Clear branch" - name: Checkout main branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Remove files user doesn't need run: | @@ -55,12 +58,13 @@ jobs: CHANGELOG.md \ testbed.md \ .github/ISSUE_TEMPLATE \ + .github/DISCUSSION_TEMPLATE \ .github/workflows/versioning.yaml \ .github/pull_request_template.md \ - + - name: Rename files run: | - mv .github/user_pull_request_template.md .github/pull_request_template.md + mv -f .github/user_pull_request_template.md .github/pull_request_template.md - name: Set vars for personalization run: | @@ -80,7 +84,7 @@ jobs: " > README.md - name: Personalize Jekyll config for user - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const { readFileSync, writeFileSync } = require("fs"); @@ -97,7 +101,7 @@ jobs: writeFileSync(file, contents); - name: Personalize homepage for user - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const { readFileSync, writeFileSync } = require("fs"); @@ -109,6 +113,6 @@ jobs: writeFileSync(file, contents); - name: Commit changed files - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Setup repo" diff --git a/.github/workflows/update-citations.yaml b/.github/workflows/update-citations.yaml index 2bafb55257..f6ff6ec23a 100644 --- a/.github/workflows/update-citations.yaml +++ b/.github/workflows/update-citations.yaml @@ -29,17 +29,16 @@ jobs: steps: # for debugging - - name: Print contexts - uses: crazy-max/ghaction-dump-context@v1 + - uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.11" cache: "pip" @@ -49,13 +48,17 @@ jobs: run: | python -m pip install --upgrade --requirement ./_cite/requirements.txt + # for debugging + - if: runner.debug == '1' + uses: mxschmitt/action-tmate@v3 + - name: Build updated citations run: python _cite/cite.py timeout-minutes: 15 - name: Check if citations changed id: changed - uses: tj-actions/verify-changed-files@v13 + uses: tj-actions/verify-changed-files@v18 with: files: | _data/citations.yaml @@ -64,7 +67,7 @@ jobs: if: | steps.changed.outputs.files_changed == 'true' && inputs.open-pr != true - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update citations" @@ -72,7 +75,7 @@ jobs: if: | steps.changed.outputs.files_changed == 'true' && inputs.open-pr == true - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: branch: citation-update title: Periodic citation update diff --git a/.github/workflows/update-url.yaml b/.github/workflows/update-url.yaml index 9ccd9a3eb4..b3573a547b 100644 --- a/.github/workflows/update-url.yaml +++ b/.github/workflows/update-url.yaml @@ -20,21 +20,22 @@ jobs: steps: # for debugging - - name: Print contexts - uses: crazy-max/ghaction-dump-context@v1 + - uses: crazy-max/ghaction-dump-context@v2 - name: Get Pages url id: pages - uses: actions/configure-pages@v2 - with: - enablement: false + uses: actions/configure-pages@v4 - name: Checkout branch contents - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + # for debugging + - if: runner.debug == '1' + uses: mxschmitt/action-tmate@v3 # update link to site in readme - name: Update readme - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const { readFileSync, writeFileSync } = require("fs"); @@ -53,14 +54,14 @@ jobs: - name: Check if readme changed id: changed - uses: tj-actions/verify-changed-files@v13 + uses: tj-actions/verify-changed-files@v18 with: files: | README.md - name: Commit changed files if: steps.changed.outputs.files_changed == 'true' - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update url" diff --git a/.github/workflows/versioning.yaml b/.github/workflows/versioning.yaml index cc2655f650..e148f366b7 100644 --- a/.github/workflows/versioning.yaml +++ b/.github/workflows/versioning.yaml @@ -21,25 +21,26 @@ jobs: runs-on: ubuntu-latest steps: # for debugging - - name: Print contexts - uses: crazy-max/ghaction-dump-context@v1 + - uses: crazy-max/ghaction-dump-context@v2 + - if: runner.debug == '1' + uses: mxschmitt/action-tmate@v3 - name: Checkout base branch contents - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: main path: base - name: Checkout pr branch contents - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: pr - name: Install packages - run: yarn add yaml semver + run: npm install yaml semver - name: Check version, date, changelog - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const { readFileSync } = require("fs"); @@ -85,18 +86,21 @@ jobs: runs-on: ubuntu-latest steps: # for debugging - - name: Print contexts - uses: crazy-max/ghaction-dump-context@v1 + - uses: crazy-max/ghaction-dump-context@v2 - name: Checkout branch contents - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install packages - run: yarn add yaml semver + run: npm install yaml semver + + # for debugging + - if: runner.debug == '1' + uses: mxschmitt/action-tmate@v3 - name: Get version and body id: version - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const { readFileSync } = require("fs"); @@ -123,7 +127,7 @@ jobs: return { version, body }; - name: Create GitHub release - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.14.0 with: commit: ${{ github.ref }} tag: v${{ fromJson(steps.version.outputs.result).version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b25f89cd5..d702c3e8e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,33 @@ Reference: common-changelog.org +## 1.2.0 - 2024-03-08 + +### Changed + +- Update all GitHub Actions to fix "Node v16 deprecated" warnings. +- Sources that Manubot doesn't know how to cite (e.g. wosuid:12345) are now ignored by default if they're from metasources. +- Fix bug where passing tags to tags component manually doesn't work. +- Fix bug in citation (and other) components when `lookup` is blank. +- Fix nested tables bug. +- Dark mode tweaks. +- Various CSS tweaks and fixes. + +### Added + +- Add `image` param to support blog post thumbnails. +- Add `html-proofer` plugin that checks for broken images/links/etc. +- Add `remove` flag to remove a source from a metasource. + ## 1.1.6 - 2023-10-06 +### Changed + - Use latest minor versions of Python packages in auto-cite script. ## 1.1.5 - 2023-05-19 -### Changes +### Changed - Fix ORCID plugin bug and other cite process tweaks. diff --git a/CITATION.cff b/CITATION.cff index 22d406cee3..dcb59dc43f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,8 +1,8 @@ # citation metadata for the template itself title: "Lab Website Template" -version: 1.1.6 -date-released: 2023-10-06 +version: 1.2.0 +date-released: 2024-03-08 url: "https://github.com/greenelab/lab-website-template" authors: - family-names: "Rubinetti" diff --git a/Gemfile b/Gemfile index b39f041e80..cbdd53f220 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,8 @@ source "https://rubygems.org" gem "jekyll", "~> 4.3" gem "webrick", "~> 1.7" +gem "html-proofer", "~> 5.0" + # plugins group :jekyll_plugins do gem "jekyll-spaceship" diff --git a/Gemfile.lock b/Gemfile.lock index d719aa93fe..ee2cb12165 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,23 +1,50 @@ GEM remote: https://rubygems.org/ specs: + Ascii85 (1.1.0) addressable (2.8.1) public_suffix (>= 2.0.2, < 6.0) + afm (0.2.2) + async (2.8.1) + console (~> 1.10) + fiber-annotation + io-event (~> 1.1) + timers (~> 4.1) colorator (1.1.0) concurrent-ruby (1.2.2) + console (1.23.4) + fiber-annotation + fiber-local + json em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) + ethon (0.16.0) + ffi (>= 1.15.0) eventmachine (1.2.7) ffi (1.15.5) ffi (1.15.5-x64-mingw-ucrt) + fiber-annotation (0.2.0) + fiber-local (1.0.0) forwardable-extended (2.6.0) gemoji (3.0.1) + google-protobuf (3.22.0) google-protobuf (3.22.0-arm64-darwin) google-protobuf (3.22.0-x64-mingw-ucrt) + hashery (2.1.2) + html-proofer (5.0.8) + addressable (~> 2.3) + async (~> 2.1) + nokogiri (~> 1.13) + pdf-reader (~> 2.11) + rainbow (~> 3.0) + typhoeus (~> 1.3) + yell (~> 2.0) + zeitwerk (~> 2.5) http_parser.rb (0.8.0) i18n (1.12.0) concurrent-ruby (~> 1.0) + io-event (1.4.4) jekyll (4.3.2) addressable (~> 2.4) colorator (~> 1.0) @@ -52,6 +79,7 @@ GEM rainbow (~> 3.0) jekyll-watch (2.2.1) listen (~> 3.0) + json (2.7.1) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) @@ -69,24 +97,41 @@ GEM racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) + pdf-reader (2.12.0) + Ascii85 (~> 1.0) + afm (~> 0.2.1) + hashery (~> 2.0) + ruby-rc4 + ttfunk posix-spawn (0.3.15) public_suffix (5.0.1) racc (1.6.2) rainbow (3.1.1) + rake (13.1.0) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.5) rouge (3.30.0) + ruby-rc4 (0.1.5) safe_yaml (1.0.5) + sass-embedded (1.58.3) + google-protobuf (~> 3.21) + rake (>= 10.0.0) sass-embedded (1.58.3-arm64-darwin) google-protobuf (~> 3.21) sass-embedded (1.58.3-x64-mingw-ucrt) google-protobuf (~> 3.21) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) + timers (4.3.5) + ttfunk (1.7.0) + typhoeus (1.4.1) + ethon (>= 0.9.0) unicode-display_width (2.4.2) webrick (1.8.1) + yell (2.2.2) + zeitwerk (2.6.13) PLATFORMS aarch64-linux @@ -99,6 +144,7 @@ PLATFORMS x86_64-linux DEPENDENCIES + html-proofer (~> 5.0) jekyll (~> 4.3) jekyll-feed jekyll-last-modified-at @@ -108,4 +154,4 @@ DEPENDENCIES webrick (~> 1.7) BUNDLED WITH - 2.4.7 + 2.5.6 diff --git a/_cite/.cache/cache.db b/_cite/.cache/cache.db index 4bbcc12b9f8038239a615044a1e5e780e5e8f2f5..2ca6d980786a072bb0cc0da17cbe3bc7aadd1d82 100644 GIT binary patch delta 4686 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 GSNb0rDN8i~ delta 1685 zcmb`HZA@EL7{~AFp|`!Iy{Et^Ev*^22rjX-&1A$l$B3aDCOUMQB~wXRdZ{SSfaV4fC6E&Ix2R#m8$8UL@wKdSA`^OUshI*(|8j93$)tU`|>Zz%$hV>wn zl;wadMJ3hLs8!)*Pa`sGm2j(34ZabOV&TY}S?{U{D)GJDJ82#Dt+ta@2-fRLtbBz7 zHtQb7%DZZyukcG$iUnSmXdR4zce40@;rZHX=q|>i(O`eU?Xbfg#b~dRERV;6av-XN zBfK4d*=lR4c_3RbsVae^!B8?8zHQgKa=L+8`Bs?xJ+3(PiS$Y<*L@9OZ#PeV4j#9pXP!K1h6d2K91hL>HZmt{iqxr$u_!M7_06k> zP4VvbKlx1|G!T7Je3JS7X4$5&tovY5T$sM9*Ofzq(6+o+^xvQO{sF#!1LC^w4N^Vu ztXN|6=kAr*s3@`dbE_pbDoSirl-T^ayCpU%N^JhzN{P*%yF=O74!BiGl_MGa!~6mK z+M)_XD&l>eRii{<+&_px^B$z$+8Ze%w^N*DLB%?V|lW}R-j>x zy-2CrmJ6DEJ9!AuacG#@>ntGV9TYY1plcZ&gaNFKJLurp$d#!M0N>eOhHnq=qbXS# z>;cwl_5jnQbz}(uh%KXj=AgCZ9r?AOi8Q(bfDXSnwud@c!OX!nh2>zHTo}6s4$UF0e75ZePuJs`pVuTRvgo0`dk#ybHOscmpSO*<{kO9ph@qz a8_+Z3!-=Pq`=?h^IjJK diff --git a/_cite/cite.py b/_cite/cite.py index 5f8d135a94..6cd5befcd6 100644 --- a/_cite/cite.py +++ b/_cite/cite.py @@ -124,6 +124,10 @@ for index, source in enumerate(sources): log(f"Processing source {index + 1} of {len(sources)}, {label(source)}") + # if explicitly flagged, remove/ignore entry + if get_safe(source, "remove", False) == True: + continue + # new citation data for source citation = {} @@ -148,7 +152,7 @@ else: log(e, 3, "WARNING") # discard source from citations - # continue + continue # preserve fields from input source, overriding existing fields citation.update(source) diff --git a/_config.yaml b/_config.yaml index 050986828a..1c6b790bda 100644 --- a/_config.yaml +++ b/_config.yaml @@ -4,6 +4,7 @@ subtitle: by the Greene Lab description: An easy-to-use, flexible website template for labs, with automatic citations, GitHub tag imports, pre-built components, and more. header: images/background.jpg footer: images/background.jpg +proofer: false # site social media and other links links: diff --git a/_data/citations.yaml b/_data/citations.yaml index 0cc985a539..db4e4b0036 100644 --- a/_data/citations.yaml +++ b/_data/citations.yaml @@ -1,5 +1,75 @@ # DO NOT EDIT, GENERATED AUTOMATICALLY +- id: doi:10.1093/nar/gkad1082 + title: "The Monarch Initiative in 2024: an analytic platform integrating phenotypes,\ + \ genes\_and diseases across species" + authors: + - Tim E Putman + - Kevin Schaper + - Nicolas Matentzoglu + - "Vincent\_P Rubinetti" + - "Faisal\_S Alquaddoomi" + - Corey Cox + - J Harry Caufield + - Glass Elsarboukh + - Sarah Gehrke + - Harshad Hegde + - "Justin\_T Reese" + - Ian Braun + - "Richard\_M Bruskiewich" + - Luca Cappelletti + - Seth Carbon + - "Anita\_R Caron" + - "Lauren\_E Chan" + - "Christopher\_G Chute" + - "Katherina\_G Cortes" + - "Vin\xEDcius De\_Souza" + - Tommaso Fontana + - "Nomi\_L Harris" + - "Emily\_L Hartley" + - Eric Hurwitz + - "Julius\_O B Jacobsen" + - Madan Krishnamurthy + - "Bryan\_J Laraway" + - "James\_A McLaughlin" + - "Julie\_A McMurry" + - "Sierra\_A T Moxon" + - "Kathleen\_R Mullen" + - "Shawn\_T O\u2019Neil" + - "Kent\_A Shefchek" + - Ray Stefancsik + - Sabrina Toro + - "Nicole\_A Vasilevsky" + - "Ramona\_L Walls" + - "Patricia\_L Whetzel" + - David Osumi-Sutherland + - Damian Smedley + - "Peter\_N Robinson" + - "Christopher\_J Mungall" + - "Melissa\_A Haendel" + - "Monica\_C Munoz-Torres" + publisher: Nucleic Acids Research + date: '2023-11-24' + link: https://doi.org/gs6kmr + orcid: 0000-0002-4655-3773 + plugin: orcid.py + file: orcid.yaml +- id: doi:10.1101/2023.10.11.560955 + title: Integration of 168,000 samples reveals global patterns of the human gut microbiome + authors: + - Richard J. Abdill + - Samantha P. Graham + - Vincent Rubinetti + - Frank W. Albert + - Casey S. Greene + - Sean Davis + - Ran Blekhman + publisher: Cold Spring Harbor Laboratory + date: '2023-10-11' + link: https://doi.org/gsvf5z + orcid: 0000-0002-4655-3773 + plugin: orcid.py + file: orcid.yaml - id: doi:10.1093/nar/gkad289 title: 'MyGeneset.info: an interactive and programmatic platform for community-curated and user-created collections of genes' @@ -64,6 +134,28 @@ orcid: 0000-0002-4655-3773 plugin: orcid.py file: orcid.yaml +- id: doi:10.1101/2022.02.18.461833 + title: 'MolEvolvR: A web-app for characterizing proteins using molecular evolution + and phylogeny' + authors: + - Jacob D Krol + - Joseph T Burke + - Samuel Z Chen + - Lo Sosinski + - Faisal S Alquaddoomi + - Evan P Brenner + - Ethan P Wolfe + - Vince P Rubinetti + - Shaddai Amolitos + - Kellen M Reason + - John B Johnston + - Janani Ravi + publisher: Cold Spring Harbor Laboratory + date: '2022-02-22' + link: https://doi.org/gstx7j + orcid: 0000-0002-4655-3773 + plugin: orcid.py + file: orcid.yaml - id: doi:10.1186/s13059-020-02021-3 title: Compressing gene expression data using multiple latent space dimensionalities learns complementary biological representations diff --git a/_includes/card.html b/_includes/card.html index feb325cb94..600cc9714a 100644 --- a/_includes/card.html +++ b/_includes/card.html @@ -35,7 +35,9 @@ {% endif %} {% if include.description %} - {{ include.description | markdownify }} +

+ {{ include.description | markdownify | remove: "

" | remove: "

" }} +

{% endif %} {% if include.tags or include.repo %} diff --git a/_includes/citation.html b/_includes/citation.html index ea62b17ed3..3eb8b2b46d 100644 --- a/_includes/citation.html +++ b/_includes/citation.html @@ -1,96 +1,109 @@ -{% assign citation = site.data.citations - | where_exp: "citation", - "citation.id == include.lookup or citation.title contains include.lookup" - | first - | default: include -%} +{% if include.lookup %} + {% assign citation = site.data.citations + | where_exp: "citation", + "citation.id == include.lookup or citation.title contains include.lookup" + | first + %} +{% else %} + {% assign citation = include %} +{% endif %} -
- {% if include.style == "rich" %} - - {{ citation.title | default: +
+ {% if include.style == "rich" %} + - - {% endif %} + {{ citation.title | default: + + {% endif %} -
- {% assign type = site.data.types[citation.type] %} - {% include icon.html icon=type.icon %} +
+ {% assign type = site.data.types[citation.type] %} + {% include icon.html icon=type.icon %} - - {{ citation.title | default: "[no title info]" }} - + + {{ citation.title | default: "[no title info]" }} + -
10 %} - data-tooltip="{{ citation.authors | join: ", " }} " - {% endif %} - tabindex="0" - > - {{ - citation.authors - | join: "," - | split: "," - | array_carve: 5 - | join: ", " - | default: "[no author info]" - }} -
+
10 %} + data-tooltip="{{ citation.authors | join: ", " }} " + {% endif %} + tabindex="0" + > + {{ + citation.authors + | join: "," + | split: "," + | array_carve: 5 + | join: ", " + | markdownify + | remove: "

" | remove: "

" + | default: "[no author info]" + }} +
-
- {{ citation.publisher | default: "[no publisher info]" }} -   ·   - {{ citation.date | default: "[no date info]" | date: "%d %b %Y" }} -   ·   - {{ citation.id | default: "[no id info]" }} -
+
+ + {{- citation.publisher | default: "[no publisher info]" -}} + +  ·  + + {{- citation.date | default: "[no date info]" | date: "%d %b %Y" -}} + +  ·  + + {{- citation.id | default: "[no id info]" -}} + +
- {% if include.style == "rich" %} - {% if citation.description %} -
- {{ - citation.description - | markdownify - | remove: "

" - | remove: "

" - }} -
- {% endif %} + {% if include.style == "rich" %} + {% if citation.description %} +
+ {{ + citation.description + | markdownify + | remove: "

" + | remove: "

" + }} +
+ {% endif %} - {% if citation.buttons.size > 0 %} -
- {% for button in citation.buttons %} - {% - include button.html - type=button.type - icon=button.icon - text=button.text - link=button.link - style="bare" - %} - {% endfor %} -
- {% endif %} + {% if citation.buttons.size > 0 %} +
+ {% for button in citation.buttons %} + {% + include button.html + type=button.type + icon=button.icon + text=button.text + link=button.link + style="bare" + %} + {% endfor %} +
+ {% endif %} - {% if citation.tags.size > 0 or citation.repo %} - {% include tags.html tags=citation.tags repo=citation.repo %} + {% if citation.tags.size > 0 or citation.repo %} + {% include tags.html tags=citation.tags repo=citation.repo %} + {% endif %} {% endif %} - {% endif %} +
diff --git a/_includes/content.html b/_includes/content.html index 44c59d88ec..f9d01c896a 100644 --- a/_includes/content.html +++ b/_includes/content.html @@ -2,17 +2,11 @@ modify main content of page: - add section breaks - attach section properties - - wrap each table in div to allow for scrolling - filter out blank sections --> {% assign content = include.content %} -{% assign content = content - | regex_replace: "(.*?)
", - "
\1
" -%} - {% assign sections = content | split: "" | array_filter %} {% for section in sections %} diff --git a/_includes/fonts.html b/_includes/fonts.html index 8fe3b65d12..153709b229 100644 --- a/_includes/fonts.html +++ b/_includes/fonts.html @@ -5,13 +5,13 @@ -{% assign fontawesome = "https://use.fontawesome.com/releases/v6.3.0/css/all.css" %} +{% assign fontawesome = "https://use.fontawesome.com/releases/v6.5.0/css/all.css" %} + rel="stylesheet" + media="none" + onload="this.removeAttribute('media'); this.onload = null;" +/> diff --git a/_includes/header.html b/_includes/header.html index 967078cedf..4dbdac0e13 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -27,12 +27,12 @@ {% endif %} {% if site.logo-text != false %} - + {% if site.title and site.show-title != false %} - {{ site.title }} + {{ site.title }} {% endif %} {% if site.subtitle and site.show-subtitle != false %} - {{ site.subtitle }} + {{ site.subtitle }} {% endif %} {% endif %} diff --git a/_includes/meta.html b/_includes/meta.html index dabae0723e..1336e305f4 100644 --- a/_includes/meta.html +++ b/_includes/meta.html @@ -24,7 +24,9 @@ {{ site.subtitle }}. {{ description }} {%- endcapture %} {% endif %} -{% assign url = site.location %} +{% capture url -%} + {{ site.url }}{{ site.baseurl }} +{%- endcapture %} {% assign png = "images/icon.png" | file_exists %} {% assign jpg = "images/icon.jpg" | file_exists %} diff --git a/_includes/portrait.html b/_includes/portrait.html index dade824f0a..3b77f3d168 100644 --- a/_includes/portrait.html +++ b/_includes/portrait.html @@ -1,8 +1,11 @@ -{% assign member = site.members - | where_exp: "member", "member.slug == include.lookup" - | first - | default: include -%} +{% if include.lookup %} + {% assign member = site.members + | where_exp: "member", "member.slug == include.lookup" + | first + %} +{% else %} + {% assign member = include %} +{% endif %}
- {% assign url = post.url %} - {% assign title = post.title %} - {{ title }} +
+
+ {% assign url = post.url %} + {% assign title = post.title %} + {% assign image = post.image %} - {% - include post-info.html - author=post.author - published=post.date - updated=post.last_modified_at - tags=post.tags - %} + {% if image %} + + {{ title | default: + + {% endif %} - {% assign excerpt = post.content - | default: "" - | regex_scan: "(.*)", true - | default: post.excerpt - | default: "" - | strip_html - %} - {% assign search = post.content - | strip_html - | strip_newlines - | regex_strip - %} -

- {{ excerpt }} -

+
+ {{ title }} + + {% + include post-info.html + author=post.author + published=post.date + updated=post.last_modified_at + tags=post.tags + %} + + {% assign excerpt = post.content + | default: "" + | regex_scan: "(.*)", true + | default: post.excerpt + | default: "" + | strip_html + %} + {% assign search = post.content + | strip_html + | strip_newlines + | regex_strip + %} +

+ {{ excerpt }} +

+
+
diff --git a/_layouts/post.html b/_layouts/post.html index 9b1641a903..09fd57b0fe 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,6 +2,8 @@ layout: default --- +{% include section.html background=page.image %} +

{{ page.title }}

{% diff --git a/_plugins/misc.rb b/_plugins/misc.rb index 6b4cb0fc8d..fe19bd8f08 100644 --- a/_plugins/misc.rb +++ b/_plugins/misc.rb @@ -1,4 +1,5 @@ require 'liquid' +require 'html-proofer' module Jekyll module MiscFilters @@ -14,7 +15,7 @@ def object_items(object) elsif object.is_a?(Array) return object end - return [] + return object end # filter a list of hashes by comma-sep'd field:value pairs @@ -54,6 +55,33 @@ def google_fonts(css) return url end end + + # based on https://github.com/episource/jekyll-html-proofer + module HtmlProofer + priority = Jekyll::Hooks::PRIORITY_MAP[:high] + 1000 + + Jekyll::Hooks.register(:site, :post_write, priority: priority) do |site| + if not site.config["proofer"] == false + options = { + allow_missing_href: true, + enforce_https: false, + ignore_files: [/.*testbed.html/], + ignore_urls: [ + /fonts\.gstatic\.com/, + /localhost:/, + /0\.0\.0\.0:/, + ], + } + + begin + HTMLProofer.check_directory(site.dest, options).run + rescue Exception => error + STDERR.puts error + # raise error + end + end + end + end end Liquid::Template.register_filter(Jekyll::MiscFilters) diff --git a/_posts/2023-02-23-example-post-3.md b/_posts/2023-02-23-example-post-3.md index c7b1038d5b..0aa5a15377 100644 --- a/_posts/2023-02-23-example-post-3.md +++ b/_posts/2023-02-23-example-post-3.md @@ -1,5 +1,6 @@ --- title: Example post 3 +image: images/photo.jpg author: john-doe tags: biology, medicine --- diff --git a/_scripts/anchors.js b/_scripts/anchors.js index 904edf9c15..58daabcbea 100644 --- a/_scripts/anchors.js +++ b/_scripts/anchors.js @@ -6,7 +6,7 @@ const onLoad = () => { // for each heading const headings = document.querySelectorAll( - "h1[id], h2[id], h3[id], h4[id]" + "h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]" ); for (const heading of headings) { // create anchor link diff --git a/_scripts/dark-mode.js b/_scripts/dark-mode.js index b0124d94f2..b75b25eb24 100644 --- a/_scripts/dark-mode.js +++ b/_scripts/dark-mode.js @@ -3,12 +3,9 @@ */ { - // save/load user's dark mode preference from local storage - const loadDark = () => window.localStorage.getItem("dark-mode") === "true"; - const saveDark = (value) => window.localStorage.setItem("dark-mode", value); - - // immediately load saved mode before page renders - document.documentElement.dataset.dark = loadDark(); + // immediately load saved (or default) mode before page renders + document.documentElement.dataset.dark = + window.localStorage.getItem("dark-mode") ?? "false"; const onLoad = () => { // update toggle button to match loaded mode @@ -23,6 +20,6 @@ window.onDarkToggleChange = (event) => { const value = event.target.checked; document.documentElement.dataset.dark = value; - saveDark(value); + window.localStorage.setItem("dark-mode", value); }; } diff --git a/_scripts/table-wrap.js b/_scripts/table-wrap.js new file mode 100644 index 0000000000..4c5bddd8c6 --- /dev/null +++ b/_scripts/table-wrap.js @@ -0,0 +1,25 @@ +/* + put a wrapper around each table to allow scrolling. +*/ + +{ + const onLoad = () => { + // for each top-level table + const tables = document.querySelectorAll("table:not(table table)"); + for (const table of tables) { + // create wrapper with scroll + const wrapper = document.createElement("div"); + wrapper.style.overflowX = "auto"; + + // undo css force-text-wrap + table.style.overflowWrap = "normal"; + + // add wrapper around table + table.parentNode.insertBefore(wrapper, table); + wrapper.appendChild(table); + } + }; + + // after page loads + window.addEventListener("load", onLoad); +} diff --git a/_styles/-theme.scss b/_styles/-theme.scss index 6ceff0f0da..0caecc6192 100644 --- a/_styles/-theme.scss +++ b/_styles/-theme.scss @@ -3,23 +3,25 @@ // colors [data-dark="false"] { - --primary: #0ea5e9; + --primary: #0795d9; --secondary: #7dd3fc; --text: #000000; --background: #ffffff; --background-alt: #fafafa; --light-gray: #e0e0e0; --gray: #808080; + --dark-gray: #404040; --overlay: #00000020; } [data-dark="true"] { - --primary: #0ea5e9; + --primary: #0795d9; --secondary: #075985; --text: #ffffff; --background: #181818; --background-alt: #1c1c1c; --light-gray: #404040; --gray: #808080; + --dark-gray: #b0b0b0; --overlay: #ffffff10; } @@ -31,7 +33,6 @@ --code: "Roboto Mono", monospace; // font sizes - --medium: 1rem; --large: 1.2rem; --xl: 1.4rem; --xxl: 1.6rem; @@ -44,8 +45,10 @@ // text line spacing --spacing: 2; + --compact: 1.5; // effects --rounded: 3px; --shadow: 0 0 10px 0 var(--overlay); + --transition: 0.2s ease; } diff --git a/_styles/alert.scss b/_styles/alert.scss index c789ad8061..6e77eec227 100644 --- a/_styles/alert.scss +++ b/_styles/alert.scss @@ -28,10 +28,10 @@ font-size: var(--large); } -.alert-content > *:first-child { +.alert-content > :first-child { margin-top: 0; } -.alert-content > *:last-child { +.alert-content > :last-child { margin-bottom: 0; } diff --git a/_styles/all.scss b/_styles/all.scss index 3cceebd595..a8aeeaaaf1 100644 --- a/_styles/all.scss +++ b/_styles/all.scss @@ -1,7 +1,11 @@ --- --- -* { +*, +::before, +::after { box-sizing: border-box; - transition: none 0.2s; + -moz-text-size-adjust: none; + -webkit-text-size-adjust: none; + text-size-adjust: none; } diff --git a/_styles/anchor.scss b/_styles/anchor.scss index 96c1a87bb8..65c18d8d2c 100644 --- a/_styles/anchor.scss +++ b/_styles/anchor.scss @@ -11,10 +11,10 @@ opacity: 0; font-size: 0.75em; text-decoration: none; - transition-property: opacity, color; + transition: opacity var(--transition), color var(--transition); } -*:hover > .anchor, +:hover > .anchor, .anchor:focus { opacity: 1; } diff --git a/_styles/body.scss b/_styles/body.scss index ef74897660..91ecffcfb4 100644 --- a/_styles/body.scss +++ b/_styles/body.scss @@ -1,18 +1,15 @@ --- --- -html, body { + display: flex; + flex-direction: column; margin: 0; padding: 0; min-height: 100vh; background: var(--background); color: var(--text); font-family: var(--body); -} - -body { - display: flex; - flex-direction: column; text-align: center; + line-height: var(--compact); } diff --git a/_styles/button.scss b/_styles/button.scss index 7b4122e461..ed497f0051 100644 --- a/_styles/button.scss +++ b/_styles/button.scss @@ -22,14 +22,13 @@ button { background: var(--primary); color: var(--background); text-align: center; + font: inherit; font-family: var(--heading); font-weight: var(--semi-bold); - line-height: 1; text-decoration: none; vertical-align: middle; - -webkit-appearance: none; appearance: none; - transition-property: background, color; + transition: background var(--transition), color var(--transition); } .button:hover { diff --git a/_styles/card.scss b/_styles/card.scss index 57fe20df78..d95888e443 100644 --- a/_styles/card.scss +++ b/_styles/card.scss @@ -37,9 +37,8 @@ padding: 20px; } -.card-text > *, -.card-text > .tags { - margin: 0; +.card-text > * { + margin: 0 !important; } .card-title { @@ -48,6 +47,6 @@ } .card-subtitle { - margin-top: -15px; + margin-top: -10px !important; font-style: italic; } diff --git a/_styles/citation.scss b/_styles/citation.scss index 0bcda4452a..dc6c95e2a6 100644 --- a/_styles/citation.scss +++ b/_styles/citation.scss @@ -4,9 +4,13 @@ $thumb-size: 180px; $wrap: 800px; +.citation-container { + container-type: inline-size; +} + .citation { display: flex; - margin: 15px 0; + margin: 20px 0; border-radius: var(--rounded); background: var(--background); overflow: hidden; @@ -32,7 +36,7 @@ $wrap: 800px; position: relative; display: inline-flex; flex-wrap: wrap; - gap: 15px; + gap: 10px; max-width: 100%; height: min-content; padding: 20px; @@ -47,7 +51,6 @@ $wrap: 800px; .citation-details, .citation-description { width: 100%; - line-height: calc(var(--spacing) - 0.4); } .citation-title { @@ -64,6 +67,10 @@ $wrap: 800px; z-index: -1; } +.citation-publisher { + text-transform: capitalize; +} + .citation-description { color: var(--gray); } @@ -84,7 +91,7 @@ $wrap: 800px; margin: 0; } -@media (max-width: $wrap) { +@container (max-width: #{$wrap}) { .citation { flex-direction: column; } diff --git a/_styles/code.scss b/_styles/code.scss index 79ada5e085..4a50657eb9 100644 --- a/_styles/code.scss +++ b/_styles/code.scss @@ -13,7 +13,6 @@ code.highlighter-rouge { padding: 2px 6px; background: var(--light-gray); border-radius: var(--rounded); - line-height: calc(var(--spacing) - 0.2); } // code block @@ -24,7 +23,6 @@ div.highlighter-rouge { overflow-x: auto; overflow-y: auto; text-align: left; - line-height: calc(var(--spacing) - 0.4); div.highlight { display: contents; diff --git a/_styles/cols.scss b/_styles/cols.scss index 7f5e9110ae..a3500b3ca2 100644 --- a/_styles/cols.scss +++ b/_styles/cols.scss @@ -18,11 +18,11 @@ $one: 500px; min-height: 0; } -.cols > div > *:first-child { +.cols > div > :first-child { margin-top: 0 !important; } -.cols > div > *:last-child { +.cols > div > :last-child { margin-bottom: 0 !important; } diff --git a/_styles/dark-toggle.scss b/_styles/dark-toggle.scss index 66d5906faf..ade9c05d9c 100644 --- a/_styles/dark-toggle.scss +++ b/_styles/dark-toggle.scss @@ -8,9 +8,8 @@ margin: 0; border-radius: 999px; background: var(--primary); - -webkit-appearance: none; appearance: none; - transition-property: background; + transition: background var(--transition); } .dark-toggle:after { @@ -23,7 +22,7 @@ font-family: "Font Awesome 6 Free"; font-weight: 900; transform: translate(-50%, -50%); - transition: left 0.2s; + transition: left var(--transition); } .dark-toggle:checked:after { diff --git a/_styles/feature.scss b/_styles/feature.scss index f304252924..3d2a53f94c 100644 --- a/_styles/feature.scss +++ b/_styles/feature.scss @@ -47,7 +47,7 @@ $wrap: 800px; } .feature-image { - width: unset; + width: 100%; max-width: calc($wrap / 2); } } diff --git a/_styles/grid.scss b/_styles/grid.scss index 21a3a3378e..8ff6d2ebb7 100644 --- a/_styles/grid.scss +++ b/_styles/grid.scss @@ -49,6 +49,6 @@ $one: 500px; } } -.grid > *:where(h1, h2, h3, h4) { +.grid > :where(h1, h2, h3, h4, h5, h6) { display: none; } diff --git a/_styles/header.scss b/_styles/header.scss index 4d2519927d..045e29354f 100644 --- a/_styles/header.scss +++ b/_styles/header.scss @@ -46,7 +46,7 @@ header a { height: 100%; } -.title { +.title-text { display: flex; justify-content: flex-start; align-items: baseline; @@ -57,13 +57,11 @@ header a { text-align: left; } -// main title -.title > *:first-child { +.title { font-size: var(--large); } -// subtitle -.title > *:last-child { +.subtitle { opacity: 0.65; font-weight: var(--thin); } @@ -75,9 +73,8 @@ header a { height: 30px; margin: 0; color: var(--text); - -webkit-appearance: none; appearance: none; - transition-property: background; + transition: background var(--transition); } .nav-toggle:after { @@ -153,17 +150,17 @@ header[data-big] { height: $logo-big; } - .title { + .title-text { flex-direction: column; align-items: center; text-align: center; } - .title > *:first-child { + .title { font-size: var(--xxl); } - .title > *:last-child { + .subtitle { font-size: var(--large); } } diff --git a/_styles/heading.scss b/_styles/heading.scss index e02dc47cd2..2ea35a4289 100644 --- a/_styles/heading.scss +++ b/_styles/heading.scss @@ -4,45 +4,47 @@ h1, h2, h3, -h4 { +h4, +h5, +h6 { + margin: 40px 0 20px 0; font-family: var(--heading); - line-height: calc(var(--spacing) - 0.2); + font-weight: var(--semi-bold); + text-align: left; + letter-spacing: 1px; } h1 { - margin: 40px 0 20px 0; - font-size: var(--xxl); + font-size: 1.6rem; font-weight: var(--regular); - letter-spacing: 1px; text-transform: uppercase; - text-align: left; + text-align: center; } h2 { - margin: 40px 0 20px 0; + font-size: 1.6rem; padding-bottom: 5px; border-bottom: solid 1px var(--light-gray); - font-size: var(--xl); font-weight: var(--regular); - letter-spacing: 1px; - text-align: left; } h3 { - margin: 40px 0 20px 0; - font-size: var(--large); - font-weight: var(--semi-bold); - text-align: left; + font-size: 1.5rem; } h4 { - margin: 40px 0 20px 0; - font-size: var(--medium); - font-weight: var(--semi-bold); - text-align: left; + font-size: 1.3rem; +} + +h5 { + font-size: 1.15rem; +} + +h6 { + font-size: 1rem; } -:where(h1, h2, h3, h4) > .icon { +:where(h1, h2, h3, h4, h5, h6) > .icon { margin-right: 1em; color: var(--light-gray); } diff --git a/_styles/link.scss b/_styles/link.scss index 7d1fb844d0..41230d38b7 100644 --- a/_styles/link.scss +++ b/_styles/link.scss @@ -3,7 +3,7 @@ a { color: var(--primary); - transition-property: color; + transition: color var(--transition); overflow-wrap: break-word; } diff --git a/_styles/list.scss b/_styles/list.scss index e90094fe13..d769a6a38a 100644 --- a/_styles/list.scss +++ b/_styles/list.scss @@ -16,4 +16,9 @@ li { padding-left: 10px; text-align: justify; line-height: var(--spacing); + + ul, + ol { + margin: 0; + } } diff --git a/_styles/portrait.scss b/_styles/portrait.scss index 50849f355b..fa0c03960b 100644 --- a/_styles/portrait.scss +++ b/_styles/portrait.scss @@ -48,7 +48,6 @@ .portrait-text { display: flex; flex-direction: column; - line-height: calc(var(--spacing) - 0.4); } .portrait-name { @@ -63,7 +62,7 @@ display: flex; justify-content: center; align-items: center; - width: 20%; + width: calc(20px + 10%); aspect-ratio: 1 / 1; border-radius: 999px; background: var(--background); diff --git a/_styles/post-excerpt.scss b/_styles/post-excerpt.scss index 6e57a105ce..27c7a1dc1b 100644 --- a/_styles/post-excerpt.scss +++ b/_styles/post-excerpt.scss @@ -1,31 +1,69 @@ --- --- +$thumb-size: 200px; +$wrap: 800px; + +.post-excerpt-container { + container-type: inline-size; +} + .post-excerpt { display: flex; - flex-wrap: wrap; - gap: 20px; margin: 20px 0; - padding: 20px 30px; border-radius: var(--rounded); background: var(--background); - text-align: left; + overflow: hidden; box-shadow: var(--shadow); } -.post-excerpt > * { +.post-excerpt-image { + position: relative; + width: $thumb-size; + flex-shrink: 0; + // box-shadow: var(--shadow); +} + +.post-excerpt-image img { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: cover; +} + +.post-excerpt-text { + display: flex; + flex-wrap: wrap; + gap: 20px; + padding: 20px 30px; + text-align: left; +} + +.post-excerpt-text > * { margin: 0 !important; } -.post-excerpt > a:first-child { +.post-excerpt-text > a:first-child { width: 100%; font-weight: var(--semi-bold); } -.post-excerpt > div { +.post-excerpt-text > div { justify-content: flex-start; } -.post-excerpt > p { +.post-excerpt-text > p { width: 100%; } + +@container (max-width: #{$wrap}) { + .post-excerpt { + flex-direction: column; + } + + .post-excerpt-image { + width: unset; + height: $thumb-size; + } +} diff --git a/_styles/post-info.scss b/_styles/post-info.scss index 4c8eaaab01..65c86cbca2 100644 --- a/_styles/post-info.scss +++ b/_styles/post-info.scss @@ -8,7 +8,7 @@ flex-wrap: wrap; gap: 20px; margin: 20px 0; - color: var(--gray); + color: var(--dark-gray); } .post-info .portrait { diff --git a/_styles/post-nav.scss b/_styles/post-nav.scss index 2fba2fc2db..40b5dd170a 100644 --- a/_styles/post-nav.scss +++ b/_styles/post-nav.scss @@ -9,22 +9,21 @@ $wrap: 600px; align-items: flex-start; gap: 10px; color: var(--gray); - line-height: calc(var(--spacing) - 0.4); } -.post-nav > *:first-child { +.post-nav > :first-child { text-align: left; } -.post-nav > *:last-child { +.post-nav > :last-child { text-align: right; } -.post-nav > *:first-child .icon { +.post-nav > :first-child .icon { margin-right: 0.5em; } -.post-nav > *:last-child .icon { +.post-nav > :last-child .icon { margin-left: 0.5em; } diff --git a/_styles/quote.scss b/_styles/quote.scss index e6dcb45de5..68b2f3a4c0 100644 --- a/_styles/quote.scss +++ b/_styles/quote.scss @@ -7,10 +7,10 @@ blockquote { border-left: solid 4px var(--light-gray); } -blockquote > *:first-child { +blockquote > :first-child { margin-top: 0; } -blockquote > *:last-child { +blockquote > :last-child { margin-bottom: 0; } diff --git a/_styles/section.scss b/_styles/section.scss index bc3e564605..332deb65d5 100644 --- a/_styles/section.scss +++ b/_styles/section.scss @@ -6,7 +6,7 @@ $padding: 40px; section { padding: $padding max($padding, calc((100% - $page) / 2)); - transition-property: background, color; + transition: background var(--transition), color var(--transition); } section[data-size="wide"] { diff --git a/_styles/table.scss b/_styles/table.scss index c5736ef002..995c700235 100644 --- a/_styles/table.scss +++ b/_styles/table.scss @@ -1,14 +1,10 @@ --- --- -.table-wrapper { - margin: 40px 0; - overflow-x: auto; -} - table { - margin: 0 auto; + margin: 40px auto; border-collapse: collapse; + overflow-wrap: anywhere; } th { diff --git a/_styles/tags.scss b/_styles/tags.scss index 932b7ed889..4e98207fa9 100644 --- a/_styles/tags.scss +++ b/_styles/tags.scss @@ -2,7 +2,7 @@ --- .tags { - display: inline-flex; + display: flex; justify-content: center; align-items: center; flex-wrap: wrap; @@ -22,7 +22,7 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - transition-property: background, color; + transition: background var(--transition), color var(--transition); } .tag:hover { diff --git a/_styles/textbox.scss b/_styles/textbox.scss index 07bc0128e6..6d33cedc6a 100644 --- a/_styles/textbox.scss +++ b/_styles/textbox.scss @@ -12,7 +12,6 @@ input[type="text"] { color: var(--text); font-family: inherit; font-size: inherit; - -webkit-appearance: none; appearance: none; box-shadow: var(--shadow); } diff --git a/testbed.md b/testbed.md index 3c95e91bb7..6b343a5eca 100644 --- a/testbed.md +++ b/testbed.md @@ -36,10 +36,16 @@ Text with extra blank lines above and below - list item a - list item b - list item c - + 1. ordered list item 1 -2. ordered list item 2 -3. ordered list item 3 +1. ordered list item 2 +1. ordered list item 3 + + + +1. top level list item + - nested list item + 1. even deeper nested list item Plain image: @@ -61,6 +67,14 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +##### Heading 5 + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + +###### Heading 6 + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + --- | TABLE | Game 1 | Game 2 | Game 3 | Total | @@ -340,7 +354,7 @@ With figure components ### Grid of citations {% capture content %} -{% include list.html data="citations" component="citation" %} +{% include list.html data="citations" component="citation" style="rich" %} {% endcapture %} {% include grid.html content=content %}