Skip to content

Commit 37bcccd

Browse files
committed
fix small mobile issues with layout
1 parent 59b0c1f commit 37bcccd

8 files changed

Lines changed: 32 additions & 23 deletions

File tree

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ collections:
4141
defaults:
4242
- scope:
4343
path: "collections/_notes"
44-
type: "notes"
44+
type: "archive"
4545
values:
4646
layout: note

_data/navbar.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- name: Notes
2-
path: /notes/
1+
- name: Archive
2+
path: /archive/
33
- name: About
44
path: /about/

_includes/footer.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<footer class="flex items-start justify-between gap-4 px-4 py-4 md:px-6">
1+
<footer class="flex items-start justify-between gap-4 px-4 py-4 md:px-6 border-t
2+
border-black/10">
23
<div class="font-sans text-xs font-black bold uppercase tracking-wide">
34
Support free &amp; open scholarship.
45
</div>

_includes/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<header class="bg-stone-50 px-6 py-2">
22

3-
<div class="flex gap-1 md:items-baseline md:justify-between">
3+
<div class="flex items-end gap-1 md:items-baseline md:justify-between">
44
<div>
55
<a href="{{ '/' | relative_url }}" class="text-3xl font-semibold tracking-tight shrink-0">
66
Lab<span class="text-red-500">/</span>Notes
Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@
44

55
{{ content }}
66

7-
<section class="">
7+
<section class="pr-12">
88

99
{% assign items = site.notes | sort: "date" | reverse %}
1010
{% if items and items.size > 0 %}
1111

1212
<div class="w-full">
1313
{% for post in items %}
1414
<article class="grid grid-cols-1 md:grid-cols-[170px_1fr]">
15-
<div class="px-4 py-4 font-mono text-[0.7rem] uppercase tracking-[0.08em] text-gray-500 md:px-6">
16-
{{ post.date | date: "%Y-%m-%d" }}
17-
18-
{% if post.tags %}
19-
{% include tags.html items=post.tags %}
20-
{% endif %}
15+
<div class="text-right md:text-left px-4 md:px-6 pt-4 md:pt-12 font-mono text-[0.7rem] uppercase tracking-[0.08em] text-gray-500 ">
16+
{{ post.date | date: "%Y-%m-%d" }}
2117

18+
{% if post.tags %}
19+
<div class="hidden md:block">
20+
{% include tags.html items=post.tags %}
21+
{% endif %}
22+
</div>
2223
</div>
2324

24-
<div class="px-4 py-4 md:px-6 md:pb-[1.15rem]">
25+
26+
<div class="px-4 md:py-4 md:px-6 md:pb-[1.15rem]">
2527
<h2 class="mb-1.5 font-sans text-[1.4rem] font-serif leading-[1] tracking-[-0.025em]">
2628
<a href="{{ post.url | relative_url }}" class="hover:text-red-600">
2729
{{ post.title }}
@@ -40,12 +42,18 @@ <h2 class="mb-1.5 font-sans text-[1.4rem] font-serif leading-[1] tracking-[-0.02
4042
</p>
4143
{% endif %}
4244

45+
{% if post.tags %}
46+
<div class="mt-3 md:hidden">
47+
{% include tags.html items=post.tags %}
48+
</div>
49+
{% endif %}
50+
4351
</div>
4452
</article>
4553
{% endfor %}
4654
</div>
4755

48-
<footer class="px-4 py-4 md:px-6 md:pb-5">
56+
<footer class="text-right px-4 py-4 md:px-6 md:pb-5">
4957
<span class="font-mono text-[0.68rem] uppercase tracking-[0.12em] text-gray-500">
5058
Count <span class="text-red-600">{{ items | size }}</span> notes
5159
</span>

_layouts/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<div class="grid grid-cols-1 md:grid-cols-2">
1919

2020
{% for post in items limit:6 %}
21-
<article class="min-h-72 px-4 py-5 md:px-6 md:border-r md:border-black/10 md:[&:nth-child(2n)]:border-r-0">
21+
<article class="min-h-72 px-4 py-5 md:px-6 border-t md:border-r border-black/10 md:[&:nth-child(2n)]:border-r-0">
2222
<!-- meta -->
23-
<div class="mb-3 flex flex-wrap gap-x-3 gap-y-1 font-mono text-sm leading-[1.65] text-gray-500">
23+
<div class="md:mb-2 flex flex-wrap gap-x-3 gap-y-1 font-mono text-sm justify-end leading-[1.65] text-gray-500">
2424
<span>{{ post.date | date: "%Y-%m-%d" }}</span>
2525
</div>
2626

_pages/archive.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: archive
3+
title: Archive
4+
permalink: /archive/
5+
overtitle: "archive"
6+
---
7+

_pages/notes.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)