Coder Social home page Coder Social logo

Comments (3)

goanpeca avatar goanpeca commented on August 23, 2024 1

Thanks for the reply...

Menu

Since I am using only MENU_ITEMS for the menu entries... this is what I did so far to get the active menu generation working.

        <div class="collapse navbar-collapse navbar-ex1-collapse">
            <ul class="nav navbar-nav navbar-right">
                {% for title, link in MENUITEMS %}
                    {% set stripped_link = link|replace('/', '', 1)%}
                    {% if stripped_link in output_file %}
                        {% set link_state = 'class="active"' %}
                    {% else %}
                        {% set link_state = '' %}
                    {% endif %}
                    <li {{link_state}}><a href="{{ link }}">{{ title }}</a></li>
                {% endfor %}
                {% if DISPLAY_PAGES_ON_MENU %}
                    {% for p in PAGES %}
                         <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">
                             {{ p.menulabel|default(p.title) }}
                          </a></li>
                      {% endfor %}
                {% endif %}

This assumed that the menu_label and slug was defined in the page, like:
menulabel: Features
slug: features

Maybe you can use as inspiration for a better solution ;)

Base templates

For this the changes I made a second template called base_sidebar.html (that inherits from base.html), so that the base.html had an empty content block, not enforcing the sidebar. So you could inherit from base and have an empty block to go nuts with bootstrap (maybe using html directly instead of mk or rst) or or you can inherit from base_sidebar and it would work as it is now.

I think it would be nice to have both options for users so on top of this I also created a page_2.html template that has no sidebar on it, so you can choose the template to use for non blog pages... page with sidebar... or page_2 without.

Cheers!

from pelican-bootstrap3.

DonDebonair avatar DonDebonair commented on August 23, 2024

Thanks for your interest in this theme! I feel honoured that you are considering using this theme for Spyder :) Thanks as well for all your thoughts and ideas. I will leave this issue open and look at your ideas in more detail in the coming weeks.

The menu active problem is something that was already on my todo-list, so I'll definitely be working on that. For the rest, feel free to contribute Pull Requests if you want. Otherwise, as said, I will take on these issues myself at some point :)

from pelican-bootstrap3.

DonDebonair avatar DonDebonair commented on August 23, 2024

Hi!

First of all, thanks for your interest in this theme! It's with heavy heart that I have decided that I can no longer maintain this theme due to lack of time and changing interests. To makes sure the theme lives on however and not goes to waste, I've donated it to the Pelican community. It can now be found in the official pelican-themes repository. I'd suggest you re-submit your issue there.

Sorry for the inconvenience!

from pelican-bootstrap3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.