add my research page; make its links absolute; tune spacing
[web.git] / style.scss
index 0fa1fa77e82b530a5b27e1e8e1389f0d0fd344b3..2539cd007380f7b621db833c10a30cefad237076 100644 (file)
@@ -3,16 +3,46 @@ hide: true
 ---
 @charset "utf-8";
 
+/* Variables */
+$navi-width:      11em;
+$navi-indent:     1.2em;
+$frame-max-width: 50em;
+$intrusion-width: 1.0em;
+$outer-margin:    0.8em;
+$full-content-width: $frame-max-width + $navi-width + 2*$outer-margin + $intrusion-width;
+
+$background-color:       white;
+$text-color:             #313131;
+$light-text-color:       #808080;
+$code-background-color:  #F7F7F7;
+$link-color:             #268BD2;
+
 /* General Fonts */
 html, body, div, p {
     font-family: DejaVu Sans, Verdana, Arial, sans-serif;
     font-size: 12pt;
+    color: $text-color;
+}
+/* Links */
+a {
+    text-decoration: none;
+    color: $link-color;
+}
+a:hover, a:focus {
+    text-decoration: underline;
 }
 /* Header Size & Spacing */
+h1, h2, h3, h4 {
+    color: $text-color;
+
+    a {
+        color: $text-color;
+    }
+}
 h1 {
     margin-top: 0.1em;
     font-size: 200%;
-    margin-bottom: 0.4em;
+    margin-bottom: 0.5em;
 }
 h2 {
     margin-top: 0.5em;
@@ -31,47 +61,26 @@ h4 {
 }
 
 /* Layout and Color stuff */
-$navi-width:      11em;
-$navi-indent:     1.2em;
-$frame-max-width: 50em;
-$intrusion-width: 0.8em;
-$outer-margin:    0.8em;
-$full-content-width: $frame-max-width + $navi-width + 2*$outer-margin + $intrusion-width;
-
-$frame-color: #121212;
-$title-color: #08f;
-$navi-color: #36ff00;
-$current-color: #ffa700;
-$background-color: white;
-$text-color:             #313131;
-$code-background-color: #505050;
-$light-text-color:       #888;
-$link-color: #268BD2;
-
 
 /* General page structure */
 body { /* This centers us in the page, and handles the "too wide" case */
     padding: 0;
     margin: 0 auto;
-    color: $text-color;
     background-color: $background-color;
     max-width: calc(#{$full-content-width + $navi-width} + 1px); /* add the right-hand "navi" for centering - and the border... ;-) */
 }
 #-frame { /* Add a frame, full height */
     margin: 0 $navi-width;
-    padding-top: 1em;
+    padding-top: $outer-margin;
     border-left: solid $text-color 1px;
-    min-height: calc(100vh);
+    min-height: calc(100vh - #{$outer-margin});
 }
 
 /* The content of the frame */
-#-title h1 {
-    margin: 0;
-}
 #-content {
     margin-left: $intrusion-width;
     padding: $outer-margin;
-    padding-top: 1px; /* If we use 0 here, things get ugly. What?!? */
+    padding-top: 1px; /* If we use 0 here, some paddings add up things get ugly. What?!? */
 }
 
 /* Navigation menu */
@@ -102,26 +111,20 @@ body { /* This centers us in the page, and handles the "too wide" case */
         /* Always have a border, for the width to stay constant */
         border: solid transparent 1px;
     
-        color: $link-color;
         font-size:110%;
-        text-decoration: none;
         text-align: left;
     }
     a.current {
-        padding-top: 0.1em;
-        margin:  0.05em 0;
+        padding: 0.05em 0.1em;
         border: solid $text-color 1px;
         border-right: solid $background-color 1px;
         background-color: $background-color;
     }
     a.root {
-        margin-top: 0.5em;
+        margin-top: 0.7em;
         border-bottom: solid $text-color 1px;
         margin-bottom: 0.3em;
     }
-    a:hover, a:focus {
-        text-decoration: underline;
-    }
 }
 
 /* Medium-size screens */
@@ -132,7 +135,7 @@ body { /* This centers us in the page, and handles the "too wide" case */
 }
 
 /* Small screens */
-@media screen and (max-width:#{ $frame-max-width } ) {
+@media screen and (max-width:#{ $frame-max-width + 2*$outer-margin } ) {
     body, #-frame, #-title, #-content, #-navi {
         margin: 0;
         padding: 0;
@@ -203,33 +206,49 @@ body { /* This centers us in the page, and handles the "too wide" case */
 
 /* Content styling */
 #-content {
-    .subtitle .side {
+    .side {
         float: right;
         color: $light-text-color;
     }
 
-    code {
-        padding: 0.1em 0.2em;
+    #-pretitle, .subtitle {
+        margin-bottom: 1em;
+
+        h1 {
+            display: inline-block;
+            font-size: 165%;
+        }
+        .side {
+            margin-left: 0.5em;
+            margin-top: 0.9em;
+        }
+    }
+    .subtitle {
+        margin-top: 2em;
+    }
+
+    #-title {
+        clear: both;
+    }
+
+    pre, code {
+        background-color: $code-background-color;
         font-family: monospace;
         font-size: 82%;
     }
+    code {
+        padding: 0.1em 0.2em;
+    }
     pre {
         padding: 0.6em;
     }
     pre code {
-        background-color: $code-background-color;
         padding: 0;
+        font-size: 100%;
     }
 
     p {
         margin: 0.5em 0;
         line-height: 1.3;
     }
-    a {
-        text-decoration: none;
-        color:$link-color;
-    }
-    a:hover, a:focus {
-        text-decoration: underline;
-    }
 }