diff options
-rw-r--r-- | examples/multilingual/layouts/index.html | 1 | ||||
-rw-r--r-- | examples/multilingual/layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | examples/multilingual/layouts/partials/head.html | 2 | ||||
-rw-r--r-- | examples/multilingual/layouts/partials/header.html | 26 | ||||
-rw-r--r-- | examples/multilingual/layouts/story/single.html | 17 | ||||
-rw-r--r-- | examples/multilingual/layouts/uudis/single.html | 17 | ||||
-rw-r--r-- | examples/multilingual/static/main.css | 89 | ||||
-rw-r--r-- | examples/multilingual/static/static/main.css | 89 |
8 files changed, 137 insertions, 106 deletions
diff --git a/examples/multilingual/layouts/index.html b/examples/multilingual/layouts/index.html new file mode 100644 index 000000000..a4273218f --- /dev/null +++ b/examples/multilingual/layouts/index.html @@ -0,0 +1 @@ +<meta http-equiv="refresh" content="0; url=/home" />
\ No newline at end of file diff --git a/examples/multilingual/layouts/partials/footer.html b/examples/multilingual/layouts/partials/footer.html index c5d0afa94..07a0b1c97 100644 --- a/examples/multilingual/layouts/partials/footer.html +++ b/examples/multilingual/layouts/partials/footer.html @@ -1,3 +1,3 @@ - <footer>(Ↄ) 2015 example.com</footer>
+ <footer id="footer"><span class="copy-left">©</span> 2015 Egon Elbre</footer>
</body>
</html>
\ No newline at end of file diff --git a/examples/multilingual/layouts/partials/head.html b/examples/multilingual/layouts/partials/head.html index f89e3ffb3..19f4810e1 100644 --- a/examples/multilingual/layouts/partials/head.html +++ b/examples/multilingual/layouts/partials/head.html @@ -10,6 +10,6 @@ {{ end }}
{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="/static/main.css">
+ <link rel="stylesheet" href="/main.css">
</head>
<body>
\ No newline at end of file diff --git a/examples/multilingual/layouts/partials/header.html b/examples/multilingual/layouts/partials/header.html index 59495da8f..e5209f5df 100644 --- a/examples/multilingual/layouts/partials/header.html +++ b/examples/multilingual/layouts/partials/header.html @@ -1,25 +1,21 @@ <header>
- <nav class="menu language-menu">
- <ul>
- <li><a href="/home">English</a></li>
- <li><a href="/kodu">Eesti</a></li>
- </ul>
- <div class="clear"></div>
+ <nav id="language-menu">
+ <a href="/home">English</a>
+ <a href="/kodu">Eesti</a>
</nav>
{{ if (eq .Params.lang "et") }}
- <h1 class="title">Minu mitmekeelne leht</h1>
+ <h1 id="title">Minu mitmekeelne leht</h1>
{{ else }}
- <h1 class="title">My multilingual site</h1>
+ <h1 id="title">My multilingual site</h1>
{{ end }}
- <nav class="menu main-menu">
- <ul>
- {{ range (index .Site.Taxonomies.menu .Params.lang).Pages }}
- <li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
- {{ end }}
- </ul>
+ <nav id="main-menu">
+ {{ range (index .Site.Taxonomies.menu .Params.lang).Pages }}
+ <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
+ {{ end }}
+ <div class="clear"></div>
</nav>
</header>
-<h2 class="subtitle">{{ .Title }}</h2>
+<h2 id="subtitle">{{ .Title }}</h2>
diff --git a/examples/multilingual/layouts/story/single.html b/examples/multilingual/layouts/story/single.html new file mode 100644 index 000000000..0e2a19bdc --- /dev/null +++ b/examples/multilingual/layouts/story/single.html @@ -0,0 +1,17 @@ +{{ partial "head.html" . }}
+{{ partial "header.html" . }}
+
+{{ if .Params.listing }}
+ {{ range .Site.Taxonomies.groups.news.Pages }}
+ <article class="post">
+ <h3><a href='{{ .Permalink }}'>{{ .Title }}</a> </h3>
+ <div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words</div>
+ {{ .Summary }}
+ <a href='{{ .Permalink }}'><nobr>read more →</nobr></a>
+ </article>
+ {{ end }}
+{{ else }}
+ {{ .Content }}
+{{ end }}
+
+{{ partial "footer.html" . }}
diff --git a/examples/multilingual/layouts/uudis/single.html b/examples/multilingual/layouts/uudis/single.html new file mode 100644 index 000000000..1898b3ad6 --- /dev/null +++ b/examples/multilingual/layouts/uudis/single.html @@ -0,0 +1,17 @@ +{{ partial "head.html" . }}
+{{ partial "header.html" . }}
+
+{{ if .Params.listing }}
+ {{ range .Site.Taxonomies.groups.uudised.Pages }}
+ <article class="post">
+ <h3><a href='{{ .Permalink }}'>{{ .Title }}</a> </h3>
+ <div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} sõna</div>
+ {{ .Summary }}
+ <a href='{{ .Permalink }}'><nobr>loe edasi →</nobr></a>
+ </article>
+ {{ end }}
+{{ else }}
+ {{ .Content }}
+{{ end }}
+
+{{ partial "footer.html" . }}
diff --git a/examples/multilingual/static/main.css b/examples/multilingual/static/main.css new file mode 100644 index 000000000..713c7d272 --- /dev/null +++ b/examples/multilingual/static/main.css @@ -0,0 +1,89 @@ +* { box-sizing: border-box; }
+html, body { margin: 0; padding: 0; }
+
+body {
+ max-width: 800px;
+ margin: 0 auto;
+
+ color: #333;
+}
+
+.clear { clear: both; }
+
+
+#language-menu, #main-menu, #title, #subtitle {
+ font-family: Georgia;
+ font-variant: small-caps;
+}
+
+.copy-left {
+ display: inline-block;
+ text-align: right;
+ margin: 0px;
+ -moz-transform: scaleX(-1);
+ -o-transform: scaleX(-1);
+ -webkit-transform: scaleX(-1);
+ transform: scaleX(-1);
+ filter: FlipH;
+ -ms-filter: "FlipH";
+}
+
+/* Language Menu */
+
+#language-menu { float: right; }
+#language-menu a {
+ display: block;
+ padding: 8px 10px;
+ width: 100px;
+
+ transition: border-left 0.3s ease-in-out;
+ border-left: 2px solid #FFF;
+}
+#language-menu a:hover { border-left: 2px solid #A00; }
+#language-menu a, #language-menu a:visited {
+ color: #333;
+}
+
+/* Main Menu */
+
+#main-menu {
+ margin-top: 20px;
+ border-left: 2px solid #A00;
+ padding-left: 10px;
+}
+
+#main-menu a {
+ float: left;
+ width: 100px;
+ text-align: center;
+
+ padding: 5px 10px;
+ margin: 0;
+
+ text-decoration: none;
+ font-size: 18px;
+
+ transition: border-bottom 0.3s ease-in-out;
+ border-bottom: 2px solid #FFF;
+}
+
+#main-menu a:hover {
+ border-bottom: 2px solid #A00;
+}
+
+/* Content */
+
+article h3 {
+ margin-bottom: 3px;
+}
+.post-meta {
+ color: #888;
+ margin-bottom: 10px;
+}
+
+/* Footer */
+
+#footer {
+ margin: 50px 0;
+ text-align: center;
+}
\ No newline at end of file diff --git a/examples/multilingual/static/static/main.css b/examples/multilingual/static/static/main.css deleted file mode 100644 index bf8284d56..000000000 --- a/examples/multilingual/static/static/main.css +++ /dev/null @@ -1,89 +0,0 @@ -* {
- box-sizing: border-box;
-}
-
-html, body {
- margin: 0;
- padding: 0;
-}
-
-body {
- max-width: 600px;
- margin: 0 auto;
- background: #fefefe;
-}
-
-header {
- padding: 0 30px;
- padding-top: 10px;
- border-bottom: 1px solid #999;
-}
-
-.title {
- clear: both;
- font-family: Georgia;
- text-align: center;
-}
-
-.subtitle {
- font-family: Georgia;
- background: #eee;
- margin: 0;
- padding: 5px;
- border-radius: 0 0 50px 50px;
- text-align: center;
-
- margin-bottom: 10px;
-}
-
-.menu a {
- text-decoration: none;
-}
-
-.language-menu {
- float: right;
-}
-
-.language-menu ul {
- list-style: none;
-}
-
-.language-menu ul li {
- float: left;
- padding-right: 10px;
- border-right: 1px solid #ccc;
- margin-right: 10px;
-}
-
-.main-menu {
- text-align: center;
-}
-
-.main-menu ul {
- list-style: none;
-}
-
-.main-menu ul li {
- display: inline-block;
- padding: 5px 15px;
- border-radius: 3px;
-}
-
-.main-menu ul li:hover, .main-menu ul li:active {
- background: #eef;
-}
-
-.clear {
- clear: both;
-}
-
-body > footer {
- font-family: Georgia;
- background: #eee;
- margin: 0;
- padding: 10px;
- padding-bottom: 20px;
- border-radius: 50px 50px 0 0;
- text-align: center;
- border-bottom: 1px solid #999;
-}
\ No newline at end of file |