mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 17:03:38 +00:00
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('..', ''))
|
File.join('/', 'sites', id, path.gsub('..', ''))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_url_from_site(path)
|
||||||
|
"https://#{name}#{path}"
|
||||||
|
end
|
||||||
|
|
||||||
# El directorio donde se almacenan los sitios
|
# El directorio donde se almacenan los sitios
|
||||||
def self.site_path
|
def self.site_path
|
||||||
File.join(Rails.root, '_sites')
|
File.join(Rails.root, '_sites')
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
|
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
|
||||||
= javascript_include_tag 'application', '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')})"
|
- style = "background-image: url(#{@site.try(:cover) || image_url('background.jpg')})"
|
||||||
%body{class: @has_cover ? 'background-cover' : '', style: @has_cover ? style : ''}
|
%body{class: @has_cover ? 'background-cover' : '', style: @has_cover ? style : ''}
|
||||||
.container-fluid
|
.container-fluid
|
||||||
|
|
Loading…
Reference in a new issue