Przeglądaj źródła

implement clip open in sqlpage

Daniel Sheffield 4 miesięcy temu
rodzic
commit
32ed2ba00d
2 zmienionych plików z 51 dodań i 1 usunięć
  1. 1 1
      home-sqlpage/clip/form.sql
  2. 50 0
      home-sqlpage/clip/open.sql

+ 1 - 1
home-sqlpage/clip/form.sql

@@ -2,7 +2,7 @@ SELECT 'button' AS component;
 SELECT 'Open' AS title
 , 1 AS width
 , $tabler_color AS color
-, 'https://shandan.one/clip/open?' AS link
+, '/clip/open.sql?' AS link
 ;
 SELECT 'New' AS title
 , 1 AS width

+ 50 - 0
home-sqlpage/clip/open.sql

@@ -0,0 +1,50 @@
+SELECT 'shell' AS component
+, 'dark' AS theme
+, 'Clip' AS title
+, 'https://shandan.one/static/clip/clip-favicon_square.svg' AS image
+, 'https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css' AS css
+;
+SELECT 'text' AS component
+, '<style>
+.form-fieldset {
+    border: none
+}
+input[name=hash] {
+    text-align: center
+}
+</style>' AS html
+;
+SET color = '#4f8f4f';
+SET tabler_color = 'green';
+SELECT 'button' AS component
+, 'center' AS justify
+, 'lg' AS size
+;
+SELECT 'New Clip' AS title
+, 1 AS width
+, $tabler_color AS color
+, '/clip.sql?' AS link
+;
+SELECT 'form' AS component
+, 'open-clip' AS id
+, '/clip' AS action
+, '' AS validate
+, 'get' AS method
+;
+SELECT 'C0DE' AS placeholder
+, 'input' AS type
+, '' AS label
+, 'hash' AS name
+, 12 AS width
+, TRUE AS autofocus
+;
+SELECT 'button' AS component
+, 'center' AS justify
+, 'lg' AS size
+;
+SELECT 'Submit' AS title
+, 1 AS width
+, 'gray-500' AS color
+, '/clip.sql?' AS link
+, 'open-clip' AS form
+;