Compare commits

..

No commits in common. "427dcde672735c47ed16fe6ef7c41cb9f5ae6586" and "8a0c24a9b5e22682b1994f65ab3da9558fe1bc20" have entirely different histories.

9 changed files with 14 additions and 30 deletions

View file

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

View file

@ -25,7 +25,7 @@ ol.entries, div.entry
text-align center text-align center
img.u-photo img.u-photo
border-radius .25rem border-radius .25rem
max-height 3em height 3em
> * > *
margin-bottom .25rem margin-bottom .25rem
.media .media
@ -33,9 +33,6 @@ ol.entries, div.entry
max-width 10rem max-width 10rem
> :first-child > :first-child
margin-right 2px margin-right 2px
display none
@media (min-width $sm)
display inline-block
> .card > .card
flex 1 flex 1
.e-content .e-content
@ -43,7 +40,6 @@ ol.entries, div.entry
list-style-type disc list-style-type disc
ul, ol ul, ol
margin-bottom 1rem margin-bottom 1rem
padding-left 1.1rem
ul ul
list-style-type circle list-style-type circle
ul, ol ul, ol
@ -57,5 +53,3 @@ ol.entries, div.entry
.card-link .card-link
display inline-block display inline-block
font-size 0.8rem font-size 0.8rem
margin-left 0
margin-right 1.25rem

View file

@ -1,3 +1,8 @@
$sm = 576px
$md = 768px
$lg = 992px
$xl = 1200px
main main
flex-direction column flex-direction column
align-items center align-items center

View file

@ -7,8 +7,6 @@ from compressor.contrib.jinja2ext import CompressorExtension
from django_activeurl.ext.django_jinja import ActiveUrl from django_activeurl.ext.django_jinja import ActiveUrl
from entries.kinds import all as entry_kinds from entries.kinds import all as entry_kinds
from wellknowns.favicons import icons as favicons
from .ago import ago from .ago import ago
from .markdown import markdown from .markdown import markdown
from ..theme import color as theme_color from ..theme import color as theme_color
@ -29,7 +27,6 @@ def environment(**options):
}) })
env.globals.update({ env.globals.update({
'entry_kinds': entry_kinds, 'entry_kinds': entry_kinds,
'favicons': favicons,
'package': load_package_json(), 'package': load_package_json(),
'settings': settings, 'settings': settings,
'static': staticfiles_storage.url, 'static': staticfiles_storage.url,

View file

@ -6,4 +6,4 @@ def ago(dt: datetime) -> str:
# We have to convert the datetime we get to local time first, because ago # We have to convert the datetime we get to local time first, because ago
# just strips the timezone from a timezone-aware datetime. # just strips the timezone from a timezone-aware datetime.
dt = dt.astimezone() dt = dt.astimezone()
return human(dt, precision=1, past_tense='{}', abbreviate=True) return human(dt, past_tense='{}', abbreviate=True)

View file

@ -23,9 +23,6 @@
<meta name="generator" content="{{ package.name }} {{ package.version }}" /> <meta name="generator" content="{{ package.name }} {{ package.version }}" />
<meta name="theme-color" content="{{ theme_color(3) }}" /> <meta name="theme-color" content="{{ theme_color(3) }}" />
{% for i in favicons %}
<link rel="{{ i.rel }}" type="{{ i.mime }}" sizes="{{ i.sizes }}" href="{{ i.url }}" />
{% endfor %}
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" <link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"> integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">

View file

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

View file

@ -6,20 +6,9 @@ const {safeLoad} = require('js-yaml');
const themePath = join(__dirname, '..', '..', 'base16-materialtheme-scheme', 'material-darker.yaml'); const themePath = join(__dirname, '..', '..', 'base16-materialtheme-scheme', 'material-darker.yaml');
const breakpoints = {
sm: 576,
md: 768,
lg: 992,
xl: 1200,
};
module.exports = function() { module.exports = function() {
const theme = safeLoad(readFileSync(themePath, 'utf8')); const theme = safeLoad(readFileSync(themePath, 'utf8'));
return function(style) { 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++) { for (let i = 0; i < 16; i++) {
const key = 'base0' + i.toString(16).toUpperCase(); const key = 'base0' + i.toString(16).toUpperCase();
const hex = theme[key]; const hex = theme[key];

View file

@ -30,12 +30,10 @@ PACKAGE = PackageJson()
def friendly_url(url): def friendly_url(url):
if '//' not in url:
url = '//' + url
(scheme, netloc, path, params, q, fragment) = urlparse(url) (scheme, netloc, path, params, q, fragment) = urlparse(url)
if path == '/': if path == '/':
return netloc return netloc
return "{}\u200B{}".format(netloc, path) return netloc + path
def load_package_json() -> Dict[str, Any]: def load_package_json() -> Dict[str, Any]: