diff --git a/src/theme/book.css b/src/theme/book.css index 31b874f5..eb8e32b8 100644 --- a/src/theme/book.css +++ b/src/theme/book.css @@ -130,6 +130,10 @@ html, body { transition: color 0.5s; } + .menu-bar .left-buttons { + float: left; + } + .menu-bar .right-buttons { float: right; } @@ -226,6 +230,30 @@ html, body { .next { right: 0; } + + + /* Theme Popup */ + .theme-popup { + position: fixed; + left: -40px; + + border: 1px solid #fafafa; + border-radius: 4px; + + font-size: 0.7em; + } + + .theme-popup .theme { + margin: 0; + padding: 2px 10px; + line-height: 25px; + white-space: nowrap; + } + + .theme-popup .theme:hover { + background-color: #fafafa; + } + } diff --git a/src/theme/book.js b/src/theme/book.js index 8a78d364..c14c5cb2 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -37,4 +37,24 @@ $( document ).ready(function() { window.print(); } + // Theme button + $("#theme-toggle").click(function(){ + if($('.theme-popup').length) { + $('.theme-popup').remove(); + } else { + var popup = $('
') + .append($('