Skip to content

Commit d137a55

Browse files
committed
docs: Use built in subtitle params
1 parent d977675 commit d137a55

File tree

3 files changed

+10
-23
lines changed

3 files changed

+10
-23
lines changed

docs/config/_default/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ enableGitInfo: false
1616
enableRobotsTXT: true
1717

1818
params:
19+
geekdocSubtitle: Learn once, run anywhere
1920
geekdocToC: 3
2021
geekdocLogo: './logo.png'
2122
geekdocRepo: 'https://github.com/emacs-eask/cli/'

docs/static/custom.css

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
}
2222

2323
.gdoc-brand__title {
24-
margin-top: 0.6rem;
24+
margin-top: 0.4rem;
25+
}
26+
27+
.gdoc-brand__subtitle {
28+
margin-top: 0.2rem;
29+
color: #B5B5B5;
30+
font-size: 1.0rem;
2531
}
2632

2733
/* Icons */
@@ -63,20 +69,13 @@
6369
}
6470
}
6571

66-
/* Custom */
67-
68-
._subtitle {
69-
color: #B5B5B5;
70-
font-size: 1.0rem;
71-
}
72-
7372
/*
7473
* Typewriter Effect
7574
*
7675
* Copied from https://css-tricks.com/snippets/css/typewriter-effect/
7776
*/
7877

79-
._subtitle {
78+
.gdoc-brand__subtitle {
8079
overflow: hidden;
8180
white-space: nowrap;
8281
animation:

docs/static/main.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
11
window.addEventListener('load', function () {
2-
var subtitle = document.getElementsByClassName("_subtitle");
3-
4-
// In case adding more than once!
5-
if (subtitle.length != 0)
6-
return;
7-
8-
// Place it here to avoid error: `Identifier 'xxx' has already been declared`.
9-
const quote = "Learn once, run anywhere";
10-
11-
const titles = document.getElementsByClassName("gdoc-brand__title");
12-
13-
const title = titles[0]
14-
15-
title.innerHTML += '<div class="_subtitle">' + quote + '</div>';
2+
// Code removed due to https://github.com/thegeeklab/hugo-geekdoc/pull/1003
163
});

0 commit comments

Comments
 (0)