Skip to content

Instantly share code, notes, and snippets.

View romanejaquez's full-sized avatar
💭
I may be slow to respond.

Roman Jaquez romanejaquez

💭
I may be slow to respond.
View GitHub Profile
<div
class="app-splash-screen"
[ngStyle]="{ left: windowWidth }"
*ngIf="showSplash"
>
<div class="app-splash-inner">
<div class="app-logo"></div>
<div class="app-label">Splashy</div>
<div class="app-loader"></div>
</div>
.app-splash-screen {
background: #d1367d;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
import { Component, OnInit } from "@angular/core";
@Component({
selector: "splash-screen",
templateUrl: "./splash-screen.component.html",
styleUrls: ["./splash-screen.component.css"]
})
export class SplashScreenComponent implements OnInit {
windowWidth: string;
showSplash = true;
import { BrowserModule } from "@angular/platform-browser";
import { AppRoutingModule } from "./../app/app.routing.module";
import { NgModule } from "@angular/core";
import { AppComponent } from "./app.component";
import { SplashScreenComponent } from "./../app/components/splash-screen.component";
import { HomeComponent } from "./../app/home/home.component";
@NgModule({
declarations: [AppComponent, SplashScreenComponent, HomeComponent],
imports: [BrowserModule, AppRoutingModule],
import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { HomeComponent } from "./../app/home/home.component";
const routes: Routes = [
{
component: HomeComponent,
path: "home"
},
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Angular</title>
<base href="/" />
<link
href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap"
rel="stylesheet"
/>
export enum SplashAnimationType {
SlideLeft = "slide-left",
SlideRight = "slide-right",
FadeOut = "fade-out"
}
import { Component, OnInit, Input } from "@angular/core";
import { SplashAnimationType } from "./splash-animation-type";
@Component({
selector: "splash-screen",
templateUrl: "./splash-screen.component.html",
styleUrls: ["./splash-screen.component.css"]
})
export class SplashScreenComponent implements OnInit {
windowWidth: string;
<div
class="app-splash-screen"
[ngStyle]="{
left: windowWidth,
opacity: opacityChange,
transition: splashTransition
}"
*ngIf="showSplash"
>
<div class="app-splash-inner">
export interface StepModel {
stepIndex: number;
isComplete: boolean;
}