diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c36e6cef1b..8378a371e5 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -15,7 +15,7 @@ on: hugoVersion: description: "Hugo Version" required: false - default: "0.146.0" + default: "latest" # Allow one concurrent deployment concurrency: @@ -34,8 +34,14 @@ jobs: contents: read runs-on: ubuntu-latest env: - HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }} + HUGO_VERSION: ${{ github.event.inputs.hugoVersion || 'latest' }} steps: + - name: Resolve Hugo version + run: | + if [ "${HUGO_VERSION}" = "latest" ]; then + HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/') + echo "HUGO_VERSION=${HUGO_VERSION}" >> $GITHUB_ENV + fi - name: Install Hugo CLI run: | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \ diff --git a/README.md b/README.md index 9fc46f0345..678df9ae4d 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,16 @@ **A fast, clean, and responsive theme for [Hugo](https://gohugo.io/).** [![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/) -[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.146.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.146.0) +[![Minimum Hugo Version](https://img.shields.io/static/v1?label=Hugo&message=v0.146.0%2B&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.146.0) [![Discord](https://img.shields.io/discord/971046860317921340?label=Discord&logo=discord)](https://discord.gg/ahpmTvhVmp) -[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE) -![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod) > Based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3), with additional features and customization options. -| Resource | Link | -|----------|------| -| Live Demo | [adityatelange.github.io/hugo-PaperMod](https://adityatelange.github.io/hugo-PaperMod/) | -| Documentation | [Wiki](https://github.com/adityatelange/hugo-PaperMod/wiki) | -| Example Site Source | [exampleSite branch](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) | +| Resource | Link | +| ------------------- | --------------------------------------------------------------------------------------- | +| Live Demo | [adityatelange.github.io/hugo-PaperMod](https://adityatelange.github.io/hugo-PaperMod/) | +| Documentation 📚 | [Wiki](https://github.com/adityatelange/hugo-PaperMod/wiki) | +| Example Site Source | [exampleSite branch](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) |

