diff --git a/entries/jinja2/entries/h-entry.html b/entries/jinja2/entries/h-entry.html index 2ae9932..f530692 100644 --- a/entries/jinja2/entries/h-entry.html +++ b/entries/jinja2/entries/h-entry.html @@ -7,12 +7,12 @@ {{i}}{{ entry.author.name }} {{i}} {{i}} - {{i}} + {{i}} {{i}} {{i}}{{ entry.published | ago }} {{i}} {{i}} - {{i}} + {{i}} {{i}} {{i}}{{ entry.updated | ago }} {{i}} diff --git a/entries/static/entries/css/h-entry.styl b/entries/static/entries/css/h-entry.styl index 63d0e0c..fe7dc5f 100644 --- a/entries/static/entries/css/h-entry.styl +++ b/entries/static/entries/css/h-entry.styl @@ -33,6 +33,9 @@ ol.entries, div.entry max-width 10rem > :first-child margin-right 2px + display none + @media (min-width $sm) + display inline-block > .card flex 1 .e-content diff --git a/home/static/home/css/index.styl b/home/static/home/css/index.styl index 7a73893..130508f 100644 --- a/home/static/home/css/index.styl +++ b/home/static/home/css/index.styl @@ -1,8 +1,3 @@ -$sm = 576px -$md = 768px -$lg = 992px -$xl = 1200px - main flex-direction column align-items center diff --git a/lemoncurry/static/lemoncurry/css/layout.styl b/lemoncurry/static/lemoncurry/css/layout.styl index 59d334f..bd6418c 100644 --- a/lemoncurry/static/lemoncurry/css/layout.styl +++ b/lemoncurry/static/lemoncurry/css/layout.styl @@ -1,8 +1,4 @@ $monokai_bg = #272822 -$sm = 576px -$md = 768px -$lg = 992px -$xl = 1200px html background-color $base00 diff --git a/lemoncurry/static/lemoncurry/css/theme.js b/lemoncurry/static/lemoncurry/css/theme.js index 06e806f..1249dfe 100644 --- a/lemoncurry/static/lemoncurry/css/theme.js +++ b/lemoncurry/static/lemoncurry/css/theme.js @@ -6,9 +6,20 @@ const {safeLoad} = require('js-yaml'); const themePath = join(__dirname, '..', '..', 'base16-materialtheme-scheme', 'material-darker.yaml'); +const breakpoints = { + sm: 576, + md: 768, + lg: 992, + xl: 1200, +}; + module.exports = function() { const theme = safeLoad(readFileSync(themePath, 'utf8')); return function(style) { + for (let key in breakpoints) { + style.define('$' + key, new stylus.nodes.Unit(breakpoints[key], 'px')); + } + for (let i = 0; i < 16; i++) { const key = 'base0' + i.toString(16).toUpperCase(); const hex = theme[key]; diff --git a/lemoncurry/utils.py b/lemoncurry/utils.py index c479b13..1ac70d2 100644 --- a/lemoncurry/utils.py +++ b/lemoncurry/utils.py @@ -30,10 +30,12 @@ PACKAGE = PackageJson() def friendly_url(url): + if '//' not in url: + url = '//' + url (scheme, netloc, path, params, q, fragment) = urlparse(url) if path == '/': return netloc - return netloc + path + return "{}\u200B{}".format(netloc, path) def load_package_json() -> Dict[str, Any]: