mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
pretty run
This commit is contained in:
7
.github/workflows/hugo-version-update.yml
vendored
7
.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,7 +10,6 @@ jobs:
|
||||
updateBlowfish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -26,7 +25,9 @@ jobs:
|
||||
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
||||
run:
|
||||
echo ::set-output name=modified::$([ -z "`git status --porcelain`" ]
|
||||
&& echo "false" || echo "true")
|
||||
|
||||
- name: Update config.toml
|
||||
id: update-config
|
||||
|
||||
14
.github/workflows/stale.yml
vendored
14
.github/workflows/stale.yml
vendored
@@ -7,12 +7,11 @@ name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
- cron: "0 1 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
@@ -22,10 +21,13 @@ jobs:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue will be closed since it has been stale for 60 days.'
|
||||
stale-pr-message: 'This pull request will be closed since it has been stale for 60 days.'
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
stale-issue-message:
|
||||
"This issue will be closed since it has been stale for 60 days."
|
||||
stale-pr-message:
|
||||
"This pull request will be closed since it has been stale for 60
|
||||
days."
|
||||
stale-issue-label: "no-issue-activity"
|
||||
stale-pr-label: "no-pr-activity"
|
||||
days-before-stale: 60
|
||||
days-before-close: 0
|
||||
remove-stale-when-updated: true
|
||||
|
||||
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,5 +1,5 @@
|
||||
#zen-mode-button {
|
||||
cursor:pointer
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.zen-mode {
|
||||
@@ -7,10 +7,8 @@
|
||||
}
|
||||
|
||||
body.zen-mode-enable {
|
||||
#bmc-wbtn, .author {
|
||||
#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";
|
||||
@@ -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 {
|
||||
@@ -472,7 +474,7 @@ pre {
|
||||
}
|
||||
|
||||
.padding-main-menu {
|
||||
padding: 2px 0 3px 0
|
||||
padding: 2px 0 3px 0;
|
||||
}
|
||||
.padding-top-\[5px\] {
|
||||
padding-top: 5px;
|
||||
@@ -492,7 +494,8 @@ pre {
|
||||
}
|
||||
|
||||
/* Offset scroll position to avoid header overlap */
|
||||
[id^="fn"], [id^="fnref"] {
|
||||
[id^="fn"],
|
||||
[id^="fnref"] {
|
||||
scroll-margin-top: 145px;
|
||||
}
|
||||
|
||||
@@ -524,19 +527,25 @@ pre {
|
||||
.nested-menu:hover + .menuhide {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.menuhide:hover {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.menuhide {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0.3s, opacity 0.3s ease-in-out ;
|
||||
transition:
|
||||
visibility 0.3s,
|
||||
opacity 0.3s ease-in-out;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@@ -547,179 +556,593 @@ pre {
|
||||
}
|
||||
|
||||
/* Gallery Specific Styles */
|
||||
.grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
@screen sm {
|
||||
.sm\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.sm\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.sm\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.md\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.md\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.md\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
.lg\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.lg\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.lg\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen xl {
|
||||
.xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.xl\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.xl\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@screen 2xl {
|
||||
.2xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w15 { width: calc(15% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w20 { width: calc(20% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w25 { width: calc(25% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w30 { width: calc(30% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w33 { width: calc(33% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w35 { width: calc(35% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w40 { width: calc(40% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w45 { width: calc(45% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w50 { width: calc(50% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w55 { width: calc(55% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w60 { width: calc(60% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w65 { width: calc(65% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w66 { width: calc(66% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w70 { width: calc(70% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w75 { width: calc(75% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w80 { width: calc(80% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w85 { width: calc(85% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w90 { width: calc(90% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w95 { width: calc(95% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w100 { width: calc(100% - 5px); margin: 0px !important; }
|
||||
.2xl\:grid-w10 {
|
||||
width: calc(10% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w15 {
|
||||
width: calc(15% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w20 {
|
||||
width: calc(20% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w25 {
|
||||
width: calc(25% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w30 {
|
||||
width: calc(30% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w33 {
|
||||
width: calc(33% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w35 {
|
||||
width: calc(35% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w40 {
|
||||
width: calc(40% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w45 {
|
||||
width: calc(45% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w50 {
|
||||
width: calc(50% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w55 {
|
||||
width: calc(55% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w60 {
|
||||
width: calc(60% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w65 {
|
||||
width: calc(65% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w66 {
|
||||
width: calc(66% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w70 {
|
||||
width: calc(70% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w75 {
|
||||
width: calc(75% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w80 {
|
||||
width: calc(80% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w85 {
|
||||
width: calc(85% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w90 {
|
||||
width: calc(90% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w95 {
|
||||
width: calc(95% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
.2xl\:grid-w100 {
|
||||
width: calc(100% - 5px);
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Carousel Specific Styles */
|
||||
.ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
|
||||
@screen sm {
|
||||
.sm\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.sm\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.sm\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.sm\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.sm\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.sm\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.md\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.md\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.md\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.md\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.md\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.md\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
.lg\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.lg\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.lg\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.lg\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.lg\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.lg\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen xl {
|
||||
.xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.xl\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.xl\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.xl\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
|
||||
@screen 2xl {
|
||||
.2xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */
|
||||
.2xl\:ratio-21-9 { padding-top: 42.85%; } /* 21:9 Aspect Ratio */
|
||||
.2xl\:ratio-32-9 { padding-top: 28.125%; } /* 32:9 Aspect Ratio */
|
||||
.2xl\:ratio-16-9 {
|
||||
padding-top: 56.25%;
|
||||
} /* 16:9 Aspect Ratio */
|
||||
.2xl\:ratio-21-9 {
|
||||
padding-top: 42.85%;
|
||||
} /* 21:9 Aspect Ratio */
|
||||
.2xl\:ratio-32-9 {
|
||||
padding-top: 28.125%;
|
||||
} /* 32:9 Aspect Ratio */
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 214, 251, 252;
|
||||
--color-neutral-200: 142, 245, 247;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 254, 197, 207;
|
||||
--color-neutral-200: 253, 121, 144;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 232, 238, 237;
|
||||
--color-neutral-200: 188, 206, 203;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 201, 209, 244;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 218, 196, 249;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 255, 255, 255;
|
||||
--color-neutral-200: 214, 219, 222;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 255, 255, 255;
|
||||
--color-neutral-100: 238, 232, 238;
|
||||
--color-neutral-200: 206, 188, 206;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
:root { --color-neutral: 255, 255, 255;
|
||||
:root {
|
||||
--color-neutral: 255, 255, 255;
|
||||
--color-neutral-50: 203, 255, 227;
|
||||
--color-neutral-100: 126, 255, 186;
|
||||
--color-neutral-200: 49, 255, 145;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
function setBackgroundBlur() {
|
||||
const scriptElement = document.currentScript;
|
||||
const targetId = scriptElement && scriptElement.getAttribute("data-target-id") ? scriptElement.getAttribute("data-target-id")
|
||||
const targetId =
|
||||
scriptElement && scriptElement.getAttribute("data-target-id")
|
||||
? scriptElement.getAttribute("data-target-id")
|
||||
: (console.error("data-target-id is null"), null);
|
||||
|
||||
window.addEventListener("scroll", () => {
|
||||
|
||||
@@ -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,17 +1,22 @@
|
||||
function fetchRepo() {
|
||||
const scriptElement = document.currentScript;
|
||||
const repoURL = scriptElement && scriptElement.getAttribute("data-repo-url") ? scriptElement.getAttribute("data-repo-url")
|
||||
const repoURL =
|
||||
scriptElement && scriptElement.getAttribute("data-repo-url")
|
||||
? scriptElement.getAttribute("data-repo-url")
|
||||
: (console.error("data-repo-url is null"), null);
|
||||
const repoId = scriptElement && scriptElement.getAttribute("data-repo-id") ? scriptElement.getAttribute("data-repo-id")
|
||||
const repoId =
|
||||
scriptElement && scriptElement.getAttribute("data-repo-id")
|
||||
? scriptElement.getAttribute("data-repo-id")
|
||||
: (console.error("data-repo-id is null"), null);
|
||||
const requestObjects =
|
||||
repoId.startsWith("github") ? ["full_name", "description", "stargazers_count", "forks"]
|
||||
: repoId.startsWith("gitlab") ? ["name_with_namespace", "description", "star_count", "forks_count"]
|
||||
const requestObjects = repoId.startsWith("github")
|
||||
? ["full_name", "description", "stargazers_count", "forks"]
|
||||
: repoId.startsWith("gitlab")
|
||||
? ["name_with_namespace", "description", "star_count", "forks_count"]
|
||||
: ["full_name", "description", "stars_count", "forks_count"];
|
||||
fetch(repoURL, {
|
||||
headers: new Headers({
|
||||
"User-agent": "Mozilla/4.0 Custom User Agent"
|
||||
})
|
||||
"User-agent": "Mozilla/4.0 Custom User Agent",
|
||||
}),
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
@@ -20,7 +25,8 @@ function fetchRepo() {
|
||||
if (requestObject === "stargazers_count" && repoId.startsWith("github")) {
|
||||
element = document.getElementById(`${repoId}-stargazers`);
|
||||
}
|
||||
element ? (element.innerHTML = data[requestObject])
|
||||
element
|
||||
? (element.innerHTML = data[requestObject])
|
||||
: (console.error(`Element '${repoId}-${requestObject}' not found`), null);
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
const pageScriptElement = document.currentScript;
|
||||
const oid = pageScriptElement && pageScriptElement.getAttribute("data-oid") ? pageScriptElement.getAttribute("data-oid") : (console.error("data-oid is null"), null);
|
||||
const oid_likes = pageScriptElement && pageScriptElement.getAttribute("data-oid-likes") ? pageScriptElement.getAttribute("data-oid-likes") : (console.error("data-oid-likes is null"), null);
|
||||
const oid =
|
||||
pageScriptElement && pageScriptElement.getAttribute("data-oid")
|
||||
? pageScriptElement.getAttribute("data-oid")
|
||||
: (console.error("data-oid is null"), null);
|
||||
const oid_likes =
|
||||
pageScriptElement && pageScriptElement.getAttribute("data-oid-likes")
|
||||
? pageScriptElement.getAttribute("data-oid-likes")
|
||||
: (console.error("data-oid-likes is null"), null);
|
||||
const liked_page = false;
|
||||
const id = oid ? oid.replaceAll("/", "-") : oid;
|
||||
const id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes;
|
||||
@@ -9,100 +15,117 @@ if (typeof auth !== "undefined") {
|
||||
const viewed = localStorage.getItem(id);
|
||||
|
||||
if (!viewed) {
|
||||
auth.signInAnonymously()
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('views').doc(id)
|
||||
const docRef = db.collection("views").doc(id);
|
||||
localStorage.setItem(id, true);
|
||||
docRef.get().then((doc) => {
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
if (doc.exists) {
|
||||
db.collection('views').doc(id).update({
|
||||
views: firebase.firestore.FieldValue.increment(1)
|
||||
db.collection("views")
|
||||
.doc(id)
|
||||
.update({
|
||||
views: firebase.firestore.FieldValue.increment(1),
|
||||
});
|
||||
} else {
|
||||
db.collection('views').doc(id).set({ views: 1 })
|
||||
db.collection("views").doc(id).set({ views: 1 });
|
||||
}
|
||||
}).catch((error) => {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
const liked = localStorage.getItem(id_likes);
|
||||
|
||||
if (liked) {
|
||||
liked_page = true
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = ""
|
||||
liked_page = true;
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function like_article(id_likes) {
|
||||
auth.signInAnonymously()
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('likes').doc(id_likes)
|
||||
docRef.get().then((doc) => {
|
||||
liked_page = true
|
||||
const docRef = db.collection("likes").doc(id_likes);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
liked_page = true;
|
||||
localStorage.setItem(id_likes, true);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = ""
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "";
|
||||
if (doc.exists) {
|
||||
db.collection('likes').doc(id_likes).update({
|
||||
likes: firebase.firestore.FieldValue.increment(1)
|
||||
db.collection("likes")
|
||||
.doc(id_likes)
|
||||
.update({
|
||||
likes: firebase.firestore.FieldValue.increment(1),
|
||||
});
|
||||
} else {
|
||||
db.collection('likes').doc(id_likes).set({ likes: 1 })
|
||||
db.collection("likes").doc(id_likes).set({ likes: 1 });
|
||||
}
|
||||
}).catch((error) => {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
function remove_like_article(id_likes) {
|
||||
auth.signInAnonymously()
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
const docRef = db.collection('likes').doc(id_likes)
|
||||
docRef.get().then((doc) => {
|
||||
liked_page = false
|
||||
const docRef = db.collection("likes").doc(id_likes);
|
||||
docRef
|
||||
.get()
|
||||
.then((doc) => {
|
||||
liked_page = false;
|
||||
localStorage.removeItem(id_likes);
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none"
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = ""
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like"
|
||||
document.querySelectorAll("span[id='button_likes_heart']")[0].style.display = "none";
|
||||
document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display = "";
|
||||
document.querySelectorAll("span[id='button_likes_text']")[0].innerText = "\xa0Like";
|
||||
if (doc.exists) {
|
||||
db.collection('likes').doc(id_likes).update({
|
||||
likes: firebase.firestore.FieldValue.increment(-1)
|
||||
db.collection("likes")
|
||||
.doc(id_likes)
|
||||
.update({
|
||||
likes: firebase.firestore.FieldValue.increment(-1),
|
||||
});
|
||||
} else {
|
||||
db.collection('likes').doc(id_likes).set({ likes: 0 })
|
||||
db.collection("likes").doc(id_likes).set({ likes: 0 });
|
||||
}
|
||||
}).catch((error) => {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error getting document:", error);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
const errorCode = error.code;
|
||||
const errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
|
||||
function process_article() {
|
||||
if (!liked_page) {
|
||||
like_article(id_likes)
|
||||
like_article(id_likes);
|
||||
} else {
|
||||
remove_like_article(id_likes)
|
||||
remove_like_article(id_likes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +1,70 @@
|
||||
if (typeof auth !== 'undefined') {
|
||||
var viewsCollection = db.collection('views');
|
||||
var likesCollection = db.collection('likes');
|
||||
if (typeof auth !== "undefined") {
|
||||
var viewsCollection = db.collection("views");
|
||||
var likesCollection = db.collection("likes");
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function toggleLoaders(node) {
|
||||
var classesString = node.className;
|
||||
if(classesString == "") return
|
||||
if (classesString == "") return;
|
||||
var classes = classesString.split(" ");
|
||||
for (var i in classes) {
|
||||
node.classList.toggle(classes[i])
|
||||
node.classList.toggle(classes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var update_views = function (node, id) {
|
||||
viewsCollection.doc(id).onSnapshot(doc => {
|
||||
viewsCollection.doc(id).onSnapshot((doc) => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.views)
|
||||
node.innerText = numberWithCommas(data.views);
|
||||
} else {
|
||||
node.innerText = 0
|
||||
}
|
||||
toggleLoaders(node)
|
||||
})
|
||||
node.innerText = 0;
|
||||
}
|
||||
toggleLoaders(node);
|
||||
});
|
||||
};
|
||||
|
||||
var update_likes = function (node, id) {
|
||||
likesCollection.doc(id).onSnapshot(doc => {
|
||||
likesCollection.doc(id).onSnapshot((doc) => {
|
||||
var data = doc.data();
|
||||
if (data) {
|
||||
node.innerText = numberWithCommas(data.likes)
|
||||
node.innerText = numberWithCommas(data.likes);
|
||||
} else {
|
||||
node.innerText = 0
|
||||
node.innerText = 0;
|
||||
}
|
||||
toggleLoaders(node)
|
||||
toggleLoaders(node);
|
||||
});
|
||||
};
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
auth.signInAnonymously()
|
||||
auth
|
||||
.signInAnonymously()
|
||||
.then(() => {
|
||||
var views_nodes = document.querySelectorAll("span[id^='views_']")
|
||||
var views_nodes = document.querySelectorAll("span[id^='views_']");
|
||||
|
||||
for (var i in views_nodes) {
|
||||
var node = views_nodes[i]
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id
|
||||
var node = views_nodes[i];
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
|
||||
if (id) {
|
||||
update_views(node, id)
|
||||
update_views(node, id);
|
||||
}
|
||||
}
|
||||
|
||||
var likes_nodes = document.querySelectorAll("span[id^='likes_']")
|
||||
var likes_nodes = document.querySelectorAll("span[id^='likes_']");
|
||||
|
||||
for (var i in likes_nodes) {
|
||||
var node = likes_nodes[i]
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id
|
||||
var node = likes_nodes[i];
|
||||
var id = node.id ? node.id.replaceAll("/", "-") : node.id;
|
||||
if (id) {
|
||||
update_likes(node, id)
|
||||
update_likes(node, id);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
var errorCode = error.code;
|
||||
var errorMessage = error.message;
|
||||
console.error(errorCode, errorMessage)
|
||||
console.error(errorCode, errorMessage);
|
||||
});
|
||||
}
|
||||
@@ -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">
|
||||
|
||||
@@ -2,17 +2,16 @@ function _getDefaultPackeryOptions() {
|
||||
return {
|
||||
percentPosition: true,
|
||||
gutter: 5,
|
||||
resize: true
|
||||
resize: true,
|
||||
};
|
||||
}
|
||||
|
||||
(function init() {
|
||||
|
||||
$(window).on("load", function () {
|
||||
let packeries = [];
|
||||
let nodeGalleries = document.querySelectorAll('.gallery');
|
||||
let nodeGalleries = document.querySelectorAll(".gallery");
|
||||
|
||||
nodeGalleries.forEach(nodeGallery => {
|
||||
nodeGalleries.forEach((nodeGallery) => {
|
||||
// TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute
|
||||
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
|
||||
packeries.push(packery);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,13 +4,16 @@
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
|
||||
|
||||
<div class="flex mb-6 px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">This is a demo of theme's list configurations: <code
|
||||
id="config">card view</code></span>
|
||||
<button id="switch-config-button"
|
||||
<span class="prose dark:prose-invert"
|
||||
>This is a demo of theme's list configurations: <code id="config">card view</code></span
|
||||
>
|
||||
<button
|
||||
id="switch-config-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700">
|
||||
Switch config ↻
|
||||
</button>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
const fs = require('fs');
|
||||
const fs = require("fs");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const contentDir = "./exampleSite/content";
|
||||
const defaultLang = "en";
|
||||
|
||||
var targetLangs = []
|
||||
var targetLangs = [];
|
||||
|
||||
function readConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
files.forEach((file) => {
|
||||
//console.log(file)
|
||||
if (file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
@@ -22,7 +22,6 @@ function readConfigs() {
|
||||
|
||||
async function processFile(filePath, file) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
|
||||
//console.log("processing", filePath)
|
||||
|
||||
for (var i in targetLangs) {
|
||||
@@ -33,8 +32,8 @@ async function processFile(filePath, file) {
|
||||
if (fs.existsSync(targetFilePath)) {
|
||||
//console.log("file already exists", targetFilePath);
|
||||
|
||||
const data = fs.readFileSync(filePath, 'utf8');
|
||||
const data2 = fs.readFileSync(targetFilePath, 'utf8');
|
||||
const data = fs.readFileSync(filePath, "utf8");
|
||||
const data2 = fs.readFileSync(targetFilePath, "utf8");
|
||||
if (data != data2) {
|
||||
//console.log("file contents are different", targetFilePath);
|
||||
} else {
|
||||
@@ -42,14 +41,11 @@ async function processFile(filePath, file) {
|
||||
console.log(targetFilePath);
|
||||
//process.exit(1);
|
||||
}
|
||||
|
||||
} else {
|
||||
//console.log("file does not exist", targetFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
} else
|
||||
return
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const translate = require('@iamtraction/google-translate');
|
||||
const fs = require("fs");
|
||||
const translate = require("@iamtraction/google-translate");
|
||||
|
||||
const defaultLang = "en";
|
||||
const targetLang = process.argv[2] || "en";
|
||||
@@ -10,7 +10,7 @@ const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
async function convert(text, from, to) {
|
||||
var options = {
|
||||
from: from,
|
||||
to: to
|
||||
to: to,
|
||||
};
|
||||
var translated_text = await translate(text, options);
|
||||
return translated_text.text;
|
||||
@@ -26,12 +26,14 @@ async function processFrontMatter(block) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (elements[0] == "title" ||
|
||||
if (
|
||||
elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags") {
|
||||
elements[0] == "tags"
|
||||
) {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
@@ -45,11 +47,10 @@ async function processFrontMatter(block) {
|
||||
return translatedBlock;
|
||||
}
|
||||
|
||||
|
||||
async function main() {
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
const fileContent = fs.readFileSync(filePath, "utf8");
|
||||
|
||||
var array = fileContent.split("---\n")
|
||||
var array = fileContent.split("---\n");
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
|
||||
@@ -57,7 +58,7 @@ async function main() {
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
|
||||
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
|
||||
}
|
||||
|
||||
main();
|
||||
42
genLang.js
42
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,15 +7,13 @@ const defaultLang = "en";
|
||||
const targetLang = process.argv[2] || "en";
|
||||
const targetLangIso = targetLang == "pt" ? "pt-pt" : targetLang;
|
||||
|
||||
|
||||
function createConfigs() {
|
||||
const files = fs.readdirSync(configDir);
|
||||
files.forEach(file => {
|
||||
files.forEach((file) => {
|
||||
const filePath = `${configDir}/${file}`;
|
||||
if (filePath.indexOf("languages.en.toml") > -1 ||
|
||||
filePath.indexOf("menus.en.toml") > -1) {
|
||||
var fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, 'utf8');
|
||||
if (filePath.indexOf("languages.en.toml") > -1 || filePath.indexOf("menus.en.toml") > -1) {
|
||||
var fileContent = fs.readFileSync(filePath, "utf8");
|
||||
fs.writeFileSync(filePath.replace(".en.toml", "." + targetLangIso + ".toml"), fileContent, "utf8");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -23,13 +21,12 @@ function createConfigs() {
|
||||
async function convert(text, from, to) {
|
||||
var options = {
|
||||
from: from,
|
||||
to: to
|
||||
to: to,
|
||||
};
|
||||
var translated_text = await translate(text, options)
|
||||
.catch(err => {
|
||||
var translated_text = await translate(text, options).catch((err) => {
|
||||
console.error(err);
|
||||
});;
|
||||
return translated_text && translated_text.text? translated_text.text : '';
|
||||
});
|
||||
return translated_text && translated_text.text ? translated_text.text : "";
|
||||
}
|
||||
|
||||
async function processFrontMatter(block) {
|
||||
@@ -39,12 +36,14 @@ async function processFrontMatter(block) {
|
||||
if (array[i].indexOf(":") > -1) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (elements[0] == "title" ||
|
||||
if (
|
||||
elements[0] == "title" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "summary" ||
|
||||
elements[0] == "description" ||
|
||||
elements[0] == "categories" ||
|
||||
elements[0] == "tags") {
|
||||
elements[0] == "tags"
|
||||
) {
|
||||
var translatedElement = elements[1] ? await convert(elements[1], defaultLang, targetLang) : elements[1];
|
||||
newElement = elements[0] + ": " + translatedElement;
|
||||
} else {
|
||||
@@ -59,14 +58,13 @@ async function processFrontMatter(block) {
|
||||
}
|
||||
|
||||
async function processFile(filePath) {
|
||||
console.log("translating", filePath)
|
||||
console.log("translating", filePath);
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
|
||||
const targetFilePath = filePath.replace(".md", "." + targetLangIso + ".md");
|
||||
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
const fileContent = fs.readFileSync(filePath, "utf8");
|
||||
|
||||
var array = fileContent.split("---\n")
|
||||
var array = fileContent.split("---\n");
|
||||
var frontMatter = array[1];
|
||||
var content = array[2];
|
||||
|
||||
@@ -74,10 +72,8 @@ async function processFile(filePath) {
|
||||
var translatedContent = await convert(content, defaultLang, targetLang);
|
||||
|
||||
var newFileContent = "---\n" + translatedFrontMatter + "---\n" + translatedContent;
|
||||
fs.writeFileSync(targetFilePath, newFileContent, 'utf8');
|
||||
|
||||
} else
|
||||
return
|
||||
fs.writeFileSync(targetFilePath, newFileContent, "utf8");
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
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)
|
||||
files.forEach((file) => {
|
||||
console.log(file);
|
||||
if (file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
console.log(lang)
|
||||
console.log(lang);
|
||||
if (lang != defaultLang) {
|
||||
targetLangs.push(lang);
|
||||
}
|
||||
@@ -22,8 +22,7 @@ function readConfigs() {
|
||||
|
||||
async function processFile(filePath, file) {
|
||||
if (filePath.indexOf("index.md") > -1) {
|
||||
|
||||
console.log("processing", filePath)
|
||||
console.log("processing", filePath);
|
||||
|
||||
for (var i in targetLangs) {
|
||||
const targetLang = targetLangs[i];
|
||||
@@ -38,9 +37,7 @@ async function processFile(filePath, file) {
|
||||
fs.copyFileSync(filePath, targetFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
} else
|
||||
return
|
||||
} else return;
|
||||
}
|
||||
|
||||
async function processFolder(folderPath) {
|
||||
|
||||
@@ -26,7 +26,6 @@ article:
|
||||
this_article: "Тази Статия"
|
||||
related_articles: "Подобни"
|
||||
|
||||
|
||||
author:
|
||||
byline_title: "Автор"
|
||||
|
||||
|
||||
@@ -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 "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 }}"
|
||||
<a
|
||||
href="{{ .Destination | safeURL }}"
|
||||
{{- with .Title -}}
|
||||
title="{{ . }}"
|
||||
{{- end }}
|
||||
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
|
||||
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }}
|
||||
target="_blank"
|
||||
{{ end }}>
|
||||
{{- .Text | safeHTML -}}
|
||||
</a>
|
||||
@@ -1,19 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default " en") }} {{- . -}} {{ end }}" dir="{{ if .Site.Params.rtl | default false -}}
|
||||
<!doctype html>
|
||||
<html
|
||||
lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default " en") }}{{- . -}}{{ end }}"
|
||||
dir="{{ if .Site.Params.rtl | default false -}}
|
||||
rtl
|
||||
{{- else -}}
|
||||
ltr
|
||||
{{- end }}" class="scroll-smooth" data-default-appearance="{{ .Site.Params.defaultAppearance | default " light" }}"
|
||||
{{- end }}"
|
||||
class="scroll-smooth"
|
||||
data-default-appearance="{{ .Site.Params.defaultAppearance | default " light" }}"
|
||||
data-auto-appearance="{{ .Site.Params.autoSwitchAppearance | default " true" }}">
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
|
||||
<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>
|
||||
<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 ) }}
|
||||
@@ -35,8 +43,16 @@
|
||||
</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>
|
||||
<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,6 +1,7 @@
|
||||
{{ define "main" }}
|
||||
{{ .Scratch.Set "scope" "single" }}
|
||||
|
||||
|
||||
<article>
|
||||
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
|
||||
{{ $heroStyle := .Params.heroStyle }}
|
||||
@@ -13,6 +14,7 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<header id="single_header" class="mt-5 max-w-prose">
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
@@ -71,30 +73,44 @@
|
||||
</header>
|
||||
|
||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||
|
||||
{{ if or (and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul")) (.Site.Params.article.showRelatedPosts | default false) }} <div
|
||||
class="order-first lg:ml-auto px-0 lg:order-last ltr:lg:pl-8 rtl:lg:pr-8">
|
||||
<div class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky {{ if hasPrefix .Site.Params.header.layout "fixed" -}}
|
||||
lg:top-[140px]{{ else }}lg:top-10{{ end }}">
|
||||
|
||||
.TableOfContents "<ul")) (.Site.Params.article.showRelatedPosts | default false)
|
||||
}}
|
||||
<div class="order-first lg:ml-auto px-0 lg:order-last ltr:lg:pl-8 rtl:lg:pr-8">
|
||||
<div
|
||||
class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky {{ if hasPrefix .Site.Params.header.layout "fixed" -}}
|
||||
lg:top-[140px]
|
||||
{{ else }}
|
||||
lg:top-10
|
||||
{{ end }}
|
||||
">
|
||||
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }} {{ partial "toc.html" . }} {{ end }} {{ if .Site.Params.article.showRelatedPosts |
|
||||
default false }} sd {{ end }} </div>
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
{{ partial "toc.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.article.showRelatedPosts |
|
||||
default false
|
||||
}}
|
||||
sd
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="min-w-0 min-h-0 max-w-fit">
|
||||
|
||||
<div class="min-w-0 min-h-0 max-w-fit">
|
||||
{{ partial "series/series.html" . }}
|
||||
|
||||
|
||||
<div class="article-content max-w-prose mb-20">
|
||||
{{ .Content }}
|
||||
{{ $defaultReplyByEmail := .Site.Params.replyByEmail }}
|
||||
{{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }}
|
||||
{{ if $replyByEmail }}
|
||||
<strong class="block mt-8">
|
||||
<a target="_blank"
|
||||
<a
|
||||
target="_blank"
|
||||
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
||||
href="mailto:{{ .Site.Params.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}">
|
||||
Reply by Email
|
||||
@@ -142,17 +158,21 @@
|
||||
{{ end }}
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_{{ $path }}" data-oid-likes="likes_{{ $path }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_{{ $path }}"
|
||||
data-oid-likes="likes_{{ $path }}"></script>
|
||||
{{ end }}
|
||||
|
||||
</section>
|
||||
<footer class="pt-8 max-w-prose print:hidden">
|
||||
|
||||
{{ partial "article-pagination.html" . }}
|
||||
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
|
||||
{{ if templates.Exists "partials/comments.html" }}
|
||||
<div class="pt-3">
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
|
||||
<hr class="border-dotted border-neutral-300 dark:border-neutral-600">
|
||||
<div class="pt-3">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ .Scratch.Set "scope" "term" }}
|
||||
{{ if .Site.Params.term.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
@@ -11,7 +10,9 @@
|
||||
{{- end -}}
|
||||
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.term.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }} <header>
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
<header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.term.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
@@ -28,13 +29,16 @@
|
||||
</div>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_term_{{ .Data.Term }}" data-oid-likes="likes_term_{{ .Data.Term }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_term_{{ .Data.Term }}"
|
||||
data-oid-likes="likes_term_{{ .Data.Term }}"></script>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
|
||||
{{ if gt .Pages 0 }}
|
||||
|
||||
{{ $cardView := .Params.cardView | default (.Site.Params.term.cardView | default false) }}
|
||||
{{ $cardViewScreenWidth := .Site.Params.term.cardViewScreenWidth | default false }}
|
||||
{{ $groupByYear := .Params.groupByYear | default ($.Site.Params.term.groupByYear | default false) }}
|
||||
@@ -53,7 +57,6 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ else if and $cardView (not $cardViewScreenWidth) }}
|
||||
|
||||
{{ if $groupByYear }}
|
||||
@@ -78,7 +81,6 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ else if and $cardView $cardViewScreenWidth }}
|
||||
@@ -109,7 +111,6 @@
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.taxonomy.showHero | default false }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||
@@ -11,7 +10,9 @@
|
||||
{{- end -}}
|
||||
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }}
|
||||
.TableOfContents "<ul")
|
||||
}}
|
||||
|
||||
|
||||
<header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
|
||||
@@ -30,17 +31,20 @@
|
||||
</section>
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}" data-oid="views_taxonomy_{{ .Data.Plural }}" data-oid-likes="likes_taxonomy_{{ .Data.Plural }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsPage.RelPermalink }}"
|
||||
integrity="{{ $jsPage.Data.Integrity }}"
|
||||
data-oid="views_taxonomy_{{ .Data.Plural }}"
|
||||
data-oid-likes="likes_taxonomy_{{ .Data.Plural }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.taxonomy.cardView }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
|
||||
@@ -48,8 +52,6 @@
|
||||
{{ partial "term-link/text.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -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,17 +1,20 @@
|
||||
<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');
|
||||
document.querySelector('script[data-id="seline-script"]').addEventListener("load", function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
||||
|
||||
seline.track("user:" + type + ':' + title, {
|
||||
seline.track("user:" + type + ":" + title, {
|
||||
type: type,
|
||||
title: title,
|
||||
url: url
|
||||
url: url,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -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 data-id="umami-script" async src="https://analytics.umami.is/script.js"
|
||||
data-website-id="{{ site.Params.umamiAnalytics.websiteid }}">
|
||||
</script>
|
||||
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>
|
||||
{{ 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});
|
||||
document.querySelector('script[data-id="umami-script"]').addEventListener("load", function () {
|
||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
||||
umami.track(type + ":" + title, { url: url });
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
@@ -29,7 +29,8 @@
|
||||
{{ 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) }}
|
||||
"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 }}
|
||||
|
||||
@@ -37,8 +38,7 @@
|
||||
{{ $meta.Add "partials" (slice (partial "meta/word-count.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0)
|
||||
}}
|
||||
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
|
||||
{{ $meta.Add "partials" (slice (partial "meta/reading-time.html" .)) }}
|
||||
{{ end }}
|
||||
|
||||
@@ -81,7 +81,10 @@
|
||||
{{ 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 not (eq $i 0) }}, {{ end }}
|
||||
<div class="cursor-pointer" onclick="window.open({{ $a.RelPermalink }},'_self');return false;">
|
||||
{{ $a.LinkTitle }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -96,7 +99,9 @@
|
||||
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series")) }}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
<span class="mr-2 margin-top-[0.5rem]" onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
<span
|
||||
class="mr-2 margin-top-[0.5rem]"
|
||||
onclick="window.open({{ .RelPermalink }},'_self');return false;">
|
||||
{{ partial "badge.html" .LinkTitle }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
@@ -32,5 +32,4 @@
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
@@ -32,5 +32,4 @@
|
||||
{{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
@@ -32,5 +32,4 @@
|
||||
{{ 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">
|
||||
|
||||
@@ -6,15 +6,21 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="place-self-center">
|
||||
@@ -23,7 +29,9 @@
|
||||
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
|
||||
{{ i18n "author.byline_title" | markdownify }}
|
||||
</div>
|
||||
<a {{ if $link }} href="{{ $link }}" {{ end }} class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
<a
|
||||
{{ if $link }}href="{{ $link }}"{{ end }}
|
||||
class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
|
||||
{{ . }}
|
||||
</a>
|
||||
{{ end }}
|
||||
@@ -34,8 +42,14 @@
|
||||
<div class="flex flex-wrap text-neutral-400 dark:text-neutral-500">
|
||||
{{ range .data.social }}
|
||||
{{ range $name, $link := . }}
|
||||
<a class="px-1 hover:text-primary-700 dark:hover:text-primary-400" href="{{ $link }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer"><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a>
|
||||
<a
|
||||
class="px-1 hover:text-primary-700 dark:hover:text-primary-400"
|
||||
href="{{ $link }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -11,15 +11,23 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
||||
width="96"
|
||||
height="96"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="place-self-center">
|
||||
|
||||
@@ -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>
|
||||
@@ -8,9 +8,7 @@
|
||||
{{ 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 }}"
|
||||
<a class="hover:underline decoration-neutral-300 dark:underline-neutral-600" href="{{ .p1.RelPermalink }}"
|
||||
>{{ if .p1.Title }}
|
||||
{{- .p1.Title -}}
|
||||
{{ else }}
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
<nav class="flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
||||
<ul class="flex flex-col list-none sm:flex-row">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
|
||||
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center" href="{{ .URL }}"
|
||||
<li
|
||||
class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
|
||||
<a
|
||||
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center"
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
@@ -22,7 +25,6 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="flex items-center justify-between">
|
||||
|
||||
{{/* Copyright */}}
|
||||
{{ if .Site.Params.footer.showCopyright | default true }}
|
||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
@@ -43,7 +45,8 @@
|
||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
||||
}}
|
||||
{{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
||||
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>` }}
|
||||
href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>`
|
||||
}}
|
||||
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
|
||||
</p>
|
||||
{{ end }}
|
||||
@@ -57,10 +60,12 @@
|
||||
scrollOffset: 0,
|
||||
})
|
||||
{{ end }}
|
||||
</script>
|
||||
{{ $jsProcess := resources.Get "js/process.js" }}
|
||||
</script> {{ $jsProcess := resources.Get "js/process.js" }}
|
||||
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsProcess.RelPermalink }}" integrity="{{ $jsProcess.Data.Integrity }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsProcess.RelPermalink }}"
|
||||
integrity="{{ $jsProcess.Data.Integrity }}"></script>
|
||||
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
||||
{{ if templates.Exists "partials/extend-footer.html" }}
|
||||
{{ partialCached "extend-footer.html" . }}
|
||||
|
||||
@@ -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,5 +1,7 @@
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
@@ -15,8 +17,14 @@
|
||||
</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">
|
||||
<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 }}
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
<li class="mt-1">
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||
)
|
||||
}}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<div {{ if and .Pre .Name }}class="mr-2"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
|
||||
@@ -5,8 +5,15 @@
|
||||
{{ 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,8 +24,12 @@
|
||||
<div class="pt-2 p-5 mt-2 rounded-xl backdrop-blur shadow-2xl">
|
||||
<div class="flex flex-col space-y-3">
|
||||
{{ range .Children }}
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }} target="_blank" {{
|
||||
end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}target="_blank"{{ end }}
|
||||
class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||
{{ if .Pre }}
|
||||
<span {{ if and .Pre .Name }}class="mr-1"{{ end }}>
|
||||
{{ partial "icon.html" .Pre }}
|
||||
|
||||
@@ -23,11 +23,15 @@
|
||||
{{- 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>
|
||||
<div
|
||||
class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
<div
|
||||
class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
@@ -34,25 +34,41 @@
|
||||
<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>
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else if $disableImageOptimization }}
|
||||
{{ with . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
<img
|
||||
class="w-full rounded-lg single_hero_round nozoom"
|
||||
alt="{{ $alt }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
<img
|
||||
class="w-full rounded-lg single_hero_round nozoom"
|
||||
alt="{{ $alt }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center"> {{ $caption | markdownify }} </figcaption>
|
||||
<figcaption class="text-sm text-neutral-700 dark:text-neutral-400 hover:underline text-center">
|
||||
{{ $caption | markdownify }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
|
||||
@@ -37,16 +37,21 @@
|
||||
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
||||
(and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList))
|
||||
) }}
|
||||
)
|
||||
}}
|
||||
|
||||
{{- with $featured -}}
|
||||
{{ if or $disableImageOptimization (strings.HasSuffix . ".svg") }}
|
||||
{{ with . }}
|
||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
<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>
|
||||
<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 -}}
|
||||
@@ -55,32 +60,39 @@
|
||||
|
||||
{{ 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">
|
||||
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>
|
||||
</div>{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
<div
|
||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
||||
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>
|
||||
</div>{{ end }}
|
||||
{{ 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>
|
||||
<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>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="background-blur"></script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -21,13 +21,14 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="w-full h-[1000px] object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}" role="presentation">
|
||||
<img
|
||||
class="w-full h-[1000px] object-cover m-0 nozoom margin-0"
|
||||
src="{{ $homepageImage.RelPermalink }}"
|
||||
role="presentation">
|
||||
<div
|
||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
<div
|
||||
class="opacity-60 absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral-100 dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
class="opacity-60 absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral-100 dark:to-neutral-800 mix-blend-normal"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-1 py-1 flex flex-col items-center justify-center text-center">
|
||||
@@ -42,8 +43,12 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||
@@ -59,9 +64,16 @@
|
||||
<div class="flex flex-wrap">
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -77,8 +89,14 @@
|
||||
{{ partial "recent-articles/main.html" . }}
|
||||
</section>
|
||||
{{ if .Site.Params.homepage.layoutBackgroundBlur | default false }}
|
||||
<div id="background-blur" class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
<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>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $backgroundBlur.RelPermalink }}"
|
||||
integrity="{{ $backgroundBlur.Data.Integrity }}"
|
||||
data-target-id="background-blur"></script>
|
||||
{{ end }}
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
<img
|
||||
class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -25,16 +25,15 @@
|
||||
<img class="h-full w-full object-cover m-0 nozoom margin-0" src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
|
||||
</div>
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply"></div>
|
||||
{{ else }}
|
||||
<div
|
||||
class="absolute inset-0 from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
|
||||
</div>
|
||||
class="absolute inset-0 from-primary-500 to-secondary-600 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
<div
|
||||
class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
@@ -46,8 +45,12 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
@@ -75,13 +78,27 @@
|
||||
{{ range $links := . }}
|
||||
{{ range $name, $url := $links }}
|
||||
{{ if not $disableHeroImageFilter }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-300" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-300"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ else }}
|
||||
<a class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200" href="{{ $url }}" target="_blank"
|
||||
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
|
||||
"icon.html" $name }}</a>
|
||||
<a
|
||||
class="px-1 hover:text-primary-400 text-primary-800 dark:text-primary-200"
|
||||
href="{{ $url }}"
|
||||
target="_blank"
|
||||
aria-label="{{ $name | title }}"
|
||||
rel="me noopener noreferrer"
|
||||
>{{ partial
|
||||
"icon.html" $name
|
||||
}}</a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<article class="{{ if not .Site.Params.homepage.showRecent }}
|
||||
<article
|
||||
class="{{ if not .Site.Params.homepage.showRecent }}
|
||||
h-full
|
||||
{{ end }} flex flex-col items-center justify-center text-center">
|
||||
<header class="relative px-1 py-1 flex flex-col items-center mb-3">
|
||||
@@ -14,8 +15,12 @@
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||
{{ end }}
|
||||
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144" alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}" />
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="text-4xl font-extrabold">
|
||||
|
||||
@@ -15,8 +15,11 @@
|
||||
{{ $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,9 +1,14 @@
|
||||
<span>
|
||||
<button id="button_likes"
|
||||
<button
|
||||
id="button_likes"
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
|
||||
onclick="process_article()">
|
||||
<span id="button_likes_heart" class="inline-block align-text-bottom hidden">{{ partial "icon.html" "heart" }} </span>
|
||||
<span id="button_likes_emtpty_heart" class="inline-block align-text-bottom">{{ partial "icon.html" "heart-empty" }}</span>
|
||||
<span id="button_likes_heart" class="inline-block align-text-bottom hidden"
|
||||
>{{ partial "icon.html" "heart" }}
|
||||
</span>
|
||||
<span id="button_likes_emtpty_heart" class="inline-block align-text-bottom"
|
||||
>{{ partial "icon.html" "heart-empty" }}</span
|
||||
>
|
||||
<span id="button_likes_text"> Like</span>
|
||||
</button>
|
||||
</span>
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
{{ $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,10 +1,15 @@
|
||||
{{ $jsZenMode := resources.Get "js/zen-mode.js" }}
|
||||
{{ $jsZenMode = $jsZenMode | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
|
||||
<script type="text/javascript" src="{{ $jsZenMode.RelPermalink }}" integrity="{{ $jsZenMode.Data.Integrity }}"></script>
|
||||
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsZenMode.RelPermalink }}"
|
||||
integrity="{{ $jsZenMode.Data.Integrity }}"></script>
|
||||
|
||||
<span class="mb-[2px]">
|
||||
<span id="zen-mode-button"
|
||||
<span
|
||||
id="zen-mode-button"
|
||||
class="text-lg hover:text-primary-500"
|
||||
title="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
data-title-i18n-disable="{{ i18n "article.zen_mode_title.enable" }}"
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
href="{{ $.Paginator.Prev.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="prev"
|
||||
>←</a>
|
||||
>←</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- range $.Paginator.Pagers -}}
|
||||
@@ -28,7 +29,8 @@
|
||||
class="{{ if eq . $.Paginator }}
|
||||
bg-primary-200 dark:bg-primary-400 dark:text-neutral-800
|
||||
{{ end }} mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
>{{ .PageNumber }}</a>
|
||||
>{{ .PageNumber }}</a
|
||||
>
|
||||
</li>
|
||||
{{- else if ($.Scratch.Get "paginator.shouldEllipse") -}}
|
||||
<li class="page-item ">
|
||||
@@ -42,7 +44,8 @@
|
||||
href="{{ $.Paginator.Next.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="next"
|
||||
>→</a>
|
||||
>→</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
|
||||
|
||||
<div class="relative w-screen max-w-[1600px] px-[30px] center-relative-left">
|
||||
<section
|
||||
class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
|
||||
.Site.Params.mainSections)).Pages }}
|
||||
.Site.Params.mainSections)).Pages
|
||||
}}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
|
||||
.Site.Params.mainSections)).Pages }}
|
||||
.Site.Params.mainSections)).Pages
|
||||
}}
|
||||
{{ partial "article-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
@@ -1,9 +1,9 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
||||
|
||||
|
||||
<section class="space-y-10 w-full">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages
|
||||
}}
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages }}
|
||||
{{ partial "article-link/simple.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
@@ -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,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 }}
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
{{ if .Params.series }}
|
||||
<summary
|
||||
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
|
||||
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
|
||||
{{ index .Params.series 0 }} -
|
||||
{{ i18n "article.part_of_series" }}
|
||||
</summary>
|
||||
{{ $seriesName := strings.ToLower (index .Params.series 0) }}
|
||||
{{ range $post := sort (index .Site.Taxonomies.series $seriesName) "Params.series_order" }}
|
||||
{{ if eq $post.Permalink $.Page.Permalink }}
|
||||
<div
|
||||
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
|
||||
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }}
|
||||
{{ i18n "article.part" }} {{ $post.Params.series_order }}:
|
||||
{{ i18n "article.this_article" }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div
|
||||
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
|
||||
<a href="{{ $post.RelPermalink }}">
|
||||
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
|
||||
{{ i18n "article.part" }} {{ $post.Params.series_order }}:
|
||||
{{ $post.Params.title }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
||||
href="{{ printf .url $.Permalink $.Title }}"
|
||||
title="{{ i18n .title }}"
|
||||
aria-label="{{ i18n .title }}"
|
||||
>
|
||||
aria-label="{{ i18n .title }}">
|
||||
{{ partial "icon.html" .icon }}
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<a href="{{ .Page.RelPermalink }}" class="min-w-full">
|
||||
<div
|
||||
class="border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
|
||||
|
||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
||||
|
||||
{{- with site.Params.images -}}
|
||||
{{- range first 6 . }}
|
||||
<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
|
||||
<meta property="og:image" content="{{ . | absURL }}">
|
||||
{{ end -}}
|
||||
{{- else -}}
|
||||
{{- $images := .Page.Resources.ByType "image" -}}
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
@@ -23,32 +23,29 @@
|
||||
{{ end }}
|
||||
{{- else -}}
|
||||
{{- with site.Params.images }}
|
||||
<meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
|
||||
<meta property="og:image" content="{{ index . 0 | absURL }}">
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{ if site.Params.taxonomy.showTermCount | default true }}
|
||||
<span class="absolute bottom-0 right-0 m-2">
|
||||
<span class="flex">
|
||||
<span
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xl font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
|
||||
>
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xl font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
||||
{{ .Count }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="px-6 py-4">
|
||||
|
||||
<div
|
||||
class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
|
||||
>{{ .Page.Title | emojify }}</div>
|
||||
|
||||
class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
|
||||
{{ .Page.Title | emojify }}
|
||||
</div>
|
||||
<div class="px-6 pt-4 pb-2">
|
||||
|
||||
</div>
|
||||
<div class="px-6 pt-4 pb-2"></div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -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" }}
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
<span class="ltr:mr-1 rtl:ml-1">
|
||||
{{ partial "icon.html" "language" }}
|
||||
</span>
|
||||
<div class="text-sm font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||
<div
|
||||
class="text-sm font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"
|
||||
title="{{ .Title }}">
|
||||
{{- i18n "global.language" | markdownify -}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,7 +15,9 @@
|
||||
<div class="flex flex-col space-y-3">
|
||||
{{ range .AllTranslations }}
|
||||
<a href="{{ .RelPermalink }}" class="flex items-center">
|
||||
<p class="text-sm font-sm text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||
<p
|
||||
class="text-sm font-sm text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"
|
||||
title="{{ .Title }}">
|
||||
{{ .Language.Params.displayName | emojify }}
|
||||
</p>
|
||||
</a>
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
defer
|
||||
type="text/javascript"
|
||||
src="{{ $mermaidJS.RelPermalink }}"
|
||||
integrity="{{ $mermaidJS.Data.Integrity }}"
|
||||
></script>
|
||||
integrity="{{ $mermaidJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{/* Chart */}}
|
||||
@@ -22,7 +21,10 @@
|
||||
{{ $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 }}"
|
||||
<script
|
||||
defer
|
||||
type="text/javascript"
|
||||
src="{{ $chartJS.RelPermalink }}"
|
||||
integrity="{{ $chartJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
|
||||
@@ -30,13 +32,20 @@
|
||||
{{ 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 }}" />
|
||||
<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 }}"
|
||||
<script
|
||||
defer
|
||||
src="{{ $katexRenderJS.RelPermalink }}"
|
||||
integrity="{{ $katexRenderJS.Data.Integrity }}"
|
||||
onload="renderMathInElement(document.body);"></script>
|
||||
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
|
||||
{{ range $katexFonts }}
|
||||
@@ -57,19 +66,28 @@
|
||||
|
||||
{{ $jsShortcodeGallery := resources.Get "js/shortcodes/gallery.js" }}
|
||||
{{ $jsShortcodeGallery = $jsShortcodeGallery | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $jsShortcodeGallery.RelPermalink }}" integrity="{{ $jsShortcodeGallery.Data.Integrity }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $jsShortcodeGallery.RelPermalink }}"
|
||||
integrity="{{ $jsShortcodeGallery.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{/* tw-elements */}}
|
||||
{{ if or (.Page.HasShortcode "carousel") (.Page.HasShortcode "timeline") }}
|
||||
{{ $twelementsLib := resources.Get "lib/tw-elements/index.min.js" }}
|
||||
<script defer src="{{ $twelementsLib.RelPermalink }}" integrity="{{ $twelementsLib.Data.Integrity }}"></script>
|
||||
<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 }}"/>
|
||||
<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>
|
||||
|
||||
@@ -16,14 +16,18 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div id="{{ $id }}" class="relative" data-twe-carousel-init data-twe-ride="carousel">
|
||||
<div class="absolute right-0 bottom-0 left-0 z-[2] mx-[15%] mb-10 flex list-none justify-center p-0"
|
||||
data-twe-carousel-indicators>
|
||||
|
||||
<div id="{{ $id }}" class="relative" data-twe-carousel-init data-twe-ride="carousel">
|
||||
<div
|
||||
class="absolute right-0 bottom-0 left-0 z-[2] mx-[15%] mb-10 flex list-none justify-center p-0"
|
||||
data-twe-carousel-indicators>
|
||||
{{ $num := 0 }}
|
||||
{{ range $images }}
|
||||
|
||||
<button type="button" data-twe-target="#{{ $id }}" data-twe-slide-to="{{ $num }}" {{ if eq $num 0 }} data-twe-carousel-active aria-current="true" {{ end }}
|
||||
<button
|
||||
type="button"
|
||||
data-twe-target="#{{ $id }}"
|
||||
data-twe-slide-to="{{ $num }}"
|
||||
{{ if eq $num 0 }}data-twe-carousel-active aria-current="true"{{ end }}
|
||||
class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-neutral bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
|
||||
aria-label="Slide {{ $num }}"></button>
|
||||
|
||||
@@ -32,14 +36,19 @@
|
||||
|
||||
</div>
|
||||
<div class="relative w-full overflow-hidden after:clear-both after:block after:content-['']">
|
||||
|
||||
{{ $num := 0 }}
|
||||
{{ range $images }}
|
||||
|
||||
<div class="relative float-left -mr-[100%] {{ if not (eq $num 0) }} hidden {{ end }} w-full transition-transform duration-[{{ $interval }}ms] ease-in-out motion-reduce:transition-none"
|
||||
data-twe-carousel-item {{ if eq $num 0 }} data-twe-carousel-active {{ end }}>
|
||||
<div
|
||||
class="relative float-left -mr-[100%] {{ if not (eq $num 0) }}
|
||||
hidden
|
||||
{{ end }} w-full transition-transform duration-[{{ $interval }}ms] ease-in-out motion-reduce:transition-none"
|
||||
data-twe-carousel-item
|
||||
{{ if eq $num 0 }}data-twe-carousel-active{{ end }}>
|
||||
<div class="ratio-{{ $aspect }} single_hero_background">
|
||||
<img src="{{ .RelPermalink }}" class="block absolute top-0 object-cover w-full h-full nozoom" alt="carousel image {{$num}}"/>
|
||||
<img
|
||||
src="{{ .RelPermalink }}"
|
||||
class="block absolute top-0 object-cover w-full h-full nozoom"
|
||||
alt="carousel image {{ $num }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,26 +58,44 @@
|
||||
</div>
|
||||
<button
|
||||
class="absolute top-0 bottom-0 left-0 z-[2] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
|
||||
type="button" data-twe-target="#{{ $id }}" data-twe-slide="prev">
|
||||
type="button"
|
||||
data-twe-target="#{{ $id }}"
|
||||
data-twe-slide="prev">
|
||||
<span class="inline-block h-8 w-8">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4.5"
|
||||
stroke="currentColor" class="h-6 w-6">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="4.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />
|
||||
</svg>
|
||||
</span>
|
||||
<span
|
||||
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]">Previous</span>
|
||||
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
||||
>Previous</span
|
||||
>
|
||||
</button>
|
||||
<button
|
||||
class="absolute top-0 bottom-0 right-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
|
||||
type="button" data-twe-target="#{{ $id }}" data-twe-slide="next">
|
||||
type="button"
|
||||
data-twe-target="#{{ $id }}"
|
||||
data-twe-slide="next">
|
||||
<span class="inline-block h-8 w-8">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4.5"
|
||||
stroke="currentColor" class="h-6 w-6">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="4.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
|
||||
</svg>
|
||||
</span>
|
||||
<span
|
||||
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]">Nextsads</span>
|
||||
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
||||
>Nextsads</span
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
{{- $codebergData := resources.GetRemote $codebergURL | transform.Unmarshal -}}
|
||||
{{- $codebergColors := .Site.Data.codebergColors -}}
|
||||
{{- with $codebergData -}}
|
||||
|
||||
<div class="codeberg-card-wrapper">
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
|
||||
<div
|
||||
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
|
||||
<div class="flex items-center">
|
||||
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
|
||||
{{ partial "icon.html" "codeberg" }}
|
||||
@@ -25,9 +23,13 @@
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
|
||||
<span class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }} {{- index $codebergColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
|
||||
<span
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }}
|
||||
{{- index $codebergColors .language -}}
|
||||
{{ else }}
|
||||
#0077b6
|
||||
{{ end }}"></span>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
|
||||
</div>
|
||||
@@ -45,13 +47,16 @@
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
|
||||
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $codebergURL }}" data-repo-id="{{ $id }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $fetchRepo.RelPermalink }}"
|
||||
integrity="{{ $fetchRepo.Data.Integrity }}"
|
||||
data-repo-url="{{ $codebergURL }}"
|
||||
data-repo-id="{{ $id }}"></script>
|
||||
</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
{{- $forgejoData := resources.GetRemote $forgejoURL | transform.Unmarshal -}}
|
||||
{{- $forgejoColors := .Site.Data.forgejoColors -}}
|
||||
{{- with $forgejoData -}}
|
||||
|
||||
<div class="forgejo-card-wrapper">
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
|
||||
<div
|
||||
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
|
||||
<div class="flex items-center">
|
||||
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
|
||||
{{ partial "icon.html" "forgejo" }}
|
||||
@@ -25,9 +23,13 @@
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
|
||||
<span class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }} {{- index $forgejoColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
|
||||
<span
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }}
|
||||
{{- index $forgejoColors .language -}}
|
||||
{{ else }}
|
||||
#0077b6
|
||||
{{ end }}"></span>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
|
||||
</div>
|
||||
@@ -45,13 +47,16 @@
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
|
||||
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $forgejoURL }}" data-repo-id="{{ $id }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $fetchRepo.RelPermalink }}"
|
||||
integrity="{{ $fetchRepo.Data.Integrity }}"
|
||||
data-repo-url="{{ $forgejoURL }}"
|
||||
data-repo-id="{{ $id }}"></script>
|
||||
</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{{ $id := delimit (slice "gallery" (partial "functions/uid.html" .)) "-" -}}
|
||||
|
||||
|
||||
<div id="{{- $id -}}" class="gallery">
|
||||
{{ $page := .Page -}}
|
||||
|
||||
|
||||
<!-- find all img tags -->
|
||||
{{ $imgTagRegex := `<img\s+[^>]*>` -}}
|
||||
{{ $imgTags := findRE $imgTagRegex .Inner -}}
|
||||
@@ -24,7 +26,8 @@
|
||||
{{ if $isExternalURL -}}
|
||||
{{ with resources.GetRemote $src -}}{{ $finalSrc = .RelPermalink -}}{{ end -}}
|
||||
{{ else -}}
|
||||
{{ with $page.Resources.GetMatch $src -}}{{ $finalSrc = .RelPermalink -}}
|
||||
{{ with $page.Resources.GetMatch $src -}}
|
||||
{{ $finalSrc = .RelPermalink -}}
|
||||
{{ else -}}
|
||||
{{ with resources.GetMatch $src -}}{{ $finalSrc = .RelPermalink }}{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{if len .Params | eq 3 }} ?file={{ index .Params 2 }}{{end}}"></script>
|
||||
<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{ if len .Params | eq 3 }}
|
||||
?file={{ index .Params 2 }}
|
||||
{{ end }}"></script>
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
{{- $giteaData := resources.GetRemote $giteaURL | transform.Unmarshal -}}
|
||||
{{- $giteaColors := .Site.Data.giteaColors -}}
|
||||
{{- with $giteaData -}}
|
||||
|
||||
<div class="gitea-card-wrapper">
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
|
||||
<div
|
||||
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
|
||||
<div class="flex items-center">
|
||||
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
|
||||
{{ partial "icon.html" "gitea" }}
|
||||
@@ -25,9 +23,13 @@
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
|
||||
<span class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }} {{- index $giteaColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
|
||||
<span
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }}
|
||||
{{- index $giteaColors .language -}}
|
||||
{{ else }}
|
||||
#0077b6
|
||||
{{ end }}"></span>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
|
||||
</div>
|
||||
@@ -45,13 +47,16 @@
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
|
||||
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $giteaURL }}" data-repo-id="{{ $id }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $fetchRepo.RelPermalink }}"
|
||||
integrity="{{ $fetchRepo.Data.Integrity }}"
|
||||
data-repo-url="{{ $giteaURL }}"
|
||||
data-repo-id="{{ $id }}"></script>
|
||||
</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -7,30 +7,27 @@
|
||||
|
||||
|
||||
<div class="github-card-wrapper">
|
||||
|
||||
{{- with $githubData -}}
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
|
||||
|
||||
|
||||
|
||||
<div
|
||||
class="w-full md:w-auto p-0 m-0 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
|
||||
{{- if $showThumbnail -}}
|
||||
<div class="w-full nozoom">
|
||||
<img src="{{ $githubThumbnailURL }}" alt="GitHub Repository Thumbnail"
|
||||
<img
|
||||
src="{{ $githubThumbnailURL }}"
|
||||
alt="GitHub Repository Thumbnail"
|
||||
class="nozoom mt-0 mb-0 w-full h-full object-cover">
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<div
|
||||
class="w-full md:w-auto pt-3 p-5">
|
||||
|
||||
<div class="w-full md:w-auto pt-3 p-5">
|
||||
<div class="flex items-center">
|
||||
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
|
||||
{{ partial "icon.html" "github" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-full_name"
|
||||
<div
|
||||
id="{{ $id }}-full_name"
|
||||
class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
|
||||
{{ .full_name | markdownify }}
|
||||
</div>
|
||||
@@ -41,9 +38,13 @@
|
||||
</p>
|
||||
|
||||
<div class="m-0 mt-2 flex items-center">
|
||||
|
||||
<span class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }} {{- index $githubColors .language -}} {{ else }} #0077b6 {{ end }}"></span>
|
||||
<span
|
||||
class="mr-1 inline-block h-3 w-3 rounded-full"
|
||||
style="background-color: {{ if .language }}
|
||||
{{- index $githubColors .language -}}
|
||||
{{ else }}
|
||||
#0077b6
|
||||
{{ end }}"></span>
|
||||
<div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
|
||||
</div>
|
||||
@@ -61,13 +62,17 @@
|
||||
<div id="{{ $id }}-forks" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
|
||||
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $githubURL }}" data-repo-id="{{ $id }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $fetchRepo.RelPermalink }}"
|
||||
integrity="{{ $fetchRepo.Data.Integrity }}"
|
||||
data-repo-url="{{ $githubURL }}"
|
||||
data-repo-id="{{ $id }}"></script>
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
|
||||
{{- $gitLabData := resources.GetRemote $gitlabURL | transform.Unmarshal -}}
|
||||
{{- with $gitLabData -}}
|
||||
|
||||
<div class="gitlab-card-wrapper">
|
||||
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">
|
||||
<div class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
|
||||
<div
|
||||
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||
<div class="flex items-center">
|
||||
<span class="text-2xl text-neutral-800 dark:text-neutral margin-right-[10px]">
|
||||
{{ partial "icon.html" "gitlab" }}
|
||||
</span>
|
||||
<div id="{{ $id }}-name_with_namespace" class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
|
||||
<div
|
||||
id="{{ $id }}-name_with_namespace"
|
||||
class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
|
||||
{{ .name_with_namespace | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,13 +36,16 @@
|
||||
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
||||
{{ .forks_count }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
|
||||
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||
<script type="text/javascript" src="{{ $fetchRepo.RelPermalink }}" integrity="{{ $fetchRepo.Data.Integrity }}" data-repo-url="{{ $gitlabURL }}" data-repo-id="{{ $id }}"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $fetchRepo.RelPermalink }}"
|
||||
integrity="{{ $fetchRepo.Data.Integrity }}"
|
||||
data-repo-url="{{ $gitlabURL }}"
|
||||
data-repo-id="{{ $id }}"></script>
|
||||
</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{{ $icon := .Get "icon" }}
|
||||
<div class="flex mt-2">
|
||||
<span
|
||||
class="rounded-full bg-primary-500 dark:bg-primary-400 text-neutral-50 dark:text-neutral-800 px-1.5 py-[1px] text-xs font-normal"
|
||||
>
|
||||
class="rounded-full bg-primary-500 dark:bg-primary-400 text-neutral-50 dark:text-neutral-800 px-1.5 py-[1px] text-xs font-normal">
|
||||
<span class="flex flex-row items-center">
|
||||
{{ if $icon }}
|
||||
<span class="mr-1">{{ partial "icon" $icon }}</span>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
{{ $limit := .Get "limit" | default 1 }}
|
||||
{{ $title := .Get "title" | default (i18n "shortcode.recent_articles" | emojify) }}
|
||||
{{ $parent := .Page.RelPermalink }}
|
||||
@@ -7,9 +6,7 @@
|
||||
{{ $value := .Get "value" }}
|
||||
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ $title }}</h2>
|
||||
|
||||
|
||||
{{ if $cardView | default false }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ if $where }}
|
||||
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}
|
||||
@@ -25,7 +22,6 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="space-y-10 w-full mt-10 mb-10">
|
||||
@@ -43,5 +39,4 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<div class="flex justify-between">
|
||||
<span
|
||||
class="w-full py-6 mr-3 rounded-md"
|
||||
{{ with .Get 0 }}style="background-color: {{ . }}"{{ end }}
|
||||
></span>
|
||||
{{ with .Get 0 }}style="background-color: {{ . }}"{{ end }}></span>
|
||||
<span
|
||||
class="w-full py-6 mr-3 rounded-md"
|
||||
{{ with .Get 1 }}style="background-color: {{ . }}"{{ end }}
|
||||
></span>
|
||||
{{ with .Get 1 }}style="background-color: {{ . }}"{{ end }}></span>
|
||||
<span
|
||||
class="w-full py-6 mr-3 rounded-md"
|
||||
{{ with .Get 2 }}style="background-color: {{ . }}"{{ end }}
|
||||
></span>
|
||||
{{ with .Get 2 }}style="background-color: {{ . }}"{{ end }}></span>
|
||||
</div>
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
{{ $subheader := .Get "subheader" }}
|
||||
<li>
|
||||
<div class="flex flex-start">
|
||||
<div class="bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 min-w-[30px] h-8 text-2xl flex items-center justify-center rounded-full -ml-12 mt-5">
|
||||
<div
|
||||
class="bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 min-w-[30px] h-8 text-2xl flex items-center justify-center rounded-full -ml-12 mt-5">
|
||||
{{ partial "icon" $icon }}
|
||||
</div>
|
||||
<div class="block p-6 rounded-lg shadow-2xl min-w-full ml-6 mb-10 break-words">
|
||||
<div class="flex justify-between">
|
||||
{{ if $header }}
|
||||
<h2 class="mt-0">
|
||||
{{ $header }}
|
||||
</h2>
|
||||
<h2 class="mt-0">{{ $header }}</h2>
|
||||
{{ end }}
|
||||
{{ if $badge }}
|
||||
<h3 class="">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
{{- $breakLines := .Get "breakLines" | default true -}}
|
||||
{{- $waitUntilVisible := .Get "waitUntilVisible" | default true -}}
|
||||
{{- $loop := .Get "loop" | default false -}}
|
||||
|
||||
{{- $classList := slice -}}
|
||||
{{- with .Get "class" -}}
|
||||
{{- $classList = $classList | append . -}}
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
{{- $label := .Get "id" | default "Blowfish" -}}
|
||||
{{- $params := .Get "params" -}}
|
||||
|
||||
|
||||
<lite-youtube videoid="{{ $id }}" playlabel="{{ $label }}" params="{{ $params }}"></lite-youtube>
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
const fs = require('fs');
|
||||
const crypto = require("crypto")
|
||||
const fs = require("fs");
|
||||
const crypto = require("crypto");
|
||||
const puppeteer = require("puppeteer");
|
||||
|
||||
const configDir = "./exampleSite/config/_default";
|
||||
const defaultLang = "en";
|
||||
const usersFolderPath = "./exampleSite/content/users/"
|
||||
const translate = require('@iamtraction/google-translate');
|
||||
const usersFolderPath = "./exampleSite/content/users/";
|
||||
const translate = require("@iamtraction/google-translate");
|
||||
|
||||
|
||||
var targetLangs = []
|
||||
var targetLangs = [];
|
||||
|
||||
const configFiles = fs.readdirSync(configDir);
|
||||
configFiles.forEach(file => {
|
||||
configFiles.forEach((file) => {
|
||||
if (file.indexOf("languages.") > -1) {
|
||||
var lang = file.split(".")[1];
|
||||
if (lang != defaultLang) {
|
||||
@@ -22,32 +21,31 @@ configFiles.forEach(file => {
|
||||
|
||||
const indexFiles = fs.readdirSync(usersFolderPath);
|
||||
for (var i in targetLangs) {
|
||||
var targetFile = '_index.' + targetLangs[i] + '.md';
|
||||
var targetFile = "_index." + targetLangs[i] + ".md";
|
||||
if (indexFiles.indexOf(targetFile) == -1) {
|
||||
fs.copyFileSync(usersFolderPath + '_index.md', usersFolderPath + targetFile);
|
||||
fs.copyFileSync(usersFolderPath + "_index.md", usersFolderPath + targetFile);
|
||||
}
|
||||
}
|
||||
|
||||
let rawdata = fs.readFileSync(usersFolderPath + 'users.json');
|
||||
let rawdata = fs.readFileSync(usersFolderPath + "users.json");
|
||||
let users = JSON.parse(rawdata);
|
||||
let userDict = {}
|
||||
let userDict = {};
|
||||
for (var i in users) {
|
||||
userDict[generateDirName(users[i].url)] = true;
|
||||
}
|
||||
|
||||
const files = fs.readdirSync(usersFolderPath);
|
||||
|
||||
|
||||
for (file in files) {
|
||||
let stats = fs.statSync(usersFolderPath + files[file]);
|
||||
if (files[file] != 'users.json' && files[file].indexOf("_index.") == -1) {
|
||||
if (files[file] != "users.json" && files[file].indexOf("_index.") == -1) {
|
||||
if (stats.isDirectory()) {
|
||||
if (!userDict[files[file]]) {
|
||||
console.log('deleting: ', files[file]);
|
||||
console.log("deleting: ", files[file]);
|
||||
fs.rmdirSync(usersFolderPath + files[file], { recursive: true, force: true });
|
||||
}
|
||||
} else {
|
||||
console.log('deleting: ', files[file]);
|
||||
console.log("deleting: ", files[file]);
|
||||
fs.unlinkSync(usersFolderPath + files[file]);
|
||||
}
|
||||
}
|
||||
@@ -56,21 +54,19 @@ for (file in files) {
|
||||
var cache = {};
|
||||
|
||||
function generateDirName(seed) {
|
||||
var hash = crypto.createHash('md5');
|
||||
var hash = crypto.createHash("md5");
|
||||
hash.update(seed);
|
||||
var dir = hash.digest('hex');
|
||||
var dir = hash.digest("hex");
|
||||
return dir;
|
||||
}
|
||||
|
||||
async function convert(text, from, to) {
|
||||
var options = {
|
||||
from: from,
|
||||
to: to
|
||||
to: to,
|
||||
};
|
||||
if (!cache[to])
|
||||
cache[to] = {};
|
||||
if (cache[to][text])
|
||||
return cache[to][text];
|
||||
if (!cache[to]) cache[to] = {};
|
||||
if (cache[to][text]) return cache[to][text];
|
||||
var translated_text = await translate(text, options);
|
||||
cache[to][text] = translated_text.text;
|
||||
return translated_text.text;
|
||||
@@ -84,7 +80,7 @@ async function translateFrontMatterTags(block, targetLang, tags) {
|
||||
var elements = array[i].split(":");
|
||||
var newElement = "";
|
||||
if (elements[0].indexOf("tags") != -1) {
|
||||
translatedTags = []
|
||||
translatedTags = [];
|
||||
for (var j in tags) {
|
||||
var tempTag = await convert(tags[j], defaultLang, targetLang);
|
||||
translatedTags.push(tempTag);
|
||||
@@ -110,16 +106,23 @@ puppeteer
|
||||
},
|
||||
})
|
||||
.then(async (browser) => {
|
||||
|
||||
const page = await browser.newPage();
|
||||
|
||||
for (var i in users) {
|
||||
|
||||
var userMDFile = "---\n\
|
||||
title: \""+ users[i].title + "\"\n\
|
||||
tags: ["+ users[i].tags + "]\n\
|
||||
externalUrl: \""+ users[i].url + "\"\n\
|
||||
weight: "+ (i + 1) + "\n\
|
||||
var userMDFile =
|
||||
'---\n\
|
||||
title: "' +
|
||||
users[i].title +
|
||||
'"\n\
|
||||
tags: [' +
|
||||
users[i].tags +
|
||||
']\n\
|
||||
externalUrl: "' +
|
||||
users[i].url +
|
||||
'"\n\
|
||||
weight: ' +
|
||||
(i + 1) +
|
||||
"\n\
|
||||
showDate: false\n\
|
||||
showAuthor: false\n\
|
||||
showReadingTime: false\n\
|
||||
@@ -134,16 +137,15 @@ puppeteer
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir);
|
||||
console.log(i, users[i].title);
|
||||
fs.writeFileSync(dir + '/index.md', userMDFile);
|
||||
fs.writeFileSync(dir + "/index.md", userMDFile);
|
||||
for (var j in targetLangs) {
|
||||
var content = await translateFrontMatterTags(userMDFile, targetLangs[j], users[i].tags);
|
||||
fs.writeFileSync(dir + '/index.' + targetLangs[j] + '.md', content);
|
||||
fs.writeFileSync(dir + "/index." + targetLangs[j] + ".md", content);
|
||||
}
|
||||
await page.goto(users[i].url);
|
||||
await page.screenshot({ path: dir + "/feature.jpg", type: 'webp', quality: 50, });
|
||||
await page.screenshot({ path: dir + "/feature.jpg", type: "webp", quality: 50 });
|
||||
}
|
||||
}
|
||||
|
||||
await browser.close();
|
||||
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user