From 5f030c01a802d973f8b7da04efcdb0d6b4562ddf Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Wed, 23 Sep 2020 22:11:17 +0900 Subject: [PATCH] Fix layout break in login form --- app/views/login_page/index.html.haml | 36 +++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/app/views/login_page/index.html.haml b/app/views/login_page/index.html.haml index ef10bd92d..cccccf259 100644 --- a/app/views/login_page/index.html.haml +++ b/app/views/login_page/index.html.haml @@ -3,20 +3,24 @@ - provide(:url, "/login") %body - %header.intro-header{:style => "padding-top: 300px; background-image: url('cover.png')"} + %section + = image_tag "/cover.png", alt: 'CoderDojo Japan カバー画像', class: 'lazyload', loading: 'lazy', "data-src" => "/cover.png", style: 'border-radius: 0; ' -%h1{:style => "text-align: center; margin-top: -30px; padding-bottom: 20px;"} ログイン -= scrivito_tag :div, @obj, :body -= form_tag session_path, role: 'form' do - .form-group - = label_tag :email, 'メールアドレス' - = text_field_tag :email, '', class: 'form-control', placeholder: '' - .form-group - = label_tag :password, 'パスワード' - = password_field_tag :password, '', class: 'form-control', placeholder: '' - %button.btn.btn-default{:type => "submit"} ログイン -- if Rails.env.development? - %hr/ - = scrivito_tag_list :ul, @obj, :toclist do |list, child| - = list.tag :li do - = link_to child.display_title, scrivito_path(child) + + %h1.text-center.intro-header{style: "margin-top: 40px; padding-bottom: 20px;"} ログイン + %div{style: 'margin: 0 60px 0'} + = scrivito_tag :div, @obj, :body + = form_tag session_path, role: 'form' do + .form-group + = label_tag :email, 'メールアドレス' + = text_field_tag :email, '', class: 'form-control', placeholder: '' + .form-group + = label_tag :password, 'パスワード' + = password_field_tag :password, '', class: 'form-control', placeholder: '' + %button.btn.btn-default{:type => "submit"} ログイン + + - if Rails.env.development? + %hr/ + = scrivito_tag_list :ul, @obj, :toclist do |list, child| + = list.tag :li do + = link_to child.display_title, scrivito_path(child)