Merge pull request #211 from Tipx-L/PR-Branch-Writing-Mode

Normalize vertical text using writing-mode.
This commit is contained in:
Spmario233 2023-08-13 20:21:18 +08:00 committed by GitHub
commit 2bf3b11d8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 27 deletions

View File

@ -27023,7 +27023,6 @@
if(card[0]=='heart'||card[0]=='diamond'){ if(card[0]=='heart'||card[0]=='diamond'){
this.node.info.classList.add('red'); this.node.info.classList.add('red');
} }
this.node.name.innerHTML='';
this.node.image.className='image'; this.node.image.className='image';
var name=get.translation(card[2]); var name=get.translation(card[2]);
if(card[2]=='sha'){ if(card[2]=='sha'){
@ -27047,9 +27046,7 @@
name='刺'+name; name='刺'+name;
} }
} }
for(var i=0;i<name.length;i++){ this.node.name.innerHTML=name;
this.node.name.innerHTML+=name[i]+'<br/>';
}
if(name.length>=5){ if(name.length>=5){
this.node.name.classList.add('long'); this.node.name.classList.add('long');
if(name.length>=7){ if(name.length>=7){
@ -54254,22 +54251,7 @@
}, },
verticalStr:function(str,sp){ verticalStr:function(str,sp){
if(typeof str!='string') return ''; if(typeof str!='string') return '';
str=str.toUpperCase(); return str.split('').filter(value=>value!='`').join('');
var str2='';
var nobreak=false;
for(var i=0;i<str.length;i++){
if(str[i]=='`'){
nobreak=!nobreak;continue;
}
str2+=str[i];
if(nobreak) continue;
if(sp&&str[i]=='S'&&str[i+1]=='P') continue;
if(/[0-9]/.test(str[i])&&/[0-9]/.test(str[i+1])) continue;
if(i<str.length-1){
str2+='<br>';
}
}
return str2;
}, },
numStr:function(num,method){ numStr:function(num,method){
if(num==Infinity){ if(num==Infinity){

View File

@ -387,6 +387,9 @@ table {
right: 7px; right: 7px;
bottom: 7px; bottom: 7px;
z-index: 1; z-index: 1;
white-space: nowrap;
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
} }
#splash>div>.avatar { #splash>div>.avatar {
width: 86px; width: 86px;
@ -1319,6 +1322,9 @@ body>.background.land {
top: 9px; top: 9px;
left: 6px; left: 6px;
text-align: center; text-align: center;
white-space: nowrap;
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
} }
.card.fullimage>.name.long { .card.fullimage>.name.long {
top: 6px; top: 6px;
@ -1937,6 +1943,9 @@ div:not(.handcards)>.card>.info>span,
top: 22px; top: 22px;
max-height: 68px; max-height: 68px;
overflow: hidden; overflow: hidden;
white-space: nowrap;
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
} }
.button.character>.hp { .button.character>.hp {
left: 5px; left: 5px;
@ -2170,6 +2179,9 @@ div:not(.handcards)>.card>.info>span,
top: 24px; top: 24px;
font-size: 20px; font-size: 20px;
font-family: 'xinwei'; font-family: 'xinwei';
white-space: nowrap;
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
} }
.player>.name.name2 { .player>.name.name2 {
left: 81px left: 81px
@ -2201,7 +2213,7 @@ div:not(.handcards)>.card>.info>span,
} }
.button.character>.name { .button.character>.name {
font-family: 'xinwei' font-family: 'xinwei';
} }
.player>.intro { .player>.intro {
top: 87px; top: 87px;
@ -2230,6 +2242,9 @@ div:not(.handcards)>.card>.info>span,
top:calc(50% - 50px); top:calc(50% - 50px);
width: 100%; width: 100%;
left: 0; left: 0;
white-space: nowrap;
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
} }
.player>.chain{ .player>.chain{
top: calc(50% - 10px); top: calc(50% - 10px);
@ -2829,6 +2844,9 @@ div:not(.handcards)>.card>.info>span,
.player>.name_seat { .player>.name_seat {
opacity: 0; opacity: 0;
white-space: nowrap;
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
} }
.player:not([data-position='0']).unseen.unseen2>.name_seat, .player:not([data-position='0']).unseen.unseen2>.name_seat,
.player:not([data-position='0']):not(.fullskin2).unseen>.name_seat { .player:not([data-position='0']):not(.fullskin2).unseen>.name_seat {
@ -3765,6 +3783,9 @@ div:hover>.intro {
#window>.choosedouble.character>.name { #window>.choosedouble.character>.name {
left: 6%; left: 6%;
top: 8%; top: 8%;
white-space: nowrap;
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
} }
.hrefnode{ .hrefnode{
@ -4211,10 +4232,8 @@ div[data-decoration="bronze"]::after{
left: 7px; left: 7px;
/*border:1px solid #631515;*/ /*border:1px solid #631515;*/
border-radius: 4px; border-radius: 4px;
padding-top: 2px; padding-top: 3px;
padding-bottom: 2px; padding-bottom: 3px;
padding-left: 1px;
padding-right: 1px;
/*color:#631515;*/ /*color:#631515;*/
border: 1px solid rgb(74, 29, 1); border: 1px solid rgb(74, 29, 1);
color: rgb(74, 29, 1); color: rgb(74, 29, 1);
@ -4454,7 +4473,6 @@ div[data-decoration="bronze"]::after{
} }
.coin_menu .content>.caption>.coin_buy>.menubutton { .coin_menu .content>.caption>.coin_buy>.menubutton {
width: auto; width: auto;
display: inline-block;
position: relative; position: relative;
float: right; float: right;
padding-left: 5px; padding-left: 5px;

View File

@ -278,7 +278,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.players[i].setIdentity(list[i]); game.players[i].setIdentity(list[i]);
game.players[i].node.identity.style.display='none'; game.players[i].node.identity.style.display='none';
game.players[i].getId(); game.players[i].getId();
game.players[i].node.action.innerHTML='即<br>胜'; game.players[i].node.action.innerHTML='<br>胜';
game.players[i].node.action.style.letterSpacing='0px'; game.players[i].node.action.style.letterSpacing='0px';
game.players[i].node.action.style.lineHeight='22px'; game.players[i].node.action.style.lineHeight='22px';
game.players[i].node.action.style.top='3px'; game.players[i].node.action.style.top='3px';