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
881c4037
Commit
881c4037
authored
Aug 23, 2018
by
Bui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better songtitle alignment
parent
8e5d53f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
17 deletions
+24
-17
src/css/songselect.css
src/css/songselect.css
+17
-9
src/js/songselect.js
src/js/songselect.js
+7
-8
No files found.
src/css/songselect.css
View file @
881c4037
...
@@ -34,25 +34,33 @@ ul li{
...
@@ -34,25 +34,33 @@ ul li{
height
:
100%
;
height
:
100%
;
}
}
.song-title-char
{
text-align
:
center
;
width
:
45px
;
display
:
block
;
}
.song-title-char
:before
{
content
:
attr
(
alt
);
position
:
absolute
;
-webkit-text-stroke
:
0.25em
#000
;
z-index
:
-1
;
}
.song-title
{
.song-title
{
float
:
right
;
float
:
right
;
width
:
0
px
;
width
:
45
px
;
padding
:
1
2px
24
px
;
padding
:
1
0px
0
px
;
word-wrap
:
break-word
;
word-wrap
:
break-word
;
font-size
:
22pt
;
font-size
:
22pt
;
color
:
white
;
color
:
white
;
margin-right
:
10px
;
position
:
relative
;
position
:
relative
;
z-index
:
1
;
z-index
:
1
;
line-height
:
28px
;
line-height
:
28px
;
}
}
.song-title
:before
{
.song-title-space
{
content
:
attr
(
alt
);
line-height
:
25px
;
position
:
relative
;
-webkit-text-stroke
:
0.25em
#000
;
z-index
:
-1
;
word-wrap
:
break-word
;
}
}
.song
{
.song
{
...
...
src/js/songselect.js
View file @
881c4037
...
@@ -106,8 +106,13 @@ function SongSelect(){
...
@@ -106,8 +106,13 @@ function SongSelect(){
var
songTitle
=
songDir
.
substr
(
songID
.
length
+
1
,
songDir
.
length
-
(
songID
.
length
+
1
));
var
songTitle
=
songDir
.
substr
(
songID
.
length
+
1
,
songDir
.
length
-
(
songID
.
length
+
1
));
var
songTitleSpace
=
songTitle
.
replace
(
/ /g
,
'
'
);
var
songTitleSpace
=
songTitle
.
replace
(
/ /g
,
'
'
);
_code
+=
"
<div id='song-
"
+
songID
+
"
' class='song'><div class='song-title stroke-sub' alt='
"
+
songTitleSpace
+
"
'>
"
+
songTitleSpace
+
'
</div>
'
;
_code
+=
"
<div id='song-
"
+
songID
+
"
' class='song'><div class='song-title'>
"
;
_code
+=
"
<ul class='difficulties'>
"
;
for
(
var
c
=
0
;
c
<
songTitle
.
length
;
c
++
)
{
var
ch
=
songTitle
.
charAt
(
c
)
==
'
'
?
'
'
:
songTitle
.
charAt
(
c
);
var
cl
=
ch
==
'
'
?
'
song-title-char song-title-space
'
:
'
song-title-char
'
;
_code
+=
'
<span class="
'
+
cl
+
'
" alt="
'
+
ch
+
'
">
'
+
ch
+
'
</span>
'
;
};
_code
+=
"
</div><ul class='difficulties'>
"
;
for
(
var
j
=
0
;
j
<
songDifficulties
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
songDifficulties
.
length
;
j
++
){
...
@@ -148,12 +153,6 @@ function SongSelect(){
...
@@ -148,12 +153,6 @@ function SongSelect(){
}
}
$
(
"
#song-container
"
).
html
(
_code
);
$
(
"
#song-container
"
).
html
(
_code
);
$
(
'
.song
'
).
each
(
function
(){
var
title
=
$
(
this
).
find
(
'
.song-title
'
);
var
height
=
$
(
title
).
height
();
$
(
title
).
css
(
'
margin-top
'
,
'
-
'
+
height
/
2
+
'
px
'
);
document
.
styleSheets
[
0
].
addRule
(
'
#
'
+
$
(
this
).
attr
(
'
id
'
)
+
'
.song-title:before
'
,
'
top:
'
+
height
/
2
+
'
px;
'
);
});
$
(
'
.difficulty
'
).
hide
();
$
(
'
.difficulty
'
).
hide
();
}
}
...
...
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