pretty run

This commit is contained in:
Nuno Coração
2025-06-17 23:17:26 +01:00
parent 560e927b87
commit f2e224a042
137 changed files with 5771 additions and 5017 deletions

View File

@@ -2,7 +2,7 @@ name: Update Hugo version
on:
schedule:
- cron: '0 6 * * *'
- cron: "0 6 * * *"
workflow_dispatch:
@@ -10,7 +10,6 @@ jobs:
updateBlowfish:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
@@ -26,7 +25,9 @@ jobs:
- 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

View File

@@ -7,12 +7,11 @@ 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
@@ -22,10 +21,13 @@ jobs:
- 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'
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

View File

@@ -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/

View File

@@ -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",
]

View File

@@ -1,5 +1,5 @@
#zen-mode-button {
cursor:pointer
cursor: pointer;
}
.zen-mode {
@@ -7,10 +7,8 @@
}
body.zen-mode-enable {
#bmc-wbtn, .author {
display:none !important;
#bmc-wbtn,
.author {
display: none !important;
}
}

View File

@@ -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;
}
@@ -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 {
@@ -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,7 +454,7 @@ pre {
}
.center-relative-left {
left: calc(max(-50vw,-800px) + 50%);
left: calc(max(-50vw, -800px) + 50%);
}
.margin-0 {
@@ -461,7 +463,7 @@ pre {
.margin-top-\[-15px\] {
margin-top: -15px;
}
.margin-top-\[0\.5rem\]{
.margin-top-\[0\.5rem\] {
margin-top: 0.5rem;
}
.margin-right-\[10px\] {
@@ -472,7 +474,7 @@ pre {
}
.padding-main-menu {
padding: 2px 0 3px 0
padding: 2px 0 3px 0;
}
.padding-top-\[5px\] {
padding-top: 5px;
@@ -492,7 +494,8 @@ pre {
}
/* 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 */
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -1,6 +1,8 @@
function setBackgroundBlur() {
const scriptElement = document.currentScript;
const targetId = scriptElement && scriptElement.getAttribute("data-target-id") ? scriptElement.getAttribute("data-target-id")
const targetId =
scriptElement && scriptElement.getAttribute("data-target-id")
? scriptElement.getAttribute("data-target-id")
: (console.error("data-target-id is null"), null);
window.addEventListener("scroll", () => {

View File

@@ -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");

View File

@@ -1,17 +1,22 @@
function fetchRepo() {
const scriptElement = document.currentScript;
const repoURL = scriptElement && scriptElement.getAttribute("data-repo-url") ? scriptElement.getAttribute("data-repo-url")
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")
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"]
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) => {
@@ -20,7 +25,8 @@ function fetchRepo() {
if (requestObject === "stargazers_count" && repoId.startsWith("github")) {
element = document.getElementById(`${repoId}-stargazers`);
}
element ? (element.innerHTML = data[requestObject])
element
? (element.innerHTML = data[requestObject])
: (console.error(`Element '${repoId}-${requestObject}' not found`), null);
});
})

View File

@@ -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;
@@ -9,100 +15,117 @@ if (typeof auth !== "undefined") {
const viewed = localStorage.getItem(id);
if (!viewed) {
auth.signInAnonymously()
auth
.signInAnonymously()
.then(() => {
const docRef = db.collection('views').doc(id)
const docRef = db.collection("views").doc(id);
localStorage.setItem(id, true);
docRef.get().then((doc) => {
docRef
.get()
.then((doc) => {
if (doc.exists) {
db.collection('views').doc(id).update({
views: firebase.firestore.FieldValue.increment(1)
db.collection("views")
.doc(id)
.update({
views: firebase.firestore.FieldValue.increment(1),
});
} else {
db.collection('views').doc(id).set({ views: 1 })
db.collection("views").doc(id).set({ views: 1 });
}
}).catch((error) => {
})
.catch((error) => {
console.log("Error getting document:", error);
});
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
console.error(errorCode, errorMessage)
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 = ""
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()
auth
.signInAnonymously()
.then(() => {
const docRef = db.collection('likes').doc(id_likes)
docRef.get().then((doc) => {
liked_page = true
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 = ""
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)
db.collection("likes")
.doc(id_likes)
.update({
likes: firebase.firestore.FieldValue.increment(1),
});
} else {
db.collection('likes').doc(id_likes).set({ likes: 1 })
db.collection("likes").doc(id_likes).set({ likes: 1 });
}
}).catch((error) => {
})
.catch((error) => {
console.log("Error getting document:", error);
});
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
console.error(errorCode, errorMessage)
console.error(errorCode, errorMessage);
});
}
function remove_like_article(id_likes) {
auth.signInAnonymously()
auth
.signInAnonymously()
.then(() => {
const docRef = db.collection('likes').doc(id_likes)
docRef.get().then((doc) => {
liked_page = false
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"
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)
db.collection("likes")
.doc(id_likes)
.update({
likes: firebase.firestore.FieldValue.increment(-1),
});
} else {
db.collection('likes').doc(id_likes).set({ likes: 0 })
db.collection("likes").doc(id_likes).set({ likes: 0 });
}
}).catch((error) => {
})
.catch((error) => {
console.log("Error getting document:", error);
});
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
console.error(errorCode, errorMessage)
console.error(errorCode, errorMessage);
});
}
function process_article() {
if (!liked_page) {
like_article(id_likes)
like_article(id_likes);
} else {
remove_like_article(id_likes)
remove_like_article(id_likes);
}
}

View File

@@ -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, ',');
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
function toggleLoaders(node){
function toggleLoaders(node) {
var classesString = node.className;
if(classesString == "") return
if (classesString == "") return;
var classes = classesString.split(" ");
for(var i in classes){
node.classList.toggle(classes[i])
for (var i in classes) {
node.classList.toggle(classes[i]);
}
}
var update_views = function (node, id) {
viewsCollection.doc(id).onSnapshot(doc => {
viewsCollection.doc(id).onSnapshot((doc) => {
var data = doc.data();
if (data) {
node.innerText = numberWithCommas(data.views)
node.innerText = numberWithCommas(data.views);
} else {
node.innerText = 0
}
toggleLoaders(node)
})
node.innerText = 0;
}
toggleLoaders(node);
});
};
var update_likes = function (node, id) {
likesCollection.doc(id).onSnapshot(doc => {
likesCollection.doc(id).onSnapshot((doc) => {
var data = doc.data();
if (data) {
node.innerText = numberWithCommas(data.likes)
node.innerText = numberWithCommas(data.likes);
} else {
node.innerText = 0
node.innerText = 0;
}
toggleLoaders(node)
toggleLoaders(node);
});
};
})
}
auth.signInAnonymously()
auth
.signInAnonymously()
.then(() => {
var views_nodes = document.querySelectorAll("span[id^='views_']")
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
var node = views_nodes[i];
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
if (id) {
update_views(node, id)
update_views(node, id);
}
}
var likes_nodes = document.querySelectorAll("span[id^='likes_']")
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
var node = likes_nodes[i];
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
if (id) {
update_likes(node, id)
update_likes(node, id);
}
}
})
.catch((error) => {
var errorCode = error.code;
var errorMessage = error.message;
console.error(errorCode, errorMessage)
console.error(errorCode, errorMessage);
});
}

View File

@@ -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">&middot;</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">&middot;</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">&rarr;</div>

View File

@@ -2,17 +2,16 @@ function _getDefaultPackeryOptions() {
return {
percentPosition: true,
gutter: 5,
resize: true
resize: true,
};
}
(function init() {
$(window).on("load", function () {
let packeries = [];
let nodeGalleries = document.querySelectorAll('.gallery');
let nodeGalleries = document.querySelectorAll(".gallery");
nodeGalleries.forEach(nodeGallery => {
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);

View File

@@ -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,7 +55,7 @@ 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);
}

View File

@@ -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();
})
}),
);
});

View File

@@ -1,6 +1,6 @@
{
"name": "Nuno Coração",
"image" : "img/nuno_avatar.jpg",
"image": "img/nuno_avatar.jpg",
"bio": "Theme Creator",
"social": [
{ "linkedin": "https://linkedin.com/in/nunocoracao" },

View File

@@ -1,6 +1,6 @@
{
"name": "Dummy Second Author",
"image" : "img/author2.png",
"image": "img/author2.png",
"bio": "Dummy",
"social": [
{ "linkedin": "https://linkedin.com/in/nunocoracao" },

View File

@@ -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>

View File

@@ -1,16 +1,19 @@
{{ $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"
<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 &orarr;
</button>
@@ -30,15 +33,15 @@
</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>
</a>
</div>
</div>
{{ end }}

View File

@@ -1,19 +1,19 @@
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 => {
files.forEach((file) => {
//console.log(file)
if(file.indexOf("languages.") > -1) {
if (file.indexOf("languages.") > -1) {
var lang = file.split(".")[1];
//console.log(lang)
if(lang != defaultLang) {
if (lang != defaultLang) {
targetLangs.push(lang);
}
}
@@ -22,34 +22,30 @@ function readConfigs() {
async function processFile(filePath, file) {
if (filePath.indexOf("index.md") > -1) {
//console.log("processing", filePath)
for(var i in targetLangs) {
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)) {
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) {
const data = fs.readFileSync(filePath, "utf8");
const data2 = fs.readFileSync(targetFilePath, "utf8");
if (data != data2) {
//console.log("file contents are different", targetFilePath);
}else{
} else {
//console.log("file contents are the same", targetFilePath);
console.log(targetFilePath);
//process.exit(1);
}
}else{
} else {
//console.log("file does not exist", targetFilePath);
}
}
} else
return
} else return;
}
async function processFolder(folderPath) {

View File

@@ -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";
@@ -10,7 +10,7 @@ const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
async function convert(text, from, to) {
var options = {
from: from,
to: to
to: to,
};
var translated_text = await translate(text, options);
return translated_text.text;
@@ -26,12 +26,14 @@ async function processFrontMatter(block) {
if (array[i].indexOf(":") > -1) {
var elements = array[i].split(":");
var newElement = "";
if (elements[0] == "title" ||
if (
elements[0] == "title" ||
elements[0] == "description" ||
elements[0] == "summary" ||
elements[0] == "description" ||
elements[0] == "categories" ||
elements[0] == "tags") {
elements[0] == "tags"
) {
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
newElement = elements[0] + ": " + translatedElement;
} else {
@@ -45,11 +47,10 @@ async function processFrontMatter(block) {
return translatedBlock;
}
async function main() {
const fileContent = fs.readFileSync(filePath, 'utf8');
const fileContent = fs.readFileSync(filePath, "utf8");
var array = fileContent.split("---\n")
var array = fileContent.split("---\n");
var frontMatter = array[1];
var content = array[2];
@@ -57,7 +58,7 @@ async function main() {
var translatedContent = await convert(content, defaultLang, targetLang);
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
}
main();

View File

@@ -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,15 +7,13 @@ 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 => {
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');
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");
}
});
}
@@ -23,13 +21,12 @@ function createConfigs() {
async function convert(text, from, to) {
var options = {
from: from,
to: to
to: to,
};
var translated_text = await translate(text, options)
.catch(err => {
var translated_text = await translate(text, options).catch((err) => {
console.error(err);
});;
return translated_text && translated_text.text? translated_text.text : '';
});
return translated_text && translated_text.text ? translated_text.text : "";
}
async function processFrontMatter(block) {
@@ -39,12 +36,14 @@ async function processFrontMatter(block) {
if (array[i].indexOf(":") > -1) {
var elements = array[i].split(":");
var newElement = "";
if (elements[0] == "title" ||
if (
elements[0] == "title" ||
elements[0] == "description" ||
elements[0] == "summary" ||
elements[0] == "description" ||
elements[0] == "categories" ||
elements[0] == "tags") {
elements[0] == "tags"
) {
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
newElement = elements[0] + ": " + translatedElement;
} else {
@@ -59,14 +58,13 @@ async function processFrontMatter(block) {
}
async function processFile(filePath) {
console.log("translating", filePath)
console.log("translating", filePath);
if (filePath.indexOf("index.md") > -1) {
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 array = fileContent.split("---\n");
var frontMatter = array[1];
var content = array[2];
@@ -74,10 +72,8 @@ async function processFile(filePath) {
var translatedContent = await convert(content, defaultLang, targetLang);
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
} else
return
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
} else return;
}
async function processFolder(folderPath) {

View File

@@ -1,19 +1,19 @@
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) {
files.forEach((file) => {
console.log(file);
if (file.indexOf("languages.") > -1) {
var lang = file.split(".")[1];
console.log(lang)
if(lang != defaultLang) {
console.log(lang);
if (lang != defaultLang) {
targetLangs.push(lang);
}
}
@@ -22,25 +22,22 @@ function readConfigs() {
async function processFile(filePath, file) {
if (filePath.indexOf("index.md") > -1) {
console.log("processing", filePath);
console.log("processing", filePath)
for(var i in targetLangs) {
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)) {
if (fs.existsSync(targetFilePath)) {
console.log("file already exists", targetFilePath);
}else{
} else {
console.log("creating file", targetFilePath);
//fs.symlinkSync(file, targetFilePath, 'junction');
fs.copyFileSync(filePath, targetFilePath);
}
}
} else
return
} else return;
}
async function processFolder(folderPath) {

View File

@@ -26,7 +26,6 @@ article:
this_article: "Тази Статия"
related_articles: "Подобни"
author:
byline_title: "Автор"

View File

@@ -62,6 +62,5 @@ sharing:
shortcode:
recent_articles: "Neue Beiträge"
recent:
show_more: "Zeige Mehr"

View File

@@ -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"

View File

@@ -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 "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) }}

View File

@@ -1,7 +1,10 @@
<a href="{{ .Destination | safeURL }}"
<a
href="{{ .Destination | safeURL }}"
{{- with .Title -}}
title="{{ . }}"
{{- end }}
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }}
target="_blank"
{{ end }}>
{{- .Text | safeHTML -}}
</a>

View File

@@ -1,19 +1,27 @@
<!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
<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">&darr;</span>{{ i18n
"nav.skip_to_main" }}</a>
<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">&darr;</span>{{ i18n
"nav.skip_to_main"
}}</a
>
</div>
{{ $header := print "header/" .Site.Params.header.layout ".html" }}
{{ if templates.Exists ( printf "partials/%s" $header ) }}
@@ -33,10 +41,18 @@
{{- 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 }}
</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>

View File

@@ -1,7 +1,8 @@
{{ define "main" }}
{{ .Scratch.Set "scope" "single" }}
{{ .Scratch.Set "scope" "single" }}
<article>
<article>
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
{{ $heroStyle := .Params.heroStyle }}
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
@@ -13,6 +14,7 @@
{{ 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" . }}
@@ -71,30 +73,44 @@
</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 }}">
.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>
.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">
<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"
<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
@@ -136,23 +152,27 @@
{{ $translations := .AllTranslations }}
{{ with .File }}
{{ $path := .Path }}
{{range $translations}}
{{ range $translations }}
{{ $lang := print "." .Lang ".md" }}
{{ $path = replace $path $lang ".md" }}
{{end}}
{{ 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>
<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" />
<hr class="border-dotted border-neutral-300 dark:border-neutral-600">
<div class="pt-3">
{{ partial "comments.html" . }}
</div>
@@ -162,5 +182,5 @@
{{ end }}
{{ end }}
</footer>
</article>
</article>
{{ end }}

View File

@@ -1,17 +1,18 @@
{{ 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>
{{ $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 }}
@@ -28,13 +29,16 @@
</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>
<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) }}
@@ -53,7 +57,6 @@
{{ end }}
{{ end }}
</section>
{{ else if and $cardView (not $cardViewScreenWidth) }}
{{ if $groupByYear }}
@@ -78,7 +81,6 @@
{{ end }}
{{ end }}
</section>
{{ end }}
{{ else if and $cardView $cardViewScreenWidth }}
@@ -109,10 +111,9 @@
{{ end }}
</section>
</div>
{{ end }}
{{end}}
{{ end }}
{{ else }}
<section class="mt-10 prose dark:prose-invert">
@@ -124,4 +125,4 @@
{{ partial "pagination.html" . }}
{{ end }}
{{ end }}

View File

@@ -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) }}
@@ -30,17 +31,20 @@
</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>
<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>
{{ else }}
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
@@ -48,8 +52,6 @@
{{ partial "term-link/text.html" . }}
{{ end }}
</section>
{{ end }}
{{ end }}

View File

@@ -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>
<script
defer
src="https://cdn.usefathom.com/script.js"
data-site="{{ site.Params.fathomAnalytics.site }}"></script>
{{ end }}

View File

@@ -1,4 +1,6 @@
<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);}

View File

@@ -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" }}
{{ partial "analytics/seline.html" }}
{{ end }}

View File

@@ -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, {
seline.track("user:" + type + ":" + title, {
type: type,
title: title,
url: url
url: url,
});
});
</script>
</script>
{{ end }}

View File

@@ -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 }}"
<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>
{{ 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>
</script>
{{ end }}

View File

@@ -9,61 +9,61 @@
{{ 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)) }}
{{/* Gather partials for this context */}}
{{ $shouldShowDate := false }}
{{ if and (eq $scope "single") (.Params.showDateOnlyInArticle | default (.Site.Params.article.showDateOnlyInArticle | default false)) }}
{{ $shouldShowDate = true }}
{{ end }}
{{ end }}
{{/* showDate has higher priority than showDateOnlyInArticle */}}
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{/* showDate has higher priority than showDateOnlyInArticle */}}
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ $shouldShowDate = true }}
{{ else }}
{{ else }}
{{ $shouldShowDate = false }}
{{ end }}
{{ end }}
{{ if $shouldShowDate }}
{{ if $shouldShowDate }}
{{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }}
{{ end }}
{{ 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) }}
{{ 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 }}
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }}
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }}
{{ $meta.Add "partials" (slice (partial "meta/word-count.html" .)) }}
{{ end }}
{{ end }}
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0)
}}
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
{{ $meta.Add "partials" (slice (partial "meta/reading-time.html" .)) }}
{{ end }}
{{ end }}
{{ if and (not .Params.externalURL) (.Params.showViews | default (.Site.Params.article.showViews | default false)) }}
{{ if and (not .Params.externalURL) (.Params.showViews | default (.Site.Params.article.showViews | default false)) }}
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
{{ end }}
{{ end }}
{{ if and (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
{{ if and (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
{{ end }}
{{ end }}
{{ if and (eq $scope "single") (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
{{ 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 }}
{{ end }}
{{ if and (eq $scope "single") (.Params.showEdit | default (.Site.Params.article.showEdit | default false)) }}
{{ if and (eq $scope "single") (.Params.showEdit | default (.Site.Params.article.showEdit | default false)) }}
{{ $meta.Add "partials" (slice (partial "meta/edit.html" .)) }}
{{ end }}
{{ end }}
{{ if and (eq $scope "single") (.Params.showZenMode | default (.Site.Params.article.showZenMode | default false)) }}
{{ if and (eq $scope "single") (.Params.showZenMode | default (.Site.Params.article.showZenMode | default false)) }}
{{ $meta.Add "partials" (slice (partial "meta/zen-mode.html" .)) }}
{{ end }}
{{ end }}
<div class="flex flex-row flex-wrap items-center">
<div class="flex flex-row flex-wrap items-center">
{{/* Output partials */}}
{{ with ($meta.Get "partials") }}
{{ delimit . "<span class=\"px-2 text-primary-500\">&middot;</span>" | safeHTML }}
@@ -73,48 +73,53 @@
{{ 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>
</div>
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }}
<div class="flex flex-row flex-wrap items-center">
{{ 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 (eq $taxonomy "authors") }}
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
{{ range $i, $a := $context.GetTerms $taxonomy }}
{{ if not (eq $i 0) }} ,&nbsp; {{ end }} <div class="cursor-pointer" onclick="window.open({{ $a.RelPermalink }},'_self');return false;">{{ $a.LinkTitle }}</div>
{{ if not (eq $i 0) }},&nbsp;{{ end }}
<div class="cursor-pointer" onclick="window.open({{ $a.RelPermalink }},'_self');return false;">
{{ $a.LinkTitle }}
</div>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
{{/* Output taxonomies */}}
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
<div class="flex flex-row flex-wrap items-center">
{{/* 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 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;">
<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 }}
</div>
{{ end }}
{{/* Output only category */}}
{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
<div class="flex flex-row flex-wrap items-center">
{{/* 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 }}
</div>
{{ end }}
{{ end }}

View File

@@ -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.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 (.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 }}
{{ 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">
<div class="flex flex-row flex-wrap items-center">
{{/* Output partials */}}
{{ with ($meta.Get "partials") }}
{{ delimit . "<span class=\"px-2 text-primary-500\">&middot;</span>" | safeHTML}}
{{ delimit . "<span class=\"px-2 text-primary-500\">&middot;</span>" | safeHTML }}
{{ end }}
</div>
</div>
{{ end }}

View File

@@ -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.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 (.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 }}
{{ 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">
<div class="flex flex-row flex-wrap items-center">
{{/* Output partials */}}
{{ with ($meta.Get "partials") }}
{{ delimit . "<span class=\"px-2 text-primary-500\">&middot;</span>" | safeHTML}}
{{ delimit . "<span class=\"px-2 text-primary-500\">&middot;</span>" | safeHTML }}
{{ end }}
</div>
</div>
{{ end }}

View File

@@ -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.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 (.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 }}
{{ 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">
<div class="flex flex-row flex-wrap items-center">
{{/* Output partials */}}
{{ with ($meta.Get "partials") }}
{{ delimit . "<span class=\"px-2 text-primary-500\">&middot;</span>" | safeHTML}}
{{ delimit . "<span class=\"px-2 text-primary-500\">&middot;</span>" | safeHTML }}
{{ end }}
</div>
</div>
{{ end }}

View File

@@ -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 @@
>&rarr;</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">

View File

@@ -6,24 +6,32 @@
{{ 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 }}" />
<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 }}" />
<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
{{ if $link }}href="{{ $link }}"{{ end }}
class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
{{ . }}
</a>
{{ end }}
@@ -34,8 +42,14 @@
<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>
<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>

View File

@@ -11,15 +11,23 @@
{{ 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">

View File

@@ -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>

View File

@@ -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 }}

View File

@@ -5,11 +5,14 @@
<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 }}"
<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 }}>
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
{{ partial "icon.html" .Pre }}
</span>
{{ end }}
@@ -22,7 +25,6 @@
{{ 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">
@@ -43,7 +45,8 @@
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>` }}
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>`
}}
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
</p>
{{ end }}
@@ -57,10 +60,12 @@
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" . }}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,7 +1,9 @@
<li class="mt-1">
<a href="{{ .URL }}" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<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 }}>
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
{{ partial "icon.html" .Pre }}
</span>
{{ end }}
@@ -14,11 +16,17 @@
</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">
<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 }}>
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
{{ partial "icon.html" .Pre }}
</span>
{{ end }}
@@ -26,6 +34,6 @@
{{ .Name | markdownify }}
</p>
</a>
</li>
</li>
{{ end }}
<li class="mb-2"></li>

View File

@@ -1,8 +1,14 @@
<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">
<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 }}>
<div {{ if and .Pre .Name }}class="mr-2"{{ end }}>
{{ partial "icon.html" .Pre }}
</div>
{{ end }}

View File

@@ -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 }}>
<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,10 +24,14 @@
<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">
<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 }}>
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
{{ partial "icon.html" .Pre }}
</span>
{{ end }}

