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