mirror of
https://github.com/open-goal/launcher.git
synced 2024-10-20 04:57:38 -04:00
add AdventPro
font and some other minor adjustments
This commit is contained in:
parent
c782d29d4b
commit
0a8da463ab
|
@ -1,5 +1,7 @@
|
||||||
|
// TODO some minimal templating might help - https://olado.github.io/doT/index.html
|
||||||
|
|
||||||
export const jak1_sidebar = `<div class="games">
|
export const jak1_sidebar = `<div class="games">
|
||||||
<div class="jak-1 nav-item">
|
<div class="jak-1 nav-item active">
|
||||||
<a data-tooltip="Jak & Daxter: The Precursor Legacy">
|
<a data-tooltip="Jak & Daxter: The Precursor Legacy">
|
||||||
<img src="src/assets/images/jak-tpl.png">
|
<img src="src/assets/images/jak-tpl.png">
|
||||||
</a>
|
</a>
|
||||||
|
@ -36,8 +38,5 @@ export const jak1_main = `<div class="flex-center">
|
||||||
<img id="logo" width="65%" src="src/assets/images/logo.png">
|
<img id="logo" width="65%" src="src/assets/images/logo.png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="buttons">
|
<div class="buttons" id="launcherControls"></div>
|
||||||
<button class="config">CONFIG</button>
|
|
||||||
<button class="play">PLAY</button>
|
|
||||||
</div>
|
|
||||||
</div>`;
|
</div>`;
|
15
index.html
15
index.html
|
@ -17,18 +17,18 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="games">
|
<div class="games">
|
||||||
<div class="jak-1 nav-item">
|
<div class="jak-1 nav-item active">
|
||||||
<a data-tooltip="Jak & Daxter: The Precursor Legacy">
|
<a data-tooltip="Jak & Daxter: The Precursor Legacy">
|
||||||
<img src="src/assets/images/jak-tpl.png">
|
<img src="src/assets/images/jak-tpl.png">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="jak-2 nav-item">
|
<div class="jak-2 nav-item disabled">
|
||||||
<a data-tooltip="Jak 2">
|
<a data-tooltip="Jak 2 - Not Available!">
|
||||||
<img src="src/assets/images/jak-2.png">
|
<img src="src/assets/images/jak-2.png">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="jak-3 nav-item">
|
<div class="jak-3 nav-item disabled">
|
||||||
<a data-tooltip="Jak 3">
|
<a data-tooltip="Jak 3 - Not Available!">
|
||||||
<img src="src/assets/images/jak-3.png">
|
<img src="src/assets/images/jak-3.png">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,10 +55,7 @@
|
||||||
<img id="logo" width="65%" src="src/assets/images/logo.png">
|
<img id="logo" width="65%" src="src/assets/images/logo.png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="buttons">
|
<div class="buttons" id="launcherControls"></div>
|
||||||
<button class="config">CONFIG</button>
|
|
||||||
<button class="play">PLAY</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
48
main.js
48
main.js
|
@ -26,15 +26,51 @@ sidebar.onclick = e => {
|
||||||
document.querySelector('.main').innerHTML = files_pane;
|
document.querySelector('.main').innerHTML = files_pane;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
renderControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
const playBTN = document.querySelector('.play');
|
class SupportedGame {
|
||||||
const configBTN = document.querySelector('.config');
|
static Jak1 = new SupportedGame("Jak 1")
|
||||||
|
static Jak2 = new SupportedGame("Jak 2")
|
||||||
|
static Jak3 = new SupportedGame("Jak 3")
|
||||||
|
static JakX = new SupportedGame("Jak X")
|
||||||
|
|
||||||
playBTN.onclick = () => {
|
constructor(name) {
|
||||||
|
this.name = name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isGameSetup(supportedGame) {
|
||||||
|
if (supportedGame == SupportedGame.Jak1) {
|
||||||
|
// TODO - check the installation directory and such, wherever that ends up being
|
||||||
|
// return false for now
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO - detect last played game, right now its assumed that jak 1 is always selected by default
|
||||||
|
let activeGame = SupportedGame.Jak1;
|
||||||
|
|
||||||
|
renderControls();
|
||||||
|
|
||||||
|
function renderControls() {
|
||||||
|
if (document.getElementById("launcherControls") == undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isGameSetup(activeGame)) {
|
||||||
|
document.getElementById("launcherControls").innerHTML += `<button id="configBtn">CONFIG</button><button id="playBtn">PLAY</button>`;
|
||||||
|
document.getElementById("playBtn").onclick = () => {
|
||||||
launchGame();
|
launchGame();
|
||||||
}
|
}
|
||||||
|
document.getElementById("configBtn").onclick = () => {
|
||||||
configBTN.onclick = () => {
|
// TODO
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
document.getElementById("launcherControls").innerHTML += `<button id="setupBtn">SETUP</button>`;
|
||||||
|
document.getElementById("setupBtn").onclick = () => {
|
||||||
isoSeries();
|
isoSeries();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
BIN
src/assets/fonts/AdventPro-Bold.ttf
Normal file
BIN
src/assets/fonts/AdventPro-Bold.ttf
Normal file
Binary file not shown.
BIN
src/assets/fonts/AdventPro-Regular.ttf
Normal file
BIN
src/assets/fonts/AdventPro-Regular.ttf
Normal file
Binary file not shown.
94
src/assets/fonts/OFL.txt
Normal file
94
src/assets/fonts/OFL.txt
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
Copyright (c) 2011, Andreas Kalpakides (hello@inderesting.com),
|
||||||
|
with Reserved Font Name "Advent Pro".
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
48
style.css
48
style.css
|
@ -1,25 +1,33 @@
|
||||||
* {
|
* {
|
||||||
-webkit-user-drag: none;
|
-webkit-user-drag: none;
|
||||||
|
font-family: 'AdventPro', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--bg-blue: #1B202B;
|
--bg-blue: #1B202B;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'AdventPro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url('src/assets/fonts/AdventPro-Regular.ttf');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'AdventPro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
src: url('src/assets/fonts/AdventPro-Bold.ttf');
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
#app {
|
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
text-align: center;
|
|
||||||
color: #2c3e50;
|
|
||||||
margin-top: 60px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-container {
|
.video-container {
|
||||||
|
@ -77,12 +85,21 @@ body {
|
||||||
opacity: 50%;
|
opacity: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-item.active {
|
||||||
|
filter: grayscale(0%);
|
||||||
|
}
|
||||||
|
|
||||||
.nav-item:hover {
|
.nav-item:hover {
|
||||||
filter: grayscale(0%);
|
filter: grayscale(0%);
|
||||||
opacity: 100%;
|
opacity: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-item.disabled:hover, .nav-item.disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
filter: grayscale(100%);
|
||||||
|
}
|
||||||
|
|
||||||
.nav-item a::before,
|
.nav-item a::before,
|
||||||
.nav-item a::after {
|
.nav-item a::after {
|
||||||
--scale: 0;
|
--scale: 0;
|
||||||
|
@ -158,12 +175,20 @@ body {
|
||||||
font-size: x-large;
|
font-size: x-large;
|
||||||
letter-spacing: 3px;
|
letter-spacing: 3px;
|
||||||
color: white;
|
color: white;
|
||||||
box-shadow: 0px 0px 20px rgba(0, 0, 0, .5);
|
border: black 1px solid;
|
||||||
text-shadow: 0 0 5px black;
|
text-shadow:
|
||||||
|
-1px -1px 0 #000,
|
||||||
|
1px -1px 0 #000,
|
||||||
|
-1px 1px 0 #000,
|
||||||
|
1px 1px 0 #000;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
transition: all 0.1s ease;
|
transition: all 0.1s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.buttons > button:not(:last-child) {
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
.buttons button:active {
|
.buttons button:active {
|
||||||
transform: scale(0.9);
|
transform: scale(0.9);
|
||||||
box-shadow: 0px 0px 20px rgba(0, 0, 0, 1);
|
box-shadow: 0px 0px 20px rgba(0, 0, 0, 1);
|
||||||
|
@ -171,4 +196,5 @@ body {
|
||||||
|
|
||||||
.buttons button:hover {
|
.buttons button:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
color: orange;
|
||||||
}
|
}
|
Loading…
Reference in a new issue