mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-03-29 08:58:31 +08:00
1.2 KiB
1.2 KiB
Themes
There are currently three themes available. Copy Vue and buble website custom theme and @liril-net contribution to the theme of the black style.
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/dark.css">
!> This compressed files in /lib/themes/.
If you have any ideas or would like to develop new theme, welcome submit PR.
Click to preview
vue.css
buble.css
dark.css
<style>
.demo-theme-preview a {
padding-right: 10px;
}
.demo-theme-preview a:hover {
text-decoration: underline;
cursor: pointer;
}
</style>
<script>
var preview = Docsify.dom.find('.demo-theme-preview');
var themes = Docsify.dom.findAll('[rel="stylesheet"]');
preview.onclick = function (e) {
var title = e.target.getAttribute('data-theme')
themes.forEach(function (theme) {
theme.disabled = theme.title !== title
});
};
</script>