fixup! poder customizar el sitio
This commit is contained in:
parent
6e0860b462
commit
effb1a7cfc
2 changed files with 20 additions and 0 deletions
5
app/views/layouts/_site.haml
Normal file
5
app/views/layouts/_site.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- if (site = Site.first)
|
||||
- if site.logo
|
||||
= image_tag url_for(site.logo)
|
||||
|
||||
%h1= site.title
|
15
app/views/sites/show.haml
Normal file
15
app/views/sites/show.haml
Normal file
|
@ -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'
|
Loading…
Reference in a new issue