You've already forked Ghost-Theme-Source
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a2f77a5b9 | ||
|
|
b9ae39eab9 |
@@ -26,6 +26,11 @@
|
||||
https://gomakethings.com/dynamically-changing-the-text-color-based-on-background-color-contrast-with-vanilla-js/ */
|
||||
var accentColor = getComputedStyle(document.documentElement).getPropertyValue('--background-color');
|
||||
accentColor = accentColor.trim().slice(1);
|
||||
|
||||
if (accentColor.length === 3) {
|
||||
accentColor = accentColor[0] + accentColor[0] + accentColor[1] + accentColor[1] + accentColor[2] + accentColor[2];
|
||||
}
|
||||
|
||||
var r = parseInt(accentColor.substr(0, 2), 16);
|
||||
var g = parseInt(accentColor.substr(2, 2), 16);
|
||||
var b = parseInt(accentColor.substr(4, 2), 16);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "source",
|
||||
"description": "A default theme for the Ghost publishing platform",
|
||||
"demo": "https://source.ghost.io",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"engines": {
|
||||
"ghost": ">=5.0.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user