View File

@@ -1,7 +1,9 @@
<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">
<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 }}>
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
{{ partial "icon.html" .Pre }}
</span>
{{ end }}

View File

@@ -6,8 +6,8 @@
{{- 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 }}
@@ -21,13 +21,17 @@
{{ end -}}
{{- with $featured -}}
{{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg")}}
{{ 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>
<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>
<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 -}}

View File

@@ -6,8 +6,8 @@
{{- 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 }}
@@ -22,7 +22,7 @@
{{ $caption := "" }}
{{ if .Params.featureimagecaption }}
{{- $caption = .Params.featureimagecaption -}}
{{- $caption = .Params.featureimagecaption -}}
{{ end }}
{{- $alt := .Page.Title -}}
@@ -34,26 +34,42 @@
<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}}
<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 }}">
<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}}
<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 }}">
<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}}
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
{{ $caption | markdownify }}
</figcaption>
{{ end }}
</figure>
{{ end }}
{{ end }}

View File

@@ -18,8 +18,8 @@
{{- $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 -}}
@@ -37,50 +37,62 @@
{{ $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>
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg") }}
{{ with . }}
<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"
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">
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>
</div>{{ end }}
{{ end }}
{{ 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 }}

View File

@@ -21,13 +21,14 @@
{{ end }}
{{ end }}
{{ if $homepageImage }}
<img class="w-full h-[1000px] object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}" role="presentation">
<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>
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>
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">
@@ -42,8 +43,12 @@
{{ 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="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
@@ -59,9 +64,16 @@
<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>
<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>
@@ -77,8 +89,14 @@
{{ 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 }}

View File

@@ -30,7 +30,8 @@
{{ 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"
<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>

View File

@@ -25,16 +25,15 @@
<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>
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>
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">
<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:") }}
@@ -46,8 +45,12 @@
{{ 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 }}
{{ if not $disableHeroImageFilter }}
@@ -75,13 +78,27 @@
{{ 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>
<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>
<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 }}

View File

@@ -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,8 +15,12 @@
{{ 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">

View File

@@ -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>

View File

@@ -1,9 +1,14 @@
<span>
<button id="button_likes"
<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_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">&nbsp;Like</span>
</button>
</span>

View File

@@ -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>

View File

@@ -1,10 +1,15 @@
{{ $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"
<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" }}"

View File

@@ -7,7 +7,8 @@
href="{{ $.Paginator.Prev.URL }}"
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
rel="prev"
>&larr;</a>
>&larr;</a
>
</li>
{{ end }}
{{- range $.Paginator.Pagers -}}
@@ -28,7 +29,8 @@
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>
>{{ .PageNumber }}</a
>
</li>
{{- else if ($.Scratch.Get "paginator.shouldEllipse") -}}
<li class="page-item ">
@@ -42,7 +44,8 @@
href="{{ $.Paginator.Next.URL }}"
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
rel="next"
>&rarr;</a>
>&rarr;</a
>
</li>
{{ end }}
</ul>

View File

@@ -1,11 +1,12 @@
{{ $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 }}
.Site.Params.mainSections)).Pages
}}
{{ partial "article-link/card.html" . }}
{{ end }}
</section>

View File

@@ -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 }}
.Site.Params.mainSections)).Pages
}}
{{ partial "article-link/card.html" . }}
{{ end }}
</section>

