forked from cobyism/gridism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
260 lines (250 loc) · 8.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Gridism • a simple responsive CSS grid by @cobyism</title>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro|Montserrat:700|Open+Sans:300italic,400italic,700italic,400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="gridism.css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body class="wrap wider">
<header>
<div class="grid">
<div class="unit whole center-on-mobiles">
<h1><a href="http://cobyism.com/gridism">gridism.</a></h1>
<p class="lead">A simple responsive CSS grid by <a href="http://cobyism.com">@cobyism</a>.</p>
<p>
<a href="https://github.com/cobyism/gridism" class="button">View on GitHub</a>
<a href="https://github.com/cobyism/gridism/archive/gh-pages.zip" class="button hide-on-mobiles">Download</a>
</p>
</div>
</div>
</header>
<section class="instructions">
<div class="grid">
<div class="unit one-third">
<h2>Simple</h2>
<p>
Each <code>.grid</code> element is a horizontal row which can contain
<code>.unit</code> elements of various widths.
Width combinations are illustrated below.
</p>
</div>
<div class="unit one-third">
<h2>Responsive</h2>
<p>
Units get stacked on screens 568px or smaller.
Grids in a <code>.wrap</code> have maximum widths of 978px, or 1140px
with the addition of <code>.wider</code>.
</p>
</div>
<div class="unit one-third">
<h2>Easy</h2>
<p>
All units have even inner and outer gutters.
You can turn gutters off with <code>.no-gutters</code>.
There are also <a href="https://github.com/cobyism/gridism/blob/gh-pages/gridism.css">a few other</a> commonly needed classes.
</p>
</div>
</div>
</section>
<section class="demo">
<div class="grid">
<div class="unit whole">
<pre>.whole</pre>
</div>
</div>
<div class="grid">
<div class="unit half">
<pre>.half</pre>
</div>
<div class="unit half">
<pre>.half</pre>
</div>
</div>
<div class="grid">
<div class="unit one-third">
<pre>.one-third</pre>
</div>
<div class="unit two-thirds">
<pre>.two-thirds</pre>
</div>
</div>
<div class="grid">
<div class="unit one-quarter">
<pre>.one-quarter</pre>
</div>
<div class="unit three-quarters">
<pre>.three-quarters</pre>
</div>
</div>
<div class="grid">
<div class="unit one-fifth">
<pre>.one-fifth</pre>
</div>
<div class="unit four-fifths">
<pre>.four-fifths</pre>
</div>
</div>
<div class="grid">
<div class="unit two-fifths">
<pre>.two-fifths</pre>
</div>
<div class="unit three-fifths">
<pre>.three-fifths</pre>
</div>
</div>
<div class="grid">
<div class="unit golden-large">
<pre>.golden-large</pre>
</div>
<div class="unit golden-small">
<pre>.golden-small</pre>
</div>
</div>
<div class="grid">
<div class="unit one-quarter align-right center-on-mobiles">
<h2>Nested grids</h2>
<p>Nested grids also work, but the markup gets gnarly pretty quickly.</p>
</div>
<div class="unit three-quarters">
<div class="grid">
<div class="unit whole">
<p class="align-center">Gridception!</p>
</div>
</div>
<div class="grid">
<div class="unit one-third">
<pre>★</pre>
</div>
<div class="unit two-thirds">
<div class="grid">
<div class="unit whole">
<p class="align-center">Gridception!</p>
</div>
</div>
<div class="grid">
<div class="unit two-fifths">
<pre>★</pre>
</div>
<div class="unit three-fifths">
<pre>★</pre>
</div>
</div>
</div>
</div>
<div class="grid">
<div class="unit four-fifths">
<div class="grid">
<div class="unit whole">
<p class="align-center">Gridception!</p>
</div>
</div>
<div class="grid">
<div class="unit one-quarter">
<pre>★</pre>
</div>
<div class="unit one-quarter">
<pre>★</pre>
</div>
<div class="unit one-quarter">
<pre>★</pre>
</div>
<div class="unit one-quarter">
<pre>★</pre>
</div>
</div>
</div>
<div class="unit one-fifth">
<pre>★</pre>
</div>
</div>
</div>
</div>
</section>
<section class="usage">
<div class="grid">
<div class="unit whole">
<h2>Download</h2>
<p class="lead">You have two main options for using Gridism in your project.</p>
</div>
</div>
<div class="grid">
<div class="unit one-third">
<h3>A. Bower</h3>
<p>Gridism can be installed using the <a href="http://bower.io">Bower</a> package manager.</p>
<pre><code>bower install gridism</code></pre>
</div>
<div class="unit one-third">
<h3>B. Manual</h3>
<p><a href="https://github.com/cobyism/gridism/archive/gh-pages.zip">Download the ZIP</a>, extract the source code, and copy <code>gridism.css</code> into your project’s directory.</p>
</div>
<div class="unit one-third">
<h3>Elsewise</h3>
<p>Of course, you could also clone <a href="https://github.com/cobyism/gridism">the repository</a> using your terminal, or even add it as a <a href="http://git-scm.com/book/en/Git-Tools-Submodules">submodule</a> of your project.</p>
</div>
</div>
<div class="grid">
<div class="unit whole">
<h2>Installation</h2>
<p class="lead">Once you’ve acquired the Gridism source code, there’s a couple of other things you’ll probably want to do.</p>
</div>
</div>
<div class="grid">
<div class="unit whole">
<h3>1. Stylesheet</h3>
<p>Add the following stylesheet to the <code><head></code> section of your project’s HTML. If you didn’t use Bower, you may need to adjust the path to the CSS file to match your file structure.</p>
<pre><code><link rel="stylesheet" href="components/gridism/gridism.css"></code></pre>
</div>
</div>
<div class="grid">
<div class="unit whole">
<h3>2. Viewport</h3>
<p>Set the scale of your viewport to the width of the device. Placing the following tag in the <code><head></code> of your HTML ensures the viewport doesn’t load zoomed-out on mobiles and tablets.</p>
<pre><code><meta name="viewport" content="width=device-width,initial-scale=1"></code></pre>
</div>
</div>
</section>
<footer>
<div class="grid">
<div class="unit half">
<div class="center-on-mobiles">
<p>© Coby Chapple — All rights reserved.</p>
</div>
</div>
<div class="unit half">
<div class="align-right center-on-mobiles">
<p>This project is <a href="https://github.com/cobyism/gridism">open-source</a> and accepting pull requests. Fork at will.</p>
</div>
</div>
</div>
</footer>
<script type="text/javascript">
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '50ed90bdf5a1f50492000007');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-31312255-1']);
_gaq.push(['_setDomainName', 'cobyism.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>