Skip to content

Commit

Permalink
Move fontFamily and fontSize to ui_config.json and rename them mainFo…
Browse files Browse the repository at this point in the history
…ntFamily, mainFontSize
  • Loading branch information
davivcu committed May 25, 2024
1 parent 2a741d9 commit 93e91f4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export class AppConfig {
*/
updateStyleFromConfig(edition: EditionConfig, ui: UiConfig) {
const rules = [];
rules['.edition-font'] = `font-family: ${edition.fontFamily}; font-size: ${edition.fontSize};`;
rules['.app-detail-tabs .nav-link'] = `font-family: ${ui.fontFamily};`;
rules['.ui-font'] = `font-family: ${ui.fontFamily}; font-size: ${ui.fontSize};`;
rules['.app-detail-tabs'] = `font-family: ${ui.fontFamily};`;
rules['.edition-font'] = `font-family: ${ui.mainFontFamily}; font-size: ${ui.mainFontSize};`;
rules['.app-detail-tabs .nav-link'] = `font-family: ${ui.secondaryFontFamily};`;
rules['.ui-font'] = `font-family: ${ui.secondaryFontFamily}; font-size: ${ui.secondaryFontSize};`;
rules['.app-detail-tabs'] = `font-family: ${ui.secondaryFontFamily};`;
rules['.' + AnalogueClass + ' .opened'] = `background-color: ${edition.readingColorDark};`;
rules['.' + SourceClass + ' .opened'] = `background-color: ${edition.readingColorDark};`;
rules['.' + AnalogueClass + ':hover'] = `background-color: ${edition.readingColorLight}; cursor:pointer;`;
Expand Down Expand Up @@ -96,8 +96,10 @@ export interface UiConfig {
initNavBarOpened: boolean;
thumbnailsButton: boolean;
viscollButton: boolean;
fontFamily: string;
fontSize: string;
mainFontFamily: string;
mainFontSize: string;
secondaryFontFamily: string;
secondaryFontSize: string;
theme: 'neutral' | 'modern' | 'classic';
syncZonesHighlightButton: boolean;
}
Expand All @@ -106,8 +108,6 @@ export interface EditionConfig {
editionTitle: string;
badge: string;
editionHome: string;
fontFamily: string;
fontSize: string;
showLists: boolean;
downloadableXMLSource: boolean;
availableEditionLevels: EditionLevel[];
Expand Down
2 changes: 0 additions & 2 deletions src/assets/config/edition_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"editionTitle": "My Digital Edition",
"badge": "alpha",
"editionHome": "evt.labcd.unipi.it/",
"fontFamily": "Junicode, Times, serif",
"fontSize": "1.1rem",
"availableEditionLevels": [
{
"id": "diplomatic",
Expand Down
6 changes: 4 additions & 2 deletions src/assets/config/ui_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@
"initNavBarOpened": true,
"thumbnailsButton": true,
"viscollButton": true,
"fontFamily": "Arial, sans-serif",
"fontSize": "1.1em",
"mainFontFamily": "Junicode, Times, serif",
"mainFontSize": "1.1rem",
"secondaryfontFamily": "Arial, sans-serif",
"secondaryfontSize": "1.1em",
"theme": "modern",
"syncZonesHighlightButton": true
}

0 comments on commit 93e91f4

Please sign in to comment.