-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SVG CSS Icons, Load Fonts in Separate css file
- Loading branch information
Showing
20 changed files
with
86 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,9 @@ js_bundle = "abridge-switcher.min.js"# Bundle JS File, comment out to disable (i | |
stylesheets = [ "abridge-switcher.css" ] # Orange Automatic Dark/Light Theme based on browser/system preference with switcher | ||
#stylesheets = [ "abridge-blue-switcher.css" ] # Blue Automatic Night/Light Theme based on browser/system preference with switcher | ||
#stylesheets = [ "abridge-blueshade-switcher.css" ] # BlueShade Automatic Night/Light Theme based on browser/system preference with switcher | ||
#stylesheets = [ "abridge-switcher.css", "myfont.css" ] # include your own font icons! | ||
#stylesheets = [ "abridge-switcher.css", "font.css" ] # include your own font! | ||
#stylesheets = [ "abridge-switcher.css", "iconfont.css" ] # include your own font icons! | ||
#stylesheets = [ "abridge-switcher.css", "font.css", "iconfont.css" ] # include your own font, and font icons! | ||
|
||
########## No Switcher ########## | ||
#js_bundle = "search.min.js"# Bundle JS File, comment out to disable (search only: no switcher/prestyle) | ||
|
@@ -144,13 +146,13 @@ favicon180 = "apple-touch-icon.png" # apple-touch-icon.png | |
favicon32 = "favicon-32x32.png" # favicon-32x32.png | ||
favicon16 = "favicon-16x16.png" # favicon-16x16.png | ||
|
||
icon_search = "svgs i-search" # Search button in search box. | ||
icon_adjust = "svgs i-adjust" # Theme Switcher button in top menu. (add class svgh to change colors on hover) | ||
icon_top = "svgs i-up" # Back to Top Button. | ||
icon_first = "svgs i-first" # Pagination First Page. | ||
icon_prev = "svgs i-prev" # Pagination Previous Page. | ||
icon_next = "svgs i-next" # Pagination Next Page. | ||
icon_last = "svgs i-last" # Pagination Last Page. | ||
icon_search = "svgs search" # Search button in search box. | ||
icon_adjust = "svgs adjust" # Theme Switcher button in top menu. (add class svgh to change colors on hover) | ||
icon_first = "svgs svgh angll" # Pagination First Page. | ||
icon_prev = "svgs svgh angl" # Pagination Previous Page. | ||
icon_next = "svgs svgh angr" # Pagination Next Page. | ||
icon_last = "svgs svgh angrr" # Pagination Last Page. | ||
icon_top = "svgs svgh angu" # Back to Top Button. | ||
|
||
# Uncomment below line to load fontawesome, eg: <i class="fa-solid fa-heart"></i> | ||
#fontawesome = "https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//@import "fonts/Abridge"; | ||
@import "fonts/Roboto"; | ||
//@import "fonts/Arimo"; | ||
//@import "fonts/Lato"; | ||
//@import "fonts/FiraCode"; // Monospaced |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,8 +80,9 @@ body { | |
} | ||
} | ||
footer{ | ||
line-height: var(--lhh); | ||
hr, p { | ||
margin: 0 0 .4rem | ||
margin: 0.1rem 0 .3rem | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,8 @@ | |
text-decoration: none; | ||
color: var(--c2); | ||
background: var(--a1); | ||
.svgh { | ||
background: var(--c2); | ||
opacity: 1; | ||
} | ||
} |
c2e4ff9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a couple motivations for moving away from using a woff2 icon font.
The first reason is it is one fewer request, the second reason is that users using noscript will see a somewhat broke page.
You could argue that noscript users are accustomed to this and know to whitelist the site if they trust it, but this can be avoided entirely with css svg icons:
The Abridge.woff2 file is still included but not used by default. Additionally Roboto is still defined as a font in the font family css, but is no longer loaded as a font resource.
The Roboto font files are also still included, just not loaded by default, this font is also still defined in this file:
abridge/sass/font.scss
so literally all you need to do to keep loading the roboto font is make a change in config.toml:
change this:
stylesheets = [ "abridge-switcher.css" ]
to this
stylesheets = [ "abridge-switcher.css", "font.css" ]
You may need to adjust your config.toml:
You could think of this commit as a Refactor, still supporting these other methods/features, but not enabled by default, so that abridge can be kept lightweight as a default.