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