View File

@@ -1,9 +1,9 @@
{{ $recentArticles := 5 }}
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
<section class="space-y-10 w-full">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages
}}
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages }}
{{ partial "article-link/simple.html" . }}
{{ end }}
</section>

View File

@@ -1,30 +1,30 @@
{{ $recentArticles := 5 }}
{{ $showMoreLinkDest := "/posts/" }}
{{ if .Site.Params.homepage.showRecent | default false }}
{{ if index .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>
{{ if index .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>
{{ if and .Site.Params.homepage.cardView (not .Site.Params.homepage.cardViewScreenWidth) | default false }}
{{ if and .Site.Params.homepage.cardView (not .Site.Params.homepage.cardViewScreenWidth) | default false }}
{{ partial "recent-articles/cardview.html" . }}
{{ else if and .Site.Params.homepage.cardView .Site.Params.homepage.cardViewScreenWidth | default false }}
{{ else if and .Site.Params.homepage.cardView .Site.Params.homepage.cardViewScreenWidth | default false }}
{{ partial "recent-articles/cardview-fullwidth.html" . }}
{{ else }}
{{ else }}
{{ partial "recent-articles/list.html" . }}
{{ end }}
{{ end }}
{{ 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 .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">
<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>
</a>
</div>
{{ end }}
</div>
{{ end }}
{{ end }}

View File

@@ -1,11 +1,11 @@
{{ if .Params.showRelatedContent | default (.Site.Params.article.showRelatedContent | default false)}}
{{ $related := .Site.RegularPages.Related . | first .Site.Params.article.relatedContentLimit }}
{{ with $related }}
<h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "article.related_articles" | emojify }}</h2>
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ if .Params.showRelatedContent | default (.Site.Params.article.showRelatedContent | default false) }}
{{ $related := .Site.RegularPages.Related . | first .Site.Params.article.relatedContentLimit }}
{{ with $related }}
<h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "article.related_articles" | emojify }}</h2>
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ range . }}
{{ partial "article-link/card-related.html" . }}
{{ end }}
</section>
{{ end }}
</section>
{{ end }}
{{ end }}

