Last active
September 19, 2018 20:10
-
-
Save simshanith/dce15811a473aaa661dd395dfb227a26 to your computer and use it in GitHub Desktop.
Custom stylesheet for Momentum Dash
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
<a href="javascript:(()=>{const a=` | |
html > body { | |
font-family: Futura-CondensedMedium, sans-serif; | |
} | |
html > body * { | |
font-family: inherit; | |
} | |
.clock .time { | |
font-size: 42vw; | |
} | |
.clock .format { | |
font-size: 10vw; | |
} | |
.top-left { | |
display: flex; | |
} | |
.top-right { | |
flex: 0 0 auto; | |
} | |
.search { | |
flex: 1 0 auto; | |
} | |
.search-input { | |
width: 100%; | |
} | |
`,b=document.createElement('style');b.id='sim-momentum-futura',b.innerHTML=a;const c=document.querySelector('head'),d=c.querySelector(`#${b.id}`);return d&&d.remove(),c.append(b),console.log('Styled'),b})();"> | |
Sim Momentum Futura Theme | |
</a> |
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
// babel sim-momentum-futura.js --presets stage-0 | |
// Futura theme for Momentum Dash https://momentumdash.com/ | |
// Copyright © 2018 Shane Daniel | |
(() => { | |
const styles = ` | |
html > body { | |
font-family: Futura-CondensedMedium, sans-serif; | |
} | |
html > body * { | |
font-family: inherit; | |
} | |
.clock .time { | |
font-size: 42vw; | |
} | |
.clock .format { | |
font-size: 10vw; | |
} | |
.top-left { | |
display: flex; | |
} | |
.top-right { | |
flex: 0 0 auto; | |
} | |
.search { | |
flex: 1 0 auto; | |
} | |
.search-input { | |
width: 100%; | |
} | |
`; | |
const style = document.createElement('style'); | |
style.id = 'sim-momentum-futura'; | |
style.innerHTML = styles; | |
const head = document.querySelector('head'); | |
const existing = head.querySelector(`#${style.id}`); | |
if (existing) { existing.remove(); } | |
head.append(style); | |
console.log('Styled'); | |
return style; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bookmarklet viewable here
Navigate to the rawgit served gist, drag & drop the bookmarklet onto bookmarks bar. Alternatively, copy link and manually create the bookmark.