diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 49f935e4cc3..9cc42507c92 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -218,6 +218,13 @@ class Website(Home): } return request.render('website.website_info', values) + @http.route(['/website/social/'], type='http', auth="public", website=True, sitemap=False) + def social(self, social, **kwargs): + url = getattr(request.website, 'social_%s' % social, False) + if not url: + raise werkzeug.exceptions.NotFound() + return request.redirect(url) + # ------------------------------------------------------ # Edit # ------------------------------------------------------ diff --git a/addons/website/models/theme_models.py b/addons/website/models/theme_models.py index 72e21222e16..566da645e27 100644 --- a/addons/website/models/theme_models.py +++ b/addons/website/models/theme_models.py @@ -162,6 +162,7 @@ class Theme(models.AbstractModel): 'navbar-font-number': 'null', 'buttons-font-number': 'null', 'header-template': 'null', + 'footer-template': 'null', } ) @@ -170,6 +171,13 @@ class Theme(models.AbstractModel): self.disable_view('website.template_header_hamburger_left') self.disable_view('website.template_header_navbar_text_center') + # Reinitialize footer templates + self.disable_view('website.template_footer_logo_about_us_below') + self.disable_view('website.template_footer_links_address_logo') + self.disable_view('website.template_footer_name_logo_links_about_us') + self.disable_view('website.template_footer_logo_only') + self.disable_view('website.template_footer_address_logo') + # Call specific theme post copy theme_post_copy = '_%s_post_copy' % mod.name if hasattr(self, theme_post_copy): diff --git a/addons/website/static/src/scss/primary_variables.scss b/addons/website/static/src/scss/primary_variables.scss index 7bf12649c90..673e26293f7 100644 --- a/addons/website/static/src/scss/primary_variables.scss +++ b/addons/website/static/src/scss/primary_variables.scss @@ -53,6 +53,7 @@ $o-base-website-values-palette: ( 'buttons-font-number': 1, 'google-fonts': null, 'header-template': 'logo_menu', + 'footer-template': 'products_contacts_about_us', ); $o-website-values-palettes: ( (), diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 788958e51ff..6c76dac6179 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -787,22 +787,6 @@ header { @include make-container-max-widths($-mm-max-widths); } -// Copyright -.o_footer_copyright { - padding: 8px; - .js_language_selector { - display: inline-block; - } - @include media-breakpoint-up(md) { - .row { - display: flex; - > div { - margin: auto 0; - } - } - } -} - #wrapwrap.o_header_overlay { > header:not(.o_header_affix) { @include o-position-absolute(0, 0, auto, 0); @@ -826,6 +810,48 @@ header { } } } + +// Footer Templates +#footer { + @if o-website-value('footer-template') != 'products_contacts_about_us' { + @if o-website-value('footer-template') == 'logo_about_us_below' { + .o_footer_logo { + margin-top: $spacer; + margin-bottom: $spacer; + } + .o_footer_about_us { + margin-bottom: $spacer; + } + } @else if o-website-value('footer-template') == 'links_address_logo' { + &, p { + text-align: center; + } + &, ul, .o_footer_address, .o_footer_logo { + padding-top: $spacer; + } + li a { + text-transform: uppercase; + } + } + } +} + +// Copyright +.o_footer_copyright { + padding: 8px; + .js_language_selector { + display: inline-block; + } + @include media-breakpoint-up(md) { + .row { + display: flex; + > div { + margin: auto 0; + } + } + } +} + // Figure with special style .o_figure_relative_layout { position: relative; diff --git a/addons/website/views/snippets/snippets.xml b/addons/website/views/snippets/snippets.xml index 1f84556e1f1..a10f325ebc0 100644 --- a/addons/website/views/snippets/snippets.xml +++ b/addons/website/views/snippets/snippets.xml @@ -449,6 +449,32 @@ data-no-check="true" groups="website.group_website_designer"> + + + + diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index d7b2063ebd0..354e15871df 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -265,6 +265,7 @@ + + + + + + + + + + + + + + + +