View File

@@ -1,7 +1,9 @@
<div id="top-scroller" class="pointer-events-none absolute top-[110vh] bottom-0 w-12 ltr:right-0 rtl:left-0">
<a href="#the-top"
<a
href="#the-top"
class="pointer-events-auto sticky top-[calc(100vh-5.5rem)] flex h-12 w-12 mb-16 items-center justify-center rounded-full bg-neutral/50 text-xl text-neutral-700 hover:text-primary-600 dark:bg-neutral-800/50 dark:text-neutral dark:hover:text-primary-400"
aria-label="{{ i18n "nav.scroll_to_top_title" }}" title="{{ i18n "nav.scroll_to_top_title" }}">
aria-label="{{ i18n "nav.scroll_to_top_title" }}"
title="{{ i18n "nav.scroll_to_top_title" }}">
&uarr;
</a>
</div>

View File

@@ -1,12 +1,10 @@
<div
id="search-wrapper"
class="invisible fixed inset-0 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm dark:bg-neutral-900/50 sm:p-6 md:p-[10vh] lg:p-[12vh] z-index-500"
data-url="{{ "" | absLangURL }}"
>
data-url="{{ "" | absLangURL }}">
<div
id="search-modal"
class="flex flex-col w-full max-w-3xl min-h-0 mx-auto border rounded-md shadow-lg top-20 border-neutral-200 bg-neutral dark:border-neutral-700 dark:bg-neutral-800"
>
class="flex flex-col w-full max-w-3xl min-h-0 mx-auto border rounded-md shadow-lg top-20 border-neutral-200 bg-neutral dark:border-neutral-700 dark:bg-neutral-800">
<header class="relative z-10 flex items-center justify-between flex-none px-2">
<form class="flex items-center flex-auto min-w-0">
<div class="flex items-center justify-center w-8 h-8 text-neutral-400">
@@ -17,14 +15,12 @@
id="search-query"
class="flex flex-auto h-12 mx-1 bg-transparent appearance-none focus:outline-dotted focus:outline-2 focus:outline-transparent"
placeholder="{{ i18n "search.input_placeholder" }}"
tabindex="0"
/>
tabindex="0">
</form>
<button
id="close-search-button"
class="flex items-center justify-center w-8 h-8 text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400"
title="{{ i18n "search.close_button_title" }}"
>
title="{{ i18n "search.close_button_title" }}">
{{ partial "icon.html" "xmark" }}
</button>
</header>

