Browse Source

replace home launcher with sqlpage

Pi 4 months ago
parent
commit
d7e5012d79
3 changed files with 218 additions and 0 deletions
  1. 12 0
      docker-compose.yml
  2. 3 0
      home-sqlpage.json
  3. 203 0
      index.sql

+ 12 - 0
docker-compose.yml

@@ -1,4 +1,16 @@
 services:
+  home-sqlpage:
+    image: lovasoa/sqlpage
+    hostname: home-sqlpage
+    volumes:
+      - ./index.sql:/var/www/index.sql
+      - ./home-sqlpage.json:/etc/sqlpage/sqlpage.json
+    expose:
+      - 8080
+    networks:
+      - traefik
+    restart: always
+
   home:
     image: home-launcher
     hostname: home-launcher

+ 3 - 0
home-sqlpage.json

@@ -0,0 +1,3 @@
+{
+  "database_url": "sqlite://:memory:"
+}

+ 203 - 0
index.sql

@@ -0,0 +1,203 @@
+DROP TABLE IF EXISTS sqlpage_cards;
+CREATE TABLE IF NOT EXISTS sqlpage_cards (
+	link text,
+	title text,
+	top_image text,
+	description_md text,
+	color text,
+	grouping int
+);
+INSERT INTO sqlpage_cards
+VALUES
+(
+	'/news/rss.html',
+	'News Feed',
+	'',
+	'Notable events but not weather or sports',
+	'',
+	1
+),
+(
+	'/discovery/rss.html',
+	'Discovery Feed',
+	'',
+	'Cool and inspirational articles',
+	'',
+	1
+),
+(
+	'/humour/rss.html',
+	'Humour Feed',
+	'',
+	'Humourous articles, memes or anything funny',
+	'rss',
+	1
+),
+(
+	'/clip?',
+	'Clipboard',
+	'https://shandan.one/static/clip/clip-favicon_square.svg',
+	'Paste snippets to share via tiny URL',
+	'green',
+	2
+),
+(
+	'/goto?',
+	'Short URL',
+	'https://shandan.one/static/goto/chain-link2fr-3-2.svg',
+	'Make long URLs shorter and easy to type and say',
+	'pinterest',
+	2
+),
+(
+	'/upload?',
+	'Share a File',
+	'https://shandan.one/static/upload/upload-favicon_square.svg',
+	'Upload a file and generate a short URL to share easily',
+	'yellow',
+	2
+),
+(
+	'https://wol.shandan.one?location=outside',
+	'Wake a Device',
+	'',
+	'Wake a device from [home](https://wol.shandan.one?location=home) or [outside](https://wol.shandan.one?location=outside)',
+	'red',
+	3
+),
+(
+	'https://shandan.one/grocery/internal/apply.sql?groups[]=Fish,%20Meat,%20Eggs&apply=Apply&title=Trend',
+	'Trending Prices',
+	'https://shandan.one/grocery/favicon_square.svg',
+	'Plot charts showing historic price data',
+	'youtube',
+	3
+),
+(
+	'https://shandan.one/pgadmin4',
+	'pgAdmin',
+	'https://raw.githubusercontent.com/postgres/pgadmin4/c1ba645dceed5c9551a5f408e37a14d1041ee598/web/pgadmin/static/favicon.ico',
+	'Manage And access postgresql databases',
+	'azure',
+	3
+),
+(
+	'https://shandan.one/guacamole',
+	'Guacamole',
+	'https://raw.githubusercontent.com/apache/guacamole-website/main/images/logos/guac-classic-logo.svg',
+	'Remote desktop',
+	'teal',
+	3
+),
+(
+	'https://gogs.shandan.one',
+	'Gogs',
+	'https://gogs.shandan.one/img/favicon.png',
+	'Manage and access git repositories',
+	'yellow',
+	3
+),
+(
+	'https://syncthing.shandan.one',
+	'Syncthing',
+	'https://syncthing.net/img/logo-horizontal.svg',
+	'Monitor and configure file shares',
+	'blue',
+	3
+),
+(
+	'https://shandan.one/wekan',
+	'WeKan',
+	'https://raw.githubusercontent.com/wekan/wekan/master/public/logo-header.png',
+	'Kanban board
+
+Manage projects and tasks',
+	'teal',
+	3
+),
+(
+	'https://mouse.shandan.one/#remote-mouse',
+	'Remote Touchpad',
+	'https://raw.githubusercontent.com/Unrud/remote-touchpad/master/webdata/icon.png',
+	'Use device as touchpad
+
+Turn your device''s touchscreen into a remote touchpad',
+	'github',
+	3
+),
+(
+	'https://gateway.shandan.one',
+	'Gateway',
+	'https://gateway.shandan.one/favicon.ico?t=6dcc8b66',
+	'Access the gateway
+
+Manage local LAN and internet connection settings',
+	'cyan',
+	3
+),
+(
+	'https://listgarden.shandan.one',
+	'ListGarden',
+	'https://www.wikicalc.org/images/listgardenlogo48.gif',
+	'Manage RSS Feeds
+
+Publish news items and create new feeds',
+	'green',
+	3
+),
+(
+	'https://shandan.one/pyapi/random',
+	'Prayer Generator',
+	'',
+	'Generate a template prayer following the form of the model prayer outlined in Matthew 6:9‑13 and Luke 11:2‑4',
+	'orange',
+	3
+)
+;
+SELECT 'shell' AS component
+, 'dark' AS theme
+, 'Portal' AS title
+;
+SELECT 'text' AS component
+, '<style>
+.card-img-top:has(+ .bg-rss) {
+    width: 40%;
+    margin: 10% 50% 10% 10%;
+}
+.card-img-top {
+    width: 40%;
+    margin: 10% 30% 10% 30%;
+}
+</style>' AS html
+;
+SELECT 'card' AS component
+, 4 AS columns
+;
+SELECT 'https://shandan.one/feed'||link AS link
+, title
+, 'https://upload.wikimedia.org/wikipedia/en/thumb/4/43/Feed-icon.svg/128px-Feed-icon.svg.png' AS top_image
+, description_md
+, 'rss' AS color
+FROM sqlpage_cards
+WHERE grouping = 1
+;
+SELECT 'divider' AS component;
+SELECT 'card' AS component
+, 4 AS columns
+;
+SELECT 'https://shandan.one'||link AS link
+, title
+, top_image
+, description_md
+, color
+FROM sqlpage_cards
+WHERE grouping = 2
+;
+SELECT 'divider' AS component;
+SELECT 'card' AS component
+, 4 AS columns
+;
+SELECT * FROM sqlpage_cards
+WHERE grouping = 3
+;
+