From 7796fcb9b4b229ffa54cae2101aec6e528f4bce4 Mon Sep 17 00:00:00 2001 From: James Eversole Date: Sat, 17 Feb 2024 13:40:30 -0600 Subject: [PATCH] Move static assets into data dir --- .gitignore | 3 ++- {assets => data/assets}/public/copyButtons.js | 0 {assets => data/assets}/public/favicon.ico | Bin {assets => data/assets}/public/loading.svg | 0 {assets => data/assets}/public/purrlogo.png | Bin {assets => data/assets}/wordlist.txt | 0 src/Core/HTTP.hs | 2 +- src/Feature/Generation/Passwords.hs | 2 +- views/cassius/style.cassius | 1 - 9 files changed, 4 insertions(+), 4 deletions(-) rename {assets => data/assets}/public/copyButtons.js (100%) rename {assets => data/assets}/public/favicon.ico (100%) rename {assets => data/assets}/public/loading.svg (100%) rename {assets => data/assets}/public/purrlogo.png (100%) rename {assets => data/assets}/wordlist.txt (100%) diff --git a/.gitignore b/.gitignore index 06b80ec..bfdaf13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -data/ bin/ +data/Purr.sqlite +data/encryptionKey /result /config.dhall /Dockerfile diff --git a/assets/public/copyButtons.js b/data/assets/public/copyButtons.js similarity index 100% rename from assets/public/copyButtons.js rename to data/assets/public/copyButtons.js diff --git a/assets/public/favicon.ico b/data/assets/public/favicon.ico similarity index 100% rename from assets/public/favicon.ico rename to data/assets/public/favicon.ico diff --git a/assets/public/loading.svg b/data/assets/public/loading.svg similarity index 100% rename from assets/public/loading.svg rename to data/assets/public/loading.svg diff --git a/assets/public/purrlogo.png b/data/assets/public/purrlogo.png similarity index 100% rename from assets/public/purrlogo.png rename to data/assets/public/purrlogo.png diff --git a/assets/wordlist.txt b/data/assets/wordlist.txt similarity index 100% rename from assets/wordlist.txt rename to data/assets/wordlist.txt diff --git a/src/Core/HTTP.hs b/src/Core/HTTP.hs index f22ec3d..73ac6b5 100644 --- a/src/Core/HTTP.hs +++ b/src/Core/HTTP.hs @@ -17,7 +17,7 @@ app :: PurrApp () app = do -- Middleware definition middleware logStdoutDev - middleware $ staticPolicy (noDots >-> addBase "assets/public") + middleware $ staticPolicy (noDots >-> addBase "data/assets/public") -- Core Routes get "/" $ do diff --git a/src/Feature/Generation/Passwords.hs b/src/Feature/Generation/Passwords.hs index 8b1b111..9f034c5 100644 --- a/src/Feature/Generation/Passwords.hs +++ b/src/Feature/Generation/Passwords.hs @@ -65,4 +65,4 @@ rCamel :: Random String rCamel = camelCase <$> rWord wordList :: [String] -wordList = lines $(embedStringFile "./assets/wordlist.txt") +wordList = lines $(embedStringFile "data/assets/wordlist.txt") diff --git a/views/cassius/style.cassius b/views/cassius/style.cassius index 11e62c5..f31b9e8 100644 --- a/views/cassius/style.cassius +++ b/views/cassius/style.cassius @@ -77,7 +77,6 @@ input[type=number] .generatorRadio margin: 0 - .logo margin: 4% 3% 0 0 font-size: 1.2vw