mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
prevent css/js caching
This commit is contained in:
parent
b5e4e3fb2e
commit
6f8cca98fc
2
.gitignore
vendored
2
.gitignore
vendored
@ -44,4 +44,4 @@ Temporary Items
|
||||
public/songs
|
||||
public/api
|
||||
taiko.db
|
||||
public/version.json
|
||||
version.json
|
9
app.py
9
app.py
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env python2
|
||||
|
||||
import json
|
||||
import sqlite3
|
||||
import re
|
||||
import os
|
||||
from flask import Flask, g, jsonify
|
||||
from flask import Flask, g, jsonify, render_template
|
||||
|
||||
app = Flask(__name__)
|
||||
DATABASE = 'taiko.db'
|
||||
@ -66,6 +67,12 @@ def close_connection(exception):
|
||||
db.close()
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def route_index():
|
||||
version = json.load(open('version.json', 'r'))
|
||||
return render_template('index.html', version=version)
|
||||
|
||||
|
||||
@app.route('/api/songs')
|
||||
def route_api_songs():
|
||||
songs = query_db('select * from songs where enabled = 1')
|
||||
|
@ -1,62 +0,0 @@
|
||||
<!----------------------------------------------------------------------->
|
||||
<!-- -->
|
||||
<!-- TAIKO WEB TATSUJIN -->
|
||||
<!-- 2015-2018 -->
|
||||
<!-- Created by Clemaister, maintained by Bui -->
|
||||
<!-- https://github.com/bui/taiko-web -->
|
||||
<!-- -->
|
||||
<!----------------------------------------------------------------------->
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>太鼓の達人ウェブ - Taiko no Tatsujin Web</title>
|
||||
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
<link rel="stylesheet" href="/src/css/main.css"/>
|
||||
<link rel="stylesheet" href="/src/css/loader.css">
|
||||
<link rel="stylesheet" href="/src/css/titlescreen.css">
|
||||
<link rel="stylesheet" href="/src/css/loadsong.css">
|
||||
<link rel="stylesheet" href="/src/css/game.css">
|
||||
|
||||
<script src="/src/js/lib/fontdetect.min.js"></script>
|
||||
|
||||
<script src="/src/js/assets.js"></script>
|
||||
<script src="/src/js/loadsong.js"></script>
|
||||
<script src="/src/js/parsesong.js"></script>
|
||||
<script src="/src/js/titlescreen.js"></script>
|
||||
<script src="/src/js/scoresheet.js"></script>
|
||||
<script src="/src/js/songselect.js"></script>
|
||||
<script src="/src/js/keyboard.js"></script>
|
||||
<script src="/src/js/game.js"></script>
|
||||
<script src="/src/js/controller.js"></script>
|
||||
<script src="/src/js/circle.js"></script>
|
||||
<script src="/src/js/view.js"></script>
|
||||
<script src="/src/js/mekadon.js"></script>
|
||||
<script src="/src/js/gamepad.js"></script>
|
||||
<script src="/src/js/tutorial.js"></script>
|
||||
<script src="/src/js/scalablecanvas.js"></script>
|
||||
<script src="/src/js/element.js"></script>
|
||||
<script src="/src/js/soundbuffer.js"></script>
|
||||
<script src="/src/js/p2.js"></script>
|
||||
<script src="/src/js/canvasasset.js"></script>
|
||||
<script src="/src/js/pageevents.js"></script>
|
||||
<script src="/src/js/viewassets.js"></script>
|
||||
<script src="/src/js/gamerules.js"></script>
|
||||
<script src="/src/js/canvasdraw.js"></script>
|
||||
<script src="/src/js/loader.js"></script>
|
||||
<script src="/src/js/canvastest.js"></script>
|
||||
<script src="/src/js/canvascache.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="assets"></div>
|
||||
<div id="screen"></div>
|
||||
<div id="version"></div>
|
||||
<script src="/src/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -14,26 +14,6 @@ class Loader{
|
||||
this.loaderPercentage = document.querySelector("#loader .percentage")
|
||||
this.loaderProgress = document.querySelector("#loader .progress")
|
||||
|
||||
var versionTag = document.getElementById("version")
|
||||
this.ajax("/version.json").then(function(resp){
|
||||
var versionLink = document.createElement("a")
|
||||
versionLink.setAttribute("target", "_blank")
|
||||
versionLink.setAttribute("class", "stroke-sub")
|
||||
|
||||
try {
|
||||
var parsed = JSON.parse(resp)
|
||||
versionLink.setAttribute("href", "https://github.com/bui/taiko-web/commit/" + parsed.commit)
|
||||
var ver_string = "taiko-web ver." + parsed.version + " (" + parsed.commit_short + ")"
|
||||
} catch(e) {
|
||||
versionLink.setAttribute("href", "https://github.com/bui/taiko-web")
|
||||
var ver_string = "taiko-web (unknown version)"
|
||||
} finally {
|
||||
versionLink.appendChild(document.createTextNode(ver_string))
|
||||
versionLink.setAttribute("alt", ver_string)
|
||||
versionTag.appendChild(versionLink)
|
||||
}
|
||||
})
|
||||
|
||||
snd.buffer = new SoundBuffer()
|
||||
snd.musicGain = snd.buffer.createGain()
|
||||
snd.sfxGain = snd.buffer.createGain()
|
||||
|
62
templates/index.html
Normal file
62
templates/index.html
Normal file
@ -0,0 +1,62 @@
|
||||
<!----------------------------------------------------------------------->
|
||||
<!-- -->
|
||||
<!-- TAIKO WEB TATSUJIN -->
|
||||
<!-- 2015-2018 -->
|
||||
<!-- Created by Clemaister, maintained by Bui -->
|
||||
<!-- https://github.com/bui/taiko-web -->
|
||||
<!-- -->
|
||||
<!----------------------------------------------------------------------->
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>太鼓の達人ウェブ - Taiko no Tatsujin Web</title>
|
||||
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
<link rel="stylesheet" href="/src/css/main.css?{{version.commit_short}}"/>
|
||||
<link rel="stylesheet" href="/src/css/loader.css?{{version.commit_short}}">
|
||||
<link rel="stylesheet" href="/src/css/titlescreen.css?{{version.commit_short}}">
|
||||
<link rel="stylesheet" href="/src/css/loadsong.css?{{version.commit_short}}">
|
||||
<link rel="stylesheet" href="/src/css/game.css?{{version.commit_short}}">
|
||||
|
||||
<script src="/src/js/lib/fontdetect.min.js?{{version.commit_short}}"></script>
|
||||
|
||||
<script src="/src/js/assets.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/loadsong.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/parsesong.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/titlescreen.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/scoresheet.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/songselect.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/keyboard.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/game.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/controller.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/circle.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/view.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/mekadon.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/gamepad.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/tutorial.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/scalablecanvas.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/element.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/soundbuffer.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/p2.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/canvasasset.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/pageevents.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/viewassets.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/gamerules.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/canvasdraw.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/loader.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/canvastest.js?{{version.commit_short}}"></script>
|
||||
<script src="/src/js/canvascache.js?{{version.commit_short}}"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="assets"></div>
|
||||
<div id="screen"></div>
|
||||
<div id="version"><a href="https://github.com/bui/taiko-web/commit/{{version.commit}}" target="_blank" class="stroke-sub" alt="taiko-web ver.{{version.version}} ({{version.commit_short}})">taiko-web ver.{{version.version}} ({{version.commit_short}})</a></div>
|
||||
<script src="/src/js/main.js?{{version.commit_short}}"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user