8000 Use a Jekyll layout to avoid duplication. · pannygame/lodash.github.io@cf4b2ff · GitHub
[go: up one dir, main page]

Skip to content

Commit cf4b2ff

Browse files
committed
Use a Jekyll layout to avoid duplication.
1 parent b331778 commit cf4b2ff

File tree

9 files changed

+235
-43
lines changed

9 files changed

+235
-43
lines changed

_config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title: lodash
2+
3+
defaults:
4+
- scope:
5+
path: ''
6+
values:
7+
layout: base

_layouts/base.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en" id="{{ page.id }}">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1">
6+
<title>{{ page.title }}</title>
7+
{% if page.description %}<meta name="description" content="{{ page.description }}">{% endif %}
8+
<link rel="stylesheet" href="/assets/css/main.css">
9+
<link rel="feed alternate" type="application/atom+xml" href="https://github.com/lodash/lodash/commits/master.atom">
10+
<!--[if lt IE 9]><script src="/assets/js/html5.js"></script><![endif]-->
11+
</head>
12+
<body>
13+
{{ content }}
14+
<footer></footer>
15+
<script src="/assets/js/lodash.js"></script>
16+
<script>_gaq=[['_setAccount','UA-6065217-64'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='https://www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'))</script>
17+
</body>
18+
</html>

