mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
pretty run
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -51,4 +51,4 @@ jobs:
|
||||
push_options: "--dry-run"
|
||||
file_pattern: "assets/css/compiled/main.css"
|
||||
commit_message: "💄 Rebuild CSS"
|
||||
- run: git push
|
||||
- run: git push
|
||||
|
||||
10
.github/workflows/greetings.yml
vendored
10
.github/workflows/greetings.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Thanks for contributing to Blowfish"
|
||||
pr-message: "Thanks for contributing to Blowfish"
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Thanks for contributing to Blowfish"
|
||||
pr-message: "Thanks for contributing to Blowfish"
|
||||
|
||||
21
.github/workflows/hugo-version-update.yml
vendored
21
.github/workflows/hugo-version-update.yml
vendored
@@ -2,7 +2,7 @@ name: Update Hugo version
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *'
|
||||
- cron: "0 6 * * *"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -10,30 +10,31 @@ jobs:
|
||||
updateBlowfish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: dev
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
|
||||
- name: Fetch release version
|
||||
id: fetch-release
|
||||
run: |
|
||||
curl -sL https://api.github.com/repos/gohugoio/hugo/releases/latest | \
|
||||
jq -r ".tag_name" > release-versions/hugo-latest.txt
|
||||
jq -r ".tag_name" > release-versions/hugo-latest.txt
|
||||
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
||||
|
||||
run:
|
||||
echo ::set-output name=modified::$([ -z "`git status --porcelain`" ]
|
||||
&& echo "false" || echo "true")
|
||||
|
||||
- name: Update config.toml
|
||||
id: update-config
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
run: |
|
||||
cat release-versions/hugo-latest.txt | \
|
||||
while read version; do sed -i'' -E "s/(max = \")[0-9]+\.[0-9]+\.[0-9]+(\")/\1${version#v}\2/g" config.toml; done
|
||||
while read version; do sed -i'' -E "s/(max = \")[0-9]+\.[0-9]+\.[0-9]+(\")/\1${version#v}\2/g" config.toml; done
|
||||
|
||||
- name: Create Pull Request
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
@@ -43,9 +44,9 @@ jobs:
|
||||
title: ⚙️ Update Hugo supported version
|
||||
body: |
|
||||
Updates [Hugo][1] support
|
||||
|
||||
|
||||
Auto-generated by [create-pull-request][2]
|
||||
|
||||
|
||||
[1]: https://github.com/gohugoio/hugo
|
||||
[2]: https://github.com/peter-evans/create-pull-request
|
||||
labels: dependencies, automated pr
|
||||
|
||||
28
.github/workflows/stale.yml
vendored
28
.github/workflows/stale.yml
vendored
@@ -7,26 +7,28 @@ name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
- cron: "0 1 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue will be closed since it has been stale for 60 days.'
|
||||
stale-pr-message: 'This pull request will be closed since it has been stale for 60 days.'
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
days-before-stale: 60
|
||||
days-before-close: 0
|
||||
remove-stale-when-updated: true
|
||||
operations-per-run: 100
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message:
|
||||
"This issue will be closed since it has been stale for 60 days."
|
||||
stale-pr-message:
|
||||
"This pull request will be closed since it has been stale for 60
|
||||
days."
|
||||
stale-issue-label: "no-issue-activity"
|
||||
stale-pr-label: "no-pr-activity"
|
||||
days-before-stale: 60
|
||||
days-before-close: 0
|
||||
remove-stale-when-updated: true
|
||||
operations-per-run: 100
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -22,4 +22,6 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
working-directory: ./exampleSite
|
||||
run: hugo --minify --themesDir ../.. --baseURL https://nunocoracao.github.io/blowfish/
|
||||
run:
|
||||
hugo --minify --themesDir ../.. --baseURL
|
||||
https://nunocoracao.github.io/blowfish/
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
github: [nunocoracao]
|
||||
custom: ["https://www.paypal.me/nunocoracao", "https://www.buymeacoffee.com/nunocoracao"]
|
||||
custom:
|
||||
[
|
||||
"https://www.paypal.me/nunocoracao",
|
||||
"https://www.buymeacoffee.com/nunocoracao",
|
||||
]
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
#zen-mode-button {
|
||||
cursor:pointer
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.zen-mode {
|
||||
position: relative;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body.zen-mode-enable {
|
||||
#bmc-wbtn, .author {
|
||||
display:none !important;
|
||||
}
|
||||
#bmc-wbtn,
|
||||
.author {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
|
||||
|
||||
@import './components/zen-mode.css';
|
||||
@import "./components/zen-mode.css";
|
||||
|
||||
@import "tailwindcss";
|
||||
@config "../../tailwind.config.js";
|
||||
@@ -38,13 +38,13 @@ button,
|
||||
@apply rtl:pr-4 rtl:border-l-0 rtl:border-r-4;
|
||||
}
|
||||
|
||||
.prose ul>li,
|
||||
.prose ol>li {
|
||||
.prose ul > li,
|
||||
.prose ol > li {
|
||||
@apply rtl:pl-0 rtl:pr-2 rtl:mr-7;
|
||||
}
|
||||
|
||||
.prose ol>li:before,
|
||||
.prose ul>li:before {
|
||||
.prose ol > li:before,
|
||||
.prose ul > li:before {
|
||||
@apply rtl:left-auto rtl:right-1;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ button,
|
||||
}
|
||||
|
||||
/* Adjust first child within prose */
|
||||
.prose div.min-w-0.max-w-prose>*:first-child {
|
||||
.prose div.min-w-0.max-w-prose > *:first-child {
|
||||
@apply mt-3;
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ button,
|
||||
}
|
||||
|
||||
#TOCView {
|
||||
max-height: calc(100vh - 150px);
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
max-height: calc(100vh - 150px);
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.toc ul,
|
||||
@@ -87,7 +87,7 @@ button,
|
||||
@apply font-normal text-neutral-700 dark:text-neutral-400;
|
||||
}
|
||||
|
||||
.toc ul>li {
|
||||
.toc ul > li {
|
||||
@apply rtl:mr-0;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ button,
|
||||
@apply relative z-0;
|
||||
}
|
||||
|
||||
.highlight:hover>.copy-button {
|
||||
.highlight:hover > .copy-button {
|
||||
@apply visible;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,9 @@ button,
|
||||
}
|
||||
|
||||
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
|
||||
.katex-display { overflow: auto hidden }
|
||||
.katex-display {
|
||||
overflow: auto hidden;
|
||||
}
|
||||
|
||||
/* Fix katex overflow https://github.com/nunocoracao/blowfish/issues/2138 */
|
||||
.katex-display {
|
||||
@@ -132,21 +134,21 @@ button,
|
||||
|
||||
/* Fix long tables breaking out of article on mobile */
|
||||
table {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Fix long inline code sections breaking out of article on mobile */
|
||||
code {
|
||||
word-wrap: break-word; /* All browsers since IE 5.5+ */
|
||||
overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
|
||||
word-wrap: break-word; /* All browsers since IE 5.5+ */
|
||||
overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
|
||||
}
|
||||
|
||||
/* Fix long URLs breaking out of article bounds on mobile */
|
||||
a {
|
||||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* -- Chroma Highlight -- */
|
||||
@@ -156,7 +158,7 @@ a {
|
||||
}
|
||||
|
||||
.prose-invert .highlight pre > code {
|
||||
background-color: unset;
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
/* LineTableTD */
|
||||
@@ -388,36 +390,36 @@ pre {
|
||||
.thumbnail {
|
||||
min-width: 300px;
|
||||
height: 180px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.thumbnail_card {
|
||||
height: 200px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.thumbnail_card_related {
|
||||
height: 150px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.thumbnail_card_term {
|
||||
height: 150px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.single_hero_basic {
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.single_hero_round {
|
||||
@@ -426,9 +428,9 @@ pre {
|
||||
}
|
||||
|
||||
.single_hero_background {
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
width: calc(100% + 40px);
|
||||
z-index: -10;
|
||||
margin-left: -20px;
|
||||
@@ -452,47 +454,48 @@ pre {
|
||||
}
|
||||
|
||||
.center-relative-left {
|
||||
left: calc(max(-50vw,-800px) + 50%);
|
||||
left: calc(max(-50vw, -800px) + 50%);
|
||||
}
|
||||
|
||||
.margin-0 {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.margin-top-\[-15px\] {
|
||||
margin-top: -15px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
.margin-top-\[0\.5rem\]{
|
||||
margin-top: 0.5rem;
|
||||
.margin-top-\[0\.5rem\] {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
.margin-right-\[10px\] {
|
||||
margin-right: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.margin-left-\[0px\] {
|
||||
margin-left: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.padding-main-menu {
|
||||
padding: 2px 0 3px 0
|
||||
padding: 2px 0 3px 0;
|
||||
}
|
||||
.padding-top-\[5px\] {
|
||||
padding-top: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.z-index-\[-10\] {
|
||||
z-index: -10;
|
||||
z-index: -10;
|
||||
}
|
||||
.z-index-80 {
|
||||
z-index: 80;
|
||||
z-index: 80;
|
||||
}
|
||||
.z-index-100 {
|
||||
z-index: 100;
|
||||
z-index: 100;
|
||||
}
|
||||
.z-index-500 {
|
||||
z-index: 500;
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
/* Offset scroll position to avoid header overlap */
|
||||
[id^="fn"], [id^="fnref"] {
|
||||
[id^="fn"],
|
||||
[id^="fnref"] {
|
||||
scroll-margin-top: 145px;
|
||||
}
|
||||
|
||||
@@ -524,19 +527,25 @@ pre {
|
||||
.nested-menu:hover + .menuhide {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.menuhide:hover {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.menuhide {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@@ -547,179 +556,593 @@ pre {
|
||||
}
|
||||
|
||||
/* Gallery Specific Styles */
|
||||
.grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
@screen sm {
|
||||
.sm\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.md\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
.lg\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen xl {
|
||||
.xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen 2xl {
|
||||
.2xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Carousel Specific Styles */
|
||||
.ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
|
||||
@screen sm {
|
||||
.sm\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.sm\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.sm\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.sm\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.sm\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.sm\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.md\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.md\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.md\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.md\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.md\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.md\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
.lg\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.lg\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.lg\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.lg\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.lg\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.lg\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen xl {
|
||||
.xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.xl\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.xl\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.xl\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen 2xl {
|
||||
.2xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.2xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.2xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
}
|
||||
.2xl\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.2xl\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.2xl\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 214,251,252;
|
||||
--color-neutral-200: 142,245,247;
|
||||
--color-neutral-300: 70,239,243;
|
||||
--color-neutral-400: 15,217,222;
|
||||
--color-neutral-500: 10,147,150;
|
||||
--color-neutral-600: 7,110,112;
|
||||
--color-neutral-700: 5,72,74;
|
||||
--color-neutral-800: 2,35,35;
|
||||
--color-neutral-900: 0,0,0;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 255,240,212;
|
||||
--color-primary-300: 255,213,136;
|
||||
--color-primary-400: 255,187,59;
|
||||
--color-primary-500: 238,155,0;
|
||||
--color-primary-600: 197,128,0;
|
||||
--color-primary-700: 156,102,0;
|
||||
--color-primary-800: 116,75,0;
|
||||
--color-primary-900: 75,49,0;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,246,241;
|
||||
--color-secondary-200: 254,194,166;
|
||||
--color-secondary-300: 252,142,91;
|
||||
--color-secondary-400: 251,91,15;
|
||||
--color-secondary-500: 187,62,3;
|
||||
--color-secondary-600: 147,49,2;
|
||||
--color-secondary-700: 107,35,2;
|
||||
--color-secondary-800: 67,22,1;
|
||||
--color-secondary-900: 26,9,0;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 214, 251, 252;
|
||||
--color-neutral-200: 142, 245, 247;
|
||||
--color-neutral-300: 70, 239, 243;
|
||||
--color-neutral-400: 15, 217, 222;
|
||||
--color-neutral-500: 10, 147, 150;
|
||||
--color-neutral-600: 7, 110, 112;
|
||||
--color-neutral-700: 5, 72, 74;
|
||||
--color-neutral-800: 2, 35, 35;
|
||||
--color-neutral-900: 0, 0, 0;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 255, 240, 212;
|
||||
--color-primary-300: 255, 213, 136;
|
||||
--color-primary-400: 255, 187, 59;
|
||||
--color-primary-500: 238, 155, 0;
|
||||
--color-primary-600: 197, 128, 0;
|
||||
--color-primary-700: 156, 102, 0;
|
||||
--color-primary-800: 116, 75, 0;
|
||||
--color-primary-900: 75, 49, 0;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 246, 241;
|
||||
--color-secondary-200: 254, 194, 166;
|
||||
--color-secondary-300: 252, 142, 91;
|
||||
--color-secondary-400: 251, 91, 15;
|
||||
--color-secondary-500: 187, 62, 3;
|
||||
--color-secondary-600: 147, 49, 2;
|
||||
--color-secondary-700: 107, 35, 2;
|
||||
--color-secondary-800: 67, 22, 1;
|
||||
--color-secondary-900: 26, 9, 0;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 254,197,207;
|
||||
--color-neutral-200: 253,121,144;
|
||||
--color-neutral-300: 251,46,82;
|
||||
--color-neutral-400: 217,4,41;
|
||||
--color-neutral-500: 177,3,33;
|
||||
--color-neutral-600: 137,3,26;
|
||||
--color-neutral-700: 97,2,18;
|
||||
--color-neutral-800: 57,1,11;
|
||||
--color-neutral-900: 17,0,3;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 230,233,238;
|
||||
--color-primary-300: 186,193,206;
|
||||
--color-primary-400: 141,153,174;
|
||||
--color-primary-500: 117,132,157;
|
||||
--color-primary-600: 97,111,136;
|
||||
--color-primary-700: 80,92,113;
|
||||
--color-primary-800: 63,72,89;
|
||||
--color-primary-900: 46,53,65;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 217,230,238;
|
||||
--color-secondary-200: 164,195,215;
|
||||
--color-secondary-300: 111,160,192;
|
||||
--color-secondary-400: 69,123,157;
|
||||
--color-secondary-500: 57,101,129;
|
||||
--color-secondary-600: 44,79,100;
|
||||
--color-secondary-700: 32,56,72;
|
||||
--color-secondary-800: 19,34,44;
|
||||
--color-secondary-900: 7,12,15;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 254, 197, 207;
|
||||
--color-neutral-200: 253, 121, 144;
|
||||
--color-neutral-300: 251, 46, 82;
|
||||
--color-neutral-400: 217, 4, 41;
|
||||
--color-neutral-500: 177, 3, 33;
|
||||
--color-neutral-600: 137, 3, 26;
|
||||
--color-neutral-700: 97, 2, 18;
|
||||
--color-neutral-800: 57, 1, 11;
|
||||
--color-neutral-900: 17, 0, 3;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 230, 233, 238;
|
||||
--color-primary-300: 186, 193, 206;
|
||||
--color-primary-400: 141, 153, 174;
|
||||
--color-primary-500: 117, 132, 157;
|
||||
--color-primary-600: 97, 111, 136;
|
||||
--color-primary-700: 80, 92, 113;
|
||||
--color-primary-800: 63, 72, 89;
|
||||
--color-primary-900: 46, 53, 65;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 217, 230, 238;
|
||||
--color-secondary-200: 164, 195, 215;
|
||||
--color-secondary-300: 111, 160, 192;
|
||||
--color-secondary-400: 69, 123, 157;
|
||||
--color-secondary-500: 57, 101, 129;
|
||||
--color-secondary-600: 44, 79, 100;
|
||||
--color-secondary-700: 32, 56, 72;
|
||||
--color-secondary-800: 19, 34, 44;
|
||||
--color-secondary-900: 7, 12, 15;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 232,238,237;
|
||||
--color-neutral-200: 188,206,203;
|
||||
--color-neutral-300: 143,174,170;
|
||||
--color-neutral-400: 101,140,134;
|
||||
--color-neutral-500: 84,116,111;
|
||||
--color-neutral-600: 67,93,89;
|
||||
--color-neutral-700: 50,69,66;
|
||||
--color-neutral-800: 33,45,43;
|
||||
--color-neutral-900: 16,21,21;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 205,252,247;
|
||||
--color-primary-300: 132,249,235;
|
||||
--color-primary-400: 59,245,223;
|
||||
--color-primary-500: 20,243,217;
|
||||
--color-primary-600: 11,212,188;
|
||||
--color-primary-700: 9,173,153;
|
||||
--color-primary-800: 7,134,119;
|
||||
--color-primary-900: 5,95,84;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 194,253,219;
|
||||
--color-secondary-200: 120,251,175;
|
||||
--color-secondary-300: 45,249,130;
|
||||
--color-secondary-400: 6,212,92;
|
||||
--color-secondary-500: 5,172,75;
|
||||
--color-secondary-600: 4,133,58;
|
||||
--color-secondary-700: 3,93,40;
|
||||
--color-secondary-800: 2,53,23;
|
||||
--color-secondary-900: 0,14,6;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 232, 238, 237;
|
||||
--color-neutral-200: 188, 206, 203;
|
||||
--color-neutral-300: 143, 174, 170;
|
||||
--color-neutral-400: 101, 140, 134;
|
||||
--color-neutral-500: 84, 116, 111;
|
||||
--color-neutral-600: 67, 93, 89;
|
||||
--color-neutral-700: 50, 69, 66;
|
||||
--color-neutral-800: 33, 45, 43;
|
||||
--color-neutral-900: 16, 21, 21;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 205, 252, 247;
|
||||
--color-primary-300: 132, 249, 235;
|
||||
--color-primary-400: 59, 245, 223;
|
||||
--color-primary-500: 20, 243, 217;
|
||||
--color-primary-600: 11, 212, 188;
|
||||
--color-primary-700: 9, 173, 153;
|
||||
--color-primary-800: 7, 134, 119;
|
||||
--color-primary-900: 5, 95, 84;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 194, 253, 219;
|
||||
--color-secondary-200: 120, 251, 175;
|
||||
--color-secondary-300: 45, 249, 130;
|
||||
--color-secondary-400: 6, 212, 92;
|
||||
--color-secondary-500: 5, 172, 75;
|
||||
--color-secondary-600: 4, 133, 58;
|
||||
--color-secondary-700: 3, 93, 40;
|
||||
--color-secondary-800: 2, 53, 23;
|
||||
--color-secondary-900: 0, 14, 6;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 255,255,255;
|
||||
--color-neutral-200: 201,209,244;
|
||||
--color-neutral-300: 137,156,231;
|
||||
--color-neutral-400: 74,103,217;
|
||||
--color-neutral-500: 37,65,178;
|
||||
--color-neutral-600: 30,53,144;
|
||||
--color-neutral-700: 23,40,110;
|
||||
--color-neutral-800: 16,28,77;
|
||||
--color-neutral-900: 9,16,43;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 252,211,226;
|
||||
--color-primary-300: 246,140,178;
|
||||
--color-primary-400: 240,69,131;
|
||||
--color-primary-500: 216,17,89;
|
||||
--color-primary-600: 178,14,73;
|
||||
--color-primary-700: 140,11,58;
|
||||
--color-primary-800: 103,8,42;
|
||||
--color-primary-900: 65,5,27;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,255,255;
|
||||
--color-secondary-200: 255,255,255;
|
||||
--color-secondary-300: 255,242,219;
|
||||
--color-secondary-400: 255,215,143;
|
||||
--color-secondary-500: 255,188,66;
|
||||
--color-secondary-600: 255,174,25;
|
||||
--color-secondary-700: 239,155,0;
|
||||
--color-secondary-800: 199,128,0;
|
||||
--color-secondary-900: 158,102,0;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 201, 209, 244;
|
||||
--color-neutral-300: 137, 156, 231;
|
||||
--color-neutral-400: 74, 103, 217;
|
||||
--color-neutral-500: 37, 65, 178;
|
||||
--color-neutral-600: 30, 53, 144;
|
||||
--color-neutral-700: 23, 40, 110;
|
||||
--color-neutral-800: 16, 28, 77;
|
||||
--color-neutral-900: 9, 16, 43;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 252, 211, 226;
|
||||
--color-primary-300: 246, 140, 178;
|
||||
--color-primary-400: 240, 69, 131;
|
||||
--color-primary-500: 216, 17, 89;
|
||||
--color-primary-600: 178, 14, 73;
|
||||
--color-primary-700: 140, 11, 58;
|
||||
--color-primary-800: 103, 8, 42;
|
||||
--color-primary-900: 65, 5, 27;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 255, 255;
|
||||
--color-secondary-200: 255, 255, 255;
|
||||
--color-secondary-300: 255, 242, 219;
|
||||
--color-secondary-400: 255, 215, 143;
|
||||
--color-secondary-500: 255, 188, 66;
|
||||
--color-secondary-600: 255, 174, 25;
|
||||
--color-secondary-700: 239, 155, 0;
|
||||
--color-secondary-800: 199, 128, 0;
|
||||
--color-secondary-900: 158, 102, 0;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 255,255,255;
|
||||
--color-neutral-200: 218,196,249;
|
||||
--color-neutral-300: 175,126,243;
|
||||
--color-neutral-400: 131,56,236;
|
||||
--color-neutral-500: 108,22,229;
|
||||
--color-neutral-600: 91,18,192;
|
||||
--color-neutral-700: 73,15,155;
|
||||
--color-neutral-800: 56,11,118;
|
||||
--color-neutral-900: 38,8,80;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,230,241;
|
||||
--color-primary-200: 255,153,197;
|
||||
--color-primary-300: 255,77,154;
|
||||
--color-primary-400: 255,0,110;
|
||||
--color-primary-500: 214,0,92;
|
||||
--color-primary-600: 173,0,75;
|
||||
--color-primary-700: 133,0,57;
|
||||
--color-primary-800: 92,0,40;
|
||||
--color-primary-900: 51,0,22;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,255,255;
|
||||
--color-secondary-200: 211,228,255;
|
||||
--color-secondary-300: 135,181,255;
|
||||
--color-secondary-400: 58,134,255;
|
||||
--color-secondary-500: 17,109,255;
|
||||
--color-secondary-600: 0,89,231;
|
||||
--color-secondary-700: 0,74,191;
|
||||
--color-secondary-800: 0,58,150;
|
||||
--color-secondary-900: 0,42,109;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 218, 196, 249;
|
||||
--color-neutral-300: 175, 126, 243;
|
||||
--color-neutral-400: 131, 56, 236;
|
||||
--color-neutral-500: 108, 22, 229;
|
||||
--color-neutral-600: 91, 18, 192;
|
||||
--color-neutral-700: 73, 15, 155;
|
||||
--color-neutral-800: 56, 11, 118;
|
||||
--color-neutral-900: 38, 8, 80;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 230, 241;
|
||||
--color-primary-200: 255, 153, 197;
|
||||
--color-primary-300: 255, 77, 154;
|
||||
--color-primary-400: 255, 0, 110;
|
||||
--color-primary-500: 214, 0, 92;
|
||||
--color-primary-600: 173, 0, 75;
|
||||
--color-primary-700: 133, 0, 57;
|
||||
--color-primary-800: 92, 0, 40;
|
||||
--color-primary-900: 51, 0, 22;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 255, 255;
|
||||
--color-secondary-200: 211, 228, 255;
|
||||
--color-secondary-300: 135, 181, 255;
|
||||
--color-secondary-400: 58, 134, 255;
|
||||
--color-secondary-500: 17, 109, 255;
|
||||
--color-secondary-600: 0, 89, 231;
|
||||
--color-secondary-700: 0, 74, 191;
|
||||
--color-secondary-800: 0, 58, 150;
|
||||
--color-secondary-900: 0, 42, 109;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 255,255,255;
|
||||
--color-neutral-200: 214,219,222;
|
||||
--color-neutral-300: 172,183,188;
|
||||
--color-neutral-400: 129,146,154;
|
||||
--color-neutral-500: 92,107,115;
|
||||
--color-neutral-600: 74,86,92;
|
||||
--color-neutral-700: 56,65,70;
|
||||
--color-neutral-800: 38,44,47;
|
||||
--color-neutral-900: 19,23,24;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 255,255,255;
|
||||
--color-primary-300: 250,251,252;
|
||||
--color-primary-400: 204,216,222;
|
||||
--color-primary-500: 157,180,192;
|
||||
--color-primary-600: 132,161,176;
|
||||
--color-primary-700: 107,142,160;
|
||||
--color-primary-800: 89,121,138;
|
||||
--color-primary-900: 73,99,113;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,255,255;
|
||||
--color-secondary-200: 182,240,255;
|
||||
--color-secondary-300: 105,225,255;
|
||||
--color-secondary-400: 28,209,255;
|
||||
--color-secondary-500: 0,165,207;
|
||||
--color-secondary-600: 0,132,166;
|
||||
--color-secondary-700: 0,100,125;
|
||||
--color-secondary-800: 0,67,85;
|
||||
--color-secondary-900: 0,35,44;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 214, 219, 222;
|
||||
--color-neutral-300: 172, 183, 188;
|
||||
--color-neutral-400: 129, 146, 154;
|
||||
--color-neutral-500: 92, 107, 115;
|
||||
--color-neutral-600: 74, 86, 92;
|
||||
--color-neutral-700: 56, 65, 70;
|
||||
--color-neutral-800: 38, 44, 47;
|
||||
--color-neutral-900: 19, 23, 24;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 255, 255, 255;
|
||||
--color-primary-300: 250, 251, 252;
|
||||
--color-primary-400: 204, 216, 222;
|
||||
--color-primary-500: 157, 180, 192;
|
||||
--color-primary-600: 132, 161, 176;
|
||||
--color-primary-700: 107, 142, 160;
|
||||
--color-primary-800: 89, 121, 138;
|
||||
--color-primary-900: 73, 99, 113;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 255, 255;
|
||||
--color-secondary-200: 182, 240, 255;
|
||||
--color-secondary-300: 105, 225, 255;
|
||||
--color-secondary-400: 28, 209, 255;
|
||||
--color-secondary-500: 0, 165, 207;
|
||||
--color-secondary-600: 0, 132, 166;
|
||||
--color-secondary-700: 0, 100, 125;
|
||||
--color-secondary-800: 0, 67, 85;
|
||||
--color-secondary-900: 0, 35, 44;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 238,232,238;
|
||||
--color-neutral-200: 206,188,206;
|
||||
--color-neutral-300: 174,143,174;
|
||||
--color-neutral-400: 140,101,140;
|
||||
--color-neutral-500: 116,84,116;
|
||||
--color-neutral-600: 93,67,93;
|
||||
--color-neutral-700: 69,50,69;
|
||||
--color-neutral-800: 45,33,45;
|
||||
--color-neutral-900: 21,16,21;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 252,205,252;
|
||||
--color-primary-300: 249,132,247;
|
||||
--color-primary-400: 245,59,242;
|
||||
--color-primary-500: 243,20,239;
|
||||
--color-primary-600: 212,11,208;
|
||||
--color-primary-700: 173,9,170;
|
||||
--color-primary-800: 134,7,132;
|
||||
--color-primary-900: 95,5,94;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 227,194,253;
|
||||
--color-secondary-200: 192,120,251;
|
||||
--color-secondary-300: 157,45,249;
|
||||
--color-secondary-400: 119,6,212;
|
||||
--color-secondary-500: 97,5,172;
|
||||
--color-secondary-600: 74,4,133;
|
||||
--color-secondary-700: 52,3,93;
|
||||
--color-secondary-800: 30,2,53;
|
||||
--color-secondary-900: 8,0,14;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 238, 232, 238;
|
||||
--color-neutral-200: 206, 188, 206;
|
||||
--color-neutral-300: 174, 143, 174;
|
||||
--color-neutral-400: 140, 101, 140;
|
||||
--color-neutral-500: 116, 84, 116;
|
||||
--color-neutral-600: 93, 67, 93;
|
||||
--color-neutral-700: 69, 50, 69;
|
||||
--color-neutral-800: 45, 33, 45;
|
||||
--color-neutral-900: 21, 16, 21;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 252, 205, 252;
|
||||
--color-primary-300: 249, 132, 247;
|
||||
--color-primary-400: 245, 59, 242;
|
||||
--color-primary-500: 243, 20, 239;
|
||||
--color-primary-600: 212, 11, 208;
|
||||
--color-primary-700: 173, 9, 170;
|
||||
--color-primary-800: 134, 7, 132;
|
||||
--color-primary-900: 95, 5, 94;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 227, 194, 253;
|
||||
--color-secondary-200: 192, 120, 251;
|
||||
--color-secondary-300: 157, 45, 249;
|
||||
--color-secondary-400: 119, 6, 212;
|
||||
--color-secondary-500: 97, 5, 172;
|
||||
--color-secondary-600: 74, 4, 133;
|
||||
--color-secondary-700: 52, 3, 93;
|
||||
--color-secondary-800: 30, 2, 53;
|
||||
--color-secondary-900: 8, 0, 14;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 203,255,227;
|
||||
--color-neutral-100: 126,255,186;
|
||||
--color-neutral-200: 49,255,145;
|
||||
--color-neutral-300: 0,228,106;
|
||||
--color-neutral-400: 0,152,71;
|
||||
--color-neutral-500: 0,75,35;
|
||||
--color-neutral-600: 0,50,23;
|
||||
--color-neutral-700: 0,24,11;
|
||||
--color-neutral-800: 0,24,11;
|
||||
--color-neutral-900: 0,0,0;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 236,255,227;
|
||||
--color-primary-200: 184,255,150;
|
||||
--color-primary-300: 132,255,74;
|
||||
--color-primary-400: 80,252,0;
|
||||
--color-primary-500: 56,176,0;
|
||||
--color-primary-600: 48,151,0;
|
||||
--color-primary-700: 40,125,0;
|
||||
--color-primary-800: 40,125,0;
|
||||
--color-primary-900: 7,23,0;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 239,248,252;
|
||||
--color-secondary-200: 173,220,242;
|
||||
--color-secondary-300: 107,192,231;
|
||||
--color-secondary-400: 41,164,220;
|
||||
--color-secondary-500: 26,117,159;
|
||||
--color-secondary-600: 22,101,137;
|
||||
--color-secondary-700: 19,85,115;
|
||||
--color-secondary-800: 19,85,115;
|
||||
--color-secondary-900: 4,20,28;
|
||||
}
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 203, 255, 227;
|
||||
--color-neutral-100: 126, 255, 186;
|
||||
--color-neutral-200: 49, 255, 145;
|
||||
--color-neutral-300: 0, 228, 106;
|
||||
--color-neutral-400: 0, 152, 71;
|
||||
--color-neutral-500: 0, 75, 35;
|
||||
--color-neutral-600: 0, 50, 23;
|
||||
--color-neutral-700: 0, 24, 11;
|
||||
--color-neutral-800: 0, 24, 11;
|
||||
--color-neutral-900: 0, 0, 0;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 236, 255, 227;
|
||||
--color-primary-200: 184, 255, 150;
|
||||
--color-primary-300: 132, 255, 74;
|
||||
--color-primary-400: 80, 252, 0;
|
||||
--color-primary-500: 56, 176, 0;
|
||||
--color-primary-600: 48, 151, 0;
|
||||
--color-primary-700: 40, 125, 0;
|
||||
--color-primary-800: 40, 125, 0;
|
||||
--color-primary-900: 7, 23, 0;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 239, 248, 252;
|
||||
--color-secondary-200: 173, 220, 242;
|
||||
--color-secondary-300: 107, 192, 231;
|
||||
--color-secondary-400: 41, 164, 220;
|
||||
--color-secondary-500: 26, 117, 159;
|
||||
--color-secondary-600: 22, 101, 137;
|
||||
--color-secondary-700: 19, 85, 115;
|
||||
--color-secondary-800: 19, 85, 115;
|
||||
--color-secondary-900: 4, 20, 28;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
function setBackgroundBlur() {
|
||||
const scriptElement = document.currentScript;
|
||||
const targetId = scriptElement && scriptElement.getAttribute("data-target-id") ? scriptElement.getAttribute("data-target-id")
|
||||
: (console.error("data-target-id is null"), null);
|
||||
const targetId =
|
||||
scriptElement && scriptElement.getAttribute("data-target-id")
|
||||
? scriptElement.getAttribute("data-target-id")
|
||||
: (console.error("data-target-id is null"), null);
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
const scroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
var scriptBundle = document.getElementById("script-bundle");
|
||||
var copyText = scriptBundle && scriptBundle.getAttribute("data-copy")? scriptBundle.getAttribute("data-copy") : "Copy";
|
||||
var copiedText = scriptBundle && scriptBundle.getAttribute("data-copied")? scriptBundle.getAttribute("data-copied") : "Copied";
|
||||
var copyText =
|
||||
scriptBundle && scriptBundle.getAttribute("data-copy") ? scriptBundle.getAttribute("data-copy") : "Copy";
|
||||
var copiedText =
|
||||
scriptBundle && scriptBundle.getAttribute("data-copied")
|
||||
? scriptBundle.getAttribute("data-copied")
|
||||
: "Copied";
|
||||
|
||||
function createCopyButton(highlightDiv) {
|
||||
const button = document.createElement("button");
|
||||
|
||||
@@ -1,26 +1,32 @@
|
||||
function fetchRepo() {
|
||||
const scriptElement = document.currentScript;
|
||||
const repoURL = scriptElement && scriptElement.getAttribute("data-repo-url") ? scriptElement.getAttribute("data-repo-url")
|
||||
: (console.error("data-repo-url is null"), null);
|
||||
const repoId = scriptElement && scriptElement.getAttribute("data-repo-id") ? scriptElement.getAttribute("data-repo-id")
|
||||
: (console.error("data-repo-id is null"), null);
|
||||
const requestObjects =
|
||||
repoId.startsWith("github") ? ["full_name", "description", "stargazers_count", "forks"]
|
||||
: repoId.startsWith("gitlab") ? ["name_with_namespace", "description", "star_count", "forks_count"]
|
||||
: ["full_name", "description", "stars_count", "forks_count"];
|
||||
const repoURL =
|
||||
scriptElement && scriptElement.getAttribute("data-repo-url")
|
||||
? scriptElement.getAttribute("data-repo-url")
|
||||
: (console.error("data-repo-url is null"), null);
|
||||
const repoId =
|
||||
scriptElement && scriptElement.getAttribute("data-repo-id")
|
||||
? scriptElement.getAttribute("data-repo-id")
|
||||
: (console.error("data-repo-id is null"), null);
|
||||
const requestObjects = repoId.startsWith("github")
|
||||
? ["full_name", "description", "stargazers_count", "forks"]
|
||||
: repoId.startsWith("gitlab")
|
||||
? ["name_with_namespace", "description", "star_count", "forks_count"]
|
||||
: ["full_name", "description", "stars_count", "forks_count"];
|
||||
fetch(repoURL, {
|
||||
headers: new Headers({
|
||||
"User-agent": "Mozilla/4.0 Custom User Agent"
|
||||
})
|
||||
"User-agent": "Mozilla/4.0 Custom User Agent",
|
||||
}),
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
requestObjects.forEach((requestObject) => {
|
||||
let element = document.getElementById(`${repoId}-${requestObject}`);
|
||||
if (requestObject === "stargazers_count" && repoId.startsWith("github")) {
|
||||
element = document.getElementById(`${repoId}-stargazers`);
|
||||
element = document.getElementById(`${repoId}-stargazers`);
|
||||
}
|
||||
element ? (element.innerHTML = data[requestObject])
|
||||
element
|
||||
? (element.innerHTML = data[requestObject])
|
||||
: (console.error(`Element '${repoId}-${requestObject}' not found`), null);
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
const pageScriptElement = document.currentScript;
|
||||
const oid = pageScriptElement && pageScriptElement.getAttribute("data-oid") ? pageScriptElement.getAttribute("data-oid") : (console.error("data-oid is null"), null);
|
||||
const oid_likes = pageScriptElement && pageScriptElement.getAttribute("data-oid-likes") ? pageScriptElement.getAttribute("data-oid-likes") : (console.error("data-oid-likes is null"), null);
|
||||
const oid =
|
||||
pageScriptElement && pageScriptElement.getAttribute("data-oid")
|
||||
? pageScriptElement.getAttribute("data-oid")
|
||||
: (console.error("data-oid is null"), null);
|
||||
const oid_likes =
|
||||
pageScriptElement && pageScriptElement.getAttribute("data-oid-likes")
|
||||
? pageScriptElement.getAttribute("data-oid-likes")
|
||||
: (console.error("data-oid-likes is null"), null);
|
||||
const liked_page = false;
|
||||
const id = oid ? oid.replaceAll("/", "-") : oid;
|
||||
const id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes;
|
||||
@@ -8,101 +14,118 @@ const id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes;
|
||||
if (typeof auth !== "undefined") {
|
||||
const viewed = localStorage.getItem(id);
|
||||
|
||||
if (!viewed) {
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('views').doc(id)
|
||||
localStorage.setItem(id, true);
|
||||
docRef.get().then((doc) => {
|
||||
if (doc.exists) {
|
||||
db.collection('views').doc(id).update({
|
||||
views: firebase.firestore.FieldValue.increment(1)
|
||||
});
|
||||
} else {
|
||||
db.collection('views').doc(id).set({ views: 1 })
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
if (!viewed) {
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection("views").doc(id);
|
||||
localStorage.setItem(id, true);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
if (doc.exists) {
|
||||
db.collection("views")
|
||||
.doc(id)
|
||||
.update({
|
||||
views: firebase.firestore.FieldValue.increment(1),
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
});
|
||||
}
|
||||
} else {
|
||||
db.collection("views").doc(id).set({ views: 1 });
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
const liked = localStorage.getItem(id_likes);
|
||||
|
||||
if (liked) {
|
||||
liked_page = true
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = ""
|
||||
}
|
||||
const liked = localStorage.getItem(id_likes);
|
||||
|
||||
if (liked) {
|
||||
liked_page = true;
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
|
||||
}
|
||||
}
|
||||
|
||||
function like_article(id_likes) {
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('likes').doc(id_likes)
|
||||
docRef.get().then((doc) => {
|
||||
liked_page = true
|
||||
localStorage.setItem(id_likes, true);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = ""
|
||||
if (doc.exists) {
|
||||
db.collection('likes').doc(id_likes).update({
|
||||
likes: firebase.firestore.FieldValue.increment(1)
|
||||
});
|
||||
} else {
|
||||
db.collection('likes').doc(id_likes).set({ likes: 1 })
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection("likes").doc(id_likes);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
liked_page = true;
|
||||
localStorage.setItem(id_likes, true);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
|
||||
if (doc.exists) {
|
||||
db.collection("likes")
|
||||
.doc(id_likes)
|
||||
.update({
|
||||
likes: firebase.firestore.FieldValue.increment(1),
|
||||
});
|
||||
} else {
|
||||
db.collection("likes").doc(id_likes).set({ likes: 1 });
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
function remove_like_article(id_likes) {
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('likes').doc(id_likes)
|
||||
docRef.get().then((doc) => {
|
||||
liked_page = false
|
||||
localStorage.removeItem(id_likes);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like"
|
||||
if (doc.exists) {
|
||||
db.collection('likes').doc(id_likes).update({
|
||||
likes: firebase.firestore.FieldValue.increment(-1)
|
||||
});
|
||||
} else {
|
||||
db.collection('likes').doc(id_likes).set({ likes: 0 })
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection("likes").doc(id_likes);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
liked_page = false;
|
||||
localStorage.removeItem(id_likes);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like";
|
||||
if (doc.exists) {
|
||||
db.collection("likes")
|
||||
.doc(id_likes)
|
||||
.update({
|
||||
likes: firebase.firestore.FieldValue.increment(-1),
|
||||
});
|
||||
} else {
|
||||
db.collection("likes").doc(id_likes).set({ likes: 0 });
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
function process_article() {
|
||||
if (!liked_page) {
|
||||
like_article(id_likes)
|
||||
} else {
|
||||
remove_like_article(id_likes)
|
||||
}
|
||||
if (!liked_page) {
|
||||
like_article(id_likes);
|
||||
} else {
|
||||
remove_like_article(id_likes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +1,70 @@
|
||||
if (typeof auth !== 'undefined') {
|
||||
var viewsCollection = db.collection('views');
|
||||
var likesCollection = db.collection('likes');
|
||||
if (typeof auth !== "undefined") {
|
||||
var viewsCollection = db.collection("views");
|
||||
var likesCollection = db.collection("likes");
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function toggleLoaders(node) {
|
||||
var classesString = node.className;
|
||||
if (classesString == "") return;
|
||||
var classes = classesString.split(" ");
|
||||
for (var i in classes) {
|
||||
node.classList.toggle(classes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleLoaders(node){
|
||||
var classesString = node.className;
|
||||
if(classesString == "") return
|
||||
var classes = classesString.split(" ");
|
||||
for(var i in classes){
|
||||
node.classList.toggle(classes[i])
|
||||
var update_views = function (node, id) {
|
||||
viewsCollection.doc(id).onSnapshot((doc) => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.views);
|
||||
} else {
|
||||
node.innerText = 0;
|
||||
}
|
||||
toggleLoaders(node);
|
||||
});
|
||||
};
|
||||
|
||||
var update_likes = function (node, id) {
|
||||
likesCollection.doc(id).onSnapshot((doc) => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.likes);
|
||||
} else {
|
||||
node.innerText = 0;
|
||||
}
|
||||
toggleLoaders(node);
|
||||
});
|
||||
};
|
||||
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
var views_nodes = document.querySelectorAll("span[id^='views_']");
|
||||
|
||||
for (var i in views_nodes) {
|
||||
var node = views_nodes[i];
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
|
||||
if (id) {
|
||||
update_views(node, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var update_views = function (node, id) {
|
||||
viewsCollection.doc(id).onSnapshot(doc => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.views)
|
||||
} else {
|
||||
node.innerText = 0
|
||||
}
|
||||
toggleLoaders(node)
|
||||
})
|
||||
}
|
||||
var likes_nodes = document.querySelectorAll("span[id^='likes_']");
|
||||
|
||||
var update_likes = function (node, id) {
|
||||
likesCollection.doc(id).onSnapshot(doc => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.likes)
|
||||
} else {
|
||||
node.innerText = 0
|
||||
}
|
||||
toggleLoaders(node)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
var views_nodes = document.querySelectorAll("span[id^='views_']")
|
||||
|
||||
for (var i in views_nodes) {
|
||||
var node = views_nodes[i]
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id
|
||||
if (id) {
|
||||
update_views(node, id)
|
||||
}
|
||||
}
|
||||
|
||||
var likes_nodes = document.querySelectorAll("span[id^='likes_']")
|
||||
|
||||
for (var i in likes_nodes) {
|
||||
var node = likes_nodes[i]
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id
|
||||
if (id) {
|
||||
update_likes(node, id)
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
var errorCode = error.code;
|
||||
var errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
});
|
||||
}
|
||||
for (var i in likes_nodes) {
|
||||
var node = likes_nodes[i];
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
|
||||
if (id) {
|
||||
update_likes(node, id);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
var errorCode = error.code;
|
||||
var errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ var indexed = false;
|
||||
var hasResults = false;
|
||||
|
||||
// Listen for events
|
||||
showButton? showButton.addEventListener("click", displaySearch) : null;
|
||||
showButtonMobile? showButtonMobile.addEventListener("click", displaySearch) : null;
|
||||
showButton ? showButton.addEventListener("click", displaySearch) : null;
|
||||
showButtonMobile ? showButtonMobile.addEventListener("click", displaySearch) : null;
|
||||
hideButton.addEventListener("click", hideSearch);
|
||||
wrapper.addEventListener("click", hideSearch);
|
||||
modal.addEventListener("click", function (event) {
|
||||
@@ -25,12 +25,9 @@ modal.addEventListener("click", function (event) {
|
||||
document.addEventListener("keydown", function (event) {
|
||||
// Forward slash to open search wrapper
|
||||
if (event.key == "/") {
|
||||
const active = document.activeElement
|
||||
const tag = active.tagName
|
||||
const isInputField =
|
||||
tag === "INPUT" ||
|
||||
tag === "TEXTAREA" ||
|
||||
active.isContentEditable
|
||||
const active = document.activeElement;
|
||||
const tag = active.tagName;
|
||||
const isInputField = tag === "INPUT" || tag === "TEXTAREA" || active.isContentEditable;
|
||||
|
||||
if (!searchVisible && !isInputField) {
|
||||
event.preventDefault();
|
||||
@@ -82,7 +79,6 @@ document.addEventListener("keydown", function (event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Update search on each keypress
|
||||
@@ -129,7 +125,7 @@ function fetchJSON(path, callback) {
|
||||
|
||||
function buildIndex() {
|
||||
var baseURL = wrapper.getAttribute("data-url");
|
||||
baseURL = baseURL.replace(/\/?$/, '/');
|
||||
baseURL = baseURL.replace(/\/?$/, "/");
|
||||
fetchJSON(baseURL + "index.json", function (data) {
|
||||
var options = {
|
||||
shouldSort: true,
|
||||
@@ -165,8 +161,15 @@ function executeQuery(term) {
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = html;
|
||||
value.item.summary = div.textContent || div.innerText || "";
|
||||
var title = value.item.externalUrl? value.item.title + '<span class="text-xs ml-2 align-center cursor-default text-neutral-400 dark:text-neutral-500">'+value.item.externalUrl+'</span>' : value.item.title;
|
||||
var linkconfig = value.item.externalUrl? 'target="_blank" rel="noopener" href="'+value.item.externalUrl+'"' : 'href="'+value.item.permalink+'"';
|
||||
var title = value.item.externalUrl
|
||||
? value.item.title +
|
||||
'<span class="text-xs ml-2 align-center cursor-default text-neutral-400 dark:text-neutral-500">' +
|
||||
value.item.externalUrl +
|
||||
"</span>"
|
||||
: value.item.title;
|
||||
var linkconfig = value.item.externalUrl
|
||||
? 'target="_blank" rel="noopener" href="' + value.item.externalUrl + '"'
|
||||
: 'href="' + value.item.permalink + '"';
|
||||
resultsHTML =
|
||||
resultsHTML +
|
||||
`<li class="mb-2">
|
||||
@@ -176,7 +179,7 @@ function executeQuery(term) {
|
||||
<div class="-mb-1 text-lg font-bold">
|
||||
${title}
|
||||
</div>
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">·</span>${value.item.date? value.item.date : ""}</span></div>
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">·</span>${value.item.date ? value.item.date : ""}</span></div>
|
||||
<div class="text-sm italic">${value.item.summary}</div>
|
||||
</div>
|
||||
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">→</div>
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
function _getDefaultPackeryOptions() {
|
||||
return {
|
||||
percentPosition: true,
|
||||
gutter: 5,
|
||||
resize: true
|
||||
};
|
||||
return {
|
||||
percentPosition: true,
|
||||
gutter: 5,
|
||||
resize: true,
|
||||
};
|
||||
}
|
||||
|
||||
(function init() {
|
||||
$(window).on("load", function () {
|
||||
let packeries = [];
|
||||
let nodeGalleries = document.querySelectorAll(".gallery");
|
||||
|
||||
$(window).on("load", function () {
|
||||
let packeries = [];
|
||||
let nodeGalleries = document.querySelectorAll('.gallery');
|
||||
|
||||
nodeGalleries.forEach(nodeGallery => {
|
||||
// TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute
|
||||
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
|
||||
packeries.push(packery);
|
||||
});
|
||||
console.groupEnd();
|
||||
nodeGalleries.forEach((nodeGallery) => {
|
||||
// TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute
|
||||
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
|
||||
packeries.push(packery);
|
||||
});
|
||||
})();
|
||||
console.groupEnd();
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,53 +1,50 @@
|
||||
function _toogleZenMode(zendModeButton) {
|
||||
// Nodes selection
|
||||
const body = document.querySelector('body');
|
||||
const footer = document.querySelector('footer');
|
||||
const tocRight = document.querySelector('.toc-right');
|
||||
const tocInside = document.querySelector('.toc-inside');
|
||||
const articleContent = document.querySelector('.article-content');
|
||||
const header = document.querySelector('#single_header');
|
||||
|
||||
const body = document.querySelector("body");
|
||||
const footer = document.querySelector("footer");
|
||||
const tocRight = document.querySelector(".toc-right");
|
||||
const tocInside = document.querySelector(".toc-inside");
|
||||
const articleContent = document.querySelector(".article-content");
|
||||
const header = document.querySelector("#single_header");
|
||||
|
||||
// Add semantic class into body tag
|
||||
body.classList.toggle('zen-mode-enable');
|
||||
body.classList.toggle("zen-mode-enable");
|
||||
|
||||
// Show/Hide 'toc right' and 'toc inside'
|
||||
if (tocRight)
|
||||
tocRight.classList.toggle('lg:block');
|
||||
if (tocInside)
|
||||
tocInside.classList.toggle('lg:hidden');
|
||||
if (tocRight) tocRight.classList.toggle("lg:block");
|
||||
if (tocInside) tocInside.classList.toggle("lg:hidden");
|
||||
|
||||
// Change width of article content
|
||||
articleContent.classList.toggle('max-w-fit');
|
||||
articleContent.classList.toggle('max-w-prose');
|
||||
articleContent.classList.toggle("max-w-fit");
|
||||
articleContent.classList.toggle("max-w-prose");
|
||||
|
||||
// Change width of article title and footer
|
||||
header.classList.toggle('max-w-full');
|
||||
header.classList.toggle('max-w-prose');
|
||||
footer.classList.toggle('max-w-full');
|
||||
footer.classList.toggle('max-w-prose');
|
||||
header.classList.toggle("max-w-full");
|
||||
header.classList.toggle("max-w-prose");
|
||||
footer.classList.toggle("max-w-full");
|
||||
footer.classList.toggle("max-w-prose");
|
||||
|
||||
// Read i18n title from data-attributes
|
||||
const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable');
|
||||
const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable');
|
||||
const titleI18nDisable = zendModeButton.getAttribute("data-title-i18n-disable");
|
||||
const titleI18nEnable = zendModeButton.getAttribute("data-title-i18n-enable");
|
||||
|
||||
if (body.classList.contains('zen-mode-enable')) {
|
||||
if (body.classList.contains("zen-mode-enable")) {
|
||||
// Persist configuration
|
||||
//localStorage.setItem('blowfish-zen-mode-enabled', 'true');
|
||||
|
||||
// Change title to enable
|
||||
zendModeButton.setAttribute('title', titleI18nEnable)
|
||||
zendModeButton.setAttribute("title", titleI18nEnable);
|
||||
// Auto-scroll to title article
|
||||
window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90);
|
||||
} else {
|
||||
//localStorage.setItem('blowfish-zen-mode-enabled', 'false');
|
||||
zendModeButton.setAttribute('title', titleI18nDisable);
|
||||
document.querySelector('body').scrollIntoView();
|
||||
zendModeButton.setAttribute("title", titleI18nDisable);
|
||||
document.querySelector("body").scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
function _registerZendModeButtonClick(zendModeButton) {
|
||||
zendModeButton.addEventListener('click', function (event) {
|
||||
zendModeButton.addEventListener("click", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Toggle zen-mode
|
||||
@@ -58,9 +55,9 @@ function _registerZendModeButtonClick(zendModeButton) {
|
||||
(function init() {
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
// Register click on 'zen-mode-button' node element
|
||||
const zendModeButton = document.getElementById('zen-mode-button');
|
||||
const zendModeButton = document.getElementById("zen-mode-button");
|
||||
if (zendModeButton !== null && zendModeButton !== undefined) {
|
||||
_registerZendModeButtonClick(zendModeButton);
|
||||
}
|
||||
});
|
||||
})();
|
||||
})();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -53,5 +53,5 @@
|
||||
"icon": "mastodon",
|
||||
"title": "sharing.mastodon",
|
||||
"url": "https://s2f.kytta.dev/?text=%[2]s %[1]s"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
var layouts = [
|
||||
"background",
|
||||
"hero",
|
||||
"profile",
|
||||
"page",
|
||||
"card"
|
||||
]
|
||||
var layouts = ["background", "hero", "profile", "page", "card"];
|
||||
|
||||
var currentLayout = 0
|
||||
var currentLayout = 0;
|
||||
|
||||
function switchHomeLayout() {
|
||||
var old = currentLayout;
|
||||
currentLayout = currentLayout == layouts.length - 1 ? 0 : currentLayout + 1;
|
||||
|
||||
var old = currentLayout
|
||||
currentLayout = currentLayout == layouts.length - 1 ? 0 : currentLayout + 1
|
||||
|
||||
var oldDiv = document.getElementById(layouts[old])
|
||||
var currentDiv = document.getElementById(layouts[currentLayout])
|
||||
var oldDiv = document.getElementById(layouts[old]);
|
||||
var currentDiv = document.getElementById(layouts[currentLayout]);
|
||||
const layoutCode = document.querySelectorAll("code[id=layout]");
|
||||
|
||||
currentDiv.style.display = "block";
|
||||
@@ -22,7 +15,6 @@ function switchHomeLayout() {
|
||||
layoutCode.forEach(function (el) {
|
||||
el.innerText = layouts[currentLayout];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
@@ -30,31 +22,26 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||
button.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
switchHomeLayout();
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
var list_config = [
|
||||
"CardViewProse",
|
||||
"CardViewScreenWidth",
|
||||
"NormalView"
|
||||
]
|
||||
var list_config = ["CardViewProse", "CardViewScreenWidth", "NormalView"];
|
||||
|
||||
var titles = {
|
||||
"CardViewProse" : "card view with constrained width",
|
||||
"CardViewScreenWidth" : "card view with full width",
|
||||
"NormalView" : "standard list view"
|
||||
}
|
||||
CardViewProse: "card view with constrained width",
|
||||
CardViewScreenWidth: "card view with full width",
|
||||
NormalView: "standard list view",
|
||||
};
|
||||
|
||||
var currentConfig = 0
|
||||
var currentConfig = 0;
|
||||
|
||||
function switchList() {
|
||||
var old = currentConfig;
|
||||
currentConfig = currentConfig == list_config.length - 1 ? 0 : currentConfig + 1;
|
||||
|
||||
var old = currentConfig
|
||||
currentConfig = currentConfig == list_config.length - 1 ? 0 : currentConfig + 1
|
||||
|
||||
var oldDiv = document.getElementById(list_config[old])
|
||||
var currentDiv = document.getElementById(list_config[currentConfig])
|
||||
var oldDiv = document.getElementById(list_config[old]);
|
||||
var currentDiv = document.getElementById(list_config[currentConfig]);
|
||||
const configCode = document.querySelectorAll("code[id=config]");
|
||||
|
||||
currentDiv.style.display = "block";
|
||||
@@ -63,7 +50,6 @@ function switchList() {
|
||||
configCode.forEach(function (el) {
|
||||
el.innerText = titles[list_config[currentConfig]];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
@@ -71,6 +57,6 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||
button.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
switchList();
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "Nuno Coração",
|
||||
"image" : "img/nuno_avatar.jpg",
|
||||
"bio": "Theme Creator",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
}
|
||||
"name": "Nuno Coração",
|
||||
"image": "img/nuno_avatar.jpg",
|
||||
"bio": "Theme Creator",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "Dummy Second Author",
|
||||
"image" : "img/author2.png",
|
||||
"bio": "Dummy",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
}
|
||||
"name": "Dummy Second Author",
|
||||
"image": "img/author2.png",
|
||||
"bio": "Dummy",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a rel="me" href="https://masto.ai/@blowfish"></a>
|
||||
<a rel="me" href="https://masto.ai/@blowfish"></a>
|
||||
|
||||
@@ -17,4 +17,8 @@
|
||||
<section>
|
||||
{{ partial "recent-articles-demo.html" . }}
|
||||
</section>
|
||||
<script defer type="text/javascript" src="{{ $jsHome.RelPermalink }}" integrity="{{ $jsHome.Data.Integrity }}"></script>
|
||||
<script
|
||||
defer
|
||||
type="text/javascript"
|
||||
src="{{ $jsHome.RelPermalink }}"
|
||||
integrity="{{ $jsHome.Data.Integrity }}"></script>
|
||||
|
||||
@@ -1,44 +1,47 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $showMoreLinkDest := "/posts/" }}
|
||||
{{ if index .Site.Params.homepage "showRecentItems" }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
|
||||
|
||||
<div class="flex mb-6 px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">This is a demo of theme's list configurations: <code
|
||||
id="config">card view</code></span>
|
||||
<button id="switch-config-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700">
|
||||
Switch config ↻
|
||||
</button>
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert"
|
||||
>This is a demo of theme's list configurations: <code id="config">card view</code></span
|
||||
>
|
||||
<button
|
||||
id="switch-config-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700">
|
||||
Switch config ↻
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="CardViewProse" class="h-full">
|
||||
{{ partial "recent-articles/cardview.html" . }}
|
||||
{{ partial "recent-articles/cardview.html" . }}
|
||||
</div>
|
||||
|
||||
<div id="CardViewScreenWidth" class="hidden h-full">
|
||||
{{ partial "recent-articles/cardview-fullwidth.html" . }}
|
||||
{{ partial "recent-articles/cardview-fullwidth.html" . }}
|
||||
</div>
|
||||
|
||||
<div id="NormalView" class="hidden h-full">
|
||||
{{ partial "recent-articles/list.html" . }}
|
||||
{{ partial "recent-articles/list.html" . }}
|
||||
</div>
|
||||
|
||||
{{ if .Site.Params.homepage.showMoreLink | default false }}
|
||||
{{ if index .Site.Params.homepage "showRecentItems" }}
|
||||
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
|
||||
{{ end }}
|
||||
<div class="mt-10 flex justify-center">
|
||||
{{ if index .Site.Params.homepage "showRecentItems" }}
|
||||
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
|
||||
{{ end }}
|
||||
<div class="mt-10 flex justify-center">
|
||||
<a href="{{ $showMoreLinkDest }}">
|
||||
<button
|
||||
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
|
||||
{{ i18n "recent.show_more" | markdownify }}
|
||||
</button>
|
||||
<button
|
||||
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
|
||||
{{ i18n "recent.show_more" | markdownify }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,75 +1,71 @@
|
||||
const fs = require('fs');
|
||||
const fs = require("fs");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const contentDir = "./exampleSite/content";
|
||||
const defaultLang = "en";
|
||||
|
||||
var targetLangs = []
|
||||
var targetLangs = [];
|
||||
|
||||
function readConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
//console.log(file)
|
||||
if(file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
//console.log(lang)
|
||||
if(lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach((file) => {
|
||||
//console.log(file)
|
||||
if (file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
//console.log(lang)
|
||||
if (lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function processFile(filePath, file) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
//console.log("processing", filePath)
|
||||
|
||||
//console.log("processing", filePath)
|
||||
|
||||
for(var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
for (var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
|
||||
if(fs.existsSync(targetFilePath)) {
|
||||
//console.log("file already exists", targetFilePath);
|
||||
if (fs.existsSync(targetFilePath)) {
|
||||
//console.log("file already exists", targetFilePath);
|
||||
|
||||
const data = fs.readFileSync(filePath, 'utf8');
|
||||
const data2 = fs.readFileSync(targetFilePath, 'utf8');
|
||||
if(data != data2) {
|
||||
//console.log("file contents are different", targetFilePath);
|
||||
}else{
|
||||
//console.log("file contents are the same", targetFilePath);
|
||||
console.log(targetFilePath);
|
||||
//process.exit(1);
|
||||
}
|
||||
|
||||
}else{
|
||||
//console.log("file does not exist", targetFilePath);
|
||||
}
|
||||
const data = fs.readFileSync(filePath, "utf8");
|
||||
const data2 = fs.readFileSync(targetFilePath, "utf8");
|
||||
if (data != data2) {
|
||||
//console.log("file contents are different", targetFilePath);
|
||||
} else {
|
||||
//console.log("file contents are the same", targetFilePath);
|
||||
console.log(targetFilePath);
|
||||
//process.exit(1);
|
||||
}
|
||||
|
||||
} else
|
||||
return
|
||||
} else {
|
||||
//console.log("file does not exist", targetFilePath);
|
||||
}
|
||||
}
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function createLinks() {
|
||||
processFolder(contentDir);
|
||||
processFolder(contentDir);
|
||||
}
|
||||
|
||||
readConfigs();
|
||||
createLinks();
|
||||
createLinks();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const translate = require('@iamtraction/google-translate');
|
||||
const fs = require("fs");
|
||||
const translate = require("@iamtraction/google-translate");
|
||||
|
||||
const defaultLang = "en";
|
||||
const targetLang = process.argv[2] || "en";
|
||||
@@ -8,56 +8,57 @@ const targetLangIso = targetLang == "pt" ? "pt-pt" : targetLang;
|
||||
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
|
||||
async function convert(text, from, to) {
|
||||
var options = {
|
||||
from: from,
|
||||
to: to
|
||||
};
|
||||
var translated_text = await translate(text, options);
|
||||
return translated_text.text;
|
||||
var options = {
|
||||
from: from,
|
||||
to: to,
|
||||
};
|
||||
var translated_text = await translate(text, options);
|
||||
return translated_text.text;
|
||||
}
|
||||
|
||||
console.log(filePath);
|
||||
console.log(targetFilePath);
|
||||
|
||||
async function processFrontMatter(block) {
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags") {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
translatedBlock += newElement + "\n";
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (
|
||||
elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags"
|
||||
) {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
return translatedBlock;
|
||||
translatedBlock += newElement + "\n";
|
||||
}
|
||||
return translatedBlock;
|
||||
}
|
||||
|
||||
|
||||
async function main() {
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
const fileContent = fs.readFileSync(filePath, "utf8");
|
||||
|
||||
var array = fileContent.split("---\n")
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
var array = fileContent.split("---\n");
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
|
||||
}
|
||||
|
||||
main();
|
||||
main();
|
||||
|
||||
138
genLang.js
138
genLang.js
@@ -1,5 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const translate = require('@iamtraction/google-translate');
|
||||
const fs = require("fs");
|
||||
const translate = require("@iamtraction/google-translate");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const contentDir = "./exampleSite/content";
|
||||
@@ -7,98 +7,94 @@ const defaultLang = "en";
|
||||
const targetLang = process.argv[2] || "en";
|
||||
const targetLangIso = targetLang == "pt" ? "pt-pt" : targetLang;
|
||||
|
||||
|
||||
function createConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
const filePath = `${configDir}/${file}`;
|
||||
if (filePath.indexOf("languages.en.toml") > -1 ||
|
||||
filePath.indexOf("menus.en.toml") > -1) {
|
||||
var fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, 'utf8');
|
||||
}
|
||||
});
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach((file) => {
|
||||
const filePath = `${configDir}/${file}`;
|
||||
if (filePath.indexOf("languages.en.toml") > -1 || filePath.indexOf("menus.en.toml") > -1) {
|
||||
var fileContent = fs.readFileSync(filePath, "utf8");
|
||||
fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, "utf8");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function convert(text, from, to) {
|
||||
var options = {
|
||||
from: from,
|
||||
to: to
|
||||
};
|
||||
var translated_text = await translate(text, options)
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
});;
|
||||
return translated_text && translated_text.text? translated_text.text : '';
|
||||
var options = {
|
||||
from: from,
|
||||
to: to,
|
||||
};
|
||||
var translated_text = await translate(text, options).catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
return translated_text && translated_text.text ? translated_text.text : "";
|
||||
}
|
||||
|
||||
async function processFrontMatter(block) {
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags") {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
translatedBlock += newElement + "\n";
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (
|
||||
elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags"
|
||||
) {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
return translatedBlock;
|
||||
translatedBlock += newElement + "\n";
|
||||
}
|
||||
return translatedBlock;
|
||||
}
|
||||
|
||||
async function processFile(filePath) {
|
||||
console.log("translating", filePath)
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
console.log("translating", filePath);
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
|
||||
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
const fileContent = fs.readFileSync(filePath, "utf8");
|
||||
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
var array = fileContent.split("---\n");
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
|
||||
var array = fileContent.split("---\n")
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
|
||||
|
||||
} else
|
||||
return
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
console.log(filePath, isDir);
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath);
|
||||
}
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
console.log(filePath, isDir);
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function createContent() {
|
||||
processFolder(contentDir);
|
||||
processFolder(contentDir);
|
||||
}
|
||||
|
||||
createConfigs();
|
||||
createContent();
|
||||
createContent();
|
||||
|
||||
@@ -1,66 +1,63 @@
|
||||
const fs = require('fs');
|
||||
const fs = require("fs");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const contentDir = "./exampleSite/content";
|
||||
const defaultLang = "en";
|
||||
|
||||
var targetLangs = []
|
||||
var targetLangs = [];
|
||||
|
||||
function readConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
console.log(file)
|
||||
if(file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
console.log(lang)
|
||||
if(lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach((file) => {
|
||||
console.log(file);
|
||||
if (file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
console.log(lang);
|
||||
if (lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function processFile(filePath, file) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
console.log("processing", filePath);
|
||||
|
||||
console.log("processing", filePath)
|
||||
|
||||
for(var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
for (var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
|
||||
if(fs.existsSync(targetFilePath)) {
|
||||
console.log("file already exists", targetFilePath);
|
||||
}else{
|
||||
console.log("creating file", targetFilePath);
|
||||
//fs.symlinkSync(file, targetFilePath, 'junction');
|
||||
fs.copyFileSync(filePath, targetFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
} else
|
||||
return
|
||||
if (fs.existsSync(targetFilePath)) {
|
||||
console.log("file already exists", targetFilePath);
|
||||
} else {
|
||||
console.log("creating file", targetFilePath);
|
||||
//fs.symlinkSync(file, targetFilePath, 'junction');
|
||||
fs.copyFileSync(filePath, targetFilePath);
|
||||
}
|
||||
}
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function createLinks() {
|
||||
processFolder(contentDir);
|
||||
processFolder(contentDir);
|
||||
}
|
||||
|
||||
readConfigs();
|
||||
createLinks();
|
||||
createLinks();
|
||||
|
||||
@@ -68,4 +68,4 @@ shortcode:
|
||||
recent_articles: "تم النشر مؤخرا"
|
||||
|
||||
recent:
|
||||
show_more: "قراءة المزيد"
|
||||
show_more: "قراءة المزيد"
|
||||
|
||||
@@ -26,7 +26,6 @@ article:
|
||||
this_article: "Тази Статия"
|
||||
related_articles: "Подобни"
|
||||
|
||||
|
||||
author:
|
||||
byline_title: "Автор"
|
||||
|
||||
|
||||
144
i18n/bn.yaml
144
i18n/bn.yaml
@@ -1,72 +1,72 @@
|
||||
global:
|
||||
language: "BN"
|
||||
|
||||
article:
|
||||
anchor_label: "Anchor"
|
||||
date: "{{ .Date }}"
|
||||
date_updated: "সর্বশেষ সম্পাদনার তারিখ: {{ .Date }}"
|
||||
draft: "খসড়া"
|
||||
edit_title: "সম্পাদনা করুন"
|
||||
reading_time:
|
||||
one: "{{ .Count }} মিনিট"
|
||||
other: "{{ .Count }} মিনিট"
|
||||
reading_time_title: "পড়ার সময়"
|
||||
table_of_contents: "বিষয়সূচী"
|
||||
word_count:
|
||||
one: "{{ .Count }} টি শব্দ"
|
||||
other: "{{ .Count }} টি শব্দ"
|
||||
views:
|
||||
one: "{{ .Count }} বার দেখা হয়েছে"
|
||||
other: "{{ .Count }} বার দেখা হয়েছে"
|
||||
likes:
|
||||
one: "{{ .Count }} বার পছন্দ করা হয়েছে"
|
||||
other: "{{ .Count }} বার পছন্দ করা হয়েছে"
|
||||
part_of_series: "This article is part of a series."
|
||||
part: "Part"
|
||||
this_article: "This Article"
|
||||
related_articles: "Related"
|
||||
|
||||
author:
|
||||
byline_title: "লেখক"
|
||||
|
||||
code:
|
||||
copy: "কপি করুন"
|
||||
copied: "কপি হয়ে গেছে"
|
||||
|
||||
error:
|
||||
404_title: "পেজটি খুঁজে পাওয়া যায়নি :confused:"
|
||||
404_error: "Error 404"
|
||||
404_description: "মনে হচ্ছে, আপনার অনুরোধ করা পেজটি খুঁজে পাওয়া যায়নি।"
|
||||
|
||||
footer:
|
||||
dark_appearance: "ডার্ক মোডে স্যুইচ করুন"
|
||||
light_appearance: "লাইট মোডে স্যুইচ করুন"
|
||||
powered_by: "{{ .Hugo }} এবং {{ .Blowfish }} দ্বারা চালিত"
|
||||
|
||||
list:
|
||||
externalurl_title: "অন্য ওয়েবসাইটের লিংক"
|
||||
no_articles: "এখানে তালিকাভুক্ত করার মতো আপাতত কিছুই নেই।"
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "পেজের উপরের দিকে যান"
|
||||
skip_to_main: "মূল বিষয়ে যান"
|
||||
|
||||
search:
|
||||
open_button_title: "খুঁজুন (/)"
|
||||
close_button_title: "বন্ধ করুন (Esc)"
|
||||
input_placeholder: "খুঁজুন"
|
||||
|
||||
sharing:
|
||||
email: "ইমেল করুন"
|
||||
facebook: "ফেসবুকে শেয়ার করুন"
|
||||
line: "লাইনে শেয়ার করুন"
|
||||
linkedin: "লিংকডইনে শেয়ার করুন"
|
||||
pinterest: "পিন্টারেস্টে পিন করুন"
|
||||
reddit: "রেড্ডিটে জমা দিন"
|
||||
twitter: "ট্যুইট করুন"
|
||||
|
||||
shortcode:
|
||||
recent_articles: "সাম্প্রতিক"
|
||||
|
||||
recent:
|
||||
show_more: "আরো দেখুন"
|
||||
global:
|
||||
language: "BN"
|
||||
|
||||
article:
|
||||
anchor_label: "Anchor"
|
||||
date: "{{ .Date }}"
|
||||
date_updated: "সর্বশেষ সম্পাদনার তারিখ: {{ .Date }}"
|
||||
draft: "খসড়া"
|
||||
edit_title: "সম্পাদনা করুন"
|
||||
reading_time:
|
||||
one: "{{ .Count }} মিনিট"
|
||||
other: "{{ .Count }} মিনিট"
|
||||
reading_time_title: "পড়ার সময়"
|
||||
table_of_contents: "বিষয়সূচী"
|
||||
word_count:
|
||||
one: "{{ .Count }} টি শব্দ"
|
||||
other: "{{ .Count }} টি শব্দ"
|
||||
views:
|
||||
one: "{{ .Count }} বার দেখা হয়েছে"
|
||||
other: "{{ .Count }} বার দেখা হয়েছে"
|
||||
likes:
|
||||
one: "{{ .Count }} বার পছন্দ করা হয়েছে"
|
||||
other: "{{ .Count }} বার পছন্দ করা হয়েছে"
|
||||
part_of_series: "This article is part of a series."
|
||||
part: "Part"
|
||||
this_article: "This Article"
|
||||
related_articles: "Related"
|
||||
|
||||
author:
|
||||
byline_title: "লেখক"
|
||||
|
||||
code:
|
||||
copy: "কপি করুন"
|
||||
copied: "কপি হয়ে গেছে"
|
||||
|
||||
error:
|
||||
404_title: "পেজটি খুঁজে পাওয়া যায়নি :confused:"
|
||||
404_error: "Error 404"
|
||||
404_description: "মনে হচ্ছে, আপনার অনুরোধ করা পেজটি খুঁজে পাওয়া যায়নি।"
|
||||
|
||||
footer:
|
||||
dark_appearance: "ডার্ক মোডে স্যুইচ করুন"
|
||||
light_appearance: "লাইট মোডে স্যুইচ করুন"
|
||||
powered_by: "{{ .Hugo }} এবং {{ .Blowfish }} দ্বারা চালিত"
|
||||
|
||||
list:
|
||||
externalurl_title: "অন্য ওয়েবসাইটের লিংক"
|
||||
no_articles: "এখানে তালিকাভুক্ত করার মতো আপাতত কিছুই নেই।"
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "পেজের উপরের দিকে যান"
|
||||
skip_to_main: "মূল বিষয়ে যান"
|
||||
|
||||
search:
|
||||
open_button_title: "খুঁজুন (/)"
|
||||
close_button_title: "বন্ধ করুন (Esc)"
|
||||
input_placeholder: "খুঁজুন"
|
||||
|
||||
sharing:
|
||||
email: "ইমেল করুন"
|
||||
facebook: "ফেসবুকে শেয়ার করুন"
|
||||
line: "লাইনে শেয়ার করুন"
|
||||
linkedin: "লিংকডইনে শেয়ার করুন"
|
||||
pinterest: "পিন্টারেস্টে পিন করুন"
|
||||
reddit: "রেড্ডিটে জমা দিন"
|
||||
twitter: "ট্যুইট করুন"
|
||||
|
||||
shortcode:
|
||||
recent_articles: "সাম্প্রতিক"
|
||||
|
||||
recent:
|
||||
show_more: "আরো দেখুন"
|
||||
|
||||
@@ -72,4 +72,4 @@ shortcode:
|
||||
recent_articles: "Recent"
|
||||
|
||||
recent:
|
||||
show_more: "Mostrar més"
|
||||
show_more: "Mostrar més"
|
||||
|
||||
144
i18n/cs.yaml
144
i18n/cs.yaml
@@ -1,72 +1,72 @@
|
||||
global:
|
||||
language: "CS"
|
||||
|
||||
article:
|
||||
anchor_label: "Kotva"
|
||||
date: "{{ .Date }}"
|
||||
date_updated: "Aktualizováno: {{ .Date }}"
|
||||
draft: "Návrh"
|
||||
edit_title: "Upravit"
|
||||
reading_time:
|
||||
one: "{{ .Count }} min"
|
||||
other: "{{ .Count }} min"
|
||||
reading_time_title: "Doba čtení"
|
||||
table_of_contents: "Obsah"
|
||||
word_count:
|
||||
one: "{{ .Count }} slovo"
|
||||
other: "{{ .Count }} slov"
|
||||
views:
|
||||
one: "{{ .Count }} zhlédnutí"
|
||||
other: "{{ .Count }} zhlédnutí"
|
||||
likes:
|
||||
one: "{{ .Count }} líbí se mi"
|
||||
other: "{{ .Count }} líbí se mi"
|
||||
part_of_series: "Tento článek patří do série."
|
||||
part: "Část"
|
||||
this_article: "Tento článek"
|
||||
related_articles: "Related"
|
||||
|
||||
author:
|
||||
byline_title: "Autor"
|
||||
|
||||
code:
|
||||
copy: "Kopírovat"
|
||||
copied: "Zkopírováno"
|
||||
|
||||
error:
|
||||
404_title: "Stránka nenalezena :confused:"
|
||||
404_error: "Error 404"
|
||||
404_description: "Zdá se, že stránka neexistuje."
|
||||
|
||||
footer:
|
||||
dark_appearance: "Přepnout na tmavý režim"
|
||||
light_appearance: "Přepnout na světlý režim"
|
||||
powered_by: "Postaveno na technologiích {{ .Hugo }} & {{ .Theme }}"
|
||||
|
||||
list:
|
||||
externalurl_title: "Odkaz na externí stránku"
|
||||
no_articles: "Tato sekce zatím neobsahuje žádné články."
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "Nahoru"
|
||||
skip_to_main: "Přeskočit na hlavní obsah"
|
||||
|
||||
search:
|
||||
open_button_title: "Vyhledat (/)"
|
||||
close_button_title: "Zavřít (Esc)"
|
||||
input_placeholder: "Hledat"
|
||||
|
||||
sharing:
|
||||
email: "Poslat emailem"
|
||||
facebook: "Sdílet na Facebook"
|
||||
line: "Sdílejte na LINE"
|
||||
linkedin: "Sdílet na LinkedIn"
|
||||
pinterest: "Připnout na Pinterest"
|
||||
reddit: "Přidat na Reddit"
|
||||
twitter: "Tweet na Twitter"
|
||||
|
||||
shortcode:
|
||||
recent_articles: "Nedávné"
|
||||
|
||||
recent:
|
||||
show_more: "Zobrazit další"
|
||||
global:
|
||||
language: "CS"
|
||||
|
||||
article:
|
||||
anchor_label: "Kotva"
|
||||
date: "{{ .Date }}"
|
||||
date_updated: "Aktualizováno: {{ .Date }}"
|
||||
draft: "Návrh"
|
||||
edit_title: "Upravit"
|
||||
reading_time:
|
||||
one: "{{ .Count }} min"
|
||||
other: "{{ .Count }} min"
|
||||
reading_time_title: "Doba čtení"
|
||||
table_of_contents: "Obsah"
|
||||
word_count:
|
||||
one: "{{ .Count }} slovo"
|
||||
other: "{{ .Count }} slov"
|
||||
views:
|
||||
one: "{{ .Count }} zhlédnutí"
|
||||
other: "{{ .Count }} zhlédnutí"
|
||||
likes:
|
||||
one: "{{ .Count }} líbí se mi"
|
||||
other: "{{ .Count }} líbí se mi"
|
||||
part_of_series: "Tento článek patří do série."
|
||||
part: "Část"
|
||||
this_article: "Tento článek"
|
||||
related_articles: "Related"
|
||||
|
||||
author:
|
||||
byline_title: "Autor"
|
||||
|
||||
code:
|
||||
copy: "Kopírovat"
|
||||
copied: "Zkopírováno"
|
||||
|
||||
error:
|
||||
404_title: "Stránka nenalezena :confused:"
|
||||
404_error: "Error 404"
|
||||
404_description: "Zdá se, že stránka neexistuje."
|
||||
|
||||
footer:
|
||||
dark_appearance: "Přepnout na tmavý režim"
|
||||
light_appearance: "Přepnout na světlý režim"
|
||||
powered_by: "Postaveno na technologiích {{ .Hugo }} & {{ .Theme }}"
|
||||
|
||||
list:
|
||||
externalurl_title: "Odkaz na externí stránku"
|
||||
no_articles: "Tato sekce zatím neobsahuje žádné články."
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "Nahoru"
|
||||
skip_to_main: "Přeskočit na hlavní obsah"
|
||||
|
||||
search:
|
||||
open_button_title: "Vyhledat (/)"
|
||||
close_button_title: "Zavřít (Esc)"
|
||||
input_placeholder: "Hledat"
|
||||
|
||||
sharing:
|
||||
email: "Poslat emailem"
|
||||
facebook: "Sdílet na Facebook"
|
||||
line: "Sdílejte na LINE"
|
||||
linkedin: "Sdílet na LinkedIn"
|
||||
pinterest: "Připnout na Pinterest"
|
||||
reddit: "Přidat na Reddit"
|
||||
twitter: "Tweet na Twitter"
|
||||
|
||||
shortcode:
|
||||
recent_articles: "Nedávné"
|
||||
|
||||
recent:
|
||||
show_more: "Zobrazit další"
|
||||
|
||||
15
i18n/de.yaml
15
i18n/de.yaml
@@ -13,8 +13,8 @@ article:
|
||||
reading_time_title: "Lesezeit"
|
||||
table_of_contents: "Inhaltsverzeichnis"
|
||||
word_count:
|
||||
one: "{{ .Count }} Wort"
|
||||
other: "{{ .Count }} Wörter"
|
||||
one: "{{ .Count }} Wort"
|
||||
other: "{{ .Count }} Wörter"
|
||||
part_of_series: "Dieser Artikel ist Teil einer Serie."
|
||||
part: "Teil"
|
||||
this_article: "Dieser Artikel"
|
||||
@@ -42,13 +42,13 @@ list:
|
||||
no_articles: "Es gibt hier noch keine Beiträge."
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "Zum Anfang scrollen"
|
||||
skip_to_main: "Zum Hauptinhalt springen"
|
||||
scroll_to_top_title: "Zum Anfang scrollen"
|
||||
skip_to_main: "Zum Hauptinhalt springen"
|
||||
|
||||
search:
|
||||
open_button_title: "Suche (/)"
|
||||
close_button_title: "Schließen (Esc)"
|
||||
input_placeholder: "Suchen"
|
||||
open_button_title: "Suche (/)"
|
||||
close_button_title: "Schließen (Esc)"
|
||||
input_placeholder: "Suchen"
|
||||
|
||||
sharing:
|
||||
email: "Per E-Mail teilen"
|
||||
@@ -62,6 +62,5 @@ sharing:
|
||||
shortcode:
|
||||
recent_articles: "Neue Beiträge"
|
||||
|
||||
|
||||
recent:
|
||||
show_more: "Zeige Mehr"
|
||||
|
||||
@@ -72,4 +72,4 @@ shortcode:
|
||||
recent_articles: "Reciente"
|
||||
|
||||
recent:
|
||||
show_more: "Mostrar más"
|
||||
show_more: "Mostrar más"
|
||||
|
||||
@@ -63,4 +63,4 @@ shortcode:
|
||||
recent_articles: "Viimeaikaiset"
|
||||
|
||||
recent:
|
||||
show_more: "Näytä Lisää"
|
||||
show_more: "Näytä Lisää"
|
||||
|
||||
@@ -63,4 +63,4 @@ shortcode:
|
||||
recent_articles: "חדשים"
|
||||
|
||||
recent:
|
||||
show_more: "להראות יותר"
|
||||
show_more: "להראות יותר"
|
||||
|
||||
@@ -63,4 +63,4 @@ shortcode:
|
||||
recent_articles: "Friss"
|
||||
|
||||
recent:
|
||||
show_more: "Mutass Többet"
|
||||
show_more: "Mutass Többet"
|
||||
|
||||
@@ -63,4 +63,4 @@ shortcode:
|
||||
recent_articles: "Recenti"
|
||||
|
||||
recent:
|
||||
show_more: "Mostra di Più"
|
||||
show_more: "Mostra di Più"
|
||||
|
||||
@@ -36,7 +36,8 @@ code:
|
||||
error:
|
||||
404_title: "Strona nie znaleziona :confused:"
|
||||
404_error: "Błąd 404"
|
||||
404_description: "Wydaje się, że strona, którą chcesz wyświetlić, nie istnieje."
|
||||
404_description:
|
||||
"Wydaje się, że strona, którą chcesz wyświetlić, nie istnieje."
|
||||
|
||||
footer:
|
||||
dark_appearance: "Zmień na tryb ciemny"
|
||||
@@ -69,4 +70,4 @@ shortcode:
|
||||
recent_articles: "Ostatnie artykuły"
|
||||
|
||||
recent:
|
||||
show_more: "Pokaż Więcej"
|
||||
show_more: "Pokaż Więcej"
|
||||
|
||||
@@ -66,4 +66,4 @@ shortcode:
|
||||
recent_articles: "Recente"
|
||||
|
||||
recent:
|
||||
show_more: "Mostrar Mais"
|
||||
show_more: "Mostrar Mais"
|
||||
|
||||
@@ -63,4 +63,4 @@ shortcode:
|
||||
recent_articles: "Cele mai noi"
|
||||
|
||||
recent:
|
||||
show_more: "Afișați mai multe"
|
||||
show_more: "Afișați mai multe"
|
||||
|
||||
154
i18n/th.yaml
154
i18n/th.yaml
@@ -1,77 +1,77 @@
|
||||
global:
|
||||
language: "TH"
|
||||
|
||||
article:
|
||||
anchor_label: "จุดยึด"
|
||||
date: "{{ .Date }}"
|
||||
date_updated: "อัปเดต: {{ .Date }}"
|
||||
draft: "ฉบับร่าง"
|
||||
edit_title: "แก้ไขเนื้อหา"
|
||||
reading_time:
|
||||
one: "{{ .Count }} นาที"
|
||||
other: "{{ .Count }} นาที"
|
||||
reading_time_title: "ใช้เวลาอ่าน"
|
||||
table_of_contents: "หัวข้อเนื้อหา"
|
||||
word_count:
|
||||
one: "{{ .Count }} คำ"
|
||||
other: "{{ .Count }} คำ"
|
||||
views:
|
||||
one: "{{ .Count }} ครั้ง"
|
||||
other: "{{ .Count }} ครั้ง"
|
||||
likes:
|
||||
one: "{{ .Count }} ไลค์"
|
||||
other: "{{ .Count }} ไลค์"
|
||||
part_of_series: "บทความในชุดเดียวกัน"
|
||||
part: "ตอนที่"
|
||||
this_article: "บทความนี้"
|
||||
related_articles: "บทความที่เกี่ยวข้อง"
|
||||
zen_mode_title:
|
||||
enable: "เปิดโหมดเซน"
|
||||
disable: "ปิดโหมดเซน"
|
||||
|
||||
author:
|
||||
byline_title: "ผู้เขียน"
|
||||
|
||||
code:
|
||||
copy: "คัดลอก"
|
||||
copied: "คัดลอกแล้ว"
|
||||
|
||||
error:
|
||||
404_title: "ไม่พบหน้าที่ต้องการ :confused:"
|
||||
404_error: "ข้อผิดพลาด 404"
|
||||
404_description: "ดูเหมือนว่าหน้าที่คุณต้องการจะไม่มีอยู่"
|
||||
|
||||
footer:
|
||||
dark_appearance: "เปลี่ยนเป็นธีมมืด"
|
||||
light_appearance: "เปลี่ยนเป็นธีมสว่าง"
|
||||
powered_by: "สร้างด้วย {{ .Hugo }} & {{ .Theme }}"
|
||||
|
||||
list:
|
||||
externalurl_title: "ลิงก์ไปยังเว็บไซต์ภายนอก"
|
||||
no_articles: "ยังไม่มีบทความให้แสดงในส่วนนี้"
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "เลื่อนขึ้นด้านบน"
|
||||
skip_to_main: "ข้ามไปยังเนื้อหาหลัก"
|
||||
|
||||
search:
|
||||
open_button_title: "ค้นหา (/)"
|
||||
close_button_title: "ปิด (Esc)"
|
||||
input_placeholder: "ค้นหา"
|
||||
|
||||
sharing:
|
||||
email: "ส่งทางอีเมล"
|
||||
facebook: "แชร์บน Facebook"
|
||||
linkedin: "แชร์บน LinkedIn"
|
||||
pinterest: "ปักหมุดบน Pinterest"
|
||||
reddit: "โพสต์บน Reddit"
|
||||
twitter: "ทวีตบน Twitter"
|
||||
bluesky: "โพสต์บน Bluesky"
|
||||
whatsapp: "แชร์ทาง WhatsApp"
|
||||
telegram: "แชร์ทาง Telegram"
|
||||
|
||||
shortcode:
|
||||
recent_articles: "บทความล่าสุด"
|
||||
|
||||
recent:
|
||||
show_more: "แสดงเพิ่มเติม"
|
||||
global:
|
||||
language: "TH"
|
||||
|
||||
article:
|
||||
anchor_label: "จุดยึด"
|
||||
date: "{{ .Date }}"
|
||||
date_updated: "อัปเดต: {{ .Date }}"
|
||||
draft: "ฉบับร่าง"
|
||||
edit_title: "แก้ไขเนื้อหา"
|
||||
reading_time:
|
||||
one: "{{ .Count }} นาที"
|
||||
other: "{{ .Count }} นาที"
|
||||
reading_time_title: "ใช้เวลาอ่าน"
|
||||
table_of_contents: "หัวข้อเนื้อหา"
|
||||
word_count:
|
||||
one: "{{ .Count }} คำ"
|
||||
other: "{{ .Count }} คำ"
|
||||
views:
|
||||
one: "{{ .Count }} ครั้ง"
|
||||
other: "{{ .Count }} ครั้ง"
|
||||
likes:
|
||||
one: "{{ .Count }} ไลค์"
|
||||
other: "{{ .Count }} ไลค์"
|
||||
part_of_series: "บทความในชุดเดียวกัน"
|
||||
part: "ตอนที่"
|
||||
this_article: "บทความนี้"
|
||||
related_articles: "บทความที่เกี่ยวข้อง"
|
||||
zen_mode_title:
|
||||
enable: "เปิดโหมดเซน"
|
||||
disable: "ปิดโหมดเซน"
|
||||
|
||||
author:
|
||||
byline_title: "ผู้เขียน"
|
||||
|
||||
code:
|
||||
copy: "คัดลอก"
|
||||
copied: "คัดลอกแล้ว"
|
||||
|
||||
error:
|
||||
404_title: "ไม่พบหน้าที่ต้องการ :confused:"
|
||||
404_error: "ข้อผิดพลาด 404"
|
||||
404_description: "ดูเหมือนว่าหน้าที่คุณต้องการจะไม่มีอยู่"
|
||||
|
||||
footer:
|
||||
dark_appearance: "เปลี่ยนเป็นธีมมืด"
|
||||
light_appearance: "เปลี่ยนเป็นธีมสว่าง"
|
||||
powered_by: "สร้างด้วย {{ .Hugo }} & {{ .Theme }}"
|
||||
|
||||
list:
|
||||
externalurl_title: "ลิงก์ไปยังเว็บไซต์ภายนอก"
|
||||
no_articles: "ยังไม่มีบทความให้แสดงในส่วนนี้"
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "เลื่อนขึ้นด้านบน"
|
||||
skip_to_main: "ข้ามไปยังเนื้อหาหลัก"
|
||||
|
||||
search:
|
||||
open_button_title: "ค้นหา (/)"
|
||||
close_button_title: "ปิด (Esc)"
|
||||
input_placeholder: "ค้นหา"
|
||||
|
||||
sharing:
|
||||
email: "ส่งทางอีเมล"
|
||||
facebook: "แชร์บน Facebook"
|
||||
linkedin: "แชร์บน LinkedIn"
|
||||
pinterest: "ปักหมุดบน Pinterest"
|
||||
reddit: "โพสต์บน Reddit"
|
||||
twitter: "ทวีตบน Twitter"
|
||||
bluesky: "โพสต์บน Bluesky"
|
||||
whatsapp: "แชร์ทาง WhatsApp"
|
||||
telegram: "แชร์ทาง Telegram"
|
||||
|
||||
shortcode:
|
||||
recent_articles: "บทความล่าสุด"
|
||||
|
||||
recent:
|
||||
show_more: "แสดงเพิ่มเติม"
|
||||
|
||||
@@ -63,4 +63,4 @@ shortcode:
|
||||
icon_none: "Icon bulunamadı."
|
||||
|
||||
recent:
|
||||
show_more: "Daha Fazla Göster"
|
||||
show_more: "Daha Fazla Göster"
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
{{ define "RenderImageSimple" -}}
|
||||
<img class="my-0 rounded-md" loading="lazy" alt="{{ .alt }}" src="{{ .src }}" />
|
||||
<img class="my-0 rounded-md" loading="lazy" alt="{{ .alt }}" src="{{ .src }}">
|
||||
{{- end }}
|
||||
|
||||
{{ define "RenderImageResponsive" -}}
|
||||
<img
|
||||
class="my-0 rounded-md" loading="lazy" decoding="async" fetchpriority="low" alt="{{ .alt }}"
|
||||
class="my-0 rounded-md"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
fetchpriority="low"
|
||||
alt="{{ .alt }}"
|
||||
srcset="
|
||||
{{ (.resource.Resize "330x").RelPermalink }} 330w,
|
||||
{{ (.resource.Resize "660x").RelPermalink }} 660w,
|
||||
{{ (.resource.Resize "1280x").RelPermalink }} 1280w"
|
||||
{{ (.resource.Resize "330x").RelPermalink }} 330w,
|
||||
{{ (.resource.Resize "660x").RelPermalink }} 660w,
|
||||
{{ (.resource.Resize "1280x").RelPermalink }} 1280w
|
||||
"
|
||||
data-zoom-src="{{ .resource.RelPermalink }}"
|
||||
src="{{ .resource.RelPermalink }}"
|
||||
/>
|
||||
src="{{ .resource.RelPermalink }}">
|
||||
{{- end }}
|
||||
|
||||
{{ define "RenderImageCaption" -}}
|
||||
@@ -31,6 +35,7 @@
|
||||
{{- $resource = or ($.Page.Resources.GetMatch $url.String) (resources.Get $url.String) }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
<figure>
|
||||
{{- if $isRemote }}
|
||||
{{ template "RenderImageSimple" (dict "src" $url.String "alt" $altText) }}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<a href="{{ .Destination | safeURL }}"
|
||||
{{- with .Title -}}
|
||||
<a
|
||||
href="{{ .Destination | safeURL }}"
|
||||
{{- with .Title -}}
|
||||
title="{{ . }}"
|
||||
{{- end }}
|
||||
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
|
||||
{{- .Text | safeHTML -}}
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }}
|
||||
target="_blank"
|
||||
{{ end }}>
|
||||
{{- .Text | safeHTML -}}
|
||||
</a>
|
||||
|
||||
@@ -1,42 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default " en") }} {{- . -}} {{ end }}" dir="{{ if .Site.Params.rtl | default false -}}
|
||||
<!doctype html>
|
||||
<html
|
||||
lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default " en") }}{{- . -}}{{ end }}"
|
||||
dir="{{ if .Site.Params.rtl | default false -}}
|
||||
rtl
|
||||
{{- else -}}
|
||||
ltr
|
||||
{{- end }}" class="scroll-smooth" data-default-appearance="{{ .Site.Params.defaultAppearance | default " light" }}"
|
||||
{{- end }}"
|
||||
class="scroll-smooth"
|
||||
data-default-appearance="{{ .Site.Params.defaultAppearance | default " light" }}"
|
||||
data-auto-appearance="{{ .Site.Params.autoSwitchAppearance | default " true" }}">
|
||||
{{- partial "head.html" . -}}
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body
|
||||
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32 scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600">
|
||||
<div id="the-top" class="absolute flex self-center">
|
||||
<a class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
||||
href="#main-content"><span
|
||||
class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
||||
"nav.skip_to_main" }}</a>
|
||||
</div>
|
||||
{{ $header := print "header/" .Site.Params.header.layout ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $header ) }}
|
||||
{{ partial $header . }}
|
||||
{{ else }}
|
||||
{{ partial "header/basic.html" . }}
|
||||
{{ end }}
|
||||
<div class="relative flex flex-col grow">
|
||||
<main id="main-content" class="grow">
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
||||
{{- partial "scroll-to-top.html" . -}}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{ if .Site.Params.enableSearch | default false }}
|
||||
{{- partial "search.html" . -}}
|
||||
|
||||
<body
|
||||
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32 scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600">
|
||||
<div id="the-top" class="absolute flex self-center">
|
||||
<a
|
||||
class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
||||
href="#main-content"
|
||||
><span class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
||||
"nav.skip_to_main"
|
||||
}}</a
|
||||
>
|
||||
</div>
|
||||
{{ $header := print "header/" .Site.Params.header.layout ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $header ) }}
|
||||
{{ partial $header . }}
|
||||
{{ else }}
|
||||
{{ partial "header/basic.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</body>
|
||||
{{ if .Site.Params.buymeacoffee.globalWidget | default false }}
|
||||
<script data-name="BMC-Widget" data-cfasync="false" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
|
||||
data-id="{{ .Site.Params.buymeacoffee.identifier }}" data-description="Support me on Buy me a coffee!" data-message="{{ .Site.Params.buymeacoffee.globalWidgetMessage | default "" }}"
|
||||
data-color="{{ .Site.Params.buymeacoffee.globalWidgetColor | default "#FFDD00" }}" data-position="{{ .Site.Params.buymeacoffee.globalWidgetPosition | default "Left" }}" data-x_margin="18" data-y_margin="18"></script>
|
||||
{{ end }}
|
||||
<div class="relative flex flex-col grow">
|
||||
<main id="main-content" class="grow">
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
||||
{{- partial "scroll-to-top.html" . -}}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{ if .Site.Params.enableSearch | default false }}
|
||||
{{- partial "search.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</body>
|
||||
{{ if .Site.Params.buymeacoffee.globalWidget | default false }}
|
||||
<script
|
||||
data-name="BMC-Widget"
|
||||
data-cfasync="false"
|
||||
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
|
||||
data-id="{{ .Site.Params.buymeacoffee.identifier }}"
|
||||
data-description="Support me on Buy me a coffee!"
|
||||
data-message="{{ .Site.Params.buymeacoffee.globalWidgetMessage | default "" }}"
|
||||
data-color="{{ .Site.Params.buymeacoffee.globalWidgetColor | default "#FFDD00" }}"
|
||||
data-position="{{ .Site.Params.buymeacoffee.globalWidgetPosition | default "Left" }}"
|
||||
data-x_margin="18"
|
||||
data-y_margin="18"></script>
|
||||
{{ end }}
|
||||
</html>
|
||||
|
||||
@@ -1,108 +1,124 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "scope" "single" }}
|
||||
{{ .Scratch.Set "scope" "single" }}
|
||||
|
||||
<article>
|
||||
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
|
||||
{{ $heroStyle := .Params.heroStyle }}
|
||||
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
|
||||
{{ $heroStyle := print "hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<header id="single_header" class="mt-5 max-w-prose">
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
|
||||
{{ .Title | emojify }}
|
||||
</h1>
|
||||
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
|
||||
{{ $authorsData := .Site.Data.authors }}
|
||||
{{ $taxonomies := .Site.Taxonomies.authors }}
|
||||
{{ $baseURL := .Site.BaseURL }}
|
||||
{{ $taxonomyLink := 0 }}
|
||||
{{ $showAuthor := 0 }}
|
||||
|
||||
{{ if not (strings.HasSuffix $baseURL "/") }}
|
||||
{{ $baseURL = delimit (slice $baseURL "/") "" }}
|
||||
<article>
|
||||
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
|
||||
{{ $heroStyle := .Params.heroStyle }}
|
||||
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
|
||||
{{ $heroStyle := print "hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
|
||||
|
||||
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
||||
{{ $showAuthor = 1 }}
|
||||
{{ partial "author.html" . }}
|
||||
|
||||
<header id="single_header" class="mt-5 max-w-prose">
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $author := .Page.Params.authors }}
|
||||
{{ $authorData := index $authorsData $author }}
|
||||
{{- if $authorData -}}
|
||||
{{ range $taxonomyname, $taxonomy := $taxonomies }}
|
||||
{{ if (eq $taxonomyname $author) }}
|
||||
{{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $finalLink := $taxonomyLink }}
|
||||
{{ $currentLang := $.Site.Language.Lang }}
|
||||
{{ if eq $.Site.LanguagePrefix "" }}
|
||||
{{ $finalLink = printf "%sauthors/%s/" $baseURL $author }}
|
||||
{{ else }}
|
||||
{{ $finalLink = printf "%s%s/authors/%s/" $baseURL $currentLang $author }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $finalLink) }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $taxonomyLink $showAuthor }}
|
||||
<div class="mb-5"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
</header>
|
||||
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
|
||||
{{ if or (and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")) (.Site.Params.article.showRelatedPosts | default false) }} <div
|
||||
class="order-first lg:ml-auto px-0 lg:order-last ltr:lg:pl-8 rtl:lg:pr-8">
|
||||
<div class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky {{ if hasPrefix .Site.Params.header.layout "fixed" -}}
|
||||
lg:top-[140px]{{ else }}lg:top-10{{ end }}">
|
||||
|
||||
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }} {{ partial "toc.html" . }} {{ end }} {{ if .Site.Params.article.showRelatedPosts |
|
||||
default false }} sd {{ end }} </div>
|
||||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
|
||||
{{ .Title | emojify }}
|
||||
</h1>
|
||||
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
|
||||
{{ $authorsData := .Site.Data.authors }}
|
||||
{{ $taxonomies := .Site.Taxonomies.authors }}
|
||||
{{ $baseURL := .Site.BaseURL }}
|
||||
{{ $taxonomyLink := 0 }}
|
||||
{{ $showAuthor := 0 }}
|
||||
|
||||
{{ if not (strings.HasSuffix $baseURL "/") }}
|
||||
{{ $baseURL = delimit (slice $baseURL "/") "" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
|
||||
|
||||
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
||||
{{ $showAuthor = 1 }}
|
||||
{{ partial "author.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $author := .Page.Params.authors }}
|
||||
{{ $authorData := index $authorsData $author }}
|
||||
{{- if $authorData -}}
|
||||
{{ range $taxonomyname, $taxonomy := $taxonomies }}
|
||||
{{ if (eq $taxonomyname $author) }}
|
||||
{{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $finalLink := $taxonomyLink }}
|
||||
{{ $currentLang := $.Site.Language.Lang }}
|
||||
{{ if eq $.Site.LanguagePrefix "" }}
|
||||
{{ $finalLink = printf "%sauthors/%s/" $baseURL $author }}
|
||||
{{ else }}
|
||||
{{ $finalLink = printf "%s%s/authors/%s/" $baseURL $currentLang $author }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $finalLink) }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $taxonomyLink $showAuthor }}
|
||||
<div class="mb-5"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
</header>
|
||||
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
{{ if or (and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")) (.Site.Params.article.showRelatedPosts | default false)
|
||||
}}
|
||||
<div class="order-first lg:ml-auto px-0 lg:order-last ltr:lg:pl-8 rtl:lg:pr-8">
|
||||
<div
|
||||
class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky {{ if hasPrefix .Site.Params.header.layout "fixed" -}}
|
||||
lg:top-[140px]
|
||||
{{ else }}
|
||||
lg:top-10
|
||||
{{ end }}
|
||||
">
|
||||
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
{{ partial "toc.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.article.showRelatedPosts |
|
||||
default false
|
||||
}}
|
||||
sd
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="min-w-0 min-h-0 max-w-fit">
|
||||
|
||||
{{ partial "series/series.html" . }}
|
||||
|
||||
|
||||
<div class="article-content max-w-prose mb-20">
|
||||
{{ .Content }}
|
||||
{{ $defaultReplyByEmail := .Site.Params.replyByEmail }}
|
||||
{{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }}
|
||||
{{ if $replyByEmail }}
|
||||
<strong class="block mt-8">
|
||||
<a target="_blank"
|
||||
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
||||
href="mailto:{{ .Site.Params.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}">
|
||||
<a
|
||||
target="_blank"
|
||||
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
||||
href="mailto:{{ .Site.Params.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}">
|
||||
Reply by Email
|
||||
</a>
|
||||
</strong>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
||||
{{ if (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
|
||||
|
||||
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
||||
@@ -123,44 +139,48 @@
|
||||
{{ end }}
|
||||
|
||||
{{ if or $taxonomyLink $showAuthor }}
|
||||
<div class="mb-10"></div>
|
||||
<div class="mb-10"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ partial "series/series-closed.html" . }}
|
||||
{{ partial "sharing-links.html" . }}
|
||||
{{ partial "related.html" . }}
|
||||
{{ partial "related.html" . }}
|
||||
</div>
|
||||
|
||||
{{ $translations := .AllTranslations }}
|
||||
{{ with .File }}
|
||||
{{ $path := .Path }}
|
||||
{{range $translations}}
|
||||
{{ range $translations }}
|
||||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{end}}
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_{{ $path }}" data-oid-likes="likes_{{ $path }}"></script>
|
||||
{{ end }}
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_{{ $path }}"
|
||||
data-oid-likes="likes_{{ $path }}"></script>
|
||||
{{ end }}
|
||||
|
||||
</section>
|
||||
<footer class="pt-8 max-w-prose print:hidden">
|
||||
|
||||
{{ partial "article-pagination.html" . }}
|
||||
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
|
||||
{{ if templates.Exists "partials/comments.html" }}
|
||||
<div class="pt-3">
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
|
||||
<div class="pt-3">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ warnf "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
</article>
|
||||
</section>
|
||||
<footer class="pt-8 max-w-prose print:hidden">
|
||||
{{ partial "article-pagination.html" . }}
|
||||
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
|
||||
{{ if templates.Exists "partials/comments.html" }}
|
||||
<div class="pt-3">
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600">
|
||||
<div class="pt-3">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ warnf "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,127 +1,128 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "scope" "term" }}
|
||||
{{ if .Site.Params.term.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ .Scratch.Set "scope" "term" }}
|
||||
{{ if .Site.Params.term.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.term.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }} <header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.term.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/term.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.term.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
<header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.term.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/term.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="flex flex-col max-w-full mt-0 mb-5 prose dark:prose-invert lg:flex-row">
|
||||
{{ if .Content }}
|
||||
<div class="min-w-0 min-h-0 max-w-prose">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_term_{{ .Data.Term }}" data-oid-likes="likes_term_{{ .Data.Term }}"></script>
|
||||
<div class="min-w-0 min-h-0 max-w-prose">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_term_{{ .Data.Term }}"
|
||||
data-oid-likes="likes_term_{{ .Data.Term }}"></script>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
|
||||
{{ if gt .Pages 0 }}
|
||||
{{ $cardView := .Params.cardView | default (.Site.Params.term.cardView | default false) }}
|
||||
{{ $cardViewScreenWidth := .Site.Params.term.cardViewScreenWidth | default false }}
|
||||
{{ $groupByYear := .Params.groupByYear | default ($.Site.Params.term.groupByYear | default false) }}
|
||||
|
||||
{{ $cardView := .Params.cardView | default (.Site.Params.term.cardView | default false) }}
|
||||
{{ $cardViewScreenWidth := .Site.Params.term.cardViewScreenWidth | default false }}
|
||||
{{ $groupByYear := .Params.groupByYear | default ($.Site.Params.term.groupByYear | default false) }}
|
||||
{{ if not $cardView }}
|
||||
|
||||
{{ if not $cardView }}
|
||||
<section class="space-y-10 w-full">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ if $groupByYear }}
|
||||
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/simple.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ else if and $cardView (not $cardViewScreenWidth) }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ else if and $cardView $cardViewScreenWidth }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<section class="space-y-10 w-full">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ if $groupByYear }}
|
||||
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/simple.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ else if and $cardView (not $cardViewScreenWidth) }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ else if and $cardView $cardViewScreenWidth }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
<section class="mt-10 prose dark:prose-invert">
|
||||
<p class="py-8 border-t">
|
||||
<em>{{ i18n "term.no_articles" | emojify }}</em>
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{end}}
|
||||
|
||||
{{ else }}
|
||||
<section class="mt-10 prose dark:prose-invert">
|
||||
<p class="py-8 border-t">
|
||||
<em>{{ i18n "term.no_articles" | emojify }}</em>
|
||||
</p>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.taxonomy.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.taxonomy.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }}
|
||||
|
||||
<header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
|
||||
@@ -28,28 +29,29 @@
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</section>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_taxonomy_{{ .Data.Plural }}" data-oid-likes="likes_taxonomy_{{ .Data.Plural }}"></script>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_taxonomy_{{ .Data.Plural }}"
|
||||
data-oid-likes="likes_taxonomy_{{ .Data.Plural }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.taxonomy.cardView }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ else }}
|
||||
|
||||
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/text.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/text.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
{{ if isset site.Params.fathomAnalytics "domain" }}
|
||||
<script defer src="https://{{ site.Params.fathomAnalytics.domain }}/script.js" data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
<script
|
||||
defer
|
||||
src="https://{{ site.Params.fathomAnalytics.domain }}/script.js"
|
||||
data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
{{ else }}
|
||||
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
{{ end }}
|
||||
<script
|
||||
defer
|
||||
src="https://cdn.usefathom.com/script.js"
|
||||
data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.Config.Services.GoogleAnalytics.ID }}"></script>
|
||||
<script
|
||||
async
|
||||
src="https://www.googletagmanager.com/gtag/js?id={{ site.Config.Services.GoogleAnalytics.ID }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ site.Config.Services.GoogleAnalytics.ID }}');
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{ with site.Params.fathomAnalytics.site }}
|
||||
{{ partial "analytics/fathom.html" }}
|
||||
{{ partial "analytics/fathom.html" }}
|
||||
{{ end }}
|
||||
{{ with site.Config.Services.GoogleAnalytics.ID }}
|
||||
{{ partial "analytics/ga.html" }}
|
||||
{{ partial "analytics/ga.html" }}
|
||||
{{ end }}
|
||||
{{ with site.Params.umamiAnalytics.websiteid }}
|
||||
{{ partial "analytics/umami.html" }}
|
||||
{{ partial "analytics/umami.html" }}
|
||||
{{ end }}
|
||||
{{ with site.Params.selineAnalytics.token }}
|
||||
{{ partial "analytics/seline.html" }}
|
||||
{{ end }}
|
||||
{{ partial "analytics/seline.html" }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
<script async src="https://cdn.seline.so/seline.js" data-token="{{ site.Params.selineAnalytics.token }}" data-id="seline-script"></script>
|
||||
<script
|
||||
async
|
||||
src="https://cdn.seline.so/seline.js"
|
||||
data-token="{{ site.Params.selineAnalytics.token }}"
|
||||
data-id="seline-script"></script>
|
||||
|
||||
{{ if .Site.Params.selineAnalytics.enableTrackEvent | default true }}
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="seline-script"]')
|
||||
.addEventListener('load', function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute('content');
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute('content');
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content');
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="seline-script"]').addEventListener("load", function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
||||
|
||||
seline.track("user:" + type + ':' + title, {
|
||||
type: type,
|
||||
title: title,
|
||||
url: url
|
||||
});
|
||||
});
|
||||
</script>
|
||||
seline.track("user:" + type + ":" + title, {
|
||||
type: type,
|
||||
title: title,
|
||||
url: url,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
{{ if isset site.Params.umamiAnalytics "domain" }}
|
||||
<script data-id="umami-script" async
|
||||
src="https://{{ site.Params.umamiAnalytics.domain }}/{{ with site.Params.umamiAnalytics.scriptName }}{{ . }}{{ else }}script.js{{ end }}"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}"
|
||||
{{ with site.Params.umamiAnalytics.dataDomains }}data-domains="{{ . }}"{{ end }}>
|
||||
</script>
|
||||
<script
|
||||
data-id="umami-script"
|
||||
async
|
||||
src="https://{{ site.Params.umamiAnalytics.domain }}/{{ with site.Params.umamiAnalytics.scriptName }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
script.js
|
||||
{{ end }}"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}"
|
||||
{{ with site.Params.umamiAnalytics.dataDomains }}data-domains="{{ . }}"{{ end }}></script>
|
||||
{{ else }}
|
||||
<script data-id="umami-script" async src="https://analytics.umami.is/script.js"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}">
|
||||
</script>
|
||||
<script
|
||||
data-id="umami-script"
|
||||
async
|
||||
src="https://analytics.umami.is/script.js"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.umamiAnalytics.enableTrackEvent | default true }}
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="umami-script"]')
|
||||
.addEventListener('load', function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute('content');
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute('content');
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content');
|
||||
umami.track(type + ':' + title, {'url': url});
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="umami-script"]').addEventListener("load", function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
||||
umami.track(type + ":" + title, { url: url });
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
@@ -9,112 +9,117 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{ $shouldShowDate := false }}
|
||||
{{ if and (eq $scope "single") (.Params.showDateOnlyInArticle | default (.Site.Params.article.showDateOnlyInArticle | default false)) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ end }}
|
||||
|
||||
{{/* showDate has higher priority than showDateOnlyInArticle */}}
|
||||
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ else }}
|
||||
{{ $shouldShowDate = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $shouldShowDate }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial
|
||||
"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) (gt (.Lastmod | time.Format "2006") 1) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/word-count.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0)
|
||||
}}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/reading-time.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showViews | default (.Site.Params.article.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showEdit | default (.Site.Params.article.showEdit | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/edit.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showZenMode | default (.Site.Params.article.showZenMode | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/zen-mode.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{/* Gather partials for this context */}}
|
||||
{{ $shouldShowDate := false }}
|
||||
{{ if and (eq $scope "single") (.Params.showDateOnlyInArticle | default (.Site.Params.article.showDateOnlyInArticle | default false)) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Output draft label */}}
|
||||
{{ if and (eq $scope "single") (and .Draft .Site.Params.article.showDraftLabel) }}
|
||||
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
|
||||
{{/* showDate has higher priority than showDateOnlyInArticle */}}
|
||||
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ else }}
|
||||
{{ $shouldShowDate = false }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if (eq $taxonomy "authors")}}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $i, $a := $context.GetTerms $taxonomy }}
|
||||
{{ if not (eq $i 0) }} , {{ end }} <div class="cursor-pointer" onclick="window.open({{ $a.RelPermalink }},'_self');return false;">{{ $a.LinkTitle }}</div>
|
||||
{{ if $shouldShowDate }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output taxonomies */}}
|
||||
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
<span class="mr-2 margin-top-[0.5rem]" onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial
|
||||
"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) (gt (.Lastmod | time.Format "2006") 1)
|
||||
}}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output only category */}}
|
||||
{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range (.GetTerms "categories") }}
|
||||
<span class="mr-2 margin-top-[0.5rem]" onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/word-count.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/reading-time.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showViews | default (.Site.Params.article.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showEdit | default (.Site.Params.article.showEdit | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/edit.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showZenMode | default (.Site.Params.article.showZenMode | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/zen-mode.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Output draft label */}}
|
||||
{{ if and (eq $scope "single") (and .Draft .Site.Params.article.showDraftLabel) }}
|
||||
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if (eq $taxonomy "authors") }}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $i, $a := $context.GetTerms $taxonomy }}
|
||||
{{ if not (eq $i 0) }}, {{ end }}
|
||||
<div class="cursor-pointer" onclick="window.open({{ $a.RelPermalink }},'_self');return false;">
|
||||
{{ $a.LinkTitle }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output taxonomies */}}
|
||||
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series")) }}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
<span
|
||||
class="mr-2 margin-top-[0.5rem]"
|
||||
onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output only category */}}
|
||||
{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range (.GetTerms "categories") }}
|
||||
<span class="mr-2 margin-top-[0.5rem]" onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -4,33 +4,32 @@
|
||||
{{ $scope := default nil }}
|
||||
|
||||
{{ if (reflect.IsMap . ) }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{/* Gather partials for this context */}}
|
||||
|
||||
{{ if (.Params.showViews | default (.Site.Params.list.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML}}
|
||||
{{ if (.Params.showViews | default (.Site.Params.list.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{ if (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -4,33 +4,32 @@
|
||||
{{ $scope := default nil }}
|
||||
|
||||
{{ if (reflect.IsMap . ) }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{/* Gather partials for this context */}}
|
||||
|
||||
{{ if (.Params.showViews | default (.Site.Params.taxonomy.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML}}
|
||||
{{ if (.Params.showViews | default (.Site.Params.taxonomy.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{ if (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -4,33 +4,32 @@
|
||||
{{ $scope := default nil }}
|
||||
|
||||
{{ if (reflect.IsMap . ) }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{/* Gather partials for this context */}}
|
||||
|
||||
{{ if (.Params.showViews | default (.Site.Params.term.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML}}
|
||||
{{ if (.Params.showViews | default (.Site.Params.term.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{ if (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{{ $prev = .NextInSection }}
|
||||
{{ end }}
|
||||
<div class="pt-8">
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600">
|
||||
<div class="flex justify-between pt-3">
|
||||
<span>
|
||||
{{ if $prev }}
|
||||
@@ -21,8 +21,7 @@
|
||||
>→</span
|
||||
>
|
||||
<span class="flex flex-col">
|
||||
<span
|
||||
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
<span class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
>{{ $prev.Title | emojify }}</span
|
||||
>
|
||||
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
|
||||
@@ -38,8 +37,7 @@
|
||||
{{ if $next }}
|
||||
<a class="flex text-right group ml-3" href="{{ $next.RelPermalink }}">
|
||||
<span class="flex flex-col">
|
||||
<span
|
||||
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
<span class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
>{{ $next.Title | emojify }}</span
|
||||
>
|
||||
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
|
||||
|
||||
@@ -1,42 +1,56 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<div class="flex author author-extra mt-4">
|
||||
{{ with .data.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="place-self-center">
|
||||
{{ $link := .link}}
|
||||
{{ $link := .link }}
|
||||
{{ with .data.name | markdownify | emojify }}
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<a {{ if $link }} href="{{ $link }}" {{ end }} class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</a>
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<a
|
||||
{{ if $link }}href="{{ $link }}"{{ end }}
|
||||
class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .data.bio | markdownify }}
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
{{ end }}
|
||||
<div class="text-2xl sm:text-lg">
|
||||
<div class="flex flex-wrap text-neutral-400 dark:text-neutral-500">
|
||||
{{ range .data.social }}
|
||||
{{ range $name, $link := . }}
|
||||
<a class="px-1 hover:text-primary-700 dark:hover:text-primary-400" href="{{ $link }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer"><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a>
|
||||
{{ end }}
|
||||
{{ range $name, $link := . }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-700 dark:hover:text-primary-400"
|
||||
href="{{ $link }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,28 +11,36 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="place-self-center">
|
||||
{{ with .Site.Params.Author.name | markdownify }}
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</div>
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Author.bio | markdownify }}
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
{{ end }}
|
||||
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<span class="flex cursor-pointer">
|
||||
<span class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
||||
<span
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
||||
{{ . }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -7,10 +7,8 @@
|
||||
{{ else if not .p1.IsHome }}
|
||||
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||
{{ end }}
|
||||
<li class="{{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{else}}inline{{ end }}">
|
||||
<a
|
||||
class="hover:underline decoration-neutral-300 dark:underline-neutral-600"
|
||||
href="{{ .p1.RelPermalink }}"
|
||||
<li class="{{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ else }}inline{{ end }}">
|
||||
<a class="hover:underline decoration-neutral-300 dark:underline-neutral-600" href="{{ .p1.RelPermalink }}"
|
||||
>{{ if .p1.Title }}
|
||||
{{- .p1.Title -}}
|
||||
{{ else }}
|
||||
|
||||
@@ -2,50 +2,53 @@
|
||||
{{/* Footer menu */}}
|
||||
{{ if .Site.Params.footer.showMenu | default true }}
|
||||
{{ if .Site.Menus.footer }}
|
||||
<nav class="flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
||||
<ul class="flex flex-col list-none sm:flex-row">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
|
||||
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center" href="{{ .URL }}"
|
||||
title="{{ .Title }}">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ .Name | markdownify }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
||||
<ul class="flex flex-col list-none sm:flex-row">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li
|
||||
class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
|
||||
<a
|
||||
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center"
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ .Name | markdownify }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="flex items-center justify-between">
|
||||
|
||||
{{/* Copyright */}}
|
||||
{{ if .Site.Params.footer.showCopyright | default true }}
|
||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
||||
{{ . | markdownify }}
|
||||
{{- else }}
|
||||
©
|
||||
{{ now.Format "2006" }}
|
||||
{{ .Site.Params.Author.name | markdownify }}
|
||||
{{- end }}
|
||||
</p>
|
||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
||||
{{ . | markdownify }}
|
||||
{{- else }}
|
||||
©
|
||||
{{ now.Format "2006" }}
|
||||
{{ .Site.Params.Author.name | markdownify }}
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{/* Theme attribution */}}
|
||||
{{ if .Site.Params.footer.showThemeAttribution | default true }}
|
||||
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
||||
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
||||
}}
|
||||
{{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>` }}
|
||||
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
|
||||
</p>
|
||||
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
||||
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
||||
}}
|
||||
{{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>`
|
||||
}}
|
||||
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
@@ -57,12 +60,14 @@
|
||||
scrollOffset: 0,
|
||||
})
|
||||
{{ end }}
|
||||
</script>
|
||||
{{ $jsProcess := resources.Get "js/process.js" }}
|
||||
</script> {{ $jsProcess := resources.Get "js/process.js" }}
|
||||
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsProcess.RelPermalink }}" integrity="{{ $jsProcess.Data.Integrity }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsProcess.RelPermalink }}"
|
||||
integrity="{{ $jsProcess.Data.Integrity }}"></script>
|
||||
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
||||
{{ if templates.Exists "partials/extend-footer.html" }}
|
||||
{{ partialCached "extend-footer.html" . }}
|
||||
{{ partialCached "extend-footer.html" . }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return md5 $uid }}
|
||||
{{ return md5 $uid }}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<div class="min-h-[148px]"></div>
|
||||
<div class="fixed inset-x-0 pl-[24px] pr-[24px] z-index-100">
|
||||
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom bg-neutral dark:bg-neutral-800"></div>
|
||||
<div
|
||||
id="menu-blur"
|
||||
class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom bg-neutral dark:bg-neutral-800"></div>
|
||||
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
||||
{{ partial "header/basic.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="menu-blur"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="menu-blur"></script>
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
<div class="min-h-[148px]"></div>
|
||||
<div class="fixed inset-x-0 min-h-[130px] opacity-65 pl-[24px] pr-[24px] bg-gradient-to-b from-neutral from-60% dark:from-neutral-800 to-transparent mix-blend-normal z-index-80"></div>
|
||||
<div
|
||||
class="fixed inset-x-0 min-h-[130px] opacity-65 pl-[24px] pr-[24px] bg-gradient-to-b from-neutral from-60% dark:from-neutral-800 to-transparent mix-blend-normal z-index-80"></div>
|
||||
<div class="fixed inset-x-0 pl-[24px] pr-[24px] z-index-100">
|
||||
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div
|
||||
id="menu-blur"
|
||||
class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
||||
{{ partial "header/basic.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="menu-blur"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="menu-blur"></script>
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<div class="min-h-[148px]"></div>
|
||||
<div class="fixed inset-x-0 pl-[24px] pr-[24px] z-index-100">
|
||||
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div
|
||||
id="menu-blur"
|
||||
class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
||||
{{ partial "header/basic.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="menu-blur"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="menu-blur"></script>
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
<span>
|
||||
{{ partial "icon.html" "chevron-down" }}
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
<span>
|
||||
{{ partial "icon.html" "chevron-down" }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ range .Children }}
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
<li class="mt-1">
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
)
|
||||
}}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-sm font-small" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<p class="text-sm font-small" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="mb-2"></li>
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<div {{ if and .Pre .Name}} class="mr-2" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
)
|
||||
}}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<div {{ if and .Pre .Name }}class="mr-2"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ if .HasChildren }}
|
||||
{{ if .HasChildren }}
|
||||
{{ partial "header/header-mobile-option-nested.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "header/header-mobile-option-simple.html" . }}
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
<div>
|
||||
<div class="cursor-pointer flex items-center nested-menu">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<a {{ if .URL }} href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank" {{ end }} {{ end }} class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||
<a
|
||||
{{ if .URL }}
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"
|
||||
title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</a>
|
||||
<span>
|
||||
@@ -17,17 +24,21 @@
|
||||
<div class="pt-2 p-5 mt-2 rounded-xl backdrop-blur shadow-2xl">
|
||||
<div class="flex flex-col space-y-3">
|
||||
{{ range .Children }}
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-sm font-sm" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-sm font-sm" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }} target="_blank" {{
|
||||
end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}target="_blank"{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-base font-medium" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<p class="text-base font-medium" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ if .HasChildren }}
|
||||
{{ if .HasChildren }}
|
||||
{{ partial "header/header-option-nested.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "header/header-option-simple.html" . }}
|
||||
|
||||
@@ -6,28 +6,32 @@
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
|
||||
{{ if and .Params.featureimage (not $featured) }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{ $featured = resources.GetRemote $url }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{ $featured = resources.GetRemote $url }}
|
||||
{{ end }}
|
||||
|
||||
{{- if not $featured }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- with $featured -}}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg")}}
|
||||
{{ with . }}
|
||||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }}
|
||||
{{ with . }}
|
||||
<div
|
||||
class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div
|
||||
class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -6,55 +6,71 @@
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
|
||||
{{ if .Params.featureimage }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
{{- if not $featured }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $caption := "" }}
|
||||
{{ if .Params.featureimagecaption }}
|
||||
{{- $caption = .Params.featureimagecaption -}}
|
||||
{{- $caption = .Params.featureimagecaption -}}
|
||||
{{ end }}
|
||||
|
||||
{{- $alt := .Page.Title -}}
|
||||
{{- with .Page.Params.alt }}{{ $alt = . }}{{ end -}}
|
||||
|
||||
{{- with $featured -}}
|
||||
{{ if strings.HasSuffix $featured ".svg" }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
{{end}}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else if $disableImageOptimization }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
{{end}}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
{{end}}
|
||||
</figure>
|
||||
{{ if strings.HasSuffix $featured ".svg" }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ else if $disableImageOptimization }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img
|
||||
class="w-full rounded-lg single_hero_round nozoom"
|
||||
alt="{{ $alt }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<figure>
|
||||
<img
|
||||
class="w-full rounded-lg single_hero_round nozoom"
|
||||
alt="{{ $alt }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
{{- $background := $images.GetMatch "*background*" -}}
|
||||
|
||||
{{- if not $background }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $background = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $background = resources.Get . }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $background = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $background = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if not $background }}{{ $background = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
@@ -18,69 +18,81 @@
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{ if .Params.featureimage }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{ end }}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "*background*" }}{{ end -}}
|
||||
|
||||
{{- if not $featured }}
|
||||
{{ with .Site.Params.defaultFeaturedImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ with .Site.Params.defaultFeaturedImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
||||
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
||||
(and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList))
|
||||
) }}
|
||||
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
||||
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
||||
(and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList))
|
||||
)
|
||||
}}
|
||||
|
||||
{{- with $featured -}}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg")}}
|
||||
{{ with . }}
|
||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg") }}
|
||||
{{ with . }}
|
||||
<div
|
||||
class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div
|
||||
class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $background -}}
|
||||
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg")}}
|
||||
{{ with . }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
</div>{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
</div>{{ end }}
|
||||
{{ end }}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg") }}
|
||||
{{ with . }}
|
||||
<div
|
||||
class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div
|
||||
class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{ if $shouldBlur | default false }}
|
||||
<div id="background-blur" class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="background-blur"></script>
|
||||
<div
|
||||
id="background-blur"
|
||||
class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="background-blur"></script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -1,84 +1,102 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative sm:overflow-hidden">
|
||||
<div class="fixed inset-x-0 top-0 z-index-[-10]">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="w-full h-[1000px] object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}" role="presentation">
|
||||
<div
|
||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
<div
|
||||
class="opacity-60 absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral-100 dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-1 py-1 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose dark:prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative sm:overflow-hidden">
|
||||
<div class="fixed inset-x-0 top-0 z-index-[-10]">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img
|
||||
class="w-full h-[1000px] object-cover m-0 nozoom margin-0"
|
||||
src="{{ $homepageImage.RelPermalink }}"
|
||||
role="presentation">
|
||||
<div
|
||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
<div
|
||||
class="opacity-60 absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral-100 dark:to-neutral-800 mix-blend-normal"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-1 py-1 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose dark:prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<section>
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
</section>
|
||||
{{ if .Site.Params.homepage.layoutBackgroundBlur | default false }}
|
||||
<div id="background-blur" class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="background-blur"></script>
|
||||
<div
|
||||
id="background-blur"
|
||||
class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="background-blur"></script>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,43 +1,44 @@
|
||||
<div class="relative pt-16 pb-32">
|
||||
<div aria-hidden="true" class="absolute inset-x-0 top-0 h-48 bg-gradient-to-b from-gray-100"></div>
|
||||
<div class="relative">
|
||||
<div class="lg:mx-auto lg:grid lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-2 lg:gap-24 lg:px-8">
|
||||
<div class="mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
{{ with .Title }}
|
||||
<header>
|
||||
<h1>{{ . | emojify }}</h1>
|
||||
</header>
|
||||
{{ end }}
|
||||
<section>{{ .Content }}</section>
|
||||
</article>
|
||||
</div>
|
||||
<div class="mt-6 sm:mt-16 lg:mt-0 mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<div class="-mr-48 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0 w-full">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div aria-hidden="true" class="absolute inset-x-0 top-0 h-48 bg-gradient-to-b from-gray-100"></div>
|
||||
<div class="relative">
|
||||
<div class="lg:mx-auto lg:grid lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-2 lg:gap-24 lg:px-8">
|
||||
<div class="mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
{{ with .Title }}
|
||||
<header>
|
||||
<h1>{{ . | emojify }}</h1>
|
||||
</header>
|
||||
{{ end }}
|
||||
<section>{{ .Content }}</section>
|
||||
</article>
|
||||
</div>
|
||||
<div class="mt-6 sm:mt-16 lg:mt-0 mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<div class="-mr-48 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0 w-full">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img
|
||||
class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section>
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
</section>
|
||||
|
||||
@@ -1,99 +1,116 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
{{ $disableHeroImageFilter := .Site.Params.homepage.disableHeroImageFilter | default false }}
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
|
||||
<div class="absolute inset-0">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="h-full w-full object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
|
||||
</div>
|
||||
{{ else }}
|
||||
<div
|
||||
class="absolute inset-0 from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-300" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
{{ else }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
|
||||
<div class="absolute inset-0">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="h-full w-full object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply"></div>
|
||||
{{ else }}
|
||||
<div
|
||||
class="absolute inset-0 from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div
|
||||
class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-300"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ else }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<section>
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<article class="{{ if not .Site.Params.homepage.showRecent }}
|
||||
<article
|
||||
class="{{ if not .Site.Params.homepage.showRecent }}
|
||||
h-full
|
||||
{{ end }} flex flex-col items-center justify-center text-center">
|
||||
<header class="relative px-1 py-1 flex flex-col items-center mb-3">
|
||||
@@ -14,17 +15,21 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144" alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="text-4xl font-extrabold">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
<div class="mt-1 text-2xl">
|
||||
{{ partialCached "author-links.html" . }}
|
||||
|
||||
@@ -8,15 +8,18 @@
|
||||
{{ $translations := .AllTranslations }}
|
||||
{{ with .File }}
|
||||
{{ $path := .Path }}
|
||||
{{range $translations}}
|
||||
{{ range $translations }}
|
||||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{end}}
|
||||
{{ end }}
|
||||
{{ $id = delimit (slice "likes_" $path) "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<span id="{{ $id }}"
|
||||
<span
|
||||
id="{{ $id }}"
|
||||
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400"
|
||||
title="likes">loading</span>
|
||||
title="likes"
|
||||
>loading</span
|
||||
>
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }}</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<span>
|
||||
<button id="button_likes"
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
|
||||
onclick="process_article()">
|
||||
<span id="button_likes_heart" class="inline-block align-text-bottom hidden">{{ partial "icon.html" "heart" }} </span>
|
||||
<span id="button_likes_emtpty_heart" class="inline-block align-text-bottom">{{ partial "icon.html" "heart-empty" }}</span>
|
||||
<span id="button_likes_text"> Like</span>
|
||||
</button>
|
||||
<button
|
||||
id="button_likes"
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
|
||||
onclick="process_article()">
|
||||
<span id="button_likes_heart" class="inline-block align-text-bottom hidden"
|
||||
>{{ partial "icon.html" "heart" }}
|
||||
</span>
|
||||
<span id="button_likes_emtpty_heart" class="inline-block align-text-bottom"
|
||||
>{{ partial "icon.html" "heart-empty" }}</span
|
||||
>
|
||||
<span id="button_likes_text"> Like</span>
|
||||
</button>
|
||||
</span>
|
||||
{{- /* Trim EOF */ -}}
|
||||
{{- /* Trim EOF */ -}}
|
||||
|
||||
@@ -8,13 +8,18 @@
|
||||
{{ $translations := .AllTranslations }}
|
||||
{{ with .File }}
|
||||
{{ $path := .Path }}
|
||||
{{range $translations}}
|
||||
{{ range $translations }}
|
||||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{end}}
|
||||
{{ end }}
|
||||
{{ $id = delimit (slice "views_" $path) "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<span id="{{ $id }}" class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400" title="views">loading</span>
|
||||
<span
|
||||
id="{{ $id }}"
|
||||
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400"
|
||||
title="views"
|
||||
>loading</span
|
||||
>
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "eye" }}</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
{{ $jsZenMode := resources.Get "js/zen-mode.js" }}
|
||||
{{ $jsZenMode = $jsZenMode | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
|
||||
<script type="text/javascript" src="{{ $jsZenMode.RelPermalink }}" integrity="{{ $jsZenMode.Data.Integrity }}"></script>
|
||||
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsZenMode.RelPermalink }}"
|
||||
integrity="{{ $jsZenMode.Data.Integrity }}"></script>
|
||||
|
||||
<span class="mb-[2px]">
|
||||
<span id="zen-mode-button"
|
||||
class="text-lg hover:text-primary-500"
|
||||
title="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-disable="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-enable="{{ i18n "article.zen_mode_title.disable" }}">
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "expand" }}</span>
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
id="zen-mode-button"
|
||||
class="text-lg hover:text-primary-500"
|
||||
title="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-disable="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-enable="{{ i18n "article.zen_mode_title.disable" }}">
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "expand" }}</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
<ul class="flex flex-row mt-8 justify-center">
|
||||
{{- .Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{ if $.Paginator.HasPrev }}
|
||||
<li>
|
||||
<a
|
||||
<li>
|
||||
<a
|
||||
href="{{ $.Paginator.Prev.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="prev"
|
||||
>←</a>
|
||||
</li>
|
||||
>←</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- range $.Paginator.Pagers -}}
|
||||
{{- $right := sub .TotalPages .PageNumber -}}
|
||||
@@ -24,12 +25,13 @@
|
||||
{{- if $showNumber -}}
|
||||
<li>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
class="{{ if eq . $.Paginator }}
|
||||
bg-primary-200 dark:bg-primary-400 dark:text-neutral-800
|
||||
{{ end }} mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
>{{ .PageNumber }}</a>
|
||||
</li>
|
||||
href="{{ .URL }}"
|
||||
class="{{ if eq . $.Paginator }}
|
||||
bg-primary-200 dark:bg-primary-400 dark:text-neutral-800
|
||||
{{ end }} mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
>{{ .PageNumber }}</a
|
||||
>
|
||||
</li>
|
||||
{{- else if ($.Scratch.Get "paginator.shouldEllipse") -}}
|
||||
<li class="page-item ">
|
||||
<span class="page-link" aria-hidden="true">…</span>
|
||||
@@ -37,13 +39,14 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ if $.Paginator.HasNext }}
|
||||
<li>
|
||||
<a
|
||||
<li>
|
||||
<a
|
||||
href="{{ $.Paginator.Next.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="next"
|
||||
>→</a>
|
||||
</li>
|
||||
>→</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
|
||||
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<section
|
||||
class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
|
||||
.Site.Params.mainSections)).Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
.Site.Params.mainSections)).Pages
|
||||
}}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
|
||||
.Site.Params.mainSections)).Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
.Site.Params.mainSections)).Pages
|
||||
}}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user