cargar el css desde el sitio
This commit is contained in:
parent
56ad911dc1
commit
47b82d0771
2 changed files with 6 additions and 0 deletions
|
@ -304,6 +304,10 @@ class Site
|
|||
File.join('/', 'sites', id, path.gsub('..', ''))
|
||||
end
|
||||
|
||||
def get_url_from_site(path)
|
||||
"https://#{name}#{path}"
|
||||
end
|
||||
|
||||
# El directorio donde se almacenan los sitios
|
||||
def self.site_path
|
||||
File.join(Rails.root, '_sites')
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
|
||||
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
|
||||
- if @site.try(:config).try(:dig, 'css')
|
||||
%link{rel: 'stylesheet', type: 'text/css', href: @site.get_url_from_site(@site.config.dig('css'))}
|
||||
- style = "background-image: url(#{@site.try(:cover) || image_url('background.jpg')})"
|
||||
%body{class: @has_cover ? 'background-cover' : '', style: @has_cover ? style : ''}
|
||||
.container-fluid
|
||||
|
|
Loading…
Reference in a new issue