add sidebar

This commit is contained in:
MunifTanjim 2017-12-28 14:08:51 +06:00
parent 9b2342a3f4
commit 16df983bf8
No known key found for this signature in database
GPG Key ID: 9FA86B9EC363F224
5 changed files with 54 additions and 17 deletions

View File

@ -1,7 +1,6 @@
<div class="row flex-right">
<p>Made with 💛 by <a href="https://vlaservi.ch" target="_blank">Rhyne</a> and some <a href="https://github.com/rhyneav/papercss/graphs/contributors">fantastic contributors</a>!</p>
</div>
</div>
</div>
{{ partial "nav/sidebar" . }}
</div>
</body>

View File

@ -3,15 +3,22 @@
{{ partial "head/head" . }}
<body>
<div class="container paper">
<div class="paper">
<div class="demo-title">
<div class="row flex-center">
<div class="text-center">
<h1>{{ .Site.Title }}</h1>
<h3>{{ .Site.Params.info.description }}</h3>
</div>
</div>
{{ partial "nav/main" . }}
<body>
<div id='top' class='row site'>
<div class='sm-12 md-8 col'>
<div class='paper'>
<div class='demo-title'>
<div class='row flex-center'>
<div class='text-center'>
<h1>{{ .Site.Title }}</h1>
<h3>{{ .Site.Params.info.description }}</h3>
</div>
</div>
{{ partial "nav/main" . }}
</div>
<div class="to-top">
<a href="#top" class="paper-btn margin">^</a>
</div>

View File

@ -0,0 +1,28 @@
<div class='sm-12 md-4 col sidebar'>
{{ range .Site.Sections }}
<div class='paper'>
<div class='row'>
{{ range .Sections }}
<div class='collapsible'>
<input id='collapsible-{{ .Title | urlize }}' type='radio' name='collapsible'>
<label for="collapsible-{{ .Title | urlize }}">{{ .Title }}</label>
<div class="collapsible-body">
<ul>
{{ range .Pages }}
<li>
<a href='{{ .Permalink | relURL }}'>{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}
<div class='paper'>
<div class="row flex-right">
<p>Made with 💛 by <a href="https://vlaservi.ch" target="_blank">Rhyne</a> and some <a href="https://github.com/rhyneav/papercss/graphs/contributors">fantastic contributors</a>!</p>
</div>
</div>
</div>

View File

@ -2,7 +2,7 @@ body {
background-image: url("/img/geometry2.png")
}
.demo .row .col {
background-color: #eee;
background-color: #eee;
}
.demo .row .col:nth-child(even) {
background-color: #ddd;
@ -12,7 +12,7 @@ body {
margin-bottom: 2rem;
}
.summary a {
color: #41403e;
color: #41403e;
}
img.no-responsive {
max-width: -webkit-fill-available;
@ -36,4 +36,7 @@ img.no-responsive {
}
.demo-title:hover + .to-top {
opacity: 0
}
}
.sidebar .collapsible {
width: 100%;
}

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB