按下对应颜色即可切换.
默认颜色: indigo
.
red
pink
purple
deep purple
indigo
blue
light blue
cyan
teal
green
light green
lime
yellow
amber
orange
deep orange
brown
grey
blue grey
black
white
<script>
var buttons = document.querySelectorAll("button[data-md-color-primary]");
Array.prototype.forEach.call(buttons, function(button) {
button.addEventListener("click", function() {
document.body.dataset.mdColorPrimary = this.dataset.mdColorPrimary;
localStorage.setItem("data-md-color-primary",this.dataset.mdColorPrimary);
})
})
</script>
按下对应颜色即可切换.
默认颜色: indigo
.
辅助色控制文档导航高亮与图表颜色.
<style>
.md-typeset button[data-md-color-accent] > code {
background-color: var(--md-code-bg-color);
color: var(--md-accent-fg-color);
}
</style>
red
pink
purple
deep purple
indigo
blue
light blue
cyan
teal
green
light green
lime
yellow
amber
orange
deep orange
<script>
var buttons = document.querySelectorAll("button[data-md-color-accent]");
Array.prototype.forEach.call(buttons, function(button) {
button.addEventListener("click", function() {
document.body.dataset.mdColorAccent = this.dataset.mdColorAccent;
localStorage.setItem("data-md-color-accent",this.dataset.mdColorAccent);
})
})
// #758
document.getElementsByClassName('md-nav__title')[1].click()
</script>