Lasa is a stateless proxy that generates a RSS or an Atom feed from a Standard.site publication. lasa.anhgelus.world
rss atom atprotocol standard-site atproto
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(server): move css in own file

+100 -145
+1 -90
cmd/lasad/server/author.html
··· 3 3 <head> 4 4 <meta charset="UTF-8"> 5 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 + <link href="/style.css" rel="stylesheet"> 6 7 <title>{{ .Author }}'s publications - Lasa</title> 7 - <style> 8 - :root { 9 - font-size: 18px; 10 - } 11 - body { 12 - margin: 0; 13 - padding: 0 1rem 4rem 1rem; 14 - font-family: system-ui, Inter, sans-serif; 15 - line-height: 1.6em; 16 - display: flex; 17 - flex-direction: column; 18 - gap: 1rem; 19 - } 20 - body > * { 21 - display: block; 22 - width: 100%; 23 - max-width: 850px; 24 - margin: 0 auto; 25 - } 26 - h1, h2, h3 { 27 - line-height: 1.6em; 28 - margin-top: 2rem; 29 - } 30 - h1 { 31 - text-align: center; 32 - } 33 - code { 34 - font-family: monospace; 35 - font-size: 0.9em; 36 - letter-spacing: -0.2px; 37 - } 38 - a { 39 - color: #023e8a; 40 - padding: 0.1em; 41 - } 42 - a:hover { 43 - background: #023e8a; 44 - color: white; 45 - } 46 - main { 47 - display: grid; 48 - grid-template-columns: 1fr 1fr 1fr; 49 - gap: 1rem; 50 - align-items: center; 51 - } 52 - main > div { 53 - border: 10px double #000; 54 - box-shadow: 0 0 10px rgba(0, 0, 0, .2); 55 - } 56 - main h3, main a { 57 - display: block; 58 - text-align: center; 59 - padding: 0.5rem; 60 - } 61 - main h3 { 62 - border-bottom: 2px solid #000; 63 - margin: 0; 64 - } 65 - footer { 66 - display: flex; 67 - flex-direction: row; 68 - gap: 1rem; 69 - padding: 1rem; 70 - } 71 - 72 - @media only screen and (prefers-color-scheme: dark) { 73 - :root { 74 - color: #f0ebd8; 75 - background-color: #0d1321; 76 - } 77 - a { 78 - color: #90e0ef; 79 - } 80 - a:hover { 81 - background: #90e0ef; 82 - color: black; 83 - } 84 - main > div { 85 - border: 10px double #ded8c3; 86 - } 87 - main h3 { 88 - border-bottom: 2px solid #ded8c3; 89 - } 90 - } 91 - @media only screen and (max-width: 650px) { 92 - main { 93 - grid-template-columns: 1fr; 94 - } 95 - } 96 - </style> 97 8 </head> 98 9 <body> 99 10 <h1>{{ .Author }}'s publications</h1>
+1 -54
cmd/lasad/server/index.html
··· 3 3 <head> 4 4 <meta charset="UTF-8"> 5 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 + <link href="/style.css" rel="stylesheet"> 6 7 <title>Lasa</title> 7 - <style> 8 - :root { 9 - font-size: 18px; 10 - } 11 - body { 12 - margin: 0; 13 - padding-bottom: 4rem; 14 - font-family: system-ui, Inter, sans-serif; 15 - line-height: 1.6em; 16 - display: flex; 17 - flex-direction: column; 18 - gap: 1rem; 19 - } 20 - body > * { 21 - display: block; 22 - width: 100%; 23 - max-width: 850px; 24 - margin: 0 auto; 25 - } 26 - h1, h2, h3 { 27 - line-height: 1.6em; 28 - margin-top: 2rem; 29 - } 30 - h1 { 31 - text-align: center; 32 - } 33 - code { 34 - font-family: monospace; 35 - font-size: 0.9em; 36 - letter-spacing: -0.2px; 37 - } 38 - a { 39 - color: #023e8a; 40 - padding: 0.1em; 41 - } 42 - a:hover { 43 - background: #023e8a; 44 - color: white; 45 - } 46 - 47 - @media only screen and (prefers-color-scheme: dark) { 48 - :root { 49 - color: #f0ebd8; 50 - background-color: #0d1321; 51 - } 52 - a { 53 - color: #90e0ef; 54 - } 55 - a:hover { 56 - background: #90e0ef; 57 - color: black; 58 - } 59 - } 60 - </style> 61 8 </head> 62 9 <body> 63 10 <h1>Lasa</h1>
+10 -1
cmd/lasad/server/run.go
··· 16 16 "tangled.org/anhgelus.world/xrpc" 17 17 ) 18 18 19 - //go:embed index.html author.html 19 + //go:embed index.html author.html style.css 20 20 var files embed.FS 21 21 22 22 type Publication struct { ··· 71 71 HandleErrors(w, err) 72 72 return 73 73 } 74 + w.Write(b) 75 + }) 76 + mux.HandleFunc("GET /style.css", func(w http.ResponseWriter, r *http.Request) { 77 + b, err := files.ReadFile("style.css") 78 + if err != nil { 79 + HandleErrors(w, err) 80 + return 81 + } 82 + w.Header().Add("Content-Type", "text/css") 74 83 w.Write(b) 75 84 }) 76 85
+88
cmd/lasad/server/style.css
··· 1 + :root { 2 + font-size: 18px; 3 + } 4 + body { 5 + margin: 0; 6 + padding: 0 1rem 4rem 1rem; 7 + font-family: system-ui, Inter, sans-serif; 8 + line-height: 1.6em; 9 + display: flex; 10 + flex-direction: column; 11 + gap: 1rem; 12 + } 13 + body > * { 14 + display: block; 15 + width: 100%; 16 + max-width: 850px; 17 + margin: 0 auto; 18 + } 19 + h1, h2, h3 { 20 + line-height: 1.6em; 21 + margin-top: 2rem; 22 + } 23 + h1 { 24 + text-align: center; 25 + } 26 + code { 27 + font-family: monospace; 28 + font-size: 0.9em; 29 + letter-spacing: -0.2px; 30 + } 31 + a { 32 + color: #023e8a; 33 + padding: 0.1em; 34 + } 35 + a:hover { 36 + background: #023e8a; 37 + color: white; 38 + } 39 + main { 40 + display: grid; 41 + grid-template-columns: 1fr 1fr 1fr; 42 + gap: 1rem; 43 + align-items: center; 44 + } 45 + main > div { 46 + border: 10px double #000; 47 + box-shadow: 0 0 10px rgba(0, 0, 0, .2); 48 + } 49 + main h3, main a { 50 + display: block; 51 + text-align: center; 52 + padding: 0.5rem; 53 + } 54 + main h3 { 55 + border-bottom: 2px solid #000; 56 + margin: 0; 57 + } 58 + footer { 59 + display: flex; 60 + flex-direction: row; 61 + gap: 1rem; 62 + padding: 1rem; 63 + } 64 + 65 + @media only screen and (prefers-color-scheme: dark) { 66 + :root { 67 + color: #f0ebd8; 68 + background-color: #0d1321; 69 + } 70 + a { 71 + color: #90e0ef; 72 + } 73 + a:hover { 74 + background: #90e0ef; 75 + color: black; 76 + } 77 + main > div { 78 + border: 10px double #ded8c3; 79 + } 80 + main h3 { 81 + border-bottom: 2px solid #ded8c3; 82 + } 83 + } 84 + @media only screen and (max-width: 650px) { 85 + main { 86 + grid-template-columns: 1fr; 87 + } 88 + }