mirror of
https://github.com/csd4ni3l/loginween.git
synced 2025-11-05 05:58:10 +01:00
Move static resources into their own directories
This commit is contained in:
|
Before Width: | Height: | Size: 946 B After Width: | Height: | Size: 946 B |
@@ -6,7 +6,7 @@ function change_setting(category, setting, value) {
|
||||
go("settings", category);
|
||||
}
|
||||
|
||||
function show_settings(category) {
|
||||
function show_settings(category, SETTINGS) {
|
||||
const x = 400;
|
||||
const label_x = 50;
|
||||
const space_between = 100;
|
||||
@@ -99,10 +99,10 @@ function start_game() {
|
||||
horizontal_buttons(10, 10, generated_button_lists, 200, 75, 10);
|
||||
|
||||
if (setting_category != null) {
|
||||
show_settings(setting_category);
|
||||
show_settings(setting_category, SETTINGS);
|
||||
}
|
||||
else {
|
||||
show_settings(Object.keys(SETTINGS)[0]);
|
||||
show_settings(Object.keys(SETTINGS)[0], SETTINGS);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -171,7 +171,7 @@ function setup_pumpkin(canvas_id, clearbtn_id, lightbtn_id, form_id, pattern_fie
|
||||
const canvas = document.getElementById(canvas_id);
|
||||
const ctx = canvas.getContext('2d');
|
||||
const img = new Image();
|
||||
img.src = '/static/pumpkin.png';
|
||||
img.src = '/static/graphics/pumpkin.png';
|
||||
const GRID_SIZE = grid_size;
|
||||
const CELL_SIZE = canvas.width / GRID_SIZE;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function setup_game() {
|
||||
loadSprite("pumpkin", "/static/pumpkin.png");
|
||||
loadSprite("pumpkin", "/static/graphics/pumpkin.png");
|
||||
const SETTINGS = {
|
||||
"Graphics": {
|
||||
"Anti-Aliasing": {"type": "bool", "default": true},
|
||||
@@ -1,5 +1,6 @@
|
||||
function setup_game() {
|
||||
loadSprite("pumpkin", "/static/pumpkin.png");
|
||||
loadSprite("pumpkin", "/static/graphics/pumpkin.png");
|
||||
loadSprite("gravestone", "/static/gravestone.png")
|
||||
const SETTINGS = {
|
||||
"Graphics": {
|
||||
"Anti-Aliasing": {"type": "bool", "default": true},
|
||||
@@ -8,7 +8,7 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=New Rocker&display=swap" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/kaplay@3001.0.12/dist/kaplay.js"></script>
|
||||
<script src="/static/pumpkin.js"></script>
|
||||
<script src="/static/js/pumpkin.js"></script>
|
||||
<title>{% block title %} {% endblock %}</title>
|
||||
<style>
|
||||
.spider-web-1 {
|
||||
|
||||
@@ -57,7 +57,7 @@ function update() {
|
||||
let year = current_time.getFullYear();
|
||||
|
||||
const halloween_time = new Date(year, 9, 31);
|
||||
const after_halloween = new Date(year, 15, 1);
|
||||
const after_halloween = new Date(year, 10, 1);
|
||||
|
||||
if (current_time > halloween_time) {
|
||||
if (current_time < after_halloween) {
|
||||
@@ -65,7 +65,7 @@ function update() {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
halloween.setFullYear(year + 1);
|
||||
halloween_time.setFullYear(year + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<canvas width="1280", height="720" id="canvas"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/gameui.js"></script>
|
||||
<script src="/static/game.js"></script>
|
||||
<script src="/static/pumpkin_memory.js"></script>
|
||||
<script src="/static/js/gameui.js"></script>
|
||||
<script src="/static/js/game.js"></script>
|
||||
<script src="/static/js/pumpkin_memory.js"></script>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
start_game();
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
<canvas width="1280", height="720" id="canvas"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/gameui.js"></script>
|
||||
<script src="/static/game.js"></script>
|
||||
<script src="/static/pumpkin_roll.js"></script>
|
||||
<script src="/static/js/gameui.js"></script>
|
||||
<script src="/static/js/game.js"></script>
|
||||
<script src="/static/js/pumpkin_roll.js"></script>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
start_game();
|
||||
|
||||
Reference in New Issue
Block a user