diff --git a/src/css/main.css b/src/css/main.css index 320626d..d87651e 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -106,4 +106,14 @@ html, body{ background-position-y: 0; position: absolute; top: 0px; +} + +.alpha-title .song-title-char { + transform: scale(1.3, 1); + font-size: 80%; + line-height: 22px; +} + +.song-title-apos { + padding-left: 4px; } \ No newline at end of file diff --git a/src/js/songselect.js b/src/js/songselect.js index 792ef2b..86d41d3 100644 --- a/src/js/songselect.js +++ b/src/js/songselect.js @@ -147,11 +147,27 @@ function SongSelect(){ var songTitle = song.title; var songTitleSpace = songTitle.replace(/ /g, ' '); var songPreview = song.preview; + var skipChars = []; - _code += "
"; + var cl = /^[\x00-\xFF]*$/.test(songTitle) ? 'song-title alpha-title' : 'song-title'; + _code += "
"; for (var c=0; c -1) { + continue; + }; + var ch = songTitle.charAt(c) == ' ' ? ' ' : songTitle.charAt(c); + + var isApos = false; + if (songTitle.charAt(c+1) == '\'') { + ch = ch + '\''; + skipChars.push(c+1); + isApos = true; + }; + var cl = ch == ' ' ? 'song-title-char song-title-space' : 'song-title-char'; + cl = isApos ? cl + ' song-title-apos' : cl; + _code += '' + ch + ''; }; _code += "
    ";