Browse Source

Make lots of improvements to the narrow-screen layout

tags/v1.10.0
Danielle McLean 1 year ago
parent
commit
427dcde672
Signed by: Danielle McLean <dani@00dani.me> GPG Key ID: 8EB789DDF3ABD240
6 changed files with 19 additions and 12 deletions
  1. +2
    -2
      entries/jinja2/entries/h-entry.html
  2. +3
    -0
      entries/static/entries/css/h-entry.styl
  3. +0
    -5
      home/static/home/css/index.styl
  4. +0
    -4
      lemoncurry/static/lemoncurry/css/layout.styl
  5. +11
    -0
      lemoncurry/static/lemoncurry/css/theme.js
  6. +3
    -1
      lemoncurry/utils.py

+ 2
- 2
entries/jinja2/entries/h-entry.html View File

@@ -7,12 +7,12 @@
{{i}}<span class="p-name sr-only">{{ entry.author.name }}</span>
{{i}}</a>
{{i}}<a class="u-uid u-url" href="{{ entry.url }}">
{{i}}<time class="dt-published media" datetime="{{ entry.published.isoformat() }}">
{{i}}<time class="dt-published media" datetime="{{ entry.published.isoformat() }}" title="{{ entry.published.isoformat() }}">
{{i}}<i class="fas fa-fw fa-calendar" aria-hidden="true"></i>
{{i}}<div class="media-body">{{ entry.published | ago }}</div>
{{i}}</time>
{{i}}</a>
{{i}}<time class="dt-updated media" datetime="{{ entry.updated.isoformat() }}"{% if (entry.updated | ago) == (entry.published | ago) %} hidden{% endif %}>
{{i}}<time class="dt-updated media" datetime="{{ entry.updated.isoformat() }}" title="{{ entry.updated.isoformat() }}"{% if (entry.updated | ago) == (entry.published | ago) %} hidden{% endif %}>
{{i}}<i class="fas fa-fw fa-pencil-alt" aria-hidden="true"></i>
{{i}}<div class="media-body">{{ entry.updated | ago }}</div>
{{i}}</time>

+ 3
- 0
entries/static/entries/css/h-entry.styl View File

@@ -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

+ 0
- 5
home/static/home/css/index.styl View File

@@ -1,8 +1,3 @@
$sm = 576px
$md = 768px
$lg = 992px
$xl = 1200px

main
flex-direction column
align-items center

+ 0
- 4
lemoncurry/static/lemoncurry/css/layout.styl View File

@@ -1,8 +1,4 @@
$monokai_bg = #272822
$sm = 576px
$md = 768px
$lg = 992px
$xl = 1200px

html
background-color $base00

+ 11
- 0
lemoncurry/static/lemoncurry/css/theme.js View File

@@ -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];

+ 3
- 1
lemoncurry/utils.py View File

@@ -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]:

Loading…
Cancel
Save