Commits

Miki Tebeka  committed 9f40ee4

static

  • Participants
  • Parent commits d2a701e
  • Branches static

Comments (0)

Files changed (4)

 threadsafe: yes
 
 handlers:
+    - url: /static
+      static_dir: static
     - url: /.*
       script: shortie.app
 
 <html>
     <head>
         <title>Shortie - The URL Shortener</title>
+        <link rel="stylesheet" href="/static/style.css" />
+        <link rel="shortcut icon" href="/static/logo.png" />
     </head>
     <body>
-        <h2>Shortie - The URL Shortener</h2>
+        <div class="header">
+            The URL Shortener
+        </div>
         <form method="post">
             <label for="url">Url:</label><input name="url" /> 
             <input type="submit" value="Shorten">
         </form>
+        <div class="footer">
+            G'day folks
+        </div>
     </body>
 </html>
 

File static/logo.png

Added
New image

File static/style.css

+body {
+    margin: 20px;
+    border: 2px solid blue;
+    padding: 1px;
+}
+
+input[name=url] {
+    width: 80%;
+    margin-left: 4px;
+}
+
+span.right {
+    float: right;
+    margin-right: 5px;
+}
+
+div.header {
+    padding: 2px;
+    background: silver;
+    border-bottom: 1px solid gray;
+    margin-bottom: 10px;
+}
+
+table.urls {
+    border-collapse: collapse;
+    width: 100%;
+    border: 1px dashed blue;
+}
+
+table.urls th {
+    text-align: left;
+}
+
+div.footer {
+    margin-top: 10px;
+    padding-top: 5px;
+    border-top: 1px dashed gray;
+    padding-left: 10px;
+    font-family: Monospace;
+}
+
+div.error {
+    color: red;
+}
+
+tr.even {
+    background: #DCDCDC;
+}