decentralized and customizable links page on top of atproto

select font

+1
.gitignore
··· 1 1 .venv 2 + *.pyc
+9
requirements.txt
··· 1 + blinker==1.9.0 2 + click==8.3.0 3 + Flask==3.1.2 4 + gunicorn==23.0.0 5 + itsdangerous==2.2.0 6 + Jinja2==3.1.6 7 + MarkupSafe==3.0.3 8 + packaging==25.0 9 + Werkzeug==3.1.3
+9 -2
src/main.py
··· 1 - from flask import Flask, render_template, request 1 + from flask import Flask, redirect, render_template, request 2 2 from urllib import request as http_request 3 3 import json 4 4 ··· 31 31 if pds is None: 32 32 return "pds not found", 404 33 33 profile = load_profile(pds, did, reload=reload) 34 - links = load_links(pds, did, reload=reload) or [] 34 + links = load_links(pds, did, reload=reload) 35 + if links is None: 36 + return "profile not found", 404 37 + 38 + if reload: 39 + # remove the ?reload parameter 40 + return redirect(request.path) 41 + 35 42 return render_template("profile.html", profile=profile, links=links) 36 43 37 44
src/static/InterVariable.woff2

This is a binary file and will not be displayed.

+7
src/static/inter.css
··· 1 + @font-face { 2 + font-family: "Inter"; 3 + font-style: normal; 4 + font-weight: 100 900; 5 + font-display: swap; 6 + src: url(/static/InterVariable.woff2); 7 + }
+16 -3
src/static/style.css
··· 1 + html { 2 + font-feature-settings: 3 + "kern" 1, 4 + "liga" 1, 5 + "cv05" 1, 6 + "tnum" 1; 7 + } 8 + 1 9 body { 2 10 background: #fff; 3 11 color: #333; 4 - font-size: 20px; 5 - font-family: monospace; 6 - font-weight: 450; 12 + font-size: 18px; 13 + line-height: 20px; 14 + font-family: "Inter", system-ui, sans-serif, ui-sans-serif; 15 + font-variation-settings: normal; 16 + font-weight: 400; 17 + font-optical-sizing: auto; 7 18 margin: 1rem; 8 19 -webkit-font-smoothing: antialiased; 9 20 -moz-osx-font-smoothing: grayscale; ··· 39 50 40 51 header .tagline { 41 52 font-style: italic; 53 + display: inline-block; 54 + margin-top: 0.5em; 42 55 } 43 56 44 57 ul {
+8 -1
src/templates/profile.html
··· 2 2 <html> 3 3 <head> 4 4 <meta charset="utf-8" /> 5 + <title>{{ profile.0 }}</title> 5 6 <meta name="viewport" content="width=device-width, initial-scale=1" /> 6 7 <base target="_blank" /> 8 + <link rel="stylesheet" href="{{ url_for('static', filename='inter.css') }}" /> 7 9 <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" /> 8 10 </head> 9 11 <body> ··· 17 19 <ul> 18 20 {% for link in links %} 19 21 <li style="color: {{ link.color }}"> 20 - <a href="{{ link.url }}">{{ link.title }}</a> 22 + <a href="{{ link.url }}"> 23 + {{ link.title }} 24 + {% if link.detail %} 25 + <span class="detail">{{ link.detail }}</span> 26 + {% endif %} 27 + </a> 21 28 </li> 22 29 {% endfor %} 23 30 </ul>