Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
235a282d
Commit
235a282d
authored
Feb 06, 2019
by
Bui
Committed by
Gitea
Feb 06, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'assets-css' of bui/taiko-web into master
parents
a921b38e
4be9334b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
14 deletions
+28
-14
app.py
app.py
+13
-4
public/src/js/about.js
public/src/js/about.js
+1
-4
public/src/js/assets.js
public/src/js/assets.js
+4
-0
public/src/js/loader.js
public/src/js/loader.js
+7
-1
templates/index.html
templates/index.html
+3
-5
No files found.
app.py
View file @
235a282d
...
@@ -11,6 +11,7 @@ from ffmpy import FFmpeg
...
@@ -11,6 +11,7 @@ from ffmpy import FFmpeg
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
DATABASE
=
'taiko.db'
DATABASE
=
'taiko.db'
DEFAULT_URL
=
'https://github.com/bui/taiko-web/'
def
get_db
():
def
get_db
():
...
@@ -119,9 +120,17 @@ def get_tja_preview(tja):
...
@@ -119,9 +120,17 @@ def get_tja_preview(tja):
def
get_version
():
def
get_version
():
version
=
None
version
=
{
'commit'
:
None
,
'commit_short'
:
''
,
'version'
:
None
,
'url'
:
DEFAULT_URL
}
if
os
.
path
.
isfile
(
'version.json'
):
if
os
.
path
.
isfile
(
'version.json'
):
version
=
json
.
load
(
open
(
'version.json'
,
'r'
))
try
:
ver
=
json
.
load
(
open
(
'version.json'
,
'r'
))
except
ValueError
:
print
(
'Invalid version.json file'
)
return
version
for
key
in
version
.
keys
():
if
ver
.
get
(
key
):
version
[
key
]
=
ver
.
get
(
key
)
return
version
return
version
...
@@ -213,10 +222,10 @@ def make_preview(song_id, song_type):
...
@@ -213,10 +222,10 @@ def make_preview(song_id, song_type):
if
os
.
path
.
isfile
(
song_path
)
and
not
os
.
path
.
isfile
(
prev_path
):
if
os
.
path
.
isfile
(
song_path
)
and
not
os
.
path
.
isfile
(
prev_path
):
preview
=
get_preview
(
song_id
,
song_type
)
/
1000
preview
=
get_preview
(
song_id
,
song_type
)
/
1000
if
not
preview
or
preview
<=
0.1
:
if
not
preview
or
preview
<=
0.1
:
print
'Skipping #
%
s due to no preview'
%
song_id
print
(
'Skipping #
%
s due to no preview'
%
song_id
)
return
False
return
False
print
'Making preview.mp3 for song #
%
s'
%
song_id
print
(
'Making preview.mp3 for song #
%
s'
%
song_id
)
ff
=
FFmpeg
(
inputs
=
{
song_path
:
'-ss
%
s'
%
preview
},
ff
=
FFmpeg
(
inputs
=
{
song_path
:
'-ss
%
s'
%
preview
},
outputs
=
{
prev_path
:
'-codec:a libmp3lame -ar 32000 -b:a 92k -y -loglevel panic'
})
outputs
=
{
prev_path
:
'-codec:a libmp3lame -ar 32000 -b:a 92k -y -loglevel panic'
})
ff
.
run
()
ff
.
run
()
...
...
public/src/js/about.js
View file @
235a282d
...
@@ -29,10 +29,7 @@
...
@@ -29,10 +29,7 @@
this
.
endButton
.
innerText
=
strings
.
tutorial
.
ok
this
.
endButton
.
innerText
=
strings
.
tutorial
.
ok
this
.
endButton
.
setAttribute
(
"
alt
"
,
strings
.
tutorial
.
ok
)
this
.
endButton
.
setAttribute
(
"
alt
"
,
strings
.
tutorial
.
ok
)
var
versionUrl
=
"
https://github.com/bui/taiko-web/
"
var
versionUrl
=
gameConfig
.
_version
.
url
if
(
gameConfig
.
_version
){
versionUrl
=
gameConfig
.
_version
.
url
}
this
.
getLink
(
this
.
linkIssues
).
href
=
versionUrl
+
"
issues
"
this
.
getLink
(
this
.
linkIssues
).
href
=
versionUrl
+
"
issues
"
pageEvents
.
add
(
this
.
linkIssues
,
[
"
click
"
,
"
touchend
"
],
this
.
linkButton
.
bind
(
this
))
pageEvents
.
add
(
this
.
linkIssues
,
[
"
click
"
,
"
touchend
"
],
this
.
linkButton
.
bind
(
this
))
...
...
public/src/js/assets.js
View file @
235a282d
...
@@ -37,6 +37,10 @@ var assets = {
...
@@ -37,6 +37,10 @@ var assets = {
"
debug.css
"
,
"
debug.css
"
,
"
songbg.css
"
"
songbg.css
"
],
],
"
assetsCss
"
:
[
"
fonts/fonts.css
"
,
"
img/img.css
"
],
"
img
"
:
[
"
img
"
:
[
"
title-screen.png
"
,
"
title-screen.png
"
,
"
notes.png
"
,
"
notes.png
"
,
...
...
public/src/js/loader.js
View file @
235a282d
...
@@ -23,7 +23,7 @@ class Loader{
...
@@ -23,7 +23,7 @@ class Loader{
this
.
loaderPercentage
=
document
.
querySelector
(
"
#loader .percentage
"
)
this
.
loaderPercentage
=
document
.
querySelector
(
"
#loader .percentage
"
)
this
.
loaderProgress
=
document
.
querySelector
(
"
#loader .progress
"
)
this
.
loaderProgress
=
document
.
querySelector
(
"
#loader .progress
"
)
var
queryString
=
gameConfig
.
_version
?
"
?
"
+
gameConfig
.
_version
.
commit_short
:
""
var
queryString
=
gameConfig
.
_version
.
commit_short
?
"
?
"
+
gameConfig
.
_version
.
commit_short
:
""
assets
.
js
.
forEach
(
name
=>
{
assets
.
js
.
forEach
(
name
=>
{
var
script
=
document
.
createElement
(
"
script
"
)
var
script
=
document
.
createElement
(
"
script
"
)
...
@@ -40,6 +40,12 @@ class Loader{
...
@@ -40,6 +40,12 @@ class Loader{
stylesheet
.
href
=
"
/src/css/
"
+
name
+
queryString
stylesheet
.
href
=
"
/src/css/
"
+
name
+
queryString
document
.
head
.
appendChild
(
stylesheet
)
document
.
head
.
appendChild
(
stylesheet
)
})
})
assets
.
assetsCss
.
forEach
(
name
=>
{
var
stylesheet
=
document
.
createElement
(
"
link
"
)
stylesheet
.
rel
=
"
stylesheet
"
stylesheet
.
href
=
gameConfig
.
assets_baseurl
+
name
+
queryString
document
.
head
.
appendChild
(
stylesheet
)
})
var
checkStyles
=
()
=>
{
var
checkStyles
=
()
=>
{
if
(
document
.
styleSheets
.
length
>=
cssCount
){
if
(
document
.
styleSheets
.
length
>=
cssCount
){
resolve
()
resolve
()
...
...
templates/index.html
View file @
235a282d
...
@@ -8,9 +8,7 @@
...
@@ -8,9 +8,7 @@
<meta
name=
"description"
content=
"パソコンとスマホのブラウザ向けの太鼓の達人シミュレータ 🥁 Taiko no Tatsujin rhythm game simulator for desktop and mobile browsers"
>
<meta
name=
"description"
content=
"パソコンとスマホのブラウザ向けの太鼓の達人シミュレータ 🥁 Taiko no Tatsujin rhythm game simulator for desktop and mobile browsers"
>
<link
rel=
"stylesheet"
href=
"/src/css/loader.css?{{version.commit_short}}"
>
<link
rel=
"stylesheet"
href=
"/src/css/loader.css?{{version.commit_short}}"
>
<link
rel=
"stylesheet"
href=
"{{config.assets_baseurl}}fonts/fonts.css?{{version.commit_short}}"
>
<link
rel=
"stylesheet"
href=
"{{config.assets_baseurl}}img/img.css?{{version.commit_short}}"
>
<script
src=
"/src/js/assets.js?{{version.commit_short}}"
></script>
<script
src=
"/src/js/assets.js?{{version.commit_short}}"
></script>
<script
src=
"/src/js/strings.js?{{version.commit_short}}"
></script>
<script
src=
"/src/js/strings.js?{{version.commit_short}}"
></script>
<script
src=
"/src/js/pageevents.js?{{version.commit_short}}"
></script>
<script
src=
"/src/js/pageevents.js?{{version.commit_short}}"
></script>
...
@@ -21,10 +19,10 @@
...
@@ -21,10 +19,10 @@
<div
id=
"assets"
></div>
<div
id=
"assets"
></div>
<div
id=
"screen"
class=
"pattern-bg"
></div>
<div
id=
"screen"
class=
"pattern-bg"
></div>
<div
id=
"version"
>
<div
id=
"version"
>
{% if version %}
{% if version
.version and version.commit_short and version.commit
%}
<a
href=
"{{version.url}}commit/{{version.commit}}"
target=
"_blank"
id=
"version-link"
class=
"stroke-sub"
alt=
"taiko-web ver.{{version.version}} ({{version.commit_short}})"
>
taiko-web ver.{{version.version}} ({{version.commit_short}})
</a>
<a
href=
"{{version.url}}commit/{{version.commit}}"
target=
"_blank"
id=
"version-link"
class=
"stroke-sub"
alt=
"taiko-web ver.{{version.version}} ({{version.commit_short}})"
>
taiko-web ver.{{version.version}} ({{version.commit_short}})
</a>
{% else %}
{% else %}
<a
href=
"
https://github.com/bui/taiko-web
"
target=
"_blank"
id=
"version-link"
class=
"stroke-sub"
alt=
"taiko-web (unknown version)"
>
taiko-web (unknown version)
</a>
<a
href=
"
{{version.url}}
"
target=
"_blank"
id=
"version-link"
class=
"stroke-sub"
alt=
"taiko-web (unknown version)"
>
taiko-web (unknown version)
</a>
{% endif %}
{% endif %}
</div>
</div>
<script
src=
"/src/js/browsersupport.js?{{version.commit_short}}"
></script>
<script
src=
"/src/js/browsersupport.js?{{version.commit_short}}"
></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment