◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:AvgTabDisplay”的版本间的差异
(dollAvgContent height) |
(暂时修改||:的处理) |
||
(未显示同一用户的14个中间版本) | |||
第12行: | 第12行: | ||
div#dollAvgContent { | div#dollAvgContent { | ||
position: fixed; | position: fixed; | ||
− | + | left: calc(50% - 311px); | |
− | left: calc(50% - | + | width: 100%; |
− | width: | + | top: 3vh; |
height: 90vh; | height: 90vh; | ||
max-width: 600px; | max-width: 600px; | ||
第58行: | 第58行: | ||
overflow: hidden; | overflow: hidden; | ||
margin: 15px 0px; | margin: 15px 0px; | ||
− | |||
} | } | ||
第66行: | 第65行: | ||
left: calc(50% - 256px); | left: calc(50% - 256px); | ||
top: -128px; | top: -128px; | ||
+ | } | ||
+ | |||
+ | .dollAvgContentClose { | ||
+ | height: 30px; | ||
+ | margin: 10px 0px; | ||
+ | } | ||
+ | |||
+ | .dollAvgContentClose::after { | ||
+ | content: "Close"; | ||
+ | float: right; | ||
+ | cursor: pointer; | ||
+ | transition: 0.5s; | ||
+ | padding: 5px 15px; | ||
+ | border-radius: 6px; | ||
+ | } | ||
+ | |||
+ | .dollAvgContentClose:hover:after { | ||
+ | background-color: rgb(244 196 48 / 53%); | ||
+ | color: #000; | ||
+ | } | ||
+ | |||
+ | .dollAvgClicked { | ||
+ | border-bottom: 1px solid #eaeaae; | ||
} | } | ||
第79行: | 第101行: | ||
div#dollAvgContent::-webkit-scrollbar { | div#dollAvgContent::-webkit-scrollbar { | ||
− | width: | + | width: 10px; |
} | } | ||
第92行: | 第114行: | ||
div#dollAvgContent::-webkit-scrollbar-button { | div#dollAvgContent::-webkit-scrollbar-button { | ||
+ | } | ||
+ | |||
+ | @media screen and (max-width: 600px) { | ||
+ | div#dollAvgContent{ | ||
+ | left: 0px; | ||
+ | width: calc(100% - 22px); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | @media screen and (max-width: 550px) { | ||
+ | img.dollAvgBgImg { | ||
+ | width: 400px; | ||
+ | left: calc(50% - 200px); | ||
+ | top: -100px; | ||
+ | } | ||
+ | .dollAvgBgBox { | ||
+ | width: 100%; | ||
+ | height: 200px; | ||
+ | margin: 15px 0px; | ||
+ | } | ||
} | } | ||
</style> | </style> | ||
第109行: | 第151行: | ||
let dir = $(this).attr("data-dir"); | let dir = $(this).attr("data-dir"); | ||
let file = $(this).attr("data-file"); | let file = $(this).attr("data-file"); | ||
+ | $(this).addClass("dollAvgClicked"); | ||
// prevent user click many times first | // prevent user click many times first | ||
− | $("body").append(`<div id="dollAvgMask" style="display:none;"></div>`); | + | $("body").append(`<div id="dollAvgMask" style="display:none;"><\/div>`); |
$("#dollAvgMask").fadeIn(500); | $("#dollAvgMask").fadeIn(500); | ||
get_avgtext(dir, file); | get_avgtext(dir, file); | ||
第139行: | 第182行: | ||
for(let i in line_list){ | for(let i in line_list){ | ||
− | + | let line = line_list[i].replace("||:", "||:").replace(/speaker>/g, "Speaker>").replace(/\r/g, ""); | |
if(line.indexOf(":") == -1 || !line.split(":")[1]){ mw += "<br\/>"; continue;} | if(line.indexOf(":") == -1 || !line.split(":")[1]){ mw += "<br\/>"; continue;} | ||
let backcg = false; | let backcg = false; | ||
− | if(line.indexOf("<BIN>") != -1) backcg = line.slice(line.indexOf("<BIN>") + ("<BIN>").length, line.indexOf("</BIN>")); | + | if(line.indexOf("<BIN>") != -1) backcg = line.slice(line.indexOf("<BIN>") + ("<BIN>").length, line.indexOf("<\/BIN>")); |
let speaker = (line.indexOf("<Speaker>") >= 0) ? true : false; | let speaker = (line.indexOf("<Speaker>") >= 0) ? true : false; | ||
− | if(speaker) speaker = line.slice(line.indexOf("<Speaker>") + ("<Speaker>").length, line.indexOf("</Speaker>")); | + | if(speaker) speaker = line.slice(line.indexOf("<Speaker>") + ("<Speaker>").length, line.indexOf("<\/Speaker>")); |
let branch = false; | let branch = false; | ||
− | if(line.indexOf("<分支>") != -1) branch = line.slice(line.indexOf("<分支>") + ("<分支>").length, line.indexOf("</分支>")); | + | if(line.indexOf("<分支>") != -1) branch = line.slice(line.indexOf("<分支>") + ("<分支>").length, line.indexOf("<\/分支>")); |
let word = line; | let word = line; | ||
第168行: | 第211行: | ||
let branch_word_list = line.slice(line.indexOf("<c>") + ("<c>").length, line.length).split("<c>"); | let branch_word_list = line.slice(line.indexOf("<c>") + ("<c>").length, line.length).split("<c>"); | ||
for(let j in branch_word_list){ | for(let j in branch_word_list){ | ||
− | + | branch_word += `<div class="dollAvgBranchChoice">选项${String(Number(j)+1)}:${branch_word_list[j]}<\/div>`; | |
} | } | ||
} | } | ||
第194行: | 第237行: | ||
} | } | ||
− | + | $("body").append(`<div id="dollAvgContent" style="display:none;"><div class="dollAvgContentClose"><\/div>${mw}<div class="dollAvgContentClose"><\/div><\/div>`); | |
− | $("#dollAvgContent"). | + | $("#dollAvgContent").fadeIn(200); |
+ | |||
+ | |||
+ | $(".dollAvgContentClose").click(function(){ | ||
+ | $("#dollAvgContent").fadeOut(150); | ||
+ | setTimeout(() => { | ||
+ | $("#dollAvgContent").remove(); | ||
+ | $("#dollAvgMask").remove(); | ||
+ | }, 200); | ||
+ | }); | ||
$("#dollAvgMask").click(function(){ | $("#dollAvgMask").click(function(){ | ||
− | $("#dollAvgContent"). | + | $("#dollAvgContent").fadeOut(150); |
setTimeout(() => { | setTimeout(() => { | ||
$("#dollAvgContent").remove(); | $("#dollAvgContent").remove(); | ||
第215行: | 第267行: | ||
$(".backToTop").hide(); | $(".backToTop").hide(); | ||
} | } | ||
+ | |||
+ | |||
+ | |||
})</script></includeonly> | })</script></includeonly> |