mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
Optimizations for dynamic background, pinned background to image 0 for development of the UI, tweaked menu button css.
This commit is contained in:
parent
0ec64e6ded
commit
2c7dc16247
@ -273,11 +273,12 @@ body, html, div {
|
|||||||
font-family: 'Avenir Book';
|
font-family: 'Avenir Book';
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu_img {
|
#menu_img {
|
||||||
height:15px;
|
height: 11px;
|
||||||
margin-left:-2px;
|
margin-left: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu_text {
|
#menu_text {
|
||||||
@ -286,6 +287,6 @@ body, html, div {
|
|||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
text-shadow: 0px 0px 0px #bebcbb;
|
text-shadow: 0px 0px 0px #bebcbb;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 24px;
|
line-height: 30px;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
@ -4,10 +4,9 @@
|
|||||||
<title>Westeroscraft Launcher</title>
|
<title>Westeroscraft Launcher</title>
|
||||||
<script src="./assets/js/script.js"></script>
|
<script src="./assets/js/script.js"></script>
|
||||||
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
|
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
|
||||||
<% let bkid = Math.floor((Math.random() * 5)); %>
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: url('assets/images/backgrounds/<%=bkid%>.jpg') no-repeat center center fixed;
|
background: url('assets/images/backgrounds/<%=0%>.jpg') no-repeat center center fixed;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -48,7 +47,6 @@
|
|||||||
<div class="bot_wrapper">
|
<div class="bot_wrapper">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<button id="menu_button">
|
<button id="menu_button">
|
||||||
<!--<% include assets/images/icons/arrow.svg %>-->
|
|
||||||
<img src="assets/images/icons/arrow.svg" id="menu_img"/>
|
<img src="assets/images/icons/arrow.svg" id="menu_img"/>
|
||||||
<span id="menu_text">MENU</span>
|
<span id="menu_text">MENU</span>
|
||||||
</button>
|
</button>
|
||||||
|
3
index.js
3
index.js
@ -1,6 +1,7 @@
|
|||||||
const {app, BrowserWindow} = require('electron')
|
const {app, BrowserWindow} = require('electron')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const url = require('url')
|
const url = require('url')
|
||||||
|
const fs = require('fs')
|
||||||
const ejse = require('ejs-electron')
|
const ejse = require('ejs-electron')
|
||||||
|
|
||||||
// Keep a global reference of the window object, if you don't, the window will
|
// Keep a global reference of the window object, if you don't, the window will
|
||||||
@ -10,6 +11,8 @@ let win
|
|||||||
function createWindow() {
|
function createWindow() {
|
||||||
win = new BrowserWindow({ width: 980, height: 552, icon: getPlatformIcon('WesterosSealSquare'), frame: false})
|
win = new BrowserWindow({ width: 980, height: 552, icon: getPlatformIcon('WesterosSealSquare'), frame: false})
|
||||||
|
|
||||||
|
ejse.data('bkid', Math.floor((Math.random() * fs.readdirSync('app/assets/images/backgrounds').length)))
|
||||||
|
|
||||||
win.loadURL(url.format({
|
win.loadURL(url.format({
|
||||||
pathname: path.join(__dirname, 'app', 'index.ejs'),
|
pathname: path.join(__dirname, 'app', 'index.ejs'),
|
||||||
protocol: 'file:',
|
protocol: 'file:',
|
||||||
|
Loading…
Reference in New Issue
Block a user