Skip to content

Commit 67e2fbe

Browse files
committed
sticky header, and hidden offsets for headers
1 parent 46f4c71 commit 67e2fbe

4 files changed

Lines changed: 40 additions & 23 deletions

File tree

assets/_sass/styles.scss

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ h1 {
6161

6262
h2, h3, h4, h5, h6 {
6363
margin-top: 2em;
64+
line-height: 1.2em;
65+
}
66+
67+
h2:before {
68+
content: '';
69+
display: block; position: relative;
70+
width: 0; height: 4em;
71+
margin-top: -4em;
6472
}
6573

6674
/* todo: errrr */
@@ -135,18 +143,15 @@ aside {
135143
/* Layout */
136144

137145
/* offset the fixed position header for jump links */
138-
article:before {
139-
display: block;
140-
content: "";
141-
height: 60px;
142-
margin: -60px 0 0;
143-
}
144146

145147
header {
146148
background-color: $header;
147149
padding: 1.5em;
148150
color: $white;
149151

152+
position: fixed;
153+
width: 100%;
154+
150155
h1 a,
151156
h1 a:link,
152157
h1 a:visited {
@@ -227,16 +232,19 @@ pre {
227232
}
228233

229234
.wrap {
235+
230236
}
231237

232238
aside {
233239
@include span-columns(3.25);
240+
margin-top: 80px;
234241
}
235242

236243
article {
237244
@include shift(0.25);
238245
@include span-columns(8);
239246
margin-bottom: 20px;
247+
margin-top: 80px;
240248
}
241249

242250
@media screen and (max-width: 40.5em) {
@@ -248,6 +256,7 @@ article {
248256
article {
249257
@include span-columns(12);
250258
padding-left: 5px;
259+
margin-top: 0px;
251260
}
252261

253262
}

assets/css/styles.css

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

assets/css/styles.css.map

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

pages/mixed-content.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In Chrome, a website indicator for passive mixed content looks like this:
1818

1919
![fedramp in chrome](/assets/images/mixed-content.png)
2020

21-
### Migration strategy
21+
## Migration strategy
2222

2323
Every website's mixed content situation will be different, but the general approach is:
2424

@@ -29,7 +29,7 @@ Every website's mixed content situation will be different, but the general appro
2929

3030
Note: the below instructions use tools **optimized for an OS X or Linux environment**. Documentation for Windows-based tools would be a welcome contribution to this guide.
3131

32-
### Linking to resources securely
32+
## Linking to resources securely
3333

3434
Most commonly used third party services, such as Google Analytics or AddThis, **will automatically adapt** when migrating to HTTPS.
3535

@@ -49,7 +49,7 @@ When migrating a site with a lot of user- or staff-submitted content (e.g. a blo
4949

5050
This is a great opportunity to improve your website's privacy and lessen your dependency on third parties, by copying those media files to your own server instead and hosting them yourself.
5151

52-
### Scanning your code
52+
## Scanning your code
5353

5454
After identifying and fixing the obvious issues, you can scan your website's files for leads. On a Mac or Linux-based system, `grep` is very handy:
5555

@@ -71,7 +71,7 @@ Finding links in JavaScript is more challenging, but you can look for all `http:
7171
grep -r "http:" | grep -v "](http:"
7272

7373

74-
### Crawling your website
74+
## Crawling your website
7575

7676
[`mixed-content-scan`](https://github.com/bramus/mixed-content-scan) is a very handy command line tool that can crawl an `http://` or `https://` website to see if it contains any references to insecure resources. This is especially helpful if your content is primarily managed in a CMS.
7777

@@ -98,7 +98,7 @@ Any discovered mixed content will be listed as a `WARNING`. You can also get the
9898
mixed-content-scan https://https.cio.gov --format=json
9999
```
100100

101-
### Why do browsers block mixed content?
101+
## Why do browsers block mixed content?
102102

103103
If mixed content were not blocked, an attacker could control the main website by conducting a MITM attack against any of its active resources.
104104

0 commit comments

Comments
 (0)