Skip to content

Commit ea0d782

Browse files
author
Matthieu Oger
committed
Change pager and tutorial
Tutorial : * + pager * + header * + links
1 parent f33046b commit ea0d782

File tree

6 files changed

+90
-42
lines changed

6 files changed

+90
-42
lines changed

_includes/pager.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- start pagination -->
2-
<div class="pager">
2+
<div class="pager bottom">
33
<!-- start older -->
44
<section class="pager__older">
55
{% if paginator.next_page %}
@@ -11,7 +11,7 @@
1111
<!-- end older -->
1212

1313
<!-- start archives -->
14-
<section class="pager__archives">
14+
<section class="pager__ref">
1515
<a href="/journal/archives" title="Archives">Archives</a>
1616
</section>
1717
<!-- end archives -->

_layouts/tutorial.html

+36-9
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,31 @@
1010

1111
<!-- reduced header -->
1212
<header class="page-header">
13+
<nav>
14+
<!-- menu -->
15+
<section class"page-back">
16+
<a href="/">← Back to Pixelnest</a>
17+
</section>
1318

14-
<!-- menu -->
15-
<p class"page-back">
16-
<a href="/">← Back to Pixelnest</a>
17-
</p>
19+
<section class="page-ref">
20+
{% if page.home and page.tutorial %}
21+
Tutorial : <a href="{{ page.home }}">{{ page.tutorial }}</a>
22+
{% endif %}
23+
</section>
1824

19-
<!-- twitter -->
20-
<p class="page-link">
21-
<a href="http://twitter.com/pixelnest">follow us on twitter</a>
22-
</p>
25+
<!-- twitter -->
26+
<section class="page-link">
27+
<a href="http://twitter.com/pixelnest">follow us on twitter</a>
28+
</section>
29+
</nav>
2330
</header>
2431

2532
<div class="page-content">
2633

2734
<!-- post layout -->
2835
<article class="entry">
2936
<h2 class="entry__title">
30-
<a href="{{ page.url }}" title="{{ page.title }}">{{ page.title }}</a>
37+
<a href="{{ page.url | remove: 'index.html' }}" title="{{ page.title }}">{{ page.title }}</a>
3138
</h2>
3239

3340
<aside class="entry__metadata">
@@ -46,6 +53,26 @@ <h2 class="entry__title">
4653
</article>
4754
<!-- end post layout -->
4855

56+
<!-- start pagination -->
57+
<div class="pager">
58+
<section class="pager__older">
59+
{% if page.previous %}
60+
<a href="{{ page.previous }}" title="Previous chapter">← Previous</a>
61+
{% endif %}
62+
</section>
63+
64+
<section class="pager__ref">
65+
<a href="{{ page.url | remove: 'index.html' }}" title="Summary">Summary</a>
66+
</section>
67+
68+
<section class="pager__newer">
69+
{% if page.next %}
70+
<a href="{{ page.next }}" title="Next chapter">Next →</a>
71+
{% endif %}
72+
</section>
73+
</div>
74+
<!-- end pagination -->
75+
4976
</div>
5077

5178
<!-- reduced footer -->

_sources/ie.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
display: inline;
109109
}
110110

111-
.pager__archives {
111+
.pager__ref {
112112
display: inline;
113113
margin: 0 100px;
114114
}

_sources/pager.scss

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,30 @@
44

55
.pager {
66
position: relative;
7-
bottom: -140px;
87
display: table;
98
margin: 0 auto;
109
padding-top: 20px;
1110
width: 100%;
1211
border-top: 1px solid #eee;
1312

1413
color: #bbb;
14+
15+
&.bottom {
16+
bottom: -140px;
17+
}
1518
}
1619

1720
.pager a {
1821
@extend %link;
1922
}
2023

21-
.pager__archives,
24+
.pager__ref,
2225
.pager__newer,
2326
.pager__older {
2427
display: table-cell;
2528
}
2629

27-
.pager__archives {
30+
.pager__ref {
2831
width: 36%;
2932
text-align: center;
3033
}

_sources/tutorial.scss

+23-14
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,35 @@
66

77
// Small header
88
.page-header {
9-
// Padding
10-
$distance: 10px;
11-
12-
position: relative;
13-
149
margin-bottom: 60px;
15-
padding: $distance;
10+
padding: 12px 10px;
1611
background-color: rgba(240, 240, 240, 0.8);
1712

1813
font-size: 0.8em;
1914

20-
p {
21-
display: inline;
15+
nav {
16+
display: table;
17+
width: 100%;
2218
}
2319

24-
// Put at the right end of the header
20+
.page-back,
21+
.page-ref,
2522
.page-link {
26-
display: inline-block;
27-
position: absolute;
28-
top: $distance;
29-
right: $distance;
30-
margin: 0;
23+
display: table-cell;
24+
width: 25%;
25+
}
26+
27+
.page-back {
28+
text-align: left;
29+
}
3130

31+
.page-ref {
32+
text-align: center;
33+
padding: 0 10px;
34+
width: 50%;
35+
}
36+
37+
.page-link {
3238
text-align: right;
3339
}
3440

@@ -37,6 +43,9 @@
3743
}
3844
}
3945

46+
.entry {
47+
margin-bottom: 40px;
48+
}
4049

4150
// Light footer
4251
.page-footer {

static/css/pixelnest.css

+22-13
Original file line numberDiff line numberDiff line change
@@ -487,20 +487,21 @@ li {
487487
margin-top: 20px; } }
488488
.pager {
489489
position: relative;
490-
bottom: -140px;
491490
display: table;
492491
margin: 0 auto;
493492
padding-top: 20px;
494493
width: 100%;
495494
border-top: 1px solid #eee;
496495
color: #bbb; }
496+
.pager.bottom {
497+
bottom: -140px; }
497498

498-
.pager__archives,
499+
.pager__ref,
499500
.pager__newer,
500501
.pager__older {
501502
display: table-cell; }
502503

503-
.pager__archives {
504+
.pager__ref {
504505
width: 36%;
505506
text-align: center; }
506507

@@ -529,20 +530,28 @@ li {
529530
font-style: italic; }
530531

531532
.tutorial .page-header {
532-
position: relative;
533533
margin-bottom: 60px;
534-
padding: 10px;
534+
padding: 12px 10px;
535535
background-color: rgba(240, 240, 240, 0.8);
536536
font-size: 0.8em; }
537-
.tutorial .page-header p {
538-
display: inline; }
537+
.tutorial .page-header nav {
538+
display: table;
539+
width: 100%; }
540+
.tutorial .page-header .page-back,
541+
.tutorial .page-header .page-ref,
542+
.tutorial .page-header .page-link {
543+
display: table-cell;
544+
width: 25%; }
545+
.tutorial .page-header .page-back {
546+
text-align: left; }
547+
.tutorial .page-header .page-ref {
548+
text-align: center;
549+
padding: 0 10px;
550+
width: 50%; }
539551
.tutorial .page-header .page-link {
540-
display: inline-block;
541-
position: absolute;
542-
top: 10px;
543-
right: 10px;
544-
margin: 0;
545552
text-align: right; }
553+
.tutorial .entry {
554+
margin-bottom: 40px; }
546555
.tutorial .page-footer {
547556
background-color: transparent;
548557
color: #888888; }
@@ -606,7 +615,7 @@ li {
606615
text-align: center; }
607616
.ie .pager .pager__older {
608617
display: inline; }
609-
.ie .pager .pager__archives {
618+
.ie .pager .pager__ref {
610619
display: inline;
611620
margin: 0 100px; }
612621
.ie .pager .pager__newer {

0 commit comments

Comments
 (0)