Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kuwait Theme: Settings page styling #2598

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
[attr.data-variant]="params.variant"
[attr.data-has-children]="_row.rows ? true : false"
>
<ion-icon *ngIf="params.icon" slot="start" src="{{ params.icon | plhAsset }}"></ion-icon>
@if (params.icon) {
<ion-icon slot="start" src="{{ params.icon | plhAsset }}"></ion-icon>
}
@if (params.iconSecondary) {
<ion-icon slot="end" src="{{ params.iconSecondary | plhAsset }}"></ion-icon>
}
<span
*ngIf="_row.value"
[class]="'left text ' + params.textAlign"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ interface IButtonParams {
textAlign: "left" | "centre" | "right";
/** TEMPLATE PARAMETER: "button_align" */
buttonAlign: "left" | "centre" | "right";
/** TEMPLATE PARAMETER: "icon". The path to an icon asset */
/** TEMPLATE PARAMETER: "icon". The path to an icon asset. This will be displayed in the 'start' slot (left for LTR languages) */
icon: string;
/**
* TEMPLATE PARAMETER: "icon_secondary_asset". The path to a secondary icon asset,
* which will be displayed in the 'end' slot (right for LTR languages)
* */
iconSecondary: string;
/** TEMPLATE PARAMETER: "image_asset". The path to an image asset */
image: string;
}
Expand Down Expand Up @@ -75,6 +80,11 @@ export class TmplButtonComponent extends TemplateBaseComponent implements OnInit
"center"
) as any;
this.params.icon = getStringParamFromTemplateRow(this._row, "icon", null);
this.params.iconSecondary = getStringParamFromTemplateRow(
this._row,
"icon_secondary_asset",
null
);
}

/** Determine if the button is inside a display group with the style "two_columns" */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface ITitleParams {
/** TEMPLATE PARAMETER: "style". */
style: string | null;
/** TEMPLATE PARAMETER: "variant". */
variant: "" | "header";
variant: "" | "header" | "section_banner" | "page_banner";
}

@Component({
Expand Down
48 changes: 40 additions & 8 deletions src/theme/themes/plh_kids_kw/_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ body[data-theme="plh_kids_kw"] {
.left {
text-align: unset !important;
}
// Center align all button text by default
.left.null ::ng-deep {
text-align: center;
.left.text {
text-align: left;
p {
text-align: center !important;
text-align: left !important;
}
}
.left ::ng-deep {
// Center align all button text by default
.left.null {
text-align: center !important;
p {
text-align: left !important;
text-align: center !important;
}
}
.left.centre ::ng-deep {
Expand Down Expand Up @@ -72,6 +73,22 @@ body[data-theme="plh_kids_kw"] {
--background: var(--ion-color-primary-500);
}
}
ion-button[data-variant~="card"],
ion-button[data-param-style~="no-background"] {
border: none;
}
ion-button[data-variant~="card"][data-param-style~="no-background"] {
border: 1px solid transparent;
border-radius: 0px;
background-color: transparent;
background: transparent;
color: var(--color-surface-black);
min-height: 64px;
padding: 18px 24px;
p {
font-weight: var(--font-weight-standard);
}
}
}

// audio
Expand Down Expand Up @@ -429,12 +446,27 @@ body[data-theme="plh_kids_kw"] {
}
}
}

// Title
plh-tmpl-title {
.title-wrapper h1 p {
.title-wrapper h1 {
font-size: var(--font-size-text-title);
margin: var(--paragraph-margin-medium) 0;
line-height: var(--line-height-text-large);
color: var(--ion-color-primary-700);
color: var(--color-surface-black);
}
.title-wrapper[data-variant~="section_banner"] {
font-size: var(--font-size-text-large) !important;
font-weight: var(--font-weight-medium) !important;
background-color: #e7f2fd;
border-bottom: 1px solid var(--color-secondary-blue-80);
h1 {
padding: 18px;
border: none;
}
}
.title-wrapper[data-variant~="page_banner"] h1 {
font-size: var(--font-size-text-extra-large) !important;
}
}

Expand Down
Loading