From 631efb4f36ca9cd9fca419e18f205fc9bebd39e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Fri, 5 Sep 2014 21:39:28 +0200 Subject: [PATCH] increase blogpost textarea and add media box --- app/assets/stylesheets/blog.css.scss | 40 ++++++++++++++++++++++++++++ config/initializers/rails_admin.rb | 8 ++++++ 2 files changed, 48 insertions(+) diff --git a/app/assets/stylesheets/blog.css.scss b/app/assets/stylesheets/blog.css.scss index db5fe09..36002ab 100644 --- a/app/assets/stylesheets/blog.css.scss +++ b/app/assets/stylesheets/blog.css.scss @@ -24,4 +24,44 @@ li { color: rgb(64, 64, 64); } + + .box { + position: relative; + width: 70%; + margin: 2em auto; + + &:before { + content: ""; + display: block; + padding-top: 100%; + } + + .content { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + width: 100%; + height: 100%; + } + + &.ratio2_1:before{ + padding-top: 50%; + } + + &.ratio1_2:before{ + padding-top: 200%; + } + + &.ratio4_3:before{ + padding-top: 75%; + } + + &.ratio16_9:before{ + padding-top: 56.25%; + } + } + } diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb index 03e1648..266102e 100644 --- a/config/initializers/rails_admin.rb +++ b/config/initializers/rails_admin.rb @@ -32,6 +32,14 @@ # history_show end + config.model 'Blogpost' do + edit do + configure :content do + html_attributes rows: 30, cols: 70 + end + end + end + config.model 'User' do show do configure :reset_password_token do