aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-11-27 21:26:04 +0000
committerAkshay <[email protected]>2024-11-27 21:26:04 +0000
commitf11e488e8fc1c8dd6215ffcf0d721dd3c31e39bd (patch)
tree87161049044c75537795d85393423098268b0641
parent2dcddd9408c32cde150c7a707cbbc01914592514 (diff)
rename to lurker
-rw-r--r--flake.nix30
-rw-r--r--readme.txt6
-rw-r--r--src/db.js2
-rw-r--r--src/mixins/head.pug2
-rw-r--r--src/public/styles.css5
-rw-r--r--src/views/index.pug4
-rw-r--r--src/views/login.pug3
-rw-r--r--src/views/register.pug3
8 files changed, 33 insertions, 22 deletions
diff --git a/flake.nix b/flake.nix
index 4f6b0dc..733e13b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,7 +20,7 @@
20 overlays.default = final: prev: { 20 overlays.default = final: prev: {
21 node_modules = with final; 21 node_modules = with final;
22 stdenv.mkDerivation { 22 stdenv.mkDerivation {
23 pname = "readit-node-modules"; 23 pname = "lurker-node-modules";
24 version = "0.0.1"; 24 version = "0.0.1";
25 impureEnvVars = 25 impureEnvVars =
26 lib.fetchers.proxyImpureEnvVars 26 lib.fetchers.proxyImpureEnvVars
@@ -42,9 +42,9 @@
42 outputHashAlgo = "sha256"; 42 outputHashAlgo = "sha256";
43 outputHashMode = "recursive"; 43 outputHashMode = "recursive";
44 }; 44 };
45 readit = with final; 45 lurker = with final;
46 stdenv.mkDerivation { 46 stdenv.mkDerivation {
47 pname = "readit"; 47 pname = "lurker";
48 version = "0.0.1"; 48 version = "0.0.1";
49 src = ./.; 49 src = ./.;
50 nativeBuildInputs = [makeBinaryWrapper]; 50 nativeBuildInputs = [makeBinaryWrapper];
@@ -84,17 +84,17 @@
84 }); 84 });
85 85
86 packages = forAllSystems (system: { 86 packages = forAllSystems (system: {
87 inherit (nixpkgsFor."${system}") readit node_modules; 87 inherit (nixpkgsFor."${system}") lurker node_modules;
88 }); 88 });
89 89
90 defaultPackage = forAllSystems (system: nixpkgsFor."${system}".readit); 90 defaultPackage = forAllSystems (system: nixpkgsFor."${system}".lurker);
91 91
92 apps = forAllSystems (system: let 92 apps = forAllSystems (system: let
93 pkgs = nixpkgsFor.${system}; 93 pkgs = nixpkgsFor.${system};
94 in { 94 in {
95 default = { 95 default = {
96 type = "app"; 96 type = "app";
97 program = "${pkgs.readit}/bin/readit"; 97 program = "${pkgs.lurker}/bin/lurker";
98 }; 98 };
99 }); 99 });
100 100
@@ -108,35 +108,35 @@
108 }: 108 }:
109 with lib; { 109 with lib; {
110 options = { 110 options = {
111 services.readit = { 111 services.lurker = {
112 enable = mkOption { 112 enable = mkOption {
113 type = types.bool; 113 type = types.bool;
114 default = false; 114 default = false;
115 description = "Enable readit"; 115 description = "Enable lurker";
116 }; 116 };
117 port = mkOption { 117 port = mkOption {
118 type = types.int; 118 type = types.int;
119 default = 3000; 119 default = 3000;
120 description = "Port to run readit on"; 120 description = "Port to run lurker on";
121 }; 121 };
122 }; 122 };
123 }; 123 };
124 124
125 config = mkIf config.services.readit.enable { 125 config = mkIf config.services.lurker.enable {
126 nixpkgs.overlays = [self.overlays.default]; 126 nixpkgs.overlays = [self.overlays.default];
127 systemd.services.readit = { 127 systemd.services.lurker = {
128 description = "readit service"; 128 description = "lurker service";
129 wantedBy = ["multi-user.target"]; 129 wantedBy = ["multi-user.target"];
130 130
131 serviceConfig = { 131 serviceConfig = {
132 ListenStream = "0.0.0.0:${toString config.services.readit.port}"; 132 ListenStream = "0.0.0.0:${toString config.services.lurker.port}";
133 ExecStart = "${pkgs.readit}/bin/readit"; 133 ExecStart = "${pkgs.lurker}/bin/lurker";
134 Restart = "always"; 134 Restart = "always";
135 }; 135 };
136 136
137 # If the binary needs specific environment variables, set them here 137 # If the binary needs specific environment variables, set them here
138 environment = { 138 environment = {
139 READIT_PORT = "${toString config.services.readit.port}"; 139 LURKER_PORT = "${toString config.services.lurker.port}";
140 }; 140 };
141 }; 141 };
142 }; 142 };
diff --git a/readme.txt b/readme.txt
index 4ce5c3d..b608336 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,13 +1,13 @@
1nix build .#readit 1nix build .#lurker
2 2
3todo: 3todo:
4- [ ] support crossposts 4- [ ] support crossposts
5- [ ] fix gallery thumbnails 5- [x] fix gallery thumbnails
6- [x] pass query params into templates, add into pagination 6- [x] pass query params into templates, add into pagination
7- [ ] subscription manager: reorder, mass add 7- [ ] subscription manager: reorder, mass add
8- [x] styles for info-containers 8- [x] styles for info-containers
9- [ ] open in reddit/reply in reddit link 9- [ ] open in reddit/reply in reddit link
10- [ ] placeholder for unresolvable thumbnails 10- [x] placeholder for unresolvable thumbnails
11- [x] expand/collapse comments 11- [x] expand/collapse comments
12- [x] fix title rendering in views/comments.pug 12- [x] fix title rendering in views/comments.pug
13- [x] fix spacing between comments 13- [x] fix spacing between comments
diff --git a/src/db.js b/src/db.js
index c1fecac..c16a87a 100644
--- a/src/db.js
+++ b/src/db.js
@@ -1,5 +1,5 @@
1const { Database } = require("bun:sqlite"); 1const { Database } = require("bun:sqlite");
2const db = new Database("readit.db", { 2const db = new Database("lurker.db", {
3 strict: true, 3 strict: true,
4}); 4});
5 5
diff --git a/src/mixins/head.pug b/src/mixins/head.pug
index f96e91c..b99ec74 100644
--- a/src/mixins/head.pug
+++ b/src/mixins/head.pug
@@ -2,7 +2,7 @@ mixin head(title)
2 head 2 head
3 meta(name="viewport" content="width=device-width, initial-scale=1.0") 3 meta(name="viewport" content="width=device-width, initial-scale=1.0")
4 meta(charset='UTF-8') 4 meta(charset='UTF-8')
5 title #{`${title} · readit `} 5 title #{`${title} · lurker `}
6 link(rel="stylesheet", href="/styles.css") 6 link(rel="stylesheet", href="/styles.css")
7 link(rel="preconnect" href="https://rsms.me/") 7 link(rel="preconnect" href="https://rsms.me/")
8 link(rel="stylesheet" href="https://rsms.me/inter/inter.css") 8 link(rel="stylesheet" href="https://rsms.me/inter/inter.css")
diff --git a/src/public/styles.css b/src/public/styles.css
index 3114173..9bc346f 100644
--- a/src/public/styles.css
+++ b/src/public/styles.css
@@ -525,6 +525,11 @@ form input[type="submit"]:hover {
525 color: var(--error-text-color); 525 color: var(--error-text-color);
526} 526}
527 527
528.register-message {
529 margin-bottom: 1rem;
530 flex-flow: row wrap;
531}
532
528.invite-table { 533.invite-table {
529 width: 100%; 534 width: 100%;
530 padding: 10px 0; 535 padding: 10px 0;
diff --git a/src/views/index.pug b/src/views/index.pug
index ea730fb..9f5a774 100644
--- a/src/views/index.pug
+++ b/src/views/index.pug
@@ -14,7 +14,7 @@ html
14 div.sub-title 14 div.sub-title
15 h1 15 h1
16 if isMulti 16 if isMulti
17 a(href=`/`) readit 17 a(href=`/`) lurker
18 else 18 else
19 a(href=`/r/${subreddit}`) 19 a(href=`/r/${subreddit}`)
20 | r/#{subreddit} 20 | r/#{subreddit}
@@ -30,7 +30,7 @@ html
30 div.about 30 div.about
31 | consider donating to&nbsp; 31 | consider donating to&nbsp;
32 a(href="https://donate.stripe.com/dR62bTaZH1295Da4gg") oppiliappan 32 a(href="https://donate.stripe.com/dR62bTaZH1295Da4gg") oppiliappan
33 |, author of readit 33 |, author of lurker
34 hr 34 hr
35 details 35 details
36 summary.sorting sorting by #{query.sort + (query.t?' '+query.t:'')} 36 summary.sorting sorting by #{query.sort + (query.t?' '+query.t:'')}
diff --git a/src/views/login.pug b/src/views/login.pug
index dd3c359..82412bc 100644
--- a/src/views/login.pug
+++ b/src/views/login.pug
@@ -9,6 +9,9 @@ html
9 if message 9 if message
10 div.register-error-message 10 div.register-error-message
11 | #{message} 11 | #{message}
12 else
13 div.register-message
14 | lurker is a read-only reddit client
12 - var url = redirect ? `/login?redirect=${redirect}` : '/login' 15 - var url = redirect ? `/login?redirect=${redirect}` : '/login'
13 form(action=url method="post") 16 form(action=url method="post")
14 div.input-text 17 div.input-text
diff --git a/src/views/register.pug b/src/views/register.pug
index bb43a72..f115515 100644
--- a/src/views/register.pug
+++ b/src/views/register.pug
@@ -10,6 +10,9 @@ html
10 if message 10 if message
11 div.register-error-message 11 div.register-error-message
12 | #{message} 12 | #{message}
13 else
14 div.register-message
15 | lurker is a read-only reddit client
13 form(action=`${action}` method="post") 16 form(action=`${action}` method="post")
14 div.input-text 17 div.input-text
15 label(for="username") username 18 label(for="username") username