Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/blankoworld/hugo_theme_adam_eve.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier DOSSMANN <git@dossmann.net>2018-02-26 20:35:30 +0300
committerOlivier DOSSMANN <git@dossmann.net>2018-02-26 20:35:30 +0300
commit2b0a47ebbaaa03537540371e6151f9c649fd90d1 (patch)
tree73171ff3bba0482416c708fabfb922339ccf5320
parente2a221b27c9a6da2694a6c02c0b35e640460222a (diff)
CSS: Chapter numerotation
-rw-r--r--static/css/main.css35
1 files changed, 34 insertions, 1 deletions
diff --git a/static/css/main.css b/static/css/main.css
index 6d46521..6ff94be 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -4,11 +4,19 @@ a:active, a:link, a:visited, a:hover {
text-decoration: none;
}
-h1, h2, h3, h4, h5, h6 {
+h1 {
text-align: left;
color: #e52c5a;
}
+h2 {
+ margin-left: 7px;
+}
+
+h3, h4, h5, h6 {
+ margin-left: 15px;
+}
+
h1#site_title {
text-align: center;
color: black;
@@ -112,6 +120,31 @@ div.normal {
background-image: url("/img/note.png");
}
+/* CSS counter for chapters/sections */
+body {
+ counter-reset: chapter;
+}
+
+h2:before {
+ counter-increment: chapter;
+ content: counter(chapter) ". ";
+}
+
+h1 {
+ counter-reset: chapter;
+}
+
+h2 {
+ counter-reset: section;
+}
+
+h3:before {
+ counter-increment: section;
+ content: counter(chapter) "." counter(section) " ";
+
+}
+
+/* For big displays/screens */
@media (min-width: 960px) {
html, body {
width: 960px;