Skip to content

Commit

Permalink
Fix default style
Browse files Browse the repository at this point in the history
  • Loading branch information
jortilles committed Jun 30, 2024
1 parent f6be6f4 commit 97a93a8
Show file tree
Hide file tree
Showing 19 changed files with 745 additions and 3,736 deletions.
6 changes: 4 additions & 2 deletions eda/eda_app/src/app/config/personalitzacio/customizables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export const TemaUrl = 'assets/css/colors/sass/default-dark.css';
export const DEFAULT_BACKGROUND_COLOR: string = '#f1f0f0';
export const DEFAULT_PANEL_COLOR: string = '#ffffff';
export const DEFAULT_FONT_COLOR: string = '#455a64'
export const DEFAULT_FONT_FAMILY: string = 'Questrial';
export const DEFAULT_FONT_FAMILY: string = 'Montserrat'; /* THIS MUST BE SET ALSO IN \eda_app\src\assets\sass\css\custom.css */
export const DEFAULT_FONT_SIZE: number = 0;
export const DEFAULT_TITLE_ALIGN : string = 'center';
export const DEFAULT_PANEL_TITLE_ALIGN : string = 'left';
export const DEFAULT_PANEL_TITLE_ALIGN : string = 'left';


Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { values } from 'd3';
import { Component } from "@angular/core";
import { DashboardStyles, StyleProviderService } from "@eda/services/service.index";
import { EdaDialog, EdaDialogAbstract, EdaDialogCloseEvent } from "@eda/shared/components/shared-components.index";

import { DEFAULT_FONT_FAMILY } from "../../../../config/personalitzacio/customizables";

