Files
rclone/docs/layouts/partials/tier.html
Nick Craig-Wood 839a3b92e0 docs: modernize rclone.org site design
- replace Bootstrap/jQuery with purpose-built CSS and JS
- remove backend icons from navbar and content pages
- replace remaining FontAwesome icons with inline SVGs, remove FontAwesome
- modernize CSS styling for menus, typography, cards, tables, and code blocks
- add copy-to-clipboard buttons on code blocks using SVG icon
- move TOC to left sidebar with responsive overlay drawer
- add sticky header, top scrollbar and first column for wide tables
- add left/right arrow buttons to scrollable tables
- hide homepage logo on mobile
- make wide menus with filter for Commands and Storage Systems
- add dark mode support based on browser preference
- fix CSS/JS cache busting to use build time
2026-04-02 16:32:54 +01:00

43 lines
1.3 KiB
HTML

{{/* Context: Accepts .tier (string) OR .name (string) for lookup. Optional: .align (bool) */}}
{{ $tierColors := dict
"Tier 1" "success"
"Tier 2" "success"
"Tier 3" "warning"
"Tier 4" "danger"
"Tier 5" "danger"
}}
{{ $tierMessages := dict
"Tier 1" "Core: Production-grade, first-class"
"Tier 2" "Stable: Well-supported, minor gaps"
"Tier 3" "Supported: Works for many uses; known caveats"
"Tier 4" "Experimental: Use with care; expect gaps/changes"
"Tier 5" "Deprecated: No longer maintained or supported"
}}
{{/* Determine the Tier Name */}}
{{ $currentTier := "" }}
{{ if .tier }}
{{/* Direct Tier Usage */}}
{{ $currentTier = .tier }}
{{ else if .name }}
{{/* Backend Lookup Usage */}}
{{ $backendName := .name | lower }}
{{ $data := index hugo.Data.backends $backendName }}
{{ if $data }}
{{ $currentTier = $data.tier }}
{{ end }}
{{ end }}
{{/* Render Badge if a Tier was found */}}
{{ if $currentTier }}
{{ $color := index $tierColors $currentTier | default "secondary" }}
{{ $message := index $tierMessages $currentTier | default "" }}
<a href="/tiers/" class="badge badge-pill badge-{{ $color }} {{ if .align }}float-right{{ end }}" style="{{ if .align }}margin-top: 30px; {{ end }}font-size: 100%" title="{{ $message }}">
{{ $currentTier }}
</a>
{{ end }}