hugo-theme-tui

TUI
Log | Files | Refs | README | LICENSE

icon.html (1835B)


      1 {{- /*
      2   Inline SVG icons for socials, keyed by name.
      3   Context: a plain string — the icon name ("email" | "linkedin" | "github" |
      4   "git" | "rss" | "pgp" | "coffee"). Unknown names render nothing.
      5 */ -}}
      6 {{- $name := . -}}
      7 {{- $common := `viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"` -}}
      8 {{- if eq $name "email" -}}
      9 <svg {{ $common | safeHTMLAttr }}><rect x="3" y="5" width="18" height="14" rx="1"/><path d="M3 7l9 6 9-6"/></svg>
     10 {{- else if eq $name "linkedin" -}}
     11 <svg {{ $common | safeHTMLAttr }}><rect x="3" y="3" width="18" height="18" rx="1"/><path d="M8 10v8M8 7v.01M12 18v-5M16 18v-3a2 2 0 0 0-4 0"/></svg>
     12 {{- else if eq $name "github" -}}
     13 <svg {{ $common | safeHTMLAttr }}><path d="M9 19c-4 1.5-4-2-6-2.5M15 22v-4c0-1 .1-1.4-.5-2 3-.3 6-1.5 6-6.5a4.7 4.7 0 0 0-1.3-3.3 4.4 4.4 0 0 0-.1-3.3s-1-.3-3.4 1.3a11.6 11.6 0 0 0-6.2 0C6.9 1.6 5.9 1.9 5.9 1.9a4.4 4.4 0 0 0-.1 3.3A4.7 4.7 0 0 0 4.5 8.5c0 5 3 6.2 6 6.5-.6.6-.6 1.2-.5 2v4"/></svg>
     14 {{- else if eq $name "git" -}}
     15 <svg {{ $common | safeHTMLAttr }}><path d="M12 2v6M12 22v-6M4.93 4.93l4.24 4.24M14.83 14.83l4.24 4.24M2 12h6M22 12h-6M4.93 19.07l4.24-4.24M14.83 9.17l4.24-4.24"/></svg>
     16 {{- else if eq $name "rss" -}}
     17 <svg {{ $common | safeHTMLAttr }}><path d="M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1"/></svg>
     18 {{- else if eq $name "pgp" -}}
     19 <svg {{ $common | safeHTMLAttr }}><rect x="4" y="11" width="16" height="10" rx="1"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>
     20 {{- else if eq $name "coffee" -}}
     21 <svg {{ $common | safeHTMLAttr }}><path d="M18 8h1a4 4 0 0 1 0 8h-1M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"/><line x1="6" y1="2" x2="6" y2="4"/><line x1="10" y1="2" x2="10" y2="4"/><line x1="14" y1="2" x2="14" y2="4"/></svg>
     22 {{- end -}}