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

View File

@@ -32,11 +32,11 @@ function initApp (data, callback, callbackData) {
var mapData = data.results[1].result.response;
console.log('data', JSON.parse( JSON.stringify(data)) );
enhanceMap(mapData.enemySlots);
enhanceMap(mapData.ourSlots);
app.map = mapData;
app.map.warDate = data.date;
console.log('app.map', JSON.parse( JSON.stringify(mapData)) );
@@ -60,10 +60,8 @@ function initApp (data, callback, callbackData) {
var app = new Vue({
el : '#app',
data : {
// the data obtained from the game
map: {}, //mapData,
// maps building names and types of data obtained from the game
mapSlots: mapSlots,
map: {}, //mapData, the data obtained from the game
mapSlots: mapSlots, // maps building names and types of data obtained from the game
storage: JSON.parse( localStorage.getItem('HeroWarsHistory') ) || []
},
computed: {

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;
}
}

View File

@@ -21,5 +21,8 @@
"modules/buttons",
"modules/war",
"modules/hamburger",
"modules/header"
"modules/header",
// Print
"base/print"
;

View File

@@ -9,6 +9,8 @@ header {
top: 0;
left: 0;
width: 100%;
background: $white;
z-index: 1000;
.form {
display: flex;

View File

@@ -1,18 +1,22 @@
.war {
h1 {
date {
display: block;
font-size: 16px;
color: $gray;
}
}
.row {
justify-content: center;
}
h4 {
margin-left: 8px;
}
.team {
display: flex;
align-items: center;
color: #666;
color: $gray;
line-height: 1.2;
padding: 2px 8px;
margin: 0 -8px;
&.is--hover {
outline: 2px solid gold;
@@ -44,7 +48,7 @@
border-radius: 50%;
vertical-align: middle;
margin: 1px;
border: 1px solid grey;
border: 1px solid $gray;
display: none;
}

View File

@@ -1,2 +1,4 @@
$black: #000;
$white: #fff;
$gray: #666;