Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a disclaimer in the footer of each page. #312

Merged
merged 3 commits into from
May 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions i18n/bn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ other = "সার্টিফিকেট দেখুন"

[notes]
other = "নোট সমূহ"

[disclaimer_text]
other = "দায় বিজ্ঞপ্তি"
3 changes: 3 additions & 0 deletions i18n/cn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "查看证书"

[notes]
other = "笔记"

[disclaimer_text]
other = "责任通知"
3 changes: 3 additions & 0 deletions i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "Bekijk certificaat"

[notes]
other = "Opmerkingen"

[disclaimer_text]
other = "Haftungshinweis"
3 changes: 3 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "View Certificate"

[notes]
other = "Notes"

[disclaimer_text]
other = "Liability Notice"
3 changes: 3 additions & 0 deletions i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "Ver Certificado"

[notes]
other = "Notas"

[disclaimer_text]
other = "Aviso de responsabilidad"
3 changes: 3 additions & 0 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "Afficher le certificat"

[notes]
other = "Remarques"

[disclaimer_text]
other = "Avis de responsabilité"
3 changes: 3 additions & 0 deletions i18n/hi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "प्रमाणपत्र देखें"

[notes]
other = "टिप्पणियाँ"

[disclaimer_text]
other = "दायित्व सूचना"
3 changes: 3 additions & 0 deletions i18n/id.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "Lihat Sertifikat"

[notes]
other = "Catatan"

[disclaimer_text]
other = "Pemberitahuan Kewajiban"
3 changes: 3 additions & 0 deletions i18n/it.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "Féach ar an Teastas"

[notes]
other = "Appunti"

[disclaimer_text]
other = "Avviso di responsabilità"
3 changes: 3 additions & 0 deletions i18n/jp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ other = "ビューの証明書"

[notes]
other = "ノート"

[disclaimer_text]
other = "責任通知"
3 changes: 3 additions & 0 deletions i18n/ko.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "인증서보기"

[notes]
other = "메모"

[disclaimer_text]
other = "책임 고지"
3 changes: 3 additions & 0 deletions i18n/ru.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "Просмотреть сертификат"

[notes]
other = "Ноты"

[disclaimer_text]
other = "Уведомление об ответственности"
3 changes: 3 additions & 0 deletions i18n/vn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ other = "Xem chứng chỉ"

[notes]
other = "Ghi chú"

[disclaimer_text]
other = "Thông báo trách nhiệm"
14 changes: 14 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{ $contactMeEnabled := site.Params.footer.contactMe.enable | default true }}
{{ $newsletterEnabled := site.Params.footer.newsletter.enable | default true }}
{{ $credentialsEnabled := site.Params.footer.credentials.enable | default true }}
{{ $disclaimerEnabled := site.Params.footer.disclaimer.enable | default false }}

{{/* Keep backward compatibility for the newsletter function */}}
{{ if site.Params.newsletter.enable }}
Expand All @@ -29,6 +30,13 @@
{{ end }}
{{ end }}


{{ $disclaimer := "" }}
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
{{ if $siteConfig.disclaimer }}
{{ $disclaimer = $siteConfig.disclaimer }}
{{ end }}

{{/* footer logos */}}
{{ $themeLogo := "/images/theme-logo.png" }}
{{ $hugoLogo := "/images/hugo-logo.svg" }}
Expand Down Expand Up @@ -102,6 +110,12 @@ <h5>{{ i18n "contact_me" }}</h5>
{{ end }}
</div>
</div>
{{ if and $disclaimerEnabled $disclaimer}}
<hr />
<div class="container">
<p id="disclaimer"><strong>{{ i18n "disclaimer_text" }}:</strong> {{ $disclaimer }}</p>
</div>
{{ end }}
{{ if $credentialsEnabled }}
<hr />
<div class="container">
Expand Down
8 changes: 8 additions & 0 deletions static/css/layouts/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,14 @@ mark {
background-color: #e5e9f2;
}

.footer #disclaimer{
color: #8392a5 !important;
text-align: justify;
}
.footer #disclaimer>strong{
color: #c0ccda!important;
}

.footer #theme {
color: #c0ccda;
}
Expand Down
1 change: 0 additions & 1 deletion static/css/layouts/single.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ body {
}

.toc-holder {
position: -webkit-sticky;
position: sticky;
top: 4.5rem;
overflow-x: hidden;
Expand Down
3 changes: 0 additions & 3 deletions static/css/navigators/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

.sidebar-holder {
top: 2.5rem;
position: -webkit-sticky;
position: sticky;
background-color: #f9fafc;
height: 100vh;
Expand Down Expand Up @@ -192,7 +191,6 @@ a.focused {
transition: all ease-out 0.3s;
}
.sidebar-holder {
position: -webkit-sticky;
position: sticky;
top: 2.5rem;
width: 100%;
Expand Down Expand Up @@ -222,7 +220,6 @@ a.focused {
transition: all ease-out 0.3s;
}
.sidebar-holder {
position: -webkit-sticky;
position: sticky;
top: 2.5rem;
width: 100%;
Expand Down