diff --git a/app/views/layouts/_site.haml b/app/views/layouts/_site.haml new file mode 100644 index 0000000..c731c96 --- /dev/null +++ b/app/views/layouts/_site.haml @@ -0,0 +1,5 @@ +- if (site = Site.first) + - if site.logo + = image_tag url_for(site.logo) + + %h1= site.title diff --git a/app/views/sites/show.haml b/app/views/sites/show.haml new file mode 100644 index 0000000..9e76960 --- /dev/null +++ b/app/views/sites/show.haml @@ -0,0 +1,15 @@ +%section.w-100.min-vh-100.d-flex.align-items-center.justify-content-center + %div + = render 'layouts/site' + + = form_for @site do |f| + .mb-3 + = f.label :title, class: 'form-label' + = f.text_field :title, class: 'form-control', required: true + + .mb-3 + = f.label :logo, class: 'form-label' + = f.file_field :logo, class: 'form-control' + + .mb-3 + = f.submit class: 'btn btn-success'