Skip to content

Instantly share code, notes, and snippets.

@simshanith
Last active September 19, 2018 20:10
Show Gist options
  • Save simshanith/dce15811a473aaa661dd395dfb227a26 to your computer and use it in GitHub Desktop.
Save simshanith/dce15811a473aaa661dd395dfb227a26 to your computer and use it in GitHub Desktop.
Custom stylesheet for Momentum Dash
<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>
// 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;
})();
@simshanith
Copy link
Author

sim-momentum-futura-screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment