There is no actual link to my rss feed from the nav, but it adds a css borderon top of another border in my menu, which looks ugly. So how do I remove the feed from my nav?
The jekyll-feed gem outputs an li for the feed
Nav Menu
<nav id="menu">
<ul class="links">
{% for page in site.pages %}
{% if page.layout == "home" %}
<li>{{ page.title }}</li>
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.layout != "home" %}
<li>{{ page.title }}</li>
{% endif %}
{% endfor %}
<div class="content">
<ul class="actions">
<li>Contact</li>
</ul>
</div>
</ul>
<ul class="actions vertical">
<li>Subscribe to Newsletter
</li>
</ul>
</nav>
Nav HTML
<nav id="menu">
<ul class="links">
<li>Home</li>
<li>about</li>
<li>archive</li>
<li>
</li>
<li>
</li>
<div class="content">
<ul class="actions">
<li>Contact</li>
</ul>
</div>
</ul>
<ul class="actions vertical">
<li>Subscribe to Newsletter
</li>
</ul>
</nav>
I think the following code should work for you:
<nav id="menu">
<ul class="links">
<li>Home</li>
{% for page in site.pages %}
{% if page.layout == "home" or page.url contains ".xml" %}
{% else %}
<li>{{ page.title }}</li>
{% endif %}
{% endfor %}
<div class="content">
<ul class="actions">
<li>Contact</li>
</ul>
</div>
</ul>
<ul class="actions vertical">
<li>Subscribe to Newsletter
</li>
</ul>
</nav>
Note that I removed the extra loop over the pages to make the build quicker. I also think the absolute_url statement is not needed. Are you sure you want to open a div inside an ul?
Related
stack community I'm completely an amateur in HTML, Liquid, Adx, in short programming and applying logic, don't have great understanding.
Im not sure why the <span> Test2 </span> is appearing 2x, as you can see from the image,
I want to achieve the following, Test2 new name? as one text and the left Test2 don't want it to be displayed. Please advise.
{% assign homeurl = website.adx_partialurl %}
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div id="navbar" class="navbar-collapse collapse">
{% assign primary_nav = weblinks["Primary Navigation"] %}
{% if primary_nav %}
<div class="data-weblinks-maxdepth="">
<ul class="nav navbar-nav weblinks" role="menubar">
{% for link in primary_nav.weblinks %}
<li role="none" class="weblink {% if sublinks.size > 0 %} dropdown{% endif %}">
<a role="menuitem" aria-label="{{ link.name | escape }}" {%- if link.tooltip %} title="{{ link.tooltip | escape }}"
{% endif %}>
<span> Test2 </span>
{%- unless link.display_image_only -%}
{{ link.name | escape }}
{%- endunless -%}
</a>
</li>
{% endfor %}
</ul>
{% editable primary_nav %}
</div>
{% endif %}
</div>
</div>
</div>
To change the name of the link and perhaps add something in front of it all you have to do is add something into the if clause like below:
{% assign homeurl = website.adx_partialurl %}
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div id="navbar" class="navbar-collapse collapse">
{% assign primary_nav = weblinks["Primary Navigation"] %}
{% if primary_nav %}
<div class="data-weblinks-maxdepth="">
<ul class="nav navbar-nav weblinks" role="menubar">
{% for link in primary_nav.weblinks %}
<li role="none" class="weblink {% if sublinks.size > 0 %} dropdown{% endif %}">
<a role="menuitem" aria-label="{{ link.name | escape }}" {%- if link.tooltip %} title="{{ link.tooltip | escape }}"{% endif %}>
{%- unless link.display_image_only -%}
Text 2 {{ link.name | escape }}
{%- endunless -%}
</a>
</li>
{% endfor %}
</ul>
{% editable primary_nav %}
</div>
{% endif %}
</div>
</div>
</div>
I want to change the state of the navbar as highlighted in different pages.
When I am normally placing the nav-bar in base.html and add a block content it works.
<!DOCTYPE html>
<html lang=en>
<head>
<title>Dashboard</title>
{% include 'snippets/css.html' %}
</head>
<body>
<!-- Sidebar Holder -->
<nav id="sidebar">
<ul class="list-unstyled components">
<li{% block nav_live %}{% endblock %}>
<i class="fa fa-users" aria-hidden="true"></i>Live Now
</li>
<li{% block nav_out %}{% endblock %}>
<i class="fa fa-crosshairs" aria-hidden="true"></i>Outcome Score
</li>
<li {% block nav_customer %}{% endblock %}>
<i class="fa fa-search" aria-hidden="true"></i>Customer search
</li>
<li {% block nav_journey %}{% endblock %}>
<i class="fa fa-map-o" aria-hidden="true"></i> Journey Shaping
<ul class="collapse list-unstyled" id="homeSubmenu">
<li>-Persona</li>
<li>-Outcomes</li>
<li>-Action Maps</li>
<li>-Auto Responses</li>
</ul>
</li>
<li {% block nav_analytics %}{% endblock %}>
<i class="fa fa-bar-chart" aria-hidden="true"></i>Analytics
<ul class="collapse list-unstyled" id="analyticsmenu">
<li>-Visitor Activity</li>
<li>-Visit History</li>
<li>-Action Map Performance</li>
<li>-Interactions</li>
</ul>
</li>
<li{% block nav_settings %}{% endblock %}>
<i class="material-icons md-18" >tune</i>Settings
<ul class="collapse list-unstyled" id="settingsmenu">
<li>-Phone Number</li>
<li>-Tracking Code</li>
<li>-Action Map Performance</li>
<li>-Interactions</li>
</ul>
</li>
<li{% block nav_people %}{% endblock %}>
<i class="material-icons">people</i>People
<ul class="collapse list-unstyled" id="peoplemenu">
<li>-Team Home</li>
<li>-Visit History</li>
<li>-Action Map Performance</li>
<li>-Interactions</li>
</ul>
</li>
</ul>
</nav>
{% block content %}{% endblock content %}
</div>
{% include 'snippets/js.html' %}
</body>
</html>
In live_now.html I add the class="active" and it works
{% extends "base.html" %}
{% block nav_live %}
class="active"
{% endblock %}
{% block content %}
{% load static %}
but when I try to include nav-bar as a snippet in base.html, class="active" is not rendered in the template
<!DOCTYPE html>
<html lang=en>
<head>
<title>Dashboard</title>
{% include 'snippets/css.html' %}
</head>
<body>
{% include 'snippets/nav.html' %}
{% block content %}{% endblock content %}
</div>
{% include 'snippets/js.html' %}
</body>
</html>
How do I make the the first nav pill in my nav active?
I've tried adding class="active", but that just makes all nav pills active.
<div class="container-fluid bg-dark">
<div class="container text-center menu-meals">
<ul class="nav nav-pills center-pills">
{% for menu in menus %}
{% if menu.mealtype %}
<li role="presentation">{{ menu.mealtype }}</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
Got it working by adding id="menu-meals" to my and then added a script.
<script>
$(function () {
$('#menu-meals li:eq(0) a').tab('show');
});
</script>
How do I change the for loop to ignore duplicates mealtype == 'Entrees'
I only need it to create 1 <a href>
{% for menu in menus %}
{% if menu.mealtype == 'Entrees' %}
<li role="presentation">
Entrees
</li>
{% endif %}
{% endfor %}
full li
{% for menu in menus %}
{% if menu.show_presentation %}
<li role="presentation">
Entrees
</li>
{% endif %}
{% if menu.show_presentation %}
<li role="presentation">
Sides
</li>
{% endif %}
{% if menu.show_presentation %}
<li role="presentation">
Mains
</li>
{% endif %}
{% if menu.show_presentation %}
<li role="presentation">
Drinks
</li>
{% endif %}
{% if menu.show_presentation %}
<li role="presentation">
Desserts
</li>
{% endif %}
{% if menu.show_presentation %}
<li role="presentation">
Specials
</li>
{% endif %}
{% if menu.show_presentation %}
<li role="presentation">
Others
</li>
{% endif %}
{% endfor %}
Update for view based on comments. Try this:
show_presentation_list = []
menus_presentation = []
for menu in menus:
if menu.mealtype and menu.mealtype not in show_presentation_list:
show_presentation_list.append(menu.mealtype)
menus_presentation.append(menu)
Also your new template, try this:
{% for menu in menus_presentation %}
<li role="presentation">
{{menu.mealtype}}
</li>
{% endfor %}
I'm using a desk drawer for my page when it's in phone. But for some reason when I try out the links inside the desk drawer on mobile, they won't work. I was hoping anyone could give me a hint as to what I'm doing wrong.
Because it works when I try it on the computer on Chrome while simulating a phone browser but not in my phone's browser. The page is www.bebe2go.com and the desk drawer I'm using is this one: http://git.blivesta.com/drawer/fixed-navbar-left.
Here is the code for the navigator:
<div class="row">
<div class="col-lg-12">
<div class="drawer-header">
<button type="button" class="drawer-toggle drawer-hamburger">
<span class="sr-only">toggle navigation</span>
<span class="drawer-hamburger-icon"></span>
</button>
</div>
<div class="drawer-main drawer-navbar-default">
<nav class="container drawer-nav" role="navigation">
<div class="drawer-brand hidden-md hidden-lg">Bebe2Go</div>
<ul class="drawer-menu">
{% for link in linklists.main-menu.links %}
{% assign child_list_handle = link.title | handleize %}
{% if linklists[child_list_handle].links != blank %}
<li class="drawer-menu-item dropdown drawer-dropdown-hover">
{{ link.title | escape }}<span class="caret"></span>
<ul class="drawer-submenu dropdown-menu" role="menu">
<li class="drawer-submenu-item">{{ link.title | escape }}</li>
{% for childlink in linklists[child_list_handle].links %}
<li class="drawer-submenu-item">{{ childlink.title | escape }}</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="drawer-menu-item">{{ link.title | escape }}</li>
{% endif %}
{% endfor %}
</ul>
</nav>
</div>
</div>
</div>
Here is the link for the js: https://github.com/blivesta/drawer/blob/master/src/js/jquery.drawer.js
and here the link to the css:
https://github.com/blivesta/drawer/blob/master/dist/css/drawer.css