diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/hugo.yaml b/_vendor/github.com/HugoBlox/kit/modules/analytics/hugo.yaml new file mode 100644 index 0000000..7d9ee8a --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/hugo.yaml @@ -0,0 +1,4 @@ +module: + mounts: + - source: layouts + target: layouts diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/index.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/index.html new file mode 100644 index 0000000..bb87f9c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/index.html @@ -0,0 +1,9 @@ +{{/* HUGO BLOX: MARKETING MODULE */}} + +{{/* VERIFICATIONS */}} + +{{ partial "blox-analytics/verification" . }} + +{{/* ANALYTICS */}} + +{{ partial "blox-analytics/services/index" . }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/baidu_tongji.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/baidu_tongji.html new file mode 100644 index 0000000..9f60d70 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/baidu_tongji.html @@ -0,0 +1,13 @@ +{{ $baidu_tongji := site.Params.hugoblox.analytics.baidu.site_id | default "" }} + +{{ if hugo.IsProduction | and $baidu_tongji }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/fathom.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/fathom.html new file mode 100644 index 0000000..e4fa5a4 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/fathom.html @@ -0,0 +1,5 @@ +{{ $fathom := site.Params.hugoblox.analytics.fathom.site_id | default "" }} + +{{ if hugo.IsProduction | and $fathom }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/google_analytics.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/google_analytics.html new file mode 100644 index 0000000..dde7989 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/google_analytics.html @@ -0,0 +1,42 @@ +{{ $ga := site.Params.hugoblox.analytics.google.measurement_id | default "" }} + +{{ if hugo.IsProduction | and $ga }} + +{{ $gtag_config := cond (site.Params.hugoblox.privacy.anonymize_analytics | default true) "{ 'anonymize_ip': true }" "{}" }} + + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/google_tag_manager.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/google_tag_manager.html new file mode 100644 index 0000000..3b1c478 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/google_tag_manager.html @@ -0,0 +1,10 @@ +{{ $gt := site.Params.hugoblox.analytics.google_tag_manager.container_id | default "" }} +{{ if hugo.IsProduction | and $gt }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/index.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/index.html new file mode 100644 index 0000000..3e0e8af --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/index.html @@ -0,0 +1,7 @@ +{{ partial "blox-analytics/services/google_analytics" . }} +{{ partial "blox-analytics/services/google_tag_manager" . }} +{{ partial "blox-analytics/services/microsoft_clarity" . }} +{{ partial "blox-analytics/services/baidu_tongji" . }} +{{ partial "blox-analytics/services/plausible" . }} +{{ partial "blox-analytics/services/fathom" . }} +{{ partial "blox-analytics/services/pirsch" . }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/microsoft_clarity.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/microsoft_clarity.html new file mode 100644 index 0000000..168ebdc --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/microsoft_clarity.html @@ -0,0 +1,10 @@ +{{ $clarity := site.Params.hugoblox.analytics.clarity.project_id | default "" }} +{{ if hugo.IsProduction | and $clarity }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/pirsch.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/pirsch.html new file mode 100644 index 0000000..07c49e5 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/pirsch.html @@ -0,0 +1,5 @@ +{{ $pirsch := site.Params.hugoblox.analytics.pirsch.site_id | default "" }} + +{{ if hugo.IsProduction | and $pirsch }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/plausible.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/plausible.html new file mode 100644 index 0000000..47cf517 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/services/plausible.html @@ -0,0 +1,5 @@ +{{ $plausible := site.Params.hugoblox.analytics.plausible.domain | default "" }} + +{{ if hugo.IsProduction | and $plausible }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/verification.html b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/verification.html new file mode 100644 index 0000000..ea50d84 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/analytics/layouts/_partials/blox-analytics/verification.html @@ -0,0 +1,25 @@ +{{/* Site Verification with Third Party Services */}} + +{{- with site.Params.hugoblox.verification.google -}} + +{{- end -}} + +{{- with site.Params.hugoblox.verification.bing -}} + +{{- end -}} + +{{- with site.Params.hugoblox.verification.yandex -}} + +{{- end -}} + +{{- with site.Params.hugoblox.verification.pinterest -}} + +{{- end -}} + +{{- with site.Params.hugoblox.verification.baidu -}} + +{{- end -}} + +{{ with site.Params.hugoblox.verification.naver }} + +{{- end -}} \ No newline at end of file diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/archetypes/faq.md b/_vendor/github.com/HugoBlox/kit/modules/blox/archetypes/faq.md new file mode 100644 index 0000000..7735148 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/archetypes/faq.md @@ -0,0 +1,45 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: false + +# Summary for SEO +summary: "" + +# Mark this as an FAQ page to enable FAQPage structured data +faq_page: true + +# Categories and tags +categories: [] +tags: [] + +# Pagefind search metadata (automatically indexed) +# type: faq (auto-added by layout) +# category: first category from categories array above + +# Option 1: Define FAQs inline +faqs: + - question: "What is your question here?" + answer: "Your answer here. Can use **Markdown** formatting." + + - question: "Another question?" + answer: "Another answer with more details." + + # Add more Q&As as needed + +# Option 2: Alternatively, create child pages under this FAQ section +# and they will automatically be included + +# SEO settings +seo: + title: "" + description: "" + +# Show breadcrumb navigation +show_breadcrumb: true +--- + +Add an introductory text here that will appear before the FAQ accordion. + +This is a great place to provide context about the FAQ section. + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/archetypes/questions.md b/_vendor/github.com/HugoBlox/kit/modules/blox/archetypes/questions.md new file mode 100644 index 0000000..78023ab --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/archetypes/questions.md @@ -0,0 +1,62 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: false + +# The question (can also use title) +question: "{{ replace .Name "-" " " | title }}" + +# Short answer (optional - can also use content below) +answer: "" + +# Summary for SEO and previews +summary: "" + +# Difficulty level (optional) +difficulty: "" # e.g., "Beginner", "Intermediate", "Advanced" + +# Categories and tags for organization +categories: [] +tags: [] + +# Pagefind search metadata (automatically indexed) +# type: questions (auto-added by layout) +# category: first category from categories array above +# difficulty: value from difficulty field below + +# Vote counts (optional - for display and structured data) +upvote_count: 0 +downvote_count: 0 + +# Additional/suggested answers (optional) +# suggested_answer: +# - text: "Alternative answer text here..." +# author: "Author Name" +# date: 2024-01-15 +# upvote_count: 5 + +# Related questions (optional - can also be auto-generated) +# related: +# - link-to-related-question + +# SEO settings +seo: + title: "" + description: "" + +# Show breadcrumb navigation +show_breadcrumb: true +--- + +Write your detailed answer here using Markdown. + +You can include: +- Code blocks +- Images +- Lists +- Links +- And more! + +## Additional Details + +Add sections as needed to provide comprehensive information. diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/README.md b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/README.md new file mode 100644 index 0000000..eaac790 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/README.md @@ -0,0 +1,99 @@ +# Hugo Blox Tailwind CSS v4 Color System + +## Architecture Overview + +This system leverages Tailwind CSS v4's automatic utility generation to provide a comprehensive color system with minimal code. + +### How It Works + +1. **Theme Configuration** (`config/theme.css`) + + - Colors defined in `@theme` block automatically generate ALL utilities + - Includes standard Tailwind colors: gray, slate, zinc, neutral, stone + - Includes themeable colors: primary, secondary + +2. **Theme Files** (`themes/*.css`) + + - Small files that override `--color-primary-*` and `--color-secondary-*` variables + - Users switch themes by loading different theme CSS files + - No utilities redefined - just color values changed + +3. **Custom Utilities** (`color-utilities.css`) + - Only 42 lines vs previous 1,228 lines! + - Contains only custom colors not auto-generated (like `hb-dark`) + +### Available Colors + +**Standard Colors (always available):** + +- `gray-*` - Neutral grays +- `slate-*` - Cool grays +- `zinc-*` - True grays +- `neutral-*` - Pure grays +- `stone-*` - Warm grays + +**Themeable Colors (vary by theme):** + +- `primary-*` - Main theme color +- `secondary-*` - Accent theme color + +**Custom Colors:** + +- `hb-dark` - Hugo Blox brand dark color + +### Auto-Generated Utilities + +For every color defined in `@theme`, Tailwind automatically creates: + +- Background: `bg-{color}-{shade}` +- Text: `text-{color}-{shade}` +- Border: `border-{color}-{shade}` +- Hover: `hover:bg-{color}-{shade}`, `hover:text-{color}-{shade}` +- Dark mode: `dark:bg-{color}-{shade}`, `dark:text-{color}-{shade}` +- Gradients: `from-{color}-{shade}`, `to-{color}-{shade}` +- Focus rings: `focus:ring-{color}-{shade}` +- All other Tailwind color variants + +### Shades Available + +All colors include 11 shades: `50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950` + +### Usage Examples + +```html + +
...
+
...
+ + +
...
+
...
+ + +
...
+``` + +### Benefits + +1. **Dramatically Reduced File Size**: 1,228 lines → 42 lines (97% reduction!) +2. **Automatic Generation**: No manual utility definitions needed +3. **Maintainable**: Add new colors just by defining them in `@theme` +4. **Consistent**: All Tailwind variants automatically available +5. **Themeable**: Easy theme switching via CSS variable overrides + +### Adding New Colors + +To add a new color scale: + +1. Define in `config/theme.css`: + + ```css + --color-brand-500: 59 130 246; + --color-brand-600: 37 99 235; + /* etc. */ + ``` + +2. Tailwind automatically generates all utilities: + - `bg-brand-500`, `text-brand-600`, `hover:bg-brand-500`, etc. + +No manual utility definitions required! diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/animations.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/animations.css new file mode 100644 index 0000000..a8e20e5 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/animations.css @@ -0,0 +1,256 @@ +/** + * Hugo Blox Animations + * Scroll-triggered reveals and micro-interactions + */ + +/* Typewriter cursor */ +.typewriter-cursor { + display: inline-block; + width: 3px; + margin-left: 2px; + background-color: currentColor; + animation: blink 1s step-end infinite; +} + +@keyframes blink { + 50% { + opacity: 0; + } +} + +/* Reveal animations base */ +[x-reveal] { + opacity: 0; +} + +/* Stagger container */ +[data-stagger] > [data-stagger-item] { + opacity: 0; + transform: translateY(20px); + transition: + opacity 0.5s ease-out, + transform 0.5s ease-out; +} + +[data-stagger].revealed > [data-stagger-item] { + opacity: 1; + transform: translateY(0); +} + +/* Hover enhancements for cards */ +.card-hover-lift { + transition: + transform 0.3s ease-out, + box-shadow 0.3s ease-out; +} + +.card-hover-lift:hover { + transform: translateY(-4px); + box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.3); +} + +/* Hover glow effect */ +.hover-glow { + position: relative; + transition: all 0.3s ease-out; +} + +.hover-glow::before { + content: ""; + position: absolute; + inset: -2px; + border-radius: inherit; + background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500)); + opacity: 0; + z-index: -1; + transition: opacity 0.3s ease-out; + filter: blur(8px); +} + +.hover-glow:hover::before { + opacity: 0.5; +} + +/* Icon bounce on hover */ +.icon-bounce:hover { + animation: iconBounce 0.5s ease-out; +} + +@keyframes iconBounce { + 0%, + 100% { + transform: translateY(0); + } + 50% { + transform: translateY(-4px); + } +} + +/* Scale up on hover */ +.scale-hover { + transition: transform 0.2s ease-out; +} + +.scale-hover:hover { + transform: scale(1.05); +} + +/* Button pulse */ +.btn-pulse { + position: relative; +} + +.btn-pulse::after { + content: ""; + position: absolute; + inset: 0; + border-radius: inherit; + box-shadow: 0 0 0 0 currentColor; + opacity: 0.4; + animation: pulse-ring 2s infinite; +} + +@keyframes pulse-ring { + 0% { + box-shadow: 0 0 0 0 currentColor; + opacity: 0.4; + } + 100% { + box-shadow: 0 0 0 12px currentColor; + opacity: 0; + } +} + +/* Float animation for background orbs */ +@keyframes float { + 0%, + 100% { + transform: translateY(0) translateX(0); + } + 25% { + transform: translateY(-20px) translateX(10px); + } + 50% { + transform: translateY(-10px) translateX(-10px); + } + 75% { + transform: translateY(-30px) translateX(5px); + } +} + +.animate-float { + animation: float 8s ease-in-out infinite; +} + +/* Slow rotate for decorative elements */ +@keyframes rotate-slow { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +.animate-rotate-slow { + animation: rotate-slow 30s linear infinite; +} + +/* Fade in up - for scroll reveals */ +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(30px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.animate-fade-in-up { + animation: fadeInUp 0.6s ease-out forwards; +} + +/* Scale in - for icons/badges */ +@keyframes scaleIn { + from { + opacity: 0; + transform: scale(0.8); + } + to { + opacity: 1; + transform: scale(1); + } +} + +.animate-scale-in { + animation: scaleIn 0.4s ease-out forwards; +} + +/* Slide in from left */ +@keyframes slideInLeft { + from { + opacity: 0; + transform: translateX(-30px); + } + to { + opacity: 1; + transform: translateX(0); + } +} + +.animate-slide-in-left { + animation: slideInLeft 0.5s ease-out forwards; +} + +/* Respect reduced motion */ +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms; + animation-iteration-count: 1; + transition-duration: 0.01ms; + } + + .typewriter-cursor { + animation: none; + opacity: 1; + } + + [x-reveal], + [data-stagger] > [data-stagger-item] { + opacity: 1; + transform: none; + } +} + +/* Dark mode adjustments */ +.dark .hover-glow::before { + opacity: 0; +} + +.dark .hover-glow:hover::before { + opacity: 0.3; +} + +/* Dark mode icon visibility fix */ +/* For icons that are dark/black and invisible on dark backgrounds */ +.dark .dark-mode-icon svg, +.dark .dark-mode-icon img { + filter: invert(1) brightness(2); +} + +/* Alternative: Add subtle background to icon containers */ +.dark .dark-mode-icon { + background: rgba(255, 255, 255, 0.08); + border-radius: 0.5rem; + padding: 0.25rem; +} + +/* Hover state restores some contrast */ +.dark .group:hover .dark-mode-icon svg, +.dark .group:hover .dark-mode-icon img { + filter: invert(1) brightness(1.5); +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/chroma.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/chroma.css new file mode 100644 index 0000000..8f3e1ca --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/chroma.css @@ -0,0 +1,27 @@ +@import "./libs/chroma/light.css"; +@import "./libs/chroma/dark.css"; + +/* Code Blocks: Apply theme background */ +/* Requires relative position for Code Copy button */ +.prose .chroma, +.prose pre { + @apply relative rounded-md; + + color: var(--color-neutral-700); + background-color: var(--color-neutral-50); +} + +.dark .prose .chroma, +.dark .prose pre { + color: white; + background-color: rgb(71 85 105); /* slate-700 equivalent */ +} + +/* Fix LaTeX/TeX math rendering in code blocks - prevent inheriting italic from Chroma in dark mode */ +.chroma .language-latex, +.chroma .language-latex *, +.chroma .language-tex, +.chroma .language-tex * { + /* biome-ignore lint/complexity/noImportantStyles: Required to override Chroma's default italic for LaTeX/TeX */ + font-style: normal !important; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/color-utilities.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/color-utilities.css new file mode 100644 index 0000000..6b52712 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/color-utilities.css @@ -0,0 +1,47 @@ +/* Hugo Blox Custom Color Utilities for Tailwind v4 */ +/* + * Standard color utilities (bg-*, text-*, border-*, hover:*, dark:*, from-*, to-*, etc.) + * are automatically generated by Tailwind v4 from colors defined in @theme block. + * + * This file only contains custom utilities not auto-generated by Tailwind. + */ + +@layer utilities { + /* Custom Hugo Blox Dark Color */ + .bg-hb-dark { + background-color: var(--color-hb-dark, rgb(23 24 28)); + } + .text-hb-dark { + color: var(--color-hb-dark, rgb(23 24 28)); + } + .border-hb-dark { + border-color: var(--color-hb-dark, rgb(23 24 28)); + } + + /* Dark mode variants */ + .dark\:bg-hb-dark:where(.dark, .dark *) { + background-color: var(--color-hb-dark, rgb(23 24 28)); + } + .dark\:text-hb-dark:where(.dark, .dark *) { + color: var(--color-hb-dark, rgb(23 24 28)); + } +} + +/* + * Available Auto-Generated Utilities (from @theme colors): + * + * Standard Colors: gray, slate, zinc, neutral, stone + * Theme Colors: primary, secondary (overridden by theme files) + * + * Auto-generated utilities include: + * - Background: .bg-{color}-{shade} + * - Text: .text-{color}-{shade} + * - Border: .border-{color}-{shade} + * - Hover: .hover:bg-{color}-{shade}, .hover:text-{color}-{shade} + * - Dark: .dark:bg-{color}-{shade}, .dark:text-{color}-{shade} + * - Gradients: .from-{color}-{shade}, .to-{color}-{shade} + * - Focus: .focus:ring-{color}-{shade} + * - And all other Tailwind color variants + * + * Shades: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950 + */ diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/all.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/all.css new file mode 100644 index 0000000..fdc86ff --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/all.css @@ -0,0 +1,13 @@ +@import "page.css"; +@import "task-list.css"; +@import "copy.css"; +@import "sidebar-left.css"; +@import "charts.css"; +@import "steps.css"; +@import "cards.css"; +@import "math.css"; +@import "notebook.css"; +@import "author-notes.css"; +@import "glassmorphism.css"; +@import "cover.css"; +@import "navbar.css"; diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/author-notes.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/author-notes.css new file mode 100644 index 0000000..c9780cc --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/author-notes.css @@ -0,0 +1,48 @@ +/* Author Notes Tooltip Styles */ + +/* Hide elements with x-cloak until Alpine.js initializes */ +[x-cloak] { + /* biome-ignore lint/complexity/noImportantStyles: Required to reliably hide until Alpine initializes */ + display: none !important; +} + +/* Ensure tooltip appears above other content */ +.author-notes-tooltip { + z-index: 9999; +} + +/* Smooth hover effect for the info icon */ +.author-notes { + @apply inline-flex items-center justify-center; + @apply transition-all duration-200 ease-in-out; +} + +/* Focus styles for accessibility */ +.author-notes:focus { + @apply outline-none ring-2 ring-primary-500 ring-offset-2 rounded-full; +} + +/* Additional responsive styles for mobile */ +@media (max-width: 640px) { + /* On mobile, tooltips should be wider if needed */ + .author-notes-tooltip { + white-space: normal; + max-width: 200px; + } +} + +/* Print styles - show author notes inline when printing */ +@media print { + .author-notes { + display: none; + } + + /* Show author notes as superscript numbers in print */ + .author-notes::after { + display: inline; + content: attr(data-tooltip); + vertical-align: super; + font-size: 0.75em; + margin-left: 0.25em; + } +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/cards.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/cards.css new file mode 100644 index 0000000..171f6b2 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/cards.css @@ -0,0 +1,67 @@ +:root { + --hb-cols: 2; +} + +.hb-cards { + grid-template-columns: repeat(auto-fill, minmax(max(250px, calc((100% - 1rem * 2) / var(--hb-cols))), 1fr)); +} + +.hb-card { + @apply flex flex-col justify-start overflow-hidden rounded-lg border border-gray-200 text-current no-underline dark:shadow-transparent hover:shadow-gray-100 dark:hover:shadow-transparent shadow-gray-100 active:shadow-sm active:shadow-gray-200 transition-all duration-200; + @apply hover:border-gray-300 bg-transparent shadow-sm hover:bg-slate-50 hover:shadow-md; + + border-color: var(--color-neutral-700); +} + +.dark .hb-card { + border-color: var(--color-neutral-700); +} + +.dark .hb-card:hover { + border-color: var(--color-neutral-600); + background-color: var(--color-neutral-800); +} + +.hb-card-title { + @apply flex font-semibold gap-2 text-gray-700 hover:text-gray-900 items-center; + + color: var(--color-neutral-700); +} + +.hb-card-title:hover { + color: var(--color-neutral-900); +} + +.dark .hb-card-title { + color: var(--color-neutral-200); +} + +.dark .hb-card-title:hover { + color: var(--color-neutral-50); +} + +.hb-card-subtitle { + @apply line-clamp-3 text-sm font-normal text-gray-500 dark:text-gray-400 px-4 mb-4 mt-2; +} + +.hb-card svg { + color: var(--color-neutral-700); + width: 1.5rem; + transition: color 0.3s ease; +} + +.hb-card:hover svg { + color: currentcolor; +} + +.hb-card p { + margin-top: 0.5rem; +} + +.dark .hb-card svg { + color: var(--color-neutral-300); +} + +.dark .hb-card:hover svg { + color: currentcolor; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/charts.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/charts.css new file mode 100644 index 0000000..0c4da36 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/charts.css @@ -0,0 +1,21 @@ +/* Mermaid.js diagram div */ +div.mermaid { + width: 100%; + margin-bottom: 1rem; + + svg { + margin-left: auto; + margin-right: auto; + } +} + +/* Plotly chart */ +div.chart { + max-width: 100%; + margin-left: auto; + margin-right: auto; + margin-bottom: 1rem; + + /* Add horizontal scroll on mobile since Plotly */ + overflow-x: auto; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/copy.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/copy.css new file mode 100644 index 0000000..8f46f5e --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/copy.css @@ -0,0 +1,31 @@ +/* Code Copy */ + +/* Hugo's Code Block Wrapper Class */ + +.highlight { + @apply relative z-0; +} + +.copy-button { + @apply invisible absolute right-0 top-0 z-10 w-20 py-1 cursor-pointer font-mono text-sm whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200; +} + +/* Copy Button */ + +.highlight:hover > .copy-button { + @apply visible; +} + +.copy-button:hover, +.copy-button:focus, +.copy-button:active, +.copy-button:active:hover { + background-color: var(--color-primary-100); +} + +.dark .copy-button:hover, +.dark .copy-button:focus, +.dark .copy-button:active, +.dark .copy-button:active:hover { + background-color: var(--color-primary-600); +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/cover.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/cover.css new file mode 100644 index 0000000..a7e2224 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/cover.css @@ -0,0 +1,146 @@ +/** + * Article Cover Component Styles + * Notion-inspired page cover with icon overlay + */ + +.article-cover { + @apply relative w-full; + /* Height is set inline via style attribute, but ensure it displays */ + min-height: 200px; + /* Allow icon to overflow bottom */ + overflow: visible; + /* Add margin for overlapping icon */ + margin-bottom: 2.5rem; + + /* Responsive height adjustments for mobile */ + @media (max-width: 768px) { + height: 240px; + min-height: 240px; + } +} + +/* Cover image container */ +.article-cover img { + @apply w-full h-full object-cover; +} + +/* Cover icon container base styles */ +.article-cover-icon { + @apply flex items-center justify-center w-full h-full; + transition: transform 0.2s ease-in-out; +} + +.article-cover-icon:hover { + @apply scale-105; +} + +/* Glass morphism effect for icons */ +.article-cover-icon.glass { + background: rgba(255, 255, 255, 0.9); + backdrop-filter: blur(12px) saturate(180%); + border: 1px solid rgba(255, 255, 255, 0.3); + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); +} + +.dark .article-cover-icon.glass { + background: rgba(0, 0, 0, 0.7); + border-color: rgba(255, 255, 255, 0.1); +} + +/* Fade effect styles */ +.article-cover-fade { + @apply absolute left-0 right-0 pointer-events-none; + bottom: -1px; + background: linear-gradient(to bottom, transparent, white); +} + +.dark .article-cover-fade { + background: linear-gradient(to bottom, transparent, rgb(15, 23, 42)); +} + +/* Style variants */ +.article-cover[data-cover-style="minimal"] { + @apply shadow-sm; +} + +.article-cover[data-cover-style="glass"] { + @apply overflow-visible; +} + +.article-cover[data-cover-style="gradient"] { + /* Applied via inline overlay divs */ +} + +/* Ensure cover works well with dark mode */ +.dark .article-cover { + @apply border-b border-gray-800; +} + +/* Caption styles */ +.article-cover .cover-caption { + @apply absolute bottom-4 left-4 right-4 text-sm text-white/90; + @apply bg-black/50 backdrop-blur-sm px-3 py-2 rounded-lg; +} + +/* Responsive adjustments */ +@media (max-width: 640px) { + .article-cover-icon { + @apply scale-90; + } +} + +/* Parallax effect support (optional feature) */ +.article-cover.parallax { + transform-style: preserve-3d; +} + +.article-cover.parallax img { + transform: translateZ(-1px) scale(1.5); +} + +/* Link hover effect if cover is clickable */ +.article-cover a { + @apply block w-full h-full; +} + +.article-cover a:hover img { + @apply scale-105 transition-transform duration-500; +} + +/* Print styles - show cover but optimize */ +@media print { + .article-cover { + max-height: 200px; + page-break-after: avoid; + } + + .article-cover-fade, + .article-cover-icon { + @apply hidden; + } +} + +/* Accessibility: Reduced motion */ +@media (prefers-reduced-motion: reduce) { + .article-cover, + .article-cover *, + .article-cover-icon { + animation: none; + transition: none; + } + + .article-cover.parallax img { + transform: none; + } +} + +/* High contrast mode support */ +@media (prefers-contrast: high) { + .article-cover-icon { + @apply border-2 border-current; + } + + .article-cover .cover-caption { + @apply bg-black text-white; + } +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/glassmorphism.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/glassmorphism.css new file mode 100644 index 0000000..1d749ba --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/glassmorphism.css @@ -0,0 +1,239 @@ +/** + * 2025 Hugo Blox Glassmorphism Utility Classes + * + * Modern glassmorphism effects for Hugo Blox CTA cards and other components + */ + +/* ========================================================================== + Glassmorphism Base Classes + ========================================================================== */ + +.glassmorphism-primary { + @apply relative overflow-hidden; + background: linear-gradient( + 135deg, + color-mix(in oklch, var(--color-primary-500) 90%, transparent), + color-mix(in oklch, var(--color-primary-600) 95%, transparent), + color-mix(in oklch, var(--color-primary-700) 90%, transparent) + ); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); +} + +.glassmorphism-primary::before { + content: ""; + @apply absolute inset-0 pointer-events-none; + background: linear-gradient(45deg, rgb(0 0 0 / 0.1), transparent, rgb(255 255 255 / 0.1)); + mix-blend-mode: overlay; +} + +.glassmorphism-secondary { + @apply relative overflow-hidden; + background: linear-gradient( + 135deg, + color-mix(in oklch, var(--color-secondary-500) 90%, transparent), + color-mix(in oklch, var(--color-secondary-600) 95%, transparent), + color-mix(in oklch, var(--color-secondary-700) 90%, transparent) + ); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); +} + +.glassmorphism-secondary::before { + content: ""; + @apply absolute inset-0 pointer-events-none; + background: linear-gradient(45deg, rgb(0 0 0 / 0.1), transparent, rgb(255 255 255 / 0.1)); + mix-blend-mode: overlay; +} + +.glassmorphism-dark { + @apply relative overflow-hidden; + background: linear-gradient(135deg, rgb(0 0 0 / 0.7), rgb(31 41 55 / 0.8), rgb(0 0 0 / 0.9)); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); +} + +.glassmorphism-dark::before { + content: ""; + @apply absolute inset-0 pointer-events-none; + background: linear-gradient(45deg, rgb(255 255 255 / 0.05), transparent, rgb(255 255 255 / 0.1)); + mix-blend-mode: overlay; +} + +.glassmorphism-light { + @apply relative overflow-hidden; + background: linear-gradient(135deg, rgb(255 255 255 / 0.9), rgb(248 250 252 / 0.95), rgb(241 245 249 / 0.9)); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); +} + +.glassmorphism-light::before { + content: ""; + @apply absolute inset-0 pointer-events-none; + background: linear-gradient(45deg, rgb(0 0 0 / 0.02), transparent, rgb(255 255 255 / 0.05)); + mix-blend-mode: overlay; +} + +/* ========================================================================== + Noise Texture Classes (when used as background image) + ========================================================================== */ + +.noise-texture { + position: relative; +} + +.noise-texture::after { + content: ""; + @apply absolute inset-0 pointer-events-none; + background-image: url("/media/textures/noise-pattern.svg"); + background-size: 100px 100px; + background-repeat: repeat; + opacity: 0.03; + mix-blend-mode: multiply; +} + +.dark .noise-texture::after { + mix-blend-mode: screen; + opacity: 0.02; +} + +/* ========================================================================== + Enhanced Ring Classes for 2025 Design + ========================================================================== */ + +.glass-ring { + @apply ring-1 ring-white/20 hover:ring-white/40 dark:ring-gray-700/50 dark:hover:ring-gray-600/70; +} + +.glass-shadow { + box-shadow: + 0 25px 50px -12px rgb(0 0 0 / 0.25), + 0 0 0 1px rgb(255 255 255 / 0.1), + inset 0 1px 0 rgb(255 255 255 / 0.1); +} + +.dark .glass-shadow { + box-shadow: + 0 25px 50px -12px rgb(0 0 0 / 0.5), + 0 0 0 1px rgb(255 255 255 / 0.05), + inset 0 1px 0 rgb(255 255 255 / 0.05); +} + +/* ========================================================================== + CTA Card Glassmorphism Overlay (works with section backgrounds) + ========================================================================== */ + +.cta-glassmorphism { + @apply relative; + + /* Dynamic overlay opacity control */ + --glassmorphism-opacity: 0.15; + + /* Subtle overlay tint that works with any background */ + background: linear-gradient( + 135deg, + rgb(255 255 255 / var(--glassmorphism-opacity)) 0%, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.5)) 50%, + rgb(255 255 255 / var(--glassmorphism-opacity)) 100% + ); + + /* Enhanced glassmorphism effects */ + backdrop-filter: blur(20px) saturate(1.2); + -webkit-backdrop-filter: blur(20px) saturate(1.2); + + /* Modern border and shadow for light mode */ + border: 1px solid rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.1)); + box-shadow: + 0 32px 64px -12px rgb(0 0 0 / 0.25), + inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.05)); +} + +.cta-glassmorphism:hover { + /* Enhanced hover state */ + background: linear-gradient( + 135deg, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.05)) 0%, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.7)) 50%, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.05)) 100% + ); + + border: 1px solid rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.2)); + box-shadow: + 0 40px 80px -16px rgb(0 0 0 / 0.3), + inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.1)); +} + +/* Dark mode adjustments for CTA glassmorphism */ +.dark .cta-glassmorphism { + background: linear-gradient( + 135deg, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.5)) 0%, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.25)) 50%, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.5)) 100% + ); + + border: 1px solid rgb(255 255 255 / var(--glassmorphism-opacity)); + box-shadow: + 0 32px 64px -12px rgb(0 0 0 / 0.4), + inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.5)); +} + +.dark .cta-glassmorphism:hover { + background: linear-gradient( + 135deg, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.75)) 0%, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.4)) 50%, + rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.75)) 100% + ); + + border: 1px solid rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.05)); +} + +/* ========================================================================== + CTA Button Glassmorphism (nested within CTA cards) + ========================================================================== */ + +.cta-glassmorphism .group { + /* Ensure proper text contrast in light mode */ + color: var(--color-gray-900); +} + +.dark .cta-glassmorphism .group { + /* Maintain white text in dark mode */ + color: var(--color-gray-100); +} + +/* Enhanced button glassmorphism for light mode visibility */ +.cta-glassmorphism .group > div:first-child { + /* Light mode button background */ + background: rgb(255 255 255 / 0.9); + border: 1px solid rgb(0 0 0 / 0.1); + box-shadow: + 0 10px 25px -5px rgb(0 0 0 / 0.1), + 0 4px 6px -2px rgb(0 0 0 / 0.1), + inset 0 1px 0 rgb(255 255 255 / 0.3); +} + +.dark .cta-glassmorphism .group > div:first-child { + /* Dark mode button background */ + background: rgb(0 0 0 / 0.4); + border: 1px solid rgb(255 255 255 / 0.2); + box-shadow: + 0 10px 25px -5px rgb(0 0 0 / 0.3), + 0 4px 6px -2px rgb(0 0 0 / 0.2), + inset 0 1px 0 rgb(255 255 255 / 0.1); +} + +.cta-glassmorphism .group:hover > div:first-child { + background: rgb(255 255 255); + border: 1px solid rgb(0 0 0 / 0.15); + box-shadow: + 0 20px 40px -8px rgb(0 0 0 / 0.15), + 0 8px 12px -4px rgb(0 0 0 / 0.1), + inset 0 1px 0 rgb(255 255 255 / 0.4); +} + +.dark .cta-glassmorphism .group:hover > div:first-child { + background: rgb(0 0 0 / 0.6); + border: 1px solid rgb(255 255 255 / 0.3); +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/math.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/math.css new file mode 100644 index 0000000..35531b9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/math.css @@ -0,0 +1,4 @@ +/* Prevent long equations overflowing on small screens by scrolling horizontally instead. */ +.katex-display { + overflow: auto hidden; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/navbar.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/navbar.css new file mode 100644 index 0000000..986ddac --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/navbar.css @@ -0,0 +1,110 @@ +/* Navigation Styles */ + +.navbar { + @apply relative flex flex-wrap items-center justify-between; +} + +.navbar-brand { + /* @apply text-black dark:text-white text-xl font-semibold; */ + color: var(--hb-color-header-fg); + @apply text-xl font-semibold; +} + +.navbar-brand svg { + @apply max-h-full max-w-full h-[1em] w-auto inline-block; +} + +.navbar-brand img { + /* To shrink to line height, add: h-[1em] */ + @apply max-h-full w-auto inline-block; +} + +/* Ensure interactive controls show hand cursor */ +.theme-toggle, +[data-search-toggle], +#search-toggle, +[data-te-collapse-init], +.nav-dropdown > .nav-link[role="button"] { + @apply cursor-pointer; +} + +/* navbar toggler */ +input#nav-toggle:checked + label #show-button { + @apply hidden; +} + +input#nav-toggle:checked + label #hide-button { + @apply block; +} + +input#nav-toggle:checked ~ #nav-menu { + @apply block; +} + +#site-header.header { + background-color: var(--hb-color-header-bg); + color: var(--hb-color-header-fg); + @apply py-3 shadow; +} + +/* navbar items */ + +.navbar-nav { + @apply text-center lg:text-left; +} + +.nav-link { + /* @apply dark:text-white block p-3 font-semibold transition lg:px-2 lg:py-3; */ + color: var(--hb-color-header-fg); + @apply block p-3 font-semibold transition lg:px-2 lg:py-3; +} + +.nav-link:hover { + color: var(--color-primary-700); +} + +.dark .nav-link:hover { + color: var(--color-primary-300); +} + +.nav-dropdown { + @apply mr-0; +} + +.nav-dropdown > svg { + @apply pointer-events-none; +} + +.nav-dropdown-list { + @apply bg-white dark:bg-slate-900 z-10 min-w-[180px] rounded py-4 shadow hidden lg:invisible lg:absolute lg:block lg:opacity-0; + /* Ensure dropdown appears above content and under header */ + top: 100%; + left: 0; +} + +.nav-dropdown.active .nav-dropdown-list { + @apply block lg:visible lg:opacity-100; +} + +/* Ensure hover opens dropdown in desktop (CSS-driven) */ +@media (min-width: 1024px) { + .nav-dropdown:hover > .nav-dropdown-list { + @apply visible opacity-100; + } +} + +.nav-dropdown-item { + @apply px-4 [&:not(:last-child)]:mb-2; +} + +.dark .nav-dropdown-item:hover { + background-color: var(--color-primary-500); +} + +.nav-dropdown-link { + @apply dark:text-white dark:hover:text-white block py-1 font-semibold transition; +} + +.nav-dropdown-link:hover { + color: var(--color-primary-700); +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/notebook.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/notebook.css new file mode 100644 index 0000000..31109d2 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/notebook.css @@ -0,0 +1,150 @@ +.hb-notebook { + --hb-notebook-output-max-height: 26rem; + @apply relative isolate my-10 rounded-3xl border border-zinc-200/70 bg-white/90 p-6 shadow-xl shadow-primary-500/5 transition-shadow duration-300; + @apply dark:border-zinc-800/70 dark:bg-zinc-900/70 dark:shadow-black/30 text-zinc-800 dark:text-zinc-50; +} + +.hb-notebook::after { + content: ""; + @apply pointer-events-none absolute inset-0 rounded-3xl bg-gradient-to-r from-primary-500/5 via-transparent to-secondary-500/5 opacity-0 transition-opacity duration-300; +} + +.hb-notebook:hover::after { + @apply opacity-100; +} + +.hb-notebook--dense { + @apply p-4; +} + +.hb-notebook-header { + @apply flex flex-wrap items-start justify-between gap-4 border-b border-zinc-200/70 pb-4 dark:border-zinc-800/70; +} + +.hb-notebook-heading { + @apply space-y-1; +} + +.hb-notebook-title { + @apply text-lg font-semibold text-zinc-900 dark:text-white tracking-tight; +} + +.hb-notebook-subtitle { + @apply text-sm font-medium text-zinc-500 dark:text-zinc-400; +} + +.hb-notebook-download { + @apply inline-flex items-center gap-2 rounded-full border border-primary-500/70 px-4 py-2 text-sm font-medium text-primary-600 no-underline transition-all duration-200; + @apply hover:-translate-y-0.5 hover:bg-primary-50/60 hover:text-primary-700 dark:text-primary-300 dark:border-primary-400/60 dark:hover:bg-primary-500/10; +} + +.hb-notebook-download svg { + @apply h-4 w-4; +} + +.hb-notebook-metadata { + @apply mt-4 grid gap-3 rounded-2xl border border-dashed border-zinc-200/70 px-4 py-3 text-sm; + @apply dark:border-zinc-800/70; + grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); +} + +.hb-notebook-metadata dt { + @apply text-xs uppercase tracking-wide text-zinc-500 dark:text-zinc-400; +} + +.hb-notebook-metadata dd { + @apply font-medium text-zinc-800 dark:text-zinc-100; +} + +.hb-notebook-body { + @apply mt-6 flex flex-col gap-5; +} + +.hb-notebook-cell { + @apply rounded-2xl border border-zinc-200/70 bg-white p-4 shadow-sm shadow-zinc-200/60 transition-all duration-200; + @apply dark:border-zinc-800/60 dark:bg-zinc-900/70 dark:shadow-none; +} + +.hb-notebook-cell--markdown { + @apply bg-gradient-to-br from-white via-white to-primary-50/40 dark:from-zinc-900 dark:via-zinc-900 dark:to-primary-900/10; +} + +.hb-notebook-cell-header { + @apply mb-3 flex flex-wrap items-center gap-3; +} + +.hb-notebook-pill { + @apply inline-flex items-center rounded-full bg-zinc-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-zinc-600; + @apply dark:bg-zinc-800 dark:text-zinc-300; +} + +.hb-notebook-tags { + @apply flex flex-wrap gap-1; +} + +.hb-notebook-tags span { + @apply inline-flex items-center rounded-full bg-primary-100/80 px-2 py-0.5 text-[11px] font-medium text-primary-700; + @apply dark:bg-primary-400/20 dark:text-primary-200; +} + +.hb-notebook-code { + @apply overflow-hidden rounded-2xl border border-zinc-900/10 bg-zinc-950/95 shadow-inner shadow-black/30; +} + +.hb-notebook-code pre { + @apply m-0 overflow-auto rounded-2xl p-5 text-sm leading-relaxed; +} + +.hb-notebook-markdown { + @apply prose-h1:text-2xl prose-h2:text-xl prose-p:leading-relaxed prose-a:text-primary-600 max-w-none; +} + +.hb-notebook-raw { + @apply rounded-xl border border-dashed border-zinc-300/80 bg-zinc-50 p-4 font-mono text-sm text-zinc-700; + @apply dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-200 overflow-auto; +} + +.hb-notebook-outputs { + @apply mt-4 space-y-3 rounded-2xl border border-zinc-100/80 bg-zinc-50/80 p-4; + @apply dark:border-zinc-800/60 dark:bg-zinc-900/50; +} + +.hb-notebook-output { + @apply overflow-auto rounded-xl border border-transparent bg-white/90 p-3 text-sm leading-relaxed text-zinc-700; + @apply dark:bg-zinc-950/50 dark:text-zinc-100; + max-height: var(--hb-notebook-output-max-height, 26rem); +} + +.hb-notebook-output--stream { + @apply font-mono bg-zinc-900 text-zinc-100; +} + +.hb-notebook-output--error { + @apply border-red-200 bg-red-50/90 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-200; +} + +.hb-notebook-output--image { + @apply bg-transparent p-0 border-none; +} + +.hb-notebook-output--image img, +.hb-notebook-output--image svg { + @apply h-auto w-full rounded-xl border border-zinc-100/80 bg-white object-contain dark:border-zinc-800/60 dark:bg-zinc-900; +} + +.hb-notebook-output--markdown { + @apply bg-transparent p-0 border-none; +} + +.hb-notebook-output pre { + @apply m-0; +} + +.hb-notebook-output code { + @apply font-mono text-sm; +} + +.hb-notebook-empty { + @apply mt-4 rounded-2xl border border-dashed border-zinc-300/70 bg-zinc-50/80 px-4 py-3 text-center text-sm text-zinc-500; + @apply dark:border-zinc-700 dark:bg-zinc-900/40 dark:text-zinc-300; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/page.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/page.css new file mode 100644 index 0000000..a1159d2 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/page.css @@ -0,0 +1,97 @@ +/* Page layout to push footer to bottom of page */ + +.page-wrapper { + /* Min height = viewport height - navbar height */ + min-height: 100vh; + display: grid; + grid-template-rows: auto 1fr auto; + grid-template-columns: 100%; +} + +.page-header, +.page-footer { + flex-shrink: 0; +} + +.page-body { + flex-grow: 1; +} + +.article-header { + position: relative; /* Required for caption positioning */ + clear: both; +} + +.article-banner { + width: 100%; + height: 260px; + object-fit: cover; + + /* @include media-breakpoint-up(lg) { */ + /* height: 310px; !* Increased height on desktop *! */ + /* } */ +} + +.featured-image-wrapper { + position: relative; + padding-left: 0; /* Override container padding. */ + padding-right: 0; /* Override container padding. */ +} + +.featured-image { + position: relative; + width: 100%; + display: block; + margin: 0 auto; +} + +.article-header-caption { + position: absolute; + bottom: 0; + right: 0; + margin: 0 auto; + padding: 2px 5px; + color: #fff; + font-size: 0.7em; + background: #000; + text-align: right; + z-index: 5; + opacity: 0.65; + border-radius: 5px 0 0; +} + +@media (min-width: 64em) { + .article-header-caption { + padding: 5px 10px; + } +} + +.article-header-caption a { + color: #fff; + text-decoration: none; +} + +#page-bg { + position: fixed; + left: 0; + right: 0; + height: 100%; + width: 100%; + z-index: -1; + display: block; +} + +.backlink { + @apply text-xs font-medium text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100 contrast-more:text-gray-800 contrast-more:dark:text-gray-50; +} + +/* For ToC shortcode, Spoiler shortcode, and direct HTML Details snippets. */ +details > summary { + @apply cursor-pointer font-semibold; + + color: var(--color-primary-700); +} + +.dark details > summary { + color: var(--color-primary-300); +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/sidebar-left.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/sidebar-left.css new file mode 100644 index 0000000..7978b7f --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/sidebar-left.css @@ -0,0 +1,94 @@ +/* Match Tailwind lg (default 1024px): https://tailwindcss.com/docs/screens */ +@media (max-width: 1024px) { + .hb-sidebar-container { + @apply fixed top-0 w-full bottom-0 z-[15] pt-[calc(var(--navbar-height))] overscroll-contain; + + contain: layout style; + transition: transform 0.8s cubic-bezier(0.52, 0.16, 0.04, 1); + will-change: transform, opacity; + backface-visibility: hidden; + } +} + +.hb-sidebar-container { + @apply flex flex-col print:hidden lg:top-16 lg:shrink-0 lg:w-64 lg:self-start; + + li > div { + @apply h-0; + } + + li.open > div { + @apply h-auto pt-1; + } + + li.open > a > span > svg > path { + @apply rotate-90; + } +} + +.hb-sidebar-list { + @apply relative flex flex-col gap-1 before:absolute before:inset-y-1 before:w-px before:bg-gray-200 before:content-[""] ltr:ml-3 ltr:pl-3 ltr:before:left-0 rtl:mr-3 rtl:pr-3 rtl:before:right-0; +} + +.hb-sidebar-list::before { + background-color: var(--color-neutral-200); +} + +.dark .hb-sidebar-list::before { + background-color: var(--color-neutral-700); +} + +.hb-scrollbar { + @apply overflow-y-auto overflow-x-hidden p-4 grow; + + scrollbar-width: thin; + scrollbar-color: oklch(55.55% 0 0 / 40%) transparent; + scrollbar-gutter: stable; + + &::-webkit-scrollbar { + @apply w-3 h-3; + } + + &::-webkit-scrollbar-track { + @apply bg-transparent; + } + + &::-webkit-scrollbar-thumb { + @apply rounded-[10px]; + } + + &:hover::-webkit-scrollbar-thumb { + border: 3px solid transparent; + background-color: var(--tw-shadow-color); + background-clip: content-box; + @apply shadow-neutral-500/20 hover:shadow-neutral-500/40; + } +} + +.hb-docs-link { + @apply flex rounded px-2 py-1.5 text-sm transition-colors [word-break:break-word] cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] gap-2 before:opacity-25 before:content-['#'] text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:text-gray-50; +} + +.dark .hb-docs-link:hover { + background-color: color-mix(in oklch, var(--color-primary-100) 5%, transparent); +} + +.hb-sidebar-mobile-menu { + @apply [transition:background-color_0.5s_ease]; +} + +.hb-sidebar-mobile-toc { + @apply flex flex-col gap-1 relative before:absolute before:inset-y-1 before:w-px before:bg-gray-200 before:content-[""] ltr:pl-3 ltr:before:left-0 rtl:pr-3 rtl:before:right-0 ltr:ml-3 rtl:mr-3; +} + +.hb-sidebar-mobile-toc::before { + background-color: var(--color-neutral-200); +} + +.dark .hb-sidebar-mobile-toc::before { + background-color: var(--color-neutral-800); +} + +.hb-sidebar-custom-link { + @apply flex items-center justify-between gap-2 cursor-pointer rounded px-2 py-1.5 text-sm transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] [word-break:break-word]; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/steps.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/steps.css new file mode 100644 index 0000000..6d54605 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/steps.css @@ -0,0 +1,28 @@ +.hb-steps { + @apply ml-4 mb-12 pl-6 border-l border-gray-200 [counter-reset:hb_step]; + + border-left-color: var(--color-neutral-200); +} + +.dark .hb-steps { + border-left-color: var(--color-neutral-600); +} + +.hb-steps h3 { + counter-increment: hb-step; + + &::before { + @apply absolute w-[33px] h-[33px]; + @apply rounded-full border-4 border-white dark:border-slate-300; + @apply bg-gray-100 dark:bg-hb-dark; + @apply text-base font-normal text-center -indent-px; + @apply mt-[3px] ml-[-41px]; + + color: var(--color-neutral-700); + content: counter(hb-step); + } +} + +.dark .hb-steps h3::before { + color: var(--color-neutral-200); +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/task-list.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/task-list.css new file mode 100644 index 0000000..2e63b0f --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/components/task-list.css @@ -0,0 +1,30 @@ +/* HugoBlox Kit - https://hugoblox.com + * Task List Component + * License: https://github.com/HugoBlox/kit/blob/main/LICENSE.md + */ + +ul.task-list { + list-style: none; +} + +ul.task-list li input[type="checkbox"] { + margin-right: 0.5rem; +} + +ul.task-list input[type="checkbox"]:checked { + appearance: none; + width: 1em; + height: 1em; + border: none; + background: initial; + position: relative; +} + +ul.task-list input[type="checkbox"]:not(:checked) { + width: 0.9em; + height: 0.9em; +} + +ul.task-list input[type="checkbox"]:checked::after { + content: "✅"; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/safelist.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/safelist.css new file mode 100644 index 0000000..308ca68 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/safelist.css @@ -0,0 +1,232 @@ +/* Safelist patterns for dynamic classes */ +/* Note: In v4, we use @source inline to ensure these are included */ +/* This ensures Tailwind generates these classes even if not found in templates */ + +/* Inline safelist for classes used in dynamic content and YAML configuration */ +/* Includes search modal Quick Actions dynamic color classes */ +@source inline("
"); + +/* Force generation of all CSS custom properties for dynamic usage in YAML front matter */ +/* Hidden utility class that forces all color variables to be generated */ +.force-all-color-vars { + /* Primary Colors */ + color: var(--color-primary-50); + color: var(--color-primary-100); + color: var(--color-primary-200); + color: var(--color-primary-300); + color: var(--color-primary-400); + color: var(--color-primary-500); + color: var(--color-primary-600); + color: var(--color-primary-700); + color: var(--color-primary-800); + color: var(--color-primary-900); + color: var(--color-primary-950); + + /* Secondary Colors */ + color: var(--color-secondary-50); + color: var(--color-secondary-100); + color: var(--color-secondary-200); + color: var(--color-secondary-300); + color: var(--color-secondary-400); + color: var(--color-secondary-500); + color: var(--color-secondary-600); + color: var(--color-secondary-700); + color: var(--color-secondary-800); + color: var(--color-secondary-900); + color: var(--color-secondary-950); + + /* Extended Color Palette for Dynamic Gradients */ + color: var(--color-indigo-50); + color: var(--color-indigo-100); + color: var(--color-indigo-200); + color: var(--color-indigo-300); + color: var(--color-indigo-400); + color: var(--color-indigo-500); + color: var(--color-indigo-600); + color: var(--color-indigo-700); + color: var(--color-indigo-800); + color: var(--color-indigo-900); + color: var(--color-indigo-950); + + color: var(--color-purple-50); + color: var(--color-purple-100); + color: var(--color-purple-200); + color: var(--color-purple-300); + color: var(--color-purple-400); + color: var(--color-purple-500); + color: var(--color-purple-600); + color: var(--color-purple-700); + color: var(--color-purple-800); + color: var(--color-purple-900); + color: var(--color-purple-950); + + color: var(--color-pink-50); + color: var(--color-pink-100); + color: var(--color-pink-200); + color: var(--color-pink-300); + color: var(--color-pink-400); + color: var(--color-pink-500); + color: var(--color-pink-600); + color: var(--color-pink-700); + color: var(--color-pink-800); + color: var(--color-pink-900); + color: var(--color-pink-950); + + color: var(--color-red-50); + color: var(--color-red-100); + color: var(--color-red-200); + color: var(--color-red-300); + color: var(--color-red-400); + color: var(--color-red-500); + color: var(--color-red-600); + color: var(--color-red-700); + color: var(--color-red-800); + color: var(--color-red-900); + color: var(--color-red-950); + + color: var(--color-orange-50); + color: var(--color-orange-100); + color: var(--color-orange-200); + color: var(--color-orange-300); + color: var(--color-orange-400); + color: var(--color-orange-500); + color: var(--color-orange-600); + color: var(--color-orange-700); + color: var(--color-orange-800); + color: var(--color-orange-900); + color: var(--color-orange-950); + + color: var(--color-amber-50); + color: var(--color-amber-100); + color: var(--color-amber-200); + color: var(--color-amber-300); + color: var(--color-amber-400); + color: var(--color-amber-500); + color: var(--color-amber-600); + color: var(--color-amber-700); + color: var(--color-amber-800); + color: var(--color-amber-900); + color: var(--color-amber-950); + + color: var(--color-yellow-50); + color: var(--color-yellow-100); + color: var(--color-yellow-200); + color: var(--color-yellow-300); + color: var(--color-yellow-400); + color: var(--color-yellow-500); + color: var(--color-yellow-600); + color: var(--color-yellow-700); + color: var(--color-yellow-800); + color: var(--color-yellow-900); + color: var(--color-yellow-950); + + color: var(--color-lime-50); + color: var(--color-lime-100); + color: var(--color-lime-200); + color: var(--color-lime-300); + color: var(--color-lime-400); + color: var(--color-lime-500); + color: var(--color-lime-600); + color: var(--color-lime-700); + color: var(--color-lime-800); + color: var(--color-lime-900); + color: var(--color-lime-950); + + color: var(--color-green-50); + color: var(--color-green-100); + color: var(--color-green-200); + color: var(--color-green-300); + color: var(--color-green-400); + color: var(--color-green-500); + color: var(--color-green-600); + color: var(--color-green-700); + color: var(--color-green-800); + color: var(--color-green-900); + color: var(--color-green-950); + + color: var(--color-emerald-50); + color: var(--color-emerald-100); + color: var(--color-emerald-200); + color: var(--color-emerald-300); + color: var(--color-emerald-400); + color: var(--color-emerald-500); + color: var(--color-emerald-600); + color: var(--color-emerald-700); + color: var(--color-emerald-800); + color: var(--color-emerald-900); + color: var(--color-emerald-950); + + color: var(--color-teal-50); + color: var(--color-teal-100); + color: var(--color-teal-200); + color: var(--color-teal-300); + color: var(--color-teal-400); + color: var(--color-teal-500); + color: var(--color-teal-600); + color: var(--color-teal-700); + color: var(--color-teal-800); + color: var(--color-teal-900); + color: var(--color-teal-950); + + color: var(--color-cyan-50); + color: var(--color-cyan-100); + color: var(--color-cyan-200); + color: var(--color-cyan-300); + color: var(--color-cyan-400); + color: var(--color-cyan-500); + color: var(--color-cyan-600); + color: var(--color-cyan-700); + color: var(--color-cyan-800); + color: var(--color-cyan-900); + color: var(--color-cyan-950); + + color: var(--color-sky-50); + color: var(--color-sky-100); + color: var(--color-sky-200); + color: var(--color-sky-300); + color: var(--color-sky-400); + color: var(--color-sky-500); + color: var(--color-sky-600); + color: var(--color-sky-700); + color: var(--color-sky-800); + color: var(--color-sky-900); + color: var(--color-sky-950); + + color: var(--color-blue-50); + color: var(--color-blue-100); + color: var(--color-blue-200); + color: var(--color-blue-300); + color: var(--color-blue-400); + color: var(--color-blue-500); + color: var(--color-blue-600); + color: var(--color-blue-700); + color: var(--color-blue-800); + color: var(--color-blue-900); + color: var(--color-blue-950); + + color: var(--color-violet-50); + color: var(--color-violet-100); + color: var(--color-violet-200); + color: var(--color-violet-300); + color: var(--color-violet-400); + color: var(--color-violet-500); + color: var(--color-violet-600); + color: var(--color-violet-700); + color: var(--color-violet-800); + color: var(--color-violet-900); + color: var(--color-violet-950); + + /* Never display this class */ + display: none !important; +} + +/* Support for dual light/dark background colors in parse_block_v2.html */ +@media (prefers-color-scheme: dark) { + .home-section-bg[style*="--dark-bg-color"] { + background-color: var(--dark-bg-color) !important; + } +} + +.dark .home-section-bg[style*="--dark-bg-color"] { + background-color: var(--dark-bg-color) !important; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/tailwind.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/tailwind.css new file mode 100644 index 0000000..1de222b --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/tailwind.css @@ -0,0 +1,24 @@ +/* Tailwind CSS v4 Configuration */ +/* Content detection and plugin configuration */ + +/* Typography plugin for prose styles */ +@plugin "@tailwindcss/typography"; + +/* Content detection sources */ +/* Note: @source is a Tailwind v4 directive - linters may show warnings that can be ignored */ +/* Hugo stats file contains all detected classes from templates */ +@source "hugo_stats.json"; + +/* Custom Variants Configuration */ +/* Configure dark mode to use class strategy */ +@custom-variant dark (&:where(.dark, .dark *)); + +/* Configure hover to work on all devices (like v3 behavior) */ +@custom-variant hover (&:hover); + +/* Dark mode configuration */ +@media (prefers-color-scheme: dark) { + :root { + color-scheme: dark; + } +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/theme.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/theme.css new file mode 100644 index 0000000..d695622 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/config/theme.css @@ -0,0 +1,358 @@ +/* Tailwind CSS v4 Hugo BloxTheme Configuration */ + +/* Theme Configuration */ +@theme { + /* Custom Colors */ + --color-hb-dark: rgb(23 24 28); + + /* Standard Tailwind Color Scales - Provide variables as valid CSS colors */ + /* Gray */ + --color-gray-50: rgb(249 250 251); + --color-gray-100: rgb(243 244 246); + --color-gray-200: rgb(229 231 235); + --color-gray-300: rgb(209 213 219); + --color-gray-400: rgb(156 163 175); + --color-gray-500: rgb(107 114 128); + --color-gray-600: rgb(75 85 99); + --color-gray-700: rgb(55 65 81); + --color-gray-800: rgb(31 41 55); + --color-gray-900: rgb(17 24 39); + --color-gray-950: rgb(3 7 18); + + /* Slate */ + --color-slate-50: rgb(248 250 252); + --color-slate-100: rgb(241 245 249); + --color-slate-200: rgb(226 232 240); + --color-slate-300: rgb(203 213 225); + --color-slate-400: rgb(148 163 184); + --color-slate-500: rgb(100 116 139); + --color-slate-600: rgb(71 85 105); + --color-slate-700: rgb(51 65 85); + --color-slate-800: rgb(30 41 59); + --color-slate-900: rgb(15 23 42); + --color-slate-950: rgb(2 6 23); + + /* Zinc */ + --color-zinc-50: rgb(250 250 250); + --color-zinc-100: rgb(244 244 245); + --color-zinc-200: rgb(228 228 231); + --color-zinc-300: rgb(212 212 216); + --color-zinc-400: rgb(161 161 170); + --color-zinc-500: rgb(113 113 122); + --color-zinc-600: rgb(82 82 91); + --color-zinc-700: rgb(63 63 70); + --color-zinc-800: rgb(39 39 42); + --color-zinc-900: rgb(24 24 27); + --color-zinc-950: rgb(9 9 11); + + /* Neutral */ + --color-neutral-50: rgb(250 250 250); + --color-neutral-100: rgb(245 245 245); + --color-neutral-200: rgb(229 229 229); + --color-neutral-300: rgb(212 212 212); + --color-neutral-400: rgb(163 163 163); + --color-neutral-500: rgb(115 115 115); + --color-neutral-600: rgb(82 82 82); + --color-neutral-700: rgb(64 64 64); + --color-neutral-800: rgb(38 38 38); + --color-neutral-900: rgb(23 23 23); + --color-neutral-950: rgb(10 10 10); + + /* Stone */ + --color-stone-50: rgb(250 250 249); + --color-stone-100: rgb(245 245 244); + --color-stone-200: rgb(231 229 228); + --color-stone-300: rgb(214 211 209); + --color-stone-400: rgb(168 162 158); + --color-stone-500: rgb(120 113 108); + --color-stone-600: rgb(87 83 78); + --color-stone-700: rgb(68 64 60); + --color-stone-800: rgb(41 37 36); + --color-stone-900: rgb(28 25 23); + --color-stone-950: rgb(12 10 9); + + /* Red */ + --color-red-50: rgb(254 242 242); + --color-red-100: rgb(254 226 226); + --color-red-200: rgb(254 202 202); + --color-red-300: rgb(252 165 165); + --color-red-400: rgb(248 113 113); + --color-red-500: rgb(239 68 68); + --color-red-600: rgb(220 38 38); + --color-red-700: rgb(185 28 28); + --color-red-800: rgb(153 27 27); + --color-red-900: rgb(127 29 29); + --color-red-950: rgb(69 10 10); + + /* Orange */ + --color-orange-50: rgb(255 247 237); + --color-orange-100: rgb(255 237 213); + --color-orange-200: rgb(254 215 170); + --color-orange-300: rgb(253 186 116); + --color-orange-400: rgb(251 146 60); + --color-orange-500: rgb(249 115 22); + --color-orange-600: rgb(234 88 12); + --color-orange-700: rgb(194 65 12); + --color-orange-800: rgb(154 52 18); + --color-orange-900: rgb(124 45 18); + --color-orange-950: rgb(67 20 7); + + /* Amber */ + --color-amber-50: rgb(255 251 235); + --color-amber-100: rgb(254 243 199); + --color-amber-200: rgb(253 230 138); + --color-amber-300: rgb(252 211 77); + --color-amber-400: rgb(251 191 36); + --color-amber-500: rgb(245 158 11); + --color-amber-600: rgb(217 119 6); + --color-amber-700: rgb(180 83 9); + --color-amber-800: rgb(146 64 14); + --color-amber-900: rgb(120 53 15); + --color-amber-950: rgb(69 26 3); + + /* Yellow */ + --color-yellow-50: rgb(254 252 232); + --color-yellow-100: rgb(254 249 195); + --color-yellow-200: rgb(254 240 138); + --color-yellow-300: rgb(253 224 71); + --color-yellow-400: rgb(250 204 21); + --color-yellow-500: rgb(234 179 8); + --color-yellow-600: rgb(202 138 4); + --color-yellow-700: rgb(161 98 7); + --color-yellow-800: rgb(133 77 14); + --color-yellow-900: rgb(113 63 18); + --color-yellow-950: rgb(66 32 6); + + /* Lime */ + --color-lime-50: rgb(247 254 231); + --color-lime-100: rgb(236 252 203); + --color-lime-200: rgb(217 249 157); + --color-lime-300: rgb(190 242 100); + --color-lime-400: rgb(163 230 53); + --color-lime-500: rgb(132 204 22); + --color-lime-600: rgb(101 163 13); + --color-lime-700: rgb(77 124 15); + --color-lime-800: rgb(63 98 18); + --color-lime-900: rgb(54 83 20); + --color-lime-950: rgb(26 46 5); + + /* Green */ + --color-green-50: rgb(240 253 244); + --color-green-100: rgb(220 252 231); + --color-green-200: rgb(187 247 208); + --color-green-300: rgb(134 239 172); + --color-green-400: rgb(74 222 128); + --color-green-500: rgb(34 197 94); + --color-green-600: rgb(22 163 74); + --color-green-700: rgb(21 128 61); + --color-green-800: rgb(22 101 52); + --color-green-900: rgb(20 83 45); + --color-green-950: rgb(5 46 22); + + /* Emerald */ + --color-emerald-50: rgb(236 253 245); + --color-emerald-100: rgb(209 250 229); + --color-emerald-200: rgb(167 243 208); + --color-emerald-300: rgb(110 231 183); + --color-emerald-400: rgb(52 211 153); + --color-emerald-500: rgb(16 185 129); + --color-emerald-600: rgb(5 150 105); + --color-emerald-700: rgb(4 120 87); + --color-emerald-800: rgb(6 95 70); + --color-emerald-900: rgb(6 78 59); + --color-emerald-950: rgb(2 44 34); + + /* Teal */ + --color-teal-50: rgb(240 253 250); + --color-teal-100: rgb(204 251 241); + --color-teal-200: rgb(153 246 228); + --color-teal-300: rgb(94 234 212); + --color-teal-400: rgb(45 212 191); + --color-teal-500: rgb(20 184 166); + --color-teal-600: rgb(13 148 136); + --color-teal-700: rgb(15 118 110); + --color-teal-800: rgb(17 94 89); + --color-teal-900: rgb(19 78 74); + --color-teal-950: rgb(4 47 46); + + /* Cyan */ + --color-cyan-50: rgb(236 254 255); + --color-cyan-100: rgb(207 250 254); + --color-cyan-200: rgb(165 243 252); + --color-cyan-300: rgb(103 232 249); + --color-cyan-400: rgb(34 211 238); + --color-cyan-500: rgb(6 182 212); + --color-cyan-600: rgb(8 145 178); + --color-cyan-700: rgb(14 116 144); + --color-cyan-800: rgb(21 94 117); + --color-cyan-900: rgb(22 78 99); + --color-cyan-950: rgb(8 51 68); + + /* Sky */ + --color-sky-50: rgb(240 249 255); + --color-sky-100: rgb(224 242 254); + --color-sky-200: rgb(186 230 253); + --color-sky-300: rgb(125 211 252); + --color-sky-400: rgb(56 189 248); + --color-sky-500: rgb(14 165 233); + --color-sky-600: rgb(2 132 199); + --color-sky-700: rgb(3 105 161); + --color-sky-800: rgb(7 89 133); + --color-sky-900: rgb(12 74 110); + --color-sky-950: rgb(8 47 73); + + /* Blue */ + --color-blue-50: rgb(239 246 255); + --color-blue-100: rgb(219 234 254); + --color-blue-200: rgb(191 219 254); + --color-blue-300: rgb(147 197 253); + --color-blue-400: rgb(96 165 250); + --color-blue-500: rgb(59 130 246); + --color-blue-600: rgb(37 99 235); + --color-blue-700: rgb(29 78 216); + --color-blue-800: rgb(30 64 175); + --color-blue-900: rgb(30 58 138); + --color-blue-950: rgb(23 37 84); + + /* Indigo */ + --color-indigo-50: rgb(238 242 255); + --color-indigo-100: rgb(224 231 255); + --color-indigo-200: rgb(199 210 254); + --color-indigo-300: rgb(165 180 252); + --color-indigo-400: rgb(129 140 248); + --color-indigo-500: rgb(99 102 241); + --color-indigo-600: rgb(79 70 229); + --color-indigo-700: rgb(67 56 202); + --color-indigo-800: rgb(55 48 163); + --color-indigo-900: rgb(49 46 129); + --color-indigo-950: rgb(30 27 75); + + /* Violet */ + --color-violet-50: rgb(245 243 255); + --color-violet-100: rgb(237 233 254); + --color-violet-200: rgb(221 214 254); + --color-violet-300: rgb(196 181 253); + --color-violet-400: rgb(167 139 250); + --color-violet-500: rgb(139 92 246); + --color-violet-600: rgb(124 58 237); + --color-violet-700: rgb(109 40 217); + --color-violet-800: rgb(91 33 182); + --color-violet-900: rgb(76 29 149); + --color-violet-950: rgb(46 16 101); + + /* Purple */ + --color-purple-50: rgb(250 245 255); + --color-purple-100: rgb(243 232 255); + --color-purple-200: rgb(233 213 255); + --color-purple-300: rgb(216 180 254); + --color-purple-400: rgb(192 132 252); + --color-purple-500: rgb(168 85 247); + --color-purple-600: rgb(147 51 234); + --color-purple-700: rgb(126 34 206); + --color-purple-800: rgb(107 33 168); + --color-purple-900: rgb(88 28 135); + --color-purple-950: rgb(59 7 100); + + /* Fuchsia */ + --color-fuchsia-50: rgb(253 244 255); + --color-fuchsia-100: rgb(250 232 255); + --color-fuchsia-200: rgb(245 208 254); + --color-fuchsia-300: rgb(240 171 252); + --color-fuchsia-400: rgb(232 121 249); + --color-fuchsia-500: rgb(217 70 239); + --color-fuchsia-600: rgb(192 38 211); + --color-fuchsia-700: rgb(162 28 175); + --color-fuchsia-800: rgb(134 25 143); + --color-fuchsia-900: rgb(112 26 117); + --color-fuchsia-950: rgb(74 4 78); + + /* Pink */ + --color-pink-50: rgb(253 242 248); + --color-pink-100: rgb(252 231 243); + --color-pink-200: rgb(251 207 232); + --color-pink-300: rgb(249 168 212); + --color-pink-400: rgb(244 114 182); + --color-pink-500: rgb(236 72 153); + --color-pink-600: rgb(219 39 119); + --color-pink-700: rgb(190 24 93); + --color-pink-800: rgb(157 23 77); + --color-pink-900: rgb(131 24 67); + --color-pink-950: rgb(80 7 36); + + /* Rose */ + --color-rose-50: rgb(255 241 242); + --color-rose-100: rgb(255 228 230); + --color-rose-200: rgb(254 205 211); + --color-rose-300: rgb(253 164 175); + --color-rose-400: rgb(251 113 133); + --color-rose-500: rgb(244 63 94); + --color-rose-600: rgb(225 29 72); + --color-rose-700: rgb(190 18 60); + --color-rose-800: rgb(159 18 57); + --color-rose-900: rgb(136 19 55); + --color-rose-950: rgb(76 5 25); + + /* Themeable Colors */ + --color-primary-50: rgb(var(--hb-primary-50-rgb, 239 246 255)); + --color-primary-100: rgb(var(--hb-primary-100-rgb, 219 234 254)); + --color-primary-200: rgb(var(--hb-primary-200-rgb, 191 219 254)); + --color-primary-300: rgb(var(--hb-primary-300-rgb, 147 197 253)); + --color-primary-400: rgb(var(--hb-primary-400-rgb, 96 165 250)); + --color-primary-500: rgb(var(--hb-primary-500-rgb, 59 130 246)); + --color-primary-600: rgb(var(--hb-primary-600-rgb, 37 99 235)); + --color-primary-700: rgb(var(--hb-primary-700-rgb, 29 78 216)); + --color-primary-800: rgb(var(--hb-primary-800-rgb, 30 64 175)); + --color-primary-900: rgb(var(--hb-primary-900-rgb, 30 58 138)); + --color-primary-950: rgb(var(--hb-primary-950-rgb, 23 37 84)); + + /* Semantic UI Colors - Defined in theme_generator.html */ + /* Do not redeclare them here to avoid circular references */ + + --color-secondary-50: rgb(var(--hb-secondary-50-rgb, 236 254 255)); + --color-secondary-100: rgb(var(--hb-secondary-100-rgb, 207 250 254)); + --color-secondary-200: rgb(var(--hb-secondary-200-rgb, 165 243 252)); + --color-secondary-300: rgb(var(--hb-secondary-300-rgb, 103 232 249)); + --color-secondary-400: rgb(var(--hb-secondary-400-rgb, 34 211 238)); + --color-secondary-500: rgb(var(--hb-secondary-500-rgb, 6 182 212)); + --color-secondary-600: rgb(var(--hb-secondary-600-rgb, 8 145 178)); + --color-secondary-700: rgb(var(--hb-secondary-700-rgb, 14 116 144)); + --color-secondary-800: rgb(var(--hb-secondary-800-rgb, 21 94 117)); + --color-secondary-900: rgb(var(--hb-secondary-900-rgb, 22 78 99)); + --color-secondary-950: rgb(var(--hb-secondary-950-rgb, 8 51 68)); + + /* Note: Providing these palettes in @theme ensures theme-pack mappings like var(--color-rose-600) always resolve */ + + /* Font families */ + --hb-font-family-sans: inter var, ui-sans-serif, system-ui, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji; + --hb-font-heading: var(--hb-font-family-sans); + --hb-font-body: var(--hb-font-family-sans); + --hb-font-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --hb-font-nav: var(--hb-font-heading); + + /* Font weights */ + --hb-font-weight-heading: 700; + --hb-font-weight-body: 400; + --hb-font-weight-body-bold: 600; + + /* Line heights */ + --hb-font-leading-heading: 1.2; + --hb-font-leading-body: 1.6; + --hb-font-leading-code: 1.5; + + /* Letter spacing */ + --hb-font-tracking-heading: -0.02em; + --hb-font-tracking-body: 0; + --hb-font-tracking-caps: 0.05em; + + /* Font sizes */ + --font-size-xs: 0.75rem; + --font-size-sm: 0.875rem; + --font-size-base: 1rem; + --font-size-lg: 1.125rem; + --font-size-xl: 1.25rem; + --font-size-2xl: 1.5rem; + --font-size-3xl: 1.875rem; + --font-size-4xl: 2.25rem; + --font-size-5xl: 3rem; + --font-size-6xl: 4rem; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/framework/base.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/framework/base.css new file mode 100644 index 0000000..fc74aa1 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/framework/base.css @@ -0,0 +1,127 @@ +/* Base styles for better text rendering */ +@layer base { + html { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizelegibility; + /* Apply the runtime font vars injected by Hugo's typography partial */ + font-family: var(--hb-font-body); + } + + body { + font-family: var(--hb-font-body); + font-weight: var(--hb-font-weight-body, 400); + line-height: var(--hb-font-leading-body, 1.6); + letter-spacing: var(--hb-font-tracking-body, 0); + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-family: var(--hb-font-heading); + font-weight: var(--hb-font-weight-heading, 700); + line-height: var(--hb-font-leading-heading, 1.2); + letter-spacing: var(--hb-font-tracking-heading, -0.02em); + } + + code, + pre, + kbd, + samp { + font-family: var(--hb-font-code); + } +} + +/* Gradient Mesh Animations */ +@keyframes float { + 0%, + 100% { + transform: translateY(0) translateX(0); + } + + 25% { + transform: translateY(-20px) translateX(10px); + } + + 50% { + transform: translateY(-10px) translateX(-10px); + } + + 75% { + transform: translateY(-30px) translateX(5px); + } +} + +@keyframes rotate-slow { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + +.animate-float { + animation: float 8s ease-in-out infinite; +} + +.animate-rotate-slow { + animation: rotate-slow 20s linear infinite; +} + +/* Custom utilities and components */ +@utility task-list { + list-style: none; + padding-left: 1.5rem; +} + +/* Custom typography styles - the plugin handles the base styles */ +/* Additional customization for prose elements */ +@layer components { + .prose a { + text-decoration: underline; + text-decoration-color: var(--color-primary-300); + font-weight: var(--hb-font-weight-body-bold, 600); + } + + .prose a:hover { + color: var(--color-primary-600); + text-decoration: none; + border-radius: 0.09rem; + } + + .prose mark { + color: var(--color-neutral-900); + background-color: var(--color-primary-200); + padding: 0.1rem 0.2rem; + border-radius: 0.25rem; + } + + .dark .prose-invert a { + text-decoration-color: var(--color-neutral-500); + } + + .dark .prose-invert a:hover { + color: var(--color-primary-300); + } + + .dark .prose-invert mark { + background-color: var(--color-primary-400); + color: black; + } + + /* Inline Code Styling */ + .prose code:not(:where(pre *)) { + @apply rounded-md bg-neutral-100 px-1.5 py-0.5 text-[0.875em] font-normal text-primary-700; + @apply dark:bg-neutral-700/50 dark:text-primary-300; + } + + .prose code:not(:where(pre *))::before, + .prose code:not(:where(pre *))::after { + content: none; + } +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/framework/components.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/framework/components.css new file mode 100644 index 0000000..ec25cb1 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/framework/components.css @@ -0,0 +1,132 @@ +/* Hugo Blox Framework Custom Classes */ +@layer components { + /* Section styles for Hugo Blox blocks */ + .hbb-section { + padding-top: 6rem; + padding-bottom: 6rem; + } + + .section-subheading { + font-size: 1.25rem; + font-weight: var(--hb-font-weight-heading, 700); + } + + /* Home section background styles */ + .home-section-bg { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: -1; + } + + .home-section-bg.bg-image { + background-position: center; + background-repeat: no-repeat; + background-size: cover; + } + + /* 2025 Glassmorphism texture support - disable conflicting defaults */ + .home-section-bg.bg-image[style*="background-size"][style*="background-repeat"] { + /* biome-ignore lint/complexity/noImportantStyles: Required to override inline background-size for glass textures */ + background-size: revert !important; + /* biome-ignore lint/complexity/noImportantStyles: Required to override inline background-repeat for glass textures */ + background-repeat: revert !important; + /* biome-ignore lint/complexity/noImportantStyles: Required to override inline background-position for glass textures */ + background-position: revert !important; + } + + /* Specific glassmorphism texture class override */ + .blox-cta-card .home-section-bg.bg-image { + background-size: revert; + background-repeat: revert; + background-position: revert; + } + + /* Video background */ + .bg-video { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + object-fit: cover; + object-position: center center; + opacity: 1; + } + + /* Flip video horizontally */ + .bg-video.flip { + transform: scaleX(-1); + } + + /* Container styles */ + .universal-wrapper { + margin: 0 auto; + padding-right: 1rem; + padding-left: 1rem; + width: 100%; + } + + @media (min-width: 1200px) { + .universal-wrapper { + max-width: 1200px; + } + } + + .article-container { + max-width: 760px; + margin: 0 auto; + } + + /* Button toolbar */ + .btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.5rem; + } + + /* Documentation specific */ + .docs-article-container { + max-width: 760px; + } + + /* Powered-by footer styles */ + .powered-by { + font-size: 0.75rem; + } + + .powered-by a { + color: inherit; + text-decoration: none; + } + + .powered-by a:hover { + text-decoration: underline; + } + + /* Parallax effect */ + .parallax { + background-attachment: fixed; + background-position: center; + background-repeat: no-repeat; + background-size: cover; + position: relative; + } + + /* When parallax is used with home-section-bg, preserve absolute positioning */ + .home-section-bg.parallax { + position: absolute; + } + + /* Section color schemes - for backward compatibility */ + section.light { + background-color: transparent; + } + + section.dark { + background-color: transparent; + } +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/hb-search.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/hb-search.css new file mode 100644 index 0000000..a35a349 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/hb-search.css @@ -0,0 +1,86 @@ +/* Hugo Blox Search - Custom Pagefind Implementation */ + +/* Animations */ +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +.animate-spin { + animation: spin 1s linear infinite; +} + +/* Search result highlights */ +.search-result mark { + background-color: rgb(254 240 138); + color: rgb(17 24 39); + font-weight: var(--hb-font-weight-body-bold, 600); + padding: 0.05rem 0.2rem; + border-radius: 0.125rem; +} + +.dark .search-result mark { + background-color: rgb(133 77 14); + color: rgb(254 240 138); +} + +/* Result hover state */ +.search-result:hover mark { + background-color: rgb(253 224 71); +} + +.dark .search-result:hover mark { + background-color: rgb(161 98 7); +} + +/* Smooth transitions */ +.search-modal-enter { + animation: slide-in-up 0.2s ease-out; +} + +@keyframes slide-in-up { + from { + opacity: 0; + transform: translateY(1rem) scale(0.95); + } + + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +/* Loading skeleton */ +.search-skeleton { + background: linear-gradient(90deg, rgb(229 231 235) 25%, rgb(243 244 246) 50%, rgb(229 231 235) 75%); + background-size: 200% 100%; + animation: shimmer 1.5s infinite; +} + +.dark .search-skeleton { + background: linear-gradient(90deg, rgb(55 65 81) 25%, rgb(75 85 99) 50%, rgb(55 65 81) 75%); + background-size: 200% 100%; +} + +@keyframes shimmer { + 0% { + background-position: 200% 0; + } + + 100% { + background-position: -200% 0; + } +} + +/* Keyboard navigation highlight - handled by Alpine :class binding */ +/* Smooth transition for selection state */ +.search-result { + transition: all 0.15s ease; +} + +/* Additional hover effects for keyboard-selected items */ +.search-result:focus-visible { + outline: 2px solid rgb(59 130 246); + outline-offset: -2px; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/layout-utilities.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/layout-utilities.css new file mode 100644 index 0000000..e6f0f6d --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/layout-utilities.css @@ -0,0 +1,80 @@ +/* + Hugo Blox Layout Utilities + + Provides CSS utilities that use the configurable layout tokens: + - --hb-radius: Border radius token + - --hb-spacing-base: Base spacing unit + - --hb-spacing-section: Section padding + - --hb-font-size-base: Base font size +*/ + +/* Border radius utility - use instead of hardcoded rounded-* classes */ +.hb-rounded { + border-radius: var(--hb-radius, 0.5rem); +} + +.hb-rounded-sm { + border-radius: calc(var(--hb-radius, 0.5rem) * 0.5); +} + +.hb-rounded-lg { + border-radius: calc(var(--hb-radius, 0.5rem) * 1.5); +} + +.hb-rounded-xl { + border-radius: calc(var(--hb-radius, 0.5rem) * 2); +} + +/* Section spacing */ +.hb-section { + padding-top: var(--hb-spacing-section, 4rem); + padding-bottom: var(--hb-spacing-section, 4rem); +} + +.hb-section-sm { + padding-top: calc(var(--hb-spacing-section, 4rem) * 0.5); + padding-bottom: calc(var(--hb-spacing-section, 4rem) * 0.5); +} + +/* Component spacing */ +.hb-gap { + gap: var(--hb-spacing-base, 1rem); +} + +.hb-gap-sm { + gap: calc(var(--hb-spacing-base, 1rem) * 0.5); +} + +.hb-gap-lg { + gap: calc(var(--hb-spacing-base, 1rem) * 1.5); +} + +/* Padding utilities */ +.hb-p { + padding: var(--hb-spacing-base, 1rem); +} + +.hb-px { + padding-left: var(--hb-spacing-base, 1rem); + padding-right: var(--hb-spacing-base, 1rem); +} + +.hb-py { + padding-top: var(--hb-spacing-base, 1rem); + padding-bottom: var(--hb-spacing-base, 1rem); +} + +/* Margin utilities */ +.hb-m { + margin: var(--hb-spacing-base, 1rem); +} + +.hb-mx { + margin-left: var(--hb-spacing-base, 1rem); + margin-right: var(--hb-spacing-base, 1rem); +} + +.hb-my { + margin-top: var(--hb-spacing-base, 1rem); + margin-bottom: var(--hb-spacing-base, 1rem); +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/libs/chroma/dark.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/libs/chroma/dark.css new file mode 100644 index 0000000..b157585 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/libs/chroma/dark.css @@ -0,0 +1,502 @@ +/* Dracula dark theme */ +.dark .highlight { + /* Background */ /*.bg { color: #f8f8f2; background-color: #282a36 }*/ + /* PreWrapper */ /*.chroma { color: #f8f8f2; background-color: #282a36; }*/ + + /* Other */ + + .chroma .x { + } + + /* Error */ + + .chroma .err { + } + + /* CodeLine */ + + .chroma .cl { + } + + /* LineTableTD */ + + .chroma .lntd { + vertical-align: top; + padding: 0; + margin: 0; + border: 0; + } + + /* LineTable */ + + .chroma .lntable { + border-spacing: 0; + padding: 0; + margin: 0; + border: 0; + } + + /* LineHighlight */ + + .chroma .hl { + background-color: #ffc; + } + + /* LineNumbersTable */ + + .chroma .lnt { + white-space: pre; + user-select: none; + margin-right: 0.4em; + padding: 0 0.4em 0 0.4em; + color: #7f7f7f; + } + + /* LineNumbers */ + + .chroma .ln { + white-space: pre; + user-select: none; + margin-right: 0.4em; + padding: 0 0.4em 0 0.4em; + color: #7f7f7f; + } + + /* Line */ + + .chroma .line { + display: flex; + } + + /* Keyword */ + + .chroma .k { + color: #ff79c6; + } + + /* KeywordConstant */ + + .chroma .kc { + color: #ff79c6; + } + + /* KeywordDeclaration */ + + .chroma .kd { + color: #8be9fd; + font-style: italic; + } + + /* KeywordNamespace */ + + .chroma .kn { + color: #ff79c6; + } + + /* KeywordPseudo */ + + .chroma .kp { + color: #ff79c6; + } + + /* KeywordReserved */ + + .chroma .kr { + color: #ff79c6; + } + + /* KeywordType */ + + .chroma .kt { + color: #8be9fd; + } + + /* Name */ + + .chroma .n { + } + + /* NameAttribute */ + + .chroma .na { + color: #50fa7b; + } + + /* NameBuiltin */ + + .chroma .nb { + color: #8be9fd; + font-style: italic; + } + + /* NameBuiltinPseudo */ + + .chroma .bp { + } + + /* NameClass */ + + .chroma .nc { + color: #50fa7b; + } + + /* NameConstant */ + + .chroma .no { + } + + /* NameDecorator */ + + .chroma .nd { + } + + /* NameEntity */ + + .chroma .ni { + } + + /* NameException */ + + .chroma .ne { + } + + /* NameFunction */ + + .chroma .nf { + color: #50fa7b; + } + + /* NameFunctionMagic */ + + .chroma .fm { + } + + /* NameLabel */ + + .chroma .nl { + color: #8be9fd; + font-style: italic; + } + + /* NameNamespace */ + + .chroma .nn { + } + + /* NameOther */ + + .chroma .nx { + } + + /* NameProperty */ + + .chroma .py { + } + + /* NameTag */ + + .chroma .nt { + color: #ff79c6; + } + + /* NameVariable */ + + .chroma .nv { + color: #8be9fd; + font-style: italic; + } + + /* NameVariableClass */ + + .chroma .vc { + color: #8be9fd; + font-style: italic; + } + + /* NameVariableGlobal */ + + .chroma .vg { + color: #8be9fd; + font-style: italic; + } + + /* NameVariableInstance */ + + .chroma .vi { + color: #8be9fd; + font-style: italic; + } + + /* NameVariableMagic */ + + .chroma .vm { + } + + /* Literal */ + + .chroma .l { + } + + /* LiteralDate */ + + .chroma .ld { + } + + /* LiteralString */ + + .chroma .s { + color: #f1fa8c; + } + + /* LiteralStringAffix */ + + .chroma .sa { + color: #f1fa8c; + } + + /* LiteralStringBacktick */ + + .chroma .sb { + color: #f1fa8c; + } + + /* LiteralStringChar */ + + .chroma .sc { + color: #f1fa8c; + } + + /* LiteralStringDelimiter */ + + .chroma .dl { + color: #f1fa8c; + } + + /* LiteralStringDoc */ + + .chroma .sd { + color: #f1fa8c; + } + + /* LiteralStringDouble */ + + .chroma .s2 { + color: #f1fa8c; + } + + /* LiteralStringEscape */ + + .chroma .se { + color: #f1fa8c; + } + + /* LiteralStringHeredoc */ + + .chroma .sh { + color: #f1fa8c; + } + + /* LiteralStringInterpol */ + + .chroma .si { + color: #f1fa8c; + } + + /* LiteralStringOther */ + + .chroma .sx { + color: #f1fa8c; + } + + /* LiteralStringRegex */ + + .chroma .sr { + color: #f1fa8c; + } + + /* LiteralStringSingle */ + + .chroma .s1 { + color: #f1fa8c; + } + + /* LiteralStringSymbol */ + + .chroma .ss { + color: #f1fa8c; + } + + /* LiteralNumber */ + + .chroma .m { + color: #bd93f9; + } + + /* LiteralNumberBin */ + + .chroma .mb { + color: #bd93f9; + } + + /* LiteralNumberFloat */ + + .chroma .mf { + color: #bd93f9; + } + + /* LiteralNumberHex */ + + .chroma .mh { + color: #bd93f9; + } + + /* LiteralNumberInteger */ + + .chroma .mi { + color: #bd93f9; + } + + /* LiteralNumberIntegerLong */ + + .chroma .il { + color: #bd93f9; + } + + /* LiteralNumberOct */ + + .chroma .mo { + color: #bd93f9; + } + + /* Operator */ + + .chroma .o { + color: #ff79c6; + } + + /* OperatorWord */ + + .chroma .ow { + color: #ff79c6; + } + + /* Punctuation */ + + .chroma .p { + } + + /* Comment */ + + .chroma .c { + color: #6272a4; + } + + /* CommentHashbang */ + + .chroma .ch { + color: #6272a4; + } + + /* CommentMultiline */ + + .chroma .cm { + color: #6272a4; + } + + /* CommentSingle */ + + .chroma .c1 { + color: #6272a4; + } + + /* CommentSpecial */ + + .chroma .cs { + color: #6272a4; + } + + /* CommentPreproc */ + + .chroma .cp { + color: #ff79c6; + } + + /* CommentPreprocFile */ + + .chroma .cpf { + color: #ff79c6; + } + + /* Generic */ + + .chroma .g { + } + + /* GenericDeleted */ + + .chroma .gd { + color: #f55; + } + + /* GenericEmph */ + + .chroma .ge { + text-decoration: underline; + } + + /* GenericError */ + + .chroma .gr { + } + + /* GenericHeading */ + + .chroma .gh { + font-weight: bold; + } + + /* GenericInserted */ + + .chroma .gi { + color: #50fa7b; + font-weight: bold; + } + + /* GenericOutput */ + + .chroma .go { + color: #44475a; + } + + /* GenericPrompt */ + + .chroma .gp { + } + + /* GenericStrong */ + + .chroma .gs { + } + + /* GenericSubheading */ + + .chroma .gu { + font-weight: bold; + } + + /* GenericTraceback */ + + .chroma .gt { + } + + /* GenericUnderline */ + + .chroma .gl { + text-decoration: underline; + } + + /* TextWhitespace */ + + .chroma .w { + } +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/libs/chroma/light.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/libs/chroma/light.css new file mode 100644 index 0000000..98607fa --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/libs/chroma/light.css @@ -0,0 +1,534 @@ +/* Github light theme */ +html:not(.dark) .highlight { + /* Background */ /*.bg { background-color: #fff }*/ + /* PreWrapper */ /*.chroma { background-color: #fff; }*/ + + /* Other */ + + .chroma .x { + } + + /* Error */ + + .chroma .err { + color: #a61717; + background-color: #e3d2d2; + } + + /* CodeLine */ + + .chroma .cl { + } + + /* LineTableTD */ + + .chroma .lntd { + vertical-align: top; + padding: 0; + margin: 0; + border: 0; + } + + /* LineTable */ + + .chroma .lntable { + border-spacing: 0; + padding: 0; + margin: 0; + border: 0; + } + + /* LineHighlight */ + + .chroma .hl { + background-color: #ffc; + } + + /* LineNumbersTable */ + + .chroma .lnt { + white-space: pre; + user-select: none; + margin-right: 0.4em; + padding: 0 0.4em; + color: #7f7f7f; + } + + /* LineNumbers */ + + .chroma .ln { + white-space: pre; + user-select: none; + margin-right: 0.4em; + padding: 0 0.4em; + color: #7f7f7f; + } + + /* Line */ + + .chroma .line { + display: flex; + } + + /* Keyword */ + + .chroma .k { + color: #000; + font-weight: bold; + } + + /* KeywordConstant */ + + .chroma .kc { + color: #000; + font-weight: bold; + } + + /* KeywordDeclaration */ + + .chroma .kd { + color: #000; + font-weight: bold; + } + + /* KeywordNamespace */ + + .chroma .kn { + color: #000; + font-weight: bold; + } + + /* KeywordPseudo */ + + .chroma .kp { + color: #000; + font-weight: bold; + } + + /* KeywordReserved */ + + .chroma .kr { + color: #000; + font-weight: bold; + } + + /* KeywordType */ + + .chroma .kt { + color: #458; + font-weight: bold; + } + + /* Name */ + + .chroma .n { + } + + /* NameAttribute */ + + .chroma .na { + color: #008080; + } + + /* NameBuiltin */ + + .chroma .nb { + color: #0086b3; + } + + /* NameBuiltinPseudo */ + + .chroma .bp { + color: #999; + } + + /* NameClass */ + + .chroma .nc { + color: #458; + font-weight: bold; + } + + /* NameConstant */ + + .chroma .no { + color: #008080; + } + + /* NameDecorator */ + + .chroma .nd { + color: #3c5d5d; + font-weight: bold; + } + + /* NameEntity */ + + .chroma .ni { + color: #800080; + } + + /* NameException */ + + .chroma .ne { + color: #900; + font-weight: bold; + } + + /* NameFunction */ + + .chroma .nf { + color: #900; + font-weight: bold; + } + + /* NameFunctionMagic */ + + .chroma .fm { + } + + /* NameLabel */ + + .chroma .nl { + color: #900; + font-weight: bold; + } + + /* NameNamespace */ + + .chroma .nn { + color: #555; + } + + /* NameOther */ + + .chroma .nx { + } + + /* NameProperty */ + + .chroma .py { + } + + /* NameTag */ + + .chroma .nt { + color: #000080; + } + + /* NameVariable */ + + .chroma .nv { + color: #008080; + } + + /* NameVariableClass */ + + .chroma .vc { + color: #008080; + } + + /* NameVariableGlobal */ + + .chroma .vg { + color: #008080; + } + + /* NameVariableInstance */ + + .chroma .vi { + color: #008080; + } + + /* NameVariableMagic */ + + .chroma .vm { + } + + /* Literal */ + + .chroma .l { + } + + /* LiteralDate */ + + .chroma .ld { + } + + /* LiteralString */ + + .chroma .s { + color: #d14; + } + + /* LiteralStringAffix */ + + .chroma .sa { + color: #d14; + } + + /* LiteralStringBacktick */ + + .chroma .sb { + color: #d14; + } + + /* LiteralStringChar */ + + .chroma .sc { + color: #d14; + } + + /* LiteralStringDelimiter */ + + .chroma .dl { + color: #d14; + } + + /* LiteralStringDoc */ + + .chroma .sd { + color: #d14; + } + + /* LiteralStringDouble */ + + .chroma .s2 { + color: #d14; + } + + /* LiteralStringEscape */ + + .chroma .se { + color: #d14; + } + + /* LiteralStringHeredoc */ + + .chroma .sh { + color: #d14; + } + + /* LiteralStringInterpol */ + + .chroma .si { + color: #d14; + } + + /* LiteralStringOther */ + + .chroma .sx { + color: #d14; + } + + /* LiteralStringRegex */ + + .chroma .sr { + color: #009926; + } + + /* LiteralStringSingle */ + + .chroma .s1 { + color: #d14; + } + + /* LiteralStringSymbol */ + + .chroma .ss { + color: #990073; + } + + /* LiteralNumber */ + + .chroma .m { + color: #099; + } + + /* LiteralNumberBin */ + + .chroma .mb { + color: #099; + } + + /* LiteralNumberFloat */ + + .chroma .mf { + color: #099; + } + + /* LiteralNumberHex */ + + .chroma .mh { + color: #099; + } + + /* LiteralNumberInteger */ + + .chroma .mi { + color: #099; + } + + /* LiteralNumberIntegerLong */ + + .chroma .il { + color: #099; + } + + /* LiteralNumberOct */ + + .chroma .mo { + color: #099; + } + + /* Operator */ + + .chroma .o { + color: #000; + font-weight: bold; + } + + /* OperatorWord */ + + .chroma .ow { + color: #000; + font-weight: bold; + } + + /* Punctuation */ + + .chroma .p { + } + + /* Comment */ + + .chroma .c { + color: #998; + font-style: italic; + } + + /* CommentHashbang */ + + .chroma .ch { + color: #998; + font-style: italic; + } + + /* CommentMultiline */ + + .chroma .cm { + color: #998; + font-style: italic; + } + + /* CommentSingle */ + + .chroma .c1 { + color: #998; + font-style: italic; + } + + /* CommentSpecial */ + + .chroma .cs { + color: #999; + font-weight: bold; + font-style: italic; + } + + /* CommentPreproc */ + + .chroma .cp { + color: #999; + font-weight: bold; + font-style: italic; + } + + /* CommentPreprocFile */ + + .chroma .cpf { + color: #999; + font-weight: bold; + font-style: italic; + } + + /* Generic */ + + .chroma .g { + } + + /* GenericDeleted */ + + .chroma .gd { + color: #000; + background-color: #fdd; + } + + /* GenericEmph */ + + .chroma .ge { + color: #000; + font-style: italic; + } + + /* GenericError */ + + .chroma .gr { + color: #a00; + } + + /* GenericHeading */ + + .chroma .gh { + color: #999; + } + + /* GenericInserted */ + + .chroma .gi { + color: #000; + background-color: #dfd; + } + + /* GenericOutput */ + + .chroma .go { + color: #888; + } + + /* GenericPrompt */ + + .chroma .gp { + color: #555; + } + + /* GenericStrong */ + + .chroma .gs { + font-weight: bold; + } + + /* GenericSubheading */ + + .chroma .gu { + color: #aaa; + } + + /* GenericTraceback */ + + .chroma .gt { + color: #a00; + } + + /* GenericUnderline */ + + .chroma .gl { + text-decoration: underline; + } + + /* TextWhitespace */ + + .chroma .w { + color: #bbb; + } +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/main.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/main.css new file mode 100644 index 0000000..503a7d9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/main.css @@ -0,0 +1,50 @@ +/* + Hugo Blox Tailwind CSS v4 - Main Entry Point + + This file orchestrates all CSS imports in the correct order: + 1. Tailwind base with configuration + 2. Theme and color definitions + 3. Base styles and utilities + 4. Hugo Blox framework components + 5. Hugo Blox module components + 6. Safelist for dynamic classes +*/ + +/* Tailwind CSS v4 Base */ +@import "tailwindcss"; + +/* Dynamic sources are injected by the css.html partial */ +/* This handles both monorepo dev and end-user environments */ + +/* Configuration */ +@import "config/tailwind.css"; +@import "config/theme.css"; + +/* Base styles and utilities */ +@import "framework/base.css"; + +/* Hugo Blox theme system (color utilities) */ +@import "color-utilities.css"; + +/* Hugo Blox layout utilities (radius, spacing tokens) */ +@import "layout-utilities.css"; + +/* Hugo Blox framework components */ +@import "framework/components.css"; + +/* Hugo Blox module components */ +@import "components/all.css"; +@import "views/all.css"; + +/* Block-specific CSS is auto-discovered from co-located style.css files */ +/* See css.html partial for the discovery mechanism */ +@import "chroma.css"; + +/* Hugo Blox Search */ +@import "hb-search.css"; + +/* Hugo Blox Animations (typewriter, scroll reveals) */ +@import "animations.css"; + +/* Safelist for dynamic classes */ +@import "config/safelist.css"; diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/amber.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/amber.css new file mode 100644 index 0000000..56406ea --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/amber.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: AMBER */ +:root { + /* Amber Primary Palette */ + --hb-primary-50-rgb: 255 251 235; + --hb-primary-100-rgb: 254 243 199; + --hb-primary-200-rgb: 253 230 138; + --hb-primary-300-rgb: 252 211 77; + --hb-primary-400-rgb: 251 191 36; + --hb-primary-500-rgb: 245 158 11; + --hb-primary-600-rgb: 217 119 6; + --hb-primary-700-rgb: 180 83 9; + --hb-primary-800-rgb: 146 64 14; + --hb-primary-900-rgb: 120 53 15; + --hb-primary-950-rgb: 69 26 3; + /* Yellow Secondary Palette */ + --hb-secondary-50-rgb: 254 252 232; + --hb-secondary-100-rgb: 254 249 195; + --hb-secondary-200-rgb: 254 240 138; + --hb-secondary-300-rgb: 253 224 71; + --hb-secondary-400-rgb: 250 204 21; + --hb-secondary-500-rgb: 234 179 8; + --hb-secondary-600-rgb: 202 138 4; + --hb-secondary-700-rgb: 161 98 7; + --hb-secondary-800-rgb: 133 77 14; + --hb-secondary-900-rgb: 113 63 18; + --hb-secondary-950-rgb: 66 32 6; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/blue.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/blue.css new file mode 100644 index 0000000..c502f5a --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/blue.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: BLUE */ +:root { + /* TW Blue Palette */ + --hb-primary-50-rgb: 239 246 255; + --hb-primary-100-rgb: 219 234 254; + --hb-primary-200-rgb: 191 219 254; + --hb-primary-300-rgb: 147 197 253; + --hb-primary-400-rgb: 96 165 250; + --hb-primary-500-rgb: 59 130 246; + --hb-primary-600-rgb: 37 99 235; + --hb-primary-700-rgb: 29 78 216; + --hb-primary-800-rgb: 30 64 175; + --hb-primary-900-rgb: 30 58 138; + --hb-primary-950-rgb: 23 37 84; + /* TW Cyan Palette */ + --hb-secondary-50-rgb: 236 254 255; + --hb-secondary-100-rgb: 207 250 254; + --hb-secondary-200-rgb: 165 243 252; + --hb-secondary-300-rgb: 103 232 249; + --hb-secondary-400-rgb: 34 211 238; + --hb-secondary-500-rgb: 6 182 212; + --hb-secondary-600-rgb: 8 145 178; + --hb-secondary-700-rgb: 14 116 144; + --hb-secondary-800-rgb: 21 94 117; + --hb-secondary-900-rgb: 22 78 99; + --hb-secondary-950-rgb: 8 51 68; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/cyan.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/cyan.css new file mode 100644 index 0000000..56eaf1a --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/cyan.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: CYAN */ +:root { + /* Cyan Primary Palette */ + --hb-primary-50-rgb: 236 254 255; + --hb-primary-100-rgb: 207 250 254; + --hb-primary-200-rgb: 165 243 252; + --hb-primary-300-rgb: 103 232 249; + --hb-primary-400-rgb: 34 211 238; + --hb-primary-500-rgb: 6 182 212; + --hb-primary-600-rgb: 8 145 178; + --hb-primary-700-rgb: 14 116 144; + --hb-primary-800-rgb: 21 94 117; + --hb-primary-900-rgb: 22 78 99; + --hb-primary-950-rgb: 8 51 68; + /* Sky Secondary Palette */ + --hb-secondary-50-rgb: 240 249 255; + --hb-secondary-100-rgb: 224 242 254; + --hb-secondary-200-rgb: 186 230 253; + --hb-secondary-300-rgb: 125 211 252; + --hb-secondary-400-rgb: 56 189 248; + --hb-secondary-500-rgb: 14 165 233; + --hb-secondary-600-rgb: 2 132 199; + --hb-secondary-700-rgb: 3 105 161; + --hb-secondary-800-rgb: 7 89 133; + --hb-secondary-900-rgb: 12 74 110; + --hb-secondary-950-rgb: 8 47 73; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/emerald.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/emerald.css new file mode 100644 index 0000000..4b171bd --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/emerald.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: EMERALD */ +:root { + /* Emerald Primary Palette */ + --hb-primary-50-rgb: 236 253 245; + --hb-primary-100-rgb: 209 250 229; + --hb-primary-200-rgb: 167 243 208; + --hb-primary-300-rgb: 110 231 183; + --hb-primary-400-rgb: 52 211 153; + --hb-primary-500-rgb: 16 185 129; + --hb-primary-600-rgb: 5 150 105; + --hb-primary-700-rgb: 4 120 87; + --hb-primary-800-rgb: 6 95 70; + --hb-primary-900-rgb: 6 78 59; + --hb-primary-950-rgb: 2 44 34; + /* Green Secondary Palette */ + --hb-secondary-50-rgb: 240 253 244; + --hb-secondary-100-rgb: 220 252 231; + --hb-secondary-200-rgb: 187 247 208; + --hb-secondary-300-rgb: 134 239 172; + --hb-secondary-400-rgb: 74 222 128; + --hb-secondary-500-rgb: 34 197 94; + --hb-secondary-600-rgb: 22 163 74; + --hb-secondary-700-rgb: 21 128 61; + --hb-secondary-800-rgb: 22 101 52; + --hb-secondary-900-rgb: 20 83 45; + --hb-secondary-950-rgb: 5 46 22; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/fuchsia.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/fuchsia.css new file mode 100644 index 0000000..971b223 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/fuchsia.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: FUCHSIA */ +:root { + /* Fuchsia Primary Palette */ + --hb-primary-50-rgb: 253 244 255; + --hb-primary-100-rgb: 250 232 255; + --hb-primary-200-rgb: 245 208 254; + --hb-primary-300-rgb: 240 171 252; + --hb-primary-400-rgb: 232 121 249; + --hb-primary-500-rgb: 217 70 239; + --hb-primary-600-rgb: 192 38 211; + --hb-primary-700-rgb: 162 28 175; + --hb-primary-800-rgb: 134 25 143; + --hb-primary-900-rgb: 112 26 117; + --hb-primary-950-rgb: 74 4 78; + /* Violet Secondary Palette */ + --hb-secondary-50-rgb: 245 243 255; + --hb-secondary-100-rgb: 237 233 254; + --hb-secondary-200-rgb: 221 214 254; + --hb-secondary-300-rgb: 196 181 253; + --hb-secondary-400-rgb: 167 139 250; + --hb-secondary-500-rgb: 139 92 246; + --hb-secondary-600-rgb: 124 58 237; + --hb-secondary-700-rgb: 109 40 217; + --hb-secondary-800-rgb: 91 33 182; + --hb-secondary-900-rgb: 76 29 149; + --hb-secondary-950-rgb: 46 16 101; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/green.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/green.css new file mode 100644 index 0000000..72ac962 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/green.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: GREEN */ +:root { + /* Green Primary Palette */ + --hb-primary-50-rgb: 240 253 244; + --hb-primary-100-rgb: 220 252 231; + --hb-primary-200-rgb: 187 247 208; + --hb-primary-300-rgb: 134 239 172; + --hb-primary-400-rgb: 74 222 128; + --hb-primary-500-rgb: 34 197 94; + --hb-primary-600-rgb: 22 163 74; + --hb-primary-700-rgb: 21 128 61; + --hb-primary-800-rgb: 22 101 52; + --hb-primary-900-rgb: 20 83 45; + --hb-primary-950-rgb: 5 46 22; + /* Teal Secondary Palette */ + --hb-secondary-50-rgb: 240 253 250; + --hb-secondary-100-rgb: 204 251 241; + --hb-secondary-200-rgb: 153 246 228; + --hb-secondary-300-rgb: 94 234 212; + --hb-secondary-400-rgb: 45 212 191; + --hb-secondary-500-rgb: 20 184 166; + --hb-secondary-600-rgb: 13 148 136; + --hb-secondary-700-rgb: 15 118 110; + --hb-secondary-800-rgb: 17 94 89; + --hb-secondary-900-rgb: 19 78 74; + --hb-secondary-950-rgb: 4 47 46; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/indigo.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/indigo.css new file mode 100644 index 0000000..ac731d9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/indigo.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: INDIGO */ +:root { + /* Indigo Primary Palette */ + --hb-primary-50-rgb: 238 242 255; + --hb-primary-100-rgb: 224 231 255; + --hb-primary-200-rgb: 199 210 254; + --hb-primary-300-rgb: 165 180 252; + --hb-primary-400-rgb: 129 140 248; + --hb-primary-500-rgb: 99 102 241; + --hb-primary-600-rgb: 79 70 229; + --hb-primary-700-rgb: 67 56 202; + --hb-primary-800-rgb: 55 48 163; + --hb-primary-900-rgb: 49 46 129; + --hb-primary-950-rgb: 30 27 75; + /* Blue Secondary Palette */ + --hb-secondary-50-rgb: 239 246 255; + --hb-secondary-100-rgb: 219 234 254; + --hb-secondary-200-rgb: 191 219 254; + --hb-secondary-300-rgb: 147 197 253; + --hb-secondary-400-rgb: 96 165 250; + --hb-secondary-500-rgb: 59 130 246; + --hb-secondary-600-rgb: 37 99 235; + --hb-secondary-700-rgb: 29 78 216; + --hb-secondary-800-rgb: 30 64 175; + --hb-secondary-900-rgb: 30 58 138; + --hb-secondary-950-rgb: 23 37 84; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/lime.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/lime.css new file mode 100644 index 0000000..d72eae5 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/lime.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: LIME */ +:root { + /* Lime Primary Palette */ + --hb-primary-50-rgb: 247 254 231; + --hb-primary-100-rgb: 236 252 203; + --hb-primary-200-rgb: 217 249 157; + --hb-primary-300-rgb: 190 242 100; + --hb-primary-400-rgb: 163 230 53; + --hb-primary-500-rgb: 132 204 22; + --hb-primary-600-rgb: 101 163 13; + --hb-primary-700-rgb: 77 124 15; + --hb-primary-800-rgb: 63 98 18; + --hb-primary-900-rgb: 54 83 20; + --hb-primary-950-rgb: 26 46 5; + /* Yellow Secondary Palette */ + --hb-secondary-50-rgb: 254 252 232; + --hb-secondary-100-rgb: 254 249 195; + --hb-secondary-200-rgb: 254 240 138; + --hb-secondary-300-rgb: 253 224 71; + --hb-secondary-400-rgb: 250 204 21; + --hb-secondary-500-rgb: 234 179 8; + --hb-secondary-600-rgb: 202 138 4; + --hb-secondary-700-rgb: 161 98 7; + --hb-secondary-800-rgb: 133 77 14; + --hb-secondary-900-rgb: 113 63 18; + --hb-secondary-950-rgb: 66 32 6; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/orange.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/orange.css new file mode 100644 index 0000000..5a96ea0 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/orange.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: ORANGE */ +:root { + /* Orange Primary Palette */ + --hb-primary-50-rgb: 255 247 237; + --hb-primary-100-rgb: 255 237 213; + --hb-primary-200-rgb: 254 215 170; + --hb-primary-300-rgb: 253 186 116; + --hb-primary-400-rgb: 251 146 60; + --hb-primary-500-rgb: 249 115 22; + --hb-primary-600-rgb: 234 88 12; + --hb-primary-700-rgb: 194 65 12; + --hb-primary-800-rgb: 154 52 18; + --hb-primary-900-rgb: 124 45 18; + --hb-primary-950-rgb: 67 20 7; + /* Red Secondary Palette */ + --hb-secondary-50-rgb: 254 242 242; + --hb-secondary-100-rgb: 254 226 226; + --hb-secondary-200-rgb: 254 202 202; + --hb-secondary-300-rgb: 252 165 165; + --hb-secondary-400-rgb: 248 113 113; + --hb-secondary-500-rgb: 239 68 68; + --hb-secondary-600-rgb: 220 38 38; + --hb-secondary-700-rgb: 185 28 28; + --hb-secondary-800-rgb: 153 27 27; + --hb-secondary-900-rgb: 127 29 29; + --hb-secondary-950-rgb: 69 10 10; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/pink.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/pink.css new file mode 100644 index 0000000..1b74ad2 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/pink.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: PINK */ +:root { + /* Pink Primary Palette */ + --hb-primary-50-rgb: 253 242 248; + --hb-primary-100-rgb: 252 231 243; + --hb-primary-200-rgb: 251 207 232; + --hb-primary-300-rgb: 249 168 212; + --hb-primary-400-rgb: 244 114 182; + --hb-primary-500-rgb: 236 72 153; + --hb-primary-600-rgb: 219 39 119; + --hb-primary-700-rgb: 190 24 93; + --hb-primary-800-rgb: 157 23 77; + --hb-primary-900-rgb: 131 24 67; + --hb-primary-950-rgb: 80 7 36; + /* Rose Secondary Palette */ + --hb-secondary-50-rgb: 255 241 242; + --hb-secondary-100-rgb: 255 228 230; + --hb-secondary-200-rgb: 254 205 211; + --hb-secondary-300-rgb: 253 164 175; + --hb-secondary-400-rgb: 251 113 133; + --hb-secondary-500-rgb: 244 63 94; + --hb-secondary-600-rgb: 225 29 72; + --hb-secondary-700-rgb: 190 18 60; + --hb-secondary-800-rgb: 159 18 57; + --hb-secondary-900-rgb: 136 19 55; + --hb-secondary-950-rgb: 76 5 25; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/purple.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/purple.css new file mode 100644 index 0000000..25e15d2 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/purple.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: PURPLE */ +:root { + /* Purple Primary Palette */ + --hb-primary-50-rgb: 250 245 255; + --hb-primary-100-rgb: 243 232 255; + --hb-primary-200-rgb: 233 213 255; + --hb-primary-300-rgb: 216 180 254; + --hb-primary-400-rgb: 192 132 252; + --hb-primary-500-rgb: 168 85 247; + --hb-primary-600-rgb: 147 51 234; + --hb-primary-700-rgb: 126 34 206; + --hb-primary-800-rgb: 107 33 168; + --hb-primary-900-rgb: 88 28 135; + --hb-primary-950-rgb: 59 7 100; + /* Violet Secondary Palette */ + --hb-secondary-50-rgb: 245 243 255; + --hb-secondary-100-rgb: 237 233 254; + --hb-secondary-200-rgb: 221 214 254; + --hb-secondary-300-rgb: 196 181 253; + --hb-secondary-400-rgb: 167 139 250; + --hb-secondary-500-rgb: 139 92 246; + --hb-secondary-600-rgb: 124 58 237; + --hb-secondary-700-rgb: 109 40 217; + --hb-secondary-800-rgb: 91 33 182; + --hb-secondary-900-rgb: 76 29 149; + --hb-secondary-950-rgb: 46 16 101; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/red.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/red.css new file mode 100644 index 0000000..037ce2b --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/red.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: RED */ +:root { + /* Red Primary Palette */ + --hb-primary-50-rgb: 254 242 242; + --hb-primary-100-rgb: 254 226 226; + --hb-primary-200-rgb: 254 202 202; + --hb-primary-300-rgb: 252 165 165; + --hb-primary-400-rgb: 248 113 113; + --hb-primary-500-rgb: 239 68 68; + --hb-primary-600-rgb: 220 38 38; + --hb-primary-700-rgb: 185 28 28; + --hb-primary-800-rgb: 153 27 27; + --hb-primary-900-rgb: 127 29 29; + --hb-primary-950-rgb: 69 10 10; + /* Orange Secondary Palette */ + --hb-secondary-50-rgb: 255 247 237; + --hb-secondary-100-rgb: 255 237 213; + --hb-secondary-200-rgb: 254 215 170; + --hb-secondary-300-rgb: 253 186 116; + --hb-secondary-400-rgb: 251 146 60; + --hb-secondary-500-rgb: 249 115 22; + --hb-secondary-600-rgb: 234 88 12; + --hb-secondary-700-rgb: 194 65 12; + --hb-secondary-800-rgb: 154 52 18; + --hb-secondary-900-rgb: 124 45 18; + --hb-secondary-950-rgb: 67 20 7; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/rose.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/rose.css new file mode 100644 index 0000000..c464663 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/rose.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: ROSE */ +:root { + /* Rose Primary Palette */ + --hb-primary-50-rgb: 255 241 242; + --hb-primary-100-rgb: 255 228 230; + --hb-primary-200-rgb: 254 205 211; + --hb-primary-300-rgb: 253 164 175; + --hb-primary-400-rgb: 251 113 133; + --hb-primary-500-rgb: 244 63 94; + --hb-primary-600-rgb: 225 29 72; + --hb-primary-700-rgb: 190 18 60; + --hb-primary-800-rgb: 159 18 57; + --hb-primary-900-rgb: 136 19 55; + --hb-primary-950-rgb: 76 5 25; + /* Pink Secondary Palette */ + --hb-secondary-50-rgb: 253 242 248; + --hb-secondary-100-rgb: 252 231 243; + --hb-secondary-200-rgb: 251 207 232; + --hb-secondary-300-rgb: 249 168 212; + --hb-secondary-400-rgb: 244 114 182; + --hb-secondary-500-rgb: 236 72 153; + --hb-secondary-600-rgb: 219 39 119; + --hb-secondary-700-rgb: 190 24 93; + --hb-secondary-800-rgb: 157 23 77; + --hb-secondary-900-rgb: 131 24 67; + --hb-secondary-950-rgb: 80 7 36; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/sky.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/sky.css new file mode 100644 index 0000000..d4db5f9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/sky.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: SKY */ +:root { + /* Sky Primary Palette */ + --hb-primary-50-rgb: 240 249 255; + --hb-primary-100-rgb: 224 242 254; + --hb-primary-200-rgb: 186 230 253; + --hb-primary-300-rgb: 125 211 252; + --hb-primary-400-rgb: 56 189 248; + --hb-primary-500-rgb: 14 165 233; + --hb-primary-600-rgb: 2 132 199; + --hb-primary-700-rgb: 3 105 161; + --hb-primary-800-rgb: 7 89 133; + --hb-primary-900-rgb: 12 74 110; + --hb-primary-950-rgb: 8 47 73; + /* Cyan Secondary Palette */ + --hb-secondary-50-rgb: 236 254 255; + --hb-secondary-100-rgb: 207 250 254; + --hb-secondary-200-rgb: 165 243 252; + --hb-secondary-300-rgb: 103 232 249; + --hb-secondary-400-rgb: 34 211 238; + --hb-secondary-500-rgb: 6 182 212; + --hb-secondary-600-rgb: 8 145 178; + --hb-secondary-700-rgb: 14 116 144; + --hb-secondary-800-rgb: 21 94 117; + --hb-secondary-900-rgb: 22 78 99; + --hb-secondary-950-rgb: 8 51 68; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/slate.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/slate.css new file mode 100644 index 0000000..4c85e12 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/slate.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: SLATE */ +:root { + /* Slate Primary Palette */ + --hb-primary-50-rgb: 248 250 252; + --hb-primary-100-rgb: 241 245 249; + --hb-primary-200-rgb: 226 232 240; + --hb-primary-300-rgb: 203 213 225; + --hb-primary-400-rgb: 148 163 184; + --hb-primary-500-rgb: 100 116 139; + --hb-primary-600-rgb: 71 85 105; + --hb-primary-700-rgb: 51 65 85; + --hb-primary-800-rgb: 30 41 59; + --hb-primary-900-rgb: 15 23 42; + --hb-primary-950-rgb: 2 6 23; + /* Stone Secondary Palette */ + --hb-secondary-50-rgb: 250 250 249; + --hb-secondary-100-rgb: 245 245 244; + --hb-secondary-200-rgb: 231 229 228; + --hb-secondary-300-rgb: 214 211 209; + --hb-secondary-400-rgb: 168 162 158; + --hb-secondary-500-rgb: 120 113 108; + --hb-secondary-600-rgb: 87 83 78; + --hb-secondary-700-rgb: 68 64 60; + --hb-secondary-800-rgb: 41 37 36; + --hb-secondary-900-rgb: 28 25 23; + --hb-secondary-950-rgb: 12 10 9; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/stone.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/stone.css new file mode 100644 index 0000000..30044f8 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/stone.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: STONE */ +:root { + /* Stone Primary Palette */ + --hb-primary-50-rgb: 250 250 249; + --hb-primary-100-rgb: 245 245 244; + --hb-primary-200-rgb: 231 229 228; + --hb-primary-300-rgb: 214 211 209; + --hb-primary-400-rgb: 168 162 158; + --hb-primary-500-rgb: 120 113 108; + --hb-primary-600-rgb: 87 83 78; + --hb-primary-700-rgb: 68 64 60; + --hb-primary-800-rgb: 41 37 36; + --hb-primary-900-rgb: 28 25 23; + --hb-primary-950-rgb: 12 10 9; + /* Slate Secondary Palette */ + --hb-secondary-50-rgb: 248 250 252; + --hb-secondary-100-rgb: 241 245 249; + --hb-secondary-200-rgb: 226 232 240; + --hb-secondary-300-rgb: 203 213 225; + --hb-secondary-400-rgb: 148 163 184; + --hb-secondary-500-rgb: 100 116 139; + --hb-secondary-600-rgb: 71 85 105; + --hb-secondary-700-rgb: 51 65 85; + --hb-secondary-800-rgb: 30 41 59; + --hb-secondary-900-rgb: 15 23 42; + --hb-secondary-950-rgb: 2 6 23; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/teal.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/teal.css new file mode 100644 index 0000000..5b9e885 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/teal.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: TEAL */ +:root { + /* Teal Primary Palette */ + --hb-primary-50-rgb: 240 253 250; + --hb-primary-100-rgb: 204 251 241; + --hb-primary-200-rgb: 153 246 228; + --hb-primary-300-rgb: 94 234 212; + --hb-primary-400-rgb: 45 212 191; + --hb-primary-500-rgb: 20 184 166; + --hb-primary-600-rgb: 13 148 136; + --hb-primary-700-rgb: 15 118 110; + --hb-primary-800-rgb: 17 94 89; + --hb-primary-900-rgb: 19 78 74; + --hb-primary-950-rgb: 4 47 46; + /* Emerald Secondary Palette */ + --hb-secondary-50-rgb: 236 253 245; + --hb-secondary-100-rgb: 209 250 229; + --hb-secondary-200-rgb: 167 243 208; + --hb-secondary-300-rgb: 110 231 183; + --hb-secondary-400-rgb: 52 211 153; + --hb-secondary-500-rgb: 16 185 129; + --hb-secondary-600-rgb: 5 150 105; + --hb-secondary-700-rgb: 4 120 87; + --hb-secondary-800-rgb: 6 95 70; + --hb-secondary-900-rgb: 6 78 59; + --hb-secondary-950-rgb: 2 44 34; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/violet.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/violet.css new file mode 100644 index 0000000..7e13127 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/violet.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: VIOLET */ +:root { + /* Violet Primary Palette */ + --hb-primary-50-rgb: 245 243 255; + --hb-primary-100-rgb: 237 233 254; + --hb-primary-200-rgb: 221 214 254; + --hb-primary-300-rgb: 196 181 253; + --hb-primary-400-rgb: 167 139 250; + --hb-primary-500-rgb: 139 92 246; + --hb-primary-600-rgb: 124 58 237; + --hb-primary-700-rgb: 109 40 217; + --hb-primary-800-rgb: 91 33 182; + --hb-primary-900-rgb: 76 29 149; + --hb-primary-950-rgb: 46 16 101; + /* Fuchsia Secondary Palette */ + --hb-secondary-50-rgb: 253 244 255; + --hb-secondary-100-rgb: 250 232 255; + --hb-secondary-200-rgb: 245 208 254; + --hb-secondary-300-rgb: 240 171 252; + --hb-secondary-400-rgb: 232 121 249; + --hb-secondary-500-rgb: 217 70 239; + --hb-secondary-600-rgb: 192 38 211; + --hb-secondary-700-rgb: 162 28 175; + --hb-secondary-800-rgb: 134 25 143; + --hb-secondary-900-rgb: 112 26 117; + --hb-secondary-950-rgb: 74 4 78; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/yellow.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/yellow.css new file mode 100644 index 0000000..39714ae --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/yellow.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: YELLOW */ +:root { + /* Yellow Primary Palette */ + --hb-primary-50-rgb: 254 252 232; + --hb-primary-100-rgb: 254 249 195; + --hb-primary-200-rgb: 254 240 138; + --hb-primary-300-rgb: 253 224 71; + --hb-primary-400-rgb: 250 204 21; + --hb-primary-500-rgb: 234 179 8; + --hb-primary-600-rgb: 202 138 4; + --hb-primary-700-rgb: 161 98 7; + --hb-primary-800-rgb: 133 77 14; + --hb-primary-900-rgb: 113 63 18; + --hb-primary-950-rgb: 66 32 6; + /* Amber Secondary Palette */ + --hb-secondary-50-rgb: 255 251 235; + --hb-secondary-100-rgb: 254 243 199; + --hb-secondary-200-rgb: 253 230 138; + --hb-secondary-300-rgb: 252 211 77; + --hb-secondary-400-rgb: 251 191 36; + --hb-secondary-500-rgb: 245 158 11; + --hb-secondary-600-rgb: 217 119 6; + --hb-secondary-700-rgb: 180 83 9; + --hb-secondary-800-rgb: 146 64 14; + --hb-secondary-900-rgb: 120 53 15; + --hb-secondary-950-rgb: 69 26 3; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/zinc.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/zinc.css new file mode 100644 index 0000000..f727ace --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/themes/zinc.css @@ -0,0 +1,27 @@ +/* Hugo Blox color theme: ZINC */ +:root { + /* Zinc Primary Palette */ + --hb-primary-50-rgb: 250 250 250; + --hb-primary-100-rgb: 244 244 245; + --hb-primary-200-rgb: 228 228 231; + --hb-primary-300-rgb: 212 212 216; + --hb-primary-400-rgb: 161 161 170; + --hb-primary-500-rgb: 113 113 122; + --hb-primary-600-rgb: 82 82 91; + --hb-primary-700-rgb: 63 63 70; + --hb-primary-800-rgb: 39 39 42; + --hb-primary-900-rgb: 24 24 27; + --hb-primary-950-rgb: 9 9 11; + /* Slate Secondary Palette */ + --hb-secondary-50-rgb: 248 250 252; + --hb-secondary-100-rgb: 241 245 249; + --hb-secondary-200-rgb: 226 232 240; + --hb-secondary-300-rgb: 203 213 225; + --hb-secondary-400-rgb: 148 163 184; + --hb-secondary-500-rgb: 100 116 139; + --hb-secondary-600-rgb: 71 85 105; + --hb-secondary-700-rgb: 51 65 85; + --hb-secondary-800-rgb: 30 41 59; + --hb-secondary-900-rgb: 15 23 42; + --hb-secondary-950-rgb: 2 6 23; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/views/all.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/views/all.css new file mode 100644 index 0000000..283d09d --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/views/all.css @@ -0,0 +1 @@ +@import "attachments.css"; diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/views/attachments.css b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/views/attachments.css new file mode 100644 index 0000000..d8f682c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/css/views/attachments.css @@ -0,0 +1,28 @@ +.hb-attachment-link { + @apply inline-block font-semibold uppercase outline-none mr-4 mb-1.5 transition-all text-sm tracking-wide focus:outline-none; + + color: var(--color-primary-600); +} + +.hb-attachment-link:hover { + color: var(--color-primary-700); + text-decoration: underline; +} + +.dark .hb-attachment-link { + color: var(--color-primary-400); +} + +.dark .hb-attachment-link:hover { + color: var(--color-primary-300); +} + +/* Small links - used in list views */ +.hb-attachment-link-small { + @apply p-0 text-xs; +} + +/* Large links - used on single pages */ +.hb-attachment-link-large { + @apply p-0 text-sm; +} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/font/Inter.var.woff2 b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/font/Inter.var.woff2 new file mode 100644 index 0000000..365eedc Binary files /dev/null and b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/font/Inter.var.woff2 differ diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/font/JetBrainsMono.var.ttf b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/font/JetBrainsMono.var.ttf new file mode 100644 index 0000000..4c96e79 Binary files /dev/null and b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/font/JetBrainsMono.var.ttf differ diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/lib/alpinejs/cdn.min.js b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/lib/alpinejs/cdn.min.js new file mode 100644 index 0000000..0acdcef --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/assets/dist/lib/alpinejs/cdn.min.js @@ -0,0 +1,5 @@ +(()=>{var nt=!1,it=!1,W=[],ot=-1;function Ut(e){Rn(e)}function Rn(e){W.includes(e)||W.push(e),Mn()}function Wt(e){let t=W.indexOf(e);t!==-1&&t>ot&&W.splice(t,1)}function Mn(){!it&&!nt&&(nt=!0,queueMicrotask(Nn))}function Nn(){nt=!1,it=!0;for(let e=0;ee.effect(t,{scheduler:r=>{st?Ut(r):r()}}),at=e.raw}function ct(e){N=e}function Yt(e){let t=()=>{};return[n=>{let i=N(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),$(i))},i},()=>{t()}]}function ve(e,t){let r=!0,n,i=N(()=>{let o=e();JSON.stringify(o),r?n=o:queueMicrotask(()=>{t(o,n),n=o}),r=!1});return()=>$(i)}var Xt=[],Zt=[],Qt=[];function er(e){Qt.push(e)}function te(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Zt.push(t))}function Ae(e){Xt.push(e)}function Oe(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function lt(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&(n.forEach(i=>i()),delete e._x_attributeCleanups[r])})}function tr(e){for(e._x_effects?.forEach(Wt);e._x_cleanups?.length;)e._x_cleanups.pop()()}var ut=new MutationObserver(mt),ft=!1;function ue(){ut.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),ft=!0}function dt(){kn(),ut.disconnect(),ft=!1}var le=[];function kn(){let e=ut.takeRecords();le.push(()=>e.length>0&&mt(e));let t=le.length;queueMicrotask(()=>{if(le.length===t)for(;le.length>0;)le.shift()()})}function m(e){if(!ft)return e();dt();let t=e();return ue(),t}var pt=!1,Se=[];function rr(){pt=!0}function nr(){pt=!1,mt(Se),Se=[]}function mt(e){if(pt){Se=Se.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let o=0;o{s.nodeType===1&&s._x_marker&&r.add(s)}),e[o].addedNodes.forEach(s=>{if(s.nodeType===1){if(r.has(s)){r.delete(s);return}s._x_marker||t.push(s)}})),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,c=e[o].oldValue,l=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},u=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&c===null?l():s.hasAttribute(a)?(u(),l()):u()}i.forEach((o,s)=>{lt(s,o)}),n.forEach((o,s)=>{Xt.forEach(a=>a(s,o))});for(let o of r)t.some(s=>s.contains(o))||Zt.forEach(s=>s(o));for(let o of t)o.isConnected&&Qt.forEach(s=>s(o));t=null,r=null,n=null,i=null}function Ce(e){return z(B(e))}function k(e,t,r){return e._x_dataStack=[t,...B(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function B(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?B(e.host):e.parentNode?B(e.parentNode):[]}function z(e){return new Proxy({objects:e},Dn)}var Dn={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(t=>Object.keys(t))))},has({objects:e},t){return t==Symbol.unscopables?!1:e.some(r=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){return t=="toJSON"?Pn:Reflect.get(e.find(n=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i=e.find(s=>Object.prototype.hasOwnProperty.call(s,t))||e[e.length-1],o=Object.getOwnPropertyDescriptor(i,t);return o?.set&&o?.get?o.set.call(n,r)||!0:Reflect.set(i,t,r)}};function Pn(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function Te(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0||typeof s=="object"&&s!==null&&s.__v_skip)return;let c=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,c,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,c)})};return r(e)}function Re(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>In(n,i),s=>ht(n,i,s),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let c=n.initialize(o,s,a);return r.initialValue=c,i(o,s,a)}}else r.initialValue=n;return r}}function In(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function ht(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),ht(e[t[0]],t.slice(1),r)}}var ir={};function y(e,t){ir[e]=t}function fe(e,t){let r=Ln(t);return Object.entries(ir).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Ln(e){let[t,r]=_t(e),n={interceptor:Re,...t};return te(e,r),n}function or(e,t,r,...n){try{return r(...n)}catch(i){re(i,e,t)}}function re(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message} + +${r?'Expression: "'+r+`" + +`:""}`,t),setTimeout(()=>{throw e},0)}var Me=!0;function ke(e){let t=Me;Me=!1;let r=e();return Me=t,r}function R(e,t,r={}){let n;return x(e,t)(i=>n=i,r),n}function x(...e){return sr(...e)}var sr=xt;function ar(e){sr=e}function xt(e,t){let r={};fe(r,e);let n=[r,...B(e)],i=typeof t=="function"?$n(n,t):Fn(n,t,e);return or.bind(null,e,t,i)}function $n(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{let s=t.apply(z([n,...e]),i);Ne(r,s)}}var gt={};function jn(e,t){if(gt[e])return gt[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,o=(()=>{try{let s=new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`);return Object.defineProperty(s,"name",{value:`[Alpine] ${e}`}),s}catch(s){return re(s,t,e),Promise.resolve()}})();return gt[e]=o,o}function Fn(e,t,r){let n=jn(t,r);return(i=()=>{},{scope:o={},params:s=[],context:a}={})=>{n.result=void 0,n.finished=!1;let c=z([o,...e]);if(typeof n=="function"){let l=n.call(a,n,c).catch(u=>re(u,r,t));n.finished?(Ne(i,n.result,c,s,r),n.result=void 0):l.then(u=>{Ne(i,u,c,s,r)}).catch(u=>re(u,r,t)).finally(()=>n.result=void 0)}}}function Ne(e,t,r,n,i){if(Me&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>Ne(e,s,r,n)).catch(s=>re(s,i,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var wt="x-";function C(e=""){return wt+e}function cr(e){wt=e}var De={};function d(e,t){return De[e]=t,{before(r){if(!De[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=G.indexOf(r);G.splice(n>=0?n:G.indexOf("DEFAULT"),0,e)}}}function lr(e){return Object.keys(De).includes(e)}function pe(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,c])=>({name:a,value:c})),s=Et(o);o=o.map(a=>s.find(c=>c.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(o)}let n={};return t.map(dr((o,s)=>n[o]=s)).filter(mr).map(zn(n,r)).sort(Kn).map(o=>Bn(e,o))}function Et(e){return Array.from(e).map(dr()).filter(t=>!mr(t))}var yt=!1,de=new Map,ur=Symbol();function fr(e){yt=!0;let t=Symbol();ur=t,de.set(t,[]);let r=()=>{for(;de.get(t).length;)de.get(t).shift()();de.delete(t)},n=()=>{yt=!1,r()};e(r),n()}function _t(e){let t=[],r=a=>t.push(a),[n,i]=Yt(e);return t.push(i),[{Alpine:K,effect:n,cleanup:r,evaluateLater:x.bind(x,e),evaluate:R.bind(R,e)},()=>t.forEach(a=>a())]}function Bn(e,t){let r=()=>{},n=De[t.type]||r,[i,o]=_t(e);Oe(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),yt?de.get(ur).push(n):n())};return s.runCleanups=o,s}var Pe=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Ie=e=>e;function dr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=pr.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var pr=[];function ne(e){pr.push(e)}function mr({name:e}){return hr().test(e)}var hr=()=>new RegExp(`^${wt}([^:^.]+)\\b`);function zn(e,t){return({name:r,value:n})=>{let i=r.match(hr()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(c=>c.replace(".","")),expression:n,original:a}}}var bt="DEFAULT",G=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",bt,"teleport"];function Kn(e,t){let r=G.indexOf(e.type)===-1?bt:e.type,n=G.indexOf(t.type)===-1?bt:t.type;return G.indexOf(r)-G.indexOf(n)}function J(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}function D(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>D(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)D(n,t,!1),n=n.nextElementSibling}function E(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var _r=!1;function gr(){_r&&E("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),_r=!0,document.body||E("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` + +comments powered by Disqus +{{end}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/comments/giscus.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/comments/giscus.html new file mode 100644 index 0000000..de83e17 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/comments/giscus.html @@ -0,0 +1,19 @@ +{{ if site.Params.hugoblox.comments.giscus }} + {{ $config := site.Params.hugoblox.comments.giscus }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/backlinks.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/backlinks.html new file mode 100644 index 0000000..ec0e779 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/backlinks.html @@ -0,0 +1,22 @@ +{{ $show_backlinks := .Params.backlinks | default true }} +{{ if $show_backlinks }} + {{ $defer_globals := (dict "page" . )}} + {{ with (templates.Defer (dict "data" $defer_globals )) }} + {{ $backlinks := (site.Home.Store.Get "backlinks" | uniq) | default dict }} + {{ with (where $backlinks "links_to" .page.RelPermalink) }} + + {{ end }} + {{ end }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/breadcrumb.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/breadcrumb.html new file mode 100644 index 0000000..a80fda8 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/breadcrumb.html @@ -0,0 +1,13 @@ +
+ {{- range .Ancestors.Reverse }} + {{- if not .IsHome }} + + {{- partial "functions/get_icon.html" (dict "name" "chevron-right" "attributes" "class=\"w-3.5 shrink-0\"") -}} + {{ end -}} + {{ end -}} +
+ {{- .LinkTitle -}} +
+
diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/cover.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/cover.html new file mode 100644 index 0000000..ff2a16c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/cover.html @@ -0,0 +1,225 @@ +{{/* Article Cover Component - Notion-inspired page cover with icon overlay */}} +{{/* Requires: page context */}} + +{{ $cover := partial "functions/get_cover_image.html" . }} +{{ if $cover }} + +{{/* Get cover configuration with defaults */}} +{{ $cover_config := .Params.cover | default (dict) }} +{{ if not (reflect.IsMap $cover_config) }} + {{/* Simple string format: cover: "image.jpg" */}} + {{ $cover_config = dict "image" $cover_config }} +{{ end }} + +{{/* Default alt text to page title if not specified */}} +{{ $alt_text := $cover_config.alt_text | default (.Title | plainify) }} + +{{/* Height configuration */}} +{{ $height_map := dict + "small" "200px" + "medium" "320px" + "large" "480px" + "full" "60vh" +}} +{{ $height := index $height_map ($cover_config.height | default "medium") | default "320px" }} + +{{/* Style configuration */}} +{{ $style := $cover_config.style | default "gradient" }} + +{{/* Position configuration */}} +{{ $position := $cover_config.position | default (dict) }} +{{ $x := $position.x | default 50 }} +{{ $y := $position.y | default 50 }} + +{{/* Overlay configuration */}} +{{ $overlay := $cover_config.overlay | default (dict) }} +{{ $overlay_enabled := $overlay.enabled | default true }} +{{ $overlay_type := $overlay.type | default "gradient" }} +{{ $overlay_opacity := $overlay.opacity | default 0.3 }} +{{ $overlay_color := $overlay.color | default "#000000" }} +{{ $overlay_gradient := $overlay.gradient | default "bottom" }} + +{{/* Fade configuration */}} +{{ $fade := $cover_config.fade | default (dict) }} +{{ $fade_enabled := $fade.enabled | default true }} +{{ $fade_height := $fade.height | default "60px" }} +{{ $fade_blur := $fade.blur | default false }} + +{{/* Icon configuration */}} +{{ $icon_config := $cover_config.icon | default (dict) }} +{{ $has_icon := or $icon_config.name $icon_config.emoji }} +{{ $icon_position := $icon_config.position | default "overlap" }} +{{ $icon_size := $icon_config.size | default "large" }} +{{ $icon_style := $icon_config.style | default "glass" }} +{{ $icon_border := $icon_config.border | default true }} + +{{/* Responsive hide on mobile */}} +{{ $hide_mobile := false }} +{{ if $cover_config.responsive }} + {{ $hide_mobile = $cover_config.responsive.hide_on_mobile | default false }} +{{ end }} + +{{/* Process cover image */}} +{{ $cover_width := 2560 }} +{{ $cover_height := 520 }} +{{ if eq ($cover_config.height | default "medium") "small" }} + {{ $cover_height = 320 }} +{{ else if eq ($cover_config.height | default "medium") "large" }} + {{ $cover_height = 768 }} +{{ else if eq ($cover_config.height | default "medium") "full" }} + {{ $cover_height = 1080 }} +{{ end }} + +{{/* + Generate responsive images. + - reflect.IsImageResourceProcessable → false for SVG (not processable by Hugo). + - GIF: processable by Hugo but we skip to preserve animation frames. +*/}} +{{ $processed_cover := $cover }} +{{ $srcset := "" }} +{{ $canProcess := and (reflect.IsImageResourceProcessable $cover) (ne $cover.MediaType.SubType "gif") }} +{{ if $canProcess }} + {{ $fill_spec := printf "%dx%d Center q85 webp" $cover_width $cover_height }} + {{ $processed_cover = $cover.Fill $fill_spec }} + + {{ $variants := slice }} + {{ $widths := slice 640 768 1024 1366 1920 2560 }} + {{ range $widths }} + {{ $w := . }} + {{ $h := div (mul $w $cover_height) $cover_width }} + {{ $variant_spec := printf "%dx%d Center q85 webp" $w $h }} + {{ $variant := $cover.Fill $variant_spec }} + {{ $variants = $variants | append (printf "%s %dw" $variant.RelPermalink $w) }} + {{ end }} + {{ $srcset = delimit $variants ", " }} +{{ end }} + +{{/* Build CSS classes based on style */}} +{{ $cover_classes := "article-cover relative w-full" }} +{{ if $hide_mobile }} + {{ $cover_classes = printf "%s hidden md:block" $cover_classes }} +{{ end }} + +{{/* Container styles */}} +{{ $container_style := printf "height: %s;" $height }} + +{{/* Calculate mask style for fade */}} +{{ $mask_style := "" }} +{{ if and $fade_enabled (ne $style "minimal") }} + {{/* Mask fades from black (visible) to transparent (invisible) at the bottom */}} + {{ $mask_style = printf "-webkit-mask-image: linear-gradient(to bottom, black calc(100%% - %s), transparent 100%%); mask-image: linear-gradient(to bottom, black calc(100%% - %s), transparent 100%%);" $fade_height $fade_height }} +{{ end }} + +
+ +
+ {{/* Cover Image */}} +
+ {{ if $canProcess }} + {{ $alt_text }} + {{ else }} + {{ $alt_text }} + {{ end }} +
+ + {{/* Overlay Effects */}} + {{ if and $overlay_enabled (ne $style "minimal") }} + {{ if eq $style "gradient" }} +
+ {{ else if eq $style "glass" }} +
+ {{ else if eq $style "blur" }} +
+ {{ else if eq $overlay_type "gradient" }} + {{ if eq $overlay_gradient "bottom" }} +
+ {{ else if eq $overlay_gradient "top" }} +
+ {{ else if eq $overlay_gradient "both" }} +
+ {{ else if eq $overlay_gradient "radial" }} +
+ {{ end }} + {{ else if eq $overlay_type "solid" }} +
+ {{ end }} + {{ end }} + + {{/* Blur Effect at Bottom (Optional) */}} + {{ if and $fade_enabled $fade_blur (ne $style "minimal") }} + {{/* Taller blur zone with mask to create smooth blur transition before fade out */}} + {{/* Semi-transparent background needed for backdrop-filter to render */}} +
+ {{ end }} + + {{/* Caption */}} + {{ with $cover_config.caption }} +
+ {{ . | markdownify }} +
+ {{ end }} +
+ + {{/* Icon Overlay - Only if position is "overlap" - NOW UNCLIPPED */}} + {{ if and $has_icon (eq $icon_position "overlap") }} + {{ $icon_size_map := dict "small" "w-8 h-8" "medium" "w-12 h-12" "large" "w-16 h-16" }} + {{ $icon_size_class := index $icon_size_map $icon_size | default "w-16 h-16" }} + {{ $icon_padding := cond (eq $icon_size "small") "p-1.5" (cond (eq $icon_size "medium") "p-2" "p-3") }} + +
+
+ {{ if $icon_config.emoji }} + {{ $icon_config.emoji }} + {{ else if $icon_config.name }} + {{ partial "functions/get_icon.html" (dict "name" $icon_config.name "attributes" (printf "class=\"%s text-gray-700 dark:text-gray-200\"" $icon_size_class)) }} + {{ end }} +
+
+ {{ end }} + +
+ +{{/* Icon Below Cover - If position is "below" */}} +{{ if and $has_icon (eq $icon_position "below") }} + {{ $icon_size_map := dict "small" "w-8 h-8" "medium" "w-12 h-12" "large" "w-16 h-16" }} + {{ $icon_size_class := index $icon_size_map $icon_size | default "w-16 h-16" }} + {{ $icon_padding := cond (eq $icon_size "small") "p-1.5" (cond (eq $icon_size "medium") "p-2" "p-3") }} + +
+
+ {{ if $icon_config.emoji }} + {{ $icon_config.emoji }} + {{ else if $icon_config.name }} + {{ partial "functions/get_icon.html" (dict "name" $icon_config.name "attributes" (printf "class=\"%s text-gray-700 dark:text-gray-200\"" $icon_size_class)) }} + {{ end }} +
+
+{{ end }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/feedback.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/feedback.html new file mode 100644 index 0000000..5087dd0 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/feedback.html @@ -0,0 +1,36 @@ +{{/* TODO: port JS & response text from Bootstrap module. Re-integrate with GA plus Fathom/Plausible */}} +{{/* $ga := site.Params.marketing.analytics.google_analytics | default "" */}} +{{ $show_feedback := .Params.feedback | default true }} + +{{ if hugo.IsProduction | and $show_feedback }}{{/* | and $ga */}} +
+
+
+ {{ i18n "feedback_widget_question" | default "Was this page helpful?" }} +
+
+
+ 😞 +
+
+ 😐 +
+
+ 🤩 +
+
+
+
+{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/footers/columns.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/footers/columns.html new file mode 100644 index 0000000..21fa806 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/footers/columns.html @@ -0,0 +1,82 @@ +{{ $branding := partialCached "functions/get_branding" . "branding" }} +{{- $logo_height := site.Params.hugoblox.footer.logo_height | default 36 -}} +{{ $logo := partialCached "functions/get_logo" (dict "constraint" "max_height" "size" $logo_height) "footer_logo" }} +{{- $show_logo := site.Params.hugoblox.footer.show_logo | default true -}} +{{- $show_title := site.Params.hugoblox.footer.show_title | default true -}} +{{- $show_tagline := site.Params.hugoblox.footer.show_tagline | default true -}} +{{- $footer_title := site.Params.hugoblox.footer.title | default $branding.name -}} +
+ Footer + +
+
+
+ {{ if $show_logo }} + {{ with $logo.resource }} + {{ if $logo.is_svg }} + + + {{ else }} + {{ $branding.name }} + {{ end }} + {{ end }} + {{ end }} + {{ if $show_title }} + + {{ $footer_title }} + + {{ end }} + {{ if $show_tagline }} +

{{ site.Params.hugoblox.identity.tagline | default "" }}

+ {{ end }} + {{- $show_social := site.Params.hugoblox.footer.show_social | default true -}} + {{ if $show_social }} + {{ with site.Params.hugoblox.identity.social.links }} +
+ {{ partial "social_links" (dict "Params" (dict "profiles" .)) }} +
+ {{ end }} + {{ end }} +
+
+ + {{ $menu := .Site.Menus.footer }} + {{ range $index, $menuItem := $menu }} +
+

{{ $menuItem.Name }}

+ +
+ {{ end }} +
+
+
+
+
+ + {{/* Display copyright license. */}} + {{ partial "site_footer_license" . }} + +
+
+
diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/footers/minimal.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/footers/minimal.html new file mode 100644 index 0000000..825ff08 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/footers/minimal.html @@ -0,0 +1,49 @@ +{{ $show_translations := site.Params.hugoblox.footer.language_switcher | default true }} +{{ if .IsTranslated | and $show_translations }} +
+
+ {{- partial "functions/get_icon" (dict "name" "globe-alt" "attributes" `class="inline-block pr-1" style="height: 1em"`) -}} + {{ i18n "languages" }}: +
+
{{ index hugo.Data.languages .Lang }}
+ {{ range .Translations }} +
{{ index hugo.Data.languages .Lang }}
+ {{ end }} +
+{{ end }} + +{{/* Footer nav links - single level */}} +{{ $menu := .Site.Menus.footer }} +{{ with $menu }} + +{{ end }} + +{{/* Social links */}} +{{- $show_social := site.Params.hugoblox.footer.show_social | default true -}} +{{ if $show_social }} +{{ with site.Params.hugoblox.identity.social.links }} +
+ {{ partial "social_links" (dict "Params" (dict "profiles" .)) }} +
+{{ end }} +{{ end }} + +{{ with site.Params.hugoblox.footer.text }} +

+ {{ . | markdownify | emojify }} +

+{{ end }} + +{{/* Display copyright license. */}} +{{ partial "site_footer_license" . }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/floating-theme-toggler.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/floating-theme-toggler.html new file mode 100644 index 0000000..3054007 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/floating-theme-toggler.html @@ -0,0 +1,24 @@ +
+
+ +
+
diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/navbar-simple.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/navbar-simple.html new file mode 100644 index 0000000..9bbb573 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/navbar-simple.html @@ -0,0 +1,147 @@ + + +{{/* Show site search? */}} +{{ $show_search := site.Params.hugoblox.header.search | default false }} + + + +{{ if $show_search }} + {{- partial "components/search-modal.html" . -}} +{{ end }} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/navbar.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/navbar.html new file mode 100644 index 0000000..49f83f6 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/headers/navbar.html @@ -0,0 +1,229 @@ +{{ $branding := partialCached "functions/get_branding" . "branding" }} +{{ $logo := partialCached "functions/get_logo" (dict "constraint" "max_height" "size" 36) "navbar_logo" }} +{{- $show_logo := site.Params.hugoblox.header.show_logo | default true -}} +{{- $show_title := site.Params.hugoblox.header.show_title | default true -}} +{{- $navbar_title := site.Params.hugoblox.header.title | default $branding.name -}} + + +{{ if $show_search }} + {{- partial "components/search-modal.html" . -}} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/language-chooser.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/language-chooser.html new file mode 100644 index 0000000..0c06bc1 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/language-chooser.html @@ -0,0 +1,38 @@ +{{ $page := .page }} +{{ $class := .class }} +{{ $hide_language_name := false }}{{/* TODO: Add to hugoblox.header.hide_language_name if needed */}} +{{ $str_languages := T "languages" }} + +{{- if $page.IsTranslated -}} +
+ + +
+{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/last-edited.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/last-edited.html new file mode 100644 index 0000000..909553d --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/last-edited.html @@ -0,0 +1,11 @@ +{{- $last_updated := T "last_updated" -}} + +{{- if (.Params.show_date_updated | default true) | and .Lastmod -}} + {{ $datetime := (time.Format "2006-01-02T15:04:05.000Z" .Lastmod) }} + +{{- else -}} +
+{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/next-in-series.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/next-in-series.html new file mode 100644 index 0000000..00c94a6 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/next-in-series.html @@ -0,0 +1,54 @@ +{{ if .Params.pager | default true }} + {{ if and .Section (or .NextInSection .PrevInSection) }} + {{ $next := .NextInSection }} + {{ $prev := .PrevInSection }} + {{ if (eq (.Scratch.Get "invert_pager") true) | default .Params.invert_pager | default false }} + {{ $next = .PrevInSection }} + {{ $prev = .NextInSection }} + {{ end }} + +{{ end }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/page_sharer.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/page_sharer.html new file mode 100644 index 0000000..1e9ba3c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/page_sharer.html @@ -0,0 +1,22 @@ +{{ if ne .Params.share false }} +
+ {{ range where hugo.Data.page_sharer.links "enable" true }} + + {{/* mailto URIs require percent-encoding (%20 for spaces) per RFC 6068, not form-encoding (+ for spaces). */}} + {{/* Use urls.PathEscape for mailto; urlquery for other schemes (https, etc.). */}} + {{ $is_mailto := eq (urls.Parse .url).Scheme "mailto" }} + {{ $link := replace .url "{url}" (cond $is_mailto (urls.PathEscape $.Permalink) (urlquery $.Permalink)) }} + {{ $link = replace $link "{title}" (cond $is_mailto (urls.PathEscape $.Title) (urlquery $.Title)) }} + + {{ partial "functions/get_icon" (dict "name" .icon "attributes" "style=\"height: 1em;\"") }} + + {{ end }} +
+{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/paginator.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/paginator.html new file mode 100644 index 0000000..40c7112 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/paginator.html @@ -0,0 +1,12 @@ +{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} + +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/search-modal.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/search-modal.html new file mode 100644 index 0000000..03504ed --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/search-modal.html @@ -0,0 +1,484 @@ +{{/* Modern Search Modal - Custom Pagefind API Implementation */}} + + + + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/sidebar.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/sidebar.html new file mode 100644 index 0000000..5487428 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/sidebar.html @@ -0,0 +1,150 @@ +{{- $context := .context -}} + +{{- $no_sidebar := ne .no_sidebar false -}} +{{- $pad_sidebar := true -}} +{{- $sidebar_dynamic_class := cond $no_sidebar (cond $pad_sidebar "lg:hidden xl:block" "lg:hidden") "lg:sticky" -}} + +{{- $root_section := cond (eq site.Home.Type "docs") site.Home $context.FirstSection -}} +{{- $page_url := $context.RelPermalink -}} + +{{/* Only replace explicit mobile menu links with automated links for Docs pages */}} +{{ if not $no_sidebar }} + {{/* Classes appended to `hb-sidebar-mobile-menu` are modified via sidebar JS, so do not @apply them to `hb-sidebar-mobile-menu` */}} + +{{ end }} + + + + +{{- define "menu-links" -}} + {{ template "link-tree" (dict "context" .context "level" 0 "page" .page "pageURL" .pageURL "toc" (.toc | default false)) }} +{{- end -}} + +{{- define "link-tree" -}} + {{- if ge .level 4 -}} + {{- return -}} + {{- end -}} + + {{- $context := .context -}} + {{- $page := .page }} + {{- $page_url := .page.RelPermalink -}} + {{- $level := .level -}} + {{- $toc := .toc | default false -}} + + {{- with $items := union .context.RegularPages .context.Sections -}} + {{- $items = where $items "Params.sidebar.hidden" "!=" true -}} + {{- if eq $level 0 -}} + {{- range $items.ByWeight }} + {{- $active := eq $page_url .RelPermalink -}} + {{- $is_expanded := or (.Params.sidebar.open) (.IsAncestor $page) $active | default false }} +
  • + {{- template "custom-menu-link" dict "context" . "active" $active "title" .LinkTitle "link" .RelPermalink -}} + {{- if and $toc $active -}} + {{- template "mobile-toc" dict "page" . -}} + {{- end -}} + {{- template "link-tree" dict "context" . "page" $page "pageURL" $page_url "level" (add $level 1) "toc" $toc -}} +
  • + {{- end -}} + {{- else -}} +
    +
      + {{- range $items.ByWeight }} + {{- $active := eq $page_url .RelPermalink -}} + {{- $is_expanded := or (.Params.sidebar.open) (.IsAncestor $page) $active | default false }} + {{- $title := .LinkTitle | default .File.BaseFileName -}} +
    • + {{- template "custom-menu-link" dict "context" . "active" $active "title" $title "link" .RelPermalink -}} + {{- if and $toc $active -}} + {{ template "mobile-toc" dict "page" . }} + {{- end }} + {{ template "link-tree" dict "context" . "page" $page "pageURL" $page_url "level" (add $level 1) "toc" $toc }} +
    • + {{- end -}} +
    +
    + {{- end -}} + {{- end }} +{{- end -}} + +{{- define "mobile-toc" -}} + {{ $page := .page }} + {{ with $page.Fragments.Headings }} + + {{ end }} +{{- end -}} + +{{- define "custom-menu-links" -}} + {{- range site.Menus.sidebar -}} + {{- $name := .Name -}} + {{ if eq .Params.type "separator" }} +
  • + {{ $name }} +
  • + {{ else }} +
  • {{ template "custom-menu-link" dict "active" false "title" $name "link" (.URL | relLangURL) }}
  • + {{ end }} + {{- end -}} +{{- end -}} + +{{- define "custom-menu-link" -}} + {{- $is_external := strings.HasPrefix .link "http" -}} + {{- $open := .open | default false -}} + + {{- .title -}} + {{- with .context }} + {{- if or .RegularPages .Sections }} + + + + {{- end }} + {{ end -}} + +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/slides-embed.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/slides-embed.html new file mode 100644 index 0000000..3a3bbb7 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/slides-embed.html @@ -0,0 +1,155 @@ +{{/* + Hugo Blox Slides Embed Component - Reusable iframe embed with fullscreen support + Usage: {{ partial "components/slides-embed.html" (dict "page" . "slides_slug" .Params.slides) }} + + Params: + - page: current page context + - slides_slug: slug of slides to embed (e.g., "example") + - show_actions: (optional) show open/speaker notes links, default true + - title: (optional) title for iframe, defaults to page title +*/}} + +{{ $page := .page }} +{{ $slides_slug := .slides_slug }} +{{ $show_actions := .show_actions | default true }} +{{ $slides_label := i18n "slides" | default "Slides" }} +{{ $present_fullscreen_label := i18n "present_fullscreen" | default "Present (fullscreen)" }} +{{ $enter_fullscreen_label := i18n "enter_fullscreen" | default "Enter fullscreen" }} +{{ $exit_fullscreen_label := i18n "exit_fullscreen" | default "Exit fullscreen" }} +{{ $speaker_notes_hint := i18n "speaker_notes_hint" | default "for speaker notes" }} +{{ $slides_not_found_label := i18n "slides_not_found" | default "Slides not found" }} +{{ $embed_title := .title | default (printf "%s - %s" $page.Title $slides_label) }} + +{{/* Enable Alpine.js for fullscreen functionality */}} +{{ $page.Store.Set "has_alpine" true }} + +{{/* Get slides page */}} +{{ $slides_page := site.GetPage (printf "/slides/%s" $slides_slug) }} +{{ $scr := newScratch }} +{{ if $slides_page }} + {{ $scr.Set "slides_url" $slides_page.RelPermalink }} + {{ $scr.Set "present_url" $slides_page.RelPermalink }} + {{ $scr.Set "embed_url" $slides_page.RelPermalink }} + {{ $present_format := $slides_page.OutputFormats.Get "present" }} + {{ if not $present_format }} + {{ $present_format = $slides_page.OutputFormats.Get "Present" }} + {{ end }} + {{ with $present_format }} + {{ $scr.Set "present_url" .RelPermalink }} + {{ $scr.Set "embed_url" (printf "%s?embed=1" .RelPermalink) }} + {{ end }} +{{ end }} +{{ $slides_url := $scr.Get "slides_url" }} +{{ $present_url := $scr.Get "present_url" | default $slides_url }} +{{ $embed_url := $scr.Get "embed_url" | default $slides_url }} + +{{ if $slides_page }} +
    + {{/* Slides iframe container - wrapper for fullscreen API */}} +
    + + + {{/* Fullscreen toggle button - inside container for fullscreen visibility */}} + +
    + + {{ if $show_actions }} + {{/* Action links below embed */}} +
    +
    + {{/* Open in new tab */}} + + + + + {{ $present_fullscreen_label }} + + + {{/* Presentation mode hint */}} + + S + {{ $speaker_notes_hint }} + +
    +
    + {{ end }} +
    +{{ else }} +

    {{ $slides_not_found_label }}: {{ $slides_slug }}

    +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/toc.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/toc.html new file mode 100644 index 0000000..33e3c49 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/components/toc.html @@ -0,0 +1,74 @@ +{{/* Table of Contents */}} + +{{- $toc := .Params.toc | default true -}} + +{{/* UI Text */}} +{{- $on_this_page := T "on_this_page" }} +{{- $edit_this_page := T "edit_page" }} + + + +{{/* Render Headings */}} +{{- define "toc-headings" -}} + {{- $headings := .headings -}} + {{- $level := .level -}} + {{- if ge $level 4 -}} + {{ return }} + {{- end -}} + + {{- $padding := (mul $level 4) -}}{{/* Requires inclusion in Tailwind safelist!! */}} + {{- $class := cond (eq $level 0) "font-semibold" (printf "pl-%d rtl:pr-%d" $padding $padding) -}} + + {{- range $headings }} + {{- if .Title }} +
  • + + {{- .Title | plainify | htmlUnescape -}} + +
  • + {{- end -}} + + {{- with .Headings -}} + {{ template "toc-headings" (dict "headings" . "level" (add $level 1)) }} + {{- end -}} + + {{- end -}} +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/css.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/css.html new file mode 100644 index 0000000..8a69423 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/css.html @@ -0,0 +1,34 @@ +{{/* HB Tailwind CSS v4 Processing with Hugo's Native Function */}} +{{ with resources.Get "css/main.css" }} + {{/* Build dynamic @source list and prepend it before main.css */}} + {{ $dynamic_sources_str := partial "tailwind_sources.html" . }} + {{ $dynamic_sources_res := resources.FromString "css/_dynamic_sources.css" $dynamic_sources_str }} + + {{ $main_css := . }} + {{ $entry_parts := slice $dynamic_sources_res $main_css }} + + {{/* Auto-discover co-located block CSS: shared utilities first, then per-block styles */}} + {{ range resources.Match "css/hbx/blocks/shared/**/*.css" }} + {{ $entry_parts = $entry_parts | append . }} + {{ end }} + {{ range resources.Match "css/hbx/blocks/**/style.css" }} + {{ $entry_parts = $entry_parts | append . }} + {{ end }} + + {{/* Community block CSS (mounted by templates into dist/community/blox/) */}} + {{ range resources.Match "dist/community/blox/**/*.css" }} + {{ $entry_parts = $entry_parts | append . }} + {{ end }} + + {{ $entry := $entry_parts | resources.Concat "css/_entry.css" }} + {{ $opts := dict "minify" (not hugo.IsDevelopment) }} + {{ with $entry | css.TailwindCSS $opts }} + {{ if hugo.IsDevelopment }} + + {{ else }} + {{ with . | fingerprint }} + + {{ end }} + {{ end }} + {{ end }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/docs_layout.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/docs_layout.html new file mode 100644 index 0000000..d0ead82 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/docs_layout.html @@ -0,0 +1,30 @@ +
    + {{ partial "components/sidebar.html" (dict "context" . "no_sidebar" false) }} + {{ partial "components/toc.html" . }} +
    +
    + {{ if (.Params.show_breadcrumb | default true) }} +
    + {{ partial "components/breadcrumb.html" . }} +
    + {{ end }} + + {{/* Pagefind metadata for search filtering */}} +
    +

    {{ .Title }}

    + {{ .Content }} + + {{/* Use hidden spans for filter values - best practice per Pagefind docs */}} + docs + {{ with .Params.categories }} + {{ index . 0 }} + {{ end }} +
    + + {{ partial "components/last-edited.html" . }} + {{ .Scratch.Set "invert_pager" true }} + {{ partial "components/next-in-series.html" . }} + {{ partial "comments.html" . }} +
    +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/build_links.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/build_links.html new file mode 100644 index 0000000..29936d6 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/build_links.html @@ -0,0 +1,283 @@ +{{/* + Hugo Blox Page Link Builder + Build a normalized list of page links from: + - Author-provided front matter `links` (array order respected) + - Auto-detected resources (local PDF, cite.bib) + - Derived identifiers from `hugoblox.ids` + - Associated internal `projects` references + + Inputs: dict { "page": . , "is_list": 0|1 } + Output: slice of dicts with fields: type, url, icon, labelKey, label, contexts, rel + + Deprecations handled with warnings and mapped: + - external_link -> type: site + - url_pdf -> type: pdf + - url_preprint -> type: preprint + - url_code -> type: code + - url_dataset -> type: dataset + - url_poster -> type: poster + - url_project -> type: project + - url_slides -> type: slides + - url_source -> type: source + - url_video -> type: video +*/}} + +{{ $page := .page }} +{{ $is_list := .is_list }} + +{{ $types := hugo.Data.link_types.types }} +{{ $derived := hugo.Data.link_types.derived }} + +{{ $links := slice }} +{{ $seen := newScratch }} +{{ $seen.Set "set" (dict) }} + +{{/* 1) Author-provided links (array order) */}} +{{ with $page.Params.links }} + {{ range . }} + {{/* Support new fields: type, url, icon (pack/name), label, contexts, rel; legacy: name */}} + {{ $type := .type | default "custom" }} + {{ $url := .url | default "" }} + {{/* Optional provider+id derivation for common platforms */}} + {{ if and (not $url) .id }} + {{ if eq $type "doi" }} + {{ $url = replace (index (index $derived "doi") "url_template") "{id}" (printf "%v" .id) }} + {{ else if and (eq $type "preprint") (eq .provider "arxiv") }} + {{ $url = replace (index (index $derived "arxiv") "url_template") "{id}" (printf "%v" .id) }} + {{ else if and (eq $type "preprint") (eq .provider "openreview") }} + {{ $url = replace (index (index $derived "openreview") "url_template") "{id}" (printf "%v" .id) }} + {{ end }} + {{ end }} + {{ $typeF := $type }} + {{ $urlF := $url }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (.icon | default (index (index $types $typeF) "icon") | default "hero/link") + "labelKey" (index (index $types $typeF) "label_i18n") + "label" (.label | default .name) + "contexts" (.contexts | default (slice "list" "page")) + "rel" .rel + ) }} + {{ end }} + {{ end }} +{{ end }} + +{{/* 2) Associated projects (internal) */}} +{{ with $page.Params.projects }} + {{ range . }} + {{ with (site.GetPage (printf "project/%s" .)) }} + {{ $typeF := "project" }} + {{ $urlF := .RelPermalink }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{/* 2b) Slides relation parameter (legacy but common) */}} +{{ with $page.Params.slides }} + {{ if reflect.IsMap . }} + {{/* Skip: slides map is Reveal.js config for slide decks. */}} + {{ else if reflect.IsSlice . }} + {{ range . }} + {{ with (site.GetPage (printf "slides/%s" .)) }} + {{ $typeF := "slides" }} + {{ $urlF := .RelPermalink }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ else }} + {{ warnf "`slides` relation could not resolve to a page for %s" $page.File.Path }} + {{ end }} + {{ end }} + {{ else }} + {{ with (site.GetPage (printf "slides/%s" .)) }} + {{ $typeF := "slides" }} + {{ $urlF := .RelPermalink }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ else }} + {{ warnf "`slides` relation could not resolve to a page for %s" $page.File.Path }} + {{ end }} + {{ end }} +{{ end }} + +{{/* 3) Auto-detected resources (local PDF by content basename, cite.bib) */}} +{{ with $page.File.ContentBaseName }} + {{ with ($page.Resources.GetMatch (printf "%s.pdf" .)) }} + {{ $typeF := "pdf" }} + {{ $urlF := .RelPermalink }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ end }} +{{ end }} +{{ with ($page.Resources.GetMatch "cite.bib") }} + {{ $typeF := "bibtex" }} + {{ $urlF := .RelPermalink }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} +{{ end }} + +{{/* 4) Derived links from identifiers under `hugoblox.ids` */}} +{{ with $page.Params.hugoblox }} + {{ with .ids }} + {{ range $key, $val := . }} + {{ with (index $derived $key) }} + {{ $der := . }} + {{ $typeF := index $der "type" }} + {{ $urlF := replace (index $der "url_template") "{id}" (printf "%v" $val) }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index $der "icon") + "labelKey" (index $der "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{/* 5) Legacy fields -> deprecation warnings and normalized items */}} +{{/* external_link */}} +{{ with $page.Params.external_link }} + {{ warnf "`external_link` is deprecated. Use `links: [{type: site, url: ...}]` in %s" $page.File.Path }} + {{ $typeF := "site" }} + {{ $urlF := . }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} +{{ end }} +{{/* top-level doi */}} +{{ with $page.Params.doi }} + {{ warnf "Top-level `doi` is deprecated. Use `hugoblox.ids: { doi: ... }` in %s" $page.File.Path }} + {{ with (index $derived "doi") }} + {{ $der := . }} + {{ $typeF := index $der "type" }} + {{ $urlF := replace (index $der "url_template") "{id}" (printf "%v" $page.Params.doi) }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index $der "icon") + "labelKey" (index $der "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ else }} + {{ $typeF := "doi" }} + {{ $urlF := printf "https://doi.org/%v" $page.Params.doi }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ end }} +{{ end }} +{{/* Map of legacy url_* to new types */}} +{{ $legacy := dict + "url_pdf" "pdf" + "url_preprint" "preprint" + "url_code" "code" + "url_dataset" "dataset" + "url_poster" "poster" + "url_project" "project" + "url_slides" "slides" + "url_source" "source" + "url_video" "video" +}} +{{ range $legacyKey, $legacyType := $legacy }} + {{ with index $page.Params $legacyKey }} + {{ warnf "`%s` is deprecated. Use `links: [{type: %s, url: ...}]` in %s" $legacyKey $legacyType $page.File.Path }} + {{/* Resolve relative resource if present */}} + {{ $u := . }} + {{ with ($page.Resources.GetMatch $u) }} + {{ $u = .RelPermalink }} + {{ else }} + {{ $u = $u | relURL }} + {{ end }} + {{ $typeF := $legacyType }} + {{ $urlF := $u }} + {{ $keyF := printf "%s::%s" $typeF $urlF }} + {{ if not ($seen.Get (printf "set.%s" $keyF)) }} + {{ $seen.SetInMap "set" $keyF true }} + {{ $links = $links | append (dict + "type" $typeF + "url" $urlF + "icon" (index (index $types $typeF) "icon") + "labelKey" (index (index $types $typeF) "label_i18n") + "contexts" (slice "list" "page") + ) }} + {{ end }} + {{ end }} +{{ end }} + +{{- return $links -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/coerce_bool.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/coerce_bool.html new file mode 100644 index 0000000..1de9165 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/coerce_bool.html @@ -0,0 +1,20 @@ +{{ $value := .value }} +{{ $result := .default }} +{{ if ne $value nil }} + {{ $valueType := printf "%T" $value }} + {{ if eq $valueType "bool" }} + {{ $result = $value }} + {{ else if or (eq $valueType "int") (eq $valueType "int8") (eq $valueType "int16") (eq $valueType "int32") (eq $valueType "int64") (eq $valueType "uint") (eq $valueType "uint8") (eq $valueType "uint16") (eq $valueType "uint32") (eq $valueType "uint64") }} + {{ $result = ne (int $value) 0 }} + {{ else if or (eq $valueType "float32") (eq $valueType "float64") }} + {{ $result = ne (float $value) 0 }} + {{ else if eq $valueType "string" }} + {{ $trimmed := lower (strings.TrimSpace $value) }} + {{ if in (slice "1" "true" "yes" "y" "on") $trimmed }} + {{ $result = true }} + {{ else if in (slice "0" "false" "no" "n" "off") $trimmed }} + {{ $result = false }} + {{ end }} + {{ end }} +{{ end }} +{{ return $result }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/coerce_int.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/coerce_int.html new file mode 100644 index 0000000..5581c90 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/coerce_int.html @@ -0,0 +1,26 @@ +{{ $value := .value }} +{{ $result := .default }} +{{ if ne $value nil }} + {{ $valueType := printf "%T" $value }} + {{ if or (eq $valueType "int") (eq $valueType "int8") (eq $valueType "int16") (eq $valueType "int32") (eq $valueType "int64") (eq $valueType "uint") (eq $valueType "uint8") (eq $valueType "uint16") (eq $valueType "uint32") (eq $valueType "uint64") (eq $valueType "float32") (eq $valueType "float64") }} + {{ $result = int $value }} + {{ else if eq $valueType "string" }} + {{ $trimmed := strings.TrimSpace $value }} + {{ if gt (len (findRE "^-?[0-9]+$" $trimmed)) 0 }} + {{ $result = int $trimmed }} + {{ else if gt (len (findRE "^-?[0-9]*\\.[0-9]+$" $trimmed)) 0 }} + {{ $result = int (float $trimmed) }} + {{ end }} + {{ end }} +{{ end }} +{{ if isset . "min" }} + {{ if lt $result .min }} + {{ $result = .min }} + {{ end }} +{{ end }} +{{ if isset . "max" }} + {{ if gt $result .max }} + {{ $result = .max }} + {{ end }} +{{ end }} +{{ return $result }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/deep_merge.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/deep_merge.html new file mode 100644 index 0000000..ee4a518 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/deep_merge.html @@ -0,0 +1,21 @@ +{{/* Pragmatic deep merge for block sections: shallow merge + merge 'content' and 'design' submaps if present. b overrides a. */}} +{{- $a := .a -}} +{{- $b := .b -}} +{{- if and (reflect.IsMap $a) (reflect.IsMap $b) -}} + {{- $result := merge $a $b -}} + {{- /* merge 'content' submap */ -}} + {{- $ac := index $a "content" -}} + {{- $bc := index $b "content" -}} + {{- if and (reflect.IsMap $ac) (reflect.IsMap $bc) -}} + {{- $result = merge $result (dict "content" (merge $ac $bc)) -}} + {{- end -}} + {{- /* merge 'design' submap */ -}} + {{- $ad := index $a "design" -}} + {{- $bd := index $b "design" -}} + {{- if and (reflect.IsMap $ad) (reflect.IsMap $bd) -}} + {{- $result = merge $result (dict "design" (merge $ad $bd)) -}} + {{- end -}} + {{- return $result -}} +{{- else -}} + {{- return $b -}} +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/demo_theme_styles.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/demo_theme_styles.html new file mode 100644 index 0000000..3b78502 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/demo_theme_styles.html @@ -0,0 +1,31 @@ +{{/* + HugoBlox Theme Engine: Demo Theme Styles + Generates CSS variables for ALL available theme packs. + Used for the "Theme Pack Chooser" demo feature. +*/}} + +{{ $typography_config := .typography }} +{{ $layout_config := .layout }} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/github.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/github.html new file mode 100644 index 0000000..e78676f --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/github.html @@ -0,0 +1,97 @@ +{{/* + Hugo Blox GitHub Platform Configuration + Part of Hugo Blox embed system + + Parameters: + - resource: repository identifier (e.g., "owner/repo") + - type: "repo", "gist", etc. + - user: username/organization + - customUrl: optional override URL +*/}} + +{{- $resource := .resource -}} +{{- $type := .type | default "repo" -}} +{{- $user := .user -}} +{{- $customUrl := .customUrl -}} +{{- $showThumbnail := .showThumbnail | default false -}} +{{- $width := .width | default 600 -}} +{{- $height := .height | default 315 -}} +{{- $quality := .quality | default 85 -}} +{{- $formats := .formats | default (slice "avif" "webp" "jpg") -}} + +{{- $config := dict -}} + +{{- if $resource -}} + {{- if eq $type "repo" -}} + {{- if $showThumbnail -}} + {{- $config = dict + "apiUrl" (print "https://api.github.com/repos/" $resource) + "repoLink" (print "https://github.com/" $resource) + "imageUrl" (print "https://opengraph.githubassets.com/0/" $resource) + "icon" "code-bracket" + "brandColors" (slice "slate-800" "slate-900") + "typeColor" "primary-500" + "isImageEmbed" true + "imageProcessing" (dict + "width" $width + "height" $height + "quality" $quality + "formats" $formats + "sizes" (slice 400 600 800) + ) + "statsConfig" (dict + "stars" (dict "icon" "star" "color" "yellow-500" "field" "stargazers_count") + "forks" (dict "icon" "git-fork" "color" "primary-500" "field" "forks_count") + "issues" (dict "icon" "exclamation-circle" "color" "red-500" "field" "open_issues_count") + ) + "titleField" "name" + "descriptionField" "description" + "subtypeField" "language" + "ownerField" "owner.login" + -}} + {{- else -}} + {{- $config = dict + "apiUrl" (print "https://api.github.com/repos/" $resource) + "repoLink" (print "https://github.com/" $resource) + "icon" "code-bracket" + "brandColors" (slice "slate-800" "slate-900") + "typeColor" "primary-500" + "statsConfig" (dict + "stars" (dict "icon" "star" "color" "yellow-500" "field" "stargazers_count") + "forks" (dict "icon" "git-fork" "color" "primary-500" "field" "forks_count") + "issues" (dict "icon" "exclamation-circle" "color" "red-500" "field" "open_issues_count") + ) + "titleField" "name" + "descriptionField" "description" + "subtypeField" "language" + "ownerField" "owner.login" + -}} + {{- end -}} + {{- else if eq $type "gist" -}} + {{- $config = dict + "apiUrl" (print "https://api.github.com/gists/" $resource) + "repoLink" (print "https://gist.github.com/" $resource) + "icon" "document-text" + "brandColors" (slice "slate-800" "slate-900") + "typeColor" "secondary-500" + "titleField" "description" + "descriptionField" "description" + -}} + {{- else -}} + {{- $config = dict + "repoLink" (print "https://github.com/" $resource) + "icon" "link" + "brandColors" (slice "slate-800" "slate-900") + "typeColor" "zinc-500" + -}} + {{- end -}} +{{- else if $customUrl -}} + {{- $config = dict + "repoLink" $customUrl + "icon" "link" + "brandColors" (slice "slate-800" "slate-900") + "typeColor" "zinc-500" + -}} +{{- end -}} + +{{ return $config }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_content_section.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_content_section.html new file mode 100644 index 0000000..efe6b20 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_content_section.html @@ -0,0 +1,107 @@ +{{/* + Content section rendering for embed cards + + Parameters: + - customDescription: user-provided description override + - embedData: data fetched from API + - platform: platform name + - hb_id: Hugo Blox unique identifier + - config: platform configuration + - processedImage: processed image data (for image embeds) +*/}} + +{{- $customDescription := .customDescription -}} +{{- $embedData := .embedData -}} +{{- $platform := .platform -}} +{{- $hb_id := .hb_id -}} +{{- $config := .config -}} +{{- $processedImage := .processedImage -}} + +{{/* Display processed image if available */}} +{{- if $processedImage -}} +
    + {{ if $customDescription }}{{ $customDescription }}{{ else if and $embedData $config.titleField }}{{ index $embedData $config.titleField }}{{ else }}Embedded image{{ end }} +
    +{{- end -}} + +{{/* Description handling */}} +{{- $description := $customDescription -}} +{{- if and (not $description) $embedData $config.descriptionField -}} + {{- $description = index $embedData $config.descriptionField -}} + {{/* Apply platform-specific cleanup */}} + {{- if $config.descriptionCleanup -}} + {{- $description = $description | replaceRE $config.descriptionCleanup "" -}} + {{- end -}} +{{- end -}} + +{{- if $description -}} +

    + {{ $description | plainify | htmlUnescape | truncate 200 | emojify }} +

    +{{- end -}} + +{{/* Platform-specific stats section */}} +{{- if and $embedData $config.statsConfig -}} +
    + {{- range $statKey, $statConfig := $config.statsConfig -}} + {{- $statValue := index $embedData $statConfig.field -}} + {{- if $statValue -}} +
    + {{ partial "functions/get_icon" (dict "name" $statConfig.icon "attributes" (printf "class=\"w-4 h-4 text-%s\"" $statConfig.color)) }} + {{- if and (eq $platform "github") (eq $statKey "issues") -}} + {{/* Make issues count clickable for GitHub */}} + + {{- if gt $statValue 999 -}} + {{- if gt $statValue 999999 -}} + {{ div $statValue 1000000 }}M + {{- else -}} + {{ div $statValue 1000 }}k + {{- end -}} + {{- else -}} + {{ $statValue }} + {{- end -}} + + {{- else -}} + + {{- if gt $statValue 999 -}} + {{- if gt $statValue 999999 -}} + {{ div $statValue 1000000 }}M + {{- else -}} + {{ div $statValue 1000 }}k + {{- end -}} + {{- else -}} + {{ $statValue }} + {{- end -}} + + {{- end -}} +
    + {{- end -}} + {{- end -}} +
    +{{- end -}} + +{{/* Additional platform-specific content */}} +{{- if eq $platform "github" -}} + {{/* Show additional GitHub-specific info if available */}} + {{- if and $embedData $embedData.topics -}} +
    + {{- range first 3 $embedData.topics -}} + + {{ . | emojify }} + + {{- end -}} + {{- if gt (len $embedData.topics) 3 -}} + +{{ sub (len $embedData.topics) 3 }} + {{- end -}} +
    + {{- end -}} +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_platform_icon.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_platform_icon.html new file mode 100644 index 0000000..838b083 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_platform_icon.html @@ -0,0 +1,28 @@ +{{/* + Platform icon rendering + + Parameters: + - platform: platform name (huggingface, github, etc.) + - config: platform configuration dict + - hb_id: Hugo Blox unique identifier for the embed +*/}} + +{{- $platform := .platform -}} +{{- $config := .config -}} +{{- $hb_id := .hb_id -}} + +{{- if eq $platform "huggingface" -}} +
    + {{ partial "functions/get_icon" (dict "name" "brands/huggingface" "attributes" "class=\"w-6 h-6 text-white\"") }} +
    +{{- else if eq $platform "github" -}} +
    + {{ partial "functions/get_icon" (dict "name" "brands/github" "attributes" "class=\"w-6 h-6 text-white\"") }} +
    +{{- else -}} + {{/* Custom/generic embeds use neutral styling */}} +
    + {{ partial "functions/get_icon" (dict "name" ($config.icon | default "globe-alt") "attributes" "class=\"w-5 h-5 text-white\"") }} +
    +{{- end -}} + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_title_section.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_title_section.html new file mode 100644 index 0000000..1585b85 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/hbx_title_section.html @@ -0,0 +1,162 @@ +{{/* + Title section rendering for embed cards + + Parameters: + - hb_id: Hugo Blox unique identifier + - customTitle: user-provided title override + - embedData: data fetched from API + - customUrl: custom URL if provided + - resource: platform resource identifier + - type: resource type + - platform: platform name + - config: platform configuration +*/}} + +{{- $hb_id := .hb_id -}} +{{- $customTitle := .customTitle -}} +{{- $embedData := .embedData -}} +{{- $customUrl := .customUrl -}} +{{- $resource := .resource -}} +{{- $type := .type -}} +{{- $platform := .platform -}} +{{- $config := .config -}} + +

    + + {{- if $customTitle -}} + {{ $customTitle | emojify }} + {{- else if and $embedData $config.titleField -}} + {{ index $embedData $config.titleField | emojify }} + {{- else if and $embedData $embedData.name -}} + {{ $embedData.name | emojify }} + {{- else if and $embedData $embedData.id -}} + {{ $embedData.id | emojify }} + {{- else if $customUrl -}} + {{- $parsed := urls.Parse $customUrl -}} + {{ $parsed.Host | emojify }} + {{- else if $resource -}} + {{- if eq $platform "github" -}} + {{/* For GitHub, show just the repo name, not the full "owner/repo" */}} + {{- $parts := split $resource "/" -}} + {{- if gt (len $parts) 1 -}} + {{ index $parts 1 | emojify }} + {{- else -}} + {{ $resource | emojify }} + {{- end -}} + {{- else -}} + {{ $resource | emojify }} + {{- end -}} + {{- else -}} + Embedded Resource + {{- end -}} + +

    + +{{/* Resource type and subtype indicator */}} +{{- $showTypeIndicator := false -}} +{{- $typeText := "" -}} +{{- $typeColor := $config.typeColor | default "zinc-500" -}} + +{{/* Always show type indicator for GitHub repos with data */}} +{{- if and (eq $platform "github") $embedData $config.ownerField -}} + {{- $showTypeIndicator = true -}} +{{- end -}} + +{{/* Force metadata line for custom embeds to ensure proper alignment */}} +{{- if eq $platform "custom" -}} + {{- $showTypeIndicator = true -}} +{{- end -}} + +{{- if $type -}} + {{- $showTypeIndicator = true -}} + {{- if and $embedData $config.subtypeField -}} + {{- if $config.subtypeIndex -}} + {{- $subtypes := index $embedData $config.subtypeField -}} + {{- if $subtypes -}} + {{- $typeText = index $subtypes $config.subtypeIndex -}} + {{- else -}} + {{- $typeText = $type -}} + {{- end -}} + {{- else -}} + {{- $typeText = index $embedData $config.subtypeField | default $type -}} + {{- end -}} + {{- else -}} + {{- $typeText = $type -}} + {{- end -}} +{{- else if and $embedData $config.subtypeField -}} + {{- $showTypeIndicator = true -}} + {{- if $config.subtypeIndex -}} + {{- $subtypes := index $embedData $config.subtypeField -}} + {{- if $subtypes -}} + {{- $typeText = index $subtypes $config.subtypeIndex -}} + {{- end -}} + {{- else -}} + {{- $typeText = index $embedData $config.subtypeField -}} + {{- end -}} +{{- end -}} + +{{- if $showTypeIndicator -}} +
    + {{/* GitHub repos: Show owner prominently, then language */}} + {{- if eq $platform "github" -}} + {{- $owner := "" -}} + {{/* Get owner from API data if available */}} + {{- if $embedData -}} + {{- if eq $config.ownerField "owner.login" -}} + {{/* Handle nested GitHub API structure: embedData.owner.login */}} + {{- $ownerObj := index $embedData "owner" -}} + {{- if $ownerObj -}} + {{- $owner = index $ownerObj "login" -}} + {{- end -}} + {{- else if $config.ownerField -}} + {{/* Handle simple field access */}} + {{- $owner = index $embedData $config.ownerField -}} + {{- end -}} + {{- end -}} + + {{/* Fallback: extract owner from resource string (e.g., "HugoBlox/kit" -> "HugoBlox") */}} + {{- if and (not $owner) $resource -}} + {{- $parts := split $resource "/" -}} + {{- if gt (len $parts) 0 -}} + {{- $owner = index $parts 0 -}} + {{- end -}} + {{- end -}} + + {{- if $owner -}} + by + {{ $owner | emojify }} + + {{- if $typeText -}} + + + {{ $typeText | emojify }} + {{- end -}} + {{- else if $typeText -}} + {{/* No owner, just show type */}} + + {{ $typeText | emojify }} + {{- end -}} + {{- else if eq $platform "custom" -}} + {{/* Custom embeds: Show domain or minimal placeholder for consistent alignment */}} + {{- if $customUrl -}} + {{- $parsed := urls.Parse $customUrl -}} + {{- $domain := $parsed.Host -}} + {{ $domain | emojify }} + {{- else -}} + {{/* Minimal placeholder to maintain visual spacing */}} + external resource + {{- end -}} + {{- else -}} + {{/* Other platforms: Show type with indicator */}} + {{- if $typeText -}} + + + {{ $typeText | emojify }} + + {{- else -}} + {{/* Minimal placeholder for consistent spacing */}} + platform resource + {{- end -}} + {{- end -}} +
    +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/huggingface.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/huggingface.html new file mode 100644 index 0000000..9920bea --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/embed/huggingface.html @@ -0,0 +1,67 @@ +{{/* + HuggingFace platform configuration + + Parameters: + - resource: model or dataset identifier + - type: "model" or "dataset" + - customUrl: optional override URL +*/}} + +{{- $resource := .resource -}} +{{- $type := .type -}} +{{- $customUrl := .customUrl -}} + +{{- $config := dict -}} + +{{- if $resource -}} + {{- if eq $type "model" -}} + {{- $config = dict + "apiUrl" (print "https://huggingface.co/api/models/" $resource) + "repoLink" (print "https://huggingface.co/" $resource) + "icon" "cpu-chip" + "brandColors" (slice "yellow-400" "orange-500") + "typeColor" "secondary-500" + "statsConfig" (dict + "likes" (dict "icon" "heart" "color" "secondary-500" "field" "likes") + "downloads" (dict "icon" "arrow-down-tray" "color" "primary-500" "field" "downloads") + ) + "titleField" "id" + "descriptionField" "description" + "descriptionCleanup" `Dataset Card for .+\s+Dataset Summary\s+` + "subtypeField" "pipeline_tag" + -}} + {{- else if eq $type "dataset" -}} + {{- $config = dict + "apiUrl" (print "https://huggingface.co/api/datasets/" $resource) + "repoLink" (print "https://huggingface.co/datasets/" $resource) + "icon" "circle-stack" + "brandColors" (slice "yellow-400" "orange-500") + "typeColor" "primary-500" + "statsConfig" (dict + "likes" (dict "icon" "heart" "color" "secondary-500" "field" "likes") + "downloads" (dict "icon" "arrow-down-tray" "color" "primary-500" "field" "downloads") + ) + "titleField" "id" + "descriptionField" "description" + "descriptionCleanup" `Dataset Card for .+\s+Dataset Summary\s+` + "subtypeField" "task_categories" + "subtypeIndex" 0 + -}} + {{- else -}} + {{- $config = dict + "repoLink" (print "https://huggingface.co/" $resource) + "icon" "link" + "brandColors" (slice "yellow-400" "orange-500") + "typeColor" "zinc-500" + -}} + {{- end -}} +{{- else if $customUrl -}} + {{- $config = dict + "repoLink" $customUrl + "icon" "link" + "brandColors" (slice "yellow-400" "orange-500") + "typeColor" "zinc-500" + -}} +{{- end -}} + +{{ return $config }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/generate_color_scale.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/generate_color_scale.html new file mode 100644 index 0000000..ad69682 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/generate_color_scale.html @@ -0,0 +1,124 @@ +{{/* + Hugo Blox Kit: Generate Color Scale + Generate Tailwind-like 50–950 scale for a given color. + Supports palette names and hex values. +*/}} +{{ $name := .name }} +{{ $colorInput := .color | lower }} + +{{/* Tailwind 4 Color Palette Lookup Table (OKLCH/Hex) */}} +{{ $tailwind_palette := dict + "red" (dict "50" "oklch(0.971 0.013 17.38)" "100" "oklch(0.936 0.032 17.717)" "200" "oklch(0.885 0.062 18.334)" "300" "oklch(0.808 0.114 19.571)" "400" "oklch(0.704 0.191 22.216)" "500" "oklch(0.637 0.237 25.331)" "600" "oklch(0.577 0.245 27.325)" "700" "oklch(0.505 0.213 27.518)" "800" "oklch(0.444 0.177 26.899)" "900" "oklch(0.396 0.141 25.723)" "950" "oklch(0.258 0.092 26.042)") + "orange" (dict "50" "oklch(0.98 0.016 73.684)" "100" "oklch(0.954 0.038 75.164)" "200" "oklch(0.901 0.076 70.697)" "300" "oklch(0.837 0.128 66.29)" "400" "oklch(0.75 0.183 55.934)" "500" "oklch(0.705 0.213 47.604)" "600" "oklch(0.646 0.222 41.116)" "700" "oklch(0.553 0.195 38.402)" "800" "oklch(0.47 0.157 37.304)" "900" "oklch(0.408 0.123 38.172)" "950" "oklch(0.266 0.079 36.259)") + "amber" (dict "50" "oklch(0.987 0.022 95.277)" "100" "oklch(0.962 0.059 95.617)" "200" "oklch(0.924 0.12 95.746)" "300" "oklch(0.879 0.169 91.605)" "400" "oklch(0.828 0.189 84.429)" "500" "oklch(0.769 0.188 70.08)" "600" "oklch(0.666 0.179 58.318)" "700" "oklch(0.555 0.163 48.998)" "800" "oklch(0.473 0.137 46.201)" "900" "oklch(0.414 0.112 45.904)" "950" "oklch(0.279 0.077 45.635)") + "yellow" (dict "50" "oklch(0.987 0.026 102.212)" "100" "oklch(0.973 0.071 103.193)" "200" "oklch(0.945 0.129 101.54)" "300" "oklch(0.905 0.182 98.111)" "400" "oklch(0.852 0.199 91.936)" "500" "oklch(0.795 0.184 86.047)" "600" "oklch(0.681 0.162 75.834)" "700" "oklch(0.554 0.135 66.442)" "800" "oklch(0.476 0.114 61.907)" "900" "oklch(0.421 0.095 57.708)" "950" "oklch(0.286 0.066 53.813)") + "lime" (dict "50" "oklch(0.986 0.031 120.757)" "100" "oklch(0.967 0.067 122.328)" "200" "oklch(0.938 0.127 124.321)" "300" "oklch(0.897 0.196 126.665)" "400" "oklch(0.841 0.238 128.85)" "500" "oklch(0.768 0.233 130.85)" "600" "oklch(0.648 0.2 131.684)" "700" "oklch(0.532 0.157 131.589)" "800" "oklch(0.453 0.124 130.933)" "900" "oklch(0.405 0.101 131.063)" "950" "oklch(0.274 0.072 132.109)") + "green" (dict "50" "oklch(0.982 0.018 155.826)" "100" "oklch(0.962 0.044 156.743)" "200" "oklch(0.925 0.084 155.995)" "300" "oklch(0.871 0.15 154.449)" "400" "oklch(0.792 0.209 151.711)" "500" "oklch(0.723 0.219 149.579)" "600" "oklch(0.627 0.194 149.214)" "700" "oklch(0.527 0.154 150.069)" "800" "oklch(0.448 0.119 151.328)" "900" "oklch(0.393 0.095 152.535)" "950" "oklch(0.266 0.065 152.934)") + "emerald" (dict "50" "oklch(0.979 0.021 166.113)" "100" "oklch(0.95 0.052 163.051)" "200" "oklch(0.905 0.093 164.15)" "300" "oklch(0.845 0.143 164.978)" "400" "oklch(0.765 0.177 163.223)" "500" "oklch(0.696 0.17 162.48)" "600" "oklch(0.596 0.145 163.225)" "700" "oklch(0.508 0.118 165.612)" "800" "oklch(0.432 0.095 166.913)" "900" "oklch(0.378 0.077 168.94)" "950" "oklch(0.262 0.051 172.552)") + "teal" (dict "50" "oklch(0.984 0.014 180.72)" "100" "oklch(0.953 0.051 180.801)" "200" "oklch(0.91 0.096 180.426)" "300" "oklch(0.855 0.138 181.071)" "400" "oklch(0.777 0.152 181.912)" "500" "oklch(0.704 0.14 182.503)" "600" "oklch(0.6 0.118 184.704)" "700" "oklch(0.511 0.096 186.391)" "800" "oklch(0.437 0.078 188.216)" "900" "oklch(0.386 0.063 188.416)" "950" "oklch(0.277 0.046 192.524)") + "cyan" (dict "50" "oklch(0.984 0.019 200.873)" "100" "oklch(0.956 0.045 203.388)" "200" "oklch(0.917 0.08 205.041)" "300" "oklch(0.865 0.127 207.078)" "400" "oklch(0.789 0.154 211.53)" "500" "oklch(0.715 0.143 215.221)" "600" "oklch(0.609 0.126 221.723)" "700" "oklch(0.52 0.105 223.128)" "800" "oklch(0.45 0.085 224.283)" "900" "oklch(0.398 0.07 227.392)" "950" "oklch(0.302 0.056 229.695)") + "sky" (dict "50" "oklch(0.977 0.013 236.62)" "100" "oklch(0.951 0.026 236.824)" "200" "oklch(0.901 0.058 230.902)" "300" "oklch(0.828 0.111 230.318)" "400" "oklch(0.746 0.16 232.661)" "500" "oklch(0.685 0.169 237.323)" "600" "oklch(0.588 0.158 241.966)" "700" "oklch(0.5 0.134 242.749)" "800" "oklch(0.443 0.11 240.79)" "900" "oklch(0.391 0.09 240.876)" "950" "oklch(0.293 0.066 243.157)") + "blue" (dict "50" "oklch(0.97 0.014 254.604)" "100" "oklch(0.932 0.032 255.585)" "200" "oklch(0.882 0.059 254.128)" "300" "oklch(0.809 0.105 251.813)" "400" "oklch(0.707 0.165 254.624)" "500" "oklch(0.623 0.214 259.815)" "600" "oklch(0.546 0.245 262.881)" "700" "oklch(0.488 0.243 264.376)" "800" "oklch(0.424 0.199 265.638)" "900" "oklch(0.379 0.146 265.522)" "950" "oklch(0.282 0.091 267.935)") + "indigo" (dict "50" "oklch(0.962 0.018 272.314)" "100" "oklch(0.93 0.034 272.788)" "200" "oklch(0.87 0.065 274.039)" "300" "oklch(0.785 0.115 274.713)" "400" "oklch(0.673 0.182 276.935)" "500" "oklch(0.585 0.233 277.117)" "600" "oklch(0.511 0.262 276.966)" "700" "oklch(0.457 0.24 277.023)" "800" "oklch(0.398 0.195 277.366)" "900" "oklch(0.359 0.144 278.697)" "950" "oklch(0.257 0.09 281.288)") + "violet" (dict "50" "oklch(0.969 0.016 293.756)" "100" "oklch(0.943 0.029 294.588)" "200" "oklch(0.894 0.057 293.283)" "300" "oklch(0.811 0.111 293.571)" "400" "oklch(0.702 0.183 293.541)" "500" "oklch(0.606 0.25 292.717)" "600" "oklch(0.541 0.281 293.009)" "700" "oklch(0.491 0.27 292.581)" "800" "oklch(0.432 0.232 292.759)" "900" "oklch(0.38 0.189 293.745)" "950" "oklch(0.283 0.141 291.089)") + "purple" (dict "50" "oklch(0.977 0.014 308.299)" "100" "oklch(0.946 0.033 307.174)" "200" "oklch(0.902 0.063 306.703)" "300" "oklch(0.827 0.119 306.383)" "400" "oklch(0.714 0.203 305.504)" "500" "oklch(0.627 0.265 303.9)" "600" "oklch(0.558 0.288 302.321)" "700" "oklch(0.496 0.265 301.924)" "800" "oklch(0.438 0.218 303.724)" "900" "oklch(0.381 0.176 304.987)" "950" "oklch(0.291 0.149 302.717)") + "fuchsia" (dict "50" "oklch(0.977 0.017 320.058)" "100" "oklch(0.952 0.037 318.852)" "200" "oklch(0.903 0.076 319.62)" "300" "oklch(0.833 0.145 321.434)" "400" "oklch(0.74 0.238 322.16)" "500" "oklch(0.667 0.295 322.15)" "600" "oklch(0.591 0.293 322.896)" "700" "oklch(0.518 0.253 323.949)" "800" "oklch(0.452 0.211 324.591)" "900" "oklch(0.401 0.17 325.612)" "950" "oklch(0.293 0.136 325.661)") + "pink" (dict "50" "oklch(0.971 0.014 343.198)" "100" "oklch(0.948 0.028 342.258)" "200" "oklch(0.899 0.061 343.231)" "300" "oklch(0.823 0.12 346.018)" "400" "oklch(0.718 0.202 349.761)" "500" "oklch(0.656 0.241 354.308)" "600" "oklch(0.592 0.249 0.584)" "700" "oklch(0.525 0.223 3.958)" "800" "oklch(0.459 0.187 3.815)" "900" "oklch(0.408 0.153 2.432)" "950" "oklch(0.284 0.109 3.907)") + "rose" (dict "50" "oklch(0.969 0.015 12.422)" "100" "oklch(0.941 0.03 12.58)" "200" "oklch(0.892 0.058 10.001)" "300" "oklch(0.81 0.117 11.638)" "400" "oklch(0.712 0.194 13.428)" "500" "oklch(0.645 0.246 16.439)" "600" "oklch(0.586 0.253 17.585)" "700" "oklch(0.514 0.222 16.935)" "800" "oklch(0.455 0.188 13.697)" "900" "oklch(0.41 0.159 10.272)" "950" "oklch(0.271 0.105 12.094)") + "slate" (dict "50" "oklch(0.984 0.003 247.858)" "100" "oklch(0.968 0.007 247.896)" "200" "oklch(0.929 0.013 255.508)" "300" "oklch(0.869 0.022 252.894)" "400" "oklch(0.704 0.04 256.788)" "500" "oklch(0.554 0.046 257.417)" "600" "oklch(0.446 0.043 257.281)" "700" "oklch(0.372 0.044 257.287)" "800" "oklch(0.279 0.041 260.031)" "900" "oklch(0.208 0.042 265.755)" "950" "oklch(0.129 0.042 264.695)") + "gray" (dict "50" "oklch(0.985 0.002 247.839)" "100" "oklch(0.967 0.003 264.542)" "200" "oklch(0.928 0.006 264.531)" "300" "oklch(0.872 0.01 258.338)" "400" "oklch(0.707 0.022 261.325)" "500" "oklch(0.551 0.027 264.364)" "600" "oklch(0.446 0.03 256.802)" "700" "oklch(0.373 0.034 259.733)" "800" "oklch(0.278 0.033 256.848)" "900" "oklch(0.21 0.034 264.665)" "950" "oklch(0.13 0.028 261.692)") + "zinc" (dict "50" "oklch(0.985 0 0)" "100" "oklch(0.967 0.001 286.375)" "200" "oklch(0.92 0.004 286.32)" "300" "oklch(0.871 0.006 286.286)" "400" "oklch(0.705 0.015 286.067)" "500" "oklch(0.552 0.016 285.938)" "600" "oklch(0.442 0.017 285.786)" "700" "oklch(0.37 0.013 285.805)" "800" "oklch(0.274 0.006 286.033)" "900" "oklch(0.21 0.006 285.885)" "950" "oklch(0.141 0.005 285.823)") + "neutral" (dict "50" "oklch(0.985 0 0)" "100" "oklch(0.97 0 0)" "200" "oklch(0.922 0 0)" "300" "oklch(0.87 0 0)" "400" "oklch(0.708 0 0)" "500" "oklch(0.556 0 0)" "600" "oklch(0.439 0 0)" "700" "oklch(0.371 0 0)" "800" "oklch(0.269 0 0)" "900" "oklch(0.205 0 0)" "950" "oklch(0.145 0 0)") + "stone" (dict "50" "oklch(0.985 0.001 106.423)" "100" "oklch(0.97 0.001 106.424)" "200" "oklch(0.923 0.003 48.717)" "300" "oklch(0.869 0.005 56.366)" "400" "oklch(0.709 0.01 56.259)" "500" "oklch(0.553 0.013 58.071)" "600" "oklch(0.444 0.011 73.639)" "700" "oklch(0.374 0.01 67.558)" "800" "oklch(0.268 0.007 34.298)" "900" "oklch(0.216 0.006 56.043)" "950" "oklch(0.147 0.004 49.25)") +}} + +{{ if hasPrefix $colorInput "#" }} + {{/* + HEX PATH: Custom Brand Color + Generate an accessible 50-950 scale by mixing the hex base with white (tints) and black (shades). + We map the user's hex to the '500' slot and interpolate outwards. + */}} + {{ $r := 0 }}{{ $g := 0 }}{{ $b := 0 }} + {{ if eq (len $colorInput) 7 }} + {{ $r = printf "0x%s" (substr $colorInput 1 2) | int }} + {{ $g = printf "0x%s" (substr $colorInput 3 2) | int }} + {{ $b = printf "0x%s" (substr $colorInput 5 2) | int }} + {{ end }} + + {{/* Base (500) */}} + --hb-{{$name}}-500-rgb: {{ $r }} {{ $g }} {{ $b }}; + --color-{{$name}}-500: rgb(var(--hb-{{$name}}-500-rgb)); + + {{/* Tints (50-400): Mix with White */}} + {{ $tints := slice + (dict "shade" "50" "percent" 95) + (dict "shade" "100" "percent" 90) + (dict "shade" "200" "percent" 80) + (dict "shade" "300" "percent" 70) + (dict "shade" "400" "percent" 60) + }} + {{ range $tints }} + {{ $p := .percent }} + {{ $rp := div (add (mul $r (sub 100 $p)) (mul 255 $p)) 100 }} + {{ $gp := div (add (mul $g (sub 100 $p)) (mul 255 $p)) 100 }} + {{ $bp := div (add (mul $b (sub 100 $p)) (mul 255 $p)) 100 }} + --hb-{{$name}}-{{ .shade }}-rgb: {{ $rp }} {{ $gp }} {{ $bp }}; + --color-{{$name}}-{{ .shade }}: rgb(var(--hb-{{$name}}-{{ .shade }}-rgb)); + {{ end }} + + {{/* Shades (600-950): Mix with Black */}} + {{ $shades := slice + (dict "shade" "600" "percent" 10) + (dict "shade" "700" "percent" 20) + (dict "shade" "800" "percent" 35) + (dict "shade" "900" "percent" 50) + (dict "shade" "950" "percent" 70) + }} + {{ range $shades }} + {{ $p := .percent }} + {{ $rp := div (mul $r (sub 100 $p)) 100 }} + {{ $gp := div (mul $g (sub 100 $p)) 100 }} + {{ $bp := div (mul $b (sub 100 $p)) 100 }} + --hb-{{$name}}-{{ .shade }}-rgb: {{ $rp }} {{ $gp }} {{ $bp }}; + --color-{{$name}}-{{ .shade }}: rgb(var(--hb-{{$name}}-{{ .shade }}-rgb)); + {{ end }} + +{{ else }} + {{/* + PALETTE PATH: Standard Tailwind Colors + Look up the exact OKLCH values for the requested palette (e.g. "indigo"). + This ensures complete visual consistency with standard Tailwind utilities. + */}} + {{ $palette := index $tailwind_palette $colorInput }} + + {{ if $palette }} + {{ range $shade, $value := $palette }} + {{/* Note: converting OKLCH to raw RGB CSS vars requires Tailwind 4's internal conversion + or we output the raw color value directly if theme.css supports it. + + The existing system expects --hb-primary-50-rgb to be a comma-less RGB triplet "255 255 255". + However, Tailwind 4 supports OKLCH natively. + + CRITICAL FIX: We must override the `rgb(var(...))` wrapper in `theme.css` if we want to use OKLCH. + OR we just output the RGB approximation if we want to keep `theme.css` untouched. + + BUT `theme.css` defines: --color-primary-50: rgb(var(--hb-primary-50-rgb)); + So we MUST provide RGB triplets. OKLCH strings like "oklch(...)" inside `rgb(...)` is invalid CSS. + + To fix this properly without changing `theme.css` significantly, we need RGB values in this table, + OR we redefine the higher-level variables. + + Since we cannot easily calculate OKLCH -> RGB in Hugo templates, we should + OUTPUT THE HIGHER LEVEL VARIABLES directly here to override theme.css. + */}} + --color-{{$name}}-{{$shade}}: {{ $value }}; + {{ end }} + + {{/* Also set the legacy RGB vars to a fallback (500 shade) to prevent breakage + in case something accesses the raw -rgb var directly, though unlikely */}} + --hb-{{$name}}-500-rgb: 128 128 128; + {{ else }} + {{/* Unknown palette '{{$colorInput}}', falling back to Indigo-like default */}} + {{ partial "functions/generate_color_scale" (dict "name" $name "color" "#6366f1") }} + {{ end }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get-block-scripts.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get-block-scripts.html new file mode 100644 index 0000000..c577222 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get-block-scripts.html @@ -0,0 +1,19 @@ +{{/* + Get Block Scripts + Discovers and returns a slice of JavaScript files for blocks used on the current page. +*/}} +{{ $block_scripts := slice }} +{{ if .IsPage }} + {{/* Get the list of unique block types used on this page from the Page Store */}} + {{ $block_types := .Page.Store.Get "block_types" | default (slice) | uniq }} + + {{ range $block_type := $block_types }} + {{/* Check if a JS file exists for this block type */}} + {{ $script_path := printf "js/hbx/blocks/%s/%s.js" $block_type $block_type }} + {{ with resources.Get $script_path }} + {{ $block_scripts = $block_scripts | append . }} + {{ end }} + {{ end }} +{{ end }} +{{ return $block_scripts }} + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get-build-id.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get-build-id.html new file mode 100644 index 0000000..18a8cbb --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get-build-id.html @@ -0,0 +1,5 @@ +{{/* + Get Build ID - Returns a consistent build identifier for the current build cycle. + This is cached across the entire build to prevent log duplication during dev rebuilds. +*/}} +{{- printf "%d" now.Unix -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_address.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_address.html new file mode 100644 index 0000000..02a4627 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_address.html @@ -0,0 +1,23 @@ +{{/* Function to return a formatted address given a semantic address. */}} + +{{/* Check for valid site config. */}} +{{ if not hugo.Data.address_formats }}{{errorf "Address formats missing from `data/address_formats.toml`!"}}{{end}} + +{{ $page := . }} +{{ $address := .address }} +{{ $format_name := $page.Params.address_format | default site.Params.hugoblox.locale.address_format | default "en-us" }} + +{{ if not (isset hugo.Data.address_formats $format_name) }}{{ errorf "Address format `%s` missing from `data/address_formats.toml`!" $format_name }}{{end}} + +{{ $format := index hugo.Data.address_formats $format_name }} +{{ $address_display := slice }} + +{{ range $k, $v := $format.order }} + {{ if eq $v "street" | and $address.street }}{{$address_display = $address_display | append (transform.HTMLEscape $address.street) | append (index $format.delimiters $k | default "") }}{{end}} + {{ if eq $v "city" | and $address.city }}{{$address_display = $address_display | append (transform.HTMLEscape $address.city) | append (index $format.delimiters $k | default "") }}{{end}} + {{ if eq $v "region" | and $address.region }}{{$address_display = $address_display | append (transform.HTMLEscape $address.region) | append (index $format.delimiters $k | default "") }}{{end}} + {{ if eq $v "postcode" | and $address.postcode }}{{$address_display = $address_display | append (transform.HTMLEscape $address.postcode) | append (index $format.delimiters $k | default "") }}{{end}} + {{ if eq $v "country" | and $address.country }}{{$address_display = $address_display | append (transform.HTMLEscape $address.country) | append (index $format.delimiters $k | default "") }}{{end}} +{{end}} + +{{ return safeHTML (delimit $address_display "") }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_author_name.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_author_name.html new file mode 100644 index 0000000..3ce8216 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_author_name.html @@ -0,0 +1,26 @@ +{{/* Get name of primary author. */}} + +{{ $page := . }} + +{{/* Get publisher as fall back. */}} +{{ $branding := partialCached "functions/get_branding" $page "branding" }} +{{ $publisher := $branding.organization }} + +{{ $author := "" }} +{{ $author_slug := "" }} + +{{ if and (not $page.Params.authors) ($page.Scratch.Get "superuser_slug") }} + {{ $author_slug = $page.Scratch.Get "superuser_slug" }} +{{ else if $page.Params.authors }} + {{ $author = index $page.Params.authors 0 }} + {{ $author_slug = urlize $author }} +{{ end }} + +{{ $profile := partial "functions/get_author_profile" (dict "slug" $author_slug) }} +{{ if $profile.title }} + {{ $author = $profile.title }} +{{ else }} + {{ $author = $author | default $publisher }} +{{ end }} + +{{ return $author }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_author_profile.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_author_profile.html new file mode 100644 index 0000000..20c9b8b --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_author_profile.html @@ -0,0 +1,136 @@ +{{/* +Return a normalized HugoBlox author/person profile from data. + +Input (flexible): +- dict with "slug" key, or a raw string slug. + +Output (dict): +- slug: string +- title: string (display name, fallback to humanized slug) +- role: string (optional) +- bio: string (optional) +- status: map (optional) +- affiliations: array (optional) +- ids: map (optional) +- links: array (optional) +- is_owner: bool (optional) +- has_data: bool (true if found in data/authors) +- avatar: resource (optional) – matching assets/media/authors/.* +*/}} + +{{- $input := . -}} +{{- $slug := "" -}} +{{- $rawTitle := "" -}} + +{{- $inputType := printf "%T" $input -}} + +{{- if (reflect.IsMap $input) -}} + {{- $slug = index $input "slug" | default "" -}} + {{- with index $input "title" }}{{ $rawTitle = . }}{{ end -}} +{{- else if eq $inputType "string" -}} + {{- $slug = $input -}} + {{- $rawTitle = $input -}} +{{- else -}} + {{- $slug = printf "%v" $input -}} +{{- end -}} + +{{- $rawTitle = trim $rawTitle " " -}} + +{{- $slug = $slug | urlize -}} + +{{- $authors := partialCached "functions/get_authors_data" . site.Language.Lang -}} +{{- $data := index $authors $slug -}} +{{- $hasData := $data -}} + +{{/* Structured name resolution */}} +{{- $name := $data.name -}} +{{- $display := "" -}} +{{- $given := "" -}} +{{- $family := "" -}} +{{- $middle := "" -}} +{{- $alternate := "" -}} +{{- $namePronunciation := "" -}} +{{- $namePronouns := "" -}} + +{{- if $name.display }}{{ $display = $name.display }}{{ end }} +{{- if $name.given }}{{ $given = $name.given }}{{ end }} +{{- if $name.family }}{{ $family = $name.family }}{{ end }} +{{- if $name.middle }}{{ $middle = $name.middle }}{{ end }} +{{- if $name.alternate }}{{ $alternate = $name.alternate }}{{ end }} +{{- if $name.pronunciation }}{{ $namePronunciation = $name.pronunciation }}{{ end }} +{{- if $name.pronouns }}{{ $namePronouns = $name.pronouns }}{{ end }} + +{{- $title := "" -}} +{{- if $display -}} + {{- $title = $display -}} +{{- else if $data.title -}} + {{- $title = $data.title -}} +{{- else if $rawTitle -}} + {{- $title = $rawTitle -}} +{{- else -}} + {{- $title = $slug | humanize | title -}} +{{- end -}} + +{{- $role := $data.role -}} +{{- $bio := $data.bio -}} +{{- $status := $data.status -}} +{{- $affiliations := $data.affiliations -}} +{{- $ids := $data.ids -}} +{{- $links := $data.links -}} +{{- $isOwner := or ($data.is_owner) ($data.superuser) -}} +{{- $pronouns := $namePronouns | default $data.pronouns -}} +{{- $userGroups := $data.user_groups -}} +{{- $interests := $data.interests -}} +{{- $education := $data.education -}} +{{- $experience := or $data.experience $data.work -}} +{{- $skills := $data.skills -}} +{{- $languages := $data.languages -}} +{{- $awards := $data.awards -}} +{{- $graduationYear := $data.graduation_year -}} +{{- $weight := $data.weight -}} +{{- $nameFamily := $data.name.family | default $family -}} +{{- $postnominals := slice -}} +{{- if $data.postnominals -}} + {{- if (reflect.IsSlice $data.postnominals) -}} + {{- $postnominals = $data.postnominals -}} + {{- else -}} + {{- $postnominals = slice $data.postnominals -}} + {{- end -}} +{{- end -}} + +{{- /* Avatar resolution: look in assets/media/authors/.* */ -}} +{{- $avatar := resources.GetMatch (printf "media/authors/%s.*" $slug) -}} + +{{- $profile := dict + "slug" $slug + "title" $title + "name_display" $display + "name_given" $given + "name_family" $family + "name_family_pref" $nameFamily + "name_middle" $middle + "name_alternate" $alternate + "name_pronunciation" $namePronunciation + "role" $role + "bio" $bio + "status" $status + "affiliations" $affiliations + "ids" $ids + "links" $links + "pronouns" $pronouns + "user_groups" $userGroups + "interests" $interests + "education" $education + "experience" $experience + "skills" $skills + "languages" $languages + "awards" $awards + "graduation_year" $graduationYear + "weight" $weight + "postnominals" $postnominals + "is_owner" $isOwner + "has_data" (not (eq $hasData nil)) + "avatar" $avatar +-}} + +{{- return $profile -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_authors_data.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_authors_data.html new file mode 100644 index 0000000..04a250c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_authors_data.html @@ -0,0 +1,54 @@ +{{/* + Return the authors data map for the current language. + + For multilingual sites, language-specific author data from data//authors/ + is merged on top of the default data/authors/ files. This allows translating + fields like name, bio, role, etc., while inheriting non-translated fields. + + Usage: + {{ $authors := partialCached "functions/get_authors_data" . site.Language.Lang }} + + Returns: map of slug → author data (same shape as hugo.Data.authors) +*/}} + +{{- $authors := hugo.Data.authors -}} +{{- if not $authors -}} + {{- $authors = dict -}} +{{- end -}} + +{{/* Check for language-specific author overrides */}} +{{- $lang := site.Language.Lang -}} +{{- $langData := index hugo.Data $lang -}} +{{- if $langData -}} + {{- $langAuthors := index $langData "authors" -}} + {{- if $langAuthors -}} + {{/* Merge each language-specific author data on top of the default */}} + {{- $merged := dict -}} + {{/* Start with all default authors */}} + {{- range $slug, $data := $authors -}} + {{- $langAuthor := index $langAuthors $slug -}} + {{- if $langAuthor -}} + {{/* Language data overrides default; merge gives $langAuthor priority */}} + {{- $mergedAuthor := merge $data $langAuthor -}} + {{/* Deep-merge the 'name' submap if both have it */}} + {{- $baseName := index $data "name" -}} + {{- $langName := index $langAuthor "name" -}} + {{- if and (reflect.IsMap $baseName) (reflect.IsMap $langName) -}} + {{- $mergedAuthor = merge $mergedAuthor (dict "name" (merge $baseName $langName)) -}} + {{- end -}} + {{- $merged = merge $merged (dict $slug $mergedAuthor) -}} + {{- else -}} + {{- $merged = merge $merged (dict $slug $data) -}} + {{- end -}} + {{- end -}} + {{/* Add any authors that only exist in the language data */}} + {{- range $slug, $data := $langAuthors -}} + {{- if not (index $authors $slug) -}} + {{- $merged = merge $merged (dict $slug $data) -}} + {{- end -}} + {{- end -}} + {{- $authors = $merged -}} + {{- end -}} +{{- end -}} + +{{- return $authors -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_branding.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_branding.html new file mode 100644 index 0000000..355acef --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_branding.html @@ -0,0 +1,42 @@ +{{/* + get_branding.html - Centralized branding configuration helper (v2) + + Returns a dict with: + - name: Display name (navbar, footer, JSON-LD publisher) + - site_title: Browser tab title / SEO title + - organization: Legal/copyright entity name + + Fallback chain: + - site_title → seo.title → name → site.Title + - organization → name → site.Title +*/}} + +{{/* v2 structure: hugoblox.identity */}} +{{ $hb := site.Params.hugoblox | default dict }} +{{ $identity := $hb.identity | default dict }} +{{ $seo := $hb.seo | default dict }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + NAME (primary display name) + Priority: hugoblox.identity.name → site.Title +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $name := $identity.name | default site.Title }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + SITE_TITLE (browser tab / SEO title) + Priority: hugoblox.seo.title → hugoblox.identity.name → site.Title +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $site_title := $seo.title | default $name }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + ORGANIZATION (legal/copyright entity) + Priority: hugoblox.identity.organization → name +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $organization := $identity.organization | default $name }} + +{{/* Return branding dict */}} +{{ return dict + "name" $name + "site_title" $site_title + "organization" $organization +}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_cover_image.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_cover_image.html new file mode 100644 index 0000000..b0945e5 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_cover_image.html @@ -0,0 +1,46 @@ +{{/* HugoBlox function to retrieve the cover image */}} +{{/* Inputs: page context */}} +{{/* Output: image resource, or nil if not found */}} + +{{/* + Cover image is searched in this order: + 1. Search for a file `*cover*` in the page directory + 2. Search for a file `.Params.cover.image` in the page directory + 3. Search for a file `.Params.cover.image` in the `assets/media/` directory +*/}} + +{{/* Search for an image "*cover*" in page folder */}} +{{ $resource := (.Resources.ByType "image").GetMatch "*cover*" }} +{{ if not (reflect.IsResource $resource) }} + {{/* Otherwise fall back to the image file specified in front matter */}} + {{ $filename := "" }} + {{ if .Params.cover }} + {{ if reflect.IsMap .Params.cover }} + {{ $filename = .Params.cover.image }} + {{ else }} + {{/* Support simple string format: cover: "image.jpg" */}} + {{ $filename = .Params.cover }} + {{ end }} + {{ end }} + {{ if $filename }} + {{/* Check if it's a remote URL */}} + {{ if or (strings.HasPrefix $filename "http://") (strings.HasPrefix $filename "https://") }} + {{ with resources.GetRemote $filename }} + {{ if reflect.IsResource . }} + {{ $resource = . }} + {{ else }} + {{ warnf "Remote cover image not found: %s" $filename }} + {{ end }} + {{ else }} + {{ warnf "Remote cover image not found: %s" $filename }} + {{ end }} + {{ else }} + {{/* Search in page folder */}} + {{ $resource = (.Resources.ByType "image").GetMatch $filename }} + {{/* Otherwise in `assets/media/` folder */}} + {{ if not (reflect.IsResource $resource) }} {{ $resource = resources.GetMatch (path.Join "media" $filename) }} {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{ return $resource }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_event_dates.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_event_dates.html new file mode 100644 index 0000000..df093de --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_event_dates.html @@ -0,0 +1,21 @@ +{{/* Function to get event start and end dates/times. */}} +{{ $start_date := .Params.event_start | default .Date }} +{{ $end_date := .Params.event_end | default .Params.date_end }} +{{ $all_day := .Params.event_all_day | default .Params.all_day }} + +{{ $t1 := time $start_date }}{{/* Start datetime. */}} +{{ $str := slice (time.Format (site.Params.hugoblox.locale.date_format | default ":date_long") (time $t1)) }}{{/* Init return string with start date. */}} +{{/* Show start time if not all day event. */}} +{{ if not $all_day }}{{ $str = $str | append (time.Format (site.Params.hugoblox.locale.time_format | default "3:04 PM") (time $t1)) }}{{ end }} +{{/* Show event end date if provided. */}} +{{ if $end_date }} + {{ $str = $str | append "—" }} + {{ $t2 := time $end_date}}{{/* End datetime. */}} + {{/* Show end date if it differs to start date. */}} + {{ if not (eq $t1.Year $t2.Year | and (eq $t1.Month $t2.Month) | and (eq $t1.Day $t2.Day)) }} + {{ $str = $str | append (time.Format (site.Params.hugoblox.locale.date_format | default ":date_long") (time $t2)) }} + {{ end }} + {{/* Show end time if not all day event. */}} + {{ if not $all_day }}{{ $str = $str | append (time.Format (site.Params.hugoblox.locale.time_format | default "3:04 PM") (time $t2)) }}{{ end }} +{{ end }} +{{ return ((delimit $str " ") | safeHTML) }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_featured_image.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_featured_image.html new file mode 100644 index 0000000..11d71df --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_featured_image.html @@ -0,0 +1,26 @@ +{{/* Function to retrieve the featured image */}} +{{/* Inputs: page context */}} +{{/* Output: image resource, or nil if not found */}} + +{{/* + Featured image is searched in this order: + 1. Search for a file `*featured*` in the page directory + 2. Search for a file `.Params.image.filename` in the page directory + 3. Search for a file `.Params.image.filename` in the `assets/media/` directory +*/}} + +{{/* Search for an image "*featured*" in page folder */}} +{{ $resource := (.Resources.ByType "image").GetMatch "*featured*" }} +{{ if not (reflect.IsResource $resource) }} + {{/* Otherwise fall back the image file specified in front matter */}} + {{ $filename := "" }} + {{ if and .Params.image (reflect.IsMap .Params.image) }} + {{ $filename = .Params.image.filename }} + {{ end }} + {{/* Search in page folder */}} + {{ $resource = (.Resources.ByType "image").GetMatch $filename }} + {{/* Otherwise in `assets/media/` folder */}} + {{ if not (reflect.IsResource $resource) }} {{ $resource = resources.GetMatch (path.Join "media" $filename) }} {{ end }} +{{ end }} + +{{ return $resource }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_hook.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_hook.html new file mode 100644 index 0000000..21a1d40 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_hook.html @@ -0,0 +1,21 @@ +{{/* Function to inject custom code into layouts without overriding files. */}} +{{/* Input: hook folder name (str) */}} +{{/* Output: loaded (bool) */}} + +{{ $loaded := false }} +{{ $partial_dir := printf "hooks/%s/" .hook }} +{{ $context := .context }} +{{ $hook_dir_path := path.Join "layouts/_partials" $partial_dir }} +{{ with try (os.ReadDir $hook_dir_path) }} + {{ with .Value }} + {{ range . }} + {{ if not .IsDir }} + {{ $partial_path := path.Join $partial_dir .Name }} + {{ partial $partial_path $context }} + {{ $loaded = true }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} +{{/* The return statement below is for debug purposes only and prevents the above partial(s) being included in the page */}} +{{/* return $loaded */}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_icon.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_icon.html new file mode 100644 index 0000000..d12603a --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_icon.html @@ -0,0 +1,58 @@ +{{/* Return the requested SVG icon as safeHTML for Go template rendering. + Handles emoji packs and attribute injection on top of the shared get_icon_svg.html core. */}} + +{{ $dirFile := path.Split .name }} +{{ $pack := .pack | default (strings.Replace $dirFile.Dir "/" "") | default "hero" }} +{{ $name := $dirFile.File }} + +{{ $icon := "" }} + +{{- if eq $pack "emoji" -}} + {{/* Handle emoji pack: convert name to :name: format and emojify */}} + {{ $wrapped := cond (hasPrefix $name ":") $name (printf ":%s:" $name) }} + {{ $emoji := $wrapped | emojify }} + {{ $attrs := .attributes | default "" }} + {{/* Convert SVG sizing to emoji text sizing with important specificity */}} + {{ if in $attrs "w-24" }}{{ $attrs = replaceRE "w-24 h-24" "" $attrs }}{{ $attrs = printf "%s text-8xl leading-none" $attrs }}{{ end }} + {{ if in $attrs "w-16" }}{{ $attrs = replaceRE "w-16 h-16" "" $attrs }}{{ $attrs = printf "%s text-5xl leading-none" $attrs }}{{ end }} + {{ if in $attrs "w-12" }}{{ $attrs = replaceRE "w-12 h-12" "" $attrs }}{{ $attrs = printf "%s text-5xl leading-none" $attrs }}{{ end }} + {{ if in $attrs "w-8" }}{{ $attrs = replaceRE "w-8 h-8" "" $attrs }}{{ $attrs = printf "%s text-4xl leading-none" $attrs }}{{ end }} + {{ if in $attrs "w-6" }}{{ $attrs = replaceRE "w-6 h-6" "" $attrs }}{{ $attrs = printf "%s text-2xl leading-none" $attrs }}{{ end }} + {{ if in $attrs "w-5" }}{{ $attrs = replaceRE "w-5 h-5" "" $attrs }}{{ $attrs = printf "%s text-xl leading-none" $attrs }}{{ end }} + {{ if in $attrs "w-4" }}{{ $attrs = replaceRE "w-4 h-4" "" $attrs }}{{ $attrs = printf "%s text-lg leading-none" $attrs }}{{ end }} + {{/* Add inline style for guaranteed sizing */}} + {{ $style_attr := "" }} + {{ if in $attrs "text-8xl" }}{{ $style_attr = "style=\"font-size: 6rem !important; line-height: 1 !important;\"" }}{{ end }} + {{ if in $attrs "text-5xl" }}{{ $style_attr = "style=\"font-size: 3rem !important; line-height: 1 !important;\"" }}{{ end }} + {{ if in $attrs "text-4xl" }}{{ $style_attr = "style=\"font-size: 2.25rem !important; line-height: 1 !important;\"" }}{{ end }} + {{ if in $attrs "text-2xl" }}{{ $style_attr = "style=\"font-size: 1.5rem !important; line-height: 1 !important;\"" }}{{ end }} + {{ if in $attrs "text-xl" }}{{ $style_attr = "style=\"font-size: 1.25rem !important; line-height: 1 !important;\"" }}{{ end }} + {{ if in $attrs "text-lg" }}{{ $style_attr = "style=\"font-size: 1.125rem !important; line-height: 1 !important;\"" }}{{ end }} + {{ $attrs = printf "%s %s" $attrs $style_attr }} + {{ $icon = printf "%s" $attrs $emoji }} +{{- else -}} + {{/* Try to resolve as an SVG icon from packs / user assets */}} + {{ $icon = partial "functions/get_icon_svg" (dict "name" .name "pack" (.pack | default "") "Page" .Page) }} + + {{- if not $icon -}} + {{/* No pack prefix and not found in hero — treat the raw name as a Unicode emoji */}} + {{ if not (strings.Contains $.name "/") }} + {{ $attrs := .attributes | default "" }} + {{ if in $attrs "w-24" }}{{ $attrs = replaceRE "w-24 h-24" "text-8xl" $attrs }}{{ end }} + {{ if in $attrs "w-16" }}{{ $attrs = replaceRE "w-16 h-16" "text-5xl" $attrs }}{{ end }} + {{ if in $attrs "w-12" }}{{ $attrs = replaceRE "w-12 h-12" "text-5xl" $attrs }}{{ end }} + {{ if in $attrs "w-8" }}{{ $attrs = replaceRE "w-8 h-8" "text-4xl" $attrs }}{{ end }} + {{ if in $attrs "w-6" }}{{ $attrs = replaceRE "w-6 h-6" "text-2xl" $attrs }}{{ end }} + {{ if in $attrs "w-5" }}{{ $attrs = replaceRE "w-5 h-5" "text-xl" $attrs }}{{ end }} + {{ if in $attrs "w-4" }}{{ $attrs = replaceRE "w-4 h-4" "text-lg" $attrs }}{{ end }} + {{ if not (in $attrs "flex") }}{{ $attrs = replaceRE "class=\"" "class=\"flex items-center justify-center leading-none " $attrs }}{{ end }} + {{ $icon = printf "%s" $attrs $.name }} + {{ end }} + {{- end -}} +{{- end -}} + +{{ if .attributes }} + {{ $icon = replaceRE " tag) + 3. Fallback to hb pack + 4. User assets at assets/media/icons/{pack}/{name}.svg + 5. Hugo brand icon as last resort (only when an explicit pack was specified) +*/}} + +{{- $dirFile := path.Split .name -}} +{{- $pack := .pack | default (strings.Replace $dirFile.Dir "/" "") | default "hero" -}} +{{- $name := $dirFile.File -}} +{{- $explicitPack := or (.pack) (strings.Contains .name "/") -}} + +{{- /* Resolve icon aliases (e.g. brands/google-scholar → brands/googlescholar) */ -}} +{{- with index hugo.Data.icons.aliases $pack -}} + {{- with index . $name -}} + {{- $name = . -}} + {{- end -}} +{{- end -}} + +{{- $icon := "" -}} +{{- $icon_pack := index hugo.Data.icons $pack -}} +{{- $pack_icon := index (index $icon_pack "icons") $name -}} + +{{- if $pack_icon -}} + {{- if eq $pack "hb" -}} + {{- $icon = $pack_icon -}} + {{- else -}} + {{- $icon_body := index $pack_icon "body" -}} + {{- $icon_size := index $icon_pack "height" -}} + {{- $icon = printf `%s` (cast.ToString $icon_size) (cast.ToString $icon_size) $icon_body -}} + {{- end -}} +{{- else -}} + {{- /* Icon not found in pack — try hb fallback, then user assets */ -}} + {{- with index (index hugo.Data.icons.hb "icons") $name -}} + {{- $icon = . -}} + {{- else -}} + {{- $prefix := printf "media/icons/%s/" $pack -}} + {{- $icon_path := printf "%s%s.svg" $prefix $name -}} + {{- $icon_resource := resources.Get $icon_path -}} + {{- if $icon_resource -}} + {{- $icon = $icon_resource.Content -}} + {{- else if $explicitPack -}} + {{- /* Only warn and use Hugo brand fallback when user specified an explicit pack */ -}} + {{- if not (fileExists (printf "assets/%s" $icon_path)) -}} + {{ $pageRef := "unknown location" }} + {{ if $.Page }} + {{ if $.Page.File }} + {{ if $.Page.File.Path }} + {{ $pageRef = $.Page.File.Path }} + {{ else if $.Page.RelPermalink }} + {{ $pageRef = $.Page.RelPermalink }} + {{ end }} + {{ else if $.Page.RelPermalink }} + {{ $pageRef = $.Page.RelPermalink }} + {{ end }} + {{ end }} + {{ partial "functions/logger" (dict + "page" $.Page + "level" "warn" + "id" (printf "missing-icon-%s-%s" $pack $name) + "message" (printf "The icon `%s` was not found in `assets/media/icons/%s/`. Referenced in: %s" $name $pack $pageRef) + ) + }} + {{- end -}} + {{- with index (index hugo.Data.icons.brands "icons") "hugo" -}} + {{- $icon = printf `%s` (index . "body") -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{- return $icon -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_logo.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_logo.html new file mode 100644 index 0000000..11b0514 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_logo.html @@ -0,0 +1,41 @@ +{{/* + HugoBlox Image Engine: Get website logo + + SVG-first detection for crisp rendering at any size. + Auto-detects from assets/media/: + 1. logo.svg (preferred - vector, infinite scalability) + 2. logo.png (fallback - raster, processed by Hugo) + + Inputs: + - constraint: "max_height" or "fit" (default: "fit") + - size: int - Target size in pixels + + Output: dict with: + - resource: The logo resource (processed if PNG) + - type: MIME type ("image/svg+xml" or "image/png") + - is_svg: boolean +*/}} + +{{ $constraint := .constraint | default "fit" }} +{{ $size := .size | default 36 }} +{{ $result := dict "resource" nil "type" "" "is_svg" false }} + +{{/* 1. Check for SVG first (preferred) */}} +{{ $logo_svg := resources.Get "media/logo.svg" }} +{{ if $logo_svg }} + {{ $result = dict "resource" $logo_svg "type" "image/svg+xml" "is_svg" true }} +{{ else }} + {{/* 2. Fallback to PNG */}} + {{ $logo_png := resources.Get "media/logo.png" }} + {{ if $logo_png }} + {{ $logo_processed := $logo_png }} + {{ if eq $constraint "max_height" }} + {{ $logo_processed = $logo_png.Resize (printf "x%d" $size) }} + {{ else }} + {{ $logo_processed = $logo_png.Fit (printf "%dx%d" $size $size) }} + {{ end }} + {{ $result = dict "resource" $logo_processed "type" "image/png" "is_svg" false }} + {{ end }} +{{ end }} + +{{ return $result }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_logo_url.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_logo_url.html new file mode 100644 index 0000000..a4e4f70 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_logo_url.html @@ -0,0 +1,13 @@ +{{/* Function to get logo URL for JSONLD. */}} +{{/* Inputs: page context */}} +{{/* Output: logo URL (URL) */}} + +{{ $logo_url := "" }} +{{ if resources.Get "media/logo.png" | or (resources.Get "media/logo.svg") }} + {{/* !CACHED! Can safely cache this site logo variant */}} + {{ $logo_url = (partialCached "functions/get_logo" (dict "constraint" "fit" "size" 192)).Permalink }} +{{ else }} + {{ $logo_url = (partial "functions/get_site_icon" 192).Permalink }} +{{ end }} + +{{ return $logo_url }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_page_title.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_page_title.html new file mode 100644 index 0000000..0151e8f --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_page_title.html @@ -0,0 +1,8 @@ +{{ $title := "" }} +{{ with .Params.seo.title }} + {{ $title = replace . "{brand}" site.Title }} +{{ else }} + {{ $title = .Title | default site.Title }} + {{ if ne $title site.Title }}{{ $title = printf "%s | %s" $title site.Title }}{{ end }} +{{ end }} +{{ return $title }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_site_icon.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_site_icon.html new file mode 100644 index 0000000..9ca8039 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_site_icon.html @@ -0,0 +1,42 @@ +{{/* + HugoBlox Image Engine: Get website favicon/icon + + SVG-first detection for modern browser support. + Auto-detects from assets/media/: + 1. icon.svg (preferred - vector, supports dark mode) + 2. icon.png (fallback - raster, processed by Hugo) + + Input: size (int) - Only used for PNG processing + Output: dict with: + - resource: The icon resource + - type: MIME type ("image/svg+xml" or "image/png") + - is_svg: boolean +*/}} + +{{ $size := . | default 32 }} +{{ $result := dict "resource" nil "type" "" "is_svg" false }} + +{{/* 1. Check for SVG first (preferred) */}} +{{ $icon_svg := resources.Get "media/icon.svg" }} +{{ if $icon_svg }} + {{ $result = dict "resource" $icon_svg "type" "image/svg+xml" "is_svg" true }} +{{ else }} + {{/* 2. Fallback to PNG */}} + {{ $icon_png := resources.Get "media/icon.png" }} + {{ if $icon_png }} + {{ $icon_resized := $icon_png.Fill (printf "%sx%s Center" (string $size) (string $size)) }} + {{ $result = dict "resource" $icon_resized "type" "image/png" "is_svg" false }} + {{ else }} + {{/* 3. Ultimate fallback: Try to generate from logo */}} + {{ $logo_png := resources.Get "media/logo.png" }} + {{ if $logo_png }} + {{ $icon_from_logo := $logo_png.Fill (printf "%sx%s Center" (string $size) (string $size)) }} + {{ $result = dict "resource" $icon_from_logo "type" "image/png" "is_svg" false }} + {{ else }} + {{/* 4. No icon found */}} + {{ warnf "No favicon found. Please add assets/media/icon.svg (preferred) or assets/media/icon.png" }} + {{ end }} + {{ end }} +{{ end }} + +{{ return $result }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_sort_by_parameter.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_sort_by_parameter.html new file mode 100644 index 0000000..ce35839 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_sort_by_parameter.html @@ -0,0 +1,24 @@ +{{/* Uniform 'sort_by' parameter between built-in Hugo and Hugo Blox Kit ones */}} +{{/* Input: 'sort_by' parameter (string) */}} +{{/* Output: fixed 'sort_by' parameter (string) */}} + +{{/* + Fix the 'sort_by' parameter, by adding "Params." as prefix if it is not a built-in Hugo parameter. + Since Hugo Blox Kit parameters are all standardised to lowercase-underscore convention, we: + - remove any leading ".": ".Date" is the same as "Date" + - check the first letter: + - if it is capitalized, then we have a built-in Hugo parameter, and we do nothing + - otherwise, it is a custom Hugo Blox Kit parameter, and we add "Params." as prefix + This logic should also be backward compatible, since "Params.my_param" is not modified. +*/}} + +{{ $param := strings.TrimLeft "." . }} +{{/* Get first letter */}} +{{ $first := substr $param 0 }} +{{/* Check if it is lowercase */}} +{{ if eq $first (lower $first) }} + {{/* Add 'Params.' prefix */}} + {{ $param = printf "Params.%s" $param }} +{{ end }} + +{{ return $param }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_summary.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_summary.html new file mode 100644 index 0000000..421db9e --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_summary.html @@ -0,0 +1,3 @@ +{{/* Get page summary with fallback priority: Params.summary > Params.description > Params.abstract > Summary */}} +{{ $summary := .Params.summary | default .Params.description | default .Params.abstract | default .Summary }} +{{ return $summary }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_theme_config.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_theme_config.html new file mode 100644 index 0000000..9e9d711 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/get_theme_config.html @@ -0,0 +1,165 @@ +{{/* + HugoBlox Theme Engine: Get theme configuration (v2) + + Returns a dict with: + - mode: 'light' | 'dark' | 'system' + - light: Light theme pack name (default: "default") + - dark: Dark theme pack name (default: "default") + - colors: Global color overrides { primary, secondary, neutral } + - colors_light: Light-mode specific color overrides + - colors_dark: Dark-mode specific color overrides + - surfaces: Semantic surface colors { background, foreground, header, footer } + - typography: { font, size } + - layout: { radius, spacing } +*/}} + +{{/* v2 structure */}} +{{ $hb := site.Params.hugoblox | default dict }} +{{ $hb_theme := $hb.theme | default dict }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + MODE (light/dark/system) +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $mode := $hb_theme.mode | default "system" }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + THEME PACK SELECTION (light/dark) + + Pack can be: + - String: "default" (applies to both) + - Object: { light: "latte", dark: "americano" } +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $light_pack := "default" }} +{{ $dark_pack := "default" }} + +{{ $pack := $hb_theme.pack | default "default" }} +{{ if reflect.IsMap $pack }} + {{ $light_pack = $pack.light | default "default" }} + {{ $dark_pack = $pack.dark | default "default" }} +{{ else }} + {{/* Single string applies to both */}} + {{ $light_pack = $pack }} + {{ $dark_pack = $pack }} +{{ end }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + COLOR OVERRIDES +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $colors := $hb_theme.colors | default dict }} +{{ $colors_light := $hb_theme.colors_light | default dict }} +{{ $colors_dark := $hb_theme.colors_dark | default dict }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + SEMANTIC SURFACE COLORS +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $surfaces := $hb_theme.surfaces | default dict }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + TYPOGRAPHY + + Font packs are loaded from data/fonts/ and provide: + - families: { heading, body, code, nav } + - weights: { heading, body, code, nav } (arrays) + - sizes: { base, sm, lg } + - leading: { heading, body, code } + - tracking: { heading, body, caps } + + Legacy support: typography.font (sans/serif/native) maps to pack names +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $hb_typography := $hb.typography | default dict }} + +{{/* Resolve font pack name */}} +{{ $font_pack_name := $hb_typography.pack | default "modern" }} + +{{/* Load the font pack */}} +{{ $font_pack := partial "functions/load_font_pack" $font_pack_name }} + +{{/* Resolve families — inline overrides take priority */}} +{{ $pack_families := $font_pack.families | default dict }} +{{ $inline_families := $hb_typography.families | default dict }} +{{ $families := dict + "heading" ($inline_families.heading | default $pack_families.heading | default "Inter") + "body" ($inline_families.body | default $pack_families.body | default "Inter") + "code" ($inline_families.code | default $pack_families.code | default "JetBrains Mono") + "nav" ($inline_families.nav | default $pack_families.nav | default "") +}} + +{{/* Resolve weights — inline overrides take priority */}} +{{ $pack_weights := $font_pack.weights | default dict }} +{{ $inline_weights := $hb_typography.weights | default dict }} +{{ $weights := dict + "heading" ($inline_weights.heading | default $pack_weights.heading | default (slice 700)) + "body" ($inline_weights.body | default $pack_weights.body | default (slice 400)) + "code" ($inline_weights.code | default $pack_weights.code | default (slice 400)) + "nav" ($inline_weights.nav | default $pack_weights.nav | default (slice)) +}} + +{{/* Resolve sizes — inline overrides take priority */}} +{{ $pack_sizes := $font_pack.sizes | default dict }} +{{ $inline_sizes := $hb_typography.sizes | default dict }} +{{ $sizes := dict + "base" ($inline_sizes.base | default $pack_sizes.base | default "1rem") + "sm" ($inline_sizes.sm | default $pack_sizes.sm | default "0.875rem") + "lg" ($inline_sizes.lg | default $pack_sizes.lg | default "1.125rem") +}} + +{{/* Resolve leading (line-height) */}} +{{ $pack_leading := $font_pack.leading | default dict }} +{{ $inline_leading := $hb_typography.leading | default dict }} +{{ $leading := dict + "heading" ($inline_leading.heading | default $pack_leading.heading | default 1.2) + "body" ($inline_leading.body | default $pack_leading.body | default 1.6) + "code" ($inline_leading.code | default $pack_leading.code | default 1.5) +}} + +{{/* Resolve tracking (letter-spacing) */}} +{{ $pack_tracking := $font_pack.tracking | default dict }} +{{ $inline_tracking := $hb_typography.tracking | default dict }} +{{ $tracking := dict + "heading" ($inline_tracking.heading | default $pack_tracking.heading | default "-0.02em") + "body" ($inline_tracking.body | default $pack_tracking.body | default "0") + "caps" ($inline_tracking.caps | default $pack_tracking.caps | default "0.05em") +}} + +{{/* Resolve variable font flags */}} +{{ $pack_variable := $font_pack.variable | default dict }} +{{ $inline_variable := $hb_typography.variable | default dict }} +{{ $variable := dict + "heading" ($inline_variable.heading | default $pack_variable.heading | default false) + "body" ($inline_variable.body | default $pack_variable.body | default false) + "code" ($inline_variable.code | default $pack_variable.code | default false) + "nav" ($inline_variable.nav | default $pack_variable.nav | default false) +}} + +{{ $typography := dict + "pack" $font_pack_name + "style" ($font_pack.meta.style | default "sans") + "families" $families + "weights" $weights + "variable" $variable + "sizes" $sizes + "leading" $leading + "tracking" $tracking +}} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + LAYOUT TOKENS +═══════════════════════════════════════════════════════════════════════════ */}} +{{ $hb_layout := $hb.layout | default dict }} +{{ $layout := dict + "radius" ($hb_layout.radius | default "md") + "spacing" ($hb_layout.spacing | default "comfortable") +}} + +{{/* Return theme config dict */}} +{{ return dict + "mode" $mode + "light" $light_pack + "dark" $dark_pack + "colors" $colors + "colors_light" $colors_light + "colors_dark" $colors_dark + "surfaces" $surfaces + "typography" $typography + "layout" $layout +}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/has_attachments.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/has_attachments.html new file mode 100644 index 0000000..cff1968 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/has_attachments.html @@ -0,0 +1,23 @@ +{{/* Return true if the page has attachments or link buttons to display. */}} + +{{ $page := . }} + +{{ $pdf_link := false }} +{{/* Prevent Hugo warning ".File.ContentBaseName on zero object." for content not backed by a Markdown file, */}} +{{/* such as auto-generated taxonomy pages, and sections without an explicit index file. */}} +{{/* The file check is required when called from `_default/list.html`, the fallback list view for the above cases. */}} +{{ with $page.File }} + {{ $slug := $page.File.ContentBaseName }} + {{ $resource := $page.Resources.GetMatch (printf "%s.pdf" $slug) }} + {{ with $resource }} + {{ $pdf_link = true }} + {{ end }} +{{ end }} + +{{ $cite_link := false }} +{{ $resource := $page.Resources.GetMatch "cite.bib" }} +{{ with $resource }} + {{ $cite_link = true }} +{{ end }} + +{{ return ($cite_link | or $pdf_link | or .Params.url_preprint | or .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_source | or .Params.url_code | or .Params.url_dataset | or .Params.url_poster | or .Params.url_project | or .Params.doi | or .Params.links | or .Params.projects | or .Params.slides) }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/hbx_verify.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/hbx_verify.html new file mode 100644 index 0000000..30c0b9a --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/hbx_verify.html @@ -0,0 +1,70 @@ +{{/* + Hugo Blox Kit Ecosystem Verification + + Reusable verification function for Hugo Blox components. + Ensures all required Hugo Blox Kit dependencies are present. + + Usage: {{ partial "functions/hbx_verify.html" . }} + Returns: "verified" or "failed" + + Used by: shortcodes, blocks, advanced components +*/}} + +{{/* Check for Hugo Blox specific icon system */}} +{{- $hb_icon_check := partial "functions/get_icon" (dict "name" "academic-cap" "attributes" "style=\"display: none;\"") -}} + +{{/* Verify Hugo Blox data structures */}} +{{- $hb_data_check := hugo.Data.icons.hero -}} + +{{/* Verify Hugo Blox UID generation */}} +{{- $hb_uid_check := partial "functions/uid.html" . -}} + +{{/* DEBUG: Print hugo.Deps output for analysis (dev only) */}} +{{- if getenv "HUGO_BLOX_DEBUG" -}} + {{- warnf "=== DEBUG hugo.Deps output ===" -}} + {{- range $index, $dep := hugo.Deps -}} + {{- warnf "DEP %d: Path=%s, Version=%s, Vendor=%t" $index $dep.Path $dep.Version $dep.Vendor -}} + {{- end -}} + {{- warnf "=== END hugo.Deps ===" -}} +{{- end -}} + +{{/* Check for required Hugo Blox module dependencies */}} +{{- $hb_module_check := false -}} +{{- $required_modules := slice "blox" -}} +{{- range $required := $required_modules -}} + {{- range $dep := hugo.Deps -}} + {{- if strings.Contains $dep.Path $required -}} + {{/* Accept both official GitHub org paths AND local development paths */}} + {{- if or (strings.Contains $dep.Path "github.com/HugoBlox/") (strings.Contains $dep.Path "../../../modules") -}} + {{- $hb_module_check = true -}} + {{- if getenv "HUGO_BLOX_DEBUG" -}} + {{- warnf "Found Hugo Blox module: %s" $dep.Path -}} + {{- end -}} + {{- break -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{/* Verify Hugo Blox brands icon pack */}} +{{- $hb_brands_check := hugo.Data.icons.brands -}} + +{{/* Debug output to identify failing check (dev only) */}} +{{- if getenv "HUGO_BLOX_DEBUG" -}} + {{- warnf "=== VERIFICATION RESULTS ===" -}} + {{- warnf "Icon check: %t" (and $hb_icon_check true) -}} + {{- warnf "Data check: %t" (and $hb_data_check true) -}} + {{- warnf "UID check: %t" (and $hb_uid_check true) -}} + {{- warnf "Module check: %t" $hb_module_check -}} + {{- warnf "Brands check: %t" (and $hb_brands_check true) -}} + {{- warnf "=== END VERIFICATION ===" -}} +{{- end -}} + +{{/* Set return value based on verification results */}} +{{- $return := "failed" -}} +{{- if and $hb_icon_check $hb_data_check $hb_uid_check $hb_module_check $hb_brands_check -}} + {{- $return = "verified" -}} +{{- end -}} + +{{/* Return result using proper Hugo function pattern */}} +{{ return $return }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/layout_tokens.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/layout_tokens.html new file mode 100644 index 0000000..3c48bf6 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/layout_tokens.html @@ -0,0 +1,56 @@ +{{/* + HugoBlox Theme Engine: Layout Tokens + + Resolves layout design tokens (radius, spacing) from the theme config + and emits them as CSS custom properties. + + Input: Theme config dict from get_theme_config: + - layout: { radius, spacing } + + Output: diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/load_font_pack.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/load_font_pack.html new file mode 100644 index 0000000..466d732 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/load_font_pack.html @@ -0,0 +1,65 @@ +{{/* + HugoBlox Theme Engine: Loads and validates a HugoBlox font pack + + Input: Font pack name (string), e.g. "modern-sans" or "acme/editorial" + + Returns: The font pack data object (families, weights, sizes, leading, tracking) or empty dict if invalid + + Validates: + - Font pack exists in data/fonts/ + - Required 'hugoblox' wrapper is present + - Required 'meta.format' starts with 'hugoblox-font@' +*/}} + +{{ $pack_name := . }} +{{ $result := dict }} + +{{/* Parse vendor/name format */}} +{{ $vendor := "" }} +{{ $name := $pack_name }} + +{{ if strings.Contains $pack_name "/" }} + {{ $parts := split $pack_name "/" }} + {{ $vendor = index $parts 0 }} + {{ $name = index $parts 1 }} +{{ end }} + +{{/* Load raw font pack data */}} +{{ $raw_pack := dict }} + +{{ if $vendor }} + {{/* Third-party font pack: data/fonts/vendor/name.yaml */}} + {{ $vendor_fonts := index hugo.Data.fonts $vendor }} + {{ if $vendor_fonts }} + {{ $raw_pack = index $vendor_fonts $name }} + {{ end }} +{{ else }} + {{/* Built-in or user font pack: data/fonts/name.yaml */}} + {{ with index hugo.Data.fonts $name }} + {{ $raw_pack = . }} + {{ end }} +{{ end }} + +{{/* Validate font pack structure */}} +{{ if not $raw_pack }} + {{ warnf "FONT PACK ERROR: Font pack '%s' not found in data/fonts/" $pack_name }} +{{ else if not $raw_pack.hugoblox }} + {{ warnf "FONT PACK ERROR: Font pack '%s' is not a valid HugoBlox font pack (missing 'hugoblox' key)" $pack_name }} +{{ else }} + {{ $pack := $raw_pack.hugoblox }} + + {{ if not $pack.meta }} + {{ warnf "FONT PACK ERROR: Font pack '%s' is missing the required 'meta' block" $pack_name }} + {{ else }} + {{/* Validate format version */}} + {{ $format := $pack.meta.format | default "" }} + {{ if not (hasPrefix $format "hugoblox-font@") }} + {{ warnf "FONT PACK ERROR: Font pack '%s' has invalid format '%s'. Expected 'hugoblox-font@1'" $pack_name $format }} + {{ end }} + {{ end }} + + {{/* Return the validated font pack data (without the hugoblox wrapper) */}} + {{ $result = $pack }} +{{ end }} + +{{ return $result }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/load_theme_pack.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/load_theme_pack.html new file mode 100644 index 0000000..5055f04 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/load_theme_pack.html @@ -0,0 +1,59 @@ +{{/* + HugoBlox Theme Engine: Loads and validates a HugoBlox theme pack + + Input: Theme pack name (string), e.g. "minimal" or "acme/corporate" + + Returns: The theme data object (type, light, dark, etc.) or nil if invalid + + Validates: + - Theme exists in data/themes/ + - Required 'hugoblox' wrapper is present + - Required 'meta.format' starts with 'hugoblox-theme@' +*/}} + +{{ $pack_name := . }} +{{ $result := dict }} + +{{/* Parse vendor/name format */}} +{{ $vendor := "" }} +{{ $name := $pack_name }} + +{{ if strings.Contains $pack_name "/" }} + {{ $parts := split $pack_name "/" }} + {{ $vendor = index $parts 0 }} + {{ $name = index $parts 1 }} +{{ end }} + +{{/* Load raw theme data */}} +{{ $raw_theme := dict }} + +{{ if $vendor }} + {{/* Third-party theme: data/themes/vendor/name.yaml */}} + {{ $vendor_themes := index hugo.Data.themes $vendor }} + {{ if $vendor_themes }} + {{ $raw_theme = index $vendor_themes $name }} + {{ end }} +{{ else }} + {{/* Built-in or user theme: data/themes/name.yaml */}} + {{ $raw_theme = index hugo.Data.themes $name }} +{{ end }} + +{{/* Validate theme structure */}} +{{ if not $raw_theme }} + {{ warnf "THEME ERROR: Theme pack '%s' not found in data/themes/" $pack_name }} +{{ else if not $raw_theme.hugoblox }} + {{ warnf "THEME ERROR: Theme '%s' is not a valid HugoBlox theme (missing 'hugoblox' key)" $pack_name }} +{{ else }} + {{ $theme := $raw_theme.hugoblox }} + + {{/* Validate format version */}} + {{ $format := $theme.meta.format | default "" }} + {{ if not (hasPrefix $format "hugoblox-theme@") }} + {{ warnf "THEME ERROR: Theme '%s' has invalid format '%s'. Expected 'hugoblox-theme@1'" $pack_name $format }} + {{ end }} + + {{/* Return the validated theme data (without the hugoblox wrapper) */}} + {{ $result = $theme }} +{{ end }} + +{{ return $result }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/logger.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/logger.html new file mode 100644 index 0000000..bcb2582 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/logger.html @@ -0,0 +1,51 @@ +{{/* + Hugo Blox Logger: A pragmatic, centralized logging helper for Hugo. + + This partial is the single source of truth for all build-time logging. + Hugo's template logging is limited to WARN and ERROR. INFO is only shown in the Dev HUD/JSON, not the CLI. + + Usage: + {{ partial "functions/logger" (dict + "page" . + "level" "info" | "warn" | "error" (default: "info") + "message" "Your log message here." + "id" "a-unique-id" (optional, for suppressible warnings) + "source" (dict "type" "shortcode|partial|template" "name" "callout|sections" ) (optional) + ) }} +*/}} +{{- $level := lower (.level | default "info") -}} +{{- $message := .message | default "" -}} +{{- $id := .id | default "" -}} +{{- $source := .source | default dict -}} +{{- $page := .page | default . -}} +{{- $isDev := hugo.IsServer -}} + +{{/* Store log entry for future debug widget/JSON, regardless of environment. */}} +{{- with $page -}} + {{- with .Store -}} + {{- $buildId := partialCached "functions/get-build-id.html" "hbx-build-id" -}} + {{- $log_entry := dict "level" $level "message" $message "page" ($.RelPermalink | default "/") "timestamp" now.Unix "id" $id "source" $source "buildId" $buildId -}} + {{- $current_logs := .Get "hbx_logs" | default slice -}} + {{- $currentBuildId := .Get "hbx_build_id" | default "" -}} + {{/* Clear logs if this is a new build cycle */}} + {{- if ne $currentBuildId $buildId -}} + {{- .Set "hbx_build_id" $buildId -}} + {{- $current_logs = slice -}} + {{- end -}} + {{- .Set "hbx_logs" ($current_logs | append $log_entry) -}} + {{- end -}} +{{- end -}} + +{{/* Emit to CLI using fmt with proper severity. Do not print INFO to CLI. */}} +{{- if eq $level "error" -}} + {{- fmt.Errorf "HBX ERROR: %s" $message -}} +{{- else if eq $level "warn" -}} + {{- if $id -}} + {{- fmt.Warnidf $id "HBX WARN: %s" $message -}} + {{- else -}} + {{- fmt.Warnf "HBX WARN: %s" $message -}} + {{- end -}} +{{- else -}} + {{/* info: no CLI output; visible via Dev HUD/JSON only */}} +{{- end -}} +{{- "" -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/notebook/render.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/notebook/render.html new file mode 100644 index 0000000..f299780 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/notebook/render.html @@ -0,0 +1,540 @@ +{{- $ctx := . -}} +{{- $hbxVerification := partial "functions/hbx_verify.html" $ctx -}} +{{- if ne $hbxVerification "verified" -}} + {{- errorf "Install HugoBlox to use the Notebook shortcode at: %s" $ctx.Position -}} +{{- end -}} +{{- $shortcodeName := $ctx.Name | default "notebook" -}} + +{{- $src := "" -}} +{{- if $ctx.IsNamedParams -}} + {{- $src = $ctx.Get "src" | default ($ctx.Get "file") -}} +{{- else -}} + {{- $src = $ctx.Get 0 -}} +{{- end -}} +{{- if not $src -}} + {{- errorf "%s shortcode: provide a notebook path via positional argument or src=..." $shortcodeName -}} +{{- end -}} + +{{- $displayName := $src -}} +{{- with urls.Parse $src -}} + {{- if .Path -}} + {{- $displayName = path.Base .Path -}} + {{- end -}} +{{- end -}} + +{{- $title := $ctx.Get "title" | default $displayName -}} +{{- $languageOverride := $ctx.Get "language" -}} +{{- $showCode := $ctx.Get "show_code" | default true -}} +{{- $showMarkdown := $ctx.Get "show_markdown" | default true -}} +{{- $showOutputs := $ctx.Get "show_outputs" | default true -}} +{{- $showMetadata := $ctx.Get "show_metadata" | default false -}} +{{- $lineNumbers := $ctx.Get "line_numbers" | default false -}} +{{- $dense := $ctx.Get "dense" | default false -}} +{{- $maxOutputHeight := $ctx.Get "max_output_height" | default "26rem" -}} +{{- $sourceURL := $ctx.Get "source_url" -}} +{{- $showDownload := $ctx.Get "show_download" | default true -}} +{{- $downloadLabel := $ctx.Get "download_label" | default "Download notebook" -}} +{{- $emptyMessage := $ctx.Get "empty_message" | default "Notebook is empty or hidden by the current view options." -}} +{{- $id := delimit (slice "hb-notebook" (partial "functions/uid.html" $ctx)) "-" -}} + +{{- $isRemote := and $src (ne (urls.Parse $src).Scheme "") -}} +{{- $normalizedSrc := $src -}} +{{- if not $isRemote -}} + {{- $normalizedSrc = strings.TrimPrefix "./" $normalizedSrc -}} + {{- $normalizedSrc = strings.TrimPrefix "/" $normalizedSrc -}} + {{- if $normalizedSrc -}} + {{- $normalizedSrc = path.Clean $normalizedSrc -}} + {{- end -}} + {{- if eq $normalizedSrc "." -}} + {{- $normalizedSrc = "" -}} + {{- end -}} + {{- if strings.HasPrefix $normalizedSrc ".." -}} + {{- errorf "%s shortcode: refusing to read outside the project for %q" $shortcodeName $src -}} + {{- end -}} +{{- end -}} + +{{- $notebookContent := "" -}} +{{- $resource := dict -}} +{{- $resourceFound := false -}} + +{{- if $isRemote -}} + {{- $remote := try (resources.GetRemote $src) -}} + {{- if $remote.Err -}} + {{- errorf "%s shortcode: unable to fetch remote notebook %q (%s)" $shortcodeName $src $remote.Err -}} + {{- else -}} + {{- $resource = $remote.Value -}} + {{- $resourceFound = true -}} + {{- $notebookContent = $resource.Content -}} + {{- if not $sourceURL -}} + {{- $sourceURL = $src -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- with $ctx.Page -}} + {{- with .Resources -}} + {{- with .GetMatch $normalizedSrc -}} + {{- $resource = . -}} + {{- $resourceFound = true -}} + {{- else -}} + {{- if not (strings.Contains $normalizedSrc "/") -}} + {{- with .GetMatch (printf "**/%s" $normalizedSrc) -}} + {{- $resource = . -}} + {{- $resourceFound = true -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- if $resourceFound -}} + {{- $notebookContent = $resource.Content -}} + {{- if not $sourceURL -}} + {{- $sourceURL = $resource.RelPermalink -}} + {{- end -}} + {{- end -}} + {{- if not $notebookContent -}} + {{- $searchPaths := slice $normalizedSrc -}} + {{- $pageDir := "" -}} + {{- with $ctx.Page.File -}} + {{- $pageDir = path.Dir .Path -}} + {{- end -}} + {{- if $pageDir -}} + {{- $searchPaths = $searchPaths | append (path.Join $pageDir $normalizedSrc) -}} + {{- if not (strings.HasPrefix $normalizedSrc "content/") -}} + {{- $searchPaths = $searchPaths | append (printf "content/%s" (path.Join $pageDir $normalizedSrc)) -}} + {{- end -}} + {{- end -}} + {{- if not (strings.HasPrefix $normalizedSrc "content/") -}} + {{- $searchPaths = $searchPaths | append (printf "content/%s" $normalizedSrc) -}} + {{- end -}} + {{- if not (strings.HasPrefix $normalizedSrc "assets/") -}} + {{- $searchPaths = $searchPaths | append (printf "assets/%s" $normalizedSrc) -}} + {{- end -}} + {{- if not (strings.HasPrefix $normalizedSrc "static/") -}} + {{- $searchPaths = $searchPaths | append (printf "static/%s" $normalizedSrc) -}} + {{- end -}} + {{- range $candidate := $searchPaths }} + {{- if not $notebookContent -}} + {{- $fileAttempt := try (readFile $candidate) -}} + {{- if not $fileAttempt.Err -}} + {{- $notebookContent = $fileAttempt.Value -}} + {{- if and (strings.HasPrefix $candidate "static/") (not $sourceURL) -}} + {{- $public := strings.TrimPrefix $candidate "static" -}} + {{- if not (strings.HasPrefix $public "/") -}} + {{- $public = printf "/%s" $public -}} + {{- end -}} + {{- $sourceURL = relLangURL $public -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{- if not $notebookContent -}} + {{- $pagePath := "" -}} + {{- with $ctx.Page.File -}} + {{- $pagePath = .Path -}} + {{- end -}} + {{- errorf "%s shortcode: notebook %q could not be located relative to %s. Please check that you have removed \\.ipynb$ from ignoreFiles in your config/_default/hugo.yaml." $shortcodeName $src $pagePath -}} +{{- end -}} + +{{- $parsed := dict -}} +{{- $parsedResult := try (transform.Unmarshal $notebookContent) -}} +{{- if $parsedResult.Err -}} + {{- errorf "%s shortcode: %q is not valid notebook JSON (%s)" $shortcodeName $src $parsedResult.Err -}} +{{- else -}} + {{- $parsed = $parsedResult.Value -}} +{{- end -}} + +{{- $cells := slice -}} +{{- with index $parsed "cells" -}} + {{- if reflect.IsSlice . -}} + {{- $cells = . -}} + {{- end -}} +{{- end -}} +{{- $metadata := index $parsed "metadata" | default dict -}} + +{{- $language := $languageOverride -}} +{{- if not $language -}} + {{- with index $metadata "language_info" -}} + {{- with index . "name" -}} + {{- $language = printf "%v" . -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- if not $language -}} + {{- $language = "python" -}} +{{- end -}} +{{- $language = lower $language -}} + +{{- $languageVersion := "" -}} +{{- with index $metadata "language_info" -}} + {{- with index . "version" -}} + {{- $languageVersion = printf "%v" . -}} + {{- end -}} +{{- end -}} + +{{- $kernelDisplay := "" -}} +{{- with index $metadata "kernelspec" -}} + {{- with index . "display_name" -}} + {{- $kernelDisplay = printf "%v" . -}} + {{- end -}} +{{- end -}} + +{{- $kernelName := "" -}} +{{- with index $metadata "kernelspec" -}} + {{- with index . "name" -}} + {{- $kernelName = printf "%v" . -}} + {{- end -}} +{{- end -}} + +{{- $nbformat := "" -}} +{{- with index $parsed "nbformat" -}} + {{- $nbformat = printf "%v" . -}} +{{- end -}} +{{- with index $parsed "nbformat_minor" -}} + {{- if $nbformat -}} + {{- $nbformat = printf "%s.%v" $nbformat . -}} + {{- else -}} + {{- $nbformat = printf "%v" . -}} + {{- end -}} +{{- end -}} + +{{- $cellCount := len $cells -}} + +{{- $containerClass := "hb-notebook not-prose" -}} +{{- if $dense -}} + {{- $containerClass = printf "%s %s" $containerClass "hb-notebook--dense" -}} +{{- end -}} + +{{- $subtitleParts := slice -}} +{{- if $language -}} + {{- $subtitleParts = $subtitleParts | append (strings.Title $language) -}} +{{- end -}} +{{- if $kernelDisplay -}} + {{- $subtitleParts = $subtitleParts | append (printf "Kernel: %s" $kernelDisplay) -}} +{{- end -}} +{{- if $nbformat -}} + {{- $subtitleParts = $subtitleParts | append (printf "nbformat %s" $nbformat) -}} +{{- end -}} +{{- if gt $cellCount 0 -}} + {{- $subtitleParts = $subtitleParts | append (printf "%d cells" $cellCount) -}} +{{- end -}} + +{{- $metaItems := slice -}} +{{- $metaItems = $metaItems | append (dict "label" "Language" "value" (strings.Title $language)) -}} +{{- if $languageVersion -}} + {{- $metaItems = $metaItems | append (dict "label" "Version" "value" $languageVersion) -}} +{{- end -}} +{{- if or $kernelDisplay $kernelName -}} + {{- $metaItems = $metaItems | append (dict "label" "Kernel" "value" (strings.TrimSpace (printf "%s %s" $kernelDisplay $kernelName))) -}} +{{- end -}} +{{- if $nbformat -}} + {{- $metaItems = $metaItems | append (dict "label" "nbformat" "value" $nbformat) -}} +{{- end -}} +{{- with index $metadata "authors" -}} + {{- $authors := slice -}} + {{- if reflect.IsSlice . -}} + {{- range . -}} + {{- $name := "" -}} + {{- with index . "name" -}} + {{- $name = printf "%v" . -}} + {{- end -}} + {{- if not $name -}} + {{- $name = printf "%v" . -}} + {{- end -}} + {{- if $name -}} + {{- $authors = $authors | append $name -}} + {{- end -}} + {{- end -}} + {{- else -}} + {{- $authors = $authors | append (printf "%v" .) -}} + {{- end -}} + {{- if gt (len $authors) 0 -}} + {{- $metaItems = $metaItems | append (dict "label" "Authors" "value" (delimit $authors ", ")) -}} + {{- end -}} +{{- end -}} + +{{- $sourceURLIsRemote := false -}} +{{- if $sourceURL -}} + {{- $sourceURLIsRemote = ne (urls.Parse $sourceURL).Scheme "" -}} + {{- if not $sourceURLIsRemote -}} + {{- if not (strings.HasPrefix $sourceURL "/") -}} + {{- $sourceURL = printf "/%s" $sourceURL -}} + {{- end -}} + {{- $sourceURL = relLangURL $sourceURL -}} + {{- end -}} +{{- end -}} + +{{- $styleAttr := printf "--hb-notebook-output-max-height:%s;" $maxOutputHeight | safeCSS -}} +
    +
    +
    +

    {{ $title }}

    + {{- with $subtitleParts }} +

    {{ delimit . " · " }}

    + {{- end }} +
    + {{- if and $showDownload $sourceURL }} + + {{ partial "functions/get_icon" (dict "name" "arrow-down-tray" "attributes" "class=\"w-4 h-4\"") }} + {{ $downloadLabel }} + + {{- end }} +
    + + {{- if and $showMetadata (gt (len $metaItems) 0) }} + + {{- end }} + + {{- $visibleScratch := newScratch -}} + {{- $visibleScratch.Set "visible" 0 -}} +
    + {{- range $cells }} + {{- $cellType := index . "cell_type" | default "raw" -}} + {{- $cellMetadata := index . "metadata" | default dict -}} + {{- $cellTags := slice -}} + {{- with index $cellMetadata "tags" -}} + {{- if reflect.IsSlice . -}} + {{- range . -}} + {{- $cellTags = $cellTags | append (printf "%v" .) -}} + {{- end -}} + {{- else -}} + {{- $cellTags = $cellTags | append (printf "%v" .) -}} + {{- end -}} + {{- end -}} + {{- $executionCount := "" -}} + {{- with index . "execution_count" -}} + {{- $executionCount = printf "%v" . -}} + {{- end -}} + {{- $outputs := slice -}} + {{- with index . "outputs" -}} + {{- if reflect.IsSlice . -}} + {{- $outputs = . -}} + {{- end -}} + {{- end -}} + {{- $shouldRender := or + (and (eq $cellType "markdown") $showMarkdown) + (and (eq $cellType "raw") $showMarkdown) + (and (eq $cellType "code") (or $showCode (and $showOutputs (gt (len $outputs) 0)))) + -}} + {{- if $shouldRender }} + {{- $visibleScratch.Add "visible" 1 -}} +
    +
    + + {{- if eq $cellType "code" -}} + {{- printf "In [%s]" (cond $executionCount $executionCount " ") -}} + {{- else -}} + {{- strings.Title $cellType -}} + {{- end -}} + + {{- if gt (len $cellTags) 0 }} +
    + {{- range $cellTags }} + {{ . }} + {{- end }} +
    + {{- end }} +
    + + {{- if eq $cellType "markdown" }} + {{- $source := index . "source" -}} + {{- $sourceContent := "" -}} + {{- if reflect.IsSlice $source -}} + {{- $sourceContent = delimit $source "" -}} + {{- else if $source -}} + {{- $sourceContent = printf "%v" $source -}} + {{- end -}} + {{- $sourceContent = replace $sourceContent "\r\n" "\n" -}} + {{- if $sourceContent }} +
    + {{ $sourceContent | markdownify }} +
    + {{- end -}} + {{- else if eq $cellType "raw" }} + {{- $raw := index . "source" -}} + {{- $rawContent := "" -}} + {{- if reflect.IsSlice $raw -}} + {{- $rawContent = delimit $raw "" -}} + {{- else if $raw -}} + {{- $rawContent = printf "%v" $raw -}} + {{- end -}} + {{- if $rawContent }} +
    {{ $rawContent | htmlEscape }}
    + {{- end -}} + {{- else if eq $cellType "code" }} + {{- $source := index . "source" -}} + {{- $sourceContent := "" -}} + {{- if reflect.IsSlice $source -}} + {{- $sourceContent = delimit $source "" -}} + {{- else if $source -}} + {{- $sourceContent = printf "%v" $source -}} + {{- end -}} + {{- $sourceContent = replace $sourceContent "\r\n" "\n" -}} + {{- $sourceContent = strings.TrimSuffix "\n" $sourceContent -}} + {{- $sourceContent = strings.TrimSuffix "\r" $sourceContent -}} + {{- if and $showCode $sourceContent }} +
    + {{- $options := "" -}} + {{- if $lineNumbers -}} + {{- $options = "linenos=table" -}} + {{- end -}} + {{- $hl := highlight $sourceContent $language $options -}} + {{- if $hl -}} + {{ $hl | safeHTML }} + {{- else -}} +
    {{ $sourceContent | htmlEscape }}
    + {{- end -}} +
    + {{- end -}} + + {{- if and $showOutputs (gt (len $outputs) 0) }} +
    + {{- range $outputs }} + {{- $outputType := index . "output_type" | default "" -}} + {{- if eq $outputType "stream" }} + {{- $text := index . "text" -}} + {{- $textContent := "" -}} + {{- if reflect.IsSlice $text -}} + {{- $textContent = delimit $text "" -}} + {{- else if $text -}} + {{- $textContent = printf "%v" $text -}} + {{- end -}} +
    {{ $textContent | htmlEscape }}
    + {{- else if eq $outputType "error" }} + {{- $ename := index . "ename" | default "" -}} + {{- $evalue := index . "evalue" | default "" -}} + {{- $trace := index . "traceback" | default slice -}} + {{- $traceContent := "" -}} + {{- if reflect.IsSlice $trace -}} + {{- $traceContent = delimit $trace "\n" -}} + {{- else if $trace -}} + {{- $traceContent = printf "%v" $trace -}} + {{- end -}} +
    + {{ printf "%s: %s" $ename $evalue }} + {{- if $traceContent }} +
    {{ $traceContent | htmlEscape }}
    + {{- end -}} +
    + {{- else }} + {{- $data := index . "data" | default dict -}} + {{- $outputScratch := newScratch -}} + {{- $outputScratch.Set "rendered" false -}} + {{- with index $data "text/html" }} + {{- $htmlPayload := "" -}} + {{- if reflect.IsSlice . -}} + {{- $htmlPayload = delimit . "" -}} + {{- else -}} + {{- $htmlPayload = printf "%v" . -}} + {{- end -}} + {{- if $htmlPayload }} +
    {{ $htmlPayload | safeHTML }}
    + {{- $outputScratch.Set "rendered" true -}} + {{- end -}} + {{- end }} + {{- with index $data "text/markdown" }} + {{- $markdownPayload := "" -}} + {{- if reflect.IsSlice . -}} + {{- $markdownPayload = delimit . "" -}} + {{- else -}} + {{- $markdownPayload = printf "%v" . -}} + {{- end -}} + {{- if $markdownPayload }} +
    + {{ $markdownPayload | markdownify }} +
    + {{- $outputScratch.Set "rendered" true -}} + {{- end -}} + {{- end }} + {{- with index $data "text/latex" }} + {{- $latexPayload := "" -}} + {{- if reflect.IsSlice . -}} + {{- $latexPayload = delimit . "" -}} + {{- else -}} + {{- $latexPayload = printf "%v" . -}} + {{- end -}} + {{- if $latexPayload }} +
    {{ printf "$$%s$$" $latexPayload | safeHTML }}
    + {{- $outputScratch.Set "rendered" true -}} + {{- end -}} + {{- end }} + {{- with index $data "image/png" }} + {{- $pngPayload := printf "%v" . -}} + {{- if $pngPayload }} +
    + Notebook output image +
    + {{- $outputScratch.Set "rendered" true -}} + {{- end -}} + {{- end }} + {{- with index $data "image/jpeg" }} + {{- $jpegPayload := printf "%v" . -}} + {{- if $jpegPayload }} +
    + Notebook output image +
    + {{- $outputScratch.Set "rendered" true -}} + {{- end -}} + {{- end }} + {{- with index $data "image/svg+xml" }} + {{- $svgPayload := "" -}} + {{- if reflect.IsSlice . -}} + {{- $svgPayload = delimit . "" -}} + {{- else -}} + {{- $svgPayload = printf "%v" . -}} + {{- end -}} + {{- if $svgPayload }} +
    {{ $svgPayload | safeHTML }}
    + {{- $outputScratch.Set "rendered" true -}} + {{- end -}} + {{- end }} + {{- with or (index $data "application/vnd.plotly.v1+json") (index $data "application/json") }} + {{- $jsonFormatted := . | jsonify (dict "indent" " ") -}} +
    {{ $jsonFormatted }}
    + {{- $outputScratch.Set "rendered" true -}} + {{- end }} + {{- if not ($outputScratch.Get "rendered") }} + {{- with index $data "text/plain" }} + {{- $textPayload := "" -}} + {{- if reflect.IsSlice . -}} + {{- $textPayload = delimit . "" -}} + {{- else -}} + {{- $textPayload = printf "%v" . -}} + {{- end -}} + {{- if $textPayload }} +
    {{ $textPayload | htmlEscape }}
    + {{- $outputScratch.Set "rendered" true -}} + {{- end -}} + {{- end }} + {{- end }} + {{- if not ($outputScratch.Get "rendered") }} +
    {{ $data | jsonify | htmlEscape }}
    + {{- end }} + {{- end }} + {{- end }} +
    + {{- end }} + {{- end }} +
    + {{- end }} + {{- end }} +
    + + {{- if eq ($visibleScratch.Get "visible") 0 }} +
    {{ $emptyMessage }}
    + {{- end }} +
    + Powered by Hugo Blox Kit - https://github.com/HugoBlox/kit +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/parse_block_v3.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/parse_block_v3.html new file mode 100644 index 0000000..d0c222c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/parse_block_v3.html @@ -0,0 +1,312 @@ +{{/* Hugo Blox Parser v3 - Preact Component Support */}} +{{/* Documentation: https://hugoblox.com/blocks/ */}} +{{/* License: https://github.com/HugoBlox/kit/blob/main/LICENSE.md */}} + +{{ $page := .page }} +{{ $block := .block }} + +{{- $block_type := partial "hbx/resolve-block-param" (dict "config" $block "context" "content section") | default "markdown" -}} +{{ $block_type = lower $block_type }} + +{{/* Handle block renames/aliases */}} +{{ range $r := hugo.Data.blox_aliases.renames }} + {{ $block_type = cond (eq $block_type $r.old) $r.new $block_type }} +{{ end }} + +{{/* Check if this is a Preact-enabled block by looking for component file */}} +{{ $component_path := printf "js/hbx/blocks/%s/component.jsx" $block_type }} +{{ $is_preact := resources.Get $component_path }} + +{{/* Apply styling wrapper for all blocks (both Preact and traditional) */}} +{{ $bg := $block.design.background }} +{{ $style := "" }} +{{ $style_bg := "" }} + +{{/* Process background colors */}} +{{ if $bg.color }} + {{ $color_type := printf "%T" $bg.color }} + {{ if eq $color_type "map[string]interface {}" }} + {{ if and $bg.color.light $bg.color.dark }} + {{ $light_color := $bg.color.light }} + {{ $dark_color := $bg.color.dark }} + + {{ $style_bg = printf "background-color: %s;" $light_color }} + {{ $style_bg = printf "%s--dark-bg-color: %s;" $style_bg $dark_color }} + {{ else if $bg.color.light }} + {{ $light_color := $bg.color.light }} + {{ $style_bg = printf "background-color: %s;" $light_color }} + {{ else if $bg.color.dark }} + {{ $dark_color := $bg.color.dark }} + {{ $style_bg = printf "--dark-bg-color: %s; background-color: var(--dark-bg-color);" $dark_color }} + {{ end }} + {{ else }} + {{ $bg_color := $bg.color }} + {{ $style_bg = printf "background-color: %s;" $bg_color }} + {{ end }} +{{ end }} + +{{/* Process gradients and images */}} +{{ $background_layers := slice }} +{{ $gradient_layer := "" }} +{{ $has_gradient_mesh := false }} +{{ $gradient_mesh_html := "" }} + +{{/* Enhanced Gradient Mesh System */}} +{{ $gradient_mesh := $bg.gradient_mesh | default dict }} +{{ if $gradient_mesh.enable }} + {{ $has_gradient_mesh = true }} + {{ $mesh_style := $gradient_mesh.style | default "orbs" }} + {{ $mesh_animation_raw := $gradient_mesh.animation | default "pulse" }} + {{ $mesh_intensity := $gradient_mesh.intensity | default "subtle" }} + {{/* Auto-theme: Mix Primary and Secondary brand colors for dynamic personalization */}} + {{ $mesh_colors := $gradient_mesh.colors | default (slice "primary-500/20" "secondary-500/20") }} + + {{/* Map animation names to CSS classes */}} + {{ $mesh_animation := "" }} + {{ if eq $mesh_animation_raw "pulse" }} + {{ $mesh_animation = "pulse" }} + {{ else if eq $mesh_animation_raw "float" }} + {{ $mesh_animation = "float" }} + {{ else if eq $mesh_animation_raw "rotate" }} + {{ $mesh_animation = "rotate-slow" }} + {{ else if ne $mesh_animation_raw "none" }} + {{ $mesh_animation = "pulse" }} {{/* Default fallback */}} + {{ end }} + + {{/* Build gradient mesh HTML */}} + {{ $mesh_html := "
    " }} + + {{/* Base gradient overlay */}} + {{ $base_gradient := printf "
    " (index $mesh_colors 0) (index $mesh_colors 1) }} + {{ $mesh_html = printf "%s%s" $mesh_html $base_gradient }} + + {{/* Animated elements based on style */}} + {{ if eq $mesh_style "orbs" }} + {{ $orb_count := $gradient_mesh.orb_count | default 2 }} + {{ $orb_positions := $gradient_mesh.positions | default (slice "top-0 left-1/4" "bottom-0 right-1/4") }} + {{ $orb_sizes := $gradient_mesh.sizes | default (slice "w-96 h-96" "w-96 h-96") }} + + {{ range $index, $position := first $orb_count $orb_positions }} + {{ $size := index $orb_sizes $index | default "w-96 h-96" }} + {{ $color := index $mesh_colors $index | default "primary-500/30" }} + {{ $blur_class := cond (eq $mesh_intensity "bold") "blur-2xl" (cond (eq $mesh_intensity "medium") "blur-3xl" "blur-3xl") }} + {{ $opacity := cond (eq $mesh_intensity "bold") "40" (cond (eq $mesh_intensity "medium") "30" "30") }} + + {{/* Extract base color and adjust opacity for orbs */}} + {{ $orb_color := $color }} + {{ if not (in $color "/") }} + {{ $orb_color = printf "%s/%s" $color $opacity }} + {{ end }} + + {{ $animation_delay := "" }} + {{ if gt $index 0 }} + {{ $animation_delay = printf " style=\"animation-delay: %ds;\"" (mul $index 2) }} + {{ end }} + + {{/* Build orb with or without animation */}} + {{ $animate_class := cond (ne $mesh_animation "") (printf "animate-%s" $mesh_animation) "" }} + {{ $orb := printf "
    " $position $size $orb_color $blur_class $animate_class $animation_delay }} + {{ $mesh_html = printf "%s%s" $mesh_html $orb }} + {{ end }} + + {{ else if eq $mesh_style "waves" }} + {{/* Flowing wave effect - multiple horizontal bands */}} + {{ $wave_count := $gradient_mesh.wave_count | default 3 }} + {{ $blur_class := cond (eq $mesh_intensity "bold") "blur-2xl" (cond (eq $mesh_intensity "medium") "blur-3xl" "blur-3xl") }} + + {{ range $index := seq 0 (sub $wave_count 1) }} + {{ $color_index := mod $index (len $mesh_colors) }} + {{ $color := index $mesh_colors $color_index }} + {{ $top_pos := mul $index 33 }} + {{ $height := "h-64" }} + {{ $anim_delay := printf " style=\"animation-delay: %ds; animation-duration: %ds;\"" (mul $index 1) (add 8 (mul $index 2)) }} + + {{/* Apply animation if not none */}} + {{ $animate_class := cond (ne $mesh_animation "") (printf "animate-%s" $mesh_animation) "" }} + {{ $wave := printf "
    " $height $color $blur_class $animate_class $top_pos $anim_delay }} + {{ $mesh_html = printf "%s%s" $mesh_html $wave }} + {{ end }} + + {{ else if eq $mesh_style "dots" }} + {{/* Dotted grid pattern */}} + {{ $dot_size := $gradient_mesh.dot_size | default "w-4 h-4" }} + {{ $spacing := $gradient_mesh.spacing | default "16" }} + {{ $color := index $mesh_colors 0 | default "primary-500/20" }} + + {{/* Create a dotted pattern background */}} + {{ $dots := printf "
    " $spacing $spacing (div (int $spacing) 2) (div (int $spacing) 2) }} + {{ $mesh_html = printf "%s%s" $mesh_html $dots }} + + {{ else if eq $mesh_style "grid" }} + {{/* Grid lines pattern */}} + {{ $color := index $mesh_colors 0 | default "primary-500/10" }} + {{ $line_width := $gradient_mesh.line_width | default "1" }} + {{ $spacing := $gradient_mesh.spacing | default "32" }} + + {{/* Create grid pattern */}} + {{ $grid := printf "
    " $line_width $line_width $line_width $line_width $spacing $spacing }} + {{ $mesh_html = printf "%s%s" $mesh_html $grid }} + {{ end }} + + {{ $mesh_html = printf "%s
    " $mesh_html }} + {{ $gradient_mesh_html = $mesh_html | safeHTML }} +{{ end }} + +{{/* Legacy simple gradient support */}} +{{ if and $bg.gradient.start $bg.gradient.end }} + {{ $angle := string $bg.gradient.direction | default "135" }} + {{ $start_color := $bg.gradient.start }} + {{ $end_color := $bg.gradient.end }} + {{ $gradient_layer = printf "linear-gradient(%sdeg, %s, %s)" $angle $start_color $end_color }} +{{ end }} + +{{/* Process video backgrounds */}} +{{ $bg_video := "" }} +{{ $bg_video_class := "" }} +{{ if $bg.video.filename }} + {{ $bg_video = resources.Get (printf "media/%s" $bg.video.filename) }} + {{ if $bg.video.flip }} + {{ $bg_video_class = "flip" }} + {{ end }} +{{ end }} + +{{/* Process image backgrounds */}} +{{ if $bg.image.filename }} + {{ $bg_img := resources.Get (printf "media/%s" $bg.image.filename) }} + {{ if $bg_img }} + {{ if reflect.IsImageResourceProcessable $bg_img }} + {{ $bg_img = $bg_img.Fit "1920x1920 webp" }} + {{ end }} + {{ $image_layer := printf "url('%s')" $bg_img.RelPermalink }} + {{ $background_layers = $background_layers | append $image_layer }} + {{ else }} + {{ errorf "Couldn't find `%s` in the `assets/media/` folder - please add it." $bg.image.filename }} + {{ end }} +{{ end }} + +{{ if or $background_layers $gradient_layer }} + {{ $all_layers := $background_layers }} + {{ if $gradient_layer }} + {{ $all_layers = $all_layers | append $gradient_layer }} + {{ end }} + {{ if $all_layers }} + {{ $combined_backgrounds := delimit $all_layers ", " }} + {{ $style_bg = printf "%sbackground-image: %s;" $style_bg $combined_backgrounds }} + + {{/* Background image size/position/repeat properties */}} + {{ $layer_count := len $all_layers }} + {{ if gt $layer_count 1 }} + {{/* Multiple layers: image + gradient */}} + {{ $img_size := $bg.image.size | default "cover" }} + {{ $img_position := $bg.image.position | default "center" }} + {{ $img_repeat := $bg.image.repeat | default "no-repeat" }} + {{ if eq $img_position "repeat" }} + {{ $img_repeat = "repeat" }} + {{ $img_position = "center" }} + {{ end }} + {{ $style_bg = printf "%sbackground-size: %s, cover;" $style_bg $img_size }} + {{ $style_bg = printf "%sbackground-position: %s, center;" $style_bg $img_position }} + {{ $style_bg = printf "%sbackground-repeat: %s, no-repeat;" $style_bg $img_repeat }} + {{ else }} + {{/* Single layer */}} + {{ if $background_layers }} + {{ with $bg.image.size }} + {{ $style_bg = printf "%sbackground-size: %s;" $style_bg . }} + {{ end }} + {{ with $bg.image.position }} + {{ if eq . "repeat" }} + {{ $style_bg = printf "%sbackground-position: center;" $style_bg }} + {{ $style_bg = printf "%sbackground-repeat: repeat;" $style_bg }} + {{ else }} + {{ $style_bg = printf "%sbackground-position: %s;" $style_bg . }} + {{ end }} + {{ end }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{/* Background image filters: brightness, blur, contrast, saturate, grayscale */}} +{{ with $bg.image.filters }} + {{ $filter_parts := slice }} + {{ with .brightness }} + {{ $filter_parts = $filter_parts | append (printf "brightness(%s)" (string .)) }} + {{ end }} + {{ with .blur }} + {{ $filter_parts = $filter_parts | append (printf "blur(%s)" (string .)) }} + {{ end }} + {{ with .contrast }} + {{ $filter_parts = $filter_parts | append (printf "contrast(%s)" (string .)) }} + {{ end }} + {{ with .saturate }} + {{ $filter_parts = $filter_parts | append (printf "saturate(%s)" (string .)) }} + {{ end }} + {{ with .grayscale }} + {{ $filter_parts = $filter_parts | append (printf "grayscale(%s)" (string .)) }} + {{ end }} + {{ if $filter_parts }} + {{ $style_bg = printf "%sfilter: %s;" $style_bg (delimit $filter_parts " ") }} + {{ end }} +{{ end }} + +{{ with $block.design.spacing.padding }} + {{ $style_pad := printf "padding: %s;" (delimit . " ") }} + {{ $style = print $style $style_pad }} +{{ end }} + +{{ with $block.design.css_style }} + {{ $style = print $style . }} +{{ end }} + +{{/* Support for clip path (design.clip_path) */}} +{{ with $block.design.clip_path }} + {{ $style = printf "%sclip-path: %s;" $style . }} +{{ end }} + +{{ $hash_id := $block.id | default (printf "section-%s" (replace $block_type "." "-")) }} +{{ $css_classes := $block.design.css_class | default "" }} +{{ $widget_class := printf "blox-%s" (strings.ReplacePairs $block_type "." "-" "_" "-") }} + +{{/* Extract background-specific CSS classes */}} +{{ $bg_css_classes := $bg.css_class | default "" }} + +{{/* Route to appropriate handler */}} +{{ if $is_preact }} + {{/* Render Preact block with styling wrapper */}} +
    + {{/* Gradient Mesh Background */}} + {{ if $has_gradient_mesh }}{{ $gradient_mesh_html }}{{ end }} +
    + {{with $bg_video}}{{end}} +
    + {{/* Use generic Preact wrapper for content */}} + {{ partial "blox/preact-wrapper" (dict "wcPage" $page "wcBlock" $block "wcBlockType" $block_type "wcIdentifier" $hash_id) }} +
    +{{ else }} + {{/* Fall back to traditional Go template blocks */}} + {{ $block_path := printf "hbx/blocks/%s/block.html" $block_type }} + {{ if not (templates.Exists (printf "_partials/%s" $block_path)) }} + {{ errorf "%s uses a `%s` block but the `%s` block was not found at `%s`. Check the name of the block and ensure it exists in the blox/%s/ directory." $page.File.Path $block_type $block_type $block_path $block_type }} + {{ end }} + + {{/* Handle legacy block requirements */}} + {{ if $block.Page.Store.Get "has_mermaid" }} + {{ $page.Page.Store.Set "has_mermaid" true }} + {{ end }} + + {{ if (gt (len (findRE `\{\{< gallery` $block.content.text 1)) 0) }} + {{ $page.Page.Store.Set "has_gallery" true }} + {{ end }} + + {{ $widget_args := dict "wcPage" $page "wcBlock" $block "wcIdentifier" $hash_id }} + + {{/* Render traditional block with wrapper */}} +
    + {{/* Gradient Mesh Background */}} + {{ if $has_gradient_mesh }}{{ $gradient_mesh_html }}{{ end }} +
    + {{with $bg_video}}{{end}} +
    + {{ partial $block_path $widget_args }} +
    +{{ end }} \ No newline at end of file diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/process_responsive_image.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/process_responsive_image.html new file mode 100644 index 0000000..e5e02de --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/process_responsive_image.html @@ -0,0 +1,143 @@ +{{/* +Responsive Image Processor for Hugo Blox Kit (HBB) +Uses Hugo's .Process method with configurable quality and responsive breakpoints + +Parameters: +- image: Hugo image resource (required) +- sizes: Array of widths for responsive breakpoints (optional, defaults to comprehensive set) +- mode: Processing mode - "fit", "fill", "resize", or "responsive" (optional, defaults to "fit") + - "fit": Maintains original aspect ratio, scales to fit within width (ignores aspect_ratio param) + - "fill": Crops to exact dimensions, requires aspect_ratio for height calculation + - "resize": Same as fit, maintains aspect ratio + - "responsive": Creates responsive variants from already-processed image (no further processing) +- anchor: Anchor point for cropping when using fill (optional, defaults to "smart") +- aspect_ratio: Target aspect ratio for fill mode only (optional, format "width:height") +- quality: Image quality override (optional, uses Hugo config by default) + +Returns: Map with processed images and srcset string +- .srcset: Complete srcset attribute value +- .fallback: Default/smallest image for src attribute +- .sizes: Array of processed image resources +*/}} + +{{ $image := .image }} +{{ $sizes := .sizes | default (slice 320 480 768 1024 1366 1920 2560) }} +{{ $mode := .mode | default "fit" }} +{{ $anchor := .anchor | default "smart" }} +{{ $aspect_ratio := .aspect_ratio | default "" }} +{{ $quality := .quality }} + +{{/* Initialize return variables */}} +{{ $processed_images := slice }} +{{ $srcset_parts := slice }} +{{ $fallback_image := "" }} + +{{/* + Processability check using Hugo's reflect API: + - reflect.IsImageResourceProcessable: true for JPEG, PNG, WebP, GIF, TIFF, BMP — false for SVG. + - GIF exclusion: Hugo *can* process GIFs, but doing so strips animation frames. + We intentionally skip GIF processing to preserve user-optimized animated GIFs. +*/}} +{{ $isProcessable := reflect.IsImageResourceProcessable $image }} +{{ $isGIF := and $isProcessable (eq $image.MediaType.SubType "gif") }} + +{{ if and $isProcessable (not $isGIF) }} + {{/* Handle responsive mode - for already processed images */}} + {{ if eq $mode "responsive" }} + {{/* Convert to WebP if needed */}} + {{ $base_image := $image }} + {{ $base_image = $image.Process "webp" }} + + {{/* Create responsive variants by resizing down from the processed image */}} + {{ range $width := $sizes }} + {{/* Only create smaller variants */}} + {{ if and (le $width $base_image.Width) (gt $width 0) }} + {{ $resized := $base_image.Resize (printf "%dx webp" $width) }} + {{ $processed_images = $processed_images | append $resized }} + + {{/* Add to srcset */}} + {{ $srcset_part := printf "%s %dw" $resized.RelPermalink $resized.Width }} + {{ $srcset_parts = $srcset_parts | append $srcset_part }} + + {{/* Set fallback to smallest image */}} + {{ if not $fallback_image }} + {{ $fallback_image = $resized }} + {{ end }} + {{ end }} + {{ end }} + + {{/* Always include the original size as the largest option */}} + {{ $srcset_part := printf "%s %dw" $base_image.RelPermalink $base_image.Width }} + {{ $srcset_parts = $srcset_parts | append $srcset_part }} + {{ $processed_images = $processed_images | append $base_image }} + {{ if not $fallback_image }}{{ $fallback_image = $base_image }}{{ end }} + + {{ else }} + {{/* Process images for each breakpoint */}} + {{ range $width := $sizes }} + {{/* Only process if the source image is larger than target width */}} + {{ if ge $image.Width $width }} + {{ $process_params := "" }} + {{/* Build processing parameters based on mode */}} + {{- if eq $mode "resize" -}} + {{- if $quality -}} + {{- $process_params = printf "resize %dx webp q%d" $width $quality -}} + {{- else -}} + {{- $process_params = printf "resize %dx webp" $width -}} + {{- end -}} + {{- else if eq $mode "fill" -}} + {{- if $aspect_ratio -}} + {{- $ratio_parts := split $aspect_ratio ":" -}} + {{- $ratio_width := int (index $ratio_parts 0) -}} + {{- $ratio_height := int (index $ratio_parts 1) -}} + {{- $height := div (mul $width $ratio_height) $ratio_width -}} + {{- if $quality -}} + {{- $process_params = printf "fill %dx%d webp q%d %s" $width $height $quality $anchor -}} + {{- else -}} + {{- $process_params = printf "fill %dx%d webp %s" $width $height $anchor -}} + {{- end -}} + {{- else -}} + {{/* Fill mode without aspect ratio - use resize instead to maintain original proportions */}} + {{- if $quality -}} + {{- $process_params = printf "resize %dx webp q%d" $width $quality -}} + {{- else -}} + {{- $process_params = printf "resize %dx webp" $width -}} + {{- end -}} + {{- end -}} + {{- else -}} + {{/* Default to fit - always maintain original aspect ratio */}} + {{/* Fit mode should not force an aspect ratio, it should fit within bounds */}} + {{- if $quality -}} + {{- $process_params = printf "resize %dx webp q%d" $width $quality -}} + {{- else -}} + {{- $process_params = printf "resize %dx webp" $width -}} + {{- end -}} + {{- end -}} + + {{/* Process the image */}} + {{- $processed := $image.Process $process_params -}} + {{- $processed_images = $processed_images | append $processed -}} + + {{/* Add to srcset */}} + {{- $srcset_part := printf "%s %dw" $processed.RelPermalink $processed.Width -}} + {{- $srcset_parts = $srcset_parts | append $srcset_part -}} + + {{/* Set fallback to smallest image */}} + {{- if not $fallback_image -}} + {{- $fallback_image = $processed -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{ end }} +{{- else -}} + {{/* Non-processable (SVG) or intentionally skipped (GIF): pass through without srcset */}} + {{- $fallback_image = $image -}} + {{- $processed_images = $processed_images | append $image -}} +{{- end -}} + +{{/* Return processed data */}} +{{ return (dict + "srcset" (delimit $srcset_parts ", ") + "fallback" $fallback_image + "sizes" $processed_images +) }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/render_callout.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/render_callout.html new file mode 100644 index 0000000..59ac5e0 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/render_callout.html @@ -0,0 +1,155 @@ +{{/* + Hugo Blox Kit Shared Callout Renderer + + Renders callouts with consistent styling for both shortcodes and render hooks. + + Parameters: + - type: The callout type (note, tip, important, warning, caution, or custom icon name) + - content: The callout content (HTML) + - title: Optional title for the callout + - source: "shortcode" or "renderhook" for context +*/}} + +{{ $type := (lower .type) | default "note" }} +{{ $content := .content }} +{{ $title := .title }} +{{ if or (not $title) (eq $title "") }} + {{/* Try i18n translation with "callout_" prefix, fall back to title case */}} + {{ $i18n_key := printf "callout_%s" $type }} + {{ $title = or (i18n $i18n_key) (title $type) }} +{{ end }} +{{ $source := .source | default "shortcode" }} + +{{/* Define icon and styling mappings for all Obsidian callout types */}} +{{ $alertConfigs := dict + "note" (dict + "icon" "pencil" + "class" "bg-blue-100 dark:bg-blue-900" + "textClass" "text-blue-600 dark:text-blue-300" + "borderClass" "border-blue-500" + ) + "abstract" (dict + "icon" "clipboard-document-list" + "class" "bg-cyan-100 dark:bg-cyan-900" + "textClass" "text-cyan-600 dark:text-cyan-300" + "borderClass" "border-cyan-500" + ) + "summary" (dict + "icon" "clipboard-document-list" + "class" "bg-cyan-100 dark:bg-cyan-900" + "textClass" "text-cyan-600 dark:text-cyan-300" + "borderClass" "border-cyan-500" + ) + "info" (dict + "icon" "information-circle" + "class" "bg-blue-100 dark:bg-blue-900" + "textClass" "text-blue-600 dark:text-blue-300" + "borderClass" "border-blue-500" + ) + "todo" (dict + "icon" "check-circle" + "class" "bg-blue-100 dark:bg-blue-900" + "textClass" "text-blue-600 dark:text-blue-300" + "borderClass" "border-blue-500" + ) + "tip" (dict + "icon" "light-bulb" + "class" "bg-emerald-100 dark:bg-emerald-900" + "textClass" "text-emerald-600 dark:text-emerald-300" + "borderClass" "border-emerald-500" + ) + "success" (dict + "icon" "check-circle" + "class" "bg-green-100 dark:bg-green-900" + "textClass" "text-green-600 dark:text-green-300" + "borderClass" "border-green-500" + ) + "question" (dict + "icon" "question-mark-circle" + "class" "bg-yellow-100 dark:bg-yellow-900" + "textClass" "text-yellow-700 dark:text-yellow-300" + "borderClass" "border-yellow-500" + ) + "warning" (dict + "icon" "exclamation-triangle" + "class" "bg-orange-100 dark:bg-orange-900" + "textClass" "text-orange-600 dark:text-orange-300" + "borderClass" "border-orange-500" + ) + "failure" (dict + "icon" "x-circle" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) + "danger" (dict + "icon" "exclamation-triangle" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) + "bug" (dict + "icon" "bug-ant" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) + "example" (dict + "icon" "beaker" + "class" "bg-purple-100 dark:bg-purple-900" + "textClass" "text-purple-600 dark:text-purple-300" + "borderClass" "border-purple-500" + ) + "quote" (dict + "icon" "chat-bubble-left-right" + "class" "bg-gray-100 dark:bg-gray-800" + "textClass" "text-gray-600 dark:text-gray-300" + "borderClass" "border-gray-500" + ) + "important" (dict + "icon" "exclamation-circle" + "class" "bg-purple-100 dark:bg-purple-900" + "textClass" "text-purple-600 dark:text-purple-300" + "borderClass" "border-purple-500" + ) + "caution" (dict + "icon" "exclamation-triangle" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) +}} + +{{/* Get configuration for this callout type, or use fallback */}} +{{ $config := index $alertConfigs $type }} +{{ $icon := $type }} +{{ $class := "bg-blue-100 dark:bg-blue-900" }} +{{ $textClass := "text-blue-600 dark:text-blue-300" }} +{{ $borderClass := "border-blue-500" }} + +{{ if $config }} + {{ $icon = $config.icon }} + {{ $class = $config.class }} + {{ $textClass = $config.textClass }} + {{ $borderClass = $config.borderClass }} +{{ end }} + +
    + + {{ partial "functions/get_icon" (dict "name" $icon "attributes" "height=\"24\"") }} + +
    + {{/* Display title if provided */}} + {{- with $title -}} +
    + {{- . -}} +
    + {{- end -}} + {{/* Display content */}} +
    + {{- $content -}} +
    +
    +
    \ No newline at end of file diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/render_view.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/render_view.html new file mode 100644 index 0000000..e7ee09e --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/render_view.html @@ -0,0 +1,23 @@ +{{/* Hugo Blox Kit content preview renderer */}} + +{{ $page := .page }} +{{ $item := .item }} +{{ $view := lower .view | default "card" }} +{{ $fragment := .fragment | default "body" }} +{{ $view_dtype := printf "%T" $view }} +{{ $index := .index }} +{{ $html := "" }} + +{{ if not (templates.Exists (printf "_partials/views/%s.html" $view)) }} + {{/* Fallback to card view */}} + {{ warnf "Failed to locate view at `_partials/views/%s.html`. Check you specified a supported `view` in `%s`" $view $page.File.Path }} + {{ $view = "card" }} +{{ end }} + +{{ if eq $fragment "body" }} + {{ $html = (partial (printf "views/%s" $view) (dict "page" $page "item" $item "index" $index "config" (.config | default dict))) }} +{{ else }} + {{ $html = (partial (printf "views/%s--%s" $view $fragment) (dict "page" $page "item" $item "index" $index "config" (.config | default dict))) }} +{{ end }} + +{{ return $html }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/theme_generator.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/theme_generator.html new file mode 100644 index 0000000..5ce9e39 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/theme_generator.html @@ -0,0 +1,229 @@ +{{/* + HugoBlox Theme Engine: Generates CSS Variables for Light and Dark modes + + Input: Theme config dict from get_theme_config helper: + - mode: 'light' | 'dark' | 'system' + - light: Light theme pack name + - dark: Dark theme pack name + - colors: Global color overrides { primary, secondary, neutral } + - colors_light: Light-mode specific color overrides + - colors_dark: Dark-mode specific color overrides + - surfaces: Semantic surface color overrides +*/}} + +{{ $config := . }} +{{ $light_theme_name := $config.light | default "default" }} +{{ $dark_theme_name := $config.dark | default "default" }} +{{ $global_colors := $config.colors | default dict }} +{{ $colors_light := $config.colors_light | default dict }} +{{ $colors_dark := $config.colors_dark | default dict }} +{{ $surfaces_overrides := $config.surfaces | default dict }} + +{{/* Load Theme Data using the new loader */}} +{{ if not hugo.Data.themes }} + {{ warnf "THEME ENGINE ERROR: hugo.Data.themes is empty! Check modules/blox-tailwind/data/themes/" }} +{{ end }} + +{{ $light_theme := partial "functions/load_theme_pack" $light_theme_name }} +{{ $dark_theme := partial "functions/load_theme_pack" $dark_theme_name }} + +{{/* Fallback for missing themes */}} +{{ if not $light_theme }} + {{ warnf "THEME ENGINE WARNING: Light theme '%s' not found or invalid. Defaulting to 'default'." $light_theme_name }} + {{ $light_theme = partial "functions/load_theme_pack" "default" }} +{{ end }} +{{ if not $dark_theme }} + {{ warnf "THEME ENGINE WARNING: Dark theme '%s' not found or invalid. Defaulting to 'default'." $dark_theme_name }} + {{ $dark_theme = partial "functions/load_theme_pack" "default" }} +{{ end }} + +{{/* Resolve effective light/dark mode objects from theme files */}} +{{ $light_base := $light_theme.light | default $light_theme }} +{{ $dark_base := $dark_theme.dark | default $dark_theme }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + APPLY COLOR OVERRIDES + Priority: colors_light/colors_dark → colors (global) → theme pack defaults +═══════════════════════════════════════════════════════════════════════════ */}} + +{{/* Apply global color overrides to LIGHT mode */}} +{{ if $light_base }} + {{ $light_colors := merge (dict) ($light_base.colors | default dict) }} + + {{/* Global overrides */}} + {{ with $global_colors.primary }} + {{ $light_colors = merge $light_colors (dict "primary" .) }} + {{ end }} + {{ with $global_colors.secondary }} + {{ $light_colors = merge $light_colors (dict "secondary" .) }} + {{ end }} + {{ with $global_colors.neutral }} + {{ $light_colors = merge $light_colors (dict "neutral" .) }} + {{ end }} + + {{/* Mode-specific overrides (highest priority) */}} + {{ with $colors_light.primary }} + {{ $light_colors = merge $light_colors (dict "primary" .) }} + {{ end }} + {{ with $colors_light.secondary }} + {{ $light_colors = merge $light_colors (dict "secondary" .) }} + {{ end }} + {{ with $colors_light.neutral }} + {{ $light_colors = merge $light_colors (dict "neutral" .) }} + {{ end }} + + {{ $light_base = merge $light_base (dict "colors" $light_colors) }} + + {{/* Apply surface overrides (only non-empty values) */}} + {{ if $surfaces_overrides }} + {{ $light_surfaces := merge (dict) ($light_base.surfaces | default dict) }} + {{ with $surfaces_overrides.background }} + {{ if ne . "" }} + {{ $light_surfaces = merge $light_surfaces (dict "background" .) }} + {{ end }} + {{ end }} + {{ with $surfaces_overrides.foreground }} + {{ if ne . "" }} + {{ $light_surfaces = merge $light_surfaces (dict "foreground" .) }} + {{ end }} + {{ end }} + {{ with $surfaces_overrides.header }} + {{ $header := merge (dict) ($light_surfaces.header | default dict) }} + {{ with .background }} + {{ if ne . "" }} + {{ $header = merge $header (dict "background" .) }} + {{ end }} + {{ end }} + {{ with .foreground }} + {{ if ne . "" }} + {{ $header = merge $header (dict "foreground" .) }} + {{ end }} + {{ end }} + {{ if gt (len $header) 0 }} + {{ $light_surfaces = merge $light_surfaces (dict "header" $header) }} + {{ end }} + {{ end }} + {{ with $surfaces_overrides.footer }} + {{ $footer := merge (dict) ($light_surfaces.footer | default dict) }} + {{ with .background }} + {{ if ne . "" }} + {{ $footer = merge $footer (dict "background" .) }} + {{ end }} + {{ end }} + {{ with .foreground }} + {{ if ne . "" }} + {{ $footer = merge $footer (dict "foreground" .) }} + {{ end }} + {{ end }} + {{ if gt (len $footer) 0 }} + {{ $light_surfaces = merge $light_surfaces (dict "footer" $footer) }} + {{ end }} + {{ end }} + {{ $light_base = merge $light_base (dict "surfaces" $light_surfaces) }} + {{ end }} +{{ end }} + +{{/* Apply global color overrides to DARK mode */}} +{{ if $dark_base }} + {{ $dark_colors := merge (dict) ($dark_base.colors | default dict) }} + + {{/* Global overrides */}} + {{ with $global_colors.primary }} + {{ $dark_colors = merge $dark_colors (dict "primary" .) }} + {{ end }} + {{ with $global_colors.secondary }} + {{ $dark_colors = merge $dark_colors (dict "secondary" .) }} + {{ end }} + {{ with $global_colors.neutral }} + {{ $dark_colors = merge $dark_colors (dict "neutral" .) }} + {{ end }} + + {{/* Mode-specific overrides (highest priority) */}} + {{ with $colors_dark.primary }} + {{ $dark_colors = merge $dark_colors (dict "primary" .) }} + {{ end }} + {{ with $colors_dark.secondary }} + {{ $dark_colors = merge $dark_colors (dict "secondary" .) }} + {{ end }} + {{ with $colors_dark.neutral }} + {{ $dark_colors = merge $dark_colors (dict "neutral" .) }} + {{ end }} + + {{ $dark_base = merge $dark_base (dict "colors" $dark_colors) }} + + {{/* Apply surface overrides (only non-empty values) */}} + {{ if $surfaces_overrides }} + {{ $dark_surfaces := merge (dict) ($dark_base.surfaces | default dict) }} + {{ with $surfaces_overrides.background }} + {{ if ne . "" }} + {{ $dark_surfaces = merge $dark_surfaces (dict "background" .) }} + {{ end }} + {{ end }} + {{ with $surfaces_overrides.foreground }} + {{ if ne . "" }} + {{ $dark_surfaces = merge $dark_surfaces (dict "foreground" .) }} + {{ end }} + {{ end }} + {{ with $surfaces_overrides.header }} + {{ $header := merge (dict) ($dark_surfaces.header | default dict) }} + {{ with .background }} + {{ if ne . "" }} + {{ $header = merge $header (dict "background" .) }} + {{ end }} + {{ end }} + {{ with .foreground }} + {{ if ne . "" }} + {{ $header = merge $header (dict "foreground" .) }} + {{ end }} + {{ end }} + {{ if gt (len $header) 0 }} + {{ $dark_surfaces = merge $dark_surfaces (dict "header" $header) }} + {{ end }} + {{ end }} + {{ with $surfaces_overrides.footer }} + {{ $footer := merge (dict) ($dark_surfaces.footer | default dict) }} + {{ with .background }} + {{ if ne . "" }} + {{ $footer = merge $footer (dict "background" .) }} + {{ end }} + {{ end }} + {{ with .foreground }} + {{ if ne . "" }} + {{ $footer = merge $footer (dict "foreground" .) }} + {{ end }} + {{ end }} + {{ if gt (len $footer) 0 }} + {{ $dark_surfaces = merge $dark_surfaces (dict "footer" $footer) }} + {{ end }} + {{ end }} + {{ $dark_base = merge $dark_base (dict "surfaces" $dark_surfaces) }} + {{ end }} +{{ end }} + +{{/* ═══════════════════════════════════════════════════════════════════════════ + GENERATE CSS OUTPUT +═══════════════════════════════════════════════════════════════════════════ */}} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/theme_variables.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/theme_variables.html new file mode 100644 index 0000000..4da4d8b --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/theme_variables.html @@ -0,0 +1,26 @@ +{{/* HugoBlox Theme Helper to output CSS variables for a specific theme block */}} +{{ $data := .data }} + +{{/* 1. Palette Generation (Primary/Secondary Scales) */}} +{{ $primary := $data.colors.primary | default "#3b82f6" }} +{{ $secondary := $data.colors.secondary | default "#10b981" }} + +{{ partial "functions/generate_color_scale" (dict "name" "primary" "color" $primary) }} +{{ partial "functions/generate_color_scale" (dict "name" "secondary" "color" $secondary) }} + +{{ if $data.colors.neutral }} + {{/* Map user 'neutral' to Tailwind 'gray' utility to override text-gray-* classes */}} + {{ partial "functions/generate_color_scale" (dict "name" "gray" "color" $data.colors.neutral) }} +{{ end }} + +{{/* 2. Semantic Surface Variables */}} +--hb-color-background: {{ $data.surfaces.background | default "#ffffff" }}; +--hb-color-foreground: {{ $data.surfaces.foreground | default "#000000" }}; + +{{/* Header */}} +--hb-color-header-bg: {{ $data.surfaces.header.background | default $data.surfaces.background | default "#ffffff" }}; +--hb-color-header-fg: {{ $data.surfaces.header.foreground | default $data.surfaces.foreground | default "#000000" }}; + +{{/* Footer */}} +--hb-color-footer-bg: {{ $data.surfaces.footer.background | default $data.surfaces.background | default "#f3f4f6" }}; +--hb-color-footer-fg: {{ $data.surfaces.footer.foreground | default $data.surfaces.foreground | default "#000000" }}; diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/typography.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/typography.html new file mode 100644 index 0000000..290d3da --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/typography.html @@ -0,0 +1,221 @@ +{{/* + HugoBlox Theme Engine: Typography Rendering + + Resolves font families, emits @font-face for bundled fonts, + Google Fonts tags for remote fonts, and CSS custom properties. + + Font resolution order (per family): + 1. system-sans / system-serif / system-mono → native OS font stack + 2. Bundled file in assets/dist/font/* → local @font-face + 3. Fallback → Google Fonts CDN + + Input: Theme config dict from get_theme_config: + - typography: { families, weights, sizes, leading, tracking, variable } + + Output: @font-face (bundled) + (Google Fonts) + + {{ end }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{/* Build Google Fonts URL */}} +{{ $gf_families := slice }} +{{ $seen := dict }} +{{ range $role := $roles }} + {{ with index $resolve_family $role }} + {{ if .google }} + {{ $name := .name }} + {{ $is_variable := index $variable $role | default false }} + {{/* Use full range for variable fonts, discrete weights for static */}} + {{ $weight_spec := "" }} + {{ if $is_variable }} + {{ $weight_spec = "100..900" }} + {{ else }} + {{ $role_weights := index $weights $role | default (slice 400) }} + {{ $weight_spec = delimit $role_weights "," }} + {{ end }} + {{/* Dedup key includes weight spec so the same font can appear as both static and variable if needed */}} + {{ $dedup_key := printf "%s|%s" $name $weight_spec }} + {{ if not (index $seen $dedup_key) }} + {{ $seen = merge $seen (dict $dedup_key true) }} + {{ $encoded := replace $name " " "+" }} + {{ $gf_families = $gf_families | append (printf "%s:wght@%s" $encoded $weight_spec) }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{ if gt (len $gf_families) 0 }} + {{ $gf_url := printf "https://fonts.googleapis.com/css2?%s&display=swap" (delimit (apply $gf_families "printf" "family=%s" ".") "&") }} + + + +{{ end }} + +{{/* Font size vars */}} +{{ $font_size_base := $sizes.base | default "1rem" }} +{{ $font_size_sm := $sizes.sm | default "0.875rem" }} +{{ $font_size_lg := $sizes.lg | default "1.125rem" }} + +{{/* Resolve CSS font-family values */}} +{{ $heading_css := $system_sans }} +{{ with index $resolve_family "heading" }}{{ $heading_css = .css }}{{ end }} +{{ $body_css := $system_sans }} +{{ with index $resolve_family "body" }}{{ $body_css = .css }}{{ end }} +{{ $code_css := $system_mono }} +{{ with index $resolve_family "code" }}{{ $code_css = .css }}{{ end }} +{{ $nav_css := $heading_css }} +{{ with index $resolve_family "nav" }}{{ if .css }}{{ $nav_css = .css }}{{ end }}{{ end }} + +{{/* Get primary weight for each role (first in array) */}} +{{ $heading_weight := 700 }} +{{ with $weights.heading }}{{ $heading_weight = index . 0 }}{{ end }} +{{ $body_weight := 400 }} +{{ with $weights.body }}{{ $body_weight = index . 0 }}{{ end }} + +{{/* Bold body weight: second value in array, or primary + 200 (capped at 900) */}} +{{ $body_weight_bold := math.Min 900 (add $body_weight 200) }} +{{ with $weights.body }}{{ if ge (len .) 2 }}{{ $body_weight_bold = index . 1 }}{{ end }}{{ end }} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/uid.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/uid.html new file mode 100644 index 0000000..f1a86cb --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/functions/uid.html @@ -0,0 +1,19 @@ +{{/* + Hugo Blox UID Generator + Generate a unique ID for shortcodes and components. + Uses the page's unique ID combined with ordinal for uniqueness. +*/}} + +{{ $uid := .Page.File.UniqueID }} +{{ $ctx := . }} + +{{ range seq 16 }} + {{ with $ctx }} + {{ $uid = printf "%s-%d" $uid .Ordinal }} + {{ $ctx = .Parent }} + {{ else }} + {{ break }} + {{ end }} +{{ end }} + +{{ return (crypto.MD5 $uid) }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/resolve-block-param.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/resolve-block-param.html new file mode 100644 index 0000000..55788c6 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/resolve-block-param.html @@ -0,0 +1,22 @@ +{{/* Context-aware block parameter resolution with backward compatibility */}} +{{/* Strategy: Prefers "block" over "blox" (legacy) in configs */}} +{{- $config := .config -}} +{{- $context := .context | default "component" -}} + +{{- $block_id := "" -}} +{{- $using_legacy := false -}} + +{{- if $config.style -}} + {{- $block_id = $config.style -}} +{{- else if $config.block -}} + {{- $block_id = $config.block -}} +{{- else if $config.blox -}} + {{- $block_id = $config.blox -}} + {{- $using_legacy = true -}} +{{- end -}} + +{{- if $using_legacy -}} + {{- warnf "HBX: Using legacy 'blox' parameter for %s. Please update to 'block' for consistency. (Found: blox=%s)" $context $block_id -}} +{{- end -}} + +{{- return $block_id -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/resolve.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/resolve.html new file mode 100644 index 0000000..4c74ae8 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/resolve.html @@ -0,0 +1,15 @@ +{{/* HBX resolver: maps a section { block: "", ... } to the block partial. + This resolver looks up blocks from the blox//block.html structure, + which are mounted to layouts/_partials/hbx/blocks//block.html via module.yaml. +*/}} +{{- $id := .section.block -}} +{{- if not $id }}{{ errorf "HBX: section is missing 'block' key: %v" .section }}{{ end -}} + +{{- $params := .section -}} +{{- $path := printf "hbx/blocks/%s/block.html" $id -}} + +{{- if templates.Exists (printf "_partials/%s" $path) -}} + {{ partial $path (dict "wcPage" .ctx "wcBlock" $params "wcIdentifier" ($params.id | default (printf "section-%s" $id))) }} +{{- else -}} + {{ errorf "HBX: block '%s' not found at %q" $id $path }} +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/sections.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/sections.html new file mode 100644 index 0000000..f231220 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hbx/sections.html @@ -0,0 +1,105 @@ +{{/* Returns sections from front matter, linked data, or from data. */}} +{{- $sections := .Params.sections -}} +{{- $source := "front matter" -}} + +{{/* 1) Linked-data: sections_source */}} +{{- with .Params.sections_source -}} + {{- $key := . -}} + {{- if hasPrefix $key "pages/" -}}{{- $key = (replace $key "pages/" "") -}}{{- end -}} + {{- with index hugo.Data.pages $key -}} + {{- $base := .sections -}} + {{- if $sections -}} + {{- $merged := slice -}} + {{- range $i, $b := $base -}} + {{- $ov := index $sections $i -}} + {{- if $ov -}} + {{- $merged = $merged | append (partial "functions/deep_merge" (dict "a" $b "b" $ov)) -}} + {{- else -}} + {{- $merged = $merged | append $b -}} + {{- end -}} + {{- end -}} + {{- if gt (len $sections) (len $base) -}} + {{- range $i, $ov := $sections -}} + {{- if ge $i (len $base) -}} + {{- $merged = $merged | append $ov -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- $sections = $merged -}} + {{- else -}} + {{- $sections = $base -}} + {{- end -}} + {{- $source = printf "data/pages/%s.yaml (sections_source)" $key -}} + {{- else -}} + {{- partial "functions/logger" (dict "page" . "level" "warn" "id" (printf "sections-source-missing-%s" $key) "message" (printf "sections_source '%s' not found under data/pages/" $key) "source" (dict "type" "partial" "name" "hbx/sections")) -}} + {{- end -}} +{{- end -}} + +{{/* 2) Fallbacks if still no sections */}} +{{- if not $sections -}} + {{/* Fallback: Legacy data-driven pages */}} + {{- $p := "home" -}}{{/* Default to "home" for homepage */}} + {{- with .File -}} + {{- $basename := .ContentBaseName -}} + {{- if $basename -}} + {{- $p = $basename -}} + {{/* Special case: homepage _index.md should use "home" data file */}} + {{- if eq $p "_index" -}} + {{- $p = "home" -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{/* Ensure homepage always uses "home" data file */}} + {{- if eq $.RelPermalink "/" -}} + {{- $p = "home" -}} + {{- end -}} + {{- with index hugo.Data.pages $p -}} + {{- $sections = .sections -}} + {{- $source = printf "data/pages/%s.yaml" $p -}} + {{- end -}} +{{- end -}} + +{{/* 3) Per-section ref: load from data/blocks/.yaml and deep-merge with inline (inline wins) */}} +{{- if $sections -}} + {{- $resolved := slice -}} + {{- range $i, $s := $sections -}} + {{- $sec := $s -}} + {{- with $s.ref -}} + {{- $ref := . | lower -}} + {{- $path := cond (hasPrefix $ref "blocks/") $ref (printf "blocks/%s" $ref) -}} + {{- $parts := split $path "/" -}} + {{- $data := hugo.Data -}} + {{- range $j, $p := $parts -}} + {{- if $data -}} + {{- $data = index $data $p -}} + {{- end -}} + {{- end -}} + {{- if $data -}} + {{- /* shallow merge */ -}} + {{- $merged := merge $data $sec -}} + {{- /* merge 'content' */ -}} + {{- $ac := index $data "content" -}}{{- $bc := index $sec "content" -}} + {{- if and (reflect.IsMap $ac) (reflect.IsMap $bc) -}} + {{- $merged = merge $merged (dict "content" (merge $ac $bc)) -}} + {{- end -}} + {{- /* merge 'design' */ -}} + {{- $ad := index $data "design" -}}{{- $bd := index $sec "design" -}} + {{- if and (reflect.IsMap $ad) (reflect.IsMap $bd) -}} + {{- $merged = merge $merged (dict "design" (merge $ad $bd)) -}} + {{- end -}} + {{- $sec = $merged -}} + {{- else -}} + {{- partial "functions/logger" (dict "page" $ "level" "warn" "id" (printf "section-ref-missing-%s" $ref) "message" (printf "HBX: section ref '%s' not found under data/blocks/" $ref) "source" (dict "type" "partial" "name" "hbx/sections")) -}} + {{- end -}} + {{- end -}} + {{- $resolved = $resolved | append $sec -}} + {{- end -}} + {{- $sections = $resolved -}} +{{- end -}} + +{{- if $sections -}} + {{- partial "functions/logger" (dict "page" . "level" "info" "message" (printf "✅ Using sections from %s for page %s (found %d sections)" $source $.RelPermalink (len $sections)) "source" (dict "type" "partial" "name" "hbx/sections")) -}} +{{- else -}} + {{- partial "functions/logger" (dict "page" . "level" "warn" "id" (printf "sections-none-%s" $.RelPermalink) "message" (printf "HBX: No sections found for page %s (checked %s)" $.RelPermalink $source) "source" (dict "type" "partial" "name" "hbx/sections")) -}} +{{- end -}} +{{- return $sections -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hooks/body-end/hbx-debug-export.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hooks/body-end/hbx-debug-export.html new file mode 100644 index 0000000..d6c3bb6 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hooks/body-end/hbx-debug-export.html @@ -0,0 +1,67 @@ +{{/* Hugo Blox: Export Debug Logs for Dev HUD (window var) */}} +{{- if site.Params.hugoblox.debug.export_logs | default true -}} + {{- /* Collect all logs from all pages (site-wide) */ -}} + {{- $entries := slice -}} + {{- range .Site.Pages -}} + {{- with .Store -}} + {{- with .Get "hbx_logs" -}} + {{- $entries = $entries | append . -}} + {{- end -}} + {{- end -}} + {{- end -}} + + {{- /* Summarize dependencies */ -}} + {{- $deps := slice -}} + {{- range $i, $d := hugo.Deps -}} + {{- $dep := dict "path" $d.Path "version" $d.Version "vendor" $d.Vendor -}} + {{- with $d.Owner -}} + {{- $dep = merge $dep (dict "owner_path" .Path) -}} + {{- end -}} + {{- with $d.Replace -}} + {{- $dep = merge $dep (dict "replace_path" .Path) -}} + {{- end -}} + {{- with $d.Time -}} + {{- $dep = merge $dep (dict "time" (printf "%v" .)) -}} + {{- end -}} + {{- $deps = $deps | append $dep -}} + {{- end -}} + + {{- /* Detect blox-tailwind module version if present */ -}} + {{- $bloxTW := dict -}} + {{- range $deps -}} + {{- $p := .path -}} + {{- if and $p (in $p "blox-tailwind") -}} + {{- $bloxTW = dict "path" .path "version" .version -}} + {{- end -}} + {{- end -}} + + {{- /* Current page information */ -}} + {{- $filePath := "" -}} + {{- with .File -}} + {{- $filePath = .Path -}} + {{- end -}} + {{- $buildId := partialCached "functions/get-build-id.html" "hbx-build-id" -}} + {{- $currentPage := dict + "path" .RelPermalink + "type" .Type + "layout" (.Layout | default "") + "kind" .Kind + "section" .Section + "title" .Title + "file" $filePath + "buildId" $buildId + -}} + + {{- $payload := dict + "version" 1 + "generatedAt" (now.UTC.Format "2006-01-02T15:04:05Z07:00") + "hugo" (dict "version" hugo.Version "goVersion" hugo.GoVersion) + "deps" $deps + "modules" (dict "bloxTailwind" $bloxTW) + "entries" $entries + "currentPage" $currentPage + -}} + +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hooks/body-end/hbx-debug-hud.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hooks/body-end/hbx-debug-hud.html new file mode 100644 index 0000000..aa53ae9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/hooks/body-end/hbx-debug-hud.html @@ -0,0 +1,410 @@ +{{/* Hugo Blox: Dev HUD (floating button + panel). Dev only. */}} + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/init.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/init.html new file mode 100644 index 0000000..e9b23b8 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/init.html @@ -0,0 +1,129 @@ +{{/* Workaround Hugo concurrency issues (e.g. not detecting Page.Store variables) */}} +{{/* Use cases: Page.Store use within shortcodes, blox, and backlinks. */}} +{{/* See https://discourse.gohugo.io/t/persisting-data-across-the-build-of-a-site/41114/6 */}} + +{{/* Pre-warm only content pages so Page.Store/backlinks are populated deterministically */}} +{{- range where .Site.Pages "Kind" "page" -}} + {{- $ := .Content -}} +{{- end -}} + +{{/* Preload block configs for landing pages */}} +{{- range where .Site.Pages "Type" "landing" -}} + {{ $page := . }} + {{/* Resolve sections: front matter, sections_source, fallback to data/pages */}} + {{ $sections := $page.Params.sections }} + + {{/* Linked-data: sections_source support */}} + {{ with $page.Params.sections_source }} + {{ $key := . }} + {{ if hasPrefix $key "pages/" }}{{ $key = replace $key "pages/" "" }}{{ end }} + {{ with index hugo.Data.pages $key }} + {{ $base := .sections }} + {{ if $sections }} + {{ $merged := slice }} + {{ range $i, $b := $base }} + {{ $ov := index $sections $i }} + {{ if $ov }} + {{ $merged = $merged | append (merge $b $ov) }} + {{ else }} + {{ $merged = $merged | append $b }} + {{ end }} + {{ end }} + {{ if gt (len $sections) (len $base) }} + {{ range $i, $ov := $sections }} + {{ if ge $i (len $base) }} + {{ $merged = $merged | append $ov }} + {{ end }} + {{ end }} + {{ end }} + {{ $sections = $merged }} + {{ else }} + {{ $sections = $base }} + {{ end }} + {{ end }} + {{ end }} + + {{ if not $sections }} + {{/* Data-driven fallback (home) */}} + {{ $p := "home" }} + {{ with $page.File }} + {{ $basename := .ContentBaseName }} + {{ if $basename }} + {{ $p = $basename }} + {{ if eq $p "_index" }}{{ $p = "home" }}{{ end }} + {{ end }} + {{ end }} + {{ if eq $page.RelPermalink "/" }}{{ $p = "home" }}{{ end }} + {{ with index hugo.Data.pages $p }} + {{ $sections = .sections }} + {{ end }} + {{ end }} + + {{/* Resolve per-section ref from data/blocks/* for block detection */}} + {{ if $sections }} + {{ $resolved := slice }} + {{ range $i, $s := $sections }} + {{ $sec := $s }} + {{ with $s.ref }} + {{ $ref := lower . }} + {{ $path := cond (hasPrefix $ref "blocks/") $ref (printf "blocks/%s" $ref) }} + {{ $parts := split $path "/" }} + {{ $data := hugo.Data }} + {{ range $j, $p := $parts }} + {{ if $data }}{{ $data = index $data $p }}{{ end }} + {{ end }} + {{ if $data }} + {{/* Shallow merge so base can provide block type */}} + {{ $sec = merge $data $sec }} + {{ end }} + {{ end }} + {{ $resolved = $resolved | append $sec }} + {{ end }} + {{ $sections = $resolved }} + {{ end }} + + {{ range $index, $block := $sections }} + {{/* Do not show sections intended only for the demo site. */}} + {{ if or (not $block.demo) ($block.demo | and (eq (os.Getenv "HUGO_BLOX_DEMO") "true")) }} + {{- $block_type := partial "hbx/resolve-block-param" (dict "config" $block "context" "content section") | default "markdown" -}} + {{ $block_type = lower $block_type }} + {{ range $r := hugo.Data.blox_aliases.renames }} + {{ $block_type = cond (eq $block_type $r.old) $r.new $block_type }} + {{ end }} + + {{/* Store the block type in the page store for asset bundling */}} + {{ $current_blocks := $page.Store.Get "block_types" | default (slice) }} + {{ $page.Store.Set "block_types" ($current_blocks | append $block_type) }} + + {{/* Check if this is a Preact-enabled block that needs hydration */}} + {{ $component_path := printf "js/hbx/blocks/%s/client.jsx" $block_type }} + {{ if resources.Get $component_path }} + {{ $page.Store.Set "needs_preact" true }} + {{/* Store which Preact blocks are used on this page */}} + {{ $preact_blocks := $page.Store.Get "preact_blocks" | default slice }} + {{ if not (in $preact_blocks $block_type) }} + {{ $preact_blocks = $preact_blocks | append $block_type }} + {{ $page.Store.Set "preact_blocks" $preact_blocks }} + {{ end }} + {{ end }} + + {{/* Detect FAQ blocks for JSON-LD structured data (avoid race conditions) */}} + {{ if eq $block_type "faq" }} + {{ if $block.content.items }} + {{ $faq_items := $page.Store.Get "faq_items" | default slice }} + {{ range $block.content.items }} + {{ $faq_items = $faq_items | append (dict "question" .question "answer" .answer) }} + {{ end }} + {{ $page.Store.Set "faq_items" $faq_items }} + {{ end }} + {{ end }} + + {{ $widget_config_file := printf "blox/%s/config.html" $block_type }} + {{ if templates.Exists (printf "_partials/%s" $widget_config_file) }} + {{ $hash_id := $block.id | default (printf "section-%s" (replace $block_type "." "-")) }} + {{ $widget_args := dict "wcPage" $page "wcBlock" $block "wcIdentifier" $hash_id }} + {{ partial $widget_config_file $widget_args }} + {{ end }} + {{ end }} + {{ end }} +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/article.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/article.html new file mode 100644 index 0000000..d494ef6 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/article.html @@ -0,0 +1,48 @@ +{{- $page := .page }} +{{ $summary := .summary }} +{{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }} + +{{/* Get schema type. */}} +{{ $schema := "Article" }} +{{ if eq $page.Type "blog" }} + {{ $schema = "BlogPosting" }} +{{ end }} + +{{ $author := partial "functions/get_author_name" $page }} +{{ $branding := partialCached "functions/get_branding" $page "branding" }} +{{ $publisher := $branding.organization }} +{{ $logo_url := partial "functions/get_logo_url" $page -}} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/breadcrumbs.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/breadcrumbs.html new file mode 100644 index 0000000..20cfb39 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/breadcrumbs.html @@ -0,0 +1,33 @@ +{{- $page := .page -}} + +{{- if not $page.IsHome -}} + {{- $items := slice -}} + {{- $position := 1 -}} + + {{- with site.Home -}} + {{- $home_title := .LinkTitle | default site.Title | default "Home" -}} + {{- $item := dict "@type" "ListItem" "position" $position "name" ($home_title | plainify) "item" (dict "@id" .Permalink "name" ($home_title | plainify)) -}} + {{- $items = $items | append $item -}} + {{- $position = add $position 1 -}} + {{- end -}} + + {{- with $page.Ancestors -}} + {{- range .Reverse -}} + {{- if not .IsHome -}} + {{- $item := dict "@type" "ListItem" "position" $position "name" (.LinkTitle | plainify) "item" (dict "@id" .Permalink "name" (.LinkTitle | plainify)) -}} + {{- $items = $items | append $item -}} + {{- $position = add $position 1 -}} + {{- end -}} + {{- end -}} + {{- end -}} + + {{- $item := dict "@type" "ListItem" "position" $position "name" ($page.LinkTitle | default $page.Title | plainify) "item" (dict "@id" $page.Permalink "name" ($page.LinkTitle | default $page.Title | plainify)) -}} + {{- $items = $items | append $item -}} + + {{- if gt (len $items) 1 -}} + {{- $breadcrumb := dict "@context" "https://schema.org" "@type" "BreadcrumbList" "itemListElement" $items -}} + + {{- end -}} +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/business.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/business.html new file mode 100644 index 0000000..0433729 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/business.html @@ -0,0 +1,31 @@ +{{- $sharing_image := resources.GetMatch (path.Join "media" "sharing.*") -}} +{{- $branding := partialCached "functions/get_branding" . "branding" -}} + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/collectionpage.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/collectionpage.html new file mode 100644 index 0000000..225b82c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/collectionpage.html @@ -0,0 +1,71 @@ +{{- $page := .page -}} +{{- $summary := .summary -}} + +{{- $language := $page.Language.Locale | default site.Language.Locale | default "en" -}} +{{- $description := $summary | default ($page.Params.summary | default $page.Summary) -}} +{{- $description = $description | plainify -}} + +{{- $listed_pages := $page.Pages -}} +{{- if $page.IsHome -}} + {{- $listed_pages = slice -}} +{{- else if $listed_pages -}} + {{- $listed_pages = $listed_pages.ByDate.Reverse -}} +{{- else -}} + {{- $listed_pages = slice -}} +{{- end -}} + +{{- $items := slice -}} +{{- $max_items := 10 -}} +{{- range $index, $item := $listed_pages -}} + {{- if ge $index $max_items -}} + {{- break -}} + {{- end -}} + {{- $items = $items | append (dict + "@type" "ListItem" + "position" (add $index 1) + "item" (dict + "@type" "WebPage" + "@id" $item.Permalink + "name" ($item.LinkTitle | default $item.Title | plainify) + "url" $item.Permalink + ) + ) -}} +{{- end -}} + +{{- $item_list := dict + "@type" "ItemList" + "itemListOrder" "Descending" + "numberOfItems" (len $items) + "itemListElement" $items +-}} + +{{- $collection := dict + "@context" "https://schema.org" + "@type" "CollectionPage" + "@id" $page.Permalink + "url" $page.Permalink + "name" ($page.LinkTitle | default $page.Title | plainify) + "inLanguage" $language + "isPartOf" (dict + "@type" "WebSite" + "@id" site.BaseURL + "url" site.BaseURL + "name" site.Title + ) +-}} + +{{- if $description }} + {{- $collection = merge $collection (dict "description" $description) -}} +{{- end -}} + +{{- if not $page.Lastmod.IsZero }} + {{- $collection = merge $collection (dict "dateModified" ($page.Lastmod.Format "2006-01-02T15:04:05Z07:00")) -}} +{{- end -}} + +{{- if gt (len $items) 0 }} + {{- $collection = merge $collection (dict "mainEntity" $item_list) -}} +{{- end -}} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/event.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/event.html new file mode 100644 index 0000000..03629e0 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/event.html @@ -0,0 +1,48 @@ +{{ $page := .page }} +{{ $summary := .summary }} +{{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }} +{{ $author := partial "functions/get_author_name" $page }} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/faqpage.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/faqpage.html new file mode 100644 index 0000000..611e320 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/faqpage.html @@ -0,0 +1,48 @@ +{{- $page := .page }} +{{ $summary := .summary }} + +{{/* Get FAQ items - can be from params.faqs, Page.Store (from init.html), or child pages */}} +{{ $faq_items := slice }} + +{{/* Method 1: FAQ items defined in front matter */}} +{{ if $page.Params.faqs }} + {{ $faq_items = $page.Params.faqs }} +{{ end }} + +{{/* Method 2: Extract from Page.Store (populated by init.html to avoid race conditions) */}} +{{ if not $faq_items }} + {{ with $page.Store.Get "faq_items" }} + {{ $faq_items = . }} + {{ end }} +{{ end }} + +{{/* Method 3: Auto-generate from child pages in a FAQ section */}} +{{ if and (not $faq_items) ($page.IsSection) }} + {{ range $page.RegularPages }} + {{ $faq_items = $faq_items | append (dict "question" (.Params.question | default .Title) "answer" (.Params.answer | default .Summary | default (.Content | plainify))) }} + {{ end }} +{{ end }} + +{{/* Only output FAQ schema if we have FAQ items */}} +{{ if $faq_items }} + +{{ end }} + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/main.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/main.html new file mode 100644 index 0000000..0bebb29 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/main.html @@ -0,0 +1,48 @@ +{{ $page := .page }} +{{ $summary := .summary }} +{{ $site_type := site.Params.hugoblox.identity.type | humanize | default "Person" }} + +{{- if $page.IsHome -}} + + {{ partialCached "jsonld/website.html" $page }} + + {{ if ne $site_type "Person" }} + {{ partial "jsonld/business.html" $page }} + {{ end }} + +{{- else if $page.IsPage -}} + + {{ if (eq $page.Type "blog") | or (eq $page.Type "publications") | or (eq $page.Type "projects") }} + {{ partial "jsonld/article.html" (dict "page" $page "summary" $summary) }} + {{ end }} + + {{ if eq $page.Type "events" }} + {{ partial "jsonld/event.html" (dict "page" $page "summary" $summary) }} + {{ end }} + + {{/* Q&A Page - individual question/answer page */}} + {{ if eq $page.Type "questions" }} + {{ partial "jsonld/qapage.html" (dict "page" $page "summary" $summary) }} + {{ end }} + + {{/* FAQ Page type */}} + {{ if eq $page.Type "faq" }} + {{ partial "jsonld/faqpage.html" (dict "page" $page "summary" $summary) }} + {{ end }} + + {{ partial "jsonld/webpage.html" (dict "page" $page "summary" $summary) }} + +{{- else -}} + + {{ partial "jsonld/collectionpage.html" (dict "page" $page "summary" $summary) }} + +{{- end }} + +{{ if not $page.IsHome }} + {{ partial "jsonld/breadcrumbs.html" (dict "page" $page) }} +{{ end }} + +{{/* FAQ content - can appear on any page type including landing pages and homepage */}} +{{ if or ($page.Params.faq_page) ($page.Params.faqs) }} + {{ partial "jsonld/faqpage.html" (dict "page" $page "summary" $summary) }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/qapage.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/qapage.html new file mode 100644 index 0000000..fa21e7d --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/qapage.html @@ -0,0 +1,88 @@ +{{- $page := .page }} +{{ $summary := .summary }} +{{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }} + +{{/* Get author and publisher info */}} +{{ $author := partial "functions/get_author_name" $page }} +{{ $branding := partialCached "functions/get_branding" $page "branding" }} +{{ $publisher := $branding.organization }} + +{{/* Extract question - prioritize explicit param, fallback to title */}} +{{ $question := $page.Params.question | default $page.Title }} + +{{/* Extract answer - prioritize explicit param, fallback to summary, then content */}} +{{ $answer := "" }} +{{ if $page.Params.answer }} + {{ $answer = $page.Params.answer }} +{{ else if $page.Params.summary }} + {{ $answer = $page.Params.summary }} +{{ else }} + {{ $answer = $page.Content | plainify | truncate 500 }} +{{ end }} + +{{/* Get upvote/downvote counts if available */}} +{{ $upvote_count := $page.Params.upvote_count | default 0 }} +{{ $downvote_count := $page.Params.downvote_count | default 0 }} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/webpage.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/webpage.html new file mode 100644 index 0000000..da119e1 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/webpage.html @@ -0,0 +1,56 @@ +{{- $page := .page -}} +{{- $summary := .summary -}} + +{{- $language := $page.Language.Locale | default site.Language.Locale | default "en" -}} +{{- $description := $summary | default ($page.Params.summary | default $page.Summary) -}} +{{- $description = $description | plainify -}} + +{{- $image := partial "functions/get_featured_image" $page -}} +{{- if not $image -}} + {{- $image = partial "functions/get_site_icon" 512 -}} +{{- end -}} + +{{- $image_obj := dict -}} +{{- with $image -}} + {{- $image_obj = dict + "@type" "ImageObject" + "url" .Permalink + -}} + {{- with .Width }}{{ $image_obj = merge $image_obj (dict "width" .) }}{{ end -}} + {{- with .Height }}{{ $image_obj = merge $image_obj (dict "height" .) }}{{ end -}} +{{- end -}} + +{{- $webpage := dict + "@context" "https://schema.org" + "@type" "WebPage" + "@id" $page.Permalink + "url" $page.Permalink + "name" ($page.LinkTitle | default $page.Title | plainify) + "inLanguage" $language + "isPartOf" (dict + "@type" "WebSite" + "@id" site.BaseURL + "url" site.BaseURL + "name" site.Title + ) +-}} + +{{- if $description }} + {{- $webpage = merge $webpage (dict "description" $description) -}} +{{- end -}} + +{{- if not $page.Date.IsZero }} + {{- $webpage = merge $webpage (dict "datePublished" ($page.Date.Format "2006-01-02T15:04:05Z07:00")) -}} +{{- end -}} + +{{- if not $page.Lastmod.IsZero }} + {{- $webpage = merge $webpage (dict "dateModified" ($page.Lastmod.Format "2006-01-02T15:04:05Z07:00")) -}} +{{- end -}} + +{{- with $image_obj }} + {{- $webpage = merge $webpage (dict "primaryImageOfPage" .) -}} +{{- end -}} + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/website.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/website.html new file mode 100644 index 0000000..8a144d7 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/jsonld/website.html @@ -0,0 +1,14 @@ + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/landing_page.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/landing_page.html new file mode 100644 index 0000000..c28af7e --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/landing_page.html @@ -0,0 +1,13 @@ +{{/* Load Hugo Blox - HBX resolver-based system + Blocks live in `blox//block.html` and are mounted to `layouts/_partials/hbx/blocks//block.html`. + Landing pages must specify `sections: [{ block: '', ... }]`. +*/}} +{{/* Use unified sections source */}} +{{- $sections := partial "hbx/sections.html" . -}} + +{{ range $index, $block := $sections }} + {{/* Do not show sections intended only for the demo site. */}} + {{ if or (not $block.demo) ($block.demo | and (eq (os.Getenv "HUGO_BLOX_DEMO") "true")) }} + {{ partial "functions/parse_block_v3" (dict "page" $ "block" $block) }} + {{ end }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/libraries.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/libraries.html new file mode 100644 index 0000000..bb706be --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/libraries.html @@ -0,0 +1,121 @@ +{{/* Load Preact for component-based blocks */}} +{{/* Check if any blocks on this page use Preact (set by init.html) */}} +{{ if .Page.Store.Get "needs_preact" }} + {{ $preact_blocks := .Page.Store.Get "preact_blocks" | default slice }} + + {{/* Preact is now bundled with each template via js.Build and node_modules */}} + + {{/* Build and load each Preact block's client script */}} + {{ range $block_type := $preact_blocks }} + {{ $client_path := printf "js/hbx/blocks/%s/client.jsx" $block_type }} + {{ $client_jsx := resources.Get $client_path }} + + {{ if $client_jsx }} + {{/* Build the client-side JSX using Hugo's official integration */}} + {{ $jsx_opts := dict + "targetPath" (printf "assets/js/preact-built/%s.js" $block_type) + "JSX" "automatic" + "JSXImportSource" "preact" + "format" "iife" + "minify" hugo.IsProduction + "sourceMap" (cond hugo.IsDevelopment "external" "") + }} + {{ $built_jsx := $client_jsx | js.Build $jsx_opts }} + {{ if hugo.IsProduction }} + {{ $built_jsx = $built_jsx | fingerprint "sha256" }} + {{ end }} + + {{ end }} + {{ end }} +{{ end }} + +{{/* Show site search? */}} +{{ $show_search := site.Params.hugoblox.header.search | default false }} + +{{/* Hugo Blox Animations - load synchronously BEFORE Alpine.js to register components */}} +{{ if .Page.Store.Get "has_animations" }} + {{ $animations_js := resources.Get "js/hb-animations.js" | resources.Minify }} + {{- if hugo.IsProduction -}} + {{ $animations_js = $animations_js | fingerprint "sha256" }} + {{- end -}} + +{{ end }} + +{{/* Load Alpine JS extension? */}} +{{/* Alpine is needed for search modal and other interactive components */}} +{{ $needs_alpine := or (.Page.Store.Get "has_alpine") $show_search (.Page.Store.Get "has_animations") }} +{{ if $needs_alpine }} + + {{ $alpine_js := resources.Get "dist/lib/alpinejs/cdn.min.js" }} + {{ $alpine_js = $alpine_js | resources.Fingerprint "sha256" }} + +{{ end }} + +{{/* Hugo Blox Search JavaScript (CSS is in main.css) */}} +{{ if $show_search }} +{{ $search_js := resources.Get "js/hb-search.js" | resources.Minify }} +{{- if hugo.IsProduction -}} + {{ $search_js = $search_js | fingerprint "sha256" }} +{{- end -}} + +{{ end }} + +{{/* Mermaid */}} +{{ if (.Page.Store.Get "has_mermaid") }} + {{ $mermaid_js := resources.Get "dist/lib/mermaid/mermaid.min.js" }} + {{ $mermaid_config_js := resources.Get "js/hb-mermaid-config.js" }} + {{ $mermaid_config_js = $mermaid_config_js | resources.Minify }} + {{ $mermaid_bundle := slice $mermaid_js $mermaid_config_js | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint "sha256" }} + +{{ end }} + +{{/* Markmap */}} +{{ if (.Page.Store.Get "has_markmap") }} + + +{{ $markmap_js := resources.Get "dist/lib/markmap/index.js" }} +{{ $markmap_js = $markmap_js | resources.Minify | resources.Fingerprint "sha256" }} + +{{ end }} + +{{/* Katex */}} +{{ if (.Page.HasShortcode "math") | or .Params.math | or site.Params.hugoblox.content.math.enable }} + {{ $katex_css := resources.Get "dist/lib/katex/katex.min.css" }} + {{ $katex_css = $katex_css | resources.Fingerprint "sha256" }} + + {{ $katex_js := resources.Get "dist/lib/katex/katex.min.js" }} + {{ $katex_js = $katex_js | resources.Fingerprint "sha256" }} + + {{ $katex_render_js := resources.Get "dist/lib/katex/auto-render.min.js" }} + {{ $katex_config_js := resources.Get "js/katex-config.js" }} + {{ $katex_config_js = $katex_config_js | resources.Minify }} + {{ $katex_bundle := slice $katex_render_js $katex_config_js | resources.Concat "js/katex-renderer.js" | resources.Fingerprint "sha256" }} + + {{ $katex_fonts := resources.Match "dist/lib/katex/fonts/*" }} + {{ range $katex_fonts }} + {{ .Publish }} + {{ end }} +{{ end }} + +{{/* Plotly */}} +{{ if .Page.HasShortcode "chart" }} +{{ $plotly_js := resources.Get "dist/lib/plotly/plotly.min.js" }} +{{ $plotly_js = $plotly_js | resources.Fingerprint "sha256" }} + +{{ end }} \ No newline at end of file diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/notification-container.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/notification-container.html new file mode 100644 index 0000000..9d62b00 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/notification-container.html @@ -0,0 +1,4 @@ +{{/* Notification Container for toasts/alerts */}} +{{/* This container is placed at the page level to ensure proper z-index and visibility */}} +{{/* Used by hb-notifier.js module for showing toast notifications */}} +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_author.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_author.html new file mode 100644 index 0000000..b1df3a1 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_author.html @@ -0,0 +1,25 @@ +{{/* Author profile box */}} + +{{/* Don't show author box on normal pages or if author box disabled. */}} +{{ if ne .Type "page" | and (not (or (eq site.Params.profile false) (eq .Params.profile false))) }} + +{{ $authors := .Params.authors }} + +{{/* If authors not set, fallback to superuser/owner from Scratch */}} +{{ if (not $authors) }} + {{ $superuser := .Scratch.Get "superuser_slug" }} + {{ if $superuser }} + {{ $authors = (slice $superuser) }} + {{ end }} +{{ end }} + +{{ if $authors }} + {{ range $idx, $slug := $authors }} + {{ $profile := partial "functions/get_author_profile" $slug }} + {{ if $profile.has_data }} + {{ partial "page_author_card" (dict "profile" $profile "page" .) }} + {{ end }} + {{ end }} +{{ end }} + +{{end}}{{/* Show profile block */}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_author_card.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_author_card.html new file mode 100644 index 0000000..292923d --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_author_card.html @@ -0,0 +1,78 @@ +{{ $profile := .profile }} +{{ $page := .page }} +{{ $site_type := site.Params.hugoblox.identity.type | humanize | default "Person" }} +{{ $avatar_shape := site.Params.hugoblox.layout.avatar_shape | default "circle" }} + +{{ if $profile }} + {{/* If it's a personal site and the profile is owner, link home */}} + {{ $profile_url := printf "/authors/%s/" $profile.slug }} + {{ if and (eq $site_type "Person") ($profile.is_owner) }} + {{ $profile_url = site.BaseURL }} + {{ end }} + + {{ $avatar := $profile.avatar }} + +
    + {{ if $avatar }} + {{ if not (reflect.IsImageResourceProcessable $avatar) }} + {{$profile.title}} + {{ else }} + {{ $responsive := partial "functions/process_responsive_image.html" (dict + "image" $avatar + "mode" "fill" + "aspect_ratio" "1:1" + "anchor" "Center" + "sizes" (slice 96 192 288 384) + ) }} + {{$profile.title}} + {{ end }} + {{ end }} +
    +
    + {{ i18n "authors" }} +
    +
    + + {{if $profile_url}}{{end}} + {{$profile.title}} + {{if $profile_url}}{{end}} + + {{- with $profile.pronouns -}} + ({{ . }}) + {{- end -}} +
    + + {{ with $profile.role }} +
    + {{. | markdownify | emojify}} +
    + {{end}} + + + {{ with $profile.bio }} +
    {{ . | markdownify | emojify }}
    + {{ end }} + +
    + {{ partial "social_links" (dict "Params" (dict "profiles" $profile.links)) }} +
    +
    +
    + +{{end}}{{/* End Check for Author Profile */}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_edit.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_edit.html new file mode 100644 index 0000000..e7710ac --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_edit.html @@ -0,0 +1,18 @@ +{{/* Add link to let visitors edit the page on GitHub. */}} +{{/* Perform short-circuit check that page is backed by a file. */}} +{{ if and .File .Params.editable | and site.Params.hugoblox.repository.url }} +{{/* Get language subfolder for multilingual sites. */}} +{{/* Limitations: the subfolder param, `.contentDir`, is unexposed in the Hugo `site` API so we attempt to workaround this issue. */}} +{{ $content_dir := "content" }} +{{ if site.Params.hugoblox.repository.content_dir }} + {{ $content_dir = site.Params.hugoblox.repository.content_dir }} +{{else}} + {{/* Attempt to get content dir from the LanguagePrefix URI, but defaultContentLanguageInSubdir can break this assumption. */}} + {{ $content_dir = cond hugo.IsMultilingual (cond (ne .Site.LanguagePrefix "") (printf "%s%s" $content_dir .Site.LanguagePrefix) $content_dir) $content_dir }} +{{end}} +

    + + 📝 {{ i18n "edit_page" | default "Edit this page" }} + +

    +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_footer.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_footer.html new file mode 100644 index 0000000..2b8729e --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_footer.html @@ -0,0 +1,11 @@ +
    + {{/* Moved to TOC sidebar */}} + {{/* partial "page_edit" . */}} + + {{ partial "tags" . }} + {{ partial "components/page_sharer" . }} + {{ partial "page_author" . }} + {{ partial "components/next-in-series" . }} + {{ partial "page_related" . }} + {{ partial "comments" . }} +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_links.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_links.html new file mode 100644 index 0000000..c5af40a --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_links.html @@ -0,0 +1,74 @@ +{{ $is_list := .is_list }} +{{ $page := .page }} + +{{/* Build normalized links (new API) */}} +{{ $built := partial "functions/build_links" (dict "page" $page "is_list" $is_list) }} + +{{ $ctx := cond $is_list "list" "page" }} + +{{/* English fallbacks if i18n key is missing in a locale */}} +{{ $fallbackByKey := dict + "btn_pdf" "PDF" + "btn_preprint" "Preprint" + "btn_doi" "DOI" + "btn_code" "Code" + "btn_dataset" "Dataset" + "btn_model" "Model" + "btn_slides" "Slides" + "btn_video" "Video" + "btn_poster" "Poster" + "btn_project" "Project" + "btn_site" "Site" + "btn_source" "Source Document" + "btn_canonical" "Canonical" + "btn_crosspost" "Crosspost" + "btn_discussion" "Discussion" + "btn_event" "Event" + "btn_calendar" "Calendar" + "btn_registration" "Registration" + "btn_demo" "Demo" + "btn_cite" "Cite" +}} + +{{ range $built }} + {{ if in .contexts $ctx }} + {{ $url := .url | default "" }} + {{ $scheme := (urls.Parse $url).Scheme }} + {{ $target := "" }} + {{ $rel := slice }} + {{ with .rel }}{{ $rel = . }}{{ end }} + {{ if not $scheme }} + {{ with ($page.Resources.GetMatch $url) }} + {{ $url = .RelPermalink }} + {{ else }} + {{ $url = $url | relURL }} + {{ end }} + {{ else if in (slice "http" "https") $scheme }} + {{ $target = "target=\"_blank\"" }} + {{ $rel = $rel | append "noopener" }} + {{ end }} + + {{ $classes := printf "hb-attachment-link %s" (cond $is_list "hb-attachment-link-small" "hb-attachment-link-large") }} + {{ $label := .label }} + {{ with .labelKey }} + {{ if not $label }} + {{ $label = (i18n .) | default (index $fallbackByKey .) | default "Link" }} + {{ end }} + {{ end }} + {{ if not $label }} + {{ $label = "Link" }} + {{ end }} + + {{ if eq .type "bibtex" }} + + {{ else }} + + {{ partial "functions/get_icon" (dict "name" (.icon | default "hero/link") "attributes" "style=\"height: 1em\" class='inline-block'") }} + {{ $label }} + + {{ end }} + {{ end }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_links_div.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_links_div.html new file mode 100644 index 0000000..dcb8bb0 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_links_div.html @@ -0,0 +1,8 @@ +{{/* Div wrapper around page links. Hidden if page has no links. */}} + +{{ $built := partial "functions/build_links" (dict "page" . "is_list" 0) }} +{{ if gt (len $built) 0 }} +
    + {{ partial "page_links" (dict "page" . "is_list" 0) }} +
    +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_metadata_authors.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_metadata_authors.html new file mode 100644 index 0000000..8583628 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_metadata_authors.html @@ -0,0 +1,60 @@ +{{/* Display author list. */}} + +{{- $authors := .Params.authors -}} + +{{ if $authors }} + {{- if not (reflect.IsSlice $authors) -}} + {{- $authors = slice $authors -}} + {{- end -}} + + {{ range $index, $raw := $authors }} + {{- $slug := $raw | urlize -}} + {{- $profile := partial "functions/get_author_profile" (dict "slug" $slug "title" $raw) -}} + {{- $termPage := site.GetPage (printf "/authors/%s" $slug) -}} + {{- $display := $profile.title | default $raw -}} + {{- $highlight_name := false -}} + + {{- if gt $index 0 }}, {{ end -}} + + {{- if $termPage -}} + {{ $display }} + {{- else -}} + {{ $display }} + {{- end -}} + + {{- if isset $.Params "author_notes" -}} + {{- with (index $.Params.author_notes $index) -}} + + +
    + {{.}} + +
    +
    + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_related.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_related.html new file mode 100644 index 0000000..4d11917 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/page_related.html @@ -0,0 +1,15 @@ +{{/* Show related/recommended content. */}} +{{ if .Params.show_related }} + {{ $related := site.RegularPages.Related . | first 5 }} + {{ with $related }} +
    +
    +

    {{ i18n "related" }}

    + +
    + {{ end }} +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_footer.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_footer.html new file mode 100644 index 0000000..e7c82ca --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_footer.html @@ -0,0 +1,114 @@ +
    + + {{ partial "functions/get_hook" (dict "hook" "footer-start" "context" .) }} + + {{/* Load footer block */}} + {{- $footer_config := site.Params.hugoblox.footer | default dict -}} + {{- $footer_section_name := partial "hbx/resolve-block-param" (dict "config" $footer_config "context" "footer") | default "minimal" -}} + {{ $footer_section_path := printf "components/footers/%s.html" $footer_section_name }} + {{ if not (templates.Exists (printf "_partials/%s" $footer_section_path)) }} + {{ errorf "Check your `params.yaml`. Cannot find footer block at `layouts/_partials/%s`" $footer_section_path }} + {{ end }} + {{ partial $footer_section_path . }} + + {{/* Attribution - PLEASE DO NOT REMOVE THIS, SUPPORT OPEN SOURCE */}} + + {{/* Check for Pro license key */}} + {{- $license_key := getenv "HUGO_BLOX_LICENSE" -}} + {{- $has_pro_license := false -}} + + {{- if $license_key -}} + {{/* Validate UUID v4 format */}} + {{- $uuid_pattern := "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" -}} + {{- $is_valid_format := findRE $uuid_pattern (lower $license_key) -}} + {{- $has_pro_license = gt (len $is_valid_format) 0 -}} + {{- end -}} + + {{/* Check user preference */}} + {{- $wants_to_hide := site.Params.hugoblox.pro.hide_attribution | default false -}} + + {{/* Determine if we show attribution */}} + {{- $show_attribution := true -}} + + {{- if $has_pro_license -}} + {{/* Pro user - respect their choice */}} + {{- $show_attribution = not $wants_to_hide -}} + {{- else if $wants_to_hide -}} + {{/* Free user trying to hide - show warning and attribution */}} + {{- warnf "Attribution removal requires HugoBlox Premium. Get Premium at https://hugoblox.com/premium \nAlready purchased Premium? Reach out in the Premium Discord channel for support." -}} + {{- $show_attribution = true -}} + {{- end -}} + + {{- if $show_attribution -}} + {{- $base := "https://hugoblox.com" -}} + {{- $tid := "" -}} + {{- $ref := .Site.Params.hugoblox.pro.affiliate_code | default "" -}} + + {{/* Detect Template */}} + {{ $hugoblox_file := "" }} + {{ if fileExists "hugoblox.yaml" }} + {{ $hugoblox_file = readFile "hugoblox.yaml" }} + {{ if $hugoblox_file }} + {{ $hugoblox_data := $hugoblox_file | transform.Unmarshal }} + {{ $tid = $hugoblox_data.template.id | default "" }} + {{ end }} + {{ end }} + + {{/* Per-site variant selection */}} + {{- $brandOptions := slice "Hugo Blox" "Hugo Blox Kit" "Hugo Blox — Open Source" -}} + {{- $ctaWhenTemplate := slice "Duplicate this template →" "Clone this template →" "Build yours →" "Create yours →" "Build your site →" "Create your site →" -}} + {{- $ctaNoTemplate := slice "Start free →" "Build yours →" "Create yours →" "Build your site →" "Create your site →" -}} + + {{- $seed := .Site.BaseURL -}} + {{- $h := md5 $seed -}} + {{- $digits := replaceRE "[^0-9]" "" $h -}} + {{- if lt (len $digits) 6 }}{{- $digits = printf "%s123456" $digits -}}{{- end -}} + {{- $first6 := substr $digits 0 6 -}} + {{/* Fix for Hugo's int() function treating leading zeros as octal numbers. + Strings like "095186" fail because 8 and 9 aren't valid octal digits. + Replace leading zero with 1 to ensure valid decimal parsing. */}} + {{- if eq (substr $first6 0 1) "0" -}} + {{- $first6 = printf "1%s" (substr $first6 1 5) -}} + {{- end -}} + {{- $n := int $first6 -}} + + {{- $brandText := index $brandOptions (mod $n (len $brandOptions)) -}} + {{- $ctaText := cond (ne $tid "") + (index $ctaWhenTemplate (mod $n (len $ctaWhenTemplate))) + (index $ctaNoTemplate (mod $n (len $ctaNoTemplate))) -}} + + {{- $target := cond (ne $tid "") + (printf "%s/templates/%s/start" $base $tid) + (printf "%s/start" $base) -}} + + {{- $brandHref := printf "%s?utm_source=site_footer&utm_medium=referral&utm_campaign=poweredby_oss&utm_content=brand_%s" + $base (cond (ne $tid "") (printf "%s" $tid) "na") -}} + {{- $ctaHref := printf "%s?utm_source=site_footer&utm_medium=referral&utm_campaign=poweredby_oss&utm_content=cta_%s" + $target (cond (ne $tid "") (printf "%s" $tid) "na") -}} + {{- if ne $ref "" -}} + {{- $brandHref = printf "%s&ref=%s" $brandHref $ref -}} + {{- $ctaHref = printf "%s&ref=%s" $ctaHref $ref -}} + {{- end -}} + +

    + {{ $published_with := "Made with {hugoblox}." }} + {{ $i18n_published_with := i18n "published_with" | default $published_with }} + {{ $defaultEnText := "Build yours →" }} + {{ $i18n_ctaText := i18n "poweredby_button" | default $ctaText }} + {{ if eq $i18n_ctaText $defaultEnText }} + {{ $i18n_ctaText = $ctaText }} + {{ end }} + {{ if not (findRE "{hugoblox}" $i18n_published_with) }} + {{ warnf "Please attribute Hugo Blox using `{hugoblox}` in the i18n `published_with` text or sponsor with All Access to remove attribution." }} + {{ $i18n_published_with = $published_with }} + {{ end }} + {{ $i18n_published_with = replace $i18n_published_with "{hugoblox}" (printf "%s" $brandHref $brandText) | safeHTML }} + {{ $i18n_published_with = replace $i18n_published_with "{repo_link}" "" | safeHTML }} + {{ $i18n_published_with = replace $i18n_published_with "{/repo_link}" "" | safeHTML }} + {{ $i18n_published_with | safeHTML }} + {{ $i18n_ctaText }} +

    + {{- end -}}{{/* end $show_attribution */}} + +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_footer_license.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_footer_license.html new file mode 100644 index 0000000..305cd14 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_footer_license.html @@ -0,0 +1,75 @@ +{{/* Display copyright license. */}} + +{{ $branding := partialCached "functions/get_branding" . "branding" }} +{{ $page_copyright := .Params.copyright | default dict }} +{{ $site_copyright := site.Params.hugoblox.copyright | default dict }} + +{{ $copyright_license := $page_copyright.license | default $site_copyright.license | default dict }} +{{ $notice := $page_copyright.notice | default $site_copyright.notice }} + +{{ $license_type := $copyright_license.type | default "cc" }} + +{{ $license_label := "" }} +{{ $license_url := "" }} +{{ $show_cc_icons := false }} + +{{ $allow_commercial := $copyright_license.allow_commercial | default false }} +{{ $allow_derivatives := $copyright_license.allow_derivatives | default false }} +{{ $share_alike := $copyright_license.share_alike | default true }} + +{{ if eq $license_type "cc" }} + + {{ $cc_code := "by" }} + {{ if not $allow_commercial }} + {{ $cc_code = printf "%s-nc" $cc_code }} + {{end}} + {{ if and $allow_derivatives $share_alike }} + {{ $cc_code = printf "%s-sa" $cc_code }} + {{ else if not $allow_derivatives }} + {{ $cc_code = printf "%s-nd" $cc_code }} + {{end}} + + {{ $license_url = printf "https://creativecommons.org/licenses/%s/4.0" ($cc_code | urlize) }} + {{ $license_label = printf "CC %s 4.0" $license_url (replace $cc_code "-" " " | upper) }} + {{ $show_cc_icons = true }} + +{{ else if eq $license_type "custom" }} + + {{ $custom_label := $copyright_license.label | default $copyright_license.text | default "" }} + {{ $custom_url := $copyright_license.url | default "" }} + {{ if and $custom_label $custom_url }} + {{ $license_label = printf "%s" $custom_url $custom_label }} + {{ else }} + {{ $license_label = $custom_label }} + {{ end }} + +{{ end }} + +{{ if and $show_cc_icons $license_url }} + + + +{{ end }} + +{{ with $notice }} +

    + {{ $processed := replace . "{year}" now.Year }} + {{ $processed = replace $processed "{name}" $branding.organization }} + {{ $processed = replace $processed "{license}" $license_label }} + {{ $processed | markdownify }} +

    +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_head.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_head.html new file mode 100644 index 0000000..4c8cf29 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/site_head.html @@ -0,0 +1,263 @@ +{{ $scr := .Scratch }} + + + + + + + {{/* EXTENSIBILITY HOOK: HEAD-START */}} + {{ partial "functions/get_hook" (dict "hook" "head-start" "context" .) }} + + {{ if .Params.private }} + + {{- end -}} + +{{/* Attempt to load superuser/person from data. */}} +{{ $superuser_name := "" }} +{{ $superuser_slug := "" }} +{{ $superuser_role := "" }} + +{{/* Prefer is_owner flag, fallback to slug 'me' */}} +{{ $authors := partialCached "functions/get_authors_data" . site.Language.Lang }} +{{ range $slug, $data := $authors }} + {{ if and (not $superuser_slug) ($data.is_owner) }} + {{ $superuser_slug = $slug }} + {{ end }} +{{ end }} +{{ if and (eq $superuser_slug "") (index $authors "me") }} + {{ $superuser_slug = "me" }} +{{ end }} + +{{ if $superuser_slug }} + {{ $profile := partial "functions/get_author_profile" (dict "slug" $superuser_slug) }} + {{ $superuser_name = $profile.title }} + {{ $superuser_role = $profile.role }} +{{ end }} + +{{ $scr.Set "superuser_slug" $superuser_slug }}{{/* Set superuser globally for author rendering. */}} + +{{ with $superuser_name }}{{ end }} + + {{/* Generate page description. */}} + {{ $desc := "" }} + {{ $desc = partial "functions/get_summary" . }} + {{ if site.Params.hugoblox.identity.description | and (not $desc) }} + {{ $desc = site.Params.hugoblox.identity.description }} + {{ end }} + {{ if not $desc }} + {{ $desc = $superuser_role }} + {{ end }} + + + {{ range .Translations }} + + {{ end }} + + + {{/* Hugo Blox Theme Engine Initialization */}} + {{/* Uses get_theme_config helper for backward-compatible config resolution */}} + {{ $theme_config := partialCached "functions/get_theme_config" . "theme_config" }} + {{ partial "functions/theme_generator.html" $theme_config }} + + {{/* Demo Theme Pack Styles (if enabled) */}} + {{ if site.Params.hugoblox.header.theme_picker }} + {{ partial "functions/demo_theme_styles.html" (dict "typography" $theme_config.typography "layout" $theme_config.layout) }} + {{ end }} + + {{/* Tailwind CSS v4 Processing */}} + {{/* Use templates.Defer to process CSS after all content is analyzed */}} + {{ with (templates.Defer (dict "key" "tailwind-css")) }} + {{ partial "css.html" . }} + {{ end }} + + {{ if fileExists "assets/css/custom.css" }} + {{ $styles := resources.Get "css/custom.css" | minify | fingerprint "sha256" }} + + {{ end }} + + {{/* Externalized init scripts for CSP-friendly head */}} + {{- $hb_head := resources.Get "js/hb-head.js" | js.Build | resources.Minify -}} + {{- if hugo.IsProduction -}} + {{- $hb_head = $hb_head | fingerprint "sha256" -}} + {{- end -}} + + + {{/* Analytics & Verification */}} + {{/* !CACHED! All analytics and verification code is at site level */}} + {{ partialCached "blox-analytics/index" . }} + + {{/* RSS Feed */}} + {{ $branding := partialCached "functions/get_branding" . "branding" }} + {{ with .OutputFormats.Get "RSS" }} + + {{ end }} + + {{/* Progressive Web App (PWA) Icon - SVG preferred */}} + {{ $icon := partial "functions/get_site_icon" 32 }} + {{ with $icon.resource }} + + {{ end }} + {{/* Apple Touch Icon - requires PNG */}} + {{ $icon_apple := partial "functions/get_site_icon" 180 }} + {{ if not $icon_apple.is_svg }} + {{ with $icon_apple.resource }} + + {{ end }} + {{ else }} + {{/* SVG icon - need PNG fallback for Apple */}} + {{ $icon_png := resources.Get "media/icon.png" }} + {{ with $icon_png }} + {{ $apple_icon := .Fill "180x180 Center" }} + + {{ end }} + {{ end }} + + + + {{/* Get page image for sharing. */}} + {{ $sharing_image := resources.GetMatch (path.Join "media" "sharing.*") }} + {{ $featured_image := (.Resources.ByType "image").GetMatch "*featured*" }} +{{ $avatar_image := (.Resources.ByType "image").GetMatch "avatar*" }} + {{ $has_logo := fileExists "assets/media/logo.png" | or (fileExists "assets/media/logo.svg") }} + {{ $og_image := "" }} + {{ $twitter_card := "summary_large_image" }} +{{ if and (eq .Kind "term") (eq .Data.Singular "author") }} + {{/* Try data-driven avatar for author term pages */}} + {{ $termSlug := .Data.Term | urlize }} + {{ $profile := partial "functions/get_author_profile" (dict "slug" $termSlug) }} + {{ with $profile.avatar }} + {{ $og_image = (.Fill "540x540 Center").Permalink }} + {{ $twitter_card = "summary" }} + {{ end }} +{{ else if (and (eq .Kind "term") $avatar_image) }} + {{ $og_image = ($avatar_image.Fill "540x540 Center").Permalink }} + {{ $twitter_card = "summary" }} +{{ else if $featured_image }} + {{ $og_image = $featured_image.Permalink }} + {{ else if $sharing_image }} + {{ $og_image = $sharing_image.Permalink }} + {{ else if $has_logo }} + {{/* !CACHED! Can safely cache this site logo variant */}} + {{ $logo_data := partialCached "functions/get_logo" (dict "constraint" "fit" "size" 300) "logo_og" }} + {{ with $logo_data.resource }} + {{ $og_image = .Permalink }} + {{ end }} + {{ $twitter_card = "summary" }} + {{ else }} + {{ $icon_og := partial "functions/get_site_icon" 512 }} + {{ with $icon_og.resource }} + {{ $og_image = .Permalink }} + {{ end }} + {{ $twitter_card = "summary" }} + {{ end }} + {{ $scr.Set "og_image" $og_image }}{{/* Set `og_image` globally for `rss.xml`. */}} + + {{ $title := "" }} + {{ with .Params.seo.title }} + {{ $title = replace . "{brand}" $branding.site_title }} + {{ else }} + {{ $title = .Title | default $branding.site_title }} + {{ if ne $title $branding.site_title }}{{ $title = printf "%s | %s" $title $branding.site_title }}{{ end }} + {{ end }} + + {{ with site.Params.hugoblox.identity.social.twitter }} + + + {{ end }} + + + + + {{- with $og_image -}} + + + {{- end -}} + + {{ if .IsPage }} + {{ if not .PublishDate.IsZero }} + + {{ else if not .Date.IsZero }} + + {{ end }} + {{ if not .Lastmod.IsZero }}{{ end }} + {{ else }} + {{ if not .Date.IsZero }} + + {{ end }} + {{ end }} + + {{ partial "jsonld/main" (dict "page" . "summary" $desc) }} + + {{$title}} + + {{/* Typography: font loading, font families, and sizes */}} + {{ partial "functions/typography.html" $theme_config }} + {{/* Layout tokens: radius and spacing */}} + {{ partial "functions/layout_tokens.html" $theme_config }} + + {{ if .Params.design.background.image.filename }} + {{/* See Hugo note on linking assets in styles: https://github.com/gohugoio/hugoThemes#common-permalink-issues */}} + {{ $bg_img := resources.Get (printf "media/%s" .Params.design.background.image.filename) }} + {{ if $bg_img }} + {{ if reflect.IsImageResourceProcessable $bg_img }} + {{ $bg_img = $bg_img.Fit "1920x1920 webp" }} + {{ end }} + + {{ else }} + {{ errorf "Couldn't find page background `%s` in the `assets/media/` folder - please add it." .Params.design.background.image.filename }} + {{ end }} + {{ end }} + + {{/* Init prior to auto-chunking/bundling scripts due to Hugo concurrency issues */}} + {{/* !CACHED! Initialized once at site level and then cached for each page */}} + {{- partialCached "init.html" . "hb_init_once" -}} + + {{ $js_license := printf "/*! Hugo Blox Kit Tailwind UI v%s | https://hugoblox.com/ */\n" hugo.Data.hugoblox.version }} + {{ $js_license := $js_license | printf "%s/*! Copyright 2016-present George Cushen (https://georgecushen.com/) */\n" }} + {{ $js_license := $js_license | printf "%s/*! License: https://github.com/HugoBlox/kit/blob/main/LICENSE.md */\n" }} + {{ $js_bundle_head := $js_license | resources.FromString "js/bundle-head.js" }} + {{ $i18n := dict "copy" (i18n "btn_copy") "copied" (i18n "btn_copied" | default "Copied") }} + {{ $js_params := dict "hugoEnvironment" hugo.Environment "i18n" $i18n }} + {{ $js_hugoblox := resources.Get "js/hb-code-copy.js" | js.Build (dict "targetPath" (printf "js/hugoblox-core-%s.js" .Lang ) "params" $js_params) }} + {{ $js_hugoblox := $js_hugoblox | resources.Minify }} + {{- $js_theme := resources.Get "js/hb-theme.js" | resources.Minify -}} + {{- $js_lang := resources.Get "js/hb-i18n.js" | resources.Minify -}} + {{- $js_nav := resources.Get "js/hb-nav.js" | resources.Minify -}} + {{- $js_sidebar := resources.Get "js/hb-sidebar.js" | resources.Minify -}} + {{- $js_notifier := resources.Get "js/hb-notifier.js" | js.Build (dict "targetPath" (printf "js/hb-notifier-%s.js" .Lang ) "params" $js_params) | resources.Minify -}} + {{- $js_clipboard := resources.Get "js/hb-clipboard.js" | js.Build (dict "targetPath" (printf "js/hb-clipboard-%s.js" .Lang ) "params" $js_params) | resources.Minify -}} + {{- $js_citation := resources.Get "js/hb-citation.js" | js.Build (dict "targetPath" (printf "js/hb-citation-%s.js" .Lang ) "params" $js_params) | resources.Minify -}} + + {{/* Start with the core scripts */}} + {{ $js_bundle_contents := slice $js_bundle_head $js_hugoblox $js_theme $js_lang $js_nav $js_sidebar $js_notifier $js_clipboard $js_citation }} + + {{/* Discover and include block-specific JavaScript */}} + {{- with partial "functions/get-block-scripts.html" . -}} + {{ $js_bundle_contents = $js_bundle_contents | append . }} + {{- end -}} + + {{ $js_bundle := $js_bundle_contents | resources.Concat (printf "js/hugo-blox-%s.min.js" .Lang) }} + {{- if hugo.IsProduction -}} + {{ $js_bundle = $js_bundle | fingerprint "sha256" }} + {{- end -}} + + + {{/* Load Third-Party Libraries */}} + {{ partial "libraries.html" . }} + + {{/* EXTENSIBILITY HOOK: HEAD-END */}} + {{ partial "functions/get_hook" (dict "hook" "head-end" "context" .) }} + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/social_links.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/social_links.html new file mode 100644 index 0000000..4996630 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/social_links.html @@ -0,0 +1,21 @@ +{{ if .Params.profiles }} +
    + {{ range $links := .Params.profiles }} + {{ $link := .url }} + {{ $scheme := (urls.Parse $link).Scheme }} + {{ $target := "" }} + {{ if not $scheme }} + {{ $link = .url | relLangURL }} + {{ else if in (slice "http" "https") $scheme }} + {{ $target = "target=\"_blank\" rel=\"noopener\" rel=\"me noopener noreferrer\"" }} + {{ end }} + {{ partial "functions/get_icon" (dict "name" .icon "attributes" "style=\"height: 1em;\"") }} + {{ end }} +
    +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/tags.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/tags.html new file mode 100644 index 0000000..e2dd27a --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/tags.html @@ -0,0 +1,7 @@ +{{ if .Params.tags }} +
    + {{ range $index, $value := (.GetTerms "tags") }} + {{ .LinkTitle }} + {{ end }} +
    +{{ end }} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/tailwind_sources.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/tailwind_sources.html new file mode 100644 index 0000000..a5b90c8 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/tailwind_sources.html @@ -0,0 +1,91 @@ +{{/* Hugo Blox: Dynamic Tailwind @source generation for Hugo modules */}} +{{/* Documentation: https://hugoblox.com/docs/ */}} +{{/* License: https://github.com/HugoBlox/kit/blob/main/LICENSE.md */}} + +{{/* +This partial generates Tailwind CSS @source directives that tell Tailwind where to scan for CSS classes. + +It provides a robust bridge between Hugo's virtual filesystem (which includes module mounts) +and Tailwind's real filesystem scanner. +*/}} +{{ $paths := slice }} + +{{/* 1. Always scan the site's source files. */}} +{{ $paths = $paths | append `content/**/*.md` }} +{{ $paths = $paths | append `layouts/**/*.html` }} +{{ $paths = $paths | append `assets/js/**/*.js` }} +{{ $paths = $paths | append `assets/js/**/*.jsx` }} +{{ $paths = $paths | append `assets/js/**/*.tsx` }} +{{ $paths = $paths | append `hugo_stats.json` }} + +{{/* +2. Crucially, scan Hugo's generated JS output from Preact components. + These files are built by Hugo's `js.Build` into a predictable location within the + project's `assets` directory, making them a reliable source for Tailwind to scan. + This step happens before Tailwind runs, thanks to `templates.Defer` in `site_head.html`. +*/}} +{{ $paths = $paths | append `assets/js/preact-built/**/*.js` }} + +{{/* +3. Comprehensive class extraction from Preact JSX/TSX source files. + + Hugo's virtual filesystem mounts block JSX/TSX into assets/js/hbx/blocks/. + Tailwind's @source file paths only work on the real filesystem, but these + files exist only in Hugo's virtual FS (or in a module cache for remote modules). + So we read the file content via resources.Match and extract class candidates inline. + + Strategy: Extract ALL string literal content — not just class= attributes. + This catches classes in any pattern: + - Static attrs: class="gap-8 items-center" + - JSX expressions: class={"gap-8 items-center"} + - Template literals: class={`gap-8 ${cond ? "md:grid" : ""}`} + - Utility fns: cn("gap-8", condition && "md:grid-cols-2") + + Tailwind's scanner automatically ignores non-class tokens (import paths, + error messages, etc.), so false positives are harmless. +*/}} +{{ $all_jsx := resources.Match "js/hbx/**/*.jsx" }} +{{ $all_tsx := resources.Match "js/hbx/**/*.tsx" }} + +{{ $extracted_classes := slice }} +{{ range $f := $all_jsx | append $all_tsx }} + {{ $code := $f.Content }} + + {{/* A) Extract content of all double-quoted strings */}} + {{ $dq_matches := findRE `"[^"]*"` $code }} + {{ range $m := $dq_matches }} + {{ $str := strings.TrimPrefix `"` (strings.TrimSuffix `"` $m) }} + {{ range split $str " " }} + {{ $t := strings.TrimSpace . }} + {{/* Filter out tokens with unsafe characters (braces, quotes, parens) */}} + {{ if and $t (not (findRE `[\{\}\(\)"';]` $t)) }} + {{ $extracted_classes = $extracted_classes | append $t }} + {{ end }} + {{ end }} + {{ end }} + + {{/* B) Extract static parts of template literals (backtick strings) */}} + {{/* Removes ${...} interpolations, keeping surrounding text */}} + {{ $bt_matches := findRE "`[^`]*`" $code }} + {{ range $m := $bt_matches }} + {{ $str := strings.TrimPrefix "`" (strings.TrimSuffix "`" $m) }} + {{ $static := replaceRE `\$\{[^}]*\}` " " $str }} + {{ range split $static " " }} + {{ $t := strings.TrimSpace . }} + {{/* Filter out tokens with unsafe characters (braces, quotes, parens) */}} + {{ if and $t (not (findRE `[\{\}\(\)"';]` $t)) }} + {{ $extracted_classes = $extracted_classes | append $t }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{ $extracted_classes = $extracted_classes | uniq }} +{{ range $class := $extracted_classes }} +@source inline("{{ $class }}"); +{{ end }} + +{{/* Generate the @source rules */}} +{{ range $paths }} +@source "{{ . }}"; +{{ end }} \ No newline at end of file diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid--end.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid--end.html new file mode 100644 index 0000000..b0f2d2f --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid--end.html @@ -0,0 +1,2 @@ + + diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid--start.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid--start.html new file mode 100644 index 0000000..f9400ad --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid--start.html @@ -0,0 +1,5 @@ +{{ $columns := .config.columns | default 2 }} +{{ $len := .config.len | default 2 }} +{{/* NOTE: dynamic `md:grid-cols-{{$columns}}` class requires Tailwind exception */}} +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid.html new file mode 100644 index 0000000..a88b9d1 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/article-grid.html @@ -0,0 +1 @@ +{{- partial "views/card.html" . -}} diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card--end.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card--end.html new file mode 100644 index 0000000..04f5b84 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card--end.html @@ -0,0 +1 @@ +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card--start.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card--start.html new file mode 100644 index 0000000..f24d47c --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card--start.html @@ -0,0 +1 @@ +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card.html new file mode 100644 index 0000000..46e8ac1 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/card.html @@ -0,0 +1,224 @@ +{{ $item := .item }} + +{{ $link := $item.RelPermalink }} +{{ $target := "" }} +{{ if $item.Params.external_link }} + {{ $link = $item.Params.external_link }} + {{ $target = "target=\"_blank\" rel=\"noopener\"" }} +{{ end }} + +{{ $resource := partial "functions/get_featured_image.html" $item }} +{{ $anchor := "Center" }} +{{ if and $item.Params.image (reflect.IsMap $item.Params.image) }} + {{ $anchor = $item.Params.image.focal_point | default "Center" }} +{{ end }} +{{ $fill_image := .config.fill_image | default true }} +{{ $showDate := .config.show_date | default true }} +{{ $showReadTime := .config.show_read_time | default true }} +{{ $showReadMore := .config.show_read_more | default true }} +{{ $hasMeta := or $showDate $showReadTime $showReadMore }} +{{ $index := .index }} +{{ $isEvent := eq $item.Type "events" }} +{{ $event_dates := "" }} +{{ if $isEvent }} +{{ $event_dates = partial "functions/get_event_dates" $item }} +{{ end }} + +
    + +
    + {{ with $item.Params.content_meta }} + {{ if .trending }} +
    + {{ i18n "trending" | default "Trending" }} + +
    + {{ end }} + {{ end }} + {{ with $resource }} + {{/* + Image processing gate: + - reflect.IsImageResourceProcessable → false for SVG (not processable by Hugo). + - GIF: processable by Hugo but we skip to preserve animation frames. + */}} + {{ $canProcess := and (reflect.IsImageResourceProcessable .) (ne .MediaType.SubType "gif") }} + {{ if not $canProcess }} + + {{ $item.Title | plainify }} featured image + + {{ else }} + {{ $original_image := "" }} + {{ if $fill_image }} + {{ $original_image = .Fill (printf "800x450 %s" $anchor) }} + {{ else }} + {{ $original_image = .Fit (printf "800x450 %s" $anchor) }} + {{ end }} + {{ $responsive := partial "functions/process_responsive_image.html" (dict + "image" $original_image + "mode" "responsive" + "sizes" (slice 400 600 800) + "formats" (slice "avif" "webp" "jpg") + ) }} + + {{ $item.Title | plainify }} featured image + + {{ end }} + {{ else }} + + +
    +
    + + + +
    +
    +
    + {{end}} + + +
    +
    + + +
    + {{ with $item.Params.content_meta }} + {{ if or .content_type .difficulty }} +
    + {{ with .content_type }} + + {{ . }} + + {{ end }} + {{ with .difficulty }} + {{ i18n "difficulty" }}: {{ . }} + {{ end }} +
    + {{ end }} + {{ end }} + + {{ if and $item.Params.tags (gt (len $item.Params.tags) 0) }} +
    + {{ with index ($item.GetTerms "tags") 0 }} + + + {{ .Page.LinkTitle }} + + + {{ end }} +
    + {{ end }} + +

    + + {{ $item.Title }} + {{ if $item.Params.external_link }} + {{ partial "functions/get_icon" (dict "name" "arrow-top-right-on-square" "attributes" "style=\"height: 1em;\" class=\"inline-flex h-4 w-4 ml-1 align-text-top\"") }} + {{ end }} + +

    + +

    + {{ (partial "functions/get_summary" $item) | plainify | htmlUnescape | truncate 180 }} +

    + + {{ with $item.Params.content_meta.prerequisites }} + {{ $max := 2 }} + {{ $count := len . }} +
    + {{ i18n "prerequisites" }}: + {{ range (first $max .) }} + {{ . }} + {{ end }} + {{ if gt $count $max }} + +{{ sub $count $max }} + {{ end }} +
    + {{ end }} + + + {{ if $hasMeta }} +
    +
    + {{ if $item.Params.authors }} +
    + {{ $slug := index $item.Params.authors 0 | urlize }} + {{ $profile := partial "functions/get_author_profile" $slug }} + {{ $avatar := $profile.avatar }} +
    + {{ if $avatar }} + {{ $avatar_48 := $avatar.Process "Fill 48x48 Center webp" }} + avatar + {{ else }} +
    + {{ partial "functions/get_icon" (dict "name" "hero/user" "attributes" "class=\"w-4 h-4 text-gray-500 dark:text-gray-400\"") }} +
    + {{ end }} +
    + {{ $profile.title }} +
    + + {{ end }} + {{ if $showDate }} + {{ if $isEvent }} + + {{ else }} + + {{ end }} + {{ end }} + {{ if and $showDate $showReadTime }} + + {{ end }} + {{ if $showReadTime }} + {{ $content := $item.Content | plainify }} + {{ $words := len (split $content " ") }} + {{ $readTime := div $words 200 }} + {{ if lt $readTime 1 }}{{ $readTime = 1 }}{{ end }} + + {{ end }} +
    + + + {{ if $showReadMore }} + + {{ end }} +
    + {{ end }} + + + {{ if $item.Params.ai_insights }} +
    + + + + {{ i18n "ai_insight" }}: + {{ $item.Params.ai_insights }} +
    + {{ end }} +
    +
    \ No newline at end of file diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation--end.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation--end.html new file mode 100644 index 0000000..bdd6bc9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation--end.html @@ -0,0 +1,2 @@ +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation--start.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation--start.html new file mode 100644 index 0000000..7f5f712 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation--start.html @@ -0,0 +1,3 @@ +{{/* Left alignment / width is set so that multiple blocks with this view & variable length content all left align. */}} +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation.html new file mode 100644 index 0000000..c0c5eae --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/citation.html @@ -0,0 +1,50 @@ +{{ $item := .item }} +{{ $year_value := $item.Params.event_start | default $item.Date }} +{{ $year := (time $year_value).Format "2006" }} +{{ $has_attachments := partial "functions/has_attachments" $item }} + +
    + + + {{/* APA Style */}} + {{ if eq (site.Params.hugoblox.content.citations.style | default "apa") "apa" }} + + + ({{- $year -}}). + {{ $item.Title }}. + {{ if $item.Params.publication_short }} + {{- $item.Params.publication_short | markdownify -}}. + {{ else if $item.Params.publication }} + {{- $item.Params.publication | markdownify -}}. + {{ end }} + + {{ if $has_attachments }} +
    + {{ partial "page_links" (dict "page" $item "is_list" 1) }} +
    + {{ end }} + + {{/* MLA Style */}} + {{ else }} + + + {{ $item.Title }}. + {{ if $item.Params.publication_short }} + {{- $item.Params.publication_short | markdownify -}}, + {{ else if $item.Params.publication }} + {{- $item.Params.publication | markdownify -}}, + {{ end }} + {{- $year -}}. + + {{ if $has_attachments }} +
    + {{ partial "page_links" (dict "page" $item "is_list" 1) }} +
    + {{ end }} + + {{ end }} +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary--end.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary--end.html new file mode 100644 index 0000000..bdd6bc9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary--end.html @@ -0,0 +1,2 @@ +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary--start.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary--start.html new file mode 100644 index 0000000..e5c96e9 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary--start.html @@ -0,0 +1,2 @@ +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary.html new file mode 100644 index 0000000..8023868 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/date-title-summary.html @@ -0,0 +1,31 @@ +{{ $item := .item }} +{{ $page := .page }} +{{ $summary := partial "functions/get_summary" $item }} +{{ $summary = $summary | page.RenderString }} +{{ $displayDate := .item.Params.event_start | default .item.Date }} +
    +
    +

    +
    + {{$item.Title}} +

    + +

    {{$summary}}

    + +
    + +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery--end.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery--end.html new file mode 100644 index 0000000..b0f2d2f --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery--end.html @@ -0,0 +1,2 @@ +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery--start.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery--start.html new file mode 100644 index 0000000..da674c8 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery--start.html @@ -0,0 +1,5 @@ +{{ $columns := .config.columns | default 2 }} +{{ $len := .config.len | default 1 }} +{{/* Grid layout optimized for slide deck previews - 16:9 aspect ratio cards */}} +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery.html new file mode 100644 index 0000000..f84f340 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_partials/views/slides-gallery.html @@ -0,0 +1,198 @@ +{{/* Hugo Blox Slides Gallery View - Optimized for slide deck presentations */}} +{{/* Features: 16:9 aspect ratio, play button overlay, slide count, tags, featured badge */}} + +{{ $item := .item }} +{{ $link := $item.RelPermalink }} +{{ $html_format := $item.OutputFormats.Get "HTML" }} +{{ if not $html_format }} + {{ $html_format = $item.OutputFormats.Get "html" }} +{{ end }} +{{ with $html_format }} + {{ $link = .RelPermalink }} +{{ end }} +{{ $present_link := $link }} +{{ $present_format := $item.OutputFormats.Get "present" }} +{{ if not $present_format }} + {{ $present_format = $item.OutputFormats.Get "Present" }} +{{ end }} +{{ with $present_format }} + {{ $present_link = .RelPermalink }} +{{ end }} +{{ $resource := partial "functions/get_featured_image.html" $item }} +{{ $index := .index }} +{{ $featured_label := i18n "featured" | default "Featured" }} +{{ $details_label := i18n "details" | default "Details" }} +{{ $present_label := i18n "present_slides" | default "Present" }} +{{ $present_fullscreen_label := i18n "present_fullscreen" | default "Present (fullscreen)" }} +{{ $slides_label := i18n "slides" | default "Slides" }} + +{{/* Check if featured/pinned */}} +{{ $isFeatured := or $item.Params.featured $item.Params.pinned }} + +{{/* Calculate slide count by counting "---" separators in content */}} +{{ $content := $item.RawContent }} +{{ $slideCount := 1 }} +{{ $separators := findRE "(?m)^---$" $content }} +{{ if $separators }} + {{ $slideCount = add (len $separators) 1 }} + {{/* Subtract 1 for front matter separator if content starts with --- */}} + {{ if hasPrefix $content "---" }} + {{ $slideCount = sub $slideCount 1 }} + {{ end }} +{{ end }} + +{{/* Get summary - use description from front matter or truncate content */}} +{{ $summary := $item.Description | default $item.Summary | default "" }} +{{ $summary = $summary | plainify | truncate 160 }} + +
    + {{/* Featured Badge */}} + {{ if $isFeatured }} +
    + + + + {{ $featured_label }} +
    + {{ end }} + + {{/* Slide Preview Image - 16:9 aspect ratio */}} + + {{ with $resource }} + {{/* reflect.IsImageResourceProcessable → false for SVG; GIF skipped to preserve animation */}} + {{ $canProcess := and (reflect.IsImageResourceProcessable .) (ne .MediaType.SubType "gif") }} + {{ if not $canProcess }} + {{ $item.Title | plainify }} + {{ else }} + {{ $image := .Fill "800x450 Center" }} + {{ $responsive := partial "functions/process_responsive_image.html" (dict + "image" $image + "mode" "responsive" + "sizes" (slice 400 600 800) + "formats" (slice "avif" "webp" "jpg") + ) }} + {{ $item.Title | plainify }} + {{ end }} + {{ else }} + {{/* Fallback: Decorative gradient with slide icon - smaller, cleaner */}} +
    +
    + + + +
    +
    + {{ end }} + + {{/* Play button overlay on hover */}} +
    +
    + + + +
    +
    + + {{/* Slide count badge */}} + {{ if gt $slideCount 1 }} +
    + {{ $slideCount }} {{ $slides_label | lower }} +
    + {{ end }} +
    + + {{/* Content Section */}} +
    + {{/* Tags */}} + {{ if $item.Params.tags }} +
    + {{ range first 3 $item.Params.tags }} + + {{ . }} + + {{ end }} + {{ if gt (len $item.Params.tags) 3 }} + +{{ sub (len $item.Params.tags) 3 }} + {{ end }} +
    + {{ end }} + + {{ $authors := slice }} + {{ with $item.Params.authors }} + {{ if reflect.IsSlice . }} + {{ $authors = . }} + {{ else }} + {{ $authors = slice . }} + {{ end }} + {{ end }} + {{ if gt (len $authors) 0 }} + {{ $author := index $authors 0 }} + {{ $profile := partial "functions/get_author_profile" $author }} + {{ $avatar := $profile.avatar }} + {{ $authorName := $author }} + {{ if $profile.has_data }} + {{ $authorName = $profile.title }} + {{ end }} +
    +
    + {{ if $avatar }} + {{ $avatar_48 := $avatar.Process "Fill 48x48 Center webp" }} + {{ $authorName }} + {{ else }} +
    + {{ partial "functions/get_icon" (dict "name" "hero/user" "attributes" "class=\"w-4 h-4 text-zinc-500 dark:text-zinc-400\"") }} +
    + {{ end }} +
    + {{ $authorName }} +
    + {{ end }} + + {{/* Title */}} +

    + {{ $item.Title }} +

    + + {{/* Summary */}} +

    {{ if $summary }}{{ $summary }}{{ else }} {{ end }}

    + + {{/* Footer: Venue, Year, Details + Present Links */}} +
    +
    + {{ with $item.Params.venue }} + {{ . }} + · + {{ end }} + +
    + +
    +
    +
    diff --git a/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_shortcodes/audio.html b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_shortcodes/audio.html new file mode 100644 index 0000000..35db550 --- /dev/null +++ b/_vendor/github.com/HugoBlox/kit/modules/blox/layouts/_shortcodes/audio.html @@ -0,0 +1,41 @@ +{{/* Audio Shortcode for Hugo Blox Kit. */}} +{{/* Load audio from page dir falling back to media library at `assets/media/` and then to remote URI. */}} +{{/* Supports primarily MP3 and MP4. */}} + +{{/* + Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#audio + + Parameters + ---------- + src : + Path to file or url for the audio file. + If a local file, first it is searched in the page directory, and then in `assets/media/` . + id : optional + Custom id "audio-{id}" to associate to the