◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:VoiceTableSwitch”的版本间的差异
(未显示1个用户的7个中间版本) | |||
第1行: | 第1行: | ||
− | <includeonly><div class="voiceTableSelectBox"><div class="voiceTableSelectChoice voiceStatusChosen" id="voiceTableSelectChoiceCN">简中</div><div class="voiceTableSelectChoice" id="voiceTableSelectChoiceTC">繁中</div><div class="voiceTableSelectChoice" id="voiceTableSelectChoiceEN">英文</div><div class="voiceTableSelectChoice" id="voiceTableSelectChoiceKR">韩文</div></div> | + | <includeonly><div class="voiceTableSelectBox"><div class="voiceTableSelectChoice voiceStatusChosen" id="voiceTableSelectChoiceCN" data-target="voiceTextCN">简中</div><div class="voiceTableSelectChoice" id="voiceTableSelectChoiceTC" data-target="voiceTextTC" style="display:none;">繁中</div><div class="voiceTableSelectChoice" id="voiceTableSelectChoiceEN" data-target="voiceTextEN">英文</div><div class="voiceTableSelectChoice" id="voiceTableSelectChoiceKR" data-target="voiceTextKR">韩文</div></div> |
+ | <style type="text/css"> | ||
+ | .voiceTableSelectChoice { | ||
+ | display: inline-block; | ||
+ | background-color: #292929; | ||
+ | padding: 5px 20px; | ||
+ | margin-right: 2px; | ||
+ | font-size: 14px; | ||
+ | border-bottom: 1px solid #959595; | ||
+ | user-select: none; | ||
+ | cursor: pointer; | ||
+ | transition: all 0.3s ease; | ||
+ | } | ||
+ | |||
+ | .voiceTableSelectChoice:hover { | ||
+ | background-color: #444; | ||
+ | border-bottom: 1px solid #eaeaea; | ||
+ | } | ||
+ | |||
+ | .voiceStatusChosen { | ||
+ | background-color: #f4c430; | ||
+ | color: #292929; | ||
+ | border-bottom: 1px solid #eaeaea; | ||
+ | } | ||
+ | |||
+ | .voiceStatusChosen:hover { | ||
+ | background-color: #f4c430; | ||
+ | color: #292929; | ||
+ | border-bottom: 1px solid #eaeaea; | ||
+ | } | ||
+ | |||
+ | .voiceTableSelectBox { | ||
+ | margin: 2px; | ||
+ | } | ||
+ | .voiceTextJP:before {content: "「";} | ||
+ | |||
+ | .voiceTextJP:after {content: "」";} | ||
+ | </style> | ||
<script type="text/javascript">(window.RLQ=window.RLQ||[]).push(function(){ | <script type="text/javascript">(window.RLQ=window.RLQ||[]).push(function(){ | ||
+ | $(function () { | ||
+ | $(".voiceTableSelectChoice").click(function(){ | ||
+ | let voiceText = $(".voiceTable").find(".voiceTableContent"); | ||
+ | let voiceTextDict = {} | ||
+ | |||
+ | voiceTextDict.voiceTextCN = voiceText.children(".voiceTextCN"); | ||
+ | voiceTextDict.voiceTextTC = voiceText.children(".voiceTextTC"); | ||
+ | voiceTextDict.voiceTextEN = voiceText.children(".voiceTextEN"); | ||
+ | voiceTextDict.voiceTextKR = voiceText.children(".voiceTextKR"); | ||
+ | |||
+ | $(".voiceTableSelectChoice").removeClass("voiceStatusChosen"); | ||
+ | $(this).addClass("voiceStatusChosen"); | ||
+ | |||
+ | for(let key in voiceTextDict) voiceTextDict[key].hide(); | ||
+ | if(voiceTextDict[$(this).attr("data-target")]) voiceTextDict[$(this).attr("data-target")].show(); | ||
+ | }); | ||
+ | }); | ||
})</script></includeonly> | })</script></includeonly> |