Skip to content

Commit

Permalink
style: change footer layout
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jan 22, 2023
1 parent 0c3f9b2 commit 7127b42
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 12 deletions.
5 changes: 5 additions & 0 deletions assets/main/scss/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.footer {
.social-link {
font-size: 1.5em;
}
}
1 change: 1 addition & 0 deletions assets/main/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import 'component';
@import 'code';
@import 'dropdown';
@import 'footer';
@import 'form';
@import 'gallery';
@import 'highlight';
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer/copyright.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="copyright mb-2">
{{- partial "helpers/copyright" . }}
<div class="copyright mb-2 text-secondary">
<small>{{- partial "helpers/copyright" . }}</small>
</div>
16 changes: 12 additions & 4 deletions layouts/partials/footer/main.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{{- partialCached "footer/actions-panel" . -}}
{{- partialCached "footer/menu" . -}}
{{- partial "footer/social-links" . -}}
{{- partialCached "footer/copyright" . -}}
{{- partialCached "footer/powered-by" . -}}
<div class="row text-center{{ if .Site.Menus.footer }} text-lg-start{{ end }}">
<div class="col-12 mt-2{{ if .Site.Menus.footer }} col-lg-3{{ end }}">
<p class="mb-2">{{ .Site.Title }}</p>
<p class="text-secondary mb-2"><small>{{ .Site.Params.Description }}</small></p>
{{- partialCached "footer/copyright" . -}}
{{- partialCached "footer/powered-by" . -}}
{{- partial "footer/social-links" . -}}
</div>
<div class="col-12 col-lg-8 offset-0 offset-lg-1">
{{- partialCached "footer/menu" . -}}
</div>
</div>
4 changes: 2 additions & 2 deletions layouts/partials/footer/menu.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

{{- if .Site.Menus.footer -}}
<ul class="nav justify-content-between footer-memu mb-3">
<ul class="nav justify-content-between footer-memu mb-3 row">
{{- range .Site.Menus.footer -}}
<li class="nav-item">
<li class="nav-item col-12 col-md-6 col-lg-3 px-0">
{{- if .HasChildren -}}
<ul class="nav flex-column align-items-start">
<li class="nav-item">
Expand Down
6 changes: 4 additions & 2 deletions layouts/partials/footer/powered-by.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{- if .Site.Params.poweredBy -}}
<div class="powered-by mb-2">
Powered by <a class="text-primary" href="https://gohugo.io" target="_blank" rel="noopener noreferrer">Hugo</a> and the <a class="text-primary" href="https://github.com/razonyang/hugo-theme-bootstrap" target="_blank" rel="noopener noreferrer">HBS</a> theme.
<div class="powered-by mb-2 text-secondary">
<small>
Build with ❤️ from the <a class="text-primary" href="https://gohugo.io" target="_blank" rel="noopener noreferrer">Hugo</a> and the <a class="text-primary" href="https://github.com/razonyang/hugo-theme-bootstrap" target="_blank" rel="noopener noreferrer">HBS</a> theme.
</small>
</div>
{{- end -}}
5 changes: 3 additions & 2 deletions layouts/partials/footer/social-links.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- partial "helpers/social-links" (dict
"links" .Site.Social
"size" "fa-2x"
"class" "justify-content-between justify-content-lg-center mb-2"
"size" (cond (isset .Site.Menus "footer") "" "fa-2x")
"class" "justify-content-between mb-2 mt-3"
"linkClass" "p-0 me-1 mb-2"
"OutputFormats" $.OutputFormats
"home" (.GetPage "/") "params" .Site.Params)
-}}

0 comments on commit 7127b42

Please sign in to comment.