[IMP] website: allow to select buttons' font
Needed for themes migration.
This commit is contained in:
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-font-number: 1; // Note: this is the default
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-font-number: 2;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-font-number: 3;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-font-number: 4;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-font-number: 5;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-font-number: 6;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
$o-theme-buttons-font-number: 1; // Note: this is the default
|
||||
@@ -0,0 +1 @@
|
||||
$o-theme-buttons-font-number: 2;
|
||||
@@ -0,0 +1 @@
|
||||
$o-theme-buttons-font-number: 3;
|
||||
@@ -0,0 +1 @@
|
||||
$o-theme-buttons-font-number: 4;
|
||||
@@ -0,0 +1 @@
|
||||
$o-theme-buttons-font-number: 5;
|
||||
@@ -0,0 +1 @@
|
||||
$o-theme-buttons-font-number: 6;
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-headings-font-number: 1; // Note: this is the default
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-headings-font-number: 2;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-headings-font-number: 3;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-headings-font-number: 4;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-headings-font-number: 5;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
$o-theme-headings-font-number: 6;
|
||||
|
||||
@@ -60,3 +60,4 @@ $o-theme-font-names: (
|
||||
) !default;
|
||||
$o-theme-font-number: 1 !default;
|
||||
$o-theme-headings-font-number: 1 !default;
|
||||
$o-theme-buttons-font-number: 1 !default;
|
||||
|
||||
@@ -6,12 +6,18 @@ $-theme-font: nth($o-theme-font-urls, $o-theme-font-number);
|
||||
@if $-theme-font {
|
||||
@import url("https://fonts.googleapis.com/css?family=#{unquote($-theme-font)}");
|
||||
}
|
||||
@if $o-theme-font-number != $o-theme-headings-font-number {
|
||||
@if $o-theme-headings-font-number != $o-theme-font-number {
|
||||
$-theme-font: nth($o-theme-font-urls, $o-theme-headings-font-number);
|
||||
@if $-theme-font {
|
||||
@import url("https://fonts.googleapis.com/css?family=#{unquote($-theme-font)}");
|
||||
}
|
||||
}
|
||||
@if $o-theme-buttons-font-number != $o-theme-font-number and $o-theme-buttons-font-number != $o-theme-headings-font-number {
|
||||
$-theme-font: nth($o-theme-font-urls, $o-theme-buttons-font-number);
|
||||
@if $-theme-font {
|
||||
@import url("https://fonts.googleapis.com/css?family=#{unquote($-theme-font)}");
|
||||
}
|
||||
}
|
||||
|
||||
#wrapwrap {
|
||||
background-size: cover;
|
||||
@@ -62,6 +68,11 @@ h5, h6 {
|
||||
h6 {
|
||||
color: color('h6');
|
||||
}
|
||||
.btn {
|
||||
@if ($o-theme-buttons-font-number != $o-theme-font-number) {
|
||||
font-family: nth($o-theme-fonts, $o-theme-buttons-font-number);
|
||||
}
|
||||
}
|
||||
|
||||
// Texts
|
||||
font[style*='background'],
|
||||
|
||||
@@ -518,6 +518,14 @@
|
||||
<opt id="option_font_body_05" data-xmlid="website.option_font_body_05_variables" data-font="5"/>
|
||||
<opt id="option_font_body_06" data-xmlid="website.option_font_body_06_variables" data-font="6"/>
|
||||
</list>
|
||||
<list string="Button">
|
||||
<opt id="option_font_button_01" data-xmlid="website.option_font_button_01_variables" data-font="1"/>
|
||||
<opt id="option_font_button_02" data-xmlid="website.option_font_button_02_variables" data-font="2"/>
|
||||
<opt id="option_font_button_03" data-xmlid="website.option_font_button_03_variables" data-font="3"/>
|
||||
<opt id="option_font_button_04" data-xmlid="website.option_font_button_04_variables" data-font="4"/>
|
||||
<opt id="option_font_button_05" data-xmlid="website.option_font_button_05_variables" data-font="5"/>
|
||||
<opt id="option_font_button_06" data-xmlid="website.option_font_button_06_variables" data-font="6"/>
|
||||
</list>
|
||||
</content>
|
||||
</div>
|
||||
</template>
|
||||
@@ -673,6 +681,38 @@
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Button font options -->
|
||||
<template id="option_font_button_01_variables" inherit_id="website._assets_primary_variables" active="True">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/options/fonts/option_font_button_01_variables.scss"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="option_font_button_02_variables" inherit_id="website._assets_primary_variables" active="False">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/options/fonts/option_font_button_02_variables.scss"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="option_font_button_03_variables" inherit_id="website._assets_primary_variables" active="False">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/options/fonts/option_font_button_03_variables.scss"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="option_font_button_04_variables" inherit_id="website._assets_primary_variables" active="False">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/options/fonts/option_font_button_04_variables.scss"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="option_font_button_05_variables" inherit_id="website._assets_primary_variables" active="False">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/options/fonts/option_font_button_05_variables.scss"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="option_font_button_06_variables" inherit_id="website._assets_primary_variables" active="False">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link rel="stylesheet" type="text/scss" href="/website/static/src/scss/options/fonts/option_font_button_06_variables.scss"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="kanban">
|
||||
<t t-set="step"><t t-esc="step or 0"/></t>
|
||||
<t t-set="scope"><t t-esc="scope or 0"/></t>
|
||||
|
||||
Reference in New Issue
Block a user