From e3c3ed93d77a86b64f3385441e9b7e63174ec66a Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Wed, 6 Oct 2021 10:49:54 +0200 Subject: [PATCH] slim --- wesweb01/slimtest/app.rb | 20 ++++++++++++++++++++ wesweb01/slimtest/views/annat.slim | 1 + wesweb01/slimtest/views/layout.slim | 13 +++++++++++++ wesweb01/slimtest/views/potatis.slim | 1 + wesweb01/slimtest/views/test.slim | 0 5 files changed, 35 insertions(+) create mode 100755 wesweb01/slimtest/app.rb create mode 100644 wesweb01/slimtest/views/annat.slim create mode 100644 wesweb01/slimtest/views/layout.slim create mode 100644 wesweb01/slimtest/views/potatis.slim create mode 100644 wesweb01/slimtest/views/test.slim diff --git a/wesweb01/slimtest/app.rb b/wesweb01/slimtest/app.rb new file mode 100755 index 0000000..9967674 --- /dev/null +++ b/wesweb01/slimtest/app.rb @@ -0,0 +1,20 @@ +#!/usr/bin/ruby + +require "sinatra" +require "slim" + +def test() + return "hej" +end + +get "/" do + slim(:layout) +end + +get "/potatis" do + slim(:potatis) +end + +get "/annat" do + slim(:annat) +end diff --git a/wesweb01/slimtest/views/annat.slim b/wesweb01/slimtest/views/annat.slim new file mode 100644 index 0000000..374664e --- /dev/null +++ b/wesweb01/slimtest/views/annat.slim @@ -0,0 +1 @@ +h1 hej hej diff --git a/wesweb01/slimtest/views/layout.slim b/wesweb01/slimtest/views/layout.slim new file mode 100644 index 0000000..8611c3a --- /dev/null +++ b/wesweb01/slimtest/views/layout.slim @@ -0,0 +1,13 @@ +doctype html +html + head + title TITLE + meta name="keywords" content="template language" + meta name="author" content="author" + link rel="icon" type="image/png" href="favicon.png" + body + h1 hafosjfhsdjkfhjk + == yield + h5 jaiofhsldfhlsdf + p #{test()} + diff --git a/wesweb01/slimtest/views/potatis.slim b/wesweb01/slimtest/views/potatis.slim new file mode 100644 index 0000000..e7165e2 --- /dev/null +++ b/wesweb01/slimtest/views/potatis.slim @@ -0,0 +1 @@ +h1 hej potatis diff --git a/wesweb01/slimtest/views/test.slim b/wesweb01/slimtest/views/test.slim new file mode 100644 index 0000000..e69de29