feat: show site title next to logo with improved styling

This commit is contained in:
Chaoming Li 2024-11-18 16:38:34 +11:00
parent 075c62a3c5
commit 8d25fd79cd
3 changed files with 24 additions and 4 deletions

View file

@ -2,12 +2,15 @@
<header class="fixed w-full top-0 z-50 {{ with $headerConfig.background }}{{ . }}{{ else }}bg-white/80 backdrop-blur-sm{{ end }} {{ with $headerConfig.border }}{{ . }}{{ else }}border-b border-gray-100{{ end }}">
<div class="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
<nav class="flex items-center justify-between h-20">
<!-- Logo -->
<a href="{{ .Site.BaseURL }}" class="flex items-center">
<!-- Logo and Title -->
<a href="{{ .Site.BaseURL }}" class="flex items-center space-x-4">
{{ with $headerConfig.logo }}
<img src="{{ .src | relURL }}" alt="{{ $.Site.Title }}" class="{{ with .class }}{{ . }}{{ else }}h-8{{ end }}">
<img src="{{ .src | relURL }}" alt="{{ $.Site.Title }}" class="{{ with .class }}{{ . }}{{ else }}h-20{{ end }}">
{{ else }}
<span class="text-xl font-bold text-gray-900">{{ .Site.Title }}</span>
<span class="text-2xl font-bold text-gray-900">{{ .Site.Title }}</span>
{{ end }}
{{ if .Site.Title }}
<span class="text-2xl font-semibold text-gray-800">{{ .Site.Title }}</span>
{{ end }}
</a>

View file

Before

Width:  |  Height:  |  Size: 773 B

After

Width:  |  Height:  |  Size: 773 B

View file

@ -0,0 +1,17 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
<!-- outline around oval -->
<ellipse cx="100" cy="100" rx="60" ry="45"
fill="none"
stroke="#68b6e6"
stroke-width="8"/>
<!-- Blue oval background -->
<ellipse cx="100" cy="100" rx="56" ry="41"
fill="#2563eb"/>
<!-- Yellow lightning bolt -->
<path d="M90 40 L130 40 L100 85 L130 85 L70 160 L90 105 L70 105 Z"
fill="#fbbf24"
stroke="white"
stroke-width="2"/>
</svg>

After

Width:  |  Height:  |  Size: 517 B