Skip to content

Commit

Permalink
Adapt the site
Browse files Browse the repository at this point in the history
  • Loading branch information
roumail committed Oct 26, 2023
1 parent e34b75e commit 89b5a62
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
5 changes: 3 additions & 2 deletions config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ header:
# Site footer

footer:
# text: "hello"
copyright:
notice: '© {year} Me. This work is licensed under {license}'
# notice: '© {year} Me. This work is licensed under {license}'
license:
enable: true
enable: false
allow_derivatives: false
share_alike: true
allow_commercial: false
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/mailchimp-form.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div style="text-align: center; width: 50%; margin: auto;">
<div style="text-align: center; width: 75%; margin: auto;">
<p style="font-size: 1.2em; margin-bottom: 1em;">Subscribe to my monthly newsletter</p>
<form action="{{ site.Params.footer.newsletter.mailchimpURL }}" method="post" id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div class="form-group" style="margin-bottom: 1em;">
<input type="email" class="form-control" id="mce-EMAIL" name="EMAIL" aria-describedby="emailHelp"
placeholder="Enter email" style="margin: auto; width: 80%;" />
placeholder="Enter email" style="margin: auto; width: 75%;" />
</div>
<small id="emailHelp" class="form-text text-muted" style="margin-bottom: 1em;">
By entering your email address, you agree to receive the newsletter of this website.
Clicking submit takes you to Mailchimp.
</small>
<button type="submit" class="btn btn-info">Submit</button>
</form>
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/page_footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ partial "page_edit" . }}
{{ partial "tags" . }}
<h3>Share this Article:</h3>
{{ partial "components/page_sharer" . }}
{{ partial "page_author" . }}
{{ partial "comments" . }}
Expand Down
16 changes: 16 additions & 0 deletions layouts/partials/site_footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<footer class="site-footer">

{{ partial "functions/get_hook" (dict "hook" "footer-start" "context" .) }}

{{/* Load footer block */}}
{{ $footer_section_name := site.Params.footer.block | default "minimal" }}
{{ $footer_section_path := printf "components/footers/%s.html" $footer_section_name }}
{{ if not (templates.Exists (printf "partials/%s" $footer_section_path)) }}
{{ errorf "Check your `params.yaml`. Cannot find footer block at `layouts/partials/%s`" $footer_section_path }}
{{ end }}
{{ partial $footer_section_path . }}

<p class="powered-by">
Built using Hugo and GitHub Actions.
</p>
</footer>

0 comments on commit 89b5a62

Please sign in to comment.