You've already forked Ghost-Theme-Source
Add Customizations.
- Add PrismJS dependencies (baked-in) - Add Ko-fi button (in-line) - Bump dependencies to fix inability to build. - Concatenate *.css into single source.css.
This commit is contained in:
@@ -8,14 +8,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{{!-- Preload main styles and scripts for better performance --}}
|
||||
<link rel="preload" as="style" href="{{asset "built/screen.css"}}">
|
||||
<link rel="preload" as="style" href="{{asset "built/source.css"}}">
|
||||
<link rel="preload" as="script" href="{{asset "built/source.js"}}">
|
||||
|
||||
{{!-- Fonts are preloaded and defined in the default template to avoid layout shift --}}
|
||||
{{> "typography/fonts"}}
|
||||
|
||||
{{!-- Theme assets - use the {{asset}} helper to reference styles & scripts, this will take care of caching and cache-busting automatically --}}
|
||||
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}">
|
||||
<link rel="stylesheet" type="text/css" href="{{asset "built/source.css"}}">
|
||||
|
||||
{{!-- Custom background color --}}
|
||||
<style>
|
||||
@@ -25,6 +25,7 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
/* The script for calculating the color contrast has been taken from
|
||||
https://gomakethings.com/dynamically-changing-the-text-color-based-on-background-color-contrast-with-vanilla-js/ */
|
||||
var accentColor = getComputedStyle(document.documentElement).getPropertyValue('--background-color');
|
||||
@@ -39,8 +40,8 @@
|
||||
var b = parseInt(accentColor.substr(4, 2), 16);
|
||||
var yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
|
||||
var textColor = (yiq >= 128) ? 'dark' : 'light';
|
||||
|
||||
document.documentElement.className = `has-${textColor}-text`;
|
||||
});
|
||||
</script>
|
||||
|
||||
{{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings, it should always be the last tag before the closing head tag --}}
|
||||
|
||||
Reference in New Issue
Block a user