View File

@@ -1,5 +1,5 @@
{{ if .Params.series }}
<details class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 margin-left-[0px]">
<details class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 margin-left-[0px]">
{{ partial "series/series_base.html" . }}
</details>
{{end}}
</details>
{{ end }}

View File

@@ -1,6 +1,7 @@
{{ if .Params.series }}
<details class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 margin-left-[0px]" {{
if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<details
class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 margin-left-[0px]"
{{ if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }}open{{ end }}>
{{ partial "series/series_base.html" . }}
</details>
{{end}}
</details>
{{ end }}

View File

@@ -1,22 +1,25 @@
{{ if .Params.series }}
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
{{ index .Params.series 0 }} -
{{ i18n "article.part_of_series" }}
</summary>
{{ $seriesName := strings.ToLower (index .Params.series 0) }}
{{ range $post := sort (index .Site.Taxonomies.series $seriesName) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }}
{{ i18n "article.part" }} {{ $post.Params.series_order }}:
{{ i18n "article.this_article" }}
</div>
{{ else }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="{{$post.RelPermalink}}">
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
<a href="{{ $post.RelPermalink }}">
{{ i18n "article.part" }} {{ $post.Params.series_order }}:
{{ $post.Params.title }}
</a>
</div>
{{end}}
{{end}}
{{end}}
{{ end }}
{{ end }}
{{ end }}

View File

@@ -8,8 +8,7 @@
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="{{ printf .url $.Permalink $.Title }}"
title="{{ i18n .title }}"
aria-label="{{ i18n .title }}"
>
aria-label="{{ i18n .title }}">
{{ partial "icon.html" .icon }}
</a>
{{ end }}

View File

@@ -1,12 +1,12 @@
<a href="{{ .Page.RelPermalink }}" class="min-w-full">
<div
class="border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
{{- with site.Params.images -}}
{{- range first 6 . }}
<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
<meta property="og:image" content="{{ . | absURL }}">
{{ end -}}
{{- else -}}
{{- $images := .Page.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
@@ -23,32 +23,29 @@
{{ end }}
{{- else -}}
{{- with site.Params.images }}
<meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
<meta property="og:image" content="{{ index . 0 | absURL }}">
{{ end -}}
{{- end -}}
{{- end -}}
{{ if site.Params.taxonomy.showTermCount | default true }}
<span class="absolute bottom-0 right-0 m-2">
<span class="flex">
<span
class="rounded-md border border-primary-400 px-1 py-[1px] text-xl font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
>
class="rounded-md border border-primary-400 px-1 py-[1px] text-xl font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
{{ .Count }}
</span>
</span>
</span>
{{ end }}
<div class="px-6 py-4">
<div
class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
>{{ .Page.Title | emojify }}</div>
class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
{{ .Page.Title | emojify }}
</div>
<div class="px-6 pt-4 pb-2">
</div>
<div class="px-6 pt-4 pb-2"></div>
</div>
</a>

View File

@@ -12,4 +12,4 @@
</span>
{{ end }}
</h2>
</article>
</article>

View File

@@ -1,4 +1,7 @@
<details open id="TOCView" class="toc-right mt-0 overflow-y-auto overscroll-contain scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600 rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 hidden lg:block">
<details
open
id="TOCView"
class="toc-right mt-0 overflow-y-auto overscroll-contain scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600 rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 hidden lg:block">
<summary
class="block py-1 text-lg font-semibold cursor-pointer bg-neutral-100 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-neutral-700 dark:text-neutral-100 lg:hidden">
{{ i18n "article.table_of_contents" }}

View File

@@ -1,10 +1,12 @@
{{ if .IsTranslated }}
<div>
<div>
<div class="cursor-pointer flex items-center nested-menu">
<span class="ltr:mr-1 rtl:ml-1">
{{ partial "icon.html" "language" }}
</span>
<div class="text-sm font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
<div
class="text-sm font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"
title="{{ .Title }}">
{{- i18n "global.language" | markdownify -}}
</div>
</div>
@@ -13,7 +15,9 @@
<div class="flex flex-col space-y-3">
{{ range .AllTranslations }}
<a href="{{ .RelPermalink }}" class="flex items-center">
<p class="text-sm font-sm text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
<p
class="text-sm font-sm text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"
title="{{ .Title }}">
{{ .Language.Params.displayName | emojify }}
</p>
</a>
@@ -21,5 +25,5 @@
</div>
</div>
</div>
</div>
</div>
{{ end }}

View File

@@ -12,42 +12,51 @@
defer
type="text/javascript"
src="{{ $mermaidJS.RelPermalink }}"
integrity="{{ $mermaidJS.Data.Integrity }}"
></script>
integrity="{{ $mermaidJS.Data.Integrity }}"></script>
{{ end }}
{{/* Chart */}}
{{ if .Page.HasShortcode "chart" }}
{{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script defer type="text/javascript" src="{{ $chartJS.RelPermalink }}"
{{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script
defer
type="text/javascript"
src="{{ $chartJS.RelPermalink }}"
integrity="{{ $chartJS.Data.Integrity }}"></script>
{{ end }}
{{/* Katex */}}
{{ if .Page.HasShortcode "katex" }}
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<link type="text/css" rel="stylesheet" href="{{ $katexCSS.RelPermalink }}" integrity="{{ $katexCSS.Data.Integrity }}" />
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}"
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<link
type="text/css"
rel="stylesheet"
href="{{ $katexCSS.RelPermalink }}"
integrity="{{ $katexCSS.Data.Integrity }}">
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script
defer
src="{{ $katexRenderJS.RelPermalink }}"
integrity="{{ $katexRenderJS.Data.Integrity }}"
onload="renderMathInElement(document.body);"></script>
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }}
<!-- {{ .RelPermalink }} -->
{{ end }}
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }}
<!-- {{ .RelPermalink }} -->
{{ end }}
{{ end }}
{{/* TypeIt */}}
{{ if .Page.HasShortcode "typeit" }}
{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script defer src="{{ $typeitLib.RelPermalink }}" integrity="{{ $typeitLib.Data.Integrity }}"></script>
{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script defer src="{{ $typeitLib.RelPermalink }}" integrity="{{ $typeitLib.Data.Integrity }}"></script>
{{ end }}
{{/* Packery */}}
@@ -57,19 +66,28 @@
{{ $jsShortcodeGallery := resources.Get "js/shortcodes/gallery.js" }}
{{ $jsShortcodeGallery = $jsShortcodeGallery | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script type="text/javascript" src="{{ $jsShortcodeGallery.RelPermalink }}" integrity="{{ $jsShortcodeGallery.Data.Integrity }}"></script>
<script
type="text/javascript"
src="{{ $jsShortcodeGallery.RelPermalink }}"
integrity="{{ $jsShortcodeGallery.Data.Integrity }}"></script>
{{ end }}
{{/* tw-elements */}}
{{ if or (.Page.HasShortcode "carousel") (.Page.HasShortcode "timeline")}}
{{ $twelementsLib := resources.Get "lib/tw-elements/index.min.js" }}
<script defer src="{{ $twelementsLib.RelPermalink }}" integrity="{{ $twelementsLib.Data.Integrity }}"></script>
{{ if or (.Page.HasShortcode "carousel") (.Page.HasShortcode "timeline") }}
{{ $twelementsLib := resources.Get "lib/tw-elements/index.min.js" }}
<script
defer
src="{{ $twelementsLib.RelPermalink }}"
integrity="{{ $twelementsLib.Data.Integrity }}"></script>
{{ end }}
{{/* youtubeLite */}}
{{ if .Page.HasShortcode "youtubeLite" }}
{{ $youtubeLiteJS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
{{ $youtubeLiteCSS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.css" }}
<link rel="stylesheet" href="{{ $youtubeLiteCSS.RelPermalink }}" integrity="{{ $youtubeLiteCSS.Data.Integrity }}"/>
<script src="{{ $youtubeLiteJS.RelPermalink }}" integrity="{{ $youtubeLiteJS.Data.Integrity }}"></script>
{{ $youtubeLiteJS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
{{ $youtubeLiteCSS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.css" }}
<link
rel="stylesheet"
href="{{ $youtubeLiteCSS.RelPermalink }}"
integrity="{{ $youtubeLiteCSS.Data.Integrity }}">
<script src="{{ $youtubeLiteJS.RelPermalink }}" integrity="{{ $youtubeLiteJS.Data.Integrity }}"></script>
{{ end }}

View File

@@ -12,18 +12,16 @@
{{ if not ($.Scratch.Get "cardColor") }}
class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900"
{{ else }}
class="flex px-4 py-3 rounded-md"
style="background-color: {{ $.Scratch.Get "cardColor" }}"
{{ end }}>
class="flex px-4 py-3 rounded-md" style="background-color: {{ $.Scratch.Get "cardColor" }}"
{{ end }}
>
<span
{{ if not ($.Scratch.Get "iconColor") }}
class="text-primary-400 ltr:pr-3 rtl:pl-3 flex items-center"
{{ else }}
class="ltr:pr-3 rtl:pl-3 flex items-center"
style="color: {{ $.Scratch.Get "iconColor" }}"
{{ end }}>
class="ltr:pr-3 rtl:pl-3 flex items-center" style="color: {{ $.Scratch.Get "iconColor" }}"
{{ end }}
>
{{ partial "icon.html" ($.Scratch.Get "icon") }}
</span>
@@ -32,8 +30,8 @@
class="dark:text-neutral-300"
{{ else }}
style="color: {{ $.Scratch.Get "textColor" }}"
{{ end }}>
{{ end }}
>
{{- .Inner | markdownify -}}
</span>
</div>

View File

@@ -3,7 +3,6 @@
{{ with .Get "href" }}href="{{ . }}"{{ end }}
{{ with .Get "target" }}target="{{ . }}"{{ end }}
{{ with .Get "rel" }}rel="{{ . }}"{{ end }}
role="button"
>
role="button">
{{ .Inner }}
</a>

View File

@@ -7,7 +7,7 @@
{{ $imagesTemp = strings.TrimPrefix "{" $imagesTemp }}
{{ $imagesTemp = strings.TrimSuffix "}" $imagesTemp }}
{{ $imagesTemp := strings.Split $imagesTemp "," }}
{{ $images := slice}}
{{ $images := slice }}
{{ range $imagesTemp }}
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
{{ $images = $images | append (resources.GetRemote .) }}
@@ -16,14 +16,18 @@
{{ end }}
{{ end }}
<div id="{{ $id }}" class="relative" data-twe-carousel-init data-twe-ride="carousel">
<div class="absolute right-0 bottom-0 left-0 z-[2] mx-[15%] mb-10 flex list-none justify-center p-0"
data-twe-carousel-indicators>
<div id="{{ $id }}" class="relative" data-twe-carousel-init data-twe-ride="carousel">
<div
class="absolute right-0 bottom-0 left-0 z-[2] mx-[15%] mb-10 flex list-none justify-center p-0"
data-twe-carousel-indicators>
{{ $num := 0 }}
{{ range $images }}
<button type="button" data-twe-target="#{{ $id }}" data-twe-slide-to="{{ $num }}" {{ if eq $num 0 }} data-twe-carousel-active aria-current="true" {{ end }}
<button
type="button"
data-twe-target="#{{ $id }}"
data-twe-slide-to="{{ $num }}"
{{ if eq $num 0 }}data-twe-carousel-active aria-current="true"{{ end }}
class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-neutral bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
aria-label="Slide {{ $num }}"></button>
@@ -32,14 +36,19 @@
</div>
<div class="relative w-full overflow-hidden after:clear-both after:block after:content-['']">
{{ $num := 0 }}
{{ range $images }}
<div class="relative float-left -mr-[100%] {{ if not (eq $num 0) }} hidden {{ end }} w-full transition-transform duration-[{{ $interval }}ms] ease-in-out motion-reduce:transition-none"
data-twe-carousel-item {{ if eq $num 0 }} data-twe-carousel-active {{ end }}>
<div
class="relative float-left -mr-[100%] {{ if not (eq $num 0) }}
hidden
{{ end }} w-full transition-transform duration-[{{ $interval }}ms] ease-in-out motion-reduce:transition-none"
data-twe-carousel-item
{{ if eq $num 0 }}data-twe-carousel-active{{ end }}>
<div class="ratio-{{ $aspect }} single_hero_background">
<img src="{{ .RelPermalink }}" class="block absolute top-0 object-cover w-full h-full nozoom" alt="carousel image {{$num}}"/>
<img
src="{{ .RelPermalink }}"
class="block absolute top-0 object-cover w-full h-full nozoom"
alt="carousel image {{ $num }}">
</div>
</div>
@@ -49,26 +58,44 @@
</div>
<button
class="absolute top-0 bottom-0 left-0 z-[2] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
type="button" data-twe-target="#{{ $id }}" data-twe-slide="prev">
type="button"
data-twe-target="#{{ $id }}"
data-twe-slide="prev">
<span class="inline-block h-8 w-8">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4.5"
stroke="currentColor" class="h-6 w-6">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="4.5"
stroke="currentColor"
class="h-6 w-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />
</svg>
</span>
<span
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]">Previous</span>
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
>Previous</span
>
</button>
<button
class="absolute top-0 bottom-0 right-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
type="button" data-twe-target="#{{ $id }}" data-twe-slide="next">
type="button"
data-twe-target="#{{ $id }}"
data-twe-slide="next">
<span class="inline-block h-8 w-8">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4.5"
stroke="currentColor" class="h-6 w-6">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="4.5"
stroke="currentColor"
class="h-6 w-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
</svg>
</span>
<span
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]">Nextsads</span>
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
>Nextsads</span
>
</button>
</div>

View File

@@ -3,12 +3,10 @@
{{- $codebergData := resources.GetRemote $codebergURL | transform.Unmarshal -}}
{{- $codebergColors := .Site.Data.codebergColors -}}
{{- with $codebergData -}}
<div class="codeberg-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div class="codeberg-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
<div class="flex items-center">
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
{{ partial "icon.html" "codeberg" }}
@@ -25,11 +23,15 @@
</p>
<div class="m-0 mt-2 flex items-center">
<span class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }} {{- index $codebergColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
<span
class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }}
{{- index $codebergColors .language -}}
{{ else }}
#0077b6
{{ end }}"></span>
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ if .language }} {{ .language }} {{ else }} null {{ end }}
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
</div>
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
@@ -45,13 +47,16 @@
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .forks_count }}
</div>
</div>
</div>
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $codebergURL }}" data-repo-id="{{ $id }}"></script>
</a>
</div>
<script
type="text/javascript"
src="{{ $fetchRepo.RelPermalink }}"
integrity="{{ $fetchRepo.Data.Integrity }}"
data-repo-url="{{ $codebergURL }}"
data-repo-id="{{ $id }}"></script>
</a>
</div>
{{- end -}}

View File

@@ -3,12 +3,10 @@
{{- $forgejoData := resources.GetRemote $forgejoURL | transform.Unmarshal -}}
{{- $forgejoColors := .Site.Data.forgejoColors -}}
{{- with $forgejoData -}}
<div class="forgejo-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div class="forgejo-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
<div class="flex items-center">
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
{{ partial "icon.html" "forgejo" }}
@@ -25,11 +23,15 @@
</p>
<div class="m-0 mt-2 flex items-center">
<span class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }} {{- index $forgejoColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
<span
class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }}
{{- index $forgejoColors .language -}}
{{ else }}
#0077b6
{{ end }}"></span>
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ if .language }} {{ .language }} {{ else }} null {{ end }}
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
</div>
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
@@ -45,13 +47,16 @@
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .forks_count }}
</div>
</div>
</div>
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $forgejoURL }}" data-repo-id="{{ $id }}"></script>
</a>
</div>
<script
type="text/javascript"
src="{{ $fetchRepo.RelPermalink }}"
integrity="{{ $fetchRepo.Data.Integrity }}"
data-repo-url="{{ $forgejoURL }}"
data-repo-id="{{ $id }}"></script>
</a>
</div>
{{- end -}}

