Use sass to drop duplicated background image definition

pull/56/head
HardiReady 2019-02-19 20:29:37 +01:00
parent 7bd8f47da8
commit 66e5b2db9e
10 changed files with 33 additions and 72 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "opt-cc", "name": "opt-cc",
"version": "1.9.2", "version": "1.9.3",
"author": "Florian Hartwich <hardi@noarch.de>", "author": "Florian Hartwich <hardi@noarch.de>",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -1,17 +1,4 @@
:host { @import url('../../style/background-image.scss');
display: flow-root;
height: 100%;
min-height: 100vh;
width: 100%;
margin-top: -23px;
padding-top: 23px;
padding-bottom: 23px;
background-image: url('../../../assets/bg.jpg');
background-size: cover;
background-attachment: fixed;
background-position: top;
background-repeat: no-repeat;
}
.army-member-view { .army-member-view {
width: 90%; width: 90%;

View File

@ -1,9 +1,8 @@
import {Component, Inject, OnDestroy, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {Award, User} from '../../models/model-interfaces'; import {Award, User} from '../../models/model-interfaces';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {UserService} from '../../services/army-management/user.service'; import {UserService} from '../../services/army-management/user.service';
import {Subscription} from 'rxjs/Subscription'; import {Subscription} from 'rxjs/Subscription';
import {RouteConfig} from '../../app.config';
import {AwardingService} from '../../services/army-management/awarding.service'; import {AwardingService} from '../../services/army-management/awarding.service';
import {Fraction} from '../../utils/fraction.enum'; import {Fraction} from '../../utils/fraction.enum';
import {Location} from '@angular/common'; import {Location} from '@angular/common';
@ -11,7 +10,7 @@ import {Location} from '@angular/common';
@Component({ @Component({
selector: 'army-member', selector: 'army-member',
templateUrl: './army-member.component.html', templateUrl: './army-member.component.html',
styleUrls: ['./army-member.component.css'] styleUrls: ['./army-member.component.scss']
}) })
export class ArmyMemberComponent implements OnInit { export class ArmyMemberComponent implements OnInit {
@ -35,7 +34,6 @@ export class ArmyMemberComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.subscription = this.route.params this.subscription = this.route.params
.map(params => params['id']) .map(params => params['id'])
.filter(id => id !== undefined) .filter(id => id !== undefined)

View File

@ -0,0 +1,24 @@
@import url('../style/background-image.scss');
.army-column {
width: 45%;
}
h1 {
text-align: center;
}
.army-head {
font-weight: bolder;
text-align: center
}
.member-count {
margin-top: 15px;
padding: 8px;
text-align: center;
font-weight: bold;
color: whitesmoke;
background: #222222;
border-radius: 12px;
}

View File

@ -8,7 +8,7 @@ import {Fraction} from '../utils/fraction.enum';
@Component({ @Component({
selector: 'cc-army', selector: 'cc-army',
templateUrl: './army.component.html', templateUrl: './army.component.html',
styleUrls: ['./army.component.css'] styleUrls: ['./army.component.scss']
}) })
export class ArmyComponent implements OnInit { export class ArmyComponent implements OnInit {

View File

@ -1,16 +1,4 @@
:host { @import url('../../style/background-image.scss');
display: flow-root;
height: 100%;
width: 100%;
margin-top: -23px;
padding-top: 23px;
padding-bottom: 23px;
background-image: url('../../../assets/bg.jpg');
background-size: cover;
background-attachment: fixed;
background-position: top;
background-repeat: no-repeat;
}
h1 { h1 {
margin-bottom: 30px; margin-bottom: 30px;

View File

@ -12,7 +12,7 @@ import {Location} from '@angular/common';
@Component({ @Component({
selector: 'cc-decoration-overview', selector: 'cc-decoration-overview',
templateUrl: './decoration-overview.component.html', templateUrl: './decoration-overview.component.html',
styleUrls: ['./decoration-overview.component.css'] styleUrls: ['./decoration-overview.component.scss']
}) })
export class DecorationOverviewComponent implements OnInit, OnDestroy { export class DecorationOverviewComponent implements OnInit, OnDestroy {

View File

@ -1,17 +1,4 @@
:host { @import url('../../style/background-image.scss');
display: flow-root;
height: 100%;
min-height: 100vh;
width: 100%;
margin-top: -23px;
padding-top: 23px;
padding-bottom: 23px;
background-image: url('../../../assets/bg.jpg');
background-size: cover;
background-attachment: fixed;
background-position: top;
background-repeat: no-repeat;
}
table { table {
width: 100%; width: 100%;

View File

@ -10,7 +10,7 @@ import {UserListSheetComponent} from '../user-list-sheet/user-list-sheet.compone
@Component({ @Component({
selector: 'cc-rank-overview', selector: 'cc-rank-overview',
templateUrl: './rank-overview.component.html', templateUrl: './rank-overview.component.html',
styleUrls: ['./rank-overview.component.css'] styleUrls: ['./rank-overview.component.scss']
}) })
export class RankOverviewComponent implements OnInit, OnDestroy { export class RankOverviewComponent implements OnInit, OnDestroy {

View File

@ -12,26 +12,3 @@
background-position: top; background-position: top;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.army-column {
width: 45%;
}
h1 {
text-align: center;
}
.army-head {
font-weight: bolder;
text-align: center
}
.member-count {
margin-top: 15px;
padding: 8px;
text-align: center;
font-weight: bold;
color: whitesmoke;
background: #222222;
border-radius: 12px;
}