fixes and mobile tweaks

This commit is contained in:
ntr 2019-11-05 15:31:52 +11:00
parent dfb796fd50
commit c317627a14
5 changed files with 59 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -85,6 +85,7 @@
width: 100%; width: 100%;
display: grid; display: grid;
grid-area: left;
grid-template-columns: 1fr 2fr; grid-template-columns: 1fr 2fr;
grid-template-areas: grid-template-areas:
"skills effects"; "skills effects";
@ -92,6 +93,7 @@
.right { .right {
display: grid; display: grid;
grid-area: right;
grid-template-rows: minmax(min-content, 1fr) min-content min-content; grid-template-rows: minmax(min-content, 1fr) min-content min-content;
grid-template-areas: grid-template-areas:
"avatar" "avatar"

View File

@ -24,12 +24,15 @@
} }
.game { .game {
.team, #targeting, .resolving-skill { .team, #targeting, .resolving-skill {
width: calc(90% - 3em); width: calc(90% - 3em);
} }
.game-construct { .game-construct {
grid-template-columns: 1fr;
grid-template-rows: min-content 1fr;
.avatar { .avatar {
grid-area: initial; grid-area: initial;
position: absolute; position: absolute;
@ -43,6 +46,51 @@
height: 1em; height: 1em;
} }
} }
.skills {
button[disabled] {
display: none;
}
}
.skill-description {
font-size: 75%;
}
.effects {
font-size: 1em;
}
.player {
.game-construct {
grid-template-areas:
"left"
"right";
.left {
grid-template-columns: 1fr;
grid-template-rows: 1fr min-content;
grid-template-areas:
"skills"
"effects";
}
}
}
.opponent {
.game-construct {
grid-template-rows: 2fr min-content;
grid-template-rows: 1fr;
grid-template-areas:
"right"
"left";
}
.avatar {
bottom: 0px;
}
}
} }
.instance-construct { .instance-construct {
@ -61,11 +109,5 @@
z-index: -1; z-index: -1;
} }
} }
.opponent {
.avatar {
bottom: 0;
}
}
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "mnml", "name": "MNML",
"description": "mnml pvp atbs", "description": "abstract strategy",
"short_name": "mnml", "short_name": "MNML",
"icons": [ "icons": [
{ {
"src": "./assets/icons/mnml.png", "src": "./assets/icons/mnml.png",
@ -16,6 +16,7 @@
], ],
"start_url": "/index.html", "start_url": "/index.html",
"display": "fullscreen", "display": "fullscreen",
"orientation": "landscape",
"theme_color": "#000000", "theme_color": "#000000",
"background_color": "#000000" "background_color": "#000000"
} }

View File

@ -12,7 +12,7 @@ const { tutorialVbox } = require('./tutorial.utils');
function registerEvents(store) { function registerEvents(store) {
function notify(msg) { function notify(msg) {
if (Notification && Notification.permission === 'granted') { if (window.Notification && window.Notification.permission === 'granted') {
const n = new Notification('MNML', { const n = new Notification('MNML', {
body: msg, body: msg,
tag: 'MNML', tag: 'MNML',
@ -134,12 +134,12 @@ function registerEvents(store) {
} }
function setAccount(account) { function setAccount(account) {
if (account) { if (account && process.env.NODE_ENV !== 'development') {
LogRocket.init('yh0dy3/mnml'); LogRocket.init('yh0dy3/mnml');
LogRocket.identify(account.id, account); LogRocket.identify(account.id, account);
if (Notification) { if (window.Notification) {
Notification.requestPermission(); window.Notification.requestPermission();
} }
} }