Browse Source

serve style as css in shell

Pi 3 months ago
parent
commit
1e6b9fe236

+ 9 - 0
css/clip.css

@@ -0,0 +1,9 @@
+body .pure-g {
+    text-align: center
+}
+details svg, details img {
+    background-color: white
+}
+textarea.form-control {
+  font-family: FreeMono, monospace;
+}

+ 3 - 15
util-sqlpage/sqlpage/Style.sql → css/code.css

@@ -1,26 +1,16 @@
-SELECT 'text' AS component
-, '<style>
 body .pure-g {
     text-align: center
 }
 details svg, details img {
     background-color: white
 }
-.row-cols-lg-2:has(.bg-google) {
-  justify-content: center;
-}
-.code-component pre {
-    border-width: 2px;
-    border-color: '||$color||';
-    border-style: solid;
-}
-;.navbar > img {
-;    background-color: white;
-;}
 .card-img-top {
     width: 40%;
     margin: 10% 30% 10% 30%;
 }
+.row-cols-lg-2:has(.bg-azure) {
+  justify-content: center;
+}
 table td, table th {
    padding-left: 5px;
    padding-right: 5px;
@@ -28,5 +18,3 @@ table td, table th {
    padding-bottom: 2px;
    border-width: 1px;
 }
-</style>' AS html
-;

+ 13 - 0
css/goto.css

@@ -0,0 +1,13 @@
+body .pure-g {
+    text-align: center
+}
+details svg, details img {
+    background-color: white
+}
+.row-cols-lg-2:has(.bg-google) {
+  justify-content: center;
+}
+.card-img-top {
+    width: 40%;
+    margin: 10% 30% 10% 30%;
+}

+ 10 - 0
css/upload.css

@@ -0,0 +1,10 @@
+body .pure-g {
+    text-align: center
+}
+details svg, details img {
+    background-color: white
+}
+.card-img-top {
+    width: 40%;
+    margin: 10% 30% 10% 30%;
+}

+ 0 - 1
util-sqlpage/clip.sql

@@ -14,7 +14,6 @@ SET ":inner" = (CASE :action
 END);
 SET ":spinner" = COALESCE(:content,'') <> '' AND COALESCE(:action, '') = 'Paste';
 SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/theme.sql') AS properties;
-SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/Style.sql') AS properties;
 SELECT 'loader-start' AS component
 , 'lg' AS size
 , :tabler_color AS color

+ 6 - 6
util-sqlpage/code/form-fuel.sql

@@ -34,17 +34,17 @@ SET ":inner" = CASE COALESCE(:action, '')
 END;
 SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/theme.sql') AS properties
 WHERE COALESCE(:action, '') <> 'Update';
-SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/Style.sql') AS properties
-WHERE COALESCE(:action, '') <> 'Update';
-SELECT 'card' AS component, 1 AS columns
-WHERE COALESCE(:action, '') <> 'Update';
 
+SELECT 'card' AS component
+, 2 AS columns
+WHERE COALESCE(:action, '') <> 'Update';
+;
 SELECT COALESCE(:store->>'0'||' ', '') || COALESCE(:expiry, :created, '') AS title
 , '
 
-Type: '||COALESCE(:type->>'0','')||'
+Type: '||COALESCE(:type->>0,'')||'
 
-Value: '||COALESCE(:value,'')||'
+Value: $'||COALESCE(:value,'')||'
 
 Expires: '||COALESCE(:expiry,'')||'
 

+ 0 - 1
util-sqlpage/code/recent.sql

@@ -1,5 +1,4 @@
 SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/theme.sql') AS properties;
-SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/Style.sql') AS properties;
 SET ":filter_config" = '[
   {"name": "expiry", "type": "hidden"},
   {"name": "value", "type": "hidden"},

+ 0 - 1
util-sqlpage/goto.sql

@@ -17,7 +17,6 @@ SELECT 'dynamic' AS component, sqlpage.run_sql('goto/redirect.sql') AS propertie
 WHERE (:go = 'true' AND :hash <> '');
 
 SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/theme.sql') AS properties;
-SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/Style.sql') AS properties;
 SET ":spinner" = COALESCE(:content,'') <> '' AND COALESCE(:action, '') = 'Shrtn It!';
 SELECT 'loader-start' AS component
 , 'lg' AS size

+ 1 - 0
util-sqlpage/sqlpage/theme.sql

@@ -6,6 +6,7 @@ SELECT 'shell' AS component
 , :favicon AS favicon
 , :manifest AS manifest
 , 'https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css' AS css
+, 'https://shandan.one/css/'||:tool||'.css' AS css
 , json('{
     "title": "Home", "link": "/", "icon": "home"
   }') AS menu_item

+ 0 - 3
util-sqlpage/upload.sql

@@ -28,9 +28,6 @@ SET ":content" = CAST($rowid AS INTEGER);
 SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/theme.sql') AS properties
 --WHERE $rowid IS NULL
 ;
-SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/Style.sql') AS properties
---WHERE $rowid IS NULL
-;
 SET ":spinner" = :content IS NOT NULL OR $rowid IS NOT NULL; --COALESCE($rowid, '') <> '';
 SELECT 'loader-start' AS component
 , 'lg' AS size