new_theme: remove pwa, add $base-font, $form-title-style & $toplinks-style

This commit is contained in:
Thomas Jund 2023-03-07 09:42:01 +01:00
parent dca70e36a3
commit e3563e50f9
1 changed files with 5 additions and 10 deletions

View File

@ -6,8 +6,6 @@ read -p 'folder name : ' folderName
read -p 'Theme label : ' themeLabel read -p 'Theme label : ' themeLabel
# Theme Color # Theme Color
read -p 'Theme Color (hexa) : ' themeColor read -p 'Theme Color (hexa) : ' themeColor
# Active PWA
read -p 'Active PWA (0/1) : ' pwa
cd ~/src/publik-base-theme/ cd ~/src/publik-base-theme/
@ -15,18 +13,11 @@ cd ~/src/publik-base-theme/
themefolderPath=static/$folderName themefolderPath=static/$folderName
mkdir $themefolderPath mkdir $themefolderPath
# store config PWA
if [ $pwa == 1 ]
then
configPWA='"pwa_display": "standalone",'
fi
# create config.json file # create config.json file
cat >${themefolderPath}/config.json <<EOF cat >${themefolderPath}/config.json <<EOF
{ {
"label": "${themeLabel}", "label": "${themeLabel}",
"variables": { "variables": {
${configPWA}
"theme_color": "${themeColor}", "theme_color": "${themeColor}",
"email_header_asset": "emails:logo" "email_header_asset": "emails:logo"
}, },
@ -45,12 +36,16 @@ EOF
touch ${themefolderPath}/_custom.scss touch ${themefolderPath}/_custom.scss
cat >${themefolderPath}/_vars.scss <<EOF cat >${themefolderPath}/_vars.scss <<EOF
\$base-font: 16;
// Core vars // Core vars
\$width: calc(1280em / 16); \$width: 1280em / \$base-font;
\$font-size: 100% / ( 16 / \$base-font );
\$mobile-limit: 64em; \$mobile-limit: 64em;
\$very-small-limit: 35em; \$very-small-limit: 35em;
\$primary-color: ${themeColor}; \$primary-color: ${themeColor};
\$toplinks-style:
\$widget-unique-checkbox-position: left; \$widget-unique-checkbox-position: left;
\$form-title-style: none;
EOF EOF
cat >${themefolderPath}/style.scss <<EOF cat >${themefolderPath}/style.scss <<EOF