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

Commit

Permalink
Add translation warning bar
Browse files Browse the repository at this point in the history
and enable it on /about/milestones/ for fr, ru, zh-hant, zh-hans
  • Loading branch information
VoidingWarranties committed Oct 8, 2016
1 parent 06295e8 commit 2d106cd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
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
1 change: 1 addition & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*! 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; }
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

0 comments on commit 2d106cd

Please sign in to comment.