Skip to content

Commit e19d50b

Browse files
committed
Move inline CSS to pack.css
Inline CSS is hard to manage, so let's move it elsewhere. To prepare for migrating also the home page to Hugo, let's make that inline CSS contingent on <body> having the `page` class. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 99c2ced commit e19d50b

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

assets/sass/style.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,3 +349,16 @@ div.version {
349349
.stud {
350350
clear: both;
351351
}
352+
body.page {
353+
color: #FFF;
354+
355+
h1 {
356+
text-align: center;
357+
}
358+
359+
article p,h3,ul {
360+
margin-left: auto;
361+
margin-right: auto;
362+
width: 65%;
363+
}
364+
}

layouts/_default/baseof.html

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,13 @@
99
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
1010
{{- $style := resources.Get "sass/pack.scss" | resources.ExecuteAsTemplate "pack.scss" . | css.Sass | resources.Minify }}
1111
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
12-
<style type="text/css">
13-
body {
14-
color: #FFF;
15-
}
16-
17-
h1 {
18-
text-align: center;
19-
}
20-
21-
article p,h3,ul {
22-
margin-left: auto;
23-
margin-right: auto;
24-
width: 65%;
25-
}
26-
</style>
2712
<link rel="shortcut icon" href="favicon.ico">
2813
<!--[if lt IE 9]>
2914
<script src="js/html5shiv.js"></script>
3015
<script src="js/respond.js"></script>
3116
<![endif]-->
3217
</head>
33-
<body>
18+
<body class="page">
3419
{{- partial "footer" . -}}
3520
<section class="details">
3621
<article>

0 commit comments

Comments
 (0)