mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 06:22:53 +00:00
fix: correct data path color
fix: missing ionic component icons feat: parallax detail background
This commit is contained in:
@@ -1,3 +1,18 @@
|
|||||||
|
/*!
|
||||||
|
* Copyright (C) 2022 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
:host ::ng-deep {
|
:host ::ng-deep {
|
||||||
ion-slides.work-locations {
|
ion-slides.work-locations {
|
||||||
ion-slide {
|
ion-slide {
|
||||||
@@ -34,7 +49,6 @@
|
|||||||
|
|
||||||
> div {
|
> div {
|
||||||
padding: 0 var(--spacing-md);
|
padding: 0 var(--spacing-md);
|
||||||
background-color: var(--ion-color-light);
|
|
||||||
|
|
||||||
& > * {
|
& > * {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2022 StApps
|
~ Copyright (C) 2022 StApps
|
||||||
~ This program is free software: you can redistribute it and/or modify it
|
~ This program is free software: you can redistribute it and/or modify it
|
||||||
~ under the terms of the GNU General Public License as published by the Free
|
~ under the terms of the GNU General Public License as published by the Free
|
||||||
~ Software Foundation, version 3.
|
~ Software Foundation, version 3.
|
||||||
~
|
~
|
||||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
~ more details.
|
~ more details.
|
||||||
~
|
~
|
||||||
~ You should have received a copy of the GNU General Public License along with
|
~ You should have received a copy of the GNU General Public License along with
|
||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<ion-header *ngIf="defaultHeader">
|
<ion-header *ngIf="defaultHeader">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ng-content select="[header]"></ng-content>
|
<ng-content select="[header]"></ng-content>
|
||||||
<ion-content class="ion-no-padding">
|
<ion-content class="ion-no-padding ion-content-parallax">
|
||||||
<div [ngSwitch]="true">
|
<div [ngSwitch]="true">
|
||||||
<ng-container *ngSwitchCase="!item && (isDisconnected | async)">
|
<ng-container *ngSwitchCase="!item && (isDisconnected | async)">
|
||||||
<div class="centeredMessageContainer">
|
<div class="centeredMessageContainer">
|
||||||
|
|||||||
@@ -1,9 +1,25 @@
|
|||||||
|
/*!
|
||||||
|
* Copyright (C) 2022 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
::ng-deep {
|
::ng-deep {
|
||||||
ion-card-header {
|
ion-card-header {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
stapps-favorite-button {
|
stapps-favorite-button {
|
||||||
ion-icon {
|
ion-icon {
|
||||||
color: var(--ion-color-light);
|
color: var(--ion-color-light);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2022 StApps
|
~ Copyright (C) 2022 StApps
|
||||||
~ This program is free software: you can redistribute it and/or modify it
|
~ This program is free software: you can redistribute it and/or modify it
|
||||||
~ under the terms of the GNU General Public License as published by the Free
|
~ under the terms of the GNU General Public License as published by the Free
|
||||||
~ Software Foundation, version 3.
|
~ Software Foundation, version 3.
|
||||||
~
|
~
|
||||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
~ more details.
|
~ more details.
|
||||||
~
|
~
|
||||||
~ You should have received a copy of the GNU General Public License along with
|
~ You should have received a copy of the GNU General Public License along with
|
||||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<ng-container *ngIf="path | async as stack">
|
<ng-container *ngIf="path | async as stack">
|
||||||
<ion-breadcrumbs
|
<ion-breadcrumbs
|
||||||
|
color="light"
|
||||||
[itemsBeforeCollapse]="1"
|
[itemsBeforeCollapse]="1"
|
||||||
[itemsAfterCollapse]="($width | async) >= 768 ? 1 : 0"
|
[itemsAfterCollapse]="($width | async) >= 768 ? 1 : 0"
|
||||||
[maxItems]="2"
|
[maxItems]="2"
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2022 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Directive, ElementRef, ViewContainerRef} from '@angular/core';
|
import {Directive, ElementRef, ViewContainerRef} from '@angular/core';
|
||||||
@@ -26,12 +26,22 @@ export class IonBreadcrumbDirective extends IconReplacer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
replace() {
|
replace() {
|
||||||
|
this.replaceIcon(
|
||||||
|
this.host.querySelector('span[part="separator"]'),
|
||||||
|
{
|
||||||
|
name: SCIcon`arrow_forward_ios`,
|
||||||
|
size: 16,
|
||||||
|
style: `color: var(--ion-color-tint);`,
|
||||||
|
},
|
||||||
|
'-separator',
|
||||||
|
);
|
||||||
this.replaceIcon(
|
this.replaceIcon(
|
||||||
this.host.querySelector('button[part="collapsed-indicator"]'),
|
this.host.querySelector('button[part="collapsed-indicator"]'),
|
||||||
{
|
{
|
||||||
name: SCIcon`more_horiz`,
|
name: SCIcon`more_horiz`,
|
||||||
size: 24,
|
size: 24,
|
||||||
},
|
},
|
||||||
|
'-collapsed',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2022 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -54,6 +54,8 @@ export class IonIconDirective implements OnInit, OnDestroy, OnChanges {
|
|||||||
|
|
||||||
@Input() grade: number;
|
@Input() grade: number;
|
||||||
|
|
||||||
|
@Input() style: string;
|
||||||
|
|
||||||
private mutationObserver: MutationObserver;
|
private mutationObserver: MutationObserver;
|
||||||
|
|
||||||
iconComponent?: ComponentRef<IconComponent>;
|
iconComponent?: ComponentRef<IconComponent>;
|
||||||
@@ -121,6 +123,9 @@ export class IonIconDirective implements OnInit, OnDestroy, OnChanges {
|
|||||||
if (this.size) {
|
if (this.size) {
|
||||||
this.element.nativeElement.style.cssText = `font-size: ${this.size}px;`;
|
this.element.nativeElement.style.cssText = `font-size: ${this.size}px;`;
|
||||||
}
|
}
|
||||||
|
if (this.style) {
|
||||||
|
this.element.nativeElement.style.cssText += this.style;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
disableProperty(name: string) {
|
disableProperty(name: string) {
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2022 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -121,7 +121,7 @@ export abstract class IconReplacer implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
replaceIcon(parent: HTMLElement | null, iconData: IconData) {
|
replaceIcon(parent: HTMLElement | null, iconData: IconData, slotName = '') {
|
||||||
if (!parent) return;
|
if (!parent) return;
|
||||||
|
|
||||||
const icon = parent.querySelector('ion-icon');
|
const icon = parent.querySelector('ion-icon');
|
||||||
@@ -135,10 +135,10 @@ export abstract class IconReplacer implements OnInit, OnDestroy {
|
|||||||
// shadow dom needs to utilize slotting, to put it outside
|
// shadow dom needs to utilize slotting, to put it outside
|
||||||
// the shadow dom, otherwise it won't receive any css data
|
// the shadow dom, otherwise it won't receive any css data
|
||||||
const slot = document.createElement('slot');
|
const slot = document.createElement('slot');
|
||||||
slot.name = this.slotName;
|
slot.name = this.slotName + slotName;
|
||||||
icon.replaceWith(slot);
|
icon.replaceWith(slot);
|
||||||
|
|
||||||
scIcon.location.nativeElement.slot = this.slotName;
|
scIcon.location.nativeElement.slot = this.slotName + slotName;
|
||||||
this.element.nativeElement.append(scIcon.location.nativeElement);
|
this.element.nativeElement.append(scIcon.location.nativeElement);
|
||||||
} else {
|
} else {
|
||||||
icon.replaceWith(scIcon.location.nativeElement);
|
icon.replaceWith(scIcon.location.nativeElement);
|
||||||
|
|||||||
Binary file not shown.
@@ -1,16 +1,16 @@
|
|||||||
/*!
|
/*!
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2022 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// http://ionicframework.com/docs/theming/
|
// http://ionicframework.com/docs/theming/
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
// @import 'material-symbols/rounded.scss';
|
// @import 'material-symbols/rounded.scss';
|
||||||
@import "./theme/material-symbols.scss";
|
@import "./theme/material-symbols.scss";
|
||||||
|
@import "./theme/common/_ion-content-parallax.scss";
|
||||||
|
|
||||||
/* StApps */
|
/* StApps */
|
||||||
|
|
||||||
@@ -113,3 +114,7 @@ ion-card.bold-header {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ion-content-parallax {
|
||||||
|
@include ion-content-parallax()
|
||||||
|
}
|
||||||
|
|||||||
48
src/theme/common/_ion-content-parallax.scss
Normal file
48
src/theme/common/_ion-content-parallax.scss
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*!
|
||||||
|
* Copyright (C) 2022 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@mixin ion-content-parallax(
|
||||||
|
$parallax-background: var(--ion-color-primary),
|
||||||
|
$background: var(--ion-color-light),
|
||||||
|
$parallax-strength: 2,
|
||||||
|
$overscroll-padding: 50vh,
|
||||||
|
$content-size: 0px,
|
||||||
|
) {
|
||||||
|
&::part(background) {
|
||||||
|
background: $background;
|
||||||
|
}
|
||||||
|
&::part(scroll) {
|
||||||
|
perspective: 2px;
|
||||||
|
}
|
||||||
|
> div {
|
||||||
|
transform-style: preserve-3d;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: " ";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
height: calc(#{$content-size} + #{$parallax-strength} * #{$overscroll-padding});
|
||||||
|
width: 200%;
|
||||||
|
transform:
|
||||||
|
translateY(calc(-#{$overscroll-padding} * #{$parallax-strength}))
|
||||||
|
translateZ(calc(-1px * #{$parallax-strength}))
|
||||||
|
scale(1.5);
|
||||||
|
z-index: -1;
|
||||||
|
background: $parallax-background;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user