This commit is contained in:
Nicolas Constant 2019-07-06 20:56:19 -04:00
parent 18afb5e538
commit 568b6014c1
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
3 changed files with 22 additions and 24 deletions

View File

@ -1,16 +1,16 @@
<div class="panel" [class.comrad__background]="isComrad">
<h3 class="panel__title" [class.comrad__text]="isComrad">Add new account</h3>
<div class="panel" [class.comrade__background]="isComrade">
<h3 class="panel__title" [class.comrade__text]="isComrade">Add new account</h3>
<h2 class="comrad__title" *ngIf="isComrad">Welcome Comrad!</h2>
<h2 class="comrade__title" *ngIf="isComrade">Welcome Comrade!</h2>
<form (ngSubmit)="onSubmit()">
<label [class.comrad__text]="isComrad">Please provide your <span *ngIf="isComrad">comrad</span> account:</label>
<input type="text" class="form-control form-control-sm form-color" [(ngModel)]="mastodonFullHandle" name="mastodonFullHandle" [class.comrad__input]="isComrad"
<label [class.comrade__text]="isComrade">Please provide your <span *ngIf="isComrade">comrade</span> account:</label>
<input type="text" class="form-control form-control-sm form-color" [(ngModel)]="mastodonFullHandle" name="mastodonFullHandle" [class.comrade__input]="isComrade"
placeholder="@nickname@mastodon.social" />
<br />
<button type="submit" class="btn btn-success btn-sm" [class.comrad__button]="isComrad">Submit</button>
<button type="submit" class="btn btn-success btn-sm" [class.comrade__button]="isComrade">Submit</button>
</form>
<div *ngIf="isComrad" class="comrad__video">
<div *ngIf="isComrade" class="comrade__video">
<iframe width="300" height="170" src="https://www.youtube.com/embed/NzBjnoRG7Mo?feature=oembed&autoplay=1&auto_play=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

View File

@ -18,44 +18,42 @@
padding: 0 5px 0 5px;
}
$comrad_yellow: #ffcc00;
$comrad_red: #a50000;
.comrad {
$comrade_yellow: #ffcc00;
$comrade_red: #a50000;
.comrade {
&__title {
font-size: 18px;
margin-left: 5px;
color: $comrad_yellow;
color: $comrade_yellow;
font-weight: bold;
}
&__text {
color: $comrad_yellow;
color: $comrade_yellow;
}
&__button {
background: $comrad_yellow;
border-color: $comrad_yellow;
color: $comrad_red;
background: $comrade_yellow;
border-color: $comrade_yellow;
color: $comrade_red;
}
&__video {
width: 300px;
// height: 200px;
padding-top: 20px;
margin: auto;
// outline: 1px solid greenyellow;
}
&__input {
color: $comrad_red;
border-color: $comrad_yellow;
background: $comrad_yellow;
color: $comrade_red;
border-color: $comrade_yellow;
background: $comrade_yellow;
}
&__background {
transition: all 3s;
background-image: url("assets/img/juche-background.jpg");
background-color: $comrad_red;
background-color: $comrade_red;
background-position: 0 0;
}
}

View File

@ -18,7 +18,7 @@ export class AddNewAccountComponent implements OnInit {
private username: string;
private instance: string;
isComrad: boolean;
isComrade: boolean;
private _mastodonFullHandle: string;
@Input()
@ -47,13 +47,13 @@ export class AddNewAccountComponent implements OnInit {
let cleanInstance = this.instance.replace('http://', '').replace('https://', '').toLowerCase();
for (let b of this.comradList) {
if (cleanInstance == b || cleanInstance.includes(`.${b}`)) {
this.isComrad = true;
this.isComrade = true;
return;
}
}
}
this.isComrad = false;
this.isComrade = false;
}
onSubmit(): boolean {