[[html style="position: absolute; top: 0; left: 0; max-width: 30vw; width: 100vw; height: min-content;"]]
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
</head>
<style>
@import url(https://arandintday.github.io/thebackhubscn/New_BHL/css/liminal.css);
@import url(https://backrooms-wiki.wdfiles.com/local--code/theme%3A/1);
@import url(https://backrooms-wiki.wdfiles.com/local--code/theme%3A/2);
div { transition: 0.5s }
div .rate-points:before {
margin-right: 0.6em;
content: "volume_down ";
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 18px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-moz-font-feature-settings: 'liga';
-moz-osx-font-smoothing: grayscale;
}
div:hover {
filter: brightness(110%);
cursor: pointer;
}
div .rate-points:hover:before {
content: "volume_down ";
}
div.disabled {
opacity: 0.5;
pointer events: none;
filter: brightness(60%);
}
div.disabled .rate-points:before {
content: "volume_up ";
}
</style>
<div class="page-rate-widget-box" id="disable" onclick="disable(); AudioSource.play(); $(this).addClass('disabled');" "> <span class="rate-points">播放氛围音</span></div>
<script>
var AudioSource = new Audio("");
AudioSource.loop = true;
function disable() {
document.getElementById("disable").classList.add("disabled")
}
</script>
氛围音 组件
使用方法
[[include :backrooms-wiki-cn:component:ambiance
audio=url
]]
例如:
[[include :backrooms-wiki-cn:component:ambiance
audio=http://thebackrooms.com/cool.mp3
]]
版式
如过想让氛围音按钮变得和你版式中的评分模块相同,那么你必须再加上一个变量。使用 theme= 来导入你的版式。
例如:
[[include :backrooms-wiki-cn:component:ambiance
audio=http://thebackrooms.com/jerry_is_everything_yo.mp3
|theme=bluebird
]]
译者注:
此处导入版式只需加上最后的页面 name,即“http://backrooms-wiki-cn.wikidot.com/theme:”后的部分。
