diff --git a/.gitignore b/.gitignore index ede23d93..68d04874 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .bundle/ vendor/ node_modules/ +.sass-cache/ diff --git a/Gemfile b/Gemfile index 1f26e533..85d6f9e3 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ gem 'email_address' gem 'haml' gem 'jekyll' gem 'rack-flash3' +gem 'sass' gem 'sinatra' gem 'sinatra_warden' diff --git a/Gemfile.lock b/Gemfile.lock index 73a792eb..b027091f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,6 +99,7 @@ DEPENDENCIES pry rack-flash3 rubocop + sass sinatra sinatra_warden diff --git a/config.ru b/config.ru index bcb59d8d..dbdd4979 100644 --- a/config.ru +++ b/config.ru @@ -1,7 +1,12 @@ # frozen_string_literal: true +require 'sass/plugin/rack' # require 'rack/protection' require_relative 'sutty' # use Rack::Protection + +Sass::Plugin.options[:style] = :compressed +use Sass::Plugin::Rack + run Sutty::App diff --git a/public/assets/css/sutty.css b/public/assets/css/sutty.css deleted file mode 100644 index b80bcaec..00000000 --- a/public/assets/css/sutty.css +++ /dev/null @@ -1,11 +0,0 @@ -.background-cover { - background: url(/assets/img/background.jpg) no-repeat center center fixed; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; -} - -.full-height { - height: 100vh; -} diff --git a/public/stylesheets/sass/sutty.scss b/public/stylesheets/sass/sutty.scss new file mode 100644 index 00000000..c0cd8923 --- /dev/null +++ b/public/stylesheets/sass/sutty.scss @@ -0,0 +1,31 @@ +$footer-height: 60px; + +.background-cover { + background: url(/assets/img/background.jpg) no-repeat center center fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + +.full-height { + height: calc(100vh - #{$footer-height}); +} + +html { + position: relative; + min-height: 100%; +} + +body { + margin-bottom: $footer-height; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + height: $footer-height; + line-height: $footer-height; + text-align: center; +} diff --git a/public/stylesheets/sutty.css b/public/stylesheets/sutty.css new file mode 100644 index 00000000..e7ff2da7 --- /dev/null +++ b/public/stylesheets/sutty.css @@ -0,0 +1,2 @@ +.background-cover{background:url(/assets/img/background.jpg) no-repeat center center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover}.full-height{height:calc(100vh - 60px)}html{position:relative;min-height:100%}body{margin-bottom:60px}.footer{position:absolute;bottom:0;width:100%;height:60px;line-height:60px;text-align:center} +/*# sourceMappingURL=sutty.css.map */ diff --git a/public/stylesheets/sutty.css.map b/public/stylesheets/sutty.css.map new file mode 100644 index 00000000..717a1914 --- /dev/null +++ b/public/stylesheets/sutty.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAEA,iBAAkB,CAChB,UAAU,CAAE,6DAA6D,CACzE,uBAAuB,CAAE,KAAK,CAC9B,oBAAoB,CAAE,KAAK,CAC3B,kBAAkB,CAAE,KAAK,CACzB,eAAe,CAAE,KAAK,CAGxB,YAAa,CACX,MAAM,CAAE,kBAA+B,CAGzC,IAAK,CACH,QAAQ,CAAE,QAAQ,CAClB,UAAU,CAAE,IAAI,CAGlB,IAAK,CACH,aAAa,CApBC,IAAI,CAuBpB,OAAQ,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,CAAC,CACT,KAAK,CAAE,IAAI,CACX,MAAM,CA3BQ,IAAI,CA4BlB,WAAW,CA5BG,IAAI,CA6BlB,UAAU,CAAE,MAAM", +"sources": ["sass/sutty.scss"], +"names": [], +"file": "sutty.css" +} \ No newline at end of file diff --git a/views/layout.haml b/views/layout.haml index 482fe73a..bcda0350 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -4,7 +4,12 @@ %meta{content: "text/html; charset=UTF-8", 'http-equiv': "Content-Type"}/ %title Sutty %link{rel: 'stylesheet', type: 'text/css', href: '/assets/css/bootstrap.min.css'} - %link{rel: 'stylesheet', type: 'text/css', href: '/assets/css/sutty.css'} + %link{rel: 'stylesheet', type: 'text/css', href: '/stylesheets/sutty.css'} %body{class: @has_cover ? 'background-cover' : ''} .container = yield + %footer.footer + %p{style: @has_cover ? 'color: white' : ''} + %a{href: 'https://0xacab.org/itacate-kefir/sutty'} Sutty + es desarrollada por + %a{href: 'https://kefir.red'} Kéfir