From 6d7b5db48265a101024fb1bc1aa4a929ffeff0bd Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sun, 1 Jul 2018 14:53:21 +1000 Subject: [PATCH 1/4] Restore favicon links in the page --- lemoncurry/jinja2/__init__.py | 3 +++ lemoncurry/jinja2/lemoncurry/layout.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lemoncurry/jinja2/__init__.py b/lemoncurry/jinja2/__init__.py index 705630d..0182a8f 100644 --- a/lemoncurry/jinja2/__init__.py +++ b/lemoncurry/jinja2/__init__.py @@ -7,6 +7,8 @@ from compressor.contrib.jinja2ext import CompressorExtension from django_activeurl.ext.django_jinja import ActiveUrl from entries.kinds import all as entry_kinds +from wellknowns.favicons import icons as favicons + from .ago import ago from .markdown import markdown from ..theme import color as theme_color @@ -27,6 +29,7 @@ def environment(**options): }) env.globals.update({ 'entry_kinds': entry_kinds, + 'favicons': favicons, 'package': load_package_json(), 'settings': settings, 'static': staticfiles_storage.url, diff --git a/lemoncurry/jinja2/lemoncurry/layout.html b/lemoncurry/jinja2/lemoncurry/layout.html index b7af2eb..5754126 100644 --- a/lemoncurry/jinja2/lemoncurry/layout.html +++ b/lemoncurry/jinja2/lemoncurry/layout.html @@ -23,6 +23,9 @@ + {% for i in favicons %} + + {% endfor %} From 6c9b6eb0612a90329daf2ae928b23e3919e00e10 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sun, 1 Jul 2018 14:56:24 +1000 Subject: [PATCH 2/4] Shrink the precision of 'ago' datetimes so they stay compact --- lemoncurry/jinja2/ago.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemoncurry/jinja2/ago.py b/lemoncurry/jinja2/ago.py index 9da1a1d..4794b0e 100644 --- a/lemoncurry/jinja2/ago.py +++ b/lemoncurry/jinja2/ago.py @@ -6,4 +6,4 @@ def ago(dt: datetime) -> str: # We have to convert the datetime we get to local time first, because ago # just strips the timezone from a timezone-aware datetime. dt = dt.astimezone() - return human(dt, past_tense='{}', abbreviate=True) + return human(dt, precision=1, past_tense='{}', abbreviate=True) From 580c61e92419654e3c1ca35c70a9a83a491c867c Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sun, 1 Jul 2018 15:01:14 +1000 Subject: [PATCH 3/4] Adjust sizing of p-author photo and spacing inside entries --- entries/static/entries/css/h-entry.styl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entries/static/entries/css/h-entry.styl b/entries/static/entries/css/h-entry.styl index c52bfa4..63d0e0c 100644 --- a/entries/static/entries/css/h-entry.styl +++ b/entries/static/entries/css/h-entry.styl @@ -25,7 +25,7 @@ ol.entries, div.entry text-align center img.u-photo border-radius .25rem - height 3em + max-height 3em > * margin-bottom .25rem .media @@ -40,6 +40,7 @@ ol.entries, div.entry list-style-type disc ul, ol margin-bottom 1rem + padding-left 1.1rem ul list-style-type circle ul, ol @@ -53,3 +54,5 @@ ol.entries, div.entry .card-link display inline-block font-size 0.8rem + margin-left 0 + margin-right 1.25rem From 427dcde672735c47ed16fe6ef7c41cb9f5ae6586 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sun, 1 Jul 2018 15:26:55 +1000 Subject: [PATCH 4/4] Make lots of improvements to the narrow-screen layout --- entries/jinja2/entries/h-entry.html | 4 ++-- entries/static/entries/css/h-entry.styl | 3 +++ home/static/home/css/index.styl | 5 ----- lemoncurry/static/lemoncurry/css/layout.styl | 4 ---- lemoncurry/static/lemoncurry/css/theme.js | 11 +++++++++++ lemoncurry/utils.py | 4 +++- 6 files changed, 19 insertions(+), 12 deletions(-) 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}}