mirror of
https://github.com/chaoming/hugo-saasify-theme.git
synced 2025-04-20 05:51:54 +02:00
feat: update footer with responsive layout and social icons
This commit is contained in:
parent
ac5201611e
commit
685ab65300
8 changed files with 106 additions and 62 deletions
|
@ -32,68 +32,7 @@
|
|||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="bg-gray-50 border-t border-gray-100">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl py-12 md:py-16">
|
||||
<div class="grid gap-8 md:grid-cols-2 lg:grid-cols-4">
|
||||
<!-- Brand -->
|
||||
<div class="space-y-4">
|
||||
<a href="{{ .Site.BaseURL }}" class="inline-block">
|
||||
{{ with .Site.Params.logo }}
|
||||
<img src="{{ . | relURL }}" alt="{{ $.Site.Title }}" class="h-8">
|
||||
{{ else }}
|
||||
<span class="text-xl font-bold text-gray-900">{{ .Site.Title }}</span>
|
||||
{{ end }}
|
||||
</a>
|
||||
<p class="text-gray-600">{{ .Site.Params.description }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Navigation -->
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold uppercase tracking-wider text-gray-900 mb-4">Product</h3>
|
||||
<ul class="space-y-3">
|
||||
{{ range .Site.Menus.footer_product }}
|
||||
<li><a href="{{ .URL }}" class="text-gray-600 hover:text-primary-600">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold uppercase tracking-wider text-gray-900 mb-4">Company</h3>
|
||||
<ul class="space-y-3">
|
||||
{{ range .Site.Menus.footer_company }}
|
||||
<li><a href="{{ .URL }}" class="text-gray-600 hover:text-primary-600">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Newsletter -->
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold uppercase tracking-wider text-gray-900 mb-4">Stay Updated</h3>
|
||||
<form class="space-y-4">
|
||||
<div>
|
||||
<label for="email" class="sr-only">Email address</label>
|
||||
<input type="email" id="email" name="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500" placeholder="Enter your email">
|
||||
</div>
|
||||
<button type="submit" class="w-full inline-flex items-center justify-center px-6 py-3 rounded-lg font-medium transition duration-200 ease-in-out bg-primary-600 text-white hover:bg-primary-700 hover:scale-105">Subscribe</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom -->
|
||||
<div class="mt-12 pt-8 border-t border-gray-200">
|
||||
<div class="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
|
||||
<p class="text-gray-600 text-sm">
|
||||
© {{ now.Format "2006" }} {{ .Site.Title }}. All rights reserved.
|
||||
</p>
|
||||
<div class="flex space-x-6">
|
||||
{{ range .Site.Menus.footer_legal }}
|
||||
<a href="{{ .URL }}" class="text-sm text-gray-600 hover:text-primary-600">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{{ partial "footer" . }}
|
||||
|
||||
<!-- Mobile Menu Script -->
|
||||
<script>
|
||||
|
|
99
layouts/partials/footer.html
Normal file
99
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,99 @@
|
|||
<footer class="bg-white py-12">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
|
||||
<div class="flex flex-col md:flex-row justify-between space-y-4 md:space-y-0">
|
||||
<!-- Logo and Social Media -->
|
||||
<div class="flex-1">
|
||||
<div class="flex items-center space-x-3 mb-4">
|
||||
<a href="{{ .Site.BaseURL }}" class="inline-block">
|
||||
{{ with .Site.Params.logo }}
|
||||
<img src="{{ . | relURL }}" alt="{{ $.Site.Title }}" class="h-12">
|
||||
{{ end }}
|
||||
</a>
|
||||
<span class="text-xl font-bold text-gray-900">{{ .Site.Title }}</span>
|
||||
</div>
|
||||
<div class="flex space-x-3 p-2">
|
||||
{{ with .Site.Params.social.linkedin }}
|
||||
<a href="{{ . }}" class="text-gray-600 hover:text-gray-900" target="_blank" rel="noopener noreferrer">
|
||||
<span class="sr-only">LinkedIn</span>
|
||||
<img src="/images/social/linkedin.svg" alt="LinkedIn" class="h-5 w-5">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.social.twitter }}
|
||||
<a href="{{ . }}" class="text-gray-600 hover:text-gray-900" target="_blank" rel="noopener noreferrer">
|
||||
<span class="sr-only">Twitter (X)</span>
|
||||
<img src="/images/social/twitter.svg" alt="Twitter" class="h-5 w-5">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.social.youtube }}
|
||||
<a href="{{ . }}" class="text-gray-600 hover:text-gray-900" target="_blank" rel="noopener noreferrer">
|
||||
<span class="sr-only">YouTube</span>
|
||||
<img src="/images/social/youtube.svg" alt="YouTube" class="h-5 w-5">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.social.facebook }}
|
||||
<a href="{{ . }}" class="text-gray-600 hover:text-gray-900" target="_blank" rel="noopener noreferrer">
|
||||
<span class="sr-only">Facebook</span>
|
||||
<img src="/images/social/facebook.svg" alt="Facebook" class="h-5 w-5">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.social.instagram }}
|
||||
<a href="{{ . }}" class="text-gray-600 hover:text-gray-900" target="_blank" rel="noopener noreferrer">
|
||||
<span class="sr-only">Instagram</span>
|
||||
<img src="/images/social/instagram.svg" alt="Instagram" class="h-5 w-5">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.social.github }}
|
||||
<a href="{{ . }}" class="text-gray-600 hover:text-gray-900" target="_blank" rel="noopener noreferrer">
|
||||
<span class="sr-only">GitHub</span>
|
||||
<img src="/images/social/github.svg" alt="GitHub" class="h-5 w-5">
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Column 1 -->
|
||||
<div class="flex-1">
|
||||
<h3 class="text-sm font-semibold uppercase tracking-wider text-gray-900 mb-4">PRODUCT</h3>
|
||||
<ul class="space-y-2">
|
||||
{{ range .Site.Menus.footer_column_1 }}
|
||||
<li><a href="{{ .URL }}" class="text-gray-600 hover:text-primary-600">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Column 2 -->
|
||||
<div class="flex-1">
|
||||
<h3 class="text-sm font-semibold uppercase tracking-wider text-gray-900 mb-4">COMPANY</h3>
|
||||
<ul class="space-y-2">
|
||||
{{ range .Site.Menus.footer_column_2 }}
|
||||
<li><a href="{{ .URL }}" class="text-gray-600 hover:text-primary-600">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Newsletter -->
|
||||
<div class="flex-1">
|
||||
<h3 class="text-sm font-semibold uppercase tracking-wider text-gray-900 mb-4">STAY UPDATED</h3>
|
||||
<form class="space-y-4">
|
||||
<div>
|
||||
<label for="email" class="sr-only">Email address</label>
|
||||
<input type="email" id="email" name="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500" placeholder="Enter your email">
|
||||
</div>
|
||||
<button type="submit" class="w-full inline-flex items-center justify-center px-6 py-3 rounded-lg font-medium transition duration-200 ease-in-out bg-primary-600 text-white hover:bg-primary-700 hover:scale-105">Subscribe</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom -->
|
||||
<div class="mt-12 pt-8 border-t border-gray-200">
|
||||
<div class="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
|
||||
<p class="text-gray-600 text-sm">
|
||||
© {{ now.Format "2006" }} {{ .Site.Title }}. All rights reserved.
|
||||
</p>
|
||||
<a href="https://chaoming.li" class="text-sm text-gray-600 hover:text-primary-600" target="_blank" rel="noopener noreferrer">
|
||||
Designed by Chaoming Li
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
1
static/images/social/facebook.svg
Normal file
1
static/images/social/facebook.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>
|
After Width: | Height: | Size: 385 B |
1
static/images/social/github.svg
Normal file
1
static/images/social/github.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
|
After Width: | Height: | Size: 812 B |
1
static/images/social/instagram.svg
Normal file
1
static/images/social/instagram.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"/></svg>
|
After Width: | Height: | Size: 1.8 KiB |
1
static/images/social/linkedin.svg
Normal file
1
static/images/social/linkedin.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z"/></svg>
|
After Width: | Height: | Size: 422 B |
1
static/images/social/twitter.svg
Normal file
1
static/images/social/twitter.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
|
After Width: | Height: | Size: 254 B |
1
static/images/social/youtube.svg
Normal file
1
static/images/social/youtube.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>
|
After Width: | Height: | Size: 447 B |
Loading…
Add table
Reference in a new issue