Print styles

This commit is contained in:
Codrin Pavel
2019-12-01 00:38:56 +02:00
parent d2e6d846dd
commit 9c21655ac4
12 changed files with 53 additions and 18 deletions
+3 -5
View File
@@ -32,11 +32,11 @@ function initApp (data, callback, callbackData) {
var mapData = data.results[1].result.response; var mapData = data.results[1].result.response;
console.log('data', JSON.parse( JSON.stringify(data)) ); console.log('data', JSON.parse( JSON.stringify(data)) );
enhanceMap(mapData.enemySlots); enhanceMap(mapData.enemySlots);
enhanceMap(mapData.ourSlots); enhanceMap(mapData.ourSlots);
app.map = mapData; app.map = mapData;
app.map.warDate = data.date;
console.log('app.map', JSON.parse( JSON.stringify(mapData)) ); console.log('app.map', JSON.parse( JSON.stringify(mapData)) );
@@ -60,10 +60,8 @@ function initApp (data, callback, callbackData) {
var app = new Vue({ var app = new Vue({
el : '#app', el : '#app',
data : { data : {
// the data obtained from the game map: {}, //mapData, the data obtained from the game
map: {}, //mapData, mapSlots: mapSlots, // maps building names and types of data obtained from the game
// maps building names and types of data obtained from the game
mapSlots: mapSlots,
storage: JSON.parse( localStorage.getItem('HeroWarsHistory') ) || [] storage: JSON.parse( localStorage.getItem('HeroWarsHistory') ) || []
}, },
computed: { computed: {
+20
View File
@@ -0,0 +1,20 @@
@media print {
@page {
margin: 0;
}
body {
padding: 0;
}
header,
[type="checkbox"] {
display: none;
}
.war .team__details {
margin-left: 0;
color: black;
font-weight: 400;
}
}
+4 -1
View File
@@ -21,5 +21,8 @@
"modules/buttons", "modules/buttons",
"modules/war", "modules/war",
"modules/hamburger", "modules/hamburger",
"modules/header" "modules/header",
// Print
"base/print"
; ;
+2
View File
@@ -9,6 +9,8 @@ header {
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
background: $white;
z-index: 1000;
.form { .form {
display: flex; display: flex;
+10 -6
View File
@@ -1,18 +1,22 @@
.war { .war {
h1 {
date {
display: block;
font-size: 16px;
color: $gray;
}
}
.row { .row {
justify-content: center; justify-content: center;
} }
h4 {
margin-left: 8px;
}
.team { .team {
display: flex; display: flex;
align-items: center; align-items: center;
color: #666; color: $gray;
line-height: 1.2; line-height: 1.2;
padding: 2px 8px; padding: 2px 8px;
margin: 0 -8px;
&.is--hover { &.is--hover {
outline: 2px solid gold; outline: 2px solid gold;
@@ -44,7 +48,7 @@
border-radius: 50%; border-radius: 50%;
vertical-align: middle; vertical-align: middle;
margin: 1px; margin: 1px;
border: 1px solid grey; border: 1px solid $gray;
display: none; display: none;
} }
+2
View File
@@ -1,2 +1,4 @@
$black: #000; $black: #000;
$white: #fff; $white: #fff;
$gray: #666;
+4 -1
View File
@@ -14,7 +14,10 @@ layout: default
</nav> </nav>
<section v-if="orderedAllies.length"> <section v-if="orderedAllies.length">
<h1 v-if="orderedAllies.length">{{ map.ourSlots[1].user.clanTitle }} VS. {{ map.enemyClan.title }}</h1> <h1 v-if="orderedAllies.length">
{{ map.ourSlots[1].user.clanTitle }} VS. {{ map.enemyClan.title }}
<date>{{ map.warDate | unixToLocale }}</date>
</h1>
<div class="row"> <div class="row">
<div class="col col-3"> <div class="col col-3">
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -59,7 +59,10 @@
</nav> </nav>
<section v-if="orderedAllies.length"> <section v-if="orderedAllies.length">
<h1 v-if="orderedAllies.length">{{ map.ourSlots[1].user.clanTitle }} VS. {{ map.enemyClan.title }}</h1> <h1 v-if="orderedAllies.length">
{{ map.ourSlots[1].user.clanTitle }} VS. {{ map.enemyClan.title }}
<date>{{ map.warDate | unixToLocale }}</date>
</h1>
<div class="row"> <div class="row">
<div class="col col-3"> <div class="col col-3">
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long