Skip to content

Commit 05fb4cb

Browse files
committed
adding just the styling for header update
1 parent 3157980 commit 05fb4cb

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

lib/get-mini-toc-items.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const cheerio = require('cheerio')
22
const { range } = require('lodash')
33

4-
module.exports = function getMiniTocItems (html, maxHeadingLevel = 3, headingScope = '') {
4+
module.exports = function getMiniTocItems (html, maxHeadingLevel = 2, headingScope = '') {
55
const $ = cheerio.load(html, { xmlMode: true })
66

77
// eg `h2, h3` or `h2, h3, h4` depending on maxHeadingLevel

middleware/render-page.js

-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ module.exports = async function renderPage (req, res, next) {
7676
)
7777
)
7878
}
79-
8079
if (req.method === 'HEAD') {
8180
return res.status(200).end()
8281
}
@@ -141,7 +140,6 @@ module.exports = async function renderPage (req, res, next) {
141140

142141
// collect URLs for variants of this page in all languages
143142
context.page.languageVariants = Page.getLanguageVariants(req.path)
144-
145143
// Stop processing if the connection was already dropped
146144
if (isConnectionDropped(req, res)) return
147145

script/content-migrations/update-headers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const re = /^#.*\n/gm
1515

1616
async function updateMdHeaders (dir) {
1717
walk(dir, { includeBasePath: true, directories: false })
18-
.filter(file => !file.endsWith('README.md'))
18+
.filter(file => !file.endsWith('README.md') && !file.includes('content/rest/reference'))
1919
.forEach(file => {
2020
fs.readFile(file, 'utf8', (err, data) => {
2121
if (err) return console.error(err)

stylesheets/headings.scss

+20-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
h1,
22
h2,
3-
h3,
4-
h4 {
3+
h3 {
54
a {
65
color: var(--color-auto-gray-9);
76
}
87
}
98

10-
// all h3 headers that are links should be blue-500
11-
h3 a {
9+
// all h2 headers that are links should be blue-500
10+
h2 a {
1211
color: var(--color-auto-blue-5);
1312
}
1413

1514
// ... except those on each product's toc
16-
.product-landing h3 a {
15+
.product-landing h2 a {
1716
color: var(--color-auto-gray-9);
1817
}
1918

@@ -22,12 +21,26 @@ h3 a {
2221
h2,
2322
h3,
2423
h4,
25-
h5,
26-
h6 {
24+
h5 {
2725
font-family: $font-mktg;
2826
font-weight: $font-weight-semibold;
2927
padding-top: $spacer-3;
3028
}
29+
h2 {
30+
font-size: 1.25em;
31+
border-bottom: none;
32+
}
33+
h3 {
34+
font-size: 1em;
35+
}
36+
37+
h4 {
38+
font-size: 0.875em;
39+
}
40+
41+
h5 {
42+
font-size: 0.85em;
43+
}
3144
}
3245

3346
// needs specificity to override

0 commit comments

Comments
 (0)