Comments (3)
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.
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.
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)
- Disqus comments not loading on all articles HOT 3
- Question about using tique_search HOT 3
- Path to sidebar image HOT 2
- code block wrapping HOT 2
- Add Category as a class of <body> HOT 1
- PAGES got removed in master HOT 2
- Disqus comments not working HOT 2
- Disqus comment count script is loaded if displaying comments is disabled HOT 1
- Can't show disqus comments HOT 4
- tipue search failed to generate correct url HOT 7
- Square FontAwesome icons exemption and custom icons HOT 1
- enabling pelican-bootstrap3 affects 'codehilite' extension in MD_EXTENSIONS HOT 1
- Add icon for Goodreads account (social link)? HOT 1
- Margin problems on 'post-info' class HOT 1
- Wiki HOT 2
- Update embedded shariff version HOT 2
- Add support for rst admonitions HOT 1
- Anchor link colors HOT 1
- The piwik url HOT 1
- Tipue search box pinned to top of viewport HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pelican-bootstrap3.