Browse Source

More style and layout tweaking

master
Chris Smith 4 years ago
parent
commit
66c9596813
Signed by: Chris Smith <chris@chameth.com> GPG Key ID: 3A2D4BBDC4A3C9A9

+ 9
- 0
site/assets/style/_colours.sass View File

@@ -17,3 +17,12 @@ $update-background: $light-green
17 17
 
18 18
 $code-border: $light-gray
19 19
 $code-background: $lightest-gray
20
+
21
+$link-color: #1d78bd
22
+$link-underline-color: lighten($link-color, 25%)
23
+
24
+$visited-link-color: #6a4c96
25
+$visited-link-underline-color: lighten($visited-link-color, 25%)
26
+
27
+$active-link-color: darken($link-color, 25%)
28
+$active-link-underline-color: darken($link-color, 25%)

+ 2
- 0
site/assets/style/_fonts.sass View File

@@ -2,6 +2,8 @@
2 2
 
3 3
 $font-dir: '/res/fonts/'
4 4
 $text-font: 'Source Sans Pro'
5
+$header-font: 'League Spartan'
6
+$fa-font: 'FontAwesome'
5 7
 
6 8
 // Provides src properties for woff2 and woff font files.
7 9
 @mixin woff-font-src($file-name)

+ 36
- 7
site/assets/style/modules/_articles.sass View File

@@ -1,15 +1,13 @@
1 1
 // Deals with article-specific layouts
2 2
 
3
+@import ../colours
4
+
3 5
 article
4 6
 
5 7
   & + article
6
-    padding-top: 100px
7
-    border-top: 10px solid rgba(200, 200, 200, 0.3)
8
-    margin-top: 100px
9
-
10
-    @media screen and (max-width: 1800px)
11
-      padding-top: 50px
12
-      margin-top: 50px
8
+    padding-top: 50px
9
+    border-top: 4px double $gray
10
+    margin-top: 50px
13 11
 
14 12
   header p
15 13
     position: relative
@@ -20,3 +18,34 @@ article
20 18
 
21 19
   img
22 20
     max-width: 100%
21
+
22
+  p a
23
+    color: $link-color
24
+    text-decoration-color: $link-underline-color
25
+    text-decoration-skip-ink: auto
26
+    font-weight: bold
27
+    transition: all 0.1s linear
28
+
29
+    &:visited
30
+      color: $visited-link-color
31
+      text-decoration-color: $visited-link-underline-color
32
+
33
+    &:hover, &:focus
34
+      color: $active-link-color
35
+      text-decoration-color: $active-link-underline-color
36
+
37
+.readmore
38
+  text-align: right
39
+
40
+  a
41
+    display: inline-block
42
+    background-color: $dark-gray
43
+    border-radius: 2em
44
+    color: #fff
45
+    padding: 0.5em 2em
46
+    text-decoration: none
47
+    transition: background-color 0.1s linear
48
+
49
+
50
+    &:hover
51
+      background-color: $cyan

+ 2
- 0
site/assets/style/modules/_blockquotes.sass View File

@@ -1,5 +1,7 @@
1 1
 // Blockquotes
2 2
 
3
+@import ../colours
4
+
3 5
 blockquote
4 6
   border-left: solid 6px $light-gray
5 7
   font-style: italic

+ 3
- 1
site/assets/style/modules/_fontawesome.sass View File

@@ -1,5 +1,7 @@
1 1
 // Font awesome, used for icons in the header
2 2
 
3
+@import ../fonts
4
+
3 5
 .fa-key:before
4 6
   content: '\e800'
5 7
 
@@ -19,7 +21,7 @@
19 21
 
20 22
 .fa
21 23
   display: inline-block
22
-  font: normal normal normal 14px/1 FontAwesome
24
+  font: normal normal normal 14px/1 $fa-font
23 25
   text-rendering: auto
24 26
   -webkit-font-smoothing: antialiased
25 27
   -moz-osx-font-smoothing: grayscale

site/assets/style/_general.sass → site/assets/style/modules/_general.sass View File

@@ -1,3 +1,7 @@
1
+// General elements and overall layout
2
+
3
+@import colours
4
+
1 5
 body
2 6
   background: #ffffff
3 7
   min-width: 400px

+ 4
- 1
site/assets/style/modules/_headings.sass View File

@@ -1,9 +1,12 @@
1 1
 // Header elements (h1..h6)
2 2
 
3
+@import ../colours
4
+@import ../fonts
5
+
3 6
 h1, h2, h3, h4, h5, h6
4 7
   color: $darkest-gray
5 8
   font-weight: 800
6
-  font-family: "League Spartan", sans-serif
9
+  font-family: $header-font, sans-serif
7 10
   line-height: 1.5em
8 11
   margin: 0 0 1em 0
9 12
 

site/assets/style/_reset.sass → site/assets/style/modules/_reset.sass View File


+ 2
- 0
site/assets/style/modules/_tables.sass View File

@@ -1,5 +1,7 @@
1 1
 // Basic tables
2 2
 
3
+@import ../colours
4
+
3 5
 .table-wrapper
4 6
   -webkit-overflow-scrolling: touch
5 7
   overflow-x: auto

site/assets/style/_text.sass → site/assets/style/modules/_text.sass View File

@@ -1,5 +1,8 @@
1 1
 // Properties relating to text
2 2
 
3
+@import colours
4
+@import fonts
5
+
3 6
 body
4 7
   color: $text
5 8
   font-family: $text-font, Helvetica, sans-serif

+ 2
- 0
site/assets/style/modules/_updates.sass View File

@@ -1,5 +1,7 @@
1 1
 // Blocks used to describe updates to posts
2 2
 
3
+@import ../colours
4
+
3 5
 aside.update
4 6
   display: block
5 7
   border-left: solid 10px $update-border

+ 3
- 5
site/assets/style/style.sass View File

@@ -1,17 +1,15 @@
1
-@import fonts
2
-@import reset
3
-@import colours
4
-@import general
5
-@import text
1
+@import modules/reset
6 2
 
7 3
 @import modules/articles
8 4
 @import modules/blockquotes
9 5
 @import modules/code
10 6
 @import modules/figures
11 7
 @import modules/fontawesome
8
+@import modules/general
12 9
 @import modules/header
13 10
 @import modules/headings
14 11
 @import modules/hire
15 12
 @import modules/lists
16 13
 @import modules/tables
14
+@import modules/text
17 15
 @import modules/updates

+ 1
- 1
site/layouts/partials/list.html View File

@@ -8,7 +8,7 @@
8 8
     </div>
9 9
   </header>
10 10
   {{ .Summary }}
11
-  <footer>
11
+  <footer class="readmore">
12 12
     <a href="{{ .RelPermalink }}">Read more &raquo;</a>
13 13
   </footer>
14 14
 </article>

Loading…
Cancel
Save