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

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

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

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

@@ -33,6 +33,9 @@ ol.entries, div.entry
33 33
 			max-width 10rem
34 34
 			> :first-child
35 35
 				margin-right 2px
36
+				display none
37
+				@media (min-width $sm)
38
+					display inline-block
36 39
 	> .card
37 40
 		flex 1
38 41
 	.e-content

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

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

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

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

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

@@ -6,9 +6,20 @@ const {safeLoad} = require('js-yaml');
6 6
 
7 7
 const themePath = join(__dirname, '..', '..', 'base16-materialtheme-scheme', 'material-darker.yaml');
8 8
 
9
+const breakpoints = {
10
+	sm: 576,
11
+	md: 768,
12
+	lg: 992,
13
+	xl: 1200,
14
+};
15
+
9 16
 module.exports = function() {
10 17
 	const theme = safeLoad(readFileSync(themePath, 'utf8'));
11 18
 	return function(style) {
19
+		for (let key in breakpoints) {
20
+			style.define('$' + key, new stylus.nodes.Unit(breakpoints[key], 'px'));
21
+		}
22
+
12 23
 		for (let i = 0; i < 16; i++) {
13 24
 			const key = 'base0' + i.toString(16).toUpperCase();
14 25
 			const hex = theme[key];

+ 3
- 1
lemoncurry/utils.py View File

@@ -30,10 +30,12 @@ PACKAGE = PackageJson()
30 30
 
31 31
 
32 32
 def friendly_url(url):
33
+    if '//' not in url:
34
+        url = '//' + url
33 35
     (scheme, netloc, path, params, q, fragment) = urlparse(url)
34 36
     if path == '/':
35 37
         return netloc
36
-    return netloc + path
38
+    return "{}\u200B{}".format(netloc, path)
37 39
 
38 40
 
39 41
 def load_package_json() -> Dict[str, Any]:

Loading…
Cancel
Save