packages feed

breve 0.1.0.0 → 0.1.1.0

raw patch · 10 files changed

+106/−118 lines, 10 filesbinary-added

Files

breve.cabal view
@@ -1,5 +1,5 @@ name:                breve-version:             0.1.0.0+version:             0.1.1.0 synopsis:            a url shortener description: @@ -15,7 +15,8 @@ category:            Web build-type:          Simple extra-source-files:  README.md, LICENSE-data-files:          layouts/*.css, layouts/*.html, views/*.html+data-files:          static/*.png, static/*.html, static/*.css,+                     views/*.html cabal-version:       >=1.10  source-repository head
− layouts/main.css
@@ -1,89 +0,0 @@-@import url(http://fonts.googleapis.com/css?family=Inconsolata:400,700);-@import url(http://reset5.googlecode.com/hg/reset.min.css);--html, body  { overflow: hidden }-body, input { font-size: 1.1em }--body {-    background-color: rgb(24,27,32);-    color: rgb(155,144,129);-    font-family: Inconsolata;-}--#container {-    text-align:center;-    position: absolute;-    height: 100%;-    width: 100%;-}--#container:before {-    content: '';-    display: inline-block;-    height: 75%;-    min-height: 20em;-    vertical-align: middle;-}--#center {-    display: inline-block;-    text-align:left;-    margin-top: -2em;-}--footer {-    position: absolute;-    width: 100%;-    bottom: 0;-    left: 0;-    padding: 1em;-    font-size: .9em;-    color: rgb(89,84,80)-}--footer span { -  float: right;-  margin-right: 2em;-}--h1 {-    margin: 1em 0 0 1em;-    font-size: 1.8em;-    font-weight: 700;-    color: rgb(81,94,102);-}--h1 a { color: rgb(81,94,102) !important}--h2 {-    font-size: 1.2em;-    margin: .5em 0 0 1.5em;-}--input[type="text"] {-    border: none;-    border-bottom: .15em dashed rgb(43,44,46);-    outline: none;-    background: transparent;-    color: rgb(119,96,73);-    padding: 0 2px;-}--input[type="submit"] {-    border: .12em solid rgb(43,44,46);-    padding: .2em .4em !important;-    background: transparent;-    color: rgb(119,87,80);-    cursor: pointer;-}--a:link, a:visited {-    color: rgb(119,96,73);-    text-decoration: none;-}--a:hover {-    text-decoration: underline;-    transition: color .5s ease;-    color: rgb(119,87,80);-}
− layouts/main.html
@@ -1,22 +0,0 @@-<!DOCTYPE html>-<html>-    <head>-        <title>breve: url shortener</title>-        <meta name="description" content="url shortener">-        <meta name="keywords" content="url, shortener">-        <meta name="author" content="Michele Guerini Rocco">-        <meta charset="utf-8">-        <link rel=stylesheet href="main.css" type="text/css">-    </head>-    <body>-        <h1><a href="/">BREVE</a></h1>-        <h2>a url shortener</h2>-        <div id="container">-            <div id="center">$yield$</div>-        </div>-        <footer>-            breve is open <a href="https://github.com/rnhmjoj/breve">source</a>-            <span>© Rnhmjoj</span>-        </footer>-    </body>-</html>
src/Application.hs view
@@ -24,13 +24,16 @@   ServerSettings {..} <- newServerSettings   table               <- load urlTable -  css   <- getDataFileName "layouts/main.css"-  index <- getDataFileName "views/index.html"-  done  <- getDataFileName "views/done.html"+  static <- getDataFileName "static/"+  index  <- getDataFileName "views/index.html"+  done   <- getDataFileName "views/done.html"    runner $ controllerApp settings $ do     get "/" (render index ())-    get "/main.css" (serveStatic css)++    get "/:file" $ do+      file <- queryParam' "file"+      serveStatic (static ++ file)      get "/:name" $ do       name <- queryParam' "name"
src/Breve/Common.hs view
@@ -26,7 +26,7 @@  instance HasTemplates IO AppSettings where   defaultLayout = do-    main <- liftIO (getDataFileName "layouts/main.html")+    main <- liftIO (getDataFileName "static/main.html")     Just <$> getTemplate main  
+ static/icon-big.png view

binary file changed (absent → 5550 bytes)

+ static/icon-medium.png view

binary file changed (absent → 2616 bytes)

+ static/icon-small.png view

binary file changed (absent → 1539 bytes)

+ static/main.css view
@@ -0,0 +1,69 @@+@import url(http://fonts.googleapis.com/css?family=Inconsolata:400,700);+@import url(https://cdn.rawgit.com/necolas/normalize.css/master/normalize.css);++body {+    background-color: #181b20;+    color: #9b9081;+    font-family: Inconsolata;+    height: 100vh;+    display: flex;+    flex-direction: column;+    justify-content: space-between;+}++#center { align-self: center }++body,input { font-size: 1.1em; }++footer {+    font-size: .9em;+    color: #595450;+    padding: 1em;+}++footer span {+    float: right;+    margin-right: 2em;+}++h1 {+    font-size: 1.8em;+    font-weight: 700;+    color: #515e66;+    margin: 1em 0 0 1em;+}++h1 a { color: #515e66 !important }++h2 {+    font-size: 1.2em;+    margin: .5em 0 0 1.5em;+}++input[type="text"] {+    border: none;+    border-bottom: .15em dashed #2b2c2e;+    outline: none;+    background: transparent;+    color: #776049;+    padding: 0 2px;+}++input[type="submit"] {+    border: .12em solid #2b2c2e;+    background: transparent;+    color: #775750;+    cursor: pointer;+    padding: .2em .4em!important;+}++a:link, a:visited {+    color: #776049;+    text-decoration: none;+}++a:hover {+    text-decoration: underline;+    transition: color .5s ease;+    color: #775750;+}
+ static/main.html view
@@ -0,0 +1,26 @@+<!DOCTYPE html>+<html>+    <head>+        <title>breve: url shortener</title>+        <meta name="description" content="url shortener">+        <meta name="keywords" content="url, shortener">+        <meta name="author" content="Michele Guerini Rocco">+        <meta charset="utf-8">+        <link rel=stylesheet href="main.css" type="text/css">+        <link rel="apple-touch-icon" href="icon-big.png">+        <link rel="icon" type="image/png" href="/favicon-big.png" sizes="96x96">+        <link rel="icon" type="image/png" href="/favicon-small.png" sizes="16x16">+        <script src="https://cdn.rawgit.com/LeaVerou/prefixfree/gh-pages/prefixfree.min.js"></script>+    </head>+    <body>+        <header>+          <h1><a href="/">BREVE</a></h1>+        <h2>a url shortener</h2>+        </header>+        <div id="center">$yield$</div>+        <footer>+            breve is open <a href="https://github.com/rnhmjoj/breve">source</a>+            <span>© Rnhmjoj</span>+        </footer>+    </body>+</html>