assets/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/main.src.css

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
html, body, h1, h2, p { margin:0; padding:0; }
2+
html { background:#d3d3d3; height:100%; color:#222; font-size:100%; }
3+
body { background:#fff; width:60em; margin:0 auto; -webkit-box-shadow:0 0 2.5em #5d656c; -moz-box-shadow:0 0 2.5em #5d656c; box-shadow:0 0 2.5em #5d656c; font:1em/1.7 'Helvetica Neue', Helvetica, Arial, sans-serif; min-height:100%; }
4+
5+
code { font-family:Consolas, Courier New, monospace; }
6+
pre { background:#0d152a; margin:1em 0; padding:.5em 20px; overflow-x:scroll; -webkit-overflow-scrolling:touch; }
7+
pre.intro { font-size:1.2em; }
8+
pre::-webkit-scrollbar { height:8px; }
9+
pre::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.8); -webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.5); -webkit-border-radius:10px; border-radius:10px; }
10+
pre::-webkit-scrollbar-thumb:window-inactive { background:rgba(255,255,255,0.4); }
11+
12+
pre, h1 span { color:#ddd; }
13+
h1, h2, h3, h4, p, ul, ol { font-weight:normal; padding:0 20px; word-wrap:break-word; }
14+
hgroup h1 { display:inline; }
15+
hgroup h2 { font-size:1.38em; }
16+
h2, h3, h4 { margin:0 0 .5em; }
17+
h4 { font-weight:bold; }
18+
19+
a { color:#222; border-bottom:1px solid #ddd; text-decoration:none; }
20+
a:hover, a:focus { border-color:#222; }
21+
a img { border:0; }
22+
23+
abbr[title] { border-bottom:1px dotted #ddd; cursor:help; }
24+
hr { display:none; }
25+
p { margin-bottom:1em; }
26+
ul, ol { margin-left:2em; }
27+
ul ul, ol ol { margin-left:1em; padding:0; }
28+
footer { display:block; background:#eee; padding:1em 0 1em 0; text-align:center; }
29+
30+
.a-img { border:0; }
31+
.a-img img { padding:.5em 0 0 0; }
32+
.description { word-wrap:break-word; }
33+
.multiline-items li { padding-bottom:1em; }
34+
.multiline-items li.last-item { padding-bottom:0; }
35+
36+
/* syntax highlighting */
37+
.br0 { color:#090; }
38+
.co1 { color:#060; }
39+
.co2 { color:#096; }
40+
.kw1, .kw3 { color:#006; }
41+
.kw2 { color:#036; }
42+
.me1 { color:#606; }
43+
.nu0 { color:#c00; }
44+
.st0 { color:#36c; }
45+
.sy0 { color:#393; font-weight:bold; }
46+
47+
pre .co1 { color:#aeaeae; }
48+
.es0, pre .st0 { color:#61ce3c; }
49+
pre .co2 { color:#fff; }
50+
pre .nu0, pre .kw2, pre .kw3 { color:#fbde2d; }
51+
pre .me1 { color:#8da6ce; }
52+
pre .br0, pre .sy0, pre .kw1 { color:#ddd; }
53+
54+
#docs { background:#fff; }
55+
#docs body { font-size:.85em; width:100%; }
56+
#docs a.alias { opacity:.5; }
57+
#docs div div div { border:1px solid #d3d3d3; border-top:0; margin:0 .5em 1em .5em; }
58+
#docs h1, #docs h2, #docs h3, #docs h4, #docs p,#docs ul, #docs ol { padding:0 10px; }
59+
#docs pre { margin:0; padding:.5em 10px; }
60+
#docs ul li { list-style-type:none; margin:0 0 0 -.9em; }
61+
#docs h1 { padding:0 10px; }
62+
#docs h2 { margin:.5em 0 0 0; }
63+
#docs h3 { background:#6d426d; box-shadow:0 .25em .5em #d3d3d3; border-top:1px solid #d3d3d3; border-bottom:1px solid #d3d3d3; margin:.5em 0; padding:.75em 0 .75em 10px; position:relative; }
64+
#docs h3 > code { color:#eee; }
65+
#docs h3 a { position:absolute; top:0; }
66+
#docs h3 .br0 { color:#fc83ff; }
67+
#docs h3 .kw2 { color:#71d0c9; }
68+
#docs h3 .me1 { color:#fff; }
69+
#docs h3 .nu0 { color:#d0cb71; }
70+
#docs h3 .sy0 { color:#df74e2; font-weight:bold; }
71+
#docs footer { height:3em; margin-top:1.5em; width:100%; }
72+
73+
/* social */
74+
#social { height:20px; }
75+
#social .twitter-follow-button { width:127px !important; }
76+
#social .twitter-follow-button, .twitter-share-button { font-size:.8em; vertical-align:top; }
77+
78+
/* small viewports */
79+
@media (max-width:959px) {
80+
body { border:0; margin:0; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; width:auto; }
81+
h1, h2, h3, h4, p, ul, ol { padding:0 10px; }
82+
pre { padding:5px 10px !important; }
83+
#social { height:auto; }
84+
.toc-container a { display:block; padding:5px; }
85+
.toc-container a:hover, .toc-container a:focus { background-color:#EEE; }
86+
.toc-container a:active { background-color:#CCC; }
87+
}
88+
89+
/* large viewports */
90+
@media (min-width:960px) {
91+
#docs body { box-shadow:none; height:100%; margin:0; }
92+
#docs a[href="#docs"], #docs footer { display:none; }
93+
#docs h1 { position:fixed; background-color: #fff; top:0; left:0; right:0; z-index:1; }
94+
#docs h3 a { display:block; position:relative; visibility:hidden; top:-4em; /* equal to negative of (.doc-container padding-top) + (h3 margin-top) */ }
95+
#docs .toc-container { background:#fff; bottom:0; left:0; overflow-y:scroll; overflow-x:hidden; position:fixed; top:3.5em; white-space:nowrap; width:20%; -webkit-overflow-scrolling:touch; }
96+
#docs .toc-container h2, #docs .toc-container ul { margin-top:0; padding:0 10px; }
97+
#docs .doc-container { background:#fff; width:80%; margin-left:20%; padding-top:3.5em; }
98+
#docs .doc-container .first-heading { margin-top:0; }
99+
}
100+
101+
/* avoid `position:fixed` for IE mobile */
102+
@media (-ms-high-contrast:active) and (max-width:1280px), (-ms-high-contrast:none) and (max-width:1280px) {
103+
#docs .toc-container, #docs .doc-container { position:relative; top:auto; width:100%; }
104+
#docs .doc-container .first-heading { margin-top:.5em; }
105+
#docs a[href="#docs"] { display:inline; }
106+
#docs footer { display:block; }
107+
}
108+
109+
@media (orientation: portrait) and (min-device-width: 720px) and (max-device-width: 768px), (orientation: landscape) and (device-width: 1280px) and (max-device-height: 768px) {
110+
@-ms-viewport { width:80%; }
111+
}

assets/js/html5.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0