View File

@@ -1,8 +1,10 @@
{{ $id := delimit (slice "gallery" (partial "functions/uid.html" .)) "-" -}}
<div id="{{- $id -}}" class="gallery">
{{ $page := .Page -}}
<!-- find all img tags -->
{{ $imgTagRegex := `<img\s+[^>]*>` -}}
{{ $imgTags := findRE $imgTagRegex .Inner -}}
@@ -24,7 +26,8 @@
{{ if $isExternalURL -}}
{{ with resources.GetRemote $src -}}{{ $finalSrc = .RelPermalink -}}{{ end -}}
{{ else -}}
{{ with $page.Resources.GetMatch $src -}}{{ $finalSrc = .RelPermalink -}}
{{ with $page.Resources.GetMatch $src -}}
{{ $finalSrc = .RelPermalink -}}
{{ else -}}
{{ with resources.GetMatch $src -}}{{ $finalSrc = .RelPermalink }}{{ end -}}
{{ end -}}

View File

@@ -1 +1,3 @@
<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{if len .Params | eq 3 }} ?file={{ index .Params 2 }}{{end}}"></script>
<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{ if len .Params | eq 3 }}
?file={{ index .Params 2 }}
{{ end }}"></script>

View File

@@ -3,12 +3,10 @@
{{- $giteaData := resources.GetRemote $giteaURL | transform.Unmarshal -}}
{{- $giteaColors := .Site.Data.giteaColors -}}
{{- with $giteaData -}}
<div class="gitea-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div class="gitea-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
<div class="flex items-center">
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
{{ partial "icon.html" "gitea" }}
@@ -25,11 +23,15 @@
</p>
<div class="m-0 mt-2 flex items-center">
<span class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }} {{- index $giteaColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
<span
class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }}
{{- index $giteaColors .language -}}
{{ else }}
#0077b6
{{ end }}"></span>
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ if .language }} {{ .language }} {{ else }} null {{ end }}
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
</div>
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
@@ -45,13 +47,16 @@
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .forks_count }}
</div>
</div>
</div>
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $giteaURL }}" data-repo-id="{{ $id }}"></script>
</a>
</div>
<script
type="text/javascript"
src="{{ $fetchRepo.RelPermalink }}"
integrity="{{ $fetchRepo.Data.Integrity }}"
data-repo-url="{{ $giteaURL }}"
data-repo-id="{{ $id }}"></script>
</a>
</div>
{{- end -}}

