Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

Add translation warning bar #50

Merged
merged 2 commits into from
Oct 12, 2016
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
1 change: 1 addition & 0 deletions content/about/milestones.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = "title_roadmap"
i18nwarnings = [ "fr", "ru", "zh-hans", "zh-hant" ]
+++
<section class="timeline ">
<div class="container">
Expand Down
9 changes: 8 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
{{ template "_internal/google_analytics_async.html" . }}
</head>
<body>
<!-- TODO: google analytics -->
{{ if .Params.i18nwarnings }}
{{ $pagelang := .Lang }}
{{ range $lang := .Params.i18nwarnings }}
{{ if eq $lang $pagelang }}
{{ partial "i18nwarning.html" . }}
{{ end }}
{{ end }}
{{ end }}
{{ partial "header.html" . }}
<main>
{{ block "main" . }}{{ end }}
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/i18nwarning.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="i18n-warning">
This page is missing translations. If you are able to contribute, please follow the <a href="https://github.com/NebulousLabs/sia.tech/blob/master/TRANSLATION.md">translation guide</a>. Thanks!
</div>
2 changes: 2 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
.video-wrapper { position: relative; padding-bottom: 37.5%; /* 16:10 */ height: 0; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.i18n-warning { background-color: #ff4d4d; padding: 0.5rem 1rem; }
.i18n-warning a, .i18n-warning a:hover { color: black; text-decoration: underline; }
html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; }
Expand Down