From 93827344ae64cf5f818122db654f9b07fca05056 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Wed, 2 Feb 2022 16:24:07 +0100 Subject: [PATCH] SASS preprocessing etc --- src/app.rb | 7 ++++++- src/views/index.slim | 0 src/views/layout.slim | 11 +++++++++++ src/views/stylesheets/style.sass | 3 +++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/views/index.slim create mode 100644 src/views/layout.slim create mode 100644 src/views/stylesheets/style.sass diff --git a/src/app.rb b/src/app.rb index 87528f6..9f15de6 100755 --- a/src/app.rb +++ b/src/app.rb @@ -4,7 +4,12 @@ require "sinatra" require "sinatra/reloader" if ARGV[0] == "debug" require "slim" require "sqlite3" +require "sassc" get "/" do - "Test tesasdfhsdhjkft" + slim :index +end + +get "/style.css" do + sass :"stylesheets/style", style: :compressed end diff --git a/src/views/index.slim b/src/views/index.slim new file mode 100644 index 0000000..e69de29 diff --git a/src/views/layout.slim b/src/views/layout.slim new file mode 100644 index 0000000..68b76f8 --- /dev/null +++ b/src/views/layout.slim @@ -0,0 +1,11 @@ + +html lang="en" + head + meta charset="UTF-8" + meta name="viewport" content="width=device-width, initial-scale=1.0" + link rel="stylesheet" href="/style.css" + title The Auction House + body + ==yield + + diff --git a/src/views/stylesheets/style.sass b/src/views/stylesheets/style.sass new file mode 100644 index 0000000..aee33f8 --- /dev/null +++ b/src/views/stylesheets/style.sass @@ -0,0 +1,3 @@ +html + background-color: red +