View File

@@ -7,30 +7,27 @@
<div class="github-card-wrapper">
{{- with $githubData -}}
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div
class="w-full md:w-auto p-0 m-0 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
{{- if $showThumbnail -}}
<div class="w-full nozoom">
<img src="{{ $githubThumbnailURL }}" alt="GitHub Repository Thumbnail"
<img
src="{{ $githubThumbnailURL }}"
alt="GitHub Repository Thumbnail"
class="nozoom mt-0 mb-0 w-full h-full object-cover">
</div>
{{- end -}}
<div
class="w-full md:w-auto pt-3 p-5">
<div class="w-full md:w-auto pt-3 p-5">
<div class="flex items-center">
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
{{ partial "icon.html" "github" }}
</span>
<div id="{{ $id }}-full_name"
<div
id="{{ $id }}-full_name"
class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
{{ .full_name | markdownify }}
</div>
@@ -41,11 +38,15 @@
</p>
<div class="m-0 mt-2 flex items-center">
<span class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }} {{- index $githubColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
<span
class="mr-1 inline-block h-3 w-3 rounded-full"
style="background-color: {{ if .language }}
{{- index $githubColors .language -}}
{{ else }}
#0077b6
{{ end }}"></span>
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ if .language }} {{ .language }} {{ else }} null {{ end }}
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
</div>
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
@@ -61,13 +62,17 @@
<div id="{{ $id }}-forks" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .forks }}
</div>
</div>
</div>
</div>
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $githubURL }}" data-repo-id="{{ $id }}"></script>
<script
type="text/javascript"
src="{{ $fetchRepo.RelPermalink }}"
integrity="{{ $fetchRepo.Data.Integrity }}"
data-repo-url="{{ $githubURL }}"
data-repo-id="{{ $id }}"></script>
</a>
{{- end -}}

View File

@@ -3,16 +3,17 @@
{{- $gitLabData := resources.GetRemote $gitlabURL | transform.Unmarshal -}}
{{- with $gitLabData -}}
<div class="gitlab-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">
<div class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
<div class="gitlab-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">
<div
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
<div class="flex items-center">
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
{{ partial "icon.html" "gitlab" }}
</span>
<div id="{{ $id }}-name_with_namespace" class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
<div
id="{{ $id }}-name_with_namespace"
class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
{{ .name_with_namespace | markdownify }}
</div>
</div>
@@ -35,13 +36,16 @@
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
{{ .forks_count }}
</div>
</div>
</div>
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $gitlabURL }}" data-repo-id="{{ $id }}"></script>
</a>
</div>
<script
type="text/javascript"
src="{{ $fetchRepo.RelPermalink }}"
integrity="{{ $fetchRepo.Data.Integrity }}"
data-repo-url="{{ $gitlabURL }}"
data-repo-id="{{ $id }}"></script>
</a>
</div>
{{- end -}}

Some files were not shown because too many files have changed in this diff Show More