diff --git a/Purr.cabal b/Purr.cabal index e1bdbba..416b8b3 100644 --- a/Purr.cabal +++ b/Purr.cabal @@ -58,6 +58,7 @@ library , text >=1.2 , time >=1.9 , wai-extra >=3.1.12.1 + , wai-middleware-static >=0.5 default-language: Haskell2010 executable Purr-exe @@ -91,6 +92,7 @@ executable Purr-exe , text >=1.2 , time >=1.9 , wai-extra >=3.1.12.1 + , wai-middleware-static >=0.5 default-language: Haskell2010 test-suite Purr-test @@ -125,4 +127,5 @@ test-suite Purr-test , text >=1.2 , time >=1.9 , wai-extra >=3.1.12.1 + , wai-middleware-static >=0.5 default-language: Haskell2010 diff --git a/package.yaml b/package.yaml index 9fe7444..875439d 100644 --- a/package.yaml +++ b/package.yaml @@ -42,6 +42,7 @@ dependencies: - time >= 1.9 - text >= 1.2 - wai-extra >= 3.1.12.1 +- wai-middleware-static >= 0.5 library: source-dirs: src diff --git a/src/Core/HTTP.hs b/src/Core/HTTP.hs index d058653..6993178 100644 --- a/src/Core/HTTP.hs +++ b/src/Core/HTTP.hs @@ -7,12 +7,14 @@ import Feature.Sharing.HTTP as Sharing import Data.Maybe (Maybe (Nothing)) import Network.Wai.Middleware.RequestLogger (logStdoutDev) +import Network.Wai.Middleware.Static import Web.Scotty.Trans app :: PurrApp () app = do -- Middleware definition middleware logStdoutDev + middleware $ staticPolicy (noDots >-> addBase "views/public") -- Core Routes get "/" $ do diff --git a/views/cassius/style.cassius b/views/cassius/style.cassius index 28d3d3a..e073cdb 100644 --- a/views/cassius/style.cassius +++ b/views/cassius/style.cassius @@ -15,12 +15,18 @@ body p margin: 0.4em 0 0.4em 0 +a + color: #{colorThree} + +.htmx-indicator + display: none + ::placeholder color: #{colorOne} opacity: 1 -.asciiCat - margin: 2% 3% 0 0 +.logo + margin: 4% 3% 0 0 font-size: 1.2vw color: #{colorFour} text-align: center @@ -91,16 +97,16 @@ p text-align: center font-size: 16px - .asciiCat - display: none - .mainInput width: 95% text-align: center .title - margin: 8% auto + margin: 8% auto 2% auto font-size: 3em + + .title h1 + margin-bottom: 0 .pwUtils width: 100% diff --git a/views/index.hamlet b/views/index.hamlet index 958cf25..d2d5cec 100644 --- a/views/index.hamlet +++ b/views/index.hamlet @@ -7,25 +7,24 @@ $doctype 5
-- _._ _,-'""`-._ - \ (,-.`._,'( |\`-/| - \ `-.-' \ )-`( , o o) - \ `- \`_`"'- ++Purr
+ $# Below needs to be replaced with an HTMX onload request to /pw/#{link} to DRY$maybe pw <- password -Here's the secret for /pw/#{link}: +
Here's the secret for /pw/#{link}:
#{pw} $nothing $if (link == "/")
$else -
No secret available at /pw/#{link} +
No secret available at /pw/#{link} + $# Above needs to be replaced with an HTMX onload request to /pw/#{link} to DRY
@@ -41,6 +40,7 @@ $doctype 5 hx-include="[name='newSec']" /> Share Secret +
@@ -56,3 +56,4 @@ $doctype 5 hx-include="[name='userLink']" /> Get Secret + diff --git a/views/public/loading.svg b/views/public/loading.svg new file mode 100644 index 0000000..45646d1 --- /dev/null +++ b/views/public/loading.svg @@ -0,0 +1,48 @@ + + + diff --git a/views/public/purrlogo.png b/views/public/purrlogo.png new file mode 100644 index 0000000..c2008ed Binary files /dev/null and b/views/public/purrlogo.png differ diff --git a/views/pw.hamlet b/views/pw.hamlet index b9d27cb..670314f 100644 --- a/views/pw.hamlet +++ b/views/pw.hamlet @@ -1,6 +1,6 @@
$maybe pw <- password -Here's the secret for /pw/#{link}: +
Here's the secret for /pw/#{link}:
#{pw} $nothing -
No secret available at /pw/#{link} +
No secret available at /pw/#{link}