Skip to content

Commit 1676f98

Browse files
author
Alban Bailly
committed
base typography
1 parent ff9e9fa commit 1676f98

File tree

6 files changed

+102
-23
lines changed

6 files changed

+102
-23
lines changed

themes/linode-hugo-base-theme/gulpfile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const cssnano = require('cssnano');
1010
const stylelint = require('stylelint');
1111
const reporter = require('postcss-reporter');
1212

13+
const tailwind = 'tailwind.js';
1314
const mainCss = './srcCSS/main.css';
1415
const css = './srcCSS/**/*.css';
1516
const html = './layouts/**/*.html'
@@ -60,5 +61,9 @@ gulp.task('watch:html', () => {
6061
gulp.watch(html, ['compile']);
6162
});
6263

64+
gulp.task('watch:tailwind', () => {
65+
gulp.watch(tailwind, ['compile']);
66+
});
67+
6368
gulp.task('default', ['lint', 'compile', 'cssInfo']);
64-
gulp.task('watch', ['compile', 'watch:css', 'watch:html']);
69+
gulp.task('watch', ['compile', 'watch:css', 'watch:html', 'watch:tailwind']);

themes/linode-hugo-base-theme/layouts/_default/summary.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ <h2>
77
{{ partial "2_molecules/post-categories" . }}
88
</header>
99
{{ .Summary }}
10-
<p></p>
10+
<hr>
1111
<a href="{{ .RelPermalink }}">Read More</a>
1212
</article>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<link href="https://fonts.googleapis.com/css?family=Lato:400,600,700|Source+Code+Pro:500" rel="stylesheet" type="text.css">
1+
<link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i" rel="stylesheet">

themes/linode-hugo-base-theme/srcCSS/components/0_utilities/typography.css

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
body {
2+
@apply font-sans;
3+
line-height: var(--line-height);
4+
font-size: var(--body-font-size);
5+
-webkit-font-smoothing: antialiased;
6+
}
7+
8+
h1, h2, h3, h4, h5, h6 {
9+
@apply font-sans;
10+
font-weight: var(--heading-font-weight);
11+
line-height: var(--heading-line-height);
12+
margin-top: var(--heading-margin-top);
13+
margin-bottom: var(--heading-margin-bottom);
14+
}
15+
16+
p {
17+
margin-top: var(--paragraph-margin-top);
18+
margin-bottom: var(--paragraph-margin-bottom);
19+
}
20+
21+
dl, ol, ul {
22+
margin-top: var(--list-margin-top);
23+
margin-bottom: var(--list-margin-bottom);
24+
}
25+
26+
pre, code, samp {
27+
@apply font-mono;
28+
font-size: var(--pre-font-size);
29+
}
30+
31+
pre {
32+
margin-top: var(--pre-margin-top);
33+
margin-bottom: var(--pre-margin-bottom);
34+
overflow-x: scroll;
35+
}
36+
37+
h1 { font-size: var(--h1) }
38+
h2 { font-size: var(--h2) }
39+
h3 { font-size: var(--h3) }
40+
h4 { font-size: var(--h4) }
41+
h5 { font-size: var(--h5) }
42+
h6 { font-size: var(--h6) }
43+
44+
blockquote {
45+
line-height: 1.5rem;
46+
margin-top: 1.5rem;
47+
margin-bottom: 1.5rem;
48+
}
49+
50+
table {
51+
margin-top: 1.5rem;
52+
border-spacing: 0px;
53+
border-collapse: collapse;
54+
}
55+
56+
table td,
57+
table th {
58+
padding: 0;
59+
line-height: 33px;
60+
}
61+
62+
code {
63+
vertical-align: bottom;
64+
}
65+
66+
.lead {
67+
font-size: 1.414rem;
68+
}
69+
70+
.hug {
71+
margin-top: 0;
72+
}
73+
174
a {
275
@apply text-l-green;
376
text-decoration: none;
@@ -7,4 +80,22 @@ a:hover,
780
a:visited,
881
a:active {
982
text-decoration: underline;
83+
}
84+
85+
:root {
86+
--body-font-size: 1rem;
87+
--line-height: 1.5;
88+
--heading-font-weight: 700;
89+
--heading-line-height: 1.25;
90+
/* PLEASE USE A MODULAR SCALE SUCH AS: http://www.modularscale.com */
91+
--h1: 2.441rem;
92+
--h2: 1.953rem;
93+
--h3: 1.25rem;
94+
--h4: 1rem;
95+
--h5: .8rem;
96+
--h6: .64rem;
97+
--paragraph-margin-top: 1.5rem;
98+
--paragraph-margin-bottom: 0;
99+
--heading-margin-top: 1.5rem;
100+
--heading-margin-bottom: 0;
10101
}

themes/linode-hugo-base-theme/static/assets/css/main.css

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

themes/linode-hugo-base-theme/tailwind.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ let colors = {
4848
'l-green': '#1AB15C',
4949
'l-nav-grey': '#a6a6a6',
5050

51+
// Standard Colors
5152
'transparent': 'transparent',
5253

5354
'black': '#22292f',
@@ -199,28 +200,10 @@ module.exports = {
199200

200201
fonts: {
201202
'sans': [
202-
'system-ui',
203-
'BlinkMacSystemFont',
204-
'-apple-system',
205-
'Segoe UI',
206-
'Roboto',
207-
'Oxygen',
208-
'Ubuntu',
209-
'Cantarell',
210-
'Fira Sans',
211-
'Droid Sans',
212-
'Helvetica Neue',
203+
'Lato',
213204
'sans-serif',
214205
],
215206
'serif': [
216-
'Constantia',
217-
'Lucida Bright',
218-
'Lucidabright',
219-
'Lucida Serif',
220-
'Lucida',
221-
'DejaVu Serif',
222-
'Bitstream Vera Serif',
223-
'Liberation Serif',
224207
'Georgia',
225208
'serif',
226209
],

0 commit comments

Comments
 (0)