From effb1a7cfc34b19ae97939552c114a67ae8e734a Mon Sep 17 00:00:00 2001 From: f Date: Sat, 11 Jun 2022 13:12:53 -0300 Subject: [PATCH] fixup! poder customizar el sitio --- app/views/layouts/_site.haml | 5 +++++ app/views/sites/show.haml | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 app/views/layouts/_site.haml create mode 100644 app/views/sites/show.haml 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'