mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-02 01:18:30 +02:00
* two new sections * enterprise capabilities and enterprise ready sections * sections: engineered-for-builders and performance-by-design * sections: cta-banner, integrations-logos, solutions # Conflicts: # qdrant-landing/themes/qdrant-2024/assets/css/partials/_cta-banner.scss # qdrant-landing/themes/qdrant-2024/layouts/partials/cta-banner.html * remove old sections from index.html * wip: home page * reuse links, carousel width * globe and globe lights * globe lights * finalyzing the globe, add customers icons * new icons set + svg partial update * upd icons in the enterprise-ready section * lines background * globe lights as gradient and svg * fix carousel responsiveness * fix cut box shadow * accordion slider responsiveness * new hero * hero customers * some hero responsiveness * customers layout fix * cards responsiveness * fixes * remove floating github link * hero - bigger screens * refactor css * more hero responsiveness * fix * hero parallax * replace svg as img with embedded svg logos * fix marquee * slider's tabs responsiveness * remove horizontal scroll on the mobile * moved images * images optim * moved paths to markdown * svg -> png * some refactoring and clean up * moved scss * svg to png * more images optimization and cleaning * optimizing png * fix globe cards height * add reveal effect * improve reveal effect * fix for the hero animation in Safari * removed type:page preventing use-cases page from rendering with newer version of Hugo * restore static/img/home/reranking.webp * remove unused files * formatting * hero and reveal fixes * fixes * update cta banner * links and content fix * fixes: content, links, web-ui illustration * canva testimonial * upd link * fix * replace links * slider links
78 lines
3.0 KiB
HTML
78 lines
3.0 KiB
HTML
<!-- {{/* svg.html partial
|
|
-----------------
|
|
This partial renders SVG icons dynamically with Hugo templating.
|
|
|
|
- Usage:
|
|
{{ partial "svg.html" (dict "icon" "icon-filename" "stroke" "color" "fill" "path" "custom/path/")
|
|
}}
|
|
|
|
|
|
OR just:
|
|
{{ partial "svg.html" "icon-filename" }}
|
|
|
|
|
|
- Parameters:
|
|
- icon / filename: Name of SVG file (without or with .svg extension).
|
|
- path (optional): Folder path (default: static/icons/outline/).
|
|
- stroke, fill, color (optional): Override respective SVG attributes, using CSS variables (e.g. "primary", "teal", etc).
|
|
* For Bootstrap color variables, use just the color name (e.g., "primary", "violet"), which becomes: var(--bs-primary).
|
|
* You can also use "currentColor" to inherit from CSS context.
|
|
* HEX values are supported as well.
|
|
|
|
- How it works:
|
|
- Loads the SVG file as text.
|
|
- Replaces stroke/fill/color attributes if provided.
|
|
- Allows color to be controlled via style or CSS variables.
|
|
- Safe for direct HTML inclusion.
|
|
|
|
- Typical use:
|
|
For icons in cards, buttons, menus, etc.
|
|
|
|
Maintainers: Update this file if icon assets or color conventions change.
|
|
*/}} -->
|
|
|
|
{{ $path := "static/icons/outline/" }}
|
|
{{ $filename := "" }}
|
|
{{ $stroke := "" }}
|
|
{{ $fill := "" }}
|
|
{{ $color := "" }}
|
|
{{ if reflect.IsMap . }}
|
|
{{ $path = default $path .path }}
|
|
{{ $filename = default .filename .icon }}
|
|
{{ $stroke = .stroke }}
|
|
{{ $fill = .fill }}
|
|
{{ $color = .color }}
|
|
{{ else }}
|
|
{{ $filename = . }}
|
|
{{ end }}
|
|
{{ if not (strings.HasSuffix $filename ".svg") }}
|
|
{{ $filename = printf "%s.svg" $filename }}
|
|
{{ end }}
|
|
{{ $svg := readFile (printf "%s%s" $path $filename) }}
|
|
{{ if $stroke }}
|
|
{{ $strokeVal := $stroke }}
|
|
{{ if and (ne (strings.HasPrefix $stroke "#") true) (ne (strings.HasPrefix $stroke "var(") true) (ne $stroke "currentColor") (ne $stroke "inherit") (ne $stroke "none") }}
|
|
{{ $strokeVal = printf "var(--bs-%s)" $stroke }}
|
|
{{ end }}
|
|
{{ $svg = replaceRE `stroke="[^"]*"` (printf `stroke="%s"` $strokeVal) $svg }}
|
|
{{ $svg = replaceRE `stroke='[^']*'` (printf `stroke="%s"` $strokeVal) $svg }}
|
|
{{ end }}
|
|
{{ if $fill }}
|
|
{{ $fillVal := $fill }}
|
|
{{ if and (ne (strings.HasPrefix $fill "#") true) (ne (strings.HasPrefix $fill "var(") true) (ne $fill "currentColor") (ne $fill "inherit") (ne $fill "none") }}
|
|
{{ $fillVal = printf "var(--bs-%s)" $fill }}
|
|
{{ end }}
|
|
{{ $svg = replaceRE `fill="[^"]*"` (printf `fill="%s"` $fillVal) $svg }}
|
|
{{ $svg = replaceRE `fill='[^']*'` (printf `fill="%s"` $fillVal) $svg }}
|
|
{{ end }}
|
|
{{ if $color }}
|
|
{{ $colorVal := $color }}
|
|
{{ if and (ne (strings.HasPrefix $color "#") true) (ne (strings.HasPrefix $color "var(") true) (ne $color "currentColor") (ne $color "inherit") (ne $color "none") }}
|
|
{{ $colorVal = printf "var(--bs-%s)" $color }}
|
|
{{ end }}
|
|
{{ $svg = replaceRE `(<svg)(\s)` (printf `$1 style="color:%s"$2` $colorVal) $svg }}
|
|
{{ $svg = replaceRE `stroke="[^"]*"` `stroke="currentColor"` $svg }}
|
|
{{ $svg = replaceRE `stroke='[^']*'` `stroke="currentColor"` $svg }}
|
|
{{ end }}
|
|
{{ $svg | safeHTML }}
|