mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
pretty run
This commit is contained in:
10
.github/workflows/greetings.yml
vendored
10
.github/workflows/greetings.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Thanks for contributing to Blowfish"
|
||||
pr-message: "Thanks for contributing to Blowfish"
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Thanks for contributing to Blowfish"
|
||||
pr-message: "Thanks for contributing to Blowfish"
|
||||
|
||||
11
.github/workflows/hugo-version-update.yml
vendored
11
.github/workflows/hugo-version-update.yml
vendored
@@ -2,7 +2,7 @@ name: Update Hugo version
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *'
|
||||
- cron: "0 6 * * *"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -10,13 +10,12 @@ jobs:
|
||||
updateBlowfish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: dev
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
|
||||
- name: Fetch release version
|
||||
id: fetch-release
|
||||
@@ -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
|
||||
|
||||
28
.github/workflows/stale.yml
vendored
28
.github/workflows/stale.yml
vendored
@@ -7,26 +7,28 @@ name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
- cron: "0 1 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue will be closed since it has been stale for 60 days.'
|
||||
stale-pr-message: 'This pull request will be closed since it has been stale for 60 days.'
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
days-before-stale: 60
|
||||
days-before-close: 0
|
||||
remove-stale-when-updated: true
|
||||
operations-per-run: 100
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message:
|
||||
"This issue will be closed since it has been stale for 60 days."
|
||||
stale-pr-message:
|
||||
"This pull request will be closed since it has been stale for 60
|
||||
days."
|
||||
stale-issue-label: "no-issue-activity"
|
||||
stale-pr-label: "no-pr-activity"
|
||||
days-before-stale: 60
|
||||
days-before-close: 0
|
||||
remove-stale-when-updated: true
|
||||
operations-per-run: 100
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -22,4 +22,6 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
working-directory: ./exampleSite
|
||||
run: hugo --minify --themesDir ../.. --baseURL https://nunocoracao.github.io/blowfish/
|
||||
run:
|
||||
hugo --minify --themesDir ../.. --baseURL
|
||||
https://nunocoracao.github.io/blowfish/
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
github: [nunocoracao]
|
||||
custom: ["https://www.paypal.me/nunocoracao", "https://www.buymeacoffee.com/nunocoracao"]
|
||||
custom:
|
||||
[
|
||||
"https://www.paypal.me/nunocoracao",
|
||||
"https://www.buymeacoffee.com/nunocoracao",
|
||||
]
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
#zen-mode-button {
|
||||
cursor:pointer
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.zen-mode {
|
||||
position: relative;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body.zen-mode-enable {
|
||||
#bmc-wbtn, .author {
|
||||
display:none !important;
|
||||
}
|
||||
#bmc-wbtn,
|
||||
.author {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
|
||||
|
||||
@import './components/zen-mode.css';
|
||||
@import "./components/zen-mode.css";
|
||||
|
||||
@import "tailwindcss";
|
||||
@config "../../tailwind.config.js";
|
||||
@@ -38,13 +38,13 @@ button,
|
||||
@apply rtl:pr-4 rtl:border-l-0 rtl:border-r-4;
|
||||
}
|
||||
|
||||
.prose ul>li,
|
||||
.prose ol>li {
|
||||
.prose ul > li,
|
||||
.prose ol > li {
|
||||
@apply rtl:pl-0 rtl:pr-2 rtl:mr-7;
|
||||
}
|
||||
|
||||
.prose ol>li:before,
|
||||
.prose ul>li:before {
|
||||
.prose ol > li:before,
|
||||
.prose ul > li:before {
|
||||
@apply rtl:left-auto rtl:right-1;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ button,
|
||||
}
|
||||
|
||||
/* Adjust first child within prose */
|
||||
.prose div.min-w-0.max-w-prose>*:first-child {
|
||||
.prose div.min-w-0.max-w-prose > *:first-child {
|
||||
@apply mt-3;
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ button,
|
||||
}
|
||||
|
||||
#TOCView {
|
||||
max-height: calc(100vh - 150px);
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
max-height: calc(100vh - 150px);
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.toc ul,
|
||||
@@ -87,7 +87,7 @@ button,
|
||||
@apply font-normal text-neutral-700 dark:text-neutral-400;
|
||||
}
|
||||
|
||||
.toc ul>li {
|
||||
.toc ul > li {
|
||||
@apply rtl:mr-0;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ button,
|
||||
@apply relative z-0;
|
||||
}
|
||||
|
||||
.highlight:hover>.copy-button {
|
||||
.highlight:hover > .copy-button {
|
||||
@apply visible;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,9 @@ button,
|
||||
}
|
||||
|
||||
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
|
||||
.katex-display { overflow: auto hidden }
|
||||
.katex-display {
|
||||
overflow: auto hidden;
|
||||
}
|
||||
|
||||
/* Fix katex overflow https://github.com/nunocoracao/blowfish/issues/2138 */
|
||||
.katex-display {
|
||||
@@ -132,21 +134,21 @@ button,
|
||||
|
||||
/* Fix long tables breaking out of article on mobile */
|
||||
table {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Fix long inline code sections breaking out of article on mobile */
|
||||
code {
|
||||
word-wrap: break-word; /* All browsers since IE 5.5+ */
|
||||
overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
|
||||
word-wrap: break-word; /* All browsers since IE 5.5+ */
|
||||
overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
|
||||
}
|
||||
|
||||
/* Fix long URLs breaking out of article bounds on mobile */
|
||||
a {
|
||||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* -- Chroma Highlight -- */
|
||||
@@ -156,7 +158,7 @@ a {
|
||||
}
|
||||
|
||||
.prose-invert .highlight pre > code {
|
||||
background-color: unset;
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
/* LineTableTD */
|
||||
@@ -388,36 +390,36 @@ pre {
|
||||
.thumbnail {
|
||||
min-width: 300px;
|
||||
height: 180px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.thumbnail_card {
|
||||
height: 200px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.thumbnail_card_related {
|
||||
height: 150px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.thumbnail_card_term {
|
||||
height: 150px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.single_hero_basic {
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.single_hero_round {
|
||||
@@ -426,9 +428,9 @@ pre {
|
||||
}
|
||||
|
||||
.single_hero_background {
|
||||
background-repeat:no-repeat;
|
||||
background-size:cover;
|
||||
background-position:center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
width: calc(100% + 40px);
|
||||
z-index: -10;
|
||||
margin-left: -20px;
|
||||
@@ -452,47 +454,48 @@ pre {
|
||||
}
|
||||
|
||||
.center-relative-left {
|
||||
left: calc(max(-50vw,-800px) + 50%);
|
||||
left: calc(max(-50vw, -800px) + 50%);
|
||||
}
|
||||
|
||||
.margin-0 {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.margin-top-\[-15px\] {
|
||||
margin-top: -15px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
.margin-top-\[0\.5rem\]{
|
||||
margin-top: 0.5rem;
|
||||
.margin-top-\[0\.5rem\] {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
.margin-right-\[10px\] {
|
||||
margin-right: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.margin-left-\[0px\] {
|
||||
margin-left: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.padding-main-menu {
|
||||
padding: 2px 0 3px 0
|
||||
padding: 2px 0 3px 0;
|
||||
}
|
||||
.padding-top-\[5px\] {
|
||||
padding-top: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.z-index-\[-10\] {
|
||||
z-index: -10;
|
||||
z-index: -10;
|
||||
}
|
||||
.z-index-80 {
|
||||
z-index: 80;
|
||||
z-index: 80;
|
||||
}
|
||||
.z-index-100 {
|
||||
z-index: 100;
|
||||
z-index: 100;
|
||||
}
|
||||
.z-index-500 {
|
||||
z-index: 500;
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
/* Offset scroll position to avoid header overlap */
|
||||
[id^="fn"], [id^="fnref"] {
|
||||
[id^="fn"],
|
||||
[id^="fnref"] {
|
||||
scroll-margin-top: 145px;
|
||||
}
|
||||
|
||||
@@ -524,19 +527,25 @@ pre {
|
||||
.nested-menu:hover + .menuhide {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.menuhide:hover {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.menuhide {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@@ -547,179 +556,593 @@ pre {
|
||||
}
|
||||
|
||||
/* Gallery Specific Styles */
|
||||
.grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
@screen sm {
|
||||
.sm\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.md\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
.lg\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen xl {
|
||||
.xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen 2xl {
|
||||
.2xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Carousel Specific Styles */
|
||||
.ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
|
||||
@screen sm {
|
||||
.sm\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.sm\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.sm\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.sm\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.sm\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.sm\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.md\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.md\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.md\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.md\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.md\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.md\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
.lg\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.lg\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.lg\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.lg\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.lg\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.lg\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen xl {
|
||||
.xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.xl\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.xl\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.xl\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen 2xl {
|
||||
.2xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.2xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.2xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.2xl\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.2xl\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.2xl\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 214,251,252;
|
||||
--color-neutral-200: 142,245,247;
|
||||
--color-neutral-300: 70,239,243;
|
||||
--color-neutral-400: 15,217,222;
|
||||
--color-neutral-500: 10,147,150;
|
||||
--color-neutral-600: 7,110,112;
|
||||
--color-neutral-700: 5,72,74;
|
||||
--color-neutral-800: 2,35,35;
|
||||
--color-neutral-900: 0,0,0;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 255,240,212;
|
||||
--color-primary-300: 255,213,136;
|
||||
--color-primary-400: 255,187,59;
|
||||
--color-primary-500: 238,155,0;
|
||||
--color-primary-600: 197,128,0;
|
||||
--color-primary-700: 156,102,0;
|
||||
--color-primary-800: 116,75,0;
|
||||
--color-primary-900: 75,49,0;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,246,241;
|
||||
--color-secondary-200: 254,194,166;
|
||||
--color-secondary-300: 252,142,91;
|
||||
--color-secondary-400: 251,91,15;
|
||||
--color-secondary-500: 187,62,3;
|
||||
--color-secondary-600: 147,49,2;
|
||||
--color-secondary-700: 107,35,2;
|
||||
--color-secondary-800: 67,22,1;
|
||||
--color-secondary-900: 26,9,0;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 214, 251, 252;
|
||||
--color-neutral-200: 142, 245, 247;
|
||||
--color-neutral-300: 70, 239, 243;
|
||||
--color-neutral-400: 15, 217, 222;
|
||||
--color-neutral-500: 10, 147, 150;
|
||||
--color-neutral-600: 7, 110, 112;
|
||||
--color-neutral-700: 5, 72, 74;
|
||||
--color-neutral-800: 2, 35, 35;
|
||||
--color-neutral-900: 0, 0, 0;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 255, 240, 212;
|
||||
--color-primary-300: 255, 213, 136;
|
||||
--color-primary-400: 255, 187, 59;
|
||||
--color-primary-500: 238, 155, 0;
|
||||
--color-primary-600: 197, 128, 0;
|
||||
--color-primary-700: 156, 102, 0;
|
||||
--color-primary-800: 116, 75, 0;
|
||||
--color-primary-900: 75, 49, 0;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 246, 241;
|
||||
--color-secondary-200: 254, 194, 166;
|
||||
--color-secondary-300: 252, 142, 91;
|
||||
--color-secondary-400: 251, 91, 15;
|
||||
--color-secondary-500: 187, 62, 3;
|
||||
--color-secondary-600: 147, 49, 2;
|
||||
--color-secondary-700: 107, 35, 2;
|
||||
--color-secondary-800: 67, 22, 1;
|
||||
--color-secondary-900: 26, 9, 0;
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 254,197,207;
|
||||
--color-neutral-200: 253,121,144;
|
||||
--color-neutral-300: 251,46,82;
|
||||
--color-neutral-400: 217,4,41;
|
||||
--color-neutral-500: 177,3,33;
|
||||
--color-neutral-600: 137,3,26;
|
||||
--color-neutral-700: 97,2,18;
|
||||
--color-neutral-800: 57,1,11;
|
||||
--color-neutral-900: 17,0,3;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 230,233,238;
|
||||
--color-primary-300: 186,193,206;
|
||||
--color-primary-400: 141,153,174;
|
||||
--color-primary-500: 117,132,157;
|
||||
--color-primary-600: 97,111,136;
|
||||
--color-primary-700: 80,92,113;
|
||||
--color-primary-800: 63,72,89;
|
||||
--color-primary-900: 46,53,65;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 217,230,238;
|
||||
--color-secondary-200: 164,195,215;
|
||||
--color-secondary-300: 111,160,192;
|
||||
--color-secondary-400: 69,123,157;
|
||||
--color-secondary-500: 57,101,129;
|
||||
--color-secondary-600: 44,79,100;
|
||||
--color-secondary-700: 32,56,72;
|
||||
--color-secondary-800: 19,34,44;
|
||||
--color-secondary-900: 7,12,15;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 254, 197, 207;
|
||||
--color-neutral-200: 253, 121, 144;
|
||||
--color-neutral-300: 251, 46, 82;
|
||||
--color-neutral-400: 217, 4, 41;
|
||||
--color-neutral-500: 177, 3, 33;
|
||||
--color-neutral-600: 137, 3, 26;
|
||||
--color-neutral-700: 97, 2, 18;
|
||||
--color-neutral-800: 57, 1, 11;
|
||||
--color-neutral-900: 17, 0, 3;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 230, 233, 238;
|
||||
--color-primary-300: 186, 193, 206;
|
||||
--color-primary-400: 141, 153, 174;
|
||||
--color-primary-500: 117, 132, 157;
|
||||
--color-primary-600: 97, 111, 136;
|
||||
--color-primary-700: 80, 92, 113;
|
||||
--color-primary-800: 63, 72, 89;
|
||||
--color-primary-900: 46, 53, 65;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 217, 230, 238;
|
||||
--color-secondary-200: 164, 195, 215;
|
||||
--color-secondary-300: 111, 160, 192;
|
||||
--color-secondary-400: 69, 123, 157;
|
||||
--color-secondary-500: 57, 101, 129;
|
||||
--color-secondary-600: 44, 79, 100;
|
||||
--color-secondary-700: 32, 56, 72;
|
||||
--color-secondary-800: 19, 34, 44;
|
||||
--color-secondary-900: 7, 12, 15;
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 232,238,237;
|
||||
--color-neutral-200: 188,206,203;
|
||||
--color-neutral-300: 143,174,170;
|
||||
--color-neutral-400: 101,140,134;
|
||||
--color-neutral-500: 84,116,111;
|
||||
--color-neutral-600: 67,93,89;
|
||||
--color-neutral-700: 50,69,66;
|
||||
--color-neutral-800: 33,45,43;
|
||||
--color-neutral-900: 16,21,21;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 205,252,247;
|
||||
--color-primary-300: 132,249,235;
|
||||
--color-primary-400: 59,245,223;
|
||||
--color-primary-500: 20,243,217;
|
||||
--color-primary-600: 11,212,188;
|
||||
--color-primary-700: 9,173,153;
|
||||
--color-primary-800: 7,134,119;
|
||||
--color-primary-900: 5,95,84;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 194,253,219;
|
||||
--color-secondary-200: 120,251,175;
|
||||
--color-secondary-300: 45,249,130;
|
||||
--color-secondary-400: 6,212,92;
|
||||
--color-secondary-500: 5,172,75;
|
||||
--color-secondary-600: 4,133,58;
|
||||
--color-secondary-700: 3,93,40;
|
||||
--color-secondary-800: 2,53,23;
|
||||
--color-secondary-900: 0,14,6;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 232, 238, 237;
|
||||
--color-neutral-200: 188, 206, 203;
|
||||
--color-neutral-300: 143, 174, 170;
|
||||
--color-neutral-400: 101, 140, 134;
|
||||
--color-neutral-500: 84, 116, 111;
|
||||
--color-neutral-600: 67, 93, 89;
|
||||
--color-neutral-700: 50, 69, 66;
|
||||
--color-neutral-800: 33, 45, 43;
|
||||
--color-neutral-900: 16, 21, 21;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 205, 252, 247;
|
||||
--color-primary-300: 132, 249, 235;
|
||||
--color-primary-400: 59, 245, 223;
|
||||
--color-primary-500: 20, 243, 217;
|
||||
--color-primary-600: 11, 212, 188;
|
||||
--color-primary-700: 9, 173, 153;
|
||||
--color-primary-800: 7, 134, 119;
|
||||
--color-primary-900: 5, 95, 84;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 194, 253, 219;
|
||||
--color-secondary-200: 120, 251, 175;
|
||||
--color-secondary-300: 45, 249, 130;
|
||||
--color-secondary-400: 6, 212, 92;
|
||||
--color-secondary-500: 5, 172, 75;
|
||||
--color-secondary-600: 4, 133, 58;
|
||||
--color-secondary-700: 3, 93, 40;
|
||||
--color-secondary-800: 2, 53, 23;
|
||||
--color-secondary-900: 0, 14, 6;
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 255,255,255;
|
||||
--color-neutral-200: 201,209,244;
|
||||
--color-neutral-300: 137,156,231;
|
||||
--color-neutral-400: 74,103,217;
|
||||
--color-neutral-500: 37,65,178;
|
||||
--color-neutral-600: 30,53,144;
|
||||
--color-neutral-700: 23,40,110;
|
||||
--color-neutral-800: 16,28,77;
|
||||
--color-neutral-900: 9,16,43;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 252,211,226;
|
||||
--color-primary-300: 246,140,178;
|
||||
--color-primary-400: 240,69,131;
|
||||
--color-primary-500: 216,17,89;
|
||||
--color-primary-600: 178,14,73;
|
||||
--color-primary-700: 140,11,58;
|
||||
--color-primary-800: 103,8,42;
|
||||
--color-primary-900: 65,5,27;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,255,255;
|
||||
--color-secondary-200: 255,255,255;
|
||||
--color-secondary-300: 255,242,219;
|
||||
--color-secondary-400: 255,215,143;
|
||||
--color-secondary-500: 255,188,66;
|
||||
--color-secondary-600: 255,174,25;
|
||||
--color-secondary-700: 239,155,0;
|
||||
--color-secondary-800: 199,128,0;
|
||||
--color-secondary-900: 158,102,0;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 201, 209, 244;
|
||||
--color-neutral-300: 137, 156, 231;
|
||||
--color-neutral-400: 74, 103, 217;
|
||||
--color-neutral-500: 37, 65, 178;
|
||||
--color-neutral-600: 30, 53, 144;
|
||||
--color-neutral-700: 23, 40, 110;
|
||||
--color-neutral-800: 16, 28, 77;
|
||||
--color-neutral-900: 9, 16, 43;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 252, 211, 226;
|
||||
--color-primary-300: 246, 140, 178;
|
||||
--color-primary-400: 240, 69, 131;
|
||||
--color-primary-500: 216, 17, 89;
|
||||
--color-primary-600: 178, 14, 73;
|
||||
--color-primary-700: 140, 11, 58;
|
||||
--color-primary-800: 103, 8, 42;
|
||||
--color-primary-900: 65, 5, 27;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 255, 255;
|
||||
--color-secondary-200: 255, 255, 255;
|
||||
--color-secondary-300: 255, 242, 219;
|
||||
--color-secondary-400: 255, 215, 143;
|
||||
--color-secondary-500: 255, 188, 66;
|
||||
--color-secondary-600: 255, 174, 25;
|
||||
--color-secondary-700: 239, 155, 0;
|
||||
--color-secondary-800: 199, 128, 0;
|
||||
--color-secondary-900: 158, 102, 0;
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 255,255,255;
|
||||
--color-neutral-200: 218,196,249;
|
||||
--color-neutral-300: 175,126,243;
|
||||
--color-neutral-400: 131,56,236;
|
||||
--color-neutral-500: 108,22,229;
|
||||
--color-neutral-600: 91,18,192;
|
||||
--color-neutral-700: 73,15,155;
|
||||
--color-neutral-800: 56,11,118;
|
||||
--color-neutral-900: 38,8,80;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,230,241;
|
||||
--color-primary-200: 255,153,197;
|
||||
--color-primary-300: 255,77,154;
|
||||
--color-primary-400: 255,0,110;
|
||||
--color-primary-500: 214,0,92;
|
||||
--color-primary-600: 173,0,75;
|
||||
--color-primary-700: 133,0,57;
|
||||
--color-primary-800: 92,0,40;
|
||||
--color-primary-900: 51,0,22;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,255,255;
|
||||
--color-secondary-200: 211,228,255;
|
||||
--color-secondary-300: 135,181,255;
|
||||
--color-secondary-400: 58,134,255;
|
||||
--color-secondary-500: 17,109,255;
|
||||
--color-secondary-600: 0,89,231;
|
||||
--color-secondary-700: 0,74,191;
|
||||
--color-secondary-800: 0,58,150;
|
||||
--color-secondary-900: 0,42,109;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 218, 196, 249;
|
||||
--color-neutral-300: 175, 126, 243;
|
||||
--color-neutral-400: 131, 56, 236;
|
||||
--color-neutral-500: 108, 22, 229;
|
||||
--color-neutral-600: 91, 18, 192;
|
||||
--color-neutral-700: 73, 15, 155;
|
||||
--color-neutral-800: 56, 11, 118;
|
||||
--color-neutral-900: 38, 8, 80;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 230, 241;
|
||||
--color-primary-200: 255, 153, 197;
|
||||
--color-primary-300: 255, 77, 154;
|
||||
--color-primary-400: 255, 0, 110;
|
||||
--color-primary-500: 214, 0, 92;
|
||||
--color-primary-600: 173, 0, 75;
|
||||
--color-primary-700: 133, 0, 57;
|
||||
--color-primary-800: 92, 0, 40;
|
||||
--color-primary-900: 51, 0, 22;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 255, 255;
|
||||
--color-secondary-200: 211, 228, 255;
|
||||
--color-secondary-300: 135, 181, 255;
|
||||
--color-secondary-400: 58, 134, 255;
|
||||
--color-secondary-500: 17, 109, 255;
|
||||
--color-secondary-600: 0, 89, 231;
|
||||
--color-secondary-700: 0, 74, 191;
|
||||
--color-secondary-800: 0, 58, 150;
|
||||
--color-secondary-900: 0, 42, 109;
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 255,255,255;
|
||||
--color-neutral-200: 214,219,222;
|
||||
--color-neutral-300: 172,183,188;
|
||||
--color-neutral-400: 129,146,154;
|
||||
--color-neutral-500: 92,107,115;
|
||||
--color-neutral-600: 74,86,92;
|
||||
--color-neutral-700: 56,65,70;
|
||||
--color-neutral-800: 38,44,47;
|
||||
--color-neutral-900: 19,23,24;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 255,255,255;
|
||||
--color-primary-300: 250,251,252;
|
||||
--color-primary-400: 204,216,222;
|
||||
--color-primary-500: 157,180,192;
|
||||
--color-primary-600: 132,161,176;
|
||||
--color-primary-700: 107,142,160;
|
||||
--color-primary-800: 89,121,138;
|
||||
--color-primary-900: 73,99,113;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 255,255,255;
|
||||
--color-secondary-200: 182,240,255;
|
||||
--color-secondary-300: 105,225,255;
|
||||
--color-secondary-400: 28,209,255;
|
||||
--color-secondary-500: 0,165,207;
|
||||
--color-secondary-600: 0,132,166;
|
||||
--color-secondary-700: 0,100,125;
|
||||
--color-secondary-800: 0,67,85;
|
||||
--color-secondary-900: 0,35,44;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 214, 219, 222;
|
||||
--color-neutral-300: 172, 183, 188;
|
||||
--color-neutral-400: 129, 146, 154;
|
||||
--color-neutral-500: 92, 107, 115;
|
||||
--color-neutral-600: 74, 86, 92;
|
||||
--color-neutral-700: 56, 65, 70;
|
||||
--color-neutral-800: 38, 44, 47;
|
||||
--color-neutral-900: 19, 23, 24;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 255, 255, 255;
|
||||
--color-primary-300: 250, 251, 252;
|
||||
--color-primary-400: 204, 216, 222;
|
||||
--color-primary-500: 157, 180, 192;
|
||||
--color-primary-600: 132, 161, 176;
|
||||
--color-primary-700: 107, 142, 160;
|
||||
--color-primary-800: 89, 121, 138;
|
||||
--color-primary-900: 73, 99, 113;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 255, 255, 255;
|
||||
--color-secondary-200: 182, 240, 255;
|
||||
--color-secondary-300: 105, 225, 255;
|
||||
--color-secondary-400: 28, 209, 255;
|
||||
--color-secondary-500: 0, 165, 207;
|
||||
--color-secondary-600: 0, 132, 166;
|
||||
--color-secondary-700: 0, 100, 125;
|
||||
--color-secondary-800: 0, 67, 85;
|
||||
--color-secondary-900: 0, 35, 44;
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255,255,255;
|
||||
--color-neutral-100: 238,232,238;
|
||||
--color-neutral-200: 206,188,206;
|
||||
--color-neutral-300: 174,143,174;
|
||||
--color-neutral-400: 140,101,140;
|
||||
--color-neutral-500: 116,84,116;
|
||||
--color-neutral-600: 93,67,93;
|
||||
--color-neutral-700: 69,50,69;
|
||||
--color-neutral-800: 45,33,45;
|
||||
--color-neutral-900: 21,16,21;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 255,255,255;
|
||||
--color-primary-200: 252,205,252;
|
||||
--color-primary-300: 249,132,247;
|
||||
--color-primary-400: 245,59,242;
|
||||
--color-primary-500: 243,20,239;
|
||||
--color-primary-600: 212,11,208;
|
||||
--color-primary-700: 173,9,170;
|
||||
--color-primary-800: 134,7,132;
|
||||
--color-primary-900: 95,5,94;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 227,194,253;
|
||||
--color-secondary-200: 192,120,251;
|
||||
--color-secondary-300: 157,45,249;
|
||||
--color-secondary-400: 119,6,212;
|
||||
--color-secondary-500: 97,5,172;
|
||||
--color-secondary-600: 74,4,133;
|
||||
--color-secondary-700: 52,3,93;
|
||||
--color-secondary-800: 30,2,53;
|
||||
--color-secondary-900: 8,0,14;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 238, 232, 238;
|
||||
--color-neutral-200: 206, 188, 206;
|
||||
--color-neutral-300: 174, 143, 174;
|
||||
--color-neutral-400: 140, 101, 140;
|
||||
--color-neutral-500: 116, 84, 116;
|
||||
--color-neutral-600: 93, 67, 93;
|
||||
--color-neutral-700: 69, 50, 69;
|
||||
--color-neutral-800: 45, 33, 45;
|
||||
--color-neutral-900: 21, 16, 21;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 255, 255, 255;
|
||||
--color-primary-200: 252, 205, 252;
|
||||
--color-primary-300: 249, 132, 247;
|
||||
--color-primary-400: 245, 59, 242;
|
||||
--color-primary-500: 243, 20, 239;
|
||||
--color-primary-600: 212, 11, 208;
|
||||
--color-primary-700: 173, 9, 170;
|
||||
--color-primary-800: 134, 7, 132;
|
||||
--color-primary-900: 95, 5, 94;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 227, 194, 253;
|
||||
--color-secondary-200: 192, 120, 251;
|
||||
--color-secondary-300: 157, 45, 249;
|
||||
--color-secondary-400: 119, 6, 212;
|
||||
--color-secondary-500: 97, 5, 172;
|
||||
--color-secondary-600: 74, 4, 133;
|
||||
--color-secondary-700: 52, 3, 93;
|
||||
--color-secondary-800: 30, 2, 53;
|
||||
--color-secondary-900: 8, 0, 14;
|
||||
}
|
||||
@@ -1,32 +1,33 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 203,255,227;
|
||||
--color-neutral-100: 126,255,186;
|
||||
--color-neutral-200: 49,255,145;
|
||||
--color-neutral-300: 0,228,106;
|
||||
--color-neutral-400: 0,152,71;
|
||||
--color-neutral-500: 0,75,35;
|
||||
--color-neutral-600: 0,50,23;
|
||||
--color-neutral-700: 0,24,11;
|
||||
--color-neutral-800: 0,24,11;
|
||||
--color-neutral-900: 0,0,0;
|
||||
--color-primary-50: 255,255,255;
|
||||
--color-primary-100: 236,255,227;
|
||||
--color-primary-200: 184,255,150;
|
||||
--color-primary-300: 132,255,74;
|
||||
--color-primary-400: 80,252,0;
|
||||
--color-primary-500: 56,176,0;
|
||||
--color-primary-600: 48,151,0;
|
||||
--color-primary-700: 40,125,0;
|
||||
--color-primary-800: 40,125,0;
|
||||
--color-primary-900: 7,23,0;
|
||||
--color-secondary-50: 255,255,255;
|
||||
--color-secondary-100: 239,248,252;
|
||||
--color-secondary-200: 173,220,242;
|
||||
--color-secondary-300: 107,192,231;
|
||||
--color-secondary-400: 41,164,220;
|
||||
--color-secondary-500: 26,117,159;
|
||||
--color-secondary-600: 22,101,137;
|
||||
--color-secondary-700: 19,85,115;
|
||||
--color-secondary-800: 19,85,115;
|
||||
--color-secondary-900: 4,20,28;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 203, 255, 227;
|
||||
--color-neutral-100: 126, 255, 186;
|
||||
--color-neutral-200: 49, 255, 145;
|
||||
--color-neutral-300: 0, 228, 106;
|
||||
--color-neutral-400: 0, 152, 71;
|
||||
--color-neutral-500: 0, 75, 35;
|
||||
--color-neutral-600: 0, 50, 23;
|
||||
--color-neutral-700: 0, 24, 11;
|
||||
--color-neutral-800: 0, 24, 11;
|
||||
--color-neutral-900: 0, 0, 0;
|
||||
--color-primary-50: 255, 255, 255;
|
||||
--color-primary-100: 236, 255, 227;
|
||||
--color-primary-200: 184, 255, 150;
|
||||
--color-primary-300: 132, 255, 74;
|
||||
--color-primary-400: 80, 252, 0;
|
||||
--color-primary-500: 56, 176, 0;
|
||||
--color-primary-600: 48, 151, 0;
|
||||
--color-primary-700: 40, 125, 0;
|
||||
--color-primary-800: 40, 125, 0;
|
||||
--color-primary-900: 7, 23, 0;
|
||||
--color-secondary-50: 255, 255, 255;
|
||||
--color-secondary-100: 239, 248, 252;
|
||||
--color-secondary-200: 173, 220, 242;
|
||||
--color-secondary-300: 107, 192, 231;
|
||||
--color-secondary-400: 41, 164, 220;
|
||||
--color-secondary-500: 26, 117, 159;
|
||||
--color-secondary-600: 22, 101, 137;
|
||||
--color-secondary-700: 19, 85, 115;
|
||||
--color-secondary-800: 19, 85, 115;
|
||||
--color-secondary-900: 4, 20, 28;
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
function setBackgroundBlur() {
|
||||
const scriptElement = document.currentScript;
|
||||
const targetId = scriptElement && scriptElement.getAttribute("data-target-id") ? scriptElement.getAttribute("data-target-id")
|
||||
: (console.error("data-target-id is null"), null);
|
||||
const targetId =
|
||||
scriptElement && scriptElement.getAttribute("data-target-id")
|
||||
? scriptElement.getAttribute("data-target-id")
|
||||
: (console.error("data-target-id is null"), null);
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
const scroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
var scriptBundle = document.getElementById("script-bundle");
|
||||
var copyText = scriptBundle && scriptBundle.getAttribute("data-copy")? scriptBundle.getAttribute("data-copy") : "Copy";
|
||||
var copiedText = scriptBundle && scriptBundle.getAttribute("data-copied")? scriptBundle.getAttribute("data-copied") : "Copied";
|
||||
var copyText =
|
||||
scriptBundle && scriptBundle.getAttribute("data-copy") ? scriptBundle.getAttribute("data-copy") : "Copy";
|
||||
var copiedText =
|
||||
scriptBundle && scriptBundle.getAttribute("data-copied")
|
||||
? scriptBundle.getAttribute("data-copied")
|
||||
: "Copied";
|
||||
|
||||
function createCopyButton(highlightDiv) {
|
||||
const button = document.createElement("button");
|
||||
|
||||
@@ -1,26 +1,32 @@
|
||||
function fetchRepo() {
|
||||
const scriptElement = document.currentScript;
|
||||
const repoURL = scriptElement && scriptElement.getAttribute("data-repo-url") ? scriptElement.getAttribute("data-repo-url")
|
||||
: (console.error("data-repo-url is null"), null);
|
||||
const repoId = scriptElement && scriptElement.getAttribute("data-repo-id") ? scriptElement.getAttribute("data-repo-id")
|
||||
: (console.error("data-repo-id is null"), null);
|
||||
const requestObjects =
|
||||
repoId.startsWith("github") ? ["full_name", "description", "stargazers_count", "forks"]
|
||||
: repoId.startsWith("gitlab") ? ["name_with_namespace", "description", "star_count", "forks_count"]
|
||||
: ["full_name", "description", "stars_count", "forks_count"];
|
||||
const repoURL =
|
||||
scriptElement && scriptElement.getAttribute("data-repo-url")
|
||||
? scriptElement.getAttribute("data-repo-url")
|
||||
: (console.error("data-repo-url is null"), null);
|
||||
const repoId =
|
||||
scriptElement && scriptElement.getAttribute("data-repo-id")
|
||||
? scriptElement.getAttribute("data-repo-id")
|
||||
: (console.error("data-repo-id is null"), null);
|
||||
const requestObjects = repoId.startsWith("github")
|
||||
? ["full_name", "description", "stargazers_count", "forks"]
|
||||
: repoId.startsWith("gitlab")
|
||||
? ["name_with_namespace", "description", "star_count", "forks_count"]
|
||||
: ["full_name", "description", "stars_count", "forks_count"];
|
||||
fetch(repoURL, {
|
||||
headers: new Headers({
|
||||
"User-agent": "Mozilla/4.0 Custom User Agent"
|
||||
})
|
||||
"User-agent": "Mozilla/4.0 Custom User Agent",
|
||||
}),
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
requestObjects.forEach((requestObject) => {
|
||||
let element = document.getElementById(`${repoId}-${requestObject}`);
|
||||
if (requestObject === "stargazers_count" && repoId.startsWith("github")) {
|
||||
element = document.getElementById(`${repoId}-stargazers`);
|
||||
element = document.getElementById(`${repoId}-stargazers`);
|
||||
}
|
||||
element ? (element.innerHTML = data[requestObject])
|
||||
element
|
||||
? (element.innerHTML = data[requestObject])
|
||||
: (console.error(`Element '${repoId}-${requestObject}' not found`), null);
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
const pageScriptElement = document.currentScript;
|
||||
const oid = pageScriptElement && pageScriptElement.getAttribute("data-oid") ? pageScriptElement.getAttribute("data-oid") : (console.error("data-oid is null"), null);
|
||||
const oid_likes = pageScriptElement && pageScriptElement.getAttribute("data-oid-likes") ? pageScriptElement.getAttribute("data-oid-likes") : (console.error("data-oid-likes is null"), null);
|
||||
const oid =
|
||||
pageScriptElement && pageScriptElement.getAttribute("data-oid")
|
||||
? pageScriptElement.getAttribute("data-oid")
|
||||
: (console.error("data-oid is null"), null);
|
||||
const oid_likes =
|
||||
pageScriptElement && pageScriptElement.getAttribute("data-oid-likes")
|
||||
? pageScriptElement.getAttribute("data-oid-likes")
|
||||
: (console.error("data-oid-likes is null"), null);
|
||||
const liked_page = false;
|
||||
const id = oid ? oid.replaceAll("/", "-") : oid;
|
||||
const id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes;
|
||||
@@ -8,101 +14,118 @@ const id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes;
|
||||
if (typeof auth !== "undefined") {
|
||||
const viewed = localStorage.getItem(id);
|
||||
|
||||
if (!viewed) {
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('views').doc(id)
|
||||
localStorage.setItem(id, true);
|
||||
docRef.get().then((doc) => {
|
||||
if (doc.exists) {
|
||||
db.collection('views').doc(id).update({
|
||||
views: firebase.firestore.FieldValue.increment(1)
|
||||
});
|
||||
} else {
|
||||
db.collection('views').doc(id).set({ views: 1 })
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
if (!viewed) {
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection("views").doc(id);
|
||||
localStorage.setItem(id, true);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
if (doc.exists) {
|
||||
db.collection("views")
|
||||
.doc(id)
|
||||
.update({
|
||||
views: firebase.firestore.FieldValue.increment(1),
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
});
|
||||
}
|
||||
} else {
|
||||
db.collection("views").doc(id).set({ views: 1 });
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
const liked = localStorage.getItem(id_likes);
|
||||
|
||||
if (liked) {
|
||||
liked_page = true
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = ""
|
||||
}
|
||||
const liked = localStorage.getItem(id_likes);
|
||||
|
||||
if (liked) {
|
||||
liked_page = true;
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
|
||||
}
|
||||
}
|
||||
|
||||
function like_article(id_likes) {
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('likes').doc(id_likes)
|
||||
docRef.get().then((doc) => {
|
||||
liked_page = true
|
||||
localStorage.setItem(id_likes, true);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = ""
|
||||
if (doc.exists) {
|
||||
db.collection('likes').doc(id_likes).update({
|
||||
likes: firebase.firestore.FieldValue.increment(1)
|
||||
});
|
||||
} else {
|
||||
db.collection('likes').doc(id_likes).set({ likes: 1 })
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection("likes").doc(id_likes);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
liked_page = true;
|
||||
localStorage.setItem(id_likes, true);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
|
||||
if (doc.exists) {
|
||||
db.collection("likes")
|
||||
.doc(id_likes)
|
||||
.update({
|
||||
likes: firebase.firestore.FieldValue.increment(1),
|
||||
});
|
||||
} else {
|
||||
db.collection("likes").doc(id_likes).set({ likes: 1 });
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
function remove_like_article(id_likes) {
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('likes').doc(id_likes)
|
||||
docRef.get().then((doc) => {
|
||||
liked_page = false
|
||||
localStorage.removeItem(id_likes);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like"
|
||||
if (doc.exists) {
|
||||
db.collection('likes').doc(id_likes).update({
|
||||
likes: firebase.firestore.FieldValue.increment(-1)
|
||||
});
|
||||
} else {
|
||||
db.collection('likes').doc(id_likes).set({ likes: 0 })
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection("likes").doc(id_likes);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
liked_page = false;
|
||||
localStorage.removeItem(id_likes);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like";
|
||||
if (doc.exists) {
|
||||
db.collection("likes")
|
||||
.doc(id_likes)
|
||||
.update({
|
||||
likes: firebase.firestore.FieldValue.increment(-1),
|
||||
});
|
||||
} else {
|
||||
db.collection("likes").doc(id_likes).set({ likes: 0 });
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
function process_article() {
|
||||
if (!liked_page) {
|
||||
like_article(id_likes)
|
||||
} else {
|
||||
remove_like_article(id_likes)
|
||||
}
|
||||
if (!liked_page) {
|
||||
like_article(id_likes);
|
||||
} else {
|
||||
remove_like_article(id_likes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +1,70 @@
|
||||
if (typeof auth !== 'undefined') {
|
||||
var viewsCollection = db.collection('views');
|
||||
var likesCollection = db.collection('likes');
|
||||
if (typeof auth !== "undefined") {
|
||||
var viewsCollection = db.collection("views");
|
||||
var likesCollection = db.collection("likes");
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function toggleLoaders(node) {
|
||||
var classesString = node.className;
|
||||
if (classesString == "") return;
|
||||
var classes = classesString.split(" ");
|
||||
for (var i in classes) {
|
||||
node.classList.toggle(classes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleLoaders(node){
|
||||
var classesString = node.className;
|
||||
if(classesString == "") return
|
||||
var classes = classesString.split(" ");
|
||||
for(var i in classes){
|
||||
node.classList.toggle(classes[i])
|
||||
var update_views = function (node, id) {
|
||||
viewsCollection.doc(id).onSnapshot((doc) => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.views);
|
||||
} else {
|
||||
node.innerText = 0;
|
||||
}
|
||||
toggleLoaders(node);
|
||||
});
|
||||
};
|
||||
|
||||
var update_likes = function (node, id) {
|
||||
likesCollection.doc(id).onSnapshot((doc) => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.likes);
|
||||
} else {
|
||||
node.innerText = 0;
|
||||
}
|
||||
toggleLoaders(node);
|
||||
});
|
||||
};
|
||||
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
var views_nodes = document.querySelectorAll("span[id^='views_']");
|
||||
|
||||
for (var i in views_nodes) {
|
||||
var node = views_nodes[i];
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
|
||||
if (id) {
|
||||
update_views(node, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var update_views = function (node, id) {
|
||||
viewsCollection.doc(id).onSnapshot(doc => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.views)
|
||||
} else {
|
||||
node.innerText = 0
|
||||
}
|
||||
toggleLoaders(node)
|
||||
})
|
||||
}
|
||||
var likes_nodes = document.querySelectorAll("span[id^='likes_']");
|
||||
|
||||
var update_likes = function (node, id) {
|
||||
likesCollection.doc(id).onSnapshot(doc => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.likes)
|
||||
} else {
|
||||
node.innerText = 0
|
||||
}
|
||||
toggleLoaders(node)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
auth.signInAnonymously()
|
||||
.then(() => {
|
||||
var views_nodes = document.querySelectorAll("span[id^='views_']")
|
||||
|
||||
for (var i in views_nodes) {
|
||||
var node = views_nodes[i]
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id
|
||||
if (id) {
|
||||
update_views(node, id)
|
||||
}
|
||||
}
|
||||
|
||||
var likes_nodes = document.querySelectorAll("span[id^='likes_']")
|
||||
|
||||
for (var i in likes_nodes) {
|
||||
var node = likes_nodes[i]
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id
|
||||
if (id) {
|
||||
update_likes(node, id)
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
var errorCode = error.code;
|
||||
var errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
});
|
||||
for (var i in likes_nodes) {
|
||||
var node = likes_nodes[i];
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
|
||||
if (id) {
|
||||
update_likes(node, id);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
var errorCode = error.code;
|
||||
var errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
@@ -13,8 +13,8 @@ var indexed = false;
|
||||
var hasResults = false;
|
||||
|
||||
// Listen for events
|
||||
showButton? showButton.addEventListener("click", displaySearch) : null;
|
||||
showButtonMobile? showButtonMobile.addEventListener("click", displaySearch) : null;
|
||||
showButton ? showButton.addEventListener("click", displaySearch) : null;
|
||||
showButtonMobile ? showButtonMobile.addEventListener("click", displaySearch) : null;
|
||||
hideButton.addEventListener("click", hideSearch);
|
||||
wrapper.addEventListener("click", hideSearch);
|
||||
modal.addEventListener("click", function (event) {
|
||||
@@ -25,12 +25,9 @@ modal.addEventListener("click", function (event) {
|
||||
document.addEventListener("keydown", function (event) {
|
||||
// Forward slash to open search wrapper
|
||||
if (event.key == "/") {
|
||||
const active = document.activeElement
|
||||
const tag = active.tagName
|
||||
const isInputField =
|
||||
tag === "INPUT" ||
|
||||
tag === "TEXTAREA" ||
|
||||
active.isContentEditable
|
||||
const active = document.activeElement;
|
||||
const tag = active.tagName;
|
||||
const isInputField = tag === "INPUT" || tag === "TEXTAREA" || active.isContentEditable;
|
||||
|
||||
if (!searchVisible && !isInputField) {
|
||||
event.preventDefault();
|
||||
@@ -82,7 +79,6 @@ document.addEventListener("keydown", function (event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Update search on each keypress
|
||||
@@ -129,7 +125,7 @@ function fetchJSON(path, callback) {
|
||||
|
||||
function buildIndex() {
|
||||
var baseURL = wrapper.getAttribute("data-url");
|
||||
baseURL = baseURL.replace(/\/?$/, '/');
|
||||
baseURL = baseURL.replace(/\/?$/, "/");
|
||||
fetchJSON(baseURL + "index.json", function (data) {
|
||||
var options = {
|
||||
shouldSort: true,
|
||||
@@ -165,8 +161,15 @@ function executeQuery(term) {
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = html;
|
||||
value.item.summary = div.textContent || div.innerText || "";
|
||||
var title = value.item.externalUrl? value.item.title + '<span class="text-xs ml-2 align-center cursor-default text-neutral-400 dark:text-neutral-500">'+value.item.externalUrl+'</span>' : value.item.title;
|
||||
var linkconfig = value.item.externalUrl? 'target="_blank" rel="noopener" href="'+value.item.externalUrl+'"' : 'href="'+value.item.permalink+'"';
|
||||
var title = value.item.externalUrl
|
||||
? value.item.title +
|
||||
'<span class="text-xs ml-2 align-center cursor-default text-neutral-400 dark:text-neutral-500">' +
|
||||
value.item.externalUrl +
|
||||
"</span>"
|
||||
: value.item.title;
|
||||
var linkconfig = value.item.externalUrl
|
||||
? 'target="_blank" rel="noopener" href="' + value.item.externalUrl + '"'
|
||||
: 'href="' + value.item.permalink + '"';
|
||||
resultsHTML =
|
||||
resultsHTML +
|
||||
`<li class="mb-2">
|
||||
@@ -176,7 +179,7 @@ function executeQuery(term) {
|
||||
<div class="-mb-1 text-lg font-bold">
|
||||
${title}
|
||||
</div>
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">·</span>${value.item.date? value.item.date : ""}</span></div>
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">·</span>${value.item.date ? value.item.date : ""}</span></div>
|
||||
<div class="text-sm italic">${value.item.summary}</div>
|
||||
</div>
|
||||
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">→</div>
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
function _getDefaultPackeryOptions() {
|
||||
return {
|
||||
percentPosition: true,
|
||||
gutter: 5,
|
||||
resize: true
|
||||
};
|
||||
return {
|
||||
percentPosition: true,
|
||||
gutter: 5,
|
||||
resize: true,
|
||||
};
|
||||
}
|
||||
|
||||
(function init() {
|
||||
$(window).on("load", function () {
|
||||
let packeries = [];
|
||||
let nodeGalleries = document.querySelectorAll(".gallery");
|
||||
|
||||
$(window).on("load", function () {
|
||||
let packeries = [];
|
||||
let nodeGalleries = document.querySelectorAll('.gallery');
|
||||
|
||||
nodeGalleries.forEach(nodeGallery => {
|
||||
// TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute
|
||||
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
|
||||
packeries.push(packery);
|
||||
});
|
||||
console.groupEnd();
|
||||
nodeGalleries.forEach((nodeGallery) => {
|
||||
// TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute
|
||||
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
|
||||
packeries.push(packery);
|
||||
});
|
||||
console.groupEnd();
|
||||
});
|
||||
})();
|
||||
@@ -1,53 +1,50 @@
|
||||
function _toogleZenMode(zendModeButton) {
|
||||
// Nodes selection
|
||||
const body = document.querySelector('body');
|
||||
const footer = document.querySelector('footer');
|
||||
const tocRight = document.querySelector('.toc-right');
|
||||
const tocInside = document.querySelector('.toc-inside');
|
||||
const articleContent = document.querySelector('.article-content');
|
||||
const header = document.querySelector('#single_header');
|
||||
|
||||
const body = document.querySelector("body");
|
||||
const footer = document.querySelector("footer");
|
||||
const tocRight = document.querySelector(".toc-right");
|
||||
const tocInside = document.querySelector(".toc-inside");
|
||||
const articleContent = document.querySelector(".article-content");
|
||||
const header = document.querySelector("#single_header");
|
||||
|
||||
// Add semantic class into body tag
|
||||
body.classList.toggle('zen-mode-enable');
|
||||
body.classList.toggle("zen-mode-enable");
|
||||
|
||||
// Show/Hide 'toc right' and 'toc inside'
|
||||
if (tocRight)
|
||||
tocRight.classList.toggle('lg:block');
|
||||
if (tocInside)
|
||||
tocInside.classList.toggle('lg:hidden');
|
||||
if (tocRight) tocRight.classList.toggle("lg:block");
|
||||
if (tocInside) tocInside.classList.toggle("lg:hidden");
|
||||
|
||||
// Change width of article content
|
||||
articleContent.classList.toggle('max-w-fit');
|
||||
articleContent.classList.toggle('max-w-prose');
|
||||
articleContent.classList.toggle("max-w-fit");
|
||||
articleContent.classList.toggle("max-w-prose");
|
||||
|
||||
// Change width of article title and footer
|
||||
header.classList.toggle('max-w-full');
|
||||
header.classList.toggle('max-w-prose');
|
||||
footer.classList.toggle('max-w-full');
|
||||
footer.classList.toggle('max-w-prose');
|
||||
header.classList.toggle("max-w-full");
|
||||
header.classList.toggle("max-w-prose");
|
||||
footer.classList.toggle("max-w-full");
|
||||
footer.classList.toggle("max-w-prose");
|
||||
|
||||
// Read i18n title from data-attributes
|
||||
const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable');
|
||||
const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable');
|
||||
const titleI18nDisable = zendModeButton.getAttribute("data-title-i18n-disable");
|
||||
const titleI18nEnable = zendModeButton.getAttribute("data-title-i18n-enable");
|
||||
|
||||
if (body.classList.contains('zen-mode-enable')) {
|
||||
if (body.classList.contains("zen-mode-enable")) {
|
||||
// Persist configuration
|
||||
//localStorage.setItem('blowfish-zen-mode-enabled', 'true');
|
||||
|
||||
// Change title to enable
|
||||
zendModeButton.setAttribute('title', titleI18nEnable)
|
||||
zendModeButton.setAttribute("title", titleI18nEnable);
|
||||
// Auto-scroll to title article
|
||||
window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90);
|
||||
} else {
|
||||
//localStorage.setItem('blowfish-zen-mode-enabled', 'false');
|
||||
zendModeButton.setAttribute('title', titleI18nDisable);
|
||||
document.querySelector('body').scrollIntoView();
|
||||
zendModeButton.setAttribute("title", titleI18nDisable);
|
||||
document.querySelector("body").scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
function _registerZendModeButtonClick(zendModeButton) {
|
||||
zendModeButton.addEventListener('click', function (event) {
|
||||
zendModeButton.addEventListener("click", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Toggle zen-mode
|
||||
@@ -58,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);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,20 +1,13 @@
|
||||
var layouts = [
|
||||
"background",
|
||||
"hero",
|
||||
"profile",
|
||||
"page",
|
||||
"card"
|
||||
]
|
||||
var layouts = ["background", "hero", "profile", "page", "card"];
|
||||
|
||||
var currentLayout = 0
|
||||
var currentLayout = 0;
|
||||
|
||||
function switchHomeLayout() {
|
||||
var old = currentLayout;
|
||||
currentLayout = currentLayout == layouts.length - 1 ? 0 : currentLayout + 1;
|
||||
|
||||
var old = currentLayout
|
||||
currentLayout = currentLayout == layouts.length - 1 ? 0 : currentLayout + 1
|
||||
|
||||
var oldDiv = document.getElementById(layouts[old])
|
||||
var currentDiv = document.getElementById(layouts[currentLayout])
|
||||
var oldDiv = document.getElementById(layouts[old]);
|
||||
var currentDiv = document.getElementById(layouts[currentLayout]);
|
||||
const layoutCode = document.querySelectorAll("code[id=layout]");
|
||||
|
||||
currentDiv.style.display = "block";
|
||||
@@ -22,7 +15,6 @@ function switchHomeLayout() {
|
||||
layoutCode.forEach(function (el) {
|
||||
el.innerText = layouts[currentLayout];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
@@ -30,31 +22,26 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||
button.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
switchHomeLayout();
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
var list_config = [
|
||||
"CardViewProse",
|
||||
"CardViewScreenWidth",
|
||||
"NormalView"
|
||||
]
|
||||
var list_config = ["CardViewProse", "CardViewScreenWidth", "NormalView"];
|
||||
|
||||
var titles = {
|
||||
"CardViewProse" : "card view with constrained width",
|
||||
"CardViewScreenWidth" : "card view with full width",
|
||||
"NormalView" : "standard list view"
|
||||
}
|
||||
CardViewProse: "card view with constrained width",
|
||||
CardViewScreenWidth: "card view with full width",
|
||||
NormalView: "standard list view",
|
||||
};
|
||||
|
||||
var currentConfig = 0
|
||||
var currentConfig = 0;
|
||||
|
||||
function switchList() {
|
||||
var old = currentConfig;
|
||||
currentConfig = currentConfig == list_config.length - 1 ? 0 : currentConfig + 1;
|
||||
|
||||
var old = currentConfig
|
||||
currentConfig = currentConfig == list_config.length - 1 ? 0 : currentConfig + 1
|
||||
|
||||
var oldDiv = document.getElementById(list_config[old])
|
||||
var currentDiv = document.getElementById(list_config[currentConfig])
|
||||
var oldDiv = document.getElementById(list_config[old]);
|
||||
var currentDiv = document.getElementById(list_config[currentConfig]);
|
||||
const configCode = document.querySelectorAll("code[id=config]");
|
||||
|
||||
currentDiv.style.display = "block";
|
||||
@@ -63,7 +50,6 @@ function switchList() {
|
||||
configCode.forEach(function (el) {
|
||||
el.innerText = titles[list_config[currentConfig]];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
@@ -71,6 +57,6 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||
button.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
switchList();
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "Nuno Coração",
|
||||
"image" : "img/nuno_avatar.jpg",
|
||||
"bio": "Theme Creator",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
"name": "Nuno Coração",
|
||||
"image": "img/nuno_avatar.jpg",
|
||||
"bio": "Theme Creator",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "Dummy Second Author",
|
||||
"image" : "img/author2.png",
|
||||
"bio": "Dummy",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
"name": "Dummy Second Author",
|
||||
"image": "img/author2.png",
|
||||
"bio": "Dummy",
|
||||
"social": [
|
||||
{ "linkedin": "https://linkedin.com/in/nunocoracao" },
|
||||
{ "twitter": "https://twitter.com/nunocoracao" },
|
||||
{ "instagram": "https://instagram.com/nunocoracao" },
|
||||
{ "medium": "https://medium.com/@nunocoracao" },
|
||||
{ "github": "https://github.com/nunocoracao" },
|
||||
{ "goodreads": "http://goodreads.com/nunocoracao" },
|
||||
{ "keybase": "https://keybase.io/nunocoracao" },
|
||||
{ "reddit": "https://reddit.com/user/nunoheart" }
|
||||
]
|
||||
}
|
||||
@@ -17,4 +17,8 @@
|
||||
<section>
|
||||
{{ partial "recent-articles-demo.html" . }}
|
||||
</section>
|
||||
<script defer type="text/javascript" src="{{ $jsHome.RelPermalink }}" integrity="{{ $jsHome.Data.Integrity }}"></script>
|
||||
<script
|
||||
defer
|
||||
type="text/javascript"
|
||||
src="{{ $jsHome.RelPermalink }}"
|
||||
integrity="{{ $jsHome.Data.Integrity }}"></script>
|
||||
|
||||
@@ -1,44 +1,47 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $showMoreLinkDest := "/posts/" }}
|
||||
{{ if index .Site.Params.homepage "showRecentItems" }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
|
||||
|
||||
<div class="flex mb-6 px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">This is a demo of theme's list configurations: <code
|
||||
id="config">card view</code></span>
|
||||
<button id="switch-config-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700">
|
||||
Switch config ↻
|
||||
</button>
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert"
|
||||
>This is a demo of theme's list configurations: <code id="config">card view</code></span
|
||||
>
|
||||
<button
|
||||
id="switch-config-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700">
|
||||
Switch config ↻
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="CardViewProse" class="h-full">
|
||||
{{ partial "recent-articles/cardview.html" . }}
|
||||
{{ partial "recent-articles/cardview.html" . }}
|
||||
</div>
|
||||
|
||||
<div id="CardViewScreenWidth" class="hidden h-full">
|
||||
{{ partial "recent-articles/cardview-fullwidth.html" . }}
|
||||
{{ partial "recent-articles/cardview-fullwidth.html" . }}
|
||||
</div>
|
||||
|
||||
<div id="NormalView" class="hidden h-full">
|
||||
{{ partial "recent-articles/list.html" . }}
|
||||
{{ partial "recent-articles/list.html" . }}
|
||||
</div>
|
||||
|
||||
{{ if .Site.Params.homepage.showMoreLink | default false }}
|
||||
{{ if index .Site.Params.homepage "showRecentItems" }}
|
||||
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
|
||||
{{ end }}
|
||||
<div class="mt-10 flex justify-center">
|
||||
{{ if index .Site.Params.homepage "showRecentItems" }}
|
||||
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
|
||||
{{ end }}
|
||||
<div class="mt-10 flex justify-center">
|
||||
<a href="{{ $showMoreLinkDest }}">
|
||||
<button
|
||||
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
|
||||
{{ i18n "recent.show_more" | markdownify }}
|
||||
</button>
|
||||
<button
|
||||
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
|
||||
{{ i18n "recent.show_more" | markdownify }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,74 +1,70 @@
|
||||
const fs = require('fs');
|
||||
const fs = require("fs");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const contentDir = "./exampleSite/content";
|
||||
const defaultLang = "en";
|
||||
|
||||
var targetLangs = []
|
||||
var targetLangs = [];
|
||||
|
||||
function readConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
//console.log(file)
|
||||
if(file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
//console.log(lang)
|
||||
if(lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach((file) => {
|
||||
//console.log(file)
|
||||
if (file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
//console.log(lang)
|
||||
if (lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function processFile(filePath, file) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
//console.log("processing", filePath)
|
||||
|
||||
//console.log("processing", filePath)
|
||||
for (var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
|
||||
for(var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
if (fs.existsSync(targetFilePath)) {
|
||||
//console.log("file already exists", targetFilePath);
|
||||
|
||||
if(fs.existsSync(targetFilePath)) {
|
||||
//console.log("file already exists", targetFilePath);
|
||||
|
||||
const data = fs.readFileSync(filePath, 'utf8');
|
||||
const data2 = fs.readFileSync(targetFilePath, 'utf8');
|
||||
if(data != data2) {
|
||||
//console.log("file contents are different", targetFilePath);
|
||||
}else{
|
||||
//console.log("file contents are the same", targetFilePath);
|
||||
console.log(targetFilePath);
|
||||
//process.exit(1);
|
||||
}
|
||||
|
||||
}else{
|
||||
//console.log("file does not exist", targetFilePath);
|
||||
}
|
||||
const data = fs.readFileSync(filePath, "utf8");
|
||||
const data2 = fs.readFileSync(targetFilePath, "utf8");
|
||||
if (data != data2) {
|
||||
//console.log("file contents are different", targetFilePath);
|
||||
} else {
|
||||
//console.log("file contents are the same", targetFilePath);
|
||||
console.log(targetFilePath);
|
||||
//process.exit(1);
|
||||
}
|
||||
|
||||
} else
|
||||
return
|
||||
} else {
|
||||
//console.log("file does not exist", targetFilePath);
|
||||
}
|
||||
}
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function createLinks() {
|
||||
processFolder(contentDir);
|
||||
processFolder(contentDir);
|
||||
}
|
||||
|
||||
readConfigs();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const translate = require('@iamtraction/google-translate');
|
||||
const fs = require("fs");
|
||||
const translate = require("@iamtraction/google-translate");
|
||||
|
||||
const defaultLang = "en";
|
||||
const targetLang = process.argv[2] || "en";
|
||||
@@ -8,56 +8,57 @@ const targetLangIso = targetLang == "pt" ? "pt-pt" : targetLang;
|
||||
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
|
||||
async function convert(text, from, to) {
|
||||
var options = {
|
||||
from: from,
|
||||
to: to
|
||||
};
|
||||
var translated_text = await translate(text, options);
|
||||
return translated_text.text;
|
||||
var options = {
|
||||
from: from,
|
||||
to: to,
|
||||
};
|
||||
var translated_text = await translate(text, options);
|
||||
return translated_text.text;
|
||||
}
|
||||
|
||||
console.log(filePath);
|
||||
console.log(targetFilePath);
|
||||
|
||||
async function processFrontMatter(block) {
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags") {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
translatedBlock += newElement + "\n";
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (
|
||||
elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags"
|
||||
) {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
return translatedBlock;
|
||||
translatedBlock += newElement + "\n";
|
||||
}
|
||||
return translatedBlock;
|
||||
}
|
||||
|
||||
|
||||
async function main() {
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
const fileContent = fs.readFileSync(filePath, "utf8");
|
||||
|
||||
var array = fileContent.split("---\n")
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
var array = fileContent.split("---\n");
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
|
||||
}
|
||||
|
||||
main();
|
||||
136
genLang.js
136
genLang.js
@@ -1,5 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const translate = require('@iamtraction/google-translate');
|
||||
const fs = require("fs");
|
||||
const translate = require("@iamtraction/google-translate");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const contentDir = "./exampleSite/content";
|
||||
@@ -7,97 +7,93 @@ const defaultLang = "en";
|
||||
const targetLang = process.argv[2] || "en";
|
||||
const targetLangIso = targetLang == "pt" ? "pt-pt" : targetLang;
|
||||
|
||||
|
||||
function createConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
const filePath = `${configDir}/${file}`;
|
||||
if (filePath.indexOf("languages.en.toml") > -1 ||
|
||||
filePath.indexOf("menus.en.toml") > -1) {
|
||||
var fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, 'utf8');
|
||||
}
|
||||
});
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach((file) => {
|
||||
const filePath = `${configDir}/${file}`;
|
||||
if (filePath.indexOf("languages.en.toml") > -1 || filePath.indexOf("menus.en.toml") > -1) {
|
||||
var fileContent = fs.readFileSync(filePath, "utf8");
|
||||
fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, "utf8");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function convert(text, from, to) {
|
||||
var options = {
|
||||
from: from,
|
||||
to: to
|
||||
};
|
||||
var translated_text = await translate(text, options)
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
});;
|
||||
return translated_text && translated_text.text? translated_text.text : '';
|
||||
var options = {
|
||||
from: from,
|
||||
to: to,
|
||||
};
|
||||
var translated_text = await translate(text, options).catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
return translated_text && translated_text.text ? translated_text.text : "";
|
||||
}
|
||||
|
||||
async function processFrontMatter(block) {
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags") {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
translatedBlock += newElement + "\n";
|
||||
var array = block.split("\n");
|
||||
var translatedBlock = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (
|
||||
elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags"
|
||||
) {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
} else {
|
||||
newElement = array[i];
|
||||
}
|
||||
return translatedBlock;
|
||||
translatedBlock += newElement + "\n";
|
||||
}
|
||||
return translatedBlock;
|
||||
}
|
||||
|
||||
async function processFile(filePath) {
|
||||
console.log("translating", filePath)
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
console.log("translating", filePath);
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
|
||||
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
const fileContent = fs.readFileSync(filePath, "utf8");
|
||||
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
var array = fileContent.split("---\n");
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
|
||||
var array = fileContent.split("---\n")
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var translatedFrontMatter = await processFrontMatter(frontMatter);
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
|
||||
|
||||
} else
|
||||
return
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
console.log(filePath, isDir);
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath);
|
||||
}
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
console.log(filePath, isDir);
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function createContent() {
|
||||
processFolder(contentDir);
|
||||
processFolder(contentDir);
|
||||
}
|
||||
|
||||
createConfigs();
|
||||
|
||||
@@ -1,65 +1,62 @@
|
||||
const fs = require('fs');
|
||||
const fs = require("fs");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const contentDir = "./exampleSite/content";
|
||||
const defaultLang = "en";
|
||||
|
||||
var targetLangs = []
|
||||
var targetLangs = [];
|
||||
|
||||
function readConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
console.log(file)
|
||||
if(file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
console.log(lang)
|
||||
if(lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach((file) => {
|
||||
console.log(file);
|
||||
if (file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
console.log(lang);
|
||||
if (lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function processFile(filePath, file) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
console.log("processing", filePath);
|
||||
|
||||
console.log("processing", filePath)
|
||||
for (var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
|
||||
for(var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
var targetFilePath = filePath.replace(".md", "." + targetLang + ".md");
|
||||
//var targetFileName = file.replace(".md", "." + targetLang + ".md");
|
||||
|
||||
if(fs.existsSync(targetFilePath)) {
|
||||
console.log("file already exists", targetFilePath);
|
||||
}else{
|
||||
console.log("creating file", targetFilePath);
|
||||
//fs.symlinkSync(file, targetFilePath, 'junction');
|
||||
fs.copyFileSync(filePath, targetFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
} else
|
||||
return
|
||||
if (fs.existsSync(targetFilePath)) {
|
||||
console.log("file already exists", targetFilePath);
|
||||
} else {
|
||||
console.log("creating file", targetFilePath);
|
||||
//fs.symlinkSync(file, targetFilePath, 'junction');
|
||||
fs.copyFileSync(filePath, targetFilePath);
|
||||
}
|
||||
}
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
for (var i in files) {
|
||||
const file = files[i];
|
||||
const filePath = `${folderPath}/${file}`;
|
||||
const isDir = fs.lstatSync(filePath).isDirectory();
|
||||
if (isDir) {
|
||||
await processFolder(filePath);
|
||||
} else {
|
||||
await processFile(filePath, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function createLinks() {
|
||||
processFolder(contentDir);
|
||||
processFolder(contentDir);
|
||||
}
|
||||
|
||||
readConfigs();
|
||||
|
||||
@@ -26,7 +26,6 @@ article:
|
||||
this_article: "Тази Статия"
|
||||
related_articles: "Подобни"
|
||||
|
||||
|
||||
author:
|
||||
byline_title: "Автор"
|
||||
|
||||
|
||||
15
i18n/de.yaml
15
i18n/de.yaml
@@ -13,8 +13,8 @@ article:
|
||||
reading_time_title: "Lesezeit"
|
||||
table_of_contents: "Inhaltsverzeichnis"
|
||||
word_count:
|
||||
one: "{{ .Count }} Wort"
|
||||
other: "{{ .Count }} Wörter"
|
||||
one: "{{ .Count }} Wort"
|
||||
other: "{{ .Count }} Wörter"
|
||||
part_of_series: "Dieser Artikel ist Teil einer Serie."
|
||||
part: "Teil"
|
||||
this_article: "Dieser Artikel"
|
||||
@@ -42,13 +42,13 @@ list:
|
||||
no_articles: "Es gibt hier noch keine Beiträge."
|
||||
|
||||
nav:
|
||||
scroll_to_top_title: "Zum Anfang scrollen"
|
||||
skip_to_main: "Zum Hauptinhalt springen"
|
||||
scroll_to_top_title: "Zum Anfang scrollen"
|
||||
skip_to_main: "Zum Hauptinhalt springen"
|
||||
|
||||
search:
|
||||
open_button_title: "Suche (/)"
|
||||
close_button_title: "Schließen (Esc)"
|
||||
input_placeholder: "Suchen"
|
||||
open_button_title: "Suche (/)"
|
||||
close_button_title: "Schließen (Esc)"
|
||||
input_placeholder: "Suchen"
|
||||
|
||||
sharing:
|
||||
email: "Per E-Mail teilen"
|
||||
@@ -62,6 +62,5 @@ sharing:
|
||||
shortcode:
|
||||
recent_articles: "Neue Beiträge"
|
||||
|
||||
|
||||
recent:
|
||||
show_more: "Zeige Mehr"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
{{ define "RenderImageSimple" -}}
|
||||
<img class="my-0 rounded-md" loading="lazy" alt="{{ .alt }}" src="{{ .src }}" />
|
||||
<img class="my-0 rounded-md" loading="lazy" alt="{{ .alt }}" src="{{ .src }}">
|
||||
{{- end }}
|
||||
|
||||
{{ define "RenderImageResponsive" -}}
|
||||
<img
|
||||
class="my-0 rounded-md" loading="lazy" decoding="async" fetchpriority="low" alt="{{ .alt }}"
|
||||
class="my-0 rounded-md"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
fetchpriority="low"
|
||||
alt="{{ .alt }}"
|
||||
srcset="
|
||||
{{ (.resource.Resize "330x").RelPermalink }} 330w,
|
||||
{{ (.resource.Resize "660x").RelPermalink }} 660w,
|
||||
{{ (.resource.Resize "1280x").RelPermalink }} 1280w"
|
||||
{{ (.resource.Resize "330x").RelPermalink }} 330w,
|
||||
{{ (.resource.Resize "660x").RelPermalink }} 660w,
|
||||
{{ (.resource.Resize "1280x").RelPermalink }} 1280w
|
||||
"
|
||||
data-zoom-src="{{ .resource.RelPermalink }}"
|
||||
src="{{ .resource.RelPermalink }}"
|
||||
/>
|
||||
src="{{ .resource.RelPermalink }}">
|
||||
{{- end }}
|
||||
|
||||
{{ define "RenderImageCaption" -}}
|
||||
@@ -31,6 +35,7 @@
|
||||
{{- $resource = or ($.Page.Resources.GetMatch $url.String) (resources.Get $url.String) }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
<figure>
|
||||
{{- if $isRemote }}
|
||||
{{ template "RenderImageSimple" (dict "src" $url.String "alt" $altText) }}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<a href="{{ .Destination | safeURL }}"
|
||||
{{- with .Title -}}
|
||||
<a
|
||||
href="{{ .Destination | safeURL }}"
|
||||
{{- with .Title -}}
|
||||
title="{{ . }}"
|
||||
{{- end }}
|
||||
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
|
||||
{{- .Text | safeHTML -}}
|
||||
{{- end }}
|
||||
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }}
|
||||
target="_blank"
|
||||
{{ end }}>
|
||||
{{- .Text | safeHTML -}}
|
||||
</a>
|
||||
@@ -1,42 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default " en") }} {{- . -}} {{ end }}" dir="{{ if .Site.Params.rtl | default false -}}
|
||||
<!doctype html>
|
||||
<html
|
||||
lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default " en") }}{{- . -}}{{ end }}"
|
||||
dir="{{ if .Site.Params.rtl | default false -}}
|
||||
rtl
|
||||
{{- else -}}
|
||||
ltr
|
||||
{{- end }}" class="scroll-smooth" data-default-appearance="{{ .Site.Params.defaultAppearance | default " light" }}"
|
||||
{{- end }}"
|
||||
class="scroll-smooth"
|
||||
data-default-appearance="{{ .Site.Params.defaultAppearance | default " light" }}"
|
||||
data-auto-appearance="{{ .Site.Params.autoSwitchAppearance | default " true" }}">
|
||||
{{- partial "head.html" . -}}
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body
|
||||
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32 scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600">
|
||||
<div id="the-top" class="absolute flex self-center">
|
||||
<a class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
||||
href="#main-content"><span
|
||||
class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
||||
"nav.skip_to_main" }}</a>
|
||||
</div>
|
||||
{{ $header := print "header/" .Site.Params.header.layout ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $header ) }}
|
||||
{{ partial $header . }}
|
||||
{{ else }}
|
||||
{{ partial "header/basic.html" . }}
|
||||
{{ end }}
|
||||
<div class="relative flex flex-col grow">
|
||||
<main id="main-content" class="grow">
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
||||
{{- partial "scroll-to-top.html" . -}}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{ if .Site.Params.enableSearch | default false }}
|
||||
{{- partial "search.html" . -}}
|
||||
|
||||
<body
|
||||
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32 scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600">
|
||||
<div id="the-top" class="absolute flex self-center">
|
||||
<a
|
||||
class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
||||
href="#main-content"
|
||||
><span class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
||||
"nav.skip_to_main"
|
||||
}}</a
|
||||
>
|
||||
</div>
|
||||
{{ $header := print "header/" .Site.Params.header.layout ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $header ) }}
|
||||
{{ partial $header . }}
|
||||
{{ else }}
|
||||
{{ partial "header/basic.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</body>
|
||||
{{ if .Site.Params.buymeacoffee.globalWidget | default false }}
|
||||
<script data-name="BMC-Widget" data-cfasync="false" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
|
||||
data-id="{{ .Site.Params.buymeacoffee.identifier }}" data-description="Support me on Buy me a coffee!" data-message="{{ .Site.Params.buymeacoffee.globalWidgetMessage | default "" }}"
|
||||
data-color="{{ .Site.Params.buymeacoffee.globalWidgetColor | default "#FFDD00" }}" data-position="{{ .Site.Params.buymeacoffee.globalWidgetPosition | default "Left" }}" data-x_margin="18" data-y_margin="18"></script>
|
||||
{{ end }}
|
||||
<div class="relative flex flex-col grow">
|
||||
<main id="main-content" class="grow">
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
||||
{{- partial "scroll-to-top.html" . -}}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{ if .Site.Params.enableSearch | default false }}
|
||||
{{- partial "search.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</body>
|
||||
{{ if .Site.Params.buymeacoffee.globalWidget | default false }}
|
||||
<script
|
||||
data-name="BMC-Widget"
|
||||
data-cfasync="false"
|
||||
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
|
||||
data-id="{{ .Site.Params.buymeacoffee.identifier }}"
|
||||
data-description="Support me on Buy me a coffee!"
|
||||
data-message="{{ .Site.Params.buymeacoffee.globalWidgetMessage | default "" }}"
|
||||
data-color="{{ .Site.Params.buymeacoffee.globalWidgetColor | default "#FFDD00" }}"
|
||||
data-position="{{ .Site.Params.buymeacoffee.globalWidgetPosition | default "Left" }}"
|
||||
data-x_margin="18"
|
||||
data-y_margin="18"></script>
|
||||
{{ end }}
|
||||
</html>
|
||||
|
||||
@@ -1,102 +1,118 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "scope" "single" }}
|
||||
{{ .Scratch.Set "scope" "single" }}
|
||||
|
||||
<article>
|
||||
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
|
||||
{{ $heroStyle := .Params.heroStyle }}
|
||||
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
|
||||
{{ $heroStyle := print "hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<header id="single_header" class="mt-5 max-w-prose">
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
|
||||
{{ .Title | emojify }}
|
||||
</h1>
|
||||
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
|
||||
{{ $authorsData := .Site.Data.authors }}
|
||||
{{ $taxonomies := .Site.Taxonomies.authors }}
|
||||
{{ $baseURL := .Site.BaseURL }}
|
||||
{{ $taxonomyLink := 0 }}
|
||||
{{ $showAuthor := 0 }}
|
||||
|
||||
{{ if not (strings.HasSuffix $baseURL "/") }}
|
||||
{{ $baseURL = delimit (slice $baseURL "/") "" }}
|
||||
<article>
|
||||
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
|
||||
{{ $heroStyle := .Params.heroStyle }}
|
||||
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
|
||||
{{ $heroStyle := print "hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
|
||||
|
||||
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
||||
{{ $showAuthor = 1 }}
|
||||
{{ partial "author.html" . }}
|
||||
<header id="single_header" class="mt-5 max-w-prose">
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $author := .Page.Params.authors }}
|
||||
{{ $authorData := index $authorsData $author }}
|
||||
{{- if $authorData -}}
|
||||
{{ range $taxonomyname, $taxonomy := $taxonomies }}
|
||||
{{ if (eq $taxonomyname $author) }}
|
||||
{{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $finalLink := $taxonomyLink }}
|
||||
{{ $currentLang := $.Site.Language.Lang }}
|
||||
{{ if eq $.Site.LanguagePrefix "" }}
|
||||
{{ $finalLink = printf "%sauthors/%s/" $baseURL $author }}
|
||||
{{ else }}
|
||||
{{ $finalLink = printf "%s%s/authors/%s/" $baseURL $currentLang $author }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $finalLink) }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $taxonomyLink $showAuthor }}
|
||||
<div class="mb-5"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
</header>
|
||||
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
|
||||
{{ if or (and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")) (.Site.Params.article.showRelatedPosts | default false) }} <div
|
||||
class="order-first lg:ml-auto px-0 lg:order-last ltr:lg:pl-8 rtl:lg:pr-8">
|
||||
<div class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky {{ if hasPrefix .Site.Params.header.layout "fixed" -}}
|
||||
lg:top-[140px]{{ else }}lg:top-10{{ end }}">
|
||||
|
||||
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }} {{ partial "toc.html" . }} {{ end }} {{ if .Site.Params.article.showRelatedPosts |
|
||||
default false }} sd {{ end }} </div>
|
||||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
|
||||
{{ .Title | emojify }}
|
||||
</h1>
|
||||
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
|
||||
{{ $authorsData := .Site.Data.authors }}
|
||||
{{ $taxonomies := .Site.Taxonomies.authors }}
|
||||
{{ $baseURL := .Site.BaseURL }}
|
||||
{{ $taxonomyLink := 0 }}
|
||||
{{ $showAuthor := 0 }}
|
||||
|
||||
{{ if not (strings.HasSuffix $baseURL "/") }}
|
||||
{{ $baseURL = delimit (slice $baseURL "/") "" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
|
||||
|
||||
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
||||
{{ $showAuthor = 1 }}
|
||||
{{ partial "author.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $author := .Page.Params.authors }}
|
||||
{{ $authorData := index $authorsData $author }}
|
||||
{{- if $authorData -}}
|
||||
{{ range $taxonomyname, $taxonomy := $taxonomies }}
|
||||
{{ if (eq $taxonomyname $author) }}
|
||||
{{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $finalLink := $taxonomyLink }}
|
||||
{{ $currentLang := $.Site.Language.Lang }}
|
||||
{{ if eq $.Site.LanguagePrefix "" }}
|
||||
{{ $finalLink = printf "%sauthors/%s/" $baseURL $author }}
|
||||
{{ else }}
|
||||
{{ $finalLink = printf "%s%s/authors/%s/" $baseURL $currentLang $author }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $finalLink) }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if or $taxonomyLink $showAuthor }}
|
||||
<div class="mb-5"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
</header>
|
||||
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
{{ if or (and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")) (.Site.Params.article.showRelatedPosts | default false)
|
||||
}}
|
||||
<div class="order-first lg:ml-auto px-0 lg:order-last ltr:lg:pl-8 rtl:lg:pr-8">
|
||||
<div
|
||||
class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky {{ if hasPrefix .Site.Params.header.layout "fixed" -}}
|
||||
lg:top-[140px]
|
||||
{{ else }}
|
||||
lg:top-10
|
||||
{{ end }}
|
||||
">
|
||||
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
{{ partial "toc.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.article.showRelatedPosts |
|
||||
default false
|
||||
}}
|
||||
sd
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="min-w-0 min-h-0 max-w-fit">
|
||||
|
||||
{{ partial "series/series.html" . }}
|
||||
|
||||
|
||||
<div class="article-content max-w-prose mb-20">
|
||||
{{ .Content }}
|
||||
{{ $defaultReplyByEmail := .Site.Params.replyByEmail }}
|
||||
{{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }}
|
||||
{{ if $replyByEmail }}
|
||||
<strong class="block mt-8">
|
||||
<a target="_blank"
|
||||
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
||||
href="mailto:{{ .Site.Params.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}">
|
||||
<a
|
||||
target="_blank"
|
||||
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
||||
href="mailto:{{ .Site.Params.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}">
|
||||
Reply by Email
|
||||
</a>
|
||||
</strong>
|
||||
@@ -123,7 +139,7 @@
|
||||
{{ end }}
|
||||
|
||||
{{ if or $taxonomyLink $showAuthor }}
|
||||
<div class="mb-10"></div>
|
||||
<div class="mb-10"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
@@ -136,31 +152,35 @@
|
||||
{{ $translations := .AllTranslations }}
|
||||
{{ with .File }}
|
||||
{{ $path := .Path }}
|
||||
{{range $translations}}
|
||||
{{ range $translations }}
|
||||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{end}}
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_{{ $path }}" data-oid-likes="likes_{{ $path }}"></script>
|
||||
{{ end }}
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_{{ $path }}"
|
||||
data-oid-likes="likes_{{ $path }}"></script>
|
||||
{{ end }}
|
||||
|
||||
</section>
|
||||
<footer class="pt-8 max-w-prose print:hidden">
|
||||
|
||||
{{ partial "article-pagination.html" . }}
|
||||
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
|
||||
{{ if templates.Exists "partials/comments.html" }}
|
||||
<div class="pt-3">
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
|
||||
<div class="pt-3">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ warnf "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
</article>
|
||||
<footer class="pt-8 max-w-prose print:hidden">
|
||||
{{ partial "article-pagination.html" . }}
|
||||
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
|
||||
{{ if templates.Exists "partials/comments.html" }}
|
||||
<div class="pt-3">
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600">
|
||||
<div class="pt-3">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ warnf "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,127 +1,128 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "scope" "term" }}
|
||||
{{ if .Site.Params.term.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ .Scratch.Set "scope" "term" }}
|
||||
{{ if .Site.Params.term.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.term.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }} <header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.term.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/term.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.term.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
<header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.term.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta/term.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="flex flex-col max-w-full mt-0 mb-5 prose dark:prose-invert lg:flex-row">
|
||||
{{ if .Content }}
|
||||
<div class="min-w-0 min-h-0 max-w-prose">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_term_{{ .Data.Term }}" data-oid-likes="likes_term_{{ .Data.Term }}"></script>
|
||||
<div class="min-w-0 min-h-0 max-w-prose">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_term_{{ .Data.Term }}"
|
||||
data-oid-likes="likes_term_{{ .Data.Term }}"></script>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
|
||||
{{ if gt .Pages 0 }}
|
||||
{{ $cardView := .Params.cardView | default (.Site.Params.term.cardView | default false) }}
|
||||
{{ $cardViewScreenWidth := .Site.Params.term.cardViewScreenWidth | default false }}
|
||||
{{ $groupByYear := .Params.groupByYear | default ($.Site.Params.term.groupByYear | default false) }}
|
||||
|
||||
{{ $cardView := .Params.cardView | default (.Site.Params.term.cardView | default false) }}
|
||||
{{ $cardViewScreenWidth := .Site.Params.term.cardViewScreenWidth | default false }}
|
||||
{{ $groupByYear := .Params.groupByYear | default ($.Site.Params.term.groupByYear | default false) }}
|
||||
{{ if not $cardView }}
|
||||
|
||||
{{ if not $cardView }}
|
||||
<section class="space-y-10 w-full">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ if $groupByYear }}
|
||||
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/simple.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ else if and $cardView (not $cardViewScreenWidth) }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ else if and $cardView $cardViewScreenWidth }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<section class="space-y-10 w-full">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ if $groupByYear }}
|
||||
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/simple.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ else if and $cardView (not $cardViewScreenWidth) }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ else if and $cardView $cardViewScreenWidth }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||
{{ .Key }}
|
||||
</h2>
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
<section class="mt-10 prose dark:prose-invert">
|
||||
<p class="py-8 border-t">
|
||||
<em>{{ i18n "term.no_articles" | emojify }}</em>
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{end}}
|
||||
|
||||
{{ else }}
|
||||
<section class="mt-10 prose dark:prose-invert">
|
||||
<p class="py-8 border-t">
|
||||
<em>{{ i18n "term.no_articles" | emojify }}</em>
|
||||
</p>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.taxonomy.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.taxonomy.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }}
|
||||
|
||||
<header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
|
||||
@@ -28,28 +29,29 @@
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</section>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_taxonomy_{{ .Data.Plural }}" data-oid-likes="likes_taxonomy_{{ .Data.Plural }}"></script>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_taxonomy_{{ .Data.Plural }}"
|
||||
data-oid-likes="likes_taxonomy_{{ .Data.Plural }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.taxonomy.cardView }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ else }}
|
||||
|
||||
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/text.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/text.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
{{ if isset site.Params.fathomAnalytics "domain" }}
|
||||
<script defer src="https://{{ site.Params.fathomAnalytics.domain }}/script.js" data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
<script
|
||||
defer
|
||||
src="https://{{ site.Params.fathomAnalytics.domain }}/script.js"
|
||||
data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
{{ else }}
|
||||
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
<script
|
||||
defer
|
||||
src="https://cdn.usefathom.com/script.js"
|
||||
data-site="{{ site.Params.fathomAnalytics.site }}"></script>
|
||||
{{ end }}
|
||||
@@ -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);}
|
||||
|
||||
@@ -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 }}
|
||||
@@ -1,18 +1,21 @@
|
||||
<script async src="https://cdn.seline.so/seline.js" data-token="{{ site.Params.selineAnalytics.token }}" data-id="seline-script"></script>
|
||||
<script
|
||||
async
|
||||
src="https://cdn.seline.so/seline.js"
|
||||
data-token="{{ site.Params.selineAnalytics.token }}"
|
||||
data-id="seline-script"></script>
|
||||
|
||||
{{ if .Site.Params.selineAnalytics.enableTrackEvent | default true }}
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="seline-script"]')
|
||||
.addEventListener('load', function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute('content');
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute('content');
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content');
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="seline-script"]').addEventListener("load", function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
||||
|
||||
seline.track("user:" + type + ':' + title, {
|
||||
type: type,
|
||||
title: title,
|
||||
url: url
|
||||
});
|
||||
});
|
||||
</script>
|
||||
seline.track("user:" + type + ":" + title, {
|
||||
type: type,
|
||||
title: title,
|
||||
url: url,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
{{ if isset site.Params.umamiAnalytics "domain" }}
|
||||
<script data-id="umami-script" async
|
||||
src="https://{{ site.Params.umamiAnalytics.domain }}/{{ with site.Params.umamiAnalytics.scriptName }}{{ . }}{{ else }}script.js{{ end }}"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}"
|
||||
{{ with site.Params.umamiAnalytics.dataDomains }}data-domains="{{ . }}"{{ end }}>
|
||||
</script>
|
||||
<script
|
||||
data-id="umami-script"
|
||||
async
|
||||
src="https://{{ site.Params.umamiAnalytics.domain }}/{{ with site.Params.umamiAnalytics.scriptName }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
script.js
|
||||
{{ end }}"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}"
|
||||
{{ with site.Params.umamiAnalytics.dataDomains }}data-domains="{{ . }}"{{ end }}></script>
|
||||
{{ else }}
|
||||
<script data-id="umami-script" async src="https://analytics.umami.is/script.js"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}">
|
||||
</script>
|
||||
<script
|
||||
data-id="umami-script"
|
||||
async
|
||||
src="https://analytics.umami.is/script.js"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.umamiAnalytics.enableTrackEvent | default true }}
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="umami-script"]')
|
||||
.addEventListener('load', function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute('content');
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute('content');
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content');
|
||||
umami.track(type + ':' + title, {'url': url});
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="umami-script"]').addEventListener("load", function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
||||
umami.track(type + ":" + title, { url: url });
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{{ end }}
|
||||
@@ -9,112 +9,117 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{ $shouldShowDate := false }}
|
||||
{{ if and (eq $scope "single") (.Params.showDateOnlyInArticle | default (.Site.Params.article.showDateOnlyInArticle | default false)) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ end }}
|
||||
|
||||
{{/* showDate has higher priority than showDateOnlyInArticle */}}
|
||||
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ else }}
|
||||
{{ $shouldShowDate = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $shouldShowDate }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial
|
||||
"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) (gt (.Lastmod | time.Format "2006") 1) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/word-count.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0)
|
||||
}}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/reading-time.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showViews | default (.Site.Params.article.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showEdit | default (.Site.Params.article.showEdit | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/edit.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showZenMode | default (.Site.Params.article.showZenMode | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/zen-mode.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{/* Gather partials for this context */}}
|
||||
{{ $shouldShowDate := false }}
|
||||
{{ if and (eq $scope "single") (.Params.showDateOnlyInArticle | default (.Site.Params.article.showDateOnlyInArticle | default false)) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Output draft label */}}
|
||||
{{ if and (eq $scope "single") (and .Draft .Site.Params.article.showDraftLabel) }}
|
||||
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
|
||||
{{/* showDate has higher priority than showDateOnlyInArticle */}}
|
||||
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
||||
{{ $shouldShowDate = true }}
|
||||
{{ else }}
|
||||
{{ $shouldShowDate = false }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if (eq $taxonomy "authors")}}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $i, $a := $context.GetTerms $taxonomy }}
|
||||
{{ if not (eq $i 0) }} , {{ end }} <div class="cursor-pointer" onclick="window.open({{ $a.RelPermalink }},'_self');return false;">{{ $a.LinkTitle }}</div>
|
||||
{{ if $shouldShowDate }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output taxonomies */}}
|
||||
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
<span class="mr-2 margin-top-[0.5rem]" onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial
|
||||
"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) (gt (.Lastmod | time.Format "2006") 1)
|
||||
}}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output only category */}}
|
||||
{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range (.GetTerms "categories") }}
|
||||
<span class="mr-2 margin-top-[0.5rem]" onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/word-count.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/reading-time.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showViews | default (.Site.Params.article.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (not .Params.externalURL) (.Params.showLikes | default (.Site.Params.article.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showEdit | default (.Site.Params.article.showEdit | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/edit.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showZenMode | default (.Site.Params.article.showZenMode | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/zen-mode.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Output draft label */}}
|
||||
{{ if and (eq $scope "single") (and .Draft .Site.Params.article.showDraftLabel) }}
|
||||
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if (eq $taxonomy "authors") }}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $i, $a := $context.GetTerms $taxonomy }}
|
||||
{{ if not (eq $i 0) }}, {{ end }}
|
||||
<div class="cursor-pointer" onclick="window.open({{ $a.RelPermalink }},'_self');return false;">
|
||||
{{ $a.LinkTitle }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output taxonomies */}}
|
||||
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series")) }}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
<span
|
||||
class="mr-2 margin-top-[0.5rem]"
|
||||
onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Output only category */}}
|
||||
{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range (.GetTerms "categories") }}
|
||||
<span class="mr-2 margin-top-[0.5rem]" onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -4,33 +4,32 @@
|
||||
{{ $scope := default nil }}
|
||||
|
||||
{{ if (reflect.IsMap . ) }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{/* Gather partials for this context */}}
|
||||
|
||||
{{ if (.Params.showViews | default (.Site.Params.list.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML}}
|
||||
{{ if (.Params.showViews | default (.Site.Params.list.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -4,33 +4,32 @@
|
||||
{{ $scope := default nil }}
|
||||
|
||||
{{ if (reflect.IsMap . ) }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{/* Gather partials for this context */}}
|
||||
|
||||
{{ if (.Params.showViews | default (.Site.Params.taxonomy.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML}}
|
||||
{{ if (.Params.showViews | default (.Site.Params.taxonomy.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.taxonomy.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -4,33 +4,32 @@
|
||||
{{ $scope := default nil }}
|
||||
|
||||
{{ if (reflect.IsMap . ) }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ $context = .context }}
|
||||
{{ $scope = cond (not .scope) nil .scope }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $context }}
|
||||
{{ $meta := newScratch }}
|
||||
{{ $meta := newScratch }}
|
||||
|
||||
{{/* Gather partials for this context */}}
|
||||
{{/* Gather partials for this context */}}
|
||||
|
||||
{{ if (.Params.showViews | default (.Site.Params.term.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML}}
|
||||
{{ if (.Params.showViews | default (.Site.Params.term.showViews | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.term.showLikes | default false)) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{/* Output partials */}}
|
||||
{{ with ($meta.Get "partials") }}
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -7,7 +7,7 @@
|
||||
{{ $prev = .NextInSection }}
|
||||
{{ end }}
|
||||
<div class="pt-8">
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600">
|
||||
<div class="flex justify-between pt-3">
|
||||
<span>
|
||||
{{ if $prev }}
|
||||
@@ -21,8 +21,7 @@
|
||||
>→</span
|
||||
>
|
||||
<span class="flex flex-col">
|
||||
<span
|
||||
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
<span class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
>{{ $prev.Title | emojify }}</span
|
||||
>
|
||||
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
|
||||
@@ -38,8 +37,7 @@
|
||||
{{ if $next }}
|
||||
<a class="flex text-right group ml-3" href="{{ $next.RelPermalink }}">
|
||||
<span class="flex flex-col">
|
||||
<span
|
||||
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
<span class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
|
||||
>{{ $next.Title | emojify }}</span
|
||||
>
|
||||
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
|
||||
|
||||
@@ -1,42 +1,56 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<div class="flex author author-extra mt-4">
|
||||
{{ with .data.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="place-self-center">
|
||||
{{ $link := .link}}
|
||||
{{ $link := .link }}
|
||||
{{ with .data.name | markdownify | emojify }}
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<a {{ if $link }} href="{{ $link }}" {{ end }} class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</a>
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<a
|
||||
{{ if $link }}href="{{ $link }}"{{ end }}
|
||||
class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .data.bio | markdownify }}
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
{{ end }}
|
||||
<div class="text-2xl sm:text-lg">
|
||||
<div class="flex flex-wrap text-neutral-400 dark:text-neutral-500">
|
||||
{{ range .data.social }}
|
||||
{{ range $name, $link := . }}
|
||||
<a class="px-1 hover:text-primary-700 dark:hover:text-primary-400" href="{{ $link }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer"><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a>
|
||||
{{ end }}
|
||||
{{ range $name, $link := . }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-700 dark:hover:text-primary-400"
|
||||
href="{{ $link }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,28 +11,36 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="place-self-center">
|
||||
{{ with .Site.Params.Author.name | markdownify }}
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</div>
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Author.bio | markdownify }}
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
|
||||
{{ end }}
|
||||
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<span class="flex cursor-pointer">
|
||||
<span class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
||||
<span
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
||||
{{ . }}
|
||||
</span>
|
||||
</span>
|
||||
@@ -7,10 +7,8 @@
|
||||
{{ else if not .p1.IsHome }}
|
||||
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||
{{ end }}
|
||||
<li class="{{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{else}}inline{{ end }}">
|
||||
<a
|
||||
class="hover:underline decoration-neutral-300 dark:underline-neutral-600"
|
||||
href="{{ .p1.RelPermalink }}"
|
||||
<li class="{{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ else }}inline{{ end }}">
|
||||
<a class="hover:underline decoration-neutral-300 dark:underline-neutral-600" href="{{ .p1.RelPermalink }}"
|
||||
>{{ if .p1.Title }}
|
||||
{{- .p1.Title -}}
|
||||
{{ else }}
|
||||
|
||||
@@ -2,50 +2,53 @@
|
||||
{{/* Footer menu */}}
|
||||
{{ if .Site.Params.footer.showMenu | default true }}
|
||||
{{ if .Site.Menus.footer }}
|
||||
<nav class="flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
||||
<ul class="flex flex-col list-none sm:flex-row">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
|
||||
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center" href="{{ .URL }}"
|
||||
title="{{ .Title }}">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ .Name | markdownify }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
||||
<ul class="flex flex-col list-none sm:flex-row">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li
|
||||
class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
|
||||
<a
|
||||
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center"
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ .Name | markdownify }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="flex items-center justify-between">
|
||||
|
||||
{{/* Copyright */}}
|
||||
{{ if .Site.Params.footer.showCopyright | default true }}
|
||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
||||
{{ . | markdownify }}
|
||||
{{- else }}
|
||||
©
|
||||
{{ now.Format "2006" }}
|
||||
{{ .Site.Params.Author.name | markdownify }}
|
||||
{{- end }}
|
||||
</p>
|
||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
||||
{{ . | markdownify }}
|
||||
{{- else }}
|
||||
©
|
||||
{{ now.Format "2006" }}
|
||||
{{ .Site.Params.Author.name | markdownify }}
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{/* Theme attribution */}}
|
||||
{{ if .Site.Params.footer.showThemeAttribution | default true }}
|
||||
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
||||
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
||||
}}
|
||||
{{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>` }}
|
||||
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
|
||||
</p>
|
||||
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
||||
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
||||
}}
|
||||
{{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>`
|
||||
}}
|
||||
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
@@ -57,12 +60,14 @@
|
||||
scrollOffset: 0,
|
||||
})
|
||||
{{ end }}
|
||||
</script>
|
||||
{{ $jsProcess := resources.Get "js/process.js" }}
|
||||
</script> {{ $jsProcess := resources.Get "js/process.js" }}
|
||||
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsProcess.RelPermalink }}" integrity="{{ $jsProcess.Data.Integrity }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsProcess.RelPermalink }}"
|
||||
integrity="{{ $jsProcess.Data.Integrity }}"></script>
|
||||
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
||||
{{ if templates.Exists "partials/extend-footer.html" }}
|
||||
{{ partialCached "extend-footer.html" . }}
|
||||
{{ partialCached "extend-footer.html" . }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<div class="min-h-[148px]"></div>
|
||||
<div class="fixed inset-x-0 pl-[24px] pr-[24px] z-index-100">
|
||||
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom bg-neutral dark:bg-neutral-800"></div>
|
||||
<div
|
||||
id="menu-blur"
|
||||
class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom bg-neutral dark:bg-neutral-800"></div>
|
||||
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
||||
{{ partial "header/basic.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="menu-blur"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="menu-blur"></script>
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
<div class="min-h-[148px]"></div>
|
||||
<div class="fixed inset-x-0 min-h-[130px] opacity-65 pl-[24px] pr-[24px] bg-gradient-to-b from-neutral from-60% dark:from-neutral-800 to-transparent mix-blend-normal z-index-80"></div>
|
||||
<div
|
||||
class="fixed inset-x-0 min-h-[130px] opacity-65 pl-[24px] pr-[24px] bg-gradient-to-b from-neutral from-60% dark:from-neutral-800 to-transparent mix-blend-normal z-index-80"></div>
|
||||
<div class="fixed inset-x-0 pl-[24px] pr-[24px] z-index-100">
|
||||
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div
|
||||
id="menu-blur"
|
||||
class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
||||
{{ partial "header/basic.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="menu-blur"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="menu-blur"></script>
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<div class="min-h-[148px]"></div>
|
||||
<div class="fixed inset-x-0 pl-[24px] pr-[24px] z-index-100">
|
||||
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div
|
||||
id="menu-blur"
|
||||
class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl shadow-2xl"></div>
|
||||
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
||||
{{ partial "header/basic.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="menu-blur"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="menu-blur"></script>
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
<span>
|
||||
{{ partial "icon.html" "chevron-down" }}
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
<span>
|
||||
{{ partial "icon.html" "chevron-down" }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ range .Children }}
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
<li class="mt-1">
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
)
|
||||
}}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-sm font-small" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<p class="text-sm font-small" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="mb-2"></li>
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<div {{ if and .Pre .Name}} class="mr-2" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
)
|
||||
}}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<div {{ if and .Pre .Name }}class="mr-2"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
<div>
|
||||
<div class="cursor-pointer flex items-center nested-menu">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<a {{ if .URL }} href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank" {{ end }} {{ end }} class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||
<a
|
||||
{{ if .URL }}
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"
|
||||
title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</a>
|
||||
<span>
|
||||
@@ -17,17 +24,21 @@
|
||||
<div class="pt-2 p-5 mt-2 rounded-xl backdrop-blur shadow-2xl">
|
||||
<div class="flex flex-col space-y-3">
|
||||
{{ range .Children }}
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-sm font-sm" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-sm font-sm" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }} target="_blank" {{
|
||||
end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}target="_blank"{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<p class="text-base font-medium" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<p class="text-base font-medium" title="{{ .Title }}">
|
||||
{{ .Name | markdownify }}
|
||||
</p>
|
||||
</a>
|
||||
|
||||
@@ -6,28 +6,32 @@
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
|
||||
{{ if and .Params.featureimage (not $featured) }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{ $featured = resources.GetRemote $url }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{ $featured = resources.GetRemote $url }}
|
||||
{{ end }}
|
||||
|
||||
{{- if not $featured }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- with $featured -}}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg")}}
|
||||
{{ with . }}
|
||||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }}
|
||||
{{ with . }}
|
||||
<div
|
||||
class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div
|
||||
class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
@@ -6,55 +6,71 @@
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
|
||||
{{ if .Params.featureimage }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
{{- if not $featured }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $caption := "" }}
|
||||
{{ if .Params.featureimagecaption }}
|
||||
{{- $caption = .Params.featureimagecaption -}}
|
||||
{{- $caption = .Params.featureimagecaption -}}
|
||||
{{ end }}
|
||||
|
||||
{{- $alt := .Page.Title -}}
|
||||
{{- with .Page.Params.alt }}{{ $alt = . }}{{ end -}}
|
||||
|
||||
{{- with $featured -}}
|
||||
{{ if strings.HasSuffix $featured ".svg" }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
{{end}}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else if $disableImageOptimization }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
{{end}}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
{{end}}
|
||||
</figure>
|
||||
{{ if strings.HasSuffix $featured ".svg" }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else if $disableImageOptimization }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img
|
||||
class="w-full rounded-lg single_hero_round nozoom"
|
||||
alt="{{ $alt }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<figure>
|
||||
<img
|
||||
class="w-full rounded-lg single_hero_round nozoom"
|
||||
alt="{{ $alt }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
@@ -4,13 +4,13 @@
|
||||
{{- $background := $images.GetMatch "*background*" -}}
|
||||
|
||||
{{- if not $background }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $background = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $background = resources.Get . }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $background = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $background = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if not $background }}{{ $background = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
@@ -18,69 +18,81 @@
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{ if .Params.featureimage }}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{- $url:= .Params.featureimage -}}
|
||||
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
||||
{{ end }}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "*background*" }}{{ end -}}
|
||||
|
||||
{{- if not $featured }}
|
||||
{{ with .Site.Params.defaultFeaturedImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ with .Site.Params.defaultFeaturedImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $featured = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $featured = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
||||
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
||||
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
||||
(and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList))
|
||||
) }}
|
||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
||||
(and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList))
|
||||
)
|
||||
}}
|
||||
|
||||
{{- with $featured -}}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg")}}
|
||||
{{ with . }}
|
||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg") }}
|
||||
{{ with . }}
|
||||
<div
|
||||
class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div
|
||||
class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $background -}}
|
||||
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg")}}
|
||||
{{ with . }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
</div>{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
</div>{{ end }}
|
||||
{{ end }}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg") }}
|
||||
{{ with . }}
|
||||
<div
|
||||
class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div
|
||||
class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{ if $shouldBlur | default false }}
|
||||
<div id="background-blur" class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="background-blur"></script>
|
||||
<div
|
||||
id="background-blur"
|
||||
class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="background-blur"></script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -1,84 +1,102 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative sm:overflow-hidden">
|
||||
<div class="fixed inset-x-0 top-0 z-index-[-10]">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="w-full h-[1000px] object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}" role="presentation">
|
||||
<div
|
||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
<div
|
||||
class="opacity-60 absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral-100 dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-1 py-1 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose dark:prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative sm:overflow-hidden">
|
||||
<div class="fixed inset-x-0 top-0 z-index-[-10]">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img
|
||||
class="w-full h-[1000px] object-cover m-0 nozoom margin-0"
|
||||
src="{{ $homepageImage.RelPermalink }}"
|
||||
role="presentation">
|
||||
<div
|
||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
<div
|
||||
class="opacity-60 absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral-100 dark:to-neutral-800 mix-blend-normal"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-1 py-1 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose dark:prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<section>
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
</section>
|
||||
{{ if .Site.Params.homepage.layoutBackgroundBlur | default false }}
|
||||
<div id="background-blur" class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $backgroundBlur.RelPermalink }}" integrity="{{ $backgroundBlur.Data.Integrity }}" data-target-id="background-blur"></script>
|
||||
<div
|
||||
id="background-blur"
|
||||
class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
{{ $backgroundBlur := resources.Get "js/background-blur.js" }}
|
||||
{{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="background-blur"></script>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,43 +1,44 @@
|
||||
<div class="relative pt-16 pb-32">
|
||||
<div aria-hidden="true" class="absolute inset-x-0 top-0 h-48 bg-gradient-to-b from-gray-100"></div>
|
||||
<div class="relative">
|
||||
<div class="lg:mx-auto lg:grid lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-2 lg:gap-24 lg:px-8">
|
||||
<div class="mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
{{ with .Title }}
|
||||
<header>
|
||||
<h1>{{ . | emojify }}</h1>
|
||||
</header>
|
||||
{{ end }}
|
||||
<section>{{ .Content }}</section>
|
||||
</article>
|
||||
</div>
|
||||
<div class="mt-6 sm:mt-16 lg:mt-0 mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<div class="-mr-48 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0 w-full">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div aria-hidden="true" class="absolute inset-x-0 top-0 h-48 bg-gradient-to-b from-gray-100"></div>
|
||||
<div class="relative">
|
||||
<div class="lg:mx-auto lg:grid lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-2 lg:gap-24 lg:px-8">
|
||||
<div class="mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
{{ with .Title }}
|
||||
<header>
|
||||
<h1>{{ . | emojify }}</h1>
|
||||
</header>
|
||||
{{ end }}
|
||||
<section>{{ .Content }}</section>
|
||||
</article>
|
||||
</div>
|
||||
<div class="mt-6 sm:mt-16 lg:mt-0 mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
|
||||
<div class="-mr-48 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0 w-full">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img
|
||||
class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section>
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
</section>
|
||||
|
||||
@@ -1,99 +1,116 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
{{ $disableHeroImageFilter := .Site.Params.homepage.disableHeroImageFilter | default false }}
|
||||
<article class="max-w-full prose dark:prose-invert">
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
|
||||
<div class="absolute inset-0">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="h-full w-full object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
|
||||
</div>
|
||||
{{ else }}
|
||||
<div
|
||||
class="absolute inset-0 from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-300" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
{{ else }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div class="absolute inset-x-0 bottom-0 h-1/2 bg-gray-100"></div>
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
|
||||
<div class="absolute inset-0">
|
||||
{{ $homepageImage := "" }}
|
||||
{{ with .Site.Params.defaultBackgroundImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $homepageImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $homepageImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="h-full w-full object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply"></div>
|
||||
{{ else }}
|
||||
<div
|
||||
class="absolute inset-0 from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div
|
||||
class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="mt-3 mb-10 text-2xl">
|
||||
{{ with .Site.Params.Author.links }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-300"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ else }}
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<section class="prose prose-invert">{{ .Content }}</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<section>
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<article class="{{ if not .Site.Params.homepage.showRecent }}
|
||||
<article
|
||||
class="{{ if not .Site.Params.homepage.showRecent }}
|
||||
h-full
|
||||
{{ end }} flex flex-col items-center justify-center text-center">
|
||||
<header class="relative px-1 py-1 flex flex-col items-center mb-3">
|
||||
@@ -14,17 +15,21 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144" alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="text-4xl font-extrabold">
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
|
||||
{{ . | markdownify }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
<div class="mt-1 text-2xl">
|
||||
{{ partialCached "author-links.html" . }}
|
||||
|
||||
@@ -8,15 +8,18 @@
|
||||
{{ $translations := .AllTranslations }}
|
||||
{{ with .File }}
|
||||
{{ $path := .Path }}
|
||||
{{range $translations}}
|
||||
{{ range $translations }}
|
||||
{{ $lang := print "." .Lang ".md" }}
|
||||
{{ $path = replace $path $lang ".md" }}
|
||||
{{end}}
|
||||
{{ end }}
|
||||
{{ $id = delimit (slice "likes_" $path) "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<span id="{{ $id }}"
|
||||
<span
|
||||
id="{{ $id }}"
|
||||
class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400"
|
||||
title="likes">loading</span>
|
||||
title="likes"
|
||||
>loading</span
|
||||
>
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }}</span>
|
||||
</span>
|
||||
@@ -1,10 +1,15 @@
|
||||
<span>
|
||||
<button id="button_likes"
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
|
||||
onclick="process_article()">
|
||||
<span id="button_likes_heart" class="inline-block align-text-bottom hidden">{{ partial "icon.html" "heart" }} </span>
|
||||
<span id="button_likes_emtpty_heart" class="inline-block align-text-bottom">{{ partial "icon.html" "heart-empty" }}</span>
|
||||
<span id="button_likes_text"> Like</span>
|
||||
</button>
|
||||
<button
|
||||
id="button_likes"
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
|
||||
onclick="process_article()">
|
||||
<span id="button_likes_heart" class="inline-block align-text-bottom hidden"
|
||||
>{{ partial "icon.html" "heart" }}
|
||||
</span>
|
||||
<span id="button_likes_emtpty_heart" class="inline-block align-text-bottom"
|
||||
>{{ partial "icon.html" "heart-empty" }}</span
|
||||
>
|
||||
<span id="button_likes_text"> Like</span>
|
||||
</button>
|
||||
</span>
|
||||
{{- /* Trim EOF */ -}}
|
||||
@@ -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>
|
||||
@@ -1,14 +1,19 @@
|
||||
{{ $jsZenMode := resources.Get "js/zen-mode.js" }}
|
||||
{{ $jsZenMode = $jsZenMode | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
|
||||
<script type="text/javascript" src="{{ $jsZenMode.RelPermalink }}" integrity="{{ $jsZenMode.Data.Integrity }}"></script>
|
||||
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsZenMode.RelPermalink }}"
|
||||
integrity="{{ $jsZenMode.Data.Integrity }}"></script>
|
||||
|
||||
<span class="mb-[2px]">
|
||||
<span id="zen-mode-button"
|
||||
class="text-lg hover:text-primary-500"
|
||||
title="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-disable="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-enable="{{ i18n "article.zen_mode_title.disable" }}">
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "expand" }}</span>
|
||||
</span>
|
||||
<span
|
||||
id="zen-mode-button"
|
||||
class="text-lg hover:text-primary-500"
|
||||
title="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-disable="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-enable="{{ i18n "article.zen_mode_title.disable" }}">
|
||||
<span class="inline-block align-text-bottom">{{ partial "icon.html" "expand" }}</span>
|
||||
</span>
|
||||
</span>
|
||||
@@ -2,13 +2,14 @@
|
||||
<ul class="flex flex-row mt-8 justify-center">
|
||||
{{- .Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{ if $.Paginator.HasPrev }}
|
||||
<li>
|
||||
<a
|
||||
<li>
|
||||
<a
|
||||
href="{{ $.Paginator.Prev.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="prev"
|
||||
>←</a>
|
||||
</li>
|
||||
>←</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- range $.Paginator.Pagers -}}
|
||||
{{- $right := sub .TotalPages .PageNumber -}}
|
||||
@@ -24,12 +25,13 @@
|
||||
{{- if $showNumber -}}
|
||||
<li>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
class="{{ if eq . $.Paginator }}
|
||||
bg-primary-200 dark:bg-primary-400 dark:text-neutral-800
|
||||
{{ end }} mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
>{{ .PageNumber }}</a>
|
||||
</li>
|
||||
href="{{ .URL }}"
|
||||
class="{{ if eq . $.Paginator }}
|
||||
bg-primary-200 dark:bg-primary-400 dark:text-neutral-800
|
||||
{{ end }} mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
>{{ .PageNumber }}</a
|
||||
>
|
||||
</li>
|
||||
{{- else if ($.Scratch.Get "paginator.shouldEllipse") -}}
|
||||
<li class="page-item ">
|
||||
<span class="page-link" aria-hidden="true">…</span>
|
||||
@@ -37,13 +39,14 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ if $.Paginator.HasNext }}
|
||||
<li>
|
||||
<a
|
||||
<li>
|
||||
<a
|
||||
href="{{ $.Paginator.Next.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="next"
|
||||
>→</a>
|
||||
</li>
|
||||
>→</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
@@ -1,12 +1,13 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
|
||||
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<section
|
||||
class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
|
||||
.Site.Params.mainSections)).Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
.Site.Params.mainSections)).Pages
|
||||
}}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
@@ -1,9 +1,11 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
|
||||
.Site.Params.mainSections)).Pages }}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
.Site.Params.mainSections)).Pages
|
||||
}}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
@@ -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
|
||||
}}
|
||||
{{ partial "article-link/simple.html" . }}
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages }}
|
||||
{{ partial "article-link/simple.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
@@ -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 }}
|
||||
{{ partial "recent-articles/cardview.html" . }}
|
||||
{{ else if and .Site.Params.homepage.cardView .Site.Params.homepage.cardViewScreenWidth | default false }}
|
||||
{{ partial "recent-articles/cardview-fullwidth.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "recent-articles/list.html" . }}
|
||||
{{ end }}
|
||||
{{ 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 }}
|
||||
{{ partial "recent-articles/cardview-fullwidth.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "recent-articles/list.html" . }}
|
||||
{{ 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">
|
||||
<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 }}
|
||||
{{ 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 }}
|
||||
{{ end }}
|
||||
|
||||
@@ -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">
|
||||
{{ range . }}
|
||||
{{ partial "article-link/card-related.html" . }}
|
||||
{{ 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 }}
|
||||
@@ -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" }}">
|
||||
↑
|
||||
</a>
|
||||
</div>
|
||||
@@ -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>
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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" }}
|
||||
</summary>
|
||||
{{ $seriesName := strings.ToLower (index .Params.series 0) }}
|
||||
{{ range $post := sort (index .Site.Taxonomies.series $seriesName) "Params.series_order" }}
|
||||
<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" }}
|
||||
</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
|
||||
<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" }}
|
||||
</div>
|
||||
{{ i18n "article.part" }} {{ $post.Params.series_order }}:
|
||||
{{ i18n "article.this_article" }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div
|
||||
<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}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -3,15 +3,14 @@
|
||||
<section class="flex flex-row flex-wrap justify-center pt-4 text-xl">
|
||||
{{ range . }}
|
||||
{{ with index $links . }}
|
||||
<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="{{ printf .url $.Permalink $.Title }}"
|
||||
title="{{ i18n .title }}"
|
||||
aria-label="{{ i18n .title }}"
|
||||
>
|
||||
{{ partial "icon.html" .icon }}
|
||||
</a>
|
||||
<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="{{ printf .url $.Permalink $.Title }}"
|
||||
title="{{ i18n .title }}"
|
||||
aria-label="{{ i18n .title }}">
|
||||
{{ partial "icon.html" .icon }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
@@ -1,54 +1,51 @@
|
||||
<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 -}}
|
||||
{{- range first 6 . }}
|
||||
<meta property="og:image" content="{{ . | absURL }}">
|
||||
{{ end -}}
|
||||
{{- else -}}
|
||||
{{- $images := .Page.Resources.ByType "image" -}}
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{- with $featured -}}
|
||||
{{ if $disableImageOptimization }}
|
||||
{{ with . }}
|
||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{- $images := .Page.Resources.ByType "image" -}}
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{- with $featured -}}
|
||||
{{ if $disableImageOptimization }}
|
||||
{{ with . }}
|
||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "600x" }}
|
||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "600x" }}
|
||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- else -}}
|
||||
{{- with site.Params.images }}
|
||||
<meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
|
||||
{{- else -}}
|
||||
{{- with site.Params.images }}
|
||||
<meta property="og:image" content="{{ index . 0 | absURL }}">
|
||||
{{ end -}}
|
||||
{{- 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"
|
||||
>
|
||||
{{ .Count }}
|
||||
<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">
|
||||
{{ .Count }}
|
||||
</span>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
<div class="px-6 pt-4 pb-2">
|
||||
|
||||
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>
|
||||
<div class="px-6 pt-4 pb-2"></div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -1,15 +1,15 @@
|
||||
<article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/4">
|
||||
<h2 class="flex items-center">
|
||||
<a
|
||||
class="text-xl font-medium decoration-primary-500 hover:underline hover:underline-offset-2"
|
||||
href="{{ .Page.RelPermalink }}"
|
||||
>{{ .Page.Title }}</a
|
||||
>
|
||||
{{ if site.Params.taxonomy.showTermCount | default true }}
|
||||
<span class="px-2 text-base text-primary-500">·</span>
|
||||
<span class="text-base text-neutral-400">
|
||||
{{ .Count }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</h2>
|
||||
</article>
|
||||
<h2 class="flex items-center">
|
||||
<a
|
||||
class="text-xl font-medium decoration-primary-500 hover:underline hover:underline-offset-2"
|
||||
href="{{ .Page.RelPermalink }}"
|
||||
>{{ .Page.Title }}</a
|
||||
>
|
||||
{{ if site.Params.taxonomy.showTermCount | default true }}
|
||||
<span class="px-2 text-base text-primary-500">·</span>
|
||||
<span class="text-base text-neutral-400">
|
||||
{{ .Count }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</h2>
|
||||
</article>
|
||||
|
||||
@@ -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" }}
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
{{ if .IsTranslated }}
|
||||
<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 }}">
|
||||
{{- i18n "global.language" | markdownify -}}
|
||||
<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 }}">
|
||||
{{- i18n "global.language" | markdownify -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="absolute menuhide">
|
||||
<div class="pt-2 p-5 mt-2 rounded-xl backdrop-blur shadow-2xl">
|
||||
<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 }}">
|
||||
{{ .Language.Params.displayName | emojify }}
|
||||
</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
<div class="absolute menuhide">
|
||||
<div class="pt-2 p-5 mt-2 rounded-xl backdrop-blur shadow-2xl">
|
||||
<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 }}">
|
||||
{{ .Language.Params.displayName | emojify }}
|
||||
</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -12,64 +12,82 @@
|
||||
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 }}"
|
||||
integrity="{{ $chartJS.Data.Integrity }}"></script>
|
||||
{{ $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 }}"
|
||||
onload="renderMathInElement(document.body);"></script>
|
||||
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
|
||||
{{ range $katexFonts }}
|
||||
<!-- {{ .RelPermalink }} -->
|
||||
{{ end }}
|
||||
{{ $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 }}
|
||||
{{ 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 */}}
|
||||
{{ if .Page.HasShortcode "gallery" }}
|
||||
{{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }}
|
||||
<script defer src="{{ $packeryLib.RelPermalink }}" integrity="{{ $packeryLib.Data.Integrity }}"></script>
|
||||
{{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }}
|
||||
<script defer src="{{ $packeryLib.RelPermalink }}" integrity="{{ $packeryLib.Data.Integrity }}"></script>
|
||||
|
||||
{{ $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>
|
||||
{{ $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>
|
||||
{{ 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 }}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,71 +4,98 @@
|
||||
|
||||
{{ $page := .Page.Resources }}
|
||||
{{ $imagesTemp := .Get "images" }}
|
||||
{{ $imagesTemp = strings.TrimPrefix "{" $imagesTemp }}
|
||||
{{ $imagesTemp = strings.TrimSuffix "}" $imagesTemp }}
|
||||
{{ $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 .) }}
|
||||
{{ else }}
|
||||
{{ $images = $images | append ($page.Match .) }}
|
||||
{{ end }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $images = $images | append (resources.GetRemote .) }}
|
||||
{{ else }}
|
||||
{{ $images = $images | append ($page.Match .) }}
|
||||
{{ 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>
|
||||
|
||||
{{ $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 }}
|
||||
<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 }}
|
||||
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>
|
||||
|
||||
{{ $num = add $num 1 }}
|
||||
{{ end }}
|
||||
{{ $num = add $num 1 }}
|
||||
{{ end }}
|
||||
|
||||
</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="ratio-{{ $aspect }} single_hero_background">
|
||||
<img src="{{ .RelPermalink }}" class="block absolute top-0 object-cover w-full h-full nozoom" alt="carousel image {{$num}}"/>
|
||||
</div>
|
||||
</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="ratio-{{ $aspect }} single_hero_background">
|
||||
<img
|
||||
src="{{ .RelPermalink }}"
|
||||
class="block absolute top-0 object-cover w-full h-full nozoom"
|
||||
alt="carousel image {{ $num }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $num = add $num 1 }}
|
||||
{{ end }}
|
||||
{{ $num = add $num 1 }}
|
||||
{{ end }}
|
||||
|
||||
</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">
|
||||
<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">
|
||||
<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>
|
||||
</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">
|
||||
<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">
|
||||
<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>
|
||||
</button>
|
||||
</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">
|
||||
<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">
|
||||
<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
|
||||
>
|
||||
</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">
|
||||
<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">
|
||||
<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
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -3,55 +3,60 @@
|
||||
{{- $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="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" }}
|
||||
</span>
|
||||
<div class="codeberg-card-wrapper">
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
|
||||
<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 }}
|
||||
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" }}
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .description | markdownify }}
|
||||
</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>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "star" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .stars_count }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "fork" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .description | markdownify }}
|
||||
</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>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }} {{ .language }} {{ else }} null {{ end }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "star" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .stars_count }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "fork" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</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>
|
||||
{{ $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>
|
||||
{{- end -}}
|
||||
|
||||
@@ -3,55 +3,60 @@
|
||||
{{- $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="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" }}
|
||||
</span>
|
||||
<div class="forgejo-card-wrapper">
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
|
||||
<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 }}
|
||||
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" }}
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .description | markdownify }}
|
||||
</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>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "star" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .stars_count }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "fork" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .description | markdownify }}
|
||||
</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>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }} {{ .language }} {{ else }} null {{ end }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "star" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .stars_count }}
|
||||
</div>
|
||||
|
||||
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
||||
{{ partial "icon.html" "fork" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</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>
|
||||
{{ $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>
|
||||
{{- end -}}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user