Added spoilers to archive pages

This commit is contained in:
arcan1s 2014-01-17 21:43:53 +04:00
parent 24b60d14b6
commit a9de241ab4
6 changed files with 77 additions and 6 deletions

View File

@ -12,8 +12,27 @@ back: 2
</header>
<section>
{% for post in site.categories.en %}
<p align="justify"><i>{{ post.date | date_to_string}}</i> &raquo; <a name="{{ post.short }}" class="anchor" href="#{{ post.short }}"><span class="octicon octicon-link"></span></a><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.tags }})</p>
{% for post in site.categories.en limit:1 %}
{% assign month = post.date | date: "%B, %Y" %}
{% endfor %}
<label class="spoiler">
<input type="checkbox" class="bo"/>
<div class="title">{{ month }}</div>
<div class="body">
{% for post in site.categories.en %}
{% assign new_month = post.date | date: "%B, %Y" %}
{% if new_month != month %}
</div>
</label>
<label class="spoiler">
<input type="checkbox" class="bo"/>
<div class="title">{{ new_month }}</div>
<div class="body">
{% endif %}
{% assign month = post.date | date: "%B, %Y" %}
<i>{{ post.date | date_to_string }}</i> &raquo; <a name="{{ post.short }}" class="anchor" href="#{{ post.short }}"><span class="octicon octicon-link"></span></a><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.tags }})<br>
{% endfor %}
</div>
</label>
<script type="text/javascript" src="http://datejs.googlecode.com/svn/trunk/build/date-en-US.js"></script>

View File

@ -1,3 +1,30 @@
.spoiler {
display: block;
background: #dcdcdc;
text-decoration: none;
color: #555555;
border: 1px solid #000000;
border-radius: 5px;
padding: 0 5px 0 5px;
margin: 0 0 5px 0;
}
.spoiler > .title {
font-weight: bold;
}
.spoiler > .body {
padding: 4px;
font-weight: 300;
font-size: 11pt;
text-align: justify;
display: none;
}
.spoiler > .bo {
display: none;
}
.spoiler > :checked ~ .body {
display: block;
}
/* Liberation font ^^ */
@font-face {
font-family: "Liberation Serif";

View File

@ -13,8 +13,27 @@ back: 2
</header>
<section>
{% for post in site.categories.ru%}
<p align="justify"><i>{{ post.date | date_to_string}}</i> &raquo; <a name="{{ post.short }}" class="anchor" href="#{{ post.short }}"><span class="octicon octicon-link"></span></a><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.tags }})</p>
{% for post in site.categories.ru limit:1 %}
{% assign month = post.date | date: "%B, %Y" %}
{% endfor %}
<label class="spoiler">
<input type="checkbox" class="bo"/>
<div class="title">{{ month }}</div>
<div class="body">
{% for post in site.categories.ru %}
{% assign new_month = post.date | date: "%B, %Y" %}
{% if new_month != month %}
</div>
</label>
<label class="spoiler">
<input type="checkbox" class="bo"/>
<div class="title">{{ new_month }}</div>
<div class="body">
{% endif %}
{% assign month = post.date | date: "%B, %Y" %}
<i>{{ post.date | date_to_string }}</i> &raquo; <a name="{{ post.short }}" class="anchor" href="#{{ post.short }}"><span class="octicon octicon-link"></span></a><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.tags }})<br>
{% endfor %}
</div>
</label>
<script type="text/javascript" src="http://datejs.googlecode.com/svn/trunk/build/date-en-US.js"></script>

View File

@ -31,6 +31,12 @@ projects:
<url>
<loc>http://arcan1s.github.io/ru/blog/</loc>
</url>
<url>
<loc>http://arcan1s.github.io/blog/archive/</loc>
</url>
<url>
<loc>http://arcan1s.github.io/ru/blog/archive/</loc>
</url>
{% for post in site.posts %}
<url>
<loc>http://arcan1s.github.io{{ post.url }}</loc>