Skip to content

Commit 8f82f95

Browse files
committed
Added hasgrid.js & appropriate CSS (for grid testing), plus initial colorization and grid layout (still needs minor tweaking).
1 parent 3517e55 commit 8f82f95

File tree

4 files changed

+100
-4
lines changed

4 files changed

+100
-4
lines changed

css/advanced.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
width: 54em; /* 864px @ 16px */
3+
margin-left: auto;
4+
margin-right: auto;
5+
}

css/basic.css

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
1+
@import url('../css/advanced.css');
2+
@import url('../css/hashgrid.css');
3+
14
body {
25
font-family: Verdana, Arial, sans-serif;
36
padding: 1em;
4-
line-height: 1.5em;
7+
line-height: 1.5em; /* 24px @ 16px */
8+
}
9+
a:link {
10+
color: #1B1BB3;
11+
}
12+
a:visited {
13+
color: #7373D9;
14+
}
15+
a:link:hover, a:visited:hover, a:active:hover {
16+
color: #FFBF00;
17+
}
18+
p, dt, dd {
19+
margin-top: 1.5em; /* 24px @ 16px */
20+
margin-bottom: 1.5em;
21+
padding: 0 1.5em;
522
}
623
h1, h2, h3, h4, h5, h6 {
724
font-family: "Gill Sans", sans-serif;
825
font-weight: normal;
26+
color: #1B1BB3;
927
}
1028
h1 {
11-
background-color: #CCC;
29+
font-size: 2em; /* 32px @ 16px */
30+
line-height: 1.5em; /* 48px @ 32px */
1231
margin-top: 0;
13-
line-height: 1.5em;
32+
margin-bottom: 0.75em; /* 24px @ 32px */
33+
padding-left: 0.75em;
34+
padding-right: 0.75em;
35+
background-color: #FFBF00;
1436
}
1537
h2, h3, h4, h5 {
16-
background-color: #EEE;
38+
background-color: #CCC;
1739
text-transform: uppercase;
1840
}
41+
h2 {
42+
font-size: 1.5em; /* 24px @ 16px */
43+
line-height: 2em; /* 48px @ 16px */
44+
margin-top: 1em; /* 24px @ 24px */
45+
margin-bottom: 1em;
46+
padding-left: 1em;
47+
padding-right: 1em;
48+
}

css/hashgrid.css

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
* Grid
3+
*/
4+
#grid{
5+
6+
/* Dimensions - same width as your grid with gutters */
7+
width: 864px;
8+
9+
/* Grid (left-aligned)
10+
position: absolute;
11+
top: 0;
12+
left: 0;
13+
*/
14+
15+
/* Grid (centered) */
16+
position: absolute;
17+
top: 0;
18+
left: 50%;
19+
margin-left: -432px;
20+
21+
}
22+
23+
/**
24+
* Vertical grid lines
25+
*
26+
* Set the column width taking the borders into consideration,
27+
* and use margins to set column gutters.
28+
*/
29+
#grid div.vert{
30+
31+
width: 143px;
32+
border: solid darkturquoise;
33+
border-width: 0 1px;
34+
margin-right: 23px;
35+
36+
}
37+
38+
#grid div.vert.first-line{
39+
40+
margin-left: 23px;
41+
42+
}
43+
44+
45+
/**
46+
* Horizontal grid lines, defined by your base line height
47+
*
48+
* Remember, the CSS properties that define the box model:
49+
* visible height = height + borders + margins + padding
50+
*/
51+
#grid div.horiz{
52+
53+
/* 24px line height */
54+
height: 23px;
55+
border-bottom: 1px dotted darkgray;
56+
margin: 0;
57+
padding: 0;
58+
59+
}

index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<head>
44
<title>NewtonScript</title>
55
<link rel="stylesheet" type="text/css" href="css/basic.css">
6+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
7+
<script type="text/javascript" src="https://rawgithub.com/dotjay/hashgrid/v8/hashgrid.js"></script>
68
</head>
79
<body>
810
<h1>NewtonScript</h1>

0 commit comments

Comments
 (0)