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
 
17
 
18
 $code-border: $light-gray
18
 $code-border: $light-gray
19
 $code-background: $lightest-gray
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
 
2
 
3
 $font-dir: '/res/fonts/'
3
 $font-dir: '/res/fonts/'
4
 $text-font: 'Source Sans Pro'
4
 $text-font: 'Source Sans Pro'
5
+$header-font: 'League Spartan'
6
+$fa-font: 'FontAwesome'
5
 
7
 
6
 // Provides src properties for woff2 and woff font files.
8
 // Provides src properties for woff2 and woff font files.
7
 @mixin woff-font-src($file-name)
9
 @mixin woff-font-src($file-name)

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

1
 // Deals with article-specific layouts
1
 // Deals with article-specific layouts
2
 
2
 
3
+@import ../colours
4
+
3
 article
5
 article
4
 
6
 
5
   & + article
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
   header p
12
   header p
15
     position: relative
13
     position: relative
20
 
18
 
21
   img
19
   img
22
     max-width: 100%
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
 // Blockquotes
1
 // Blockquotes
2
 
2
 
3
+@import ../colours
4
+
3
 blockquote
5
 blockquote
4
   border-left: solid 6px $light-gray
6
   border-left: solid 6px $light-gray
5
   font-style: italic
7
   font-style: italic

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

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

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

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

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

1
 // Header elements (h1..h6)
1
 // Header elements (h1..h6)
2
 
2
 
3
+@import ../colours
4
+@import ../fonts
5
+
3
 h1, h2, h3, h4, h5, h6
6
 h1, h2, h3, h4, h5, h6
4
   color: $darkest-gray
7
   color: $darkest-gray
5
   font-weight: 800
8
   font-weight: 800
6
-  font-family: "League Spartan", sans-serif
9
+  font-family: $header-font, sans-serif
7
   line-height: 1.5em
10
   line-height: 1.5em
8
   margin: 0 0 1em 0
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
 // Basic tables
1
 // Basic tables
2
 
2
 
3
+@import ../colours
4
+
3
 .table-wrapper
5
 .table-wrapper
4
   -webkit-overflow-scrolling: touch
6
   -webkit-overflow-scrolling: touch
5
   overflow-x: auto
7
   overflow-x: auto

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

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

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

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

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

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

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

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

Loading…
Cancel
Save