@Component({
selector: 'edit-styles-dialog',
Expand All @@ -15,9 +15,10 @@ export class EditStylesDialogComponent extends EdaDialogAbstract {

public fonts: Array<any> =
[
{ label: 'Montserrat', value: 'Montserrat' },
{ label: 'Questrial', value: 'Questrial' },
{ label: 'League Spartan', value: 'League Spartan' },
{ label: 'Raleway', value: 'Raleway' },
{ label: 'Montserrat', value: 'Montserrat' },
{ label: 'Bangers', value: 'Bangers' },
{ label: 'Serif', value: 'Serif' },
{ label: 'Sans-serif', value: 'Sans-serif' },
Expand Down Expand Up @@ -69,7 +70,7 @@ export class EditStylesDialogComponent extends EdaDialogAbstract {



public sampleTextFont: string = 'Questrial';
public sampleTextFont: string = DEFAULT_FONT_FAMILY;
public sampleTextStle: {} = {};

/**Sample panel */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


#box_wrapper{
margin:0.5em;
margin-left:-0.5em;
Expand Down Expand Up @@ -43,5 +45,5 @@ ul li:hover {
font-size: 1.4em;
font-weight: bold;
margin-bottom: .5em;
font-family: 'Questrial';
font-family: var(--DEFAULT_FONT_FAMILY); /*'Questrial'; */
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ ul li:hover {
font-size: 1.4em;
font-weight: bold;
margin-bottom: .5em;
font-family: 'Questrial';
font-family: var(--DEFAULT_FONT_FAMILY); /*'Questrial'; */
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ ul li:hover {
font-size: 1.4em;
font-weight: bold;
margin-bottom: .5em;
font-family: 'Questrial';
font-family: var(--DEFAULT_FONT_FAMILY); /*'Questrial'; */
}
17 changes: 10 additions & 7 deletions eda/eda_app/src/app/services/utils/style-provider.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Injectable } from "@angular/core";
import { BehaviorSubject, Observable } from "rxjs";
import {DEFAULT_BACKGROUND_COLOR, DEFAULT_PANEL_COLOR, DEFAULT_FONT_COLOR, DEFAULT_FONT_FAMILY,DEFAULT_FONT_SIZE, DEFAULT_TITLE_ALIGN,DEFAULT_PANEL_TITLE_ALIGN } from "../../config/personalitzacio/customizables";


export interface StyleConfig {
Expand All @@ -25,14 +26,16 @@ export interface DashboardStyles {
export class StyleProviderService {


public DEFAULT_BACKGROUND_COLOR: string = '#f1f0f0';
public DEFAULT_PANEL_COLOR: string = '#ffffff';
public DEFAULT_FONT_COLOR: string = '#455a64'
public DEFAULT_FONT_FAMILY: string = 'Questrial';
public DEFAULT_FONT_SIZE: number = 0;
public DEFAULT_TITLE_ALIGN: string = 'center';
public DEFAULT_PANEL_TITLE_ALIGN: string = 'left';
public DEFAULT_BACKGROUND_COLOR: string = DEFAULT_BACKGROUND_COLOR;
public DEFAULT_PANEL_COLOR: string = DEFAULT_PANEL_COLOR;
public DEFAULT_FONT_COLOR: string = DEFAULT_FONT_COLOR;
public DEFAULT_FONT_FAMILY: string = DEFAULT_FONT_FAMILY;
public DEFAULT_FONT_SIZE: number = DEFAULT_FONT_SIZE;
public DEFAULT_TITLE_ALIGN: string = DEFAULT_TITLE_ALIGN;
public DEFAULT_PANEL_TITLE_ALIGN: string = DEFAULT_PANEL_TITLE_ALIGN;

public DEFAULT_CUSTOM_CSS: string = '';


/**Page background */
private _pageBackground = new BehaviorSubject<string>(this.DEFAULT_BACKGROUND_COLOR);
Expand Down
18 changes: 18 additions & 0 deletions eda/eda_app/src/assets/sass/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


@font-face {
font-family: 'League Spartan';
src: url('fonts/leaguespartan-bold.eot');
src: url('fonts/leaguespartan-bold.eot?#iefix') format('embedded-opentype'),
url('fonts/leaguespartan-bold.woff2') format('woff2'),
url('fonts/leaguespartan-bold.woff') format('woff'),
url('fonts/leaguespartan-bold.ttf') format('truetype'),
url('fonts/leaguespartan-bold.svg#league_spartanbold') format('svg');
font-weight: bold;
font-style: normal;

}

:root {
--DEFAULT_FONT_FAMILY: "Montserrat"; /* THIS MUST BE SET ALSO IN eda_app\src\app\config\personalitzacio\customizables.ts */
}
Binary file not shown.
661 changes: 661 additions & 0 deletions eda/eda_app/src/assets/sass/css/fonts/leaguespartan-bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions eda/eda_app/src/assets/sass/css/fonts/stylesheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@font-face {
font-family: 'League Spartan';
src: url('leaguespartan-bold.eot');
src: url('leaguespartan-bold.eot?#iefix') format('embedded-opentype'),
url('leaguespartan-bold.woff2') format('woff2'),
url('leaguespartan-bold.woff') format('woff'),
url('leaguespartan-bold.ttf') format('truetype'),
url('leaguespartan-bold.svg#league_spartanbold') format('svg');
font-weight: bold;
font-style: normal;

}
43 changes: 23 additions & 20 deletions eda/eda_app/src/assets/sass/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
* 7. Widgets
* 8. Custom Templates
*/
/* @import url("https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700"); */
@import url("https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700");

@import url(../css/icons/material-design-iconic-font/css/materialdesignicons.min.css);
@import url(../css/spinners.css);
@import url(../css/animate.css);
@import url(../eda-styles/index-styles.css);
/* customizables variables. */
@import url(./custom.css);


html {
font-size: 13px;
Expand All @@ -24,7 +27,7 @@ html {

.custom .leaflet-popup-content-wrapper, .leaflet-popup-tip {
background: #010913ce !important;
font: 11px Questrial;
font: 11px ;
color: #fbfbfb !important;;
cursor: pointer;
pointer-events: none;
Expand All @@ -33,7 +36,7 @@ html {

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
background: #010913ce !important;
font: 12px Questrial;
font: 12px ;
color: #fbfbfb !important;;
cursor: pointer;
pointer-events: none;
Expand All @@ -47,7 +50,7 @@ body, html {

body {
background: #fff;
font-family: "Questrial"!important;
font-family: var(--DEFAULT_FONT_FAMILY) !important; /*'Questrial'; */
margin: 0;
overflow-y: initial;
overflow-x: hidden;
Expand Down Expand Up @@ -385,7 +388,7 @@ h4,
h5,
h6 {
color: #455a64;
font-family: "Questrial";
font-family: var(--DEFAULT_FONT_FAMILY); /*"Questrial";*/
font-weight: 400;
}

Expand Down Expand Up @@ -1201,7 +1204,7 @@ pre {
}

.edaLoginTitle{
font-family: "Scada", Sans-serif;
font-family: var(--DEFAULT_FONT_FAMILY);
letter-spacing: 1em;
font-weight: 700;
color: #163c49;
Expand Down Expand Up @@ -1344,10 +1347,10 @@ pre {
--panel-small:0.9rem;
--panel--big:1rem;

--eda-title-font-family: "Arial";
--eda-filters-font-family : "Times new Roman";
--panel-title-font-family: "Papyrus";
--panel-font-family: "Monospace";
--eda-title-font-family: var(--DEFAULT_FONT_FAMILY);
--eda-filters-font-family : var(--DEFAULT_FONT_FAMILY);
--panel-title-font-family: var(--DEFAULT_FONT_FAMILY);
--panel-font-family: var(--DEFAULT_FONT_FAMILY);

--eda-title-font-color:"#455a64";
--eda-filters-font-color:"#455a64";
Expand All @@ -1357,7 +1360,7 @@ pre {


.eda-title {
font-family: var(--eda-title-font-family);
font-family: var(--eda-title-font-family) !important;
font-size: var(--eda-title-big);
color:var(--eda-title-font-color);
line-height: 0.7;
Expand All @@ -1375,14 +1378,14 @@ pre {

.filters-size{
font-size: var(--eda-filters-big);
font-family: var(--eda-filters-font-family);
font-family: var(--eda-filters-font-family) !important;
color:var(--eda-filters-font-color)!important;
}

.panel-heading .panel-title {
text-align:var(--justifyPanelTitle);
font-size: var(--eda-panel-title-big);
font-family: var(--panel-title-font-family);
font-family: var(--panel-title-font-family) !important;
color:var(--panel-title-font-color);
padding: 10px;
font-weight: bold;
Expand All @@ -1395,7 +1398,7 @@ pre {

.component .p-datatable-wrapper{
font-size: var(--panel-big);
font-family: var(--panel-font-family);
font-family: var(--panel-font-family) !important;
}

.component .p-datatable .p-datatable-thead > tr > th{
Expand Down Expand Up @@ -1434,19 +1437,19 @@ pre {
}
.component .p-paginator .p-paginator-pages .p-paginator-page {
font-size: var(--panel-big);
font-family: var(--panel-font-family);
font-family: var(--panel-font-family) !important;
color:var(--panel-font-color);
}
.component .p-datatable .p-datatable-footer {
font-size: var(--panel-big);
font-family: var(--panel-font-family);
font-family: var(--panel-font-family) !important;
color:var(--panel-font-color);
background-color: rgba(248, 242, 242, 0.199);
border: 1px solid #fff;
}
.component .p-paginator .p-paginator-pages .p-paginator-page.p-highlight {
font-size: var(--panel-big);
font-family: var(--panel-font-family);
font-family: var(--panel-font-family) !important;
background: #E8F5E9;
border-color: #E8F5E9;
color: #495057 !important;
Expand All @@ -1462,20 +1465,20 @@ pre {

.map-legend {
font-size: var(--panel-big);
font-family: var(--panel-font-family);
font-family: var(--panel-font-family) !important;
color:var(--panel-font-color);
}



.map-legend h6{
font-size: var(--panel-big);
font-family: var(--panel-font-family);
font-family: var(--panel-font-family) !important;
color:var(--panel-font-color);
}
.tick{
font-size: var(--panel-big);
font-family: var(--panel-font-family);
font-family: var(--panel-font-family) !important;
color:var(--panel-font-color);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ body .ui-inputswitch.ui-inputswitch-checked .ui-inputswitch-slider {
line-height: 22px;
font-size: 18px;
color: #455a64;
/* font-family: 'Questrial'; */
font-weight: 400;
box-sizing: border-box;

Expand Down
11 changes: 7 additions & 4 deletions eda/eda_app/src/assets/sass/prime-styles/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@charset "UTF-8";
/* customizables variables. */
@import url(./../css/custom.css);

:root {
--surface-a:#ffffff;
--surface-b:#f8f9fa;
Expand All @@ -10,7 +13,7 @@
--text-color-secondary:#6c757d;
--primary-color:#4CAF50;
--primary-color-text:#ffffff;
--font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
--font-family: var(--DEFAULT_FONT_FAMILY) ,-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
--surface-0: #ffffff;
--surface-50: #FAFAFA;
--surface-100: #F5F5F5;
Expand All @@ -32,7 +35,7 @@
}

.p-component {
font-family: -apple-system, BlinkMacSystemFont, "Questrial", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-family: var(--DEFAULT_FONT_FAMILY) , -apple-system, BlinkMacSystemFont, "Questrial", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 0.9rem;
font-weight: normal;
}
Expand Down Expand Up @@ -969,7 +972,7 @@ p-inputswitch.ng-dirty.ng-invalid > .p-inputswitch {
}

.p-inputtext {
font-family: -apple-system, BlinkMacSystemFont, "Questrial", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-family: var(--DEFAULT_FONT_FAMILY), -apple-system, BlinkMacSystemFont, "Questrial", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 1rem;
color: #495057;
background: #ffffff;
Expand Down Expand Up @@ -5156,7 +5159,7 @@ body .d3tooltip {
text-align: center;
cursor: pointer;
padding: 8px;
font: 12px Questrial;
font: 12px ;
color: #fbfbfb;
background: #010913ea;
border: 0px;
Expand Down
Loading

0 comments on commit 97a93a8

Please sign in to comment.