Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/css/compiled/main.css

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions assets/css/components/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,44 @@ nav {
@supports (
(-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
.nav-container-blur {
.hextra-nav-container-blur {
@apply hx:backdrop-blur-md hx:bg-white/[.85] hx:dark:bg-dark/80!;
}
}

/* Hamburger Menu - Flattened Structure */
.hamburger-menu svg g {
.hextra-hamburger-menu svg g {
@apply hx:origin-center hx:transition-all hx:duration-100 hx:ease-out;
}

.hamburger-menu svg path {
.hextra-hamburger-menu svg path {
@apply hx:opacity-100 hx:transition-all hx:duration-100 hx:ease-out hx:delay-100;
}

.hamburger-menu svg.open path {
.hextra-hamburger-menu svg.open path {
@apply hx:transition-transform hx:duration-100 hx:ease-out hx:delay-0;
}

.hamburger-menu svg.open g {
.hextra-hamburger-menu svg.open g {
@apply hx:transition-transform hx:duration-100 hx:ease-out hx:delay-100;
}

.hamburger-menu svg.open > path {
.hextra-hamburger-menu svg.open > path {
@apply hx:opacity-0;
}

.hamburger-menu svg.open > g:nth-of-type(1) {
.hextra-hamburger-menu svg.open > g:nth-of-type(1) {
@apply hx:rotate-45;
}

.hamburger-menu svg.open > g:nth-of-type(1) path {
.hextra-hamburger-menu svg.open > g:nth-of-type(1) path {
@apply hx:translate-y-1;
}

.hamburger-menu svg.open > g:nth-of-type(2) {
.hextra-hamburger-menu svg.open > g:nth-of-type(2) {
@apply hx:-rotate-45;
}

.hamburger-menu svg.open > g:nth-of-type(2) path {
.hextra-hamburger-menu svg.open > g:nth-of-type(2) path {
@apply hx:-translate-y-1;
}
14 changes: 7 additions & 7 deletions assets/css/components/search.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
.search-wrapper {
.hextra-search-wrapper {
li {
@apply hx:mx-2.5 hx:break-words hx:rounded-md hx:contrast-more:border hx:text-gray-800 hx:contrast-more:border-transparent hx:dark:text-gray-300;
a {
@apply hx:block hx:scroll-m-12 hx:px-2.5 hx:py-2;
}

.title {
.hextra-search-title {
@apply hx:text-base hx:font-semibold hx:leading-5;
}

.active {
.hextra-search-active {
@apply hx:rounded-md hx:bg-primary-500/10 hx:contrast-more:border-primary-500;
}
}

.no-result {
.hextra-search-no-result {
@apply hx:block hx:select-none hx:p-8 hx:text-center hx:text-sm hx:text-gray-400;
}

.prefix {
.hextra-search-prefix {
@apply hx:mx-2.5 hx:mb-2 hx:mt-6 hx:select-none hx:border-b hx:border-black/10 hx:px-2.5 hx:pb-1.5 hx:text-xs hx:font-semibold
hx:uppercase hx:text-gray-500 hx:first:mt-0 hx:dark:border-white/20 hx:dark:text-gray-300 hx:contrast-more:border-gray-600
hx:contrast-more:text-gray-900 hx:contrast-more:dark:border-gray-50 hx:contrast-more:dark:text-gray-50;
}

.excerpt {
.hextra-search-excerpt {
@apply hx:overflow-hidden hx:text-ellipsis hx:mt-1 hx:text-sm hx:leading-[1.35rem] hx:text-gray-600 hx:dark:text-gray-400 hx:contrast-more:dark:text-gray-50;
display: -webkit-box;
line-clamp: 1;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}

.match {
.hextra-search-match {
@apply hx:text-primary-600;
}
}
4 changes: 2 additions & 2 deletions assets/css/components/sidebar.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@media (max-width: 48rem) {
.sidebar-container {
.hextra-sidebar-container {
@apply hx:fixed hx:pt-[calc(var(--navbar-height))] hx:top-0 hx:w-full hx:bottom-0 hx:z-[15] hx:overscroll-contain hx:bg-white hx:dark:bg-dark;
transition: transform 0.4s cubic-bezier(0.52, 0.16, 0.04, 1);
will-change: transform, opacity;
Expand All @@ -8,7 +8,7 @@
}
}

.sidebar-container {
.hextra-sidebar-container {
li > div {
@apply hx:h-0;
}
Expand Down
4 changes: 2 additions & 2 deletions assets/css/components/steps.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.steps {
.hextra-steps {
:where(h2, h3, h4, h5, h6):not(.no-step-marker) {
counter-increment: step;
@apply hx:ltr:before:ml-[-41px] hx:rtl:before:mr-[-44px];
Expand All @@ -13,7 +13,7 @@
}
}

:lang(fa) .steps {
:lang(fa) .hextra-steps {
:where(h2, h3, h4, h5, h6):not(.no-step-marker) {
&:before {
content: counter(step, persian);
Expand Down
4 changes: 2 additions & 2 deletions assets/css/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
@apply hx:text-[.9em] hx:bg-primary-700/5 hx:overflow-x-auto hx:font-medium hx:subpixel-antialiased hx:dark:bg-primary-300/10 hx:contrast-more:border hx:contrast-more:border-primary-900/20 hx:contrast-more:contrast-150 hx:contrast-more:dark:border-primary-100/40;
}

.filename {
.hextra-code-filename {
@apply hx:absolute hx:top-0 hx:z-[1] hx:w-full hx:truncate hx:rounded-t-xl hx:bg-primary-700/5 hx:py-2 hx:px-4 hx:text-xs hx:text-gray-700 hx:dark:bg-primary-300/10 hx:dark:text-gray-200;
}

.filename + pre:not(.lntable pre) {
.hextra-code-filename + pre:not(.lntable pre) {
/* Override padding for code blocks with filename but no highlight */
@apply hx:pt-12;
}
Expand Down
60 changes: 33 additions & 27 deletions assets/css/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@
@apply hx:border-black/4 hx:bg-black/3 hx:break-words hx:rounded-md hx:border hx:py-0.5 hx:px-[.25em] hx:text-[.9em] hx:dark:border-white/10 hx:dark:bg-white/10;
}
:where(table):not(:where(.hextra-code-block table, [class~=not-prose],[class~=not-prose] *)) {
@apply hx:block hx:overflow-x-auto hx:mt-6 hx:p-0 hx:first:mt-0;
@apply hx:block hx:overflow-x-auto hx:my-6 hx:p-0 hx:first:mt-0 hx:w-full hx:text-sm hx:leading-5;

tr {
@apply hx:m-0 hx:border-t hx:border-gray-300 hx:p-0 hx:dark:border-gray-600 hx:even:bg-gray-100 hx:even:dark:bg-gray-600/20;
thead {
@apply hx:border-b hx:border-gray-200 hx:dark:border-neutral-800;
}
tbody tr {
@apply hx:m-0 hx:border-b hx:border-gray-100 hx:dark:border-neutral-800/50;
}
th {
@apply hx:m-0 hx:border hx:border-gray-300 hx:px-4 hx:py-2 hx:font-semibold hx:dark:border-gray-600;
@apply hx:m-0 hx:p-2 hx:font-semibold hx:first:pl-0 hx:last:pr-0;
}
td {
@apply hx:m-0 hx:border hx:border-gray-300 hx:px-4 hx:py-2 hx:dark:border-gray-600;
@apply hx:m-0 hx:p-2 hx:first:pl-0 hx:last:pr-0;
}
}
:where(ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
Expand Down Expand Up @@ -86,35 +89,38 @@
@apply hx:my-2 hx:ps-6;
}
}
/* Horizontal line */
:where(hr):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply hx:my-10 hx:first:mt-0 hx:last:mb-0 hx:border-gray-200 hx:dark:border-neutral-800;
}
.footnotes {
@apply hx:mt-12 hx:text-sm;

hr {
@apply hx:border-gray-200 hx:dark:border-neutral-800;
}
}
}

.subheading-anchor {
@apply hx:opacity-0 hx:transition-opacity hx:ltr:ml-1 hx:rtl:mr-1;

span:target + &,
:hover > &,
&:focus {
@apply hx:opacity-100;
}

span + &,
:hover > & {
@apply hx:no-underline!;
}

@apply hx:after:text-gray-300 hx:dark:after:text-neutral-700;
&:after {
@apply hx:content-['#'] hx:px-1;
span:target + & {
@apply hx:text-gray-400;
@apply hx:dark:text-neutral-500;
.subheading-anchor {
@apply hx:opacity-0 hx:transition-opacity hx:ltr:ml-1 hx:rtl:mr-1;

span:target + &,
:hover > &,
&:focus {
@apply hx:opacity-100;
}

span + &,
:hover > & {
@apply hx:no-underline!;
}

@apply hx:after:text-gray-300 hx:dark:after:text-neutral-700;
&:after {
@apply hx:content-['#'] hx:px-1;
span:target + & {
@apply hx:text-gray-400;
@apply hx:dark:text-neutral-500;
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions assets/js/code-copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ document.addEventListener('DOMContentLoaded', function () {

document.querySelectorAll('.hextra-code-copy-btn').forEach(function (button) {
// Add copy and success icons
button.querySelector('.copy-icon')?.appendChild(getCopyIcon());
button.querySelector('.success-icon')?.appendChild(getSuccessIcon());
button.querySelector('.hextra-copy-icon')?.appendChild(getCopyIcon());
button.querySelector('.hextra-success-icon')?.appendChild(getSuccessIcon());

// Add click event listener for copy button
button.addEventListener('click', function (e) {
Expand Down
32 changes: 16 additions & 16 deletions assets/js/flexsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Change shortcut key to cmd+k on Mac, iPad or iPhone.
document.addEventListener("DOMContentLoaded", function () {
if (/iPad|iPhone|Macintosh/.test(navigator.userAgent)) {
// select the kbd element under the .search-wrapper class
const keys = document.querySelectorAll(".search-wrapper kbd");
// select the kbd element under the .hextra-search-wrapper class
const keys = document.querySelectorAll(".hextra-search-wrapper kbd");
keys.forEach(key => {
key.innerHTML = '<span class="hx:text-xs">⌘</span>K';
});
Expand All @@ -22,15 +22,15 @@ document.addEventListener("DOMContentLoaded", function () {
(function () {
const searchDataURL = '{{ $searchData.RelPermalink }}';

const inputElements = document.querySelectorAll('.search-input');
const inputElements = document.querySelectorAll('.hextra-search-input');
for (const el of inputElements) {
el.addEventListener('focus', init);
el.addEventListener('keyup', search);
el.addEventListener('keydown', handleKeyDown);
el.addEventListener('input', handleInputChange);
}

const shortcutElements = document.querySelectorAll('.search-wrapper kbd');
const shortcutElements = document.querySelectorAll('.hextra-search-wrapper kbd');

function setShortcutElementsOpacity(opacity) {
shortcutElements.forEach(el => {
Expand All @@ -45,12 +45,12 @@ document.addEventListener("DOMContentLoaded", function () {

// Get the search wrapper, input, and results elements.
function getActiveSearchElement() {
const inputs = Array.from(document.querySelectorAll('.search-wrapper')).filter(el => el.clientHeight > 0);
const inputs = Array.from(document.querySelectorAll('.hextra-search-wrapper')).filter(el => el.clientHeight > 0);
if (inputs.length === 1) {
return {
wrapper: inputs[0],
inputElement: inputs[0].querySelector('.search-input'),
resultsElement: inputs[0].querySelector('.search-results')
inputElement: inputs[0].querySelector('.hextra-search-input'),
resultsElement: inputs[0].querySelector('.hextra-search-results')
};
}
return undefined;
Expand Down Expand Up @@ -103,7 +103,7 @@ document.addEventListener("DOMContentLoaded", function () {
const { resultsElement } = getActiveSearchElement();
if (!resultsElement) return { result: undefined, index: -1 };

const result = resultsElement.querySelector('.active');
const result = resultsElement.querySelector('.hextra-search-active');
if (!result) return { result: undefined, index: -1 };

const index = parseInt(result.dataset.index, 10);
Expand All @@ -116,10 +116,10 @@ document.addEventListener("DOMContentLoaded", function () {
if (!resultsElement) return;

const { result: activeResult } = getActiveResult();
activeResult && activeResult.classList.remove('active');
activeResult && activeResult.classList.remove('hextra-search-active');
const result = resultsElement.querySelector(`[data-index="${index}"]`);
if (result) {
result.classList.add('active');
result.classList.add('hextra-search-active');
result.focus();
}
}
Expand Down Expand Up @@ -384,7 +384,7 @@ document.addEventListener("DOMContentLoaded", function () {
if (!resultsElement) return;

if (!results.length) {
resultsElement.innerHTML = `<span class="no-result">{{ $noResultsFound | safeHTML }}</span>`;
resultsElement.innerHTML = `<span class="hextra-search-no-result">{{ $noResultsFound | safeHTML }}</span>`;
return;
}

Expand Down Expand Up @@ -418,14 +418,14 @@ document.addEventListener("DOMContentLoaded", function () {
const result = results[i];
if (result.prefix) {
fragment.appendChild(createElement(`
<div class="prefix">${result.prefix}</div>`));
<div class="hextra-search-prefix">${result.prefix}</div>`));
}
let li = createElement(`
let li = createElement(`
<li>
<a data-index="${i}" href="${result.route}" class=${i === 0 ? "active" : ""}>
<div class="title">`+ highlightMatches(result.children.title, query) + `</div>` +
<a data-index="${i}" href="${result.route}" class=${i === 0 ? "hextra-search-active" : ""}>
<div class="hextra-search-title">`+ highlightMatches(result.children.title, query) + `</div>` +
(result.children.content ?
`<div class="excerpt">` + highlightMatches(result.children.content, query) + `</div>` : '') + `
`<div class="hextra-search-excerpt">` + highlightMatches(result.children.content, query) + `</div>` : '') + `
</a>
</li>`);
li.addEventListener('mousemove', handleMouseMove);
Expand Down
4 changes: 2 additions & 2 deletions assets/js/lang.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function () {
const languageSwitchers = document.querySelectorAll('.language-switcher');
const languageSwitchers = document.querySelectorAll('.hextra-language-switcher');
languageSwitchers.forEach((switcher) => {
switcher.addEventListener('click', (e) => {
e.preventDefault();
Expand All @@ -17,7 +17,7 @@

// Dismiss language switcher when clicking outside
document.addEventListener('click', (e) => {
if (e.target.closest('.language-switcher') === null) {
if (e.target.closest('.hextra-language-switcher') === null) {
languageSwitchers.forEach((switcher) => {
switcher.dataset.state = 'closed';
const optionsElement = switcher.nextElementSibling;
Expand Down
4 changes: 2 additions & 2 deletions assets/js/menu.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Hamburger menu for mobile navigation

document.addEventListener('DOMContentLoaded', function () {
const menu = document.querySelector('.hamburger-menu');
const sidebarContainer = document.querySelector('.sidebar-container');
const menu = document.querySelector('.hextra-hamburger-menu');
const sidebarContainer = document.querySelector('.hextra-sidebar-container');

function toggleMenu() {
// Toggle the hamburger menu
Expand Down
4 changes: 2 additions & 2 deletions assets/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function enableCollapsibles() {
}

function scrollToActiveItem() {
const sidebarScrollbar = document.querySelector("aside.sidebar-container > .hextra-scrollbar");
const activeItems = document.querySelectorAll(".sidebar-active-item");
const sidebarScrollbar = document.querySelector("aside.hextra-sidebar-container > .hextra-scrollbar");
const activeItems = document.querySelectorAll(".hextra-sidebar-active-item");
const visibleActiveItem = Array.from(activeItems).find(function (activeItem) {
return activeItem.getBoundingClientRect().height > 0;
});
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(function () {
const defaultTheme = '{{ site.Params.theme.default | default `system`}}'

const themeToggleButtons = document.querySelectorAll(".theme-toggle");
const themeToggleButtons = document.querySelectorAll(".hextra-theme-toggle");

// Change the icons of the buttons based on previous settings or system theme
if (
Expand Down
Loading