Added some styling
This commit is contained in:
parent
c568f1c9d2
commit
48d3d7b47b
@ -22,6 +22,7 @@
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/custom-theme.scss",
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": [],
|
||||
@ -155,4 +156,4 @@
|
||||
}
|
||||
},
|
||||
"defaultProject": "ZaksCode"
|
||||
}
|
||||
}
|
@ -12,14 +12,17 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~7.2.0",
|
||||
"@angular/cdk": "~7.3.7",
|
||||
"@angular/common": "~7.2.0",
|
||||
"@angular/compiler": "~7.2.0",
|
||||
"@angular/core": "~7.2.0",
|
||||
"@angular/forms": "~7.2.0",
|
||||
"@angular/material": "^7.3.7",
|
||||
"@angular/platform-browser": "~7.2.0",
|
||||
"@angular/platform-browser-dynamic": "~7.2.0",
|
||||
"@angular/router": "~7.2.0",
|
||||
"core-js": "^2.5.4",
|
||||
"hammerjs": "^2.0.8",
|
||||
"rxjs": "~6.3.3",
|
||||
"tslib": "^1.9.0",
|
||||
"zone.js": "~0.8.26"
|
||||
@ -29,9 +32,9 @@
|
||||
"@angular/cli": "~7.3.8",
|
||||
"@angular/compiler-cli": "~7.2.0",
|
||||
"@angular/language-service": "~7.2.0",
|
||||
"@types/node": "~8.9.4",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "~4.5.0",
|
||||
"jasmine-core": "~2.99.1",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
@ -45,4 +48,4 @@
|
||||
"tslint": "~5.11.0",
|
||||
"typescript": "~3.2.2"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +1,22 @@
|
||||
<!--The content below is only a placeholder and can be replaced.-->
|
||||
<div style="text-align:center">
|
||||
<h1>
|
||||
Welcome to {{ title }}!
|
||||
</h1>
|
||||
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
|
||||
</div>
|
||||
<h2>Here are some links to help you start: </h2>
|
||||
<ul>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="w-100">
|
||||
<div class="d-flex justify-content-center align-items-center" style="height: 600px">
|
||||
<div>
|
||||
<typewriter text="Why do kamazki pilots wear helmets?"></typewriter>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container bg-white">
|
||||
<div style="transform: translateY(-25%)">
|
||||
<mat-card style="max-width: 450px">
|
||||
Test
|
||||
</mat-card>
|
||||
</div>
|
||||
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
|
||||
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
|
||||
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
|
||||
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
|
||||
</div>
|
||||
<footer class="my-5">
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
@ -2,13 +2,21 @@ import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import {MaterialModule} from './material.module';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {TypewriterComponent} from './typewriter/typewriter.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
AppComponent,
|
||||
TypewriterComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule
|
||||
BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
FormsModule,
|
||||
MaterialModule
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
|
12
src/app/material.module.ts
Normal file
12
src/app/material.module.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatCardModule} from '@angular/material';
|
||||
|
||||
const MODULES = [
|
||||
MatCardModule
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [MODULES],
|
||||
exports: [MODULES]
|
||||
})
|
||||
export class MaterialModule {}
|
20
src/app/typewriter/typewriter.component.scss
Normal file
20
src/app/typewriter/typewriter.component.scss
Normal file
@ -0,0 +1,20 @@
|
||||
.typewriter h1 {
|
||||
color: white;
|
||||
overflow: hidden;
|
||||
border-right: .15em solid white;
|
||||
white-space: nowrap;
|
||||
margin: 0 auto;
|
||||
letter-spacing: .15em;
|
||||
animation: blink-caret 1s step-end infinite;
|
||||
display: inline;
|
||||
|
||||
@keyframes typing {
|
||||
from { width: 0 }
|
||||
to { width: 100% }
|
||||
}
|
||||
|
||||
@keyframes blink-caret {
|
||||
from, to { border-color: transparent }
|
||||
50% { border-color: white; }
|
||||
}
|
||||
}
|
28
src/app/typewriter/typewriter.component.ts
Normal file
28
src/app/typewriter/typewriter.component.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {timer} from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'typewriter',
|
||||
template: `<div class="d-inline typewriter"><h1>{{output}}</h1></div>`,
|
||||
styleUrls: ['typewriter.component.scss']
|
||||
})
|
||||
export class TypewriterComponent {
|
||||
@Input() text: string;
|
||||
|
||||
done = true;
|
||||
output: string;
|
||||
|
||||
constructor() {
|
||||
timer(1500, 100).subscribe(() => {
|
||||
console.log('fire');
|
||||
if(this.done && this.text) {
|
||||
this.output = '';
|
||||
this.done = false;
|
||||
}
|
||||
|
||||
this.output += this.text.slice(0, 1);
|
||||
this.text = this.text.slice(1);
|
||||
if(!this.text) this.done = true;
|
||||
});
|
||||
}
|
||||
}
|
BIN
src/assets/background.jpg
Normal file
BIN
src/assets/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 595 KiB |
9
src/custom-theme.scss
Normal file
9
src/custom-theme.scss
Normal file
@ -0,0 +1,9 @@
|
||||
@import '~@angular/material/theming';
|
||||
@include mat-core();
|
||||
|
||||
$ZaksCode-primary: mat-palette($mat-indigo);
|
||||
$ZaksCode-accent: mat-palette($mat-pink, A200, A100, A400);
|
||||
$ZaksCode-warn: mat-palette($mat-red);
|
||||
$ZaksCode-theme: mat-light-theme($ZaksCode-primary, $ZaksCode-accent, $ZaksCode-warn);
|
||||
|
||||
@include angular-material-theme($ZaksCode-theme);
|
@ -7,6 +7,8 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="assets/logo.png">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'hammerjs';
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
|
@ -1 +1,11 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
@import url("https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css");
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||
background: #ffffff url("/assets/background.jpg") no-repeat fixed center;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user