question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to add multiple theme support in navbar?

See original GitHub issue

Nice doc tool !!

I’m trying to make my site to support multiple theme support, like this:

_ _20190108113410

So I add script to _nvbar.md, but the script seems not work!

Any one knows how to handle it? Thanks very much

I Add the code below to _navbar.md, but the script seems can not execute!!

<div class="demo-theme-preview">
  <a data-theme="vue">vue.css</a>
  <a data-theme="dark">dark.css</a>
</div>

<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) {
      
      if(theme.tilte != '' && title != null && title != ''){
        theme.disabled = theme.title != title
      }
    });
  };
</script>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
boopathikumar018commented, Apr 28, 2020

Try docsify-darklight-theme

0reactions
stale[bot]commented, Feb 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add More Navigation Menus to your WordPress Theme
To add a selectable menu location option in your admin dashboard under Appearance > Menus you need to do what's called “register a...
Read more >
How to Add Custom Navigation Menus in WordPress Themes
If you want to add a custom navigation menu to a different template, then click on the arrow in the toolbar and select...
Read more >
Tutorial - Adding multiple levels of submenus to a Bootstrap 4 ...
Tutorial – Adding multiple levels of submenus to a Bootstrap 4 navigation bar in your WordPress theme. One of the Bootstrap 4 most...
Read more >
Multiple menus - Support - Themeco Forum
To add a navigation, you can add this in your child theme's functions.php file. function add_navbar() { wp_nav_menu( array( 'menu' ...
Read more >
Moodle in English: How to Add multiple conditions in Navbar tools ...
How to Add multiple conditions in Navbar tools menu for custom menus in Aadvark Theme. ◅ Future Support for BootstrapBase · Boost structure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found