Skip to content

Commit 38f6a8b

Browse files
committed
add 'Source' to header, fix style (especially for narrow screens)
1 parent 2631f70 commit 38f6a8b

File tree

2 files changed

+34
-27
lines changed

2 files changed

+34
-27
lines changed

jekyll/_includes/header.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
</a>
1414
</li>
1515
{% endfor %}
16+
<li class="pure-menu-item">
17+
<a class="pure-menu-link" href="https://github.com/nim-lang/Nim">Source</a>
18+
</li>
1619
</ul>
1720
</div>
1821
<div class="menu-fade"></div>

jekyll/assets/css/main.scss

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ a {
6565
figure.highlight {
6666
code {
6767
font-family: "Inconsolata", monospace;
68-
font-size: 0.8em;
68+
font-size: 0.9em;
6969
}
7070

7171
pre {
72-
padding: 10px;
72+
padding: 8px;
7373
}
7474
/*background-color: #dfdfdf;*/
7575
// background-color: #f6f9fa;
@@ -81,18 +81,14 @@ figure.highlight {
8181
max-width: 100%;
8282
}
8383

84-
.jumbotron {
85-
figure.highlight {
86-
padding: 5px;
87-
margin-top: 1.5em;
88-
background-color: $index-code-bg;
89-
}
90-
}
91-
9284
pre {
9385
margin: 0;
9486
}
9587

88+
ul {
89+
padding-inline-start: 20px;
90+
}
91+
9692
.page-subtitle {
9793
max-width: 600px;
9894
margin: 0 auto;
@@ -261,17 +257,18 @@ a.pure-menu-link.pure-menu-heading {
261257
h1 {
262258
font-size: 225%;
263259
margin-bottom: 0;
264-
margin-top: 16px;
260+
margin-top: 0;
265261
color: $highlight-color;
266262
}
267263

268264
h2 {
269265
font-size: 150%;
266+
margin-top: 20px;
270267
}
271268

272269
h3 {
273270
font-size: 133%;
274-
margin-top: 2em;
271+
margin-top: 1.5em;
275272
}
276273

277274
li {
@@ -296,6 +293,14 @@ a.pure-menu-link.pure-menu-heading {
296293
color: darken($a-dark-color, 10%);
297294
}
298295
}
296+
297+
figure.highlight {
298+
padding: 5px;
299+
margin: 1.2em 0em 2.0em;
300+
font-size: 1.0em;
301+
background-color: $index-code-bg;
302+
}
303+
299304
}
300305

301306
.pure-g > div {
@@ -949,14 +954,13 @@ blockquote {
949954
}
950955

951956
// Styles that apply only to medium-sized screens (small laptops for example)
952-
@media (max-width: 1280px) {
957+
@media (max-width: 1200px) {
953958
body {
954959
font-size: $mobile-default-font-size;
955960
//margin-top: $menu-height * $mobile-default-font-size / $desktop-default-font-size;
956961
}
957962

958963
.pure-menu.pure-menu-horizontal {
959-
960964
li {
961965
font-size: $mobile-default-font-size;
962966
}
@@ -975,13 +979,10 @@ blockquote {
975979
margin: 0 5px -12px 5px;
976980
}
977981

978-
.pure-menu-list {
979-
padding-right: 110px;
980-
}
981982
}
982983

983984
// Styles that apply only to narrow screens (typically mobile devices)
984-
@media (max-width: 1023px) {
985+
@media (max-width: 1000px) {
985986
.jumbotron .pure-u-1 {
986987
margin-bottom: 50px;
987988
}
@@ -993,6 +994,18 @@ blockquote {
993994
.post-meta {
994995
margin-bottom: -5px;
995996
}
997+
998+
a.pure-menu-link {
999+
padding: 17px 10px;
1000+
}
1001+
1002+
.pure-menu.pure-menu-horizontal {
1003+
position: fixed;
1004+
li {
1005+
font-size: $mobile-default-font-size - 2px;
1006+
}
1007+
}
1008+
9961009
}
9971010

9981011
// Styles that apply only to very narrow screens (usually smartphones)
@@ -1011,15 +1024,6 @@ blockquote {
10111024
margin-right: auto;
10121025
}
10131026

1014-
.pure-menu.pure-menu-horizontal {
1015-
position: fixed;
1016-
}
1017-
1018-
.pure-menu-list {
1019-
float: none;
1020-
padding-right: 0px;
1021-
}
1022-
10231027
.menu-fade {
10241028
display: block; // Restore display
10251029
height: $menu-height * $mobile-default-font-size / $desktop-default-font-size + 2px;

0 commit comments

Comments
 (0)