Mockup image @@ -22,7 +20,9 @@ --- -## Features +## Features 💥 + +`☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive` - **Asset pipeline** -- Hugo's built-in asset generator with fingerprinting, bundling, and minification. - **Three layout modes** -- [Regular](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode), [Home-Info](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode), and [Profile](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode). @@ -40,41 +40,27 @@ - **Related post suggestions** - **Zero JS build dependencies** -- No webpack, Node.js, or other tooling required. -For the full list, see the **[Features wiki page](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)**. - ---- - -## Installation - -Detailed installation and update instructions are available in the **[Installation guide](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)**. - ---- - -## FAQs and How-To Guides - -Common questions and configuration walkthroughs are covered in the **[FAQ wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)**. +| Topic | Description | +| ------------------------------------------------------------------------------------------------- | ----------------------------------------------- | +| **[Installation guide](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** | Detailed installation and update instructions | +| **[Features wiki page](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** | In-depth explanations of all features | +| **[FAQ wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** | Common questions and configuration walkthroughs | +| **[Icons wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** | Documentation for social icons and share icons | +| **[Variables wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Variables)** | List of all available template variables | +| **[Overiding templates](https://github.com/adityatelange/hugo-PaperMod/wiki/Template_Overrides)** | Guide to customizing templates without forking | +| **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** | Detailed history of releases | --- -## Icons - -Documentation for social icons and share icons can be found in the **[Icons wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)**. - ---- - -## Changelog - -See **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** for a detailed history of changes. - ---- - -## Performance +## Performance ☄️ PaperMod consistently scores near-perfect results on [Pagespeed Insights](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/). +image + --- -## Support +## Support 🫶 - Star this repository to show your support. - Share PaperMod with others who might find it useful. @@ -82,7 +68,7 @@ PaperMod consistently scores near-perfect results on [Pagespeed Insights](https: --- -## Acknowledgements +## Special Thanks 🌟 - [Highlight.js](https://github.com/highlightjs/highlight.js) - [Fuse.js](https://github.com/krisk/fuse) @@ -92,6 +78,6 @@ PaperMod consistently scores near-perfect results on [Pagespeed Insights](https: --- -## Stargazers +## Stargazers 📈 [![Stargazers over time](https://starchart.cc/adityatelange/hugo-PaperMod.svg?background=%23ffffff00&axis=%23858585&line=%236b63ff)](https://starchart.cc/adityatelange/hugo-PaperMod) diff --git a/assets/css/common/footer.css b/assets/css/common/footer.css index 5addb1e0fb..80d2ba0f45 100644 --- a/assets/css/common/footer.css +++ b/assets/css/common/footer.css @@ -39,9 +39,9 @@ background: var(--tertiary); width: 42px; height: 42px; - padding: 12px; + padding: 10px; border-radius: 64px; - transition: visibility 0.5s, opacity 0.8s linear; + transition: visibility .3s, opacity .3s cubic-bezier(0.4, 0, 1, 1); } .top-link, @@ -53,8 +53,3 @@ .top-link:hover { color: var(--primary); } - -.top-link:focus, -#theme-toggle:focus { - outline: 0; -} diff --git a/assets/css/common/header.css b/assets/css/common/header.css index 689643334a..7ca29352bc 100644 --- a/assets/css/common/header.css +++ b/assets/css/common/header.css @@ -13,7 +13,7 @@ } .logo, -#menu { +.menu { display: flex; margin: auto var(--gap); } @@ -36,35 +36,35 @@ margin-inline-end: 8px; } -button#theme-toggle { +.theme-toggle { font-size: 26px; margin: auto 4px; } -[data-theme="dark"] #moon { +[data-theme="dark"] .moon { display: none; } -[data-theme="light"] #sun { +[data-theme="light"] .sun { display: none; } -#menu { +.menu { list-style: none; word-break: keep-all; overflow-x: auto; white-space: nowrap; } -#menu li + li { +.menu li + li { margin-inline-start: var(--gap); } -#menu a { +.menu a { font-size: 16px; } -#menu .active { +.menu .active { font-weight: 500; border-bottom: 2px solid currentColor; } diff --git a/assets/css/common/main.css b/assets/css/common/main.css index c6dc887f19..25ae4dae59 100644 --- a/assets/css/common/main.css +++ b/assets/css/common/main.css @@ -33,10 +33,6 @@ padding: 10px; } -.social-icons a:first-of-type { - padding-inline-start: 0; -} - .social-icons a svg { height: 26px; width: 26px; diff --git a/assets/css/common/post-entry.css b/assets/css/common/post-entry.css index 5ca7d7702c..d6a83138b3 100644 --- a/assets/css/common/post-entry.css +++ b/assets/css/common/post-entry.css @@ -38,6 +38,11 @@ margin: 0; } +.home-info .social-icons a:first-of-type { + padding-inline-start: 0; +} + + .post-entry { position: relative; margin-bottom: var(--gap); diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 34a0847240..b21b9b0f19 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -82,10 +82,6 @@ margin-inline-start: var(--gap); } -.toc summary:focus { - outline: 0; -} - .post-content { color: var(--content); margin: 30px 0; diff --git a/assets/css/common/profile-mode.css b/assets/css/common/profile-mode.css index 9e98df55b4..8f6d18384d 100644 --- a/assets/css/common/profile-mode.css +++ b/assets/css/common/profile-mode.css @@ -14,7 +14,7 @@ display: flex; flex-direction: column; align-items: center; - gap: 10px; + gap: 1rem; } .profile img { @@ -24,20 +24,11 @@ .buttons { flex-wrap: wrap; max-width: 400px; + gap: 1rem; } .button { background: var(--tertiary); border-radius: var(--radius); - margin: 8px; - padding: 6px; - transition: transform 0.1s; -} - -.button-inner { - padding: 0 8px; -} - -.button:active { - transform: scale(0.96); + padding: 0.4rem 0.8rem; } diff --git a/assets/css/common/search.css b/assets/css/common/search.css index 38d5b6bc41..5ea9d3b036 100644 --- a/assets/css/common/search.css +++ b/assets/css/common/search.css @@ -1,4 +1,4 @@ -#searchbox input { +.searchbox input { padding: 4px 10px; width: 100%; color: var(--primary); @@ -7,11 +7,11 @@ border-radius: var(--radius); } -#searchbox input:focus { +.searchbox input:focus { border-color: var(--secondary); } -#searchResults li { +.searchResults li { list-style: none; border-radius: var(--radius); padding: 10px; @@ -20,26 +20,25 @@ font-weight: 500; } -#searchResults { +.searchResults { margin: 10px 0; width: 100%; } -#searchResults li:active { +.searchResults li:active { transition: transform 0.1s; transform: scale(0.98); } -#searchResults a { +.searchResults a { position: absolute; width: 100%; height: 100%; top: 0px; left: 0px; - outline: none; } -#searchResults .focus { +.searchResults .focus { transform: scale(0.98); border: 2px solid var(--tertiary); } diff --git a/assets/css/common/terms.css b/assets/css/common/terms.css index 244614bc99..d04c603548 100644 --- a/assets/css/common/terms.css +++ b/assets/css/common/terms.css @@ -1,12 +1,18 @@ +.terms-tags { + display: flex; + flex-wrap: wrap; + gap: 20px; + margin-top: var(--content-gap); +} + .terms-tags li { display: inline-block; - margin: 10px; font-weight: 500; } .terms-tags a { display: block; - padding: 3px 10px; + padding: 4px 10px; background: var(--tertiary); border-radius: 6px; transition: transform 0.1s; diff --git a/assets/css/core/zmedia.css b/assets/css/core/zmedia.css index a68fd7189e..6a3355e204 100644 --- a/assets/css/core/zmedia.css +++ b/assets/css/core/zmedia.css @@ -48,8 +48,8 @@ .button:active, .post-entry:active, .top-link, - #searchResults .focus, - #searchResults li:active { + .searchResults .focus, + .searchResults li:active { transform: none; } } diff --git a/assets/css/includes/scroll-bar.css b/assets/css/includes/scroll-bar.css deleted file mode 100644 index 1e0656e097..0000000000 --- a/assets/css/includes/scroll-bar.css +++ /dev/null @@ -1,59 +0,0 @@ -/* from reset */ -::-webkit-scrollbar-track { - background: 0 0; -} - -::-webkit-scrollbar-thumb { - background: var(--tertiary); - border: 5px solid var(--theme); - border-radius: var(--radius); -} - -[data-theme="light"] .list::-webkit-scrollbar-thumb { - border: 5px solid var(--code-bg); -} - -::-webkit-scrollbar-thumb:hover { - background: var(--secondary); -} - -::-webkit-scrollbar:not(.highlighttable, .highlight table, .gist .highlight) { - background: var(--theme); -} - -/* from post-single */ -.md-content .highlighttable td .highlight pre code::-webkit-scrollbar { - display: none; -} - -.md-content :not(table) ::-webkit-scrollbar-thumb { - border: 2px solid var(--code-block-bg); - background: rgb(113, 113, 117); -} - -.md-content :not(table) ::-webkit-scrollbar-thumb:hover { - background: rgb(163, 163, 165); -} - -.gist table::-webkit-scrollbar-thumb { - border: 2px solid rgb(255, 255, 255); - background: rgb(173, 173, 173); -} - -.gist table::-webkit-scrollbar-thumb:hover { - background: rgb(112, 112, 112); -} - -.md-content table::-webkit-scrollbar-thumb { - border-width: 2px; -} - -/* from zmedia */ -@media screen and (min-width: 768px) { - - /* reset */ - ::-webkit-scrollbar { - width: 19px; - height: 11px; - } -} diff --git a/go.mod b/go.mod index af95855690..4a7947141d 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/adityatelange/hugo-PaperMod -go 1.12 +go 1.16 diff --git a/layouts/_default/search.html b/layouts/_default/search.html index bb7d436dcb..fc1b518c10 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -20,10 +20,10 @@

{{- (printf "%s " .Title ) | htmlUnescape -}} {{- end }} - {{- $currentPage := . }} -