summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2022-10-28 12:36:40 +0300
committerYuval Adam <_@yuv.al>2022-10-28 12:36:40 +0300
commit2e9b6c1e5c270352402096a64adfee10a8ad7088 (patch)
treead254c0ce6361981190b4264020b6e5cffa2406c
parent3dd1b618de8e52565670e5ffe79ad1d82b1d9caf (diff)
Sort names by domain, color links
-rw-r--r--build.py2
-rw-r--r--templates/index.html16
2 files changed, 9 insertions, 9 deletions
diff --git a/build.py b/build.py
index 8baadbf..13c69ad 100644
--- a/build.py
+++ b/build.py
@@ -29,8 +29,8 @@ for name in listdir(NAMES_DIR):
missing_fields = REQUIRED_FIELDS - set(fields.keys())
if missing_fields:
raise Exception(f"Missing required fields {missing_fields} in {name}")
-
names.append(fields)
+names = list(sorted(names, key=lambda x: x["domain"]))
def render_link(value, classes):
diff --git a/templates/index.html b/templates/index.html
index 0bacce0..24ffa44 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -23,21 +23,21 @@
<body class="mw7-ns ph3 center sans-serif">
<h1 class="f2 code">Doma.in Na.me Ha.ck Cl.ub</h1>
<p>An exclusive club of nerds that own the <a href="https://en.wikipedia.org/wiki/Domain_hack"
- class="link blue">domain
- hack</a> to their name, and serve their personal homepage from it.</p>
- <p>Are you one of us? <a href="https://github.com/yuvadm/namehack.club" class="link blue">Join the club.</a></p>
+ class="link dark-pink">domain hack</a> to their name, and serve their personal homepage from it.</p>
+ <p>Are you one of us? <a href="https://github.com/yuvadm/namehack.club" class="link dark-pink">Join the club.</a></p>
- <ul>
+ <ul class="list">
{% for name in names %}
- <li>{{ name|render_link("link blue")|safe }}{% if name.title %}<span class="light-silver ml2">{{ name.title
- }}</span>{% endif %}
+ <li class="mb3">
+ <div class="f3">{{ name|render_link("link blue")|safe }}</div>
+ <div class="light-silver serif mt1">{{ name.title }}</div>
</li>
{% endfor %}
</ul>
<hr>
<footer>
- Created by <a href="https://yuv.al" class="link blue">Yuval Adam</a>. Maintained collaboratively on <a
- href="https://github.com/yuvadm/namehack.club" class="link blue">Github</a>.
+ Created by <a href="https://yuv.al" class="link green">Yuval Adam</a>. Maintained collaboratively on <a
+ href="https://github.com/yuvadm/namehack.club" class="link green">Github</a>.
</footer>
</body>