diff --git a/.gitignore b/.gitignore
index f0a5005..35c3c4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+node_modules/
public/
+resources/
+
.hugo_build.lock
-resources/
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index ad443f7..5ef2671 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
-The MIT License (MIT)
+MIT License
-Copyright (c) 2023 Authors of the invariant trajectory descriptors software
+Copyright (c) 2024 Trajectory Invariants software authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/content/_index.md b/content/_index.md
index 31c9f2c..026bdf9 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -3,11 +3,6 @@ title: Hextra Theme
layout: hextra-home
---
-
{{< hextra/hero-headline >}}
diff --git a/content/blog/_index.md b/content/blog/_index.md
index 59db226..b990665 100644
--- a/content/blog/_index.md
+++ b/content/blog/_index.md
@@ -1,3 +1,10 @@
---
title: "Blog"
---
+
+
+{{< hextra/hero-badge link="index.xml" >}}
+ RSS Feed
+ {{< icon name="rss" attributes="height=14" >}}
+{{< /hextra/hero-badge >}}
+
diff --git a/content/blog/markdown.md b/content/blog/markdown.md
index 782786f..9831fa7 100644
--- a/content/blog/markdown.md
+++ b/content/blog/markdown.md
@@ -2,8 +2,16 @@
title: Markdown Syntax Guide
date: 2020-01-01
authors:
- - name: John Doe
- link: https://example.com/johndoe
+ - name: imfing
+ link: https://github.com/imfing
+ image: https://github.com/imfing.png
+ - name: Octocat
+ link: https://github.com/octocat
+ image: https://github.com/octocat.png
+tags:
+ - Markdown
+ - Example
+ - Guide
excludeSearch: true
---
diff --git a/content/showcase/index.md b/content/showcase/index.md
index f172638..5df59c3 100644
--- a/content/showcase/index.md
+++ b/content/showcase/index.md
@@ -12,7 +12,9 @@ Applications of invariant trajectory descriptors.
{{< cards >}}
+ {{< card link="https://developers.osuny.org" title="Osuny" image="https://raw.githubusercontent.com/noesya/osuny-developers/main/static/images/showcase-hextra/screenshot.png" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
{{< card link="https://getporter.org/" title="Porter" image="https://repository-images.githubusercontent.com/155893691/aa249c80-fcf3-11ea-93b0-30079e8d7de4" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
{{< card link="https://lutheranconfessions.org/" title="LutheranConfessions" image="https://github.com/imfing/hextra/assets/5097752/ad6625e4-88cd-4cad-b102-5399997d0359" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
- {{< card link="/" title="Hextra Starter Template" image="https://user-images.githubusercontent.com/5097752/263551418-c403b9a9-a76c-47a6-8466-513d772ef0b7.jpg" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
-{{< /cards >}}
+ {{< card link="https://github.com/imfing/hextra-starter-template/" title="Hextra Starter Template" image="https://user-images.githubusercontent.com/5097752/263551418-c403b9a9-a76c-47a6-8466-513d772ef0b7.jpg" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
+ {{< card link="https://developers.clever-cloud.com/" title="Clever Cloud Documentation" image="https://cellar-c2.services.clever-cloud.com/documentation/doc-screenshot.png" imageStyle="object-fit:cover; aspect-ratio:16/9;" >}}
+{{< /cards >}}
\ No newline at end of file
diff --git a/hugo.yaml b/hugo.yaml
index 7fce917..d7f3efc 100644
--- a/hugo.yaml
+++ b/hugo.yaml
@@ -1,5 +1,5 @@
# Configuration
-baseURL: "https://github.com/trajectory-invariants/trajectory-invariants.github.io"
+baseURL: ""
title: "Trajectory Invariants"
enableRobotsTXT: true
@@ -7,7 +7,9 @@ enableGitInfo: true
# enableEmoji: false
hasCJKLanguage: false
-# googleAnalytics: G-XXXXXXXXXX
+# services:
+# googleAnalytics:
+# ID: G-MEASUREMENT_ID
outputs:
home: [HTML]
@@ -19,10 +21,11 @@ languages:
en:
languageName: English
weight: 1
- title: invariant trajectory descriptors
+ title: Trajectory Invariants
theme: hextra
+
markup:
goldmark:
renderer:
@@ -76,7 +79,7 @@ menu:
weight: 3
params:
- description: Software to support calculation of invariant trajectory descriptors and trajectory generation.
+ description: Python and Matlab software to support the calculation of invariant trajectory descriptors and trajectory generation.
navbar:
displayTitle: true
@@ -99,6 +102,7 @@ params:
displayToggle: true
footer:
+ enable: true
displayCopyright: true
displayPoweredBy: false
width: normal
@@ -118,7 +122,11 @@ params:
editURL:
enable: true
- base: "https://gitlab.kuleuven.be/robotgenskill/public_code/invariants_website/-/tree/master/content"
+ base: "https://github.com/trajectory-invariants/trajectory-invariants.github.io/tree/master/content"
+
+ blog:
+ list:
+ displayTags: true
comments:
enable: false
diff --git a/i18n/en.yaml b/i18n/en.yaml
index 20e2c81..411d766 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -1,9 +1,14 @@
backToTop: "Scroll to top"
changeLanguage: "Change language"
changeTheme: "Change theme"
-copyright: "Copyright © 2015-2023 Authors of the invariant trajectory descriptors software."
-editThisPage: "Edit this page →"
+copyCode: "Copy code"
+copyright: "© 2015-2024 Trajectory Invariants software."
+dark: "Dark"
+editThisPage: "Edit this page on GitHub →"
lastUpdated: "Last updated on"
+light: "Light"
+noResultsFound: "No results found."
onThisPage: "On this page"
+poweredBy: "Powered by Hextra"
readMore: "Read more →"
searchPlaceholder: "Search..."
diff --git a/linux_test_local_maxim.sh b/linux_test_local.sh
similarity index 100%
rename from linux_test_local_maxim.sh
rename to linux_test_local.sh
diff --git a/themes/.gitkeep b/themes/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/themes/hextra/assets/css/compiled/main.css b/themes/hextra/assets/css/compiled/main.css
index 3d9ca66..0ff5e86 100644
--- a/themes/hextra/assets/css/compiled/main.css
+++ b/themes/hextra/assets/css/compiled/main.css
@@ -499,6 +499,9 @@ video {
.pointer-events-none {
pointer-events: none;
}
+.fixed {
+ position: fixed;
+}
.absolute {
position: absolute;
}
@@ -508,6 +511,9 @@ video {
.sticky {
position: sticky;
}
+.inset-0 {
+ inset: 0px;
+}
.inset-x-0 {
left: 0px;
right: 0px;
@@ -543,6 +549,9 @@ video {
.top-full {
top: 100%;
}
+.z-10 {
+ z-index: 10;
+}
.z-20 {
z-index: 20;
}
@@ -625,6 +634,9 @@ video {
.ml-4 {
margin-left: 1rem;
}
+.mr-1 {
+ margin-right: 0.25rem;
+}
.mr-2 {
margin-right: 0.5rem;
}
@@ -839,6 +851,9 @@ video {
.flex-col {
flex-direction: column;
}
+.flex-wrap {
+ flex-wrap: wrap;
+}
.items-start {
align-items: flex-start;
}
@@ -869,6 +884,17 @@ video {
.gap-4 {
gap: 1rem;
}
+.gap-x-1 {
+ -moz-column-gap: 0.25rem;
+ column-gap: 0.25rem;
+}
+.gap-x-1\.5 {
+ -moz-column-gap: 0.375rem;
+ column-gap: 0.375rem;
+}
+.gap-y-2 {
+ row-gap: 0.5rem;
+}
.overflow-auto {
overflow: auto;
}
@@ -966,6 +992,9 @@ video {
--tw-border-opacity: 1;
border-color: rgb(254 249 195 / var(--tw-border-opacity));
}
+.bg-black\/80 {
+ background-color: rgb(0 0 0 / 0.8);
+}
.bg-black\/\[\.05\] {
background-color: rgb(0 0 0 / .05);
}
@@ -1136,9 +1165,6 @@ video {
.pr-\[max\(env\(safe-area-inset-right\)\2c 1\.5rem\)\] {
padding-right: max(env(safe-area-inset-right),1.5rem);
}
-.pt-1 {
- padding-top: 0.25rem;
-}
.pt-4 {
padding-top: 1rem;
}
@@ -1157,6 +1183,9 @@ video {
.align-text-bottom {
vertical-align: text-bottom;
}
+.align-\[-2\.5px\] {
+ vertical-align: -2.5px;
+}
.font-mono {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
@@ -1386,9 +1415,6 @@ video {
.ease-in {
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
-.ease-in-out {
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
-}
.\[-webkit-tap-highlight-color\:transparent\] {
-webkit-tap-highlight-color: transparent;
}
@@ -1402,13 +1428,13 @@ video {
-webkit-hyphens: auto;
hyphens: auto;
}
-.\[text-underline-position\:from-font\] {
- text-underline-position: from-font;
+.\[transition\:background-color_1\.5s_ease\] {
+ transition: background-color 1.5s ease;
}
.\[word-break\:break-word\] {
word-break: break-word;
}
-.content h1 {
+.content :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 0.5rem;
font-size: 2.25rem;
font-weight: 700;
@@ -1416,11 +1442,11 @@ video {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
}
-:is(html[class~="dark"] .content h1) {
+:is(html[class~="dark"] .content :where(h1):not(:where([class~=not-prose],[class~=not-prose] *))) {
--tw-text-opacity: 1;
color: rgb(241 245 249 / var(--tw-text-opacity));
}
-.content h2 {
+.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 2.5rem;
border-bottom-width: 1px;
border-color: rgb(229 229 229 / 0.7);
@@ -1433,24 +1459,24 @@ video {
}
@media (prefers-contrast: more) {
- .content h2 {
+ .content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)) {
--tw-border-opacity: 1;
border-color: rgb(163 163 163 / var(--tw-border-opacity));
}
}
-:is(html[class~="dark"] .content h2) {
+:is(html[class~="dark"] .content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *))) {
border-color: hsl(var(--primary-hue) var(--primary-saturation) 94% / 0.1);
--tw-text-opacity: 1;
color: rgb(241 245 249 / var(--tw-text-opacity));
}
@media (prefers-contrast: more) {
- :is(html[class~="dark"] .content h2) {
+ :is(html[class~="dark"] .content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *))) {
--tw-border-opacity: 1;
border-color: rgb(163 163 163 / var(--tw-border-opacity));
}
}
-.content h3 {
+.content :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 2rem;
font-size: 1.5rem;
font-weight: 600;
@@ -1458,11 +1484,11 @@ video {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
}
-:is(html[class~="dark"] .content h3) {
+:is(html[class~="dark"] .content :where(h3):not(:where([class~=not-prose],[class~=not-prose] *))) {
--tw-text-opacity: 1;
color: rgb(241 245 249 / var(--tw-text-opacity));
}
-.content h4 {
+.content :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 2rem;
font-size: 1.25rem;
font-weight: 600;
@@ -1470,11 +1496,11 @@ video {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
}
-:is(html[class~="dark"] .content h4) {
+:is(html[class~="dark"] .content :where(h4):not(:where([class~=not-prose],[class~=not-prose] *))) {
--tw-text-opacity: 1;
color: rgb(241 245 249 / var(--tw-text-opacity));
}
-.content h5 {
+.content :where(h5):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 2rem;
font-size: 1.125rem;
font-weight: 600;
@@ -1482,11 +1508,11 @@ video {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
}
-:is(html[class~="dark"] .content h5) {
+:is(html[class~="dark"] .content :where(h5):not(:where([class~=not-prose],[class~=not-prose] *))) {
--tw-text-opacity: 1;
color: rgb(241 245 249 / var(--tw-text-opacity));
}
-.content h6 {
+.content :where(h6):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 2rem;
font-size: 1rem;
font-weight: 600;
@@ -1494,33 +1520,25 @@ video {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
}
-:is(html[class~="dark"] .content h6) {
+:is(html[class~="dark"] .content :where(h6):not(:where([class~=not-prose],[class~=not-prose] *))) {
--tw-text-opacity: 1;
color: rgb(241 245 249 / var(--tw-text-opacity));
}
-.content p {
+.content :where(p):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 1.5rem;
line-height: 1.75rem;
}
-.content p:first-child {
+.content :where(p):not(:where([class~=not-prose],[class~=not-prose] *)):first-child {
margin-top: 0px;
}
-.content .not-prose p {
- margin-top: 0px;
- line-height: 1.5;
-}
-.content a {
+.content :where(a):not(:where([class~=not-prose],[class~=not-prose] *)) {
--tw-text-opacity: 1;
color: hsl(var(--primary-hue) var(--primary-saturation) 45% / var(--tw-text-opacity));
text-decoration-line: underline;
text-decoration-thickness: from-font;
text-underline-position: from-font;
}
-.content .not-prose a {
- color: currentColor;
- text-decoration-line: none;
-}
-.content blockquote {
+.content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 1.5rem;
--tw-border-opacity: 1;
border-color: rgb(209 213 219 / var(--tw-border-opacity));
@@ -1528,24 +1546,24 @@ video {
--tw-text-opacity: 1;
color: rgb(55 65 81 / var(--tw-text-opacity));
}
-.content blockquote:first-child {
+.content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)):first-child {
margin-top: 0px;
}
-:is([dir="ltr"] .content blockquote) {
+:is([dir="ltr"] .content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *))) {
border-left-width: 2px;
padding-left: 1.5rem;
}
-:is([dir="rtl"] .content blockquote) {
+:is([dir="rtl"] .content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *))) {
border-right-width: 2px;
padding-right: 1.5rem;
}
-:is(html[class~="dark"] .content blockquote) {
+:is(html[class~="dark"] .content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *))) {
--tw-border-opacity: 1;
border-color: rgb(55 65 81 / var(--tw-border-opacity));
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity));
}
-.content pre:not(.code-block pre) {
+.content :where(pre):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *)) {
margin-bottom: 1rem;
overflow-x: auto;
border-radius: 0.75rem;
@@ -1559,23 +1577,23 @@ video {
}
@media (prefers-contrast: more) {
- .content pre:not(.code-block pre) {
+ .content :where(pre):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *)) {
border-width: 1px;
border-color: hsl(var(--primary-hue) var(--primary-saturation) 24% / 0.2);
--tw-contrast: contrast(1.5);
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
}
-:is(html[class~="dark"] .content pre:not(.code-block pre)) {
+:is(html[class~="dark"] .content :where(pre):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *))) {
background-color: hsl(var(--primary-hue) var(--primary-saturation) 77% / 0.1);
}
@media (prefers-contrast: more) {
- :is(html[class~="dark"] .content pre:not(.code-block pre)) {
+ :is(html[class~="dark"] .content :where(pre):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *))) {
border-color: hsl(var(--primary-hue) var(--primary-saturation) 94% / 0.4);
}
}
-.content code:not(.code-block code) {
+.content :where(code):not(:where(.code-block code, [class~=not-prose],[class~=not-prose] *)) {
overflow-wrap: break-word;
border-radius: 0.375rem;
border-width: 1px;
@@ -1589,38 +1607,38 @@ video {
padding-right: .25em;
font-size: .9em;
}
-:is(html[class~="dark"] .content code:not(.code-block code)) {
+:is(html[class~="dark"] .content :where(code):not(:where(.code-block code, [class~=not-prose],[class~=not-prose] *))) {
border-color: rgb(255 255 255 / 0.1);
background-color: rgb(255 255 255 / 0.1);
}
-.content table:not(.code-block table) {
+.content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) {
margin-top: 1.5rem;
display: block;
overflow-x: auto;
padding: 0px;
}
-.content table:not(.code-block table):first-child {
+.content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)):first-child {
margin-top: 0px;
}
-.content table:not(.code-block table) tr {
+.content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) tr {
margin: 0px;
border-top-width: 1px;
--tw-border-opacity: 1;
border-color: rgb(209 213 219 / var(--tw-border-opacity));
padding: 0px;
}
-.content table:not(.code-block table) tr:nth-child(even) {
+.content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) tr:nth-child(even) {
--tw-bg-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
}
-:is(html[class~="dark"] .content table:not(.code-block table) tr) {
+:is(html[class~="dark"] .content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) tr) {
--tw-border-opacity: 1;
border-color: rgb(75 85 99 / var(--tw-border-opacity));
}
-:is(html[class~="dark"] .content table:not(.code-block table) tr):nth-child(even) {
+:is(html[class~="dark"] .content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) tr):nth-child(even) {
background-color: rgb(75 85 99 / 0.2);
}
-.content table:not(.code-block table) th {
+.content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) th {
margin: 0px;
border-width: 1px;
--tw-border-opacity: 1;
@@ -1631,11 +1649,11 @@ video {
padding-bottom: 0.5rem;
font-weight: 600;
}
-:is(html[class~="dark"] .content table:not(.code-block table) th) {
+:is(html[class~="dark"] .content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) th) {
--tw-border-opacity: 1;
border-color: rgb(75 85 99 / var(--tw-border-opacity));
}
-.content table:not(.code-block table) td {
+.content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) td {
margin: 0px;
border-width: 1px;
--tw-border-opacity: 1;
@@ -1645,52 +1663,51 @@ video {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
-:is(html[class~="dark"] .content table:not(.code-block table) td) {
+:is(html[class~="dark"] .content :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) td) {
--tw-border-opacity: 1;
border-color: rgb(75 85 99 / var(--tw-border-opacity));
}
-.content ol {
+.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 1.5rem;
list-style-type: decimal;
}
-.content ol:first-child {
+.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)):first-child {
margin-top: 0px;
}
-:is([dir="ltr"] .content ol) {
+:is([dir="ltr"] .content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *))) {
margin-left: 1.5rem;
}
-:is([dir="rtl"] .content ol) {
+:is([dir="rtl"] .content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *))) {
margin-right: 1.5rem;
}
-.content ol li {
+.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)) li {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
-.content ul {
+.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 1.5rem;
list-style-type: disc;
}
-.content ul:first-child {
+.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)):first-child {
margin-top: 0px;
}
-:is([dir="ltr"] .content ul) {
+:is([dir="ltr"] .content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *))) {
margin-left: 1.5rem;
}
-:is([dir="rtl"] .content ul) {
+:is([dir="rtl"] .content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *))) {
margin-right: 1.5rem;
}
-.content ul li {
+.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)) li {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
-.content .not-prose ul, .content .not-prose ol {
- margin: 0px;
- list-style-type: none;
-}
-.content .not-prose ul li, .content .not-prose ol li {
- margin: 0px;
+/* This CSS rule targets the first nested unordered (ul) or ordered (ol) list
+ inside the list item (li) of any parent ul or ol.
+ The rule sets the top margin of the selected list to zero. */
+.content :where(ul, ol) > li > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
+ margin-top: 0px;
}
-.content kbd {
+.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
overflow-wrap: break-word;
border-radius: 0.375rem;
border-width: 1px;
@@ -1704,29 +1721,25 @@ video {
padding-right: .25em;
font-size: .9em;
}
-:is(html[class~="dark"] .content kbd) {
+:is(html[class~="dark"] .content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *))) {
border-color: rgb(255 255 255 / 0.1);
background-color: rgb(255 255 255 / 0.1);
}
-.content pre:not(.code-block pre).mermaid {
+.content :where(pre.mermaid):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *)) {
border-radius: 0px;
background-color: transparent;
}
-:is(html[class~="dark"] .content pre:not(.code-block pre).mermaid) {
+:is(html[class~="dark"] .content :where(pre.mermaid):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *))) {
background-color: transparent;
}
-.content img {
+.content :where(img):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-left: auto;
margin-right: auto;
margin-top: 1rem;
margin-bottom: 1rem;
border-radius: 0.375rem;
}
-.content .not-prose img {
- margin: 0px;
- border-radius: 0px;
-}
-.content figure figcaption {
+.content :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)) figcaption {
margin-top: 0.5rem;
display: block;
text-align: center;
@@ -1734,7 +1747,7 @@ video {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
}
-:is(html[class~="dark"] .content figure figcaption) {
+:is(html[class~="dark"] .content :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)) figcaption) {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity));
}
@@ -1783,50 +1796,6 @@ span:target + .subheading-anchor:after {
--tw-text-opacity: 1;
color: rgb(115 115 115 / var(--tw-text-opacity));
}
-article.typesetting-article {
- font-size: 17px;
- font-feature-settings:
- 'rlig' 1,
- 'calt' 1;
-}
-article.typesetting-article h1 {
- margin-top: 1.5rem;
- margin-bottom: 1rem;
- text-align: center;
- font-size: 2.5rem;
-}
-article.typesetting-article h2 {
- border-style: none;
-}
-article.typesetting-article a {
- text-decoration-line: none;
-}
-article.typesetting-article a:hover {
- text-decoration-line: underline;
-}
-article.typesetting-article p {
- line-height: 2rem;
-}
-article.typesetting-article code {
- border-style: none;
-}
-:is(html[class~="dark"] article.typesetting-article code) {
- --tw-bg-opacity: 1;
- background-color: rgb(64 64 64 / var(--tw-bg-opacity));
-}
-:is(html[class~="dark"] article.typesetting-article pre code) {
- background-color: transparent;
-}
-article.typesetting-article .subheading-anchor + a {
- text-decoration-line: none;
-}
-article.typesetting-article .subheading-anchor + a::after {
- content: var(--tw-content);
- display: none;
-}
-article.typesetting-article .subheading-anchor + a:hover {
- text-decoration-line: none;
-}
article details > summary::-webkit-details-marker {
display: none;
}
@@ -1835,6 +1804,7 @@ article details > summary::before {
height: 1.2em;
width: 1.2em;
vertical-align: -4px;
+ padding: 0 0.6em;
}
/* Code syntax highlight */
/* Light theme for syntax highlight */
@@ -2241,7 +2211,7 @@ article details > summary::before {
}
.chroma .ln,
.chroma .lnt:not(.hl > .lnt),
- .chroma .hl {
+ .chroma .hl:not(.line) {
min-width: 2.6rem;
padding-left: 1rem;
padding-right: 1rem;
@@ -2250,7 +2220,7 @@ article details > summary::before {
}
:is(html[class~="dark"] .chroma .ln),:is(html[class~="dark"]
.chroma .lnt:not(.hl > .lnt)),:is(html[class~="dark"]
- .chroma .hl) {
+ .chroma .hl:not(.line)) {
--tw-text-opacity: 1;
color: rgb(212 212 212 / var(--tw-text-opacity));
}
@@ -2480,6 +2450,7 @@ article details > summary::before {
}
.sidebar-container li.open > div {
height: auto;
+ padding-top: 0.25rem;
}
.sidebar-container li.open > a > span > svg > path {
--tw-rotate: 90deg;
@@ -2569,6 +2540,19 @@ nav .search-wrapper {
--tw-shadow-color: rgb(115 115 115 / 0.4);
--tw-shadow: var(--tw-shadow-colored);
}
+@supports (
+ ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px)))
+) {
+ .code-copy-btn {
+ --tw-bg-opacity: .85;
+ --tw-backdrop-blur: blur(12px);
+ -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
+ backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
+ }
+ :is(html[class~="dark"] .code-copy-btn) {
+ --tw-bg-opacity: 0.8;
+ }
+}
html {
font-size: 1rem;
-webkit-font-smoothing: antialiased;
@@ -2775,6 +2759,9 @@ body {
--tw-rotate: 90deg;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
+.group:hover .group-hover\:underline {
+ text-decoration-line: underline;
+}
.group\/code:hover .group-hover\/code\:opacity-100 {
opacity: 1;
}
@@ -3045,6 +3032,9 @@ body {
:is(html[class~="dark"] .dark\:border-yellow-200\/30) {
border-color: rgb(254 240 138 / 0.3);
}
+:is(html[class~="dark"] .dark\:bg-black\/60) {
+ background-color: rgb(0 0 0 / 0.6);
+}
:is(html[class~="dark"] .dark\:bg-blue-900\/30) {
background-color: rgb(30 58 138 / 0.3);
}
diff --git a/themes/hextra/assets/css/components/code-copy.css b/themes/hextra/assets/css/components/code-copy.css
new file mode 100644
index 0000000..4547fea
--- /dev/null
+++ b/themes/hextra/assets/css/components/code-copy.css
@@ -0,0 +1,7 @@
+@supports (
+ (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
+) {
+ .code-copy-btn {
+ @apply backdrop-blur-md bg-opacity-[.85] dark:bg-opacity-80;
+ }
+}
diff --git a/themes/hextra/assets/css/components/sidebar.css b/themes/hextra/assets/css/components/sidebar.css
index af5da35..0ccbfb9 100644
--- a/themes/hextra/assets/css/components/sidebar.css
+++ b/themes/hextra/assets/css/components/sidebar.css
@@ -13,7 +13,7 @@
@apply h-0;
}
li.open > div {
- @apply h-auto;
+ @apply h-auto pt-1;
}
li.open > a > span > svg > path {
@apply rotate-90;
diff --git a/themes/hextra/assets/css/highlight.css b/themes/hextra/assets/css/highlight.css
index b8e373a..2e7f387 100644
--- a/themes/hextra/assets/css/highlight.css
+++ b/themes/hextra/assets/css/highlight.css
@@ -32,7 +32,7 @@
}
.ln,
.lnt:not(.hl > .lnt),
- .hl {
+ .hl:not(.line) {
@apply pl-4 pr-4 min-w-[2.6rem] text-neutral-600 dark:text-neutral-300;
}
.lntd {
diff --git a/themes/hextra/assets/css/styles.css b/themes/hextra/assets/css/styles.css
index 3894080..481a2ac 100644
--- a/themes/hextra/assets/css/styles.css
+++ b/themes/hextra/assets/css/styles.css
@@ -8,6 +8,7 @@
@import "components/sidebar.css";
@import "components/navbar.css";
@import "components/scrollbar.css";
+@import "components/code-copy.css";
html {
@apply text-base antialiased;
diff --git a/themes/hextra/assets/css/typography.css b/themes/hextra/assets/css/typography.css
index b302c80..bfd96ad 100644
--- a/themes/hextra/assets/css/typography.css
+++ b/themes/hextra/assets/css/typography.css
@@ -1,44 +1,38 @@
.content {
- h1 {
+ :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply mt-2 text-4xl font-bold tracking-tight text-slate-900 dark:text-slate-100;
}
- h2 {
+ :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply font-semibold tracking-tight text-slate-900 dark:text-slate-100 mt-10 border-b pb-1 text-3xl border-neutral-200/70 contrast-more:border-neutral-400 dark:border-primary-100/10 contrast-more:dark:border-neutral-400;
}
- h3 {
+ :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply font-semibold tracking-tight text-slate-900 dark:text-slate-100 mt-8 text-2xl;
}
- h4 {
+ :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply font-semibold tracking-tight text-slate-900 dark:text-slate-100 mt-8 text-xl;
}
- h5 {
+ :where(h5):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply font-semibold tracking-tight text-slate-900 dark:text-slate-100 mt-8 text-lg;
}
- h6 {
+ :where(h6):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply font-semibold tracking-tight text-slate-900 dark:text-slate-100 mt-8 text-base;
}
- p {
+ :where(p):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply mt-6 leading-7 first:mt-0;
}
- .not-prose p {
- @apply mt-0 leading-normal;
- }
- a {
+ :where(a):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply text-primary-600 underline decoration-from-font [text-underline-position:from-font];
}
- .not-prose a {
- @apply text-current no-underline;
- }
- blockquote {
+ :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply mt-6 border-gray-300 italic text-gray-700 dark:border-gray-700 dark:text-gray-400 first:mt-0 ltr:border-l-2 ltr:pl-6 rtl:border-r-2 rtl:pr-6;
}
- pre:not(.code-block pre) {
+ :where(pre):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *)) {
@apply bg-primary-700/5 mb-4 overflow-x-auto rounded-xl font-medium subpixel-antialiased dark:bg-primary-300/10 text-[.9em] contrast-more:border contrast-more:border-primary-900/20 contrast-more:contrast-150 contrast-more:dark:border-primary-100/40 py-4;
}
- code:not(.code-block code) {
+ :where(code):not(:where(.code-block code, [class~=not-prose],[class~=not-prose] *)) {
@apply border-black border-opacity-[0.04] bg-opacity-[0.03] bg-black break-words rounded-md border py-0.5 px-[.25em] text-[.9em] dark:border-white/10 dark:bg-white/10;
}
- table:not(.code-block table) {
+ :where(table):not(:where(.code-block table, [class~=not-prose],[class~=not-prose] *)) {
@apply block overflow-x-auto mt-6 p-0 first:mt-0;
tr {
@@ -51,37 +45,34 @@
@apply m-0 border border-gray-300 px-4 py-2 dark:border-gray-600;
}
}
- ol {
+ :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply mt-6 list-decimal first:mt-0 ltr:ml-6 rtl:mr-6;
li {
@apply my-2;
}
}
- ul {
+ :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply mt-6 list-disc first:mt-0 ltr:ml-6 rtl:mr-6;
li {
@apply my-2;
}
}
- .not-prose ul, .not-prose ol {
- @apply m-0 list-none;
- li {
- @apply m-0;
- }
+ /* This CSS rule targets the first nested unordered (ul) or ordered (ol) list
+ inside the list item (li) of any parent ul or ol.
+ The rule sets the top margin of the selected list to zero. */
+ :where(ul, ol) > li > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
+ @apply mt-0;
}
- kbd {
+ :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply border-black border-opacity-[0.04] bg-opacity-[0.03] bg-black break-words rounded-md border py-0.5 px-[.25em] text-[.9em] dark:border-white/10 dark:bg-white/10;
}
- pre:not(.code-block pre).mermaid {
+ :where(pre.mermaid):not(:where(.code-block pre, [class~=not-prose],[class~=not-prose] *)) {
@apply bg-transparent rounded-none dark:bg-transparent;
}
- img {
+ :where(img):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply mx-auto my-4 rounded-md;
}
- .not-prose img {
- @apply m-0 rounded-none;
- }
- figure {
+ :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)) {
figcaption {
@apply text-sm text-gray-500 dark:text-gray-400 mt-2 block text-center;
}
@@ -115,35 +106,6 @@
}
}
-article.typesetting-article {
- font-size: 17px;
- font-feature-settings:
- 'rlig' 1,
- 'calt' 1;
- h1 {
- @apply mt-6 mb-4 text-center;
- font-size: 2.5rem;
- }
- h2 {
- @apply border-none;
- }
- a {
- @apply no-underline hover:underline;
- }
- p {
- @apply leading-8;
- }
- code {
- @apply border-none dark:bg-neutral-700;
- }
- pre code {
- @apply dark:bg-transparent;
- }
- .subheading-anchor + a {
- @apply no-underline hover:no-underline after:hidden;
- }
-}
-
article details > summary {
&::-webkit-details-marker {
@apply hidden;
@@ -153,5 +115,6 @@ article details > summary {
height: 1.2em;
width: 1.2em;
vertical-align: -4px;
+ padding: 0 0.6em;
}
}
diff --git a/themes/hextra/assets/js/code-copy.js b/themes/hextra/assets/js/code-copy.js
index 45df96a..c513678 100644
--- a/themes/hextra/assets/js/code-copy.js
+++ b/themes/hextra/assets/js/code-copy.js
@@ -33,8 +33,8 @@ document.addEventListener('DOMContentLoaded', function () {
// Add click event listener for copy button
button.addEventListener('click', function (e) {
e.preventDefault();
- const targetId = button.getAttribute('data-clipboard-target');
- const target = document.querySelector(targetId);
+ // Get the code target
+ const target = button.parentElement.previousElementSibling;
let codeElement;
if (target.tagName === 'CODE') {
codeElement = target;
@@ -44,14 +44,17 @@ document.addEventListener('DOMContentLoaded', function () {
codeElement = codeElements[codeElements.length - 1];
}
if (codeElement) {
+ let code = codeElement.innerText;
// Replace double newlines with single newlines in the innerText
// as each line inside
has trailing newline '\n'
- const code = codeElement.innerText.replace(/\n\n/g, '\n');
+ if ("lang" in codeElement.dataset) {
+ code = code.replace(/\n\n/g, '\n');
+ }
navigator.clipboard.writeText(code).then(function () {
button.classList.add('copied');
setTimeout(function () {
button.classList.remove('copied');
- }, 500);
+ }, 1000);
}).catch(function (err) {
console.error('Failed to copy text: ', err);
});
diff --git a/themes/hextra/assets/js/menu.js b/themes/hextra/assets/js/menu.js
index 1f2eeb1..95c85ad 100644
--- a/themes/hextra/assets/js/menu.js
+++ b/themes/hextra/assets/js/menu.js
@@ -1,19 +1,49 @@
// Hamburger menu for mobile navigation
-const menu = document.querySelector('.hamburger-menu');
-
-menu.addEventListener('click', (e) => {
- e.preventDefault();
+document.addEventListener('DOMContentLoaded', function () {
+ const menu = document.querySelector('.hamburger-menu');
+ const overlay = document.querySelector('.mobile-menu-overlay');
const sidebarContainer = document.querySelector('.sidebar-container');
- // Toggle the hamburger menu
- menu.querySelector('svg').classList.toggle('open');
+ // Initialize the overlay
+ const overlayClasses = ['fixed', 'inset-0', 'z-10', 'bg-black/80', 'dark:bg-black/60'];
+ overlay.classList.add('bg-transparent');
+ overlay.classList.remove("hidden", ...overlayClasses);
+
+ function toggleMenu() {
+ // Toggle the hamburger menu
+ menu.querySelector('svg').classList.toggle('open');
+
+ // When the menu is open, we want to show the navigation sidebar
+ sidebarContainer.classList.toggle('max-md:[transform:translate3d(0,-100%,0)]');
+ sidebarContainer.classList.toggle('max-md:[transform:translate3d(0,0,0)]');
+
+ // When the menu is open, we want to prevent the body from scrolling
+ document.body.classList.toggle('overflow-hidden');
+ document.body.classList.toggle('md:overflow-auto');
+ }
+
+ menu.addEventListener('click', (e) => {
+ e.preventDefault();
+ toggleMenu();
+
+ if (overlay.classList.contains('bg-transparent')) {
+ // Show the overlay
+ overlay.classList.add(...overlayClasses);
+ overlay.classList.remove('bg-transparent');
+ } else {
+ // Hide the overlay
+ overlay.classList.remove(...overlayClasses);
+ overlay.classList.add('bg-transparent');
+ }
+ });
- // When the menu is open, we want to show the navigation sidebar
- sidebarContainer.classList.toggle('max-md:[transform:translate3d(0,-100%,0)]');
- sidebarContainer.classList.toggle('max-md:[transform:translate3d(0,0,0)]');
+ overlay.addEventListener('click', (e) => {
+ e.preventDefault();
+ toggleMenu();
- // When the menu is open, we want to prevent the body from scrolling
- document.body.classList.toggle('overflow-hidden');
- document.body.classList.toggle('md:overflow-auto');
+ // Hide the overlay
+ overlay.classList.remove(...overlayClasses);
+ overlay.classList.add('bg-transparent');
+ });
});
diff --git a/themes/hextra/data/icons.yaml b/themes/hextra/data/icons.yaml
index 9b0aa64..9cb302d 100644
--- a/themes/hextra/data/icons.yaml
+++ b/themes/hextra/data/icons.yaml
@@ -9,6 +9,16 @@ github: >
+codeberg: >
+
+
+
+
+gitlab: >
+
+
+
+
hextra:
hugo:
@@ -270,3 +280,4 @@ twitter:
youtube:
x-twitter:
+linkedin:
diff --git a/themes/hextra/layouts/_default/_markup/render-codeblock.html b/themes/hextra/layouts/_default/_markup/render-codeblock.html
index b67ca6c..1e23bd9 100644
--- a/themes/hextra/layouts/_default/_markup/render-codeblock.html
+++ b/themes/hextra/layouts/_default/_markup/render-codeblock.html
@@ -1,6 +1,7 @@
{{- $class := .Attributes.class | default "" -}}
{{- $filename := .Attributes.filename | default "" -}}
{{- $lang := .Attributes.lang | default .Type -}}
+{{- $copyCode := (T "copyCode") | default "Copy code" -}}
@@ -8,17 +9,14 @@
{{ $filename }}
{{- end -}}
{{- if transform.CanHighlight $lang -}}
-
- {{- highlight .Inner $lang .Options -}}
-
+
{{- highlight .Inner $lang .Options -}}
{{- else -}}
-
{{ .Inner }}
+
{{ .Inner }}
{{- end -}}
diff --git a/themes/hextra/layouts/_default/_markup/render-image.html b/themes/hextra/layouts/_default/_markup/render-image.html
index 21a1e19..16a91f9 100644
--- a/themes/hextra/layouts/_default/_markup/render-image.html
+++ b/themes/hextra/layouts/_default/_markup/render-image.html
@@ -1,13 +1,13 @@
{{- $alt := .PlainText | safeHTML -}}
-{{- $lazyLoading := .Page.Site.Params.enableImagelazyLoading | default true -}}
+{{- $lazyLoading := .Page.Site.Params.enableImageLazyLoading | default true -}}
{{- $dest := .Destination -}}
-{{- $isRemote := not (urls.Parse $dest).Scheme -}}
+{{- $isLocal := not (urls.Parse $dest).Scheme -}}
{{- $isPage := and (eq .Page.Kind "page") (not .Page.BundleType) -}}
{{- $startsWithSlash := hasPrefix $dest "/" -}}
{{- $startsWithRelative := hasPrefix $dest "../" -}}
-{{- if and $dest $isRemote -}}
+{{- if and $dest $isLocal -}}
{{- if $startsWithSlash -}}
{{/* Images under static directory */}}
{{- $dest = (relURL (strings.TrimPrefix "/" $dest)) -}}
diff --git a/themes/hextra/layouts/blog/list.html b/themes/hextra/layouts/blog/list.html
index a8026e5..b22de2e 100644
--- a/themes/hextra/layouts/blog/list.html
+++ b/themes/hextra/layouts/blog/list.html
@@ -1,6 +1,6 @@
{{ define "main" }}
-{{- $readMore := (T "readMore") | default "Read more →" -}}
-
+ {{- $readMore := (T "readMore") | default "Read more →" -}}
+
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }}
@@ -10,11 +10,20 @@
- {{- partial "utils/page-description" . }}
- {{ $readMore }}
+ {{- if site.Params.blog.list.displayTags -}}
+ {{ with .Params.tags }}
+
+ {{- range . }}#{{ . }} {{ end -}}
+
+ {{ end -}}
+ {{- end -}}
+ {{- partial "utils/page-description" . -}}
+
+
+ {{- $readMore -}}
+
- {{ partial "utils/format-date" .Date }}
+ {{ partial "utils/format-date" .Date }}
{{ end }}
diff --git a/themes/hextra/layouts/blog/single.html b/themes/hextra/layouts/blog/single.html
index 5d8df16..db83123 100644
--- a/themes/hextra/layouts/blog/single.html
+++ b/themes/hextra/layouts/blog/single.html
@@ -1,27 +1,40 @@
{{ define "main" }}
-
+
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }}
{{ partial "toc.html" . }}
{{ partial "breadcrumb.html" . }}
{{ .Title }}
- {{ with $date := .Date }}
-
- {{ partial "utils/format-date" $date }}
- {{- if $.Params.authors }} by {{ end -}}
- {{- with $.Params.authors -}}
- {{- range $i, $author := . -}}
- {{- if $i }},{{ end -}}
- {{- if $author.link -}}
-
{{ $author.name }}
- {{- else -}}
-
{{ $author.name }}
- {{- end -}}
+
+ {{- with $date := .Date }}
{{ partial "utils/format-date" $date }} {{ end -}}
+ {{- $lazyLoading := site.Params.enableImageLazyLoading | default true -}}
+ {{ if and .Date .Params.authors }}
· {{ end -}}
+ {{- with $.Params.authors -}}
+ {{- range $i, $author := . -}}
+ {{- if reflect.IsMap $author -}}
+ {{- if and $i (not $author.image) }}
, {{ end -}}
+
+ {{- with $image := $author.image }}
+ {{- $isLocal := not (urls.Parse $image).Scheme -}}
+ {{- $startsWithSlash := hasPrefix $image "/" -}}
+ {{- if and $isLocal $startsWithSlash }}
+ {{- $image = (relURL (strings.TrimPrefix "/" $image)) -}}
+ {{ end -}}
+
+ {{ end -}}
+ {{ $author.name }}
+
+ {{- else -}}
+ {{- if $i }}
, {{ end -}}
{{ $author }}
{{- end -}}
{{- end -}}
-
- {{ end }}
+ {{- end -}}
+
{{ .Content }}
diff --git a/themes/hextra/layouts/partials/footer.html b/themes/hextra/layouts/partials/footer.html
index 64a387a..9e8a742 100644
--- a/themes/hextra/layouts/partials/footer.html
+++ b/themes/hextra/layouts/partials/footer.html
@@ -2,6 +2,7 @@
{{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}}
{{- $copyright := (T "copyright") | default "© 2023 Hextra." -}}
+{{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}}
{{- $footerWidth := "max-w-screen-xl" -}}
{{- with .Site.Params.footer.width -}}
@@ -27,7 +28,7 @@
class="{{ $footerWidth }} mx-auto flex justify-center py-12 pl-[max(env(safe-area-inset-left),1.5rem)] pr-[max(env(safe-area-inset-right),1.5rem)] text-gray-600 dark:text-gray-400 md:justify-start"
>
- {{- if (.Site.Params.footer.displayPoweredBy | default true) }}
{{ template "theme-credit" . }}
{{ end }}
+ {{- if (.Site.Params.footer.displayPoweredBy | default true) }}
{{ template "theme-credit" $poweredBy }}
{{ end }}
{{- if .Site.Params.footer.displayCopyright }}
{{ $copyright | markdownify }}
{{ end }}
@@ -35,9 +36,11 @@
{{- define "theme-credit" -}}
- Powered by Hextra
- {{- partial "utils/icon.html" (dict "name" "hextra" "attributes" "height=1em class=\"inline-block ml-1 align-text-bottom\"") -}}
+
+ {{- . | markdownify -}}
+ {{- if strings.Contains . "Hextra" -}}
+ {{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="inline-block ml-1 align-[-2.5px]"`) -}}
+ {{- end -}}
{{- end -}}
diff --git a/themes/hextra/layouts/partials/google-analytics.html b/themes/hextra/layouts/partials/google-analytics.html
index 3fd65aa..9219006 100644
--- a/themes/hextra/layouts/partials/google-analytics.html
+++ b/themes/hextra/layouts/partials/google-analytics.html
@@ -1,4 +1,10 @@
-{{ with .Site.GoogleAnalytics }}
+{{/* site.GoogleAnalytics is deprecated in Hugo v0.120.0 */}}
+{{/* it will be removed in a future version */}}
+{{- $gtagID := "" -}}
+{{- with site.GoogleAnalytics -}}{{ $gtagID = . }}{{- end -}}
+{{- with site.Config.Services.GoogleAnalytics.ID -}}{{ $gtagID = . }}{{- end -}}
+
+{{- with $gtagID }}
-{{ end }}
+{{ end -}}
diff --git a/themes/hextra/layouts/partials/head.html b/themes/hextra/layouts/partials/head.html
index 26f5fb1..c42e2de 100644
--- a/themes/hextra/layouts/partials/head.html
+++ b/themes/hextra/layouts/partials/head.html
@@ -16,6 +16,12 @@
{{ end -}}
+
+ {{ with .Params.canonical }}
+
+ {{ else }}
+
+ {{ end }}
{{ partial "opengraph.html" . }}
{{ template "_internal/schema.html" . -}}
@@ -25,7 +31,7 @@
- {{- if and .Site.GoogleAnalytics (eq hugo.Environment "production") }}
+ {{- if and (eq hugo.Environment "production") (or .Site.GoogleAnalytics .Site.Config.Services.GoogleAnalytics.ID) }}
{{ partial "google-analytics.html" . }}
{{- end }}
diff --git a/themes/hextra/layouts/partials/navbar.html b/themes/hextra/layouts/partials/navbar.html
index 0a49630..ccf781c 100644
--- a/themes/hextra/layouts/partials/navbar.html
+++ b/themes/hextra/layouts/partials/navbar.html
@@ -32,10 +32,18 @@
{{- if eq .Params.type "search" -}}
{{- partial "search.html" (dict "params" .Params) -}}
{{- else -}}
- {{- $external := strings.HasPrefix .URL "http" -}}
+ {{- $link := .URL -}}
+ {{- $external := strings.HasPrefix $link "http" -}}
+ {{- with .PageRef -}}
+ {{- if hasPrefix . "/" -}}
+ {{- $link = relLangURL (strings.TrimPrefix "/" .) -}}
+ {{- end -}}
+ {{- end -}}
+
{{/* Display icon menu item */}}
{{- if .Params.icon -}}
-
+ {{- $rel := cond (eq .Params.icon "mastodon") "noreferer me" "noreferer" }}
+
{{- partial "utils/icon.html" (dict "name" .Params.icon "attributes" "height=24") -}}
{{ or (T .Identifier) .Name | safeHTML }}
@@ -44,7 +52,7 @@
{{- $activeClass := cond $active "font-medium" "text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200" -}}
diff --git a/themes/hextra/layouts/partials/sidebar.html b/themes/hextra/layouts/partials/sidebar.html
index fd1343a..efc8526 100644
--- a/themes/hextra/layouts/partials/sidebar.html
+++ b/themes/hextra/layouts/partials/sidebar.html
@@ -6,10 +6,16 @@
{{- $sidebarClass := cond $disableSidebar (cond $displayPlaceholder "md:hidden xl:block" "md:hidden") "md:sticky" -}}
{{- $navRoot := cond (eq site.Home.Type "docs") site.Home $context.FirstSection -}}
-{{- $navPages := union $navRoot.RegularPages $navRoot.Sections -}}
{{- $pageURL := $context.RelPermalink -}}
+{{/* EXPERIMENTAL */}}
+{{- if .context.Params.sidebar.hide -}}
+ {{- $disableSidebar = true -}}
+ {{- $displayPlaceholder = true -}}
+{{- end -}}
+
+