Explorar el Código

add missing files

Daniel Sheffield hace 1 año
padre
commit
54804457f9
Se han modificado 2 ficheros con 78 adiciones y 0 borrados
  1. 34 0
      app/rest/templates/goto-form.tpl
  2. 44 0
      app/rest/templates/goto.tpl

+ 34 - 0
app/rest/templates/goto-form.tpl

@@ -0,0 +1,34 @@
+% from app.data.filter import get_query_param
+% content = setdefault("content", "") or ""
+% disabled = (setdefault("disabled", False) and 'readonly="true"') or ""
+<form id="goto" method="{{ method }}" action="{{ action }}">
+  <style>
+textarea::-webkit-scrollbar {
+  width: 11px;
+}
+textarea {
+  color: #cccccc;
+  background-color: #080808;
+  scrollbar-width: thin;
+  scrollbar-color: var(--thumbBG) var(--scrollbarBG);
+}
+textarea::-webkit-scrollbar-track {
+  background: var(--scrollbarBG);
+}
+textarea::-webkit-scrollbar-thumb {
+  background-color: var(--thumbBG) ;
+  border-radius: 6px;
+  border: 3px solid var(--scrollbarBG);
+}
+  </style>
+  <textarea
+    style="width: 80%"
+    id="paste-text-area"
+    name="url"
+    rows="30"
+    {{!disabled}}
+    required="true"
+    autofocus="true"
+  >{{ content }}</textarea>
+</form>
+<form id="new" method="get" action="{{ action }}"></form>

+ 44 - 0
app/rest/templates/goto.tpl

@@ -0,0 +1,44 @@
+% link = setdefault("link", "") or ""
+% disabled = setdefault("disabled", "") and 'disabled="true"'
+% download = setdefault("download", "") or ""
+<!DOCTYPE html>
+<html>
+  <head>
+    <style>
+html {
+  --scrollbarBG: #333333;
+  --thumbBG: #080808;
+}
+body {
+  background-color: #080808;
+  color: #cccccc;
+}
+    </style>
+    <title>Go to ...</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1"/>
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>
+    <link rel="stylesheet" href="https://shandan.one/css/grids-responsive-min.css"/>
+    <link rel="stylesheet" href="https://shandan.one/css/responsive-visibility-collapse.css"/>
+  </head>
+  <body align="center" style="text-align: center">
+    <div class="pure-g">
+      % include('button-style')
+      <div class="pure-u-1">
+        <div class="pure-button-group" role="action" style="padding: 1em 0 0;">
+          <button class="button-resize pure-button" type="submit" form="new"> New </button>
+          <button class="button-resize pure-button" type="submit" form="goto" {{!disabled}}> Shrtn It! </button>
+        </div>
+      </div>
+      <div class="pure-u-1">
+        <div class="pure-button" style="margin: 1em 0 1em; background: #f5ab9e; color: #8c3a2b;">
+          <a href="{{!link}}">{{ link }}</a>
+        </div>
+      <div class="pure-u-1">
+{{!form}}
+<form id="download" method="get" action="{{ download }}">
+<input name="raw" type="text" hidden="true" value="true" />
+</form>
+      </div>
+    </div>
+  </body>
+</html>