FEATURE: Add site setting and wizard step to set base font (#10250)

Co-authored-by: Neil Lalonde <neillalonde@gmail.com>
This commit is contained in:
Bianca Nenciu
2020-08-31 13:14:09 +03:00
committed by GitHub
parent 7290ca1f4a
commit f2e14a3946
29 changed files with 404 additions and 60 deletions

View File

@@ -52,6 +52,35 @@ const Wizard = EmberObject.extend({
}
return option.data.colors;
},
getCurrentFont(fontId) {
const fontsStep = this.steps.findBy("id", "fonts");
if (!fontsStep) {
return;
}
const fontChoice = fontsStep.get("fieldsById.font_previews");
if (!fontChoice) {
return;
}
const choiceId = fontId ? fontId : fontChoice.get("value");
if (!choiceId) {
return;
}
const choices = fontChoice.get("choices");
if (!choices) {
return;
}
const option = choices.findBy("id", choiceId);
if (!option) {
return;
}
return option.data.font_stack.split(",")[0];
}
});