mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Added missing files, make the site look better.
This commit is contained in:
parent
9123ac559e
commit
9cd8673f3e
8 changed files with 137 additions and 106 deletions
1
examples/multilingual/layouts/index.html
Normal file
1
examples/multilingual/layouts/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
<meta http-equiv="refresh" content="0; url=/home" />
|
|
@ -1,3 +1,3 @@
|
|||
<footer>(Ↄ) 2015 example.com</footer>
|
||||
<footer id="footer"><span class="copy-left">©</span> 2015 Egon Elbre</footer>
|
||||
</body>
|
||||
</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>
|
|
@ -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>
|
||||
|
|
17
examples/multilingual/layouts/story/single.html
Normal file
17
examples/multilingual/layouts/story/single.html
Normal file
|
@ -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" . }}
|
17
examples/multilingual/layouts/uudis/single.html
Normal file
17
examples/multilingual/layouts/uudis/single.html
Normal file
|
@ -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" . }}
|
89
examples/multilingual/static/main.css
Normal file
89
examples/multilingual/static/main.css
Normal file
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
Loading…
Reference in a new issue