CSS overflow: visible not working - html

Don't properties overflow-y: scroll; overflow-x: visible; to one element. Help solve the problem. If the left menu is collapsed, when you hover over the li with a child element with class submenu, the submenu doesn't appear because of overflow-y scroll. How to get around the problem?
.fixed-leftmenu .col-left-nano {
position : relative;
width : 100%;
height : 100%;
overflow : visible;
}
.fixed-leftmenu .col-left-nano > .col-left-nano-content {
position : absolute;
overflow-y : scroll;
overflow-x : visible;
top : 0;
right : 0;
bottom : 0;
left : 0;
}
.fixed-leftmenu #nav-col {
height: 100%;
}
<section id="col-left" class="col-left-nano">
<div id="col-left-inner" class="col-left-nano-content" style="padding-right: 12px">
<div class="collapse navbar-collapse navbar-ex1-collapse" id="sidebar-nav">
<ul class="nav nav-pills nav-stacked">
<li>
<a href="{% url 'lk' %}" class="
{% if request.path == '/lk/' %} active {% endif %}">
<i class="fa fa-home"></i>
<span>blabla</span>
</a>
</li>
<li>
{% url 'calendar' as calendar_url %}
<a href="{{ calendar_url }}" class="
{% if calendar_url == request.path %} active {% endif %}">
<i class="fa fa-calendar"></i>
<span>blabla</span>
</a>
</li>
<li>
{% url 'lesson_list' as lesson_list_url %}
<a href="{{ lesson_list_url }}" class="{% if lesson_list_url == request.path %} active {% endif %}">
<i class="fa fa-mortar-board "></i>
<span>blabla</span>
</a>
</li>
{% if user.is_admin %}
<li class="active open">
<a href="{{ post_office_attachment_list }}" class="dropdown-toggle {% if post_office_attachment_list == request.path %} active {% endif %}">
<i class="fa fa-send-o"></i>
<span>blabla</span>
<i class="fa fa-chevron-circle-right drop-icon"></i>
</a>
<ul class="submenu">
<li>
<a href="{{ post_office_attachment_list }}" class="{% if post_office_attachment_list == request.path %} active {% endif %}">
<i class="fa fa-send-o"></i>
<span>blabla</span>
</a>
</li>
<li>
<a href="{{ post_office_email_list }}" class="{% if post_office_email_list == request.path %} active {% endif %}">
<i class="fa glyphicon-envelope"></i>
<span>blabla</span>
</a>
</li>
<li>
<a href="{{ post_office_logs_list }}" class="{% if post_office_logs_list == request.path %} active {% endif %}">
<i class="fa fa-cogs"></i>
<span>blabla</span>
</a>
</li>
</ul>
</li>
<li>
{% url 'user_answer_list' as user_answer_list %}
<a href="{{ user_answer_list }}" class="{% if user_answer_list == request.path %} active {% endif %}">
<i class="fa glyphicon-pencil"></i>
<span>blabla</span>
</a>
</li>
<li>
{% url 'docs_list' as docs_list %}
<a href="{{ docs_list }}" class="{% if docs_list == request.path %} active {% endif %}">
<i class="fa fa-briefcase"></i>
<span>blabla</span>
</a>
</li>
<li>
{% url 'news_list' as news_list %}
<a href="{{ news_list }}" class="{% if news_list == request.path %} active {% endif %}">
<i class="fa fa-list"></i>
<span>news</span>
</a>
</li>
<li class="active open">
<a href="{{ callback_list }}" class="dropdown-toggle {% if callback_list == request.path %} active {% endif %}">
<i class="fa fa-pencil-square-o"></i>
<span>blabla</span>
<i class="fa fa-chevron-circle-right drop-icon"></i>
</a>
<ul class="submenu">
<li>
<a href="{{ proposal_list }}" class="{% if proposal_list == request.path %} active {% endif %}">
<i class="fa fa-pencil-square-o"></i>
<span>blabla</span>
</a>
</li>
<li>
<a href="{{ callback_list }}" class="{% if callback_list == request.path %} active {% endif %}">
<i class="fa fa-phone"></i>
<span>blabla</span>
</a>
</li>
</ul>
</li>
<li>
{% url 'feedback_list' as feedback_list %}
<a href="{{ feedback_list }}" class="{% if feedback_list == request.path %} active {% endif %}">
<i class="fa fa-comments"></i>
<span>blabla</span>
</a>
</li>
<li class="active open">
<a href="{{ students_list }}" class="dropdown-toggle {% if students_list == request.path %} active {% endif %}">
<i class="fa fa-users"></i>
<span>blabla</span>
<i class="fa fa-chevron-circle-right drop-icon"></i>
</a>
<ul class="submenu">
<li>
<a href="{{ students_list }}" class="{% if students_list == request.path %} active {% endif %}">
<i class="fa fa-users"></i>
<span>blabla</span>
</a>
</li>
<li>
<a href="{{ teacher_list }}" class="{% if teacher_list == request.path %} active {% endif %}">
<i class="fa fa-male"></i>
<span>blabla</span>
</a>
</li>
</ul>
</li>
<li class="{% if direction_url == request.path %}active open{% endif %}
{% if course_list == request.path %}active open{% endif %}">
{% url 'direction_list' as direction_url %}
<a href="{{ direction_url }}" class="dropdown-toggle {% if direction_url == request.path %} active {% endif %}">
<i class="fa fa-university"></i>
<span>blabla</span>
<i class="fa fa-chevron-circle-right drop-icon"></i>
</a>
<ul class="submenu">
<li>
<a href="{{ direction_url }}" class="{% if direction_url == request.path %} active {% endif %}">
<i class="fa fa-university"></i>
<span>blabla</span>
</a>
</li>
<li>
<a href="{{ course_list }}" class="{% if course_list == request.path %} active {% endif %}">
<i class="fa fa-mortar-board"></i>
<span>blabla</span>
</a>
</li>
</ul>
</li>
{% endif %}
<li>
{% url 'certify' as certify_url %}
<a href="{{ certify_url }}">
<i class="fa fa-file-text-o"></i>
<span>blabla</span>
</a>
</li>
</ul>
</div>
</div>
</section>

Property overflow: scroll overlaps the overflow: visible. Therefore, the problem to solve in this way it is impossible.

Related

Django pagination is not working properly when using POST method in Search form

I am trying to search an item in a form using POST method and I got the results. But when I use Django pagination, I got the results in the first page. When I click the next or 2 button in Django paginator I got an error like this.
The view profiles.views.individual_home didn't return an HttpResponse object. It returned None instead.
Here search form is in one html page and results shown in another html page.
views.py
def individual_home(request):
if request.method == 'GET':
keyword = request.GET.get('keywords')
print(keyword)
location = request.GET.get('location')
print(location)
ind = IndividualProfile.objects.get(user_id=request.user.id)
details = companyjob.objects.filter(
Q(job_title=keyword) | Q(qualification=keyword) | Q(skills_required=keyword) | Q(job_location=location) & Q(closing_date__gte=datetime.date.today()))
if details:
print(details)
count = details.count()
paginator = Paginator(details, 3)
page_number = request.GET.get('page')
page_obj = paginator.get_page(page_number)
return render(request, "individual_home.html",
{'jobs': page_obj,'count': count, 'ind': ind})
else:
return redirect("individual_homes")
individual_home.html:
<div class="container mt-5">
<div class="row mt-5">
<div class="col-lg-10 mx-auto">
<div class="career-search mb-60">
<form method="GET" action="{% url 'individual_home' %}" class="career-form mb-60" style="background-color:#6351ce;">
<div class="row">
<div class="col-md-6 col-lg-4 my-3">
<div class="input-group position-relative">
<input type="text" class="form-control" placeholder="Enter Your Keywords" id="keywords" name="keywords">
</div>
</div>
<div class="col-md-6 col-lg-4 my-3">
<input type="text" class="form-control" placeholder="Location" id="location" name="location">
<div class="col-md-6 col-lg-4 my-3">
<button type="submit" class="btn btn-lg btn-block btn-light btn-custom" id="contact-submit">
Search
</button>
</div>
</div>
</form>
<div class="filter-result">
<p class="mb-30 ff-montserrat">Job Openings Based On Your Profile : {{count}}</p>
{% for i in jobs %}
<div class="job-box d-md-flex align-items-center justify-content-between mb-30">
<div class="job-left my-4 d-md-flex align-items-center flex-wrap">
<a href="{% url 'job_details' i.id %}">
<div class="img-holder mr-md-4 mb-md-0 mb-4 mx-auto mx-md-0 d-md-none d-lg-flex" style="background-color:#6351ce;">
{{i.job_title.0}}
</div></a>
<div class="job-content">
<h4 class="text-center text-md-left">{{i.job_title}}</h4><br>
<p class="mr-md-4 text-success"><span style="width:10px;height:10px;border-radius:50%;background-color:green;display:inline-block;"></span>&nbsp&nbspActive</p>
<ul class="d-md-flex flex-wrap text-capitalize ff-open-sans">
<li class="mr-md-4">
<i class="fa fa-briefcase mr-2"></i> {{i.user.first_name}} {{i.user.last_name}}
</li>
<li class="mr-md-4">
<i class="zmdi zmdi-pin mr-2"></i> {{i.job_location}}
</li>
<li class="mr-md-4">
<i class="fa fa-inr mr-2"></i> {{i.salary}} {{i.salary_period}}
</li>
<li class="mr-md-4">
<i class="zmdi zmdi-time mr-2"></i> {{ i.posted_date | naturaltime }}
</li>
</ul>
</div>
</div>
<div class="job-right my-4 flex-shrink-0">
{{i.type}}
</div>
</div>
{% endfor %}
</div>
</div>
<!--Pagination-->
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
{% if jobs.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ jobs.previous_page_number }}">Previous</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1" aria-disabled="True">Previous</a>
</li>
{% endif %}
{% if jobs.number|add:'-4' > 1 %}
<li class="page-item"><a class="page-link" href="?page={{ jobs.number|add:'-5' }}">…</a></li>
{% endif %}
{% for i in jobs.paginator.page_range %}
{% if jobs.number == i %}
<li class="page-item active" aria-current="page">
<span class="page-link">
{{ i }}
<span class="sr-only">(current)</span>
</span>
</li>
{% elif i > jobs.number|add:'-5' and i < jobs.number|add:'5' %}
<li class="page-item"><a class="page-link" href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if jobs.paginator.num_pages > jobs.number|add:'4' %}
<li class="page-item"><a class="page-link" href="?page={{ jobs.number|add:'5' }}">…</a></li>
{% endif %}
{% if jobs.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ jobs.next_page_number }}">Next</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1" aria-disabled="True">Next</a>
</li>
{% endif %}
</ul>
</nav>
<!--end of Pagination-->
</div>
</div>
The idea is to pass the keyword and the location to the context.
def individual_home(request):
if request.method == 'GET':
keyword = request.GET.get('keywords')
print(keyword)
location = request.GET.get('location')
print(location)
ind = IndividualProfile.objects.get(user_id=request.user.id)
details = companyjob.objects.filter(
Q(job_title=keyword) | Q(qualification=keyword) | Q(skills_required=keyword) | Q(job_location=location) & Q(closing_date__gte=datetime.date.today()))
if details:
print(details)
count = details.count()
paginator = Paginator(details, 3)
page_number = request.GET.get('page')
page_obj = paginator.get_page(page_number)
return render(request, "individual_home.html",
{'keyword':keyword,'location':location,'jobs': page_obj,'count': count, 'ind': ind})
else:
return redirect("individual_homes")
change the padignation like this.
<!--Pagination-->
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
{% if jobs.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ jobs.previous_page_number }}&keywords={{ keyword }}&location={{ location }}">Previous</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1" aria-disabled="True">Previous</a>
</li>
{% endif %}
{% if jobs.number|add:'-4' > 1 %}
<li class="page-item"><a class="page-link" href="?page={{ jobs.previous_page_number }}&keywords={{ keyword }}&location={{ location }}">…</a></li>
{% endif %}
{% for i in jobs.paginator.page_range %}
{% if jobs.number == i %}
<li class="page-item active" aria-current="page">
<span class="page-link">
{{ i }}
<span class="sr-only">(current)</span>
</span>
</li>
{% elif i > jobs.number|add:'-5' and i < jobs.number|add:'5' %}
<li class="page-item"><a class="page-link" href="?page={{ i }}&keywords={{ keyword }}&location={{ location }}"">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if jobs.paginator.num_pages > jobs.number|add:'4' %}
<li class="page-item"><a class="page-link" href="?page={{ jobs.number|add:'5' }}&keywords={{ keyword }}&location={{ location }}">…</a></li>
{% endif %}
{% if jobs.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ jobs.next_page_number }}&keywords={{ keyword }}&location={{ location }}">Next</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1" aria-disabled="True">Next</a>
</li>
{% endif %}
</ul>
</nav>
<!--end of Pagination-->

Did you forget to register or load this tag? Using Django

I don't get it, If I remove the last <li> I'm not getting this error, here's my HTML,
I know I'm not closing a "if" tag correctly or something, the only solution for me is to remove the last last <li>
{% if request.get_full_path != "/addAssest/" and request.user.is_authenticated
%}
<div class="sidebar" style="height: 35%">
<div class="sidebar-wrapper">
<div class="logo">
<a
target="_blank"
href="https://www.creative-tim.com/product/black-dashboard-django"
class="simple-text logo-mini"
>
CC
</a>
<a
target="_blank"
href="https://www.creative-tim.com/product/black-dashboard-django"
class="simple-text logo-normal"
>
Crypto Castle
</a>
</div>
<ul class="nav">
<li class="{% if 'index' in segment %} active {% endif %}">
<a href="/">
<i class="tim-icons icon-chart-pie-36"></i>
<p>Dashboard</p>
</a>
</li>
<li class="{% if 'page-user' in segment %} active {% endif %}">
<a href="{% url 'profilePage' %}">
<i class="tim-icons icon-single-02"></i>
<p>User Profile</p>
</a>
</li>
<li class="{% if 'logout' in segment %} active {% endif %}">
<a href="{% url 'logout' %}">
<i class="tim-icons icon-user-run"></i>
<p>Logout</p>
</a>
</li>
</ul>
</div>
</div>
{% endif %}
Django template does not support multiline tags and tag escape tags as stated in this Ticket
You should edit your code :
{% if request.get_full_path != "/addAssest/" and request.user.is_authenticated
%}
to
{% if request.get_full_path != "/addAssest/" and request.user.is_authenticated %}
Note that most HTML linter will try to break your template tag so it is best to deactivate it

How organize pagination with a large number of pages in Django project?

I have a view.py product_list:
...
from django.shortcuts import render, get_object_or_404
from .models import ProductCategory, Product, ProductDetail, ProductSpecialCategory
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
...
def product_list(request, category_slug=None, ):
category = None
categories = ProductCategory.objects.all()
object_list = Product.objects.filter(available=True, is_active=True)
if category_slug:
category = get_object_or_404(ProductCategory, slug=category_slug)
object_list = object_list.filter(category=category)
paginator = Paginator(object_list, 1)
page = request.GET.get('page')
try:
products = paginator.page(page)
except PageNotAnInteger:
products = paginator.page(1)
except EmptyPage:
products = paginator.page(paginator.num_pages)
return render(request, 'shop/products/list_by_category/product_list.html', {'category': category,
'categories': categories,
'products': products,
})
Based on this handler, I did pagination.html:
<nav aria-label="pagination" class="pagination_area">
<ul class="pagination">
{% if page.has_previous %}
<li class="page-item next">
<a class="page-link" href="?page={{ page.previous_page_number }}">
<i class="fa fa-angle-left" aria-hidden="true"></i>
</a>
</li>
{% endif %}
{% for i in page.paginator.page_range %}
{% if page.number == i %}
<li class="page-item focused"><a class="page-link" href="?page={{ i }}">{{ i }}</a></li>
{% elif i > page.number|add:'-1' and i < page.number|add:'1' %}
{% else %}
<li class="page-item"><a class="page-link" href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if page.has_next %}
<li class="page-item next">
<a class="page-link" href="?page={{ page.next_page_number }}">
<i class="fa fa-angle-right" aria-hidden="true"></i>
</a>
</li>
{% endif %}
</ul>
On the interface, I get the **result**:
I would like to organize in such a way that:
Show only three pages, the first of which is the previous one, the second is the current, the third is the next. And what is not included in this range are hidden by ellipses, for example.:
I change pagination.html. Please try this.
<nav aria-label="pagination" class="pagination_area">
<div class="row">
{% if page.end_index > 0 %}
<div class="col-sm-12 col-md-5 d-none d-md-block">
<p>Showing {{ page.start_index }} to {{ page.end_index }} of {{ page.paginator.count}}.</p>
</div>
{% endif %}
{% if page.paginator.num_pages > 1 %}
<div class="col-sm-12 col-md-7 dataTables_pager">
<ul class="pagination">
{% if page.has_previous %}
<li class="page-item">
<a class="page-link" data-page="1" href="?page={{ page.previous_page_number }}">
<i class="fa fa-angle-double-left"></i>
</a>
</li>
{% if page.previous_page_number > 1 %}
<li class="page-item">
<a class="page-link " data-page="{{page.previous_page_number}}" href="?page={{ page.previous_page_number }}">
<i class="fa fa-angle-left"></i>
</a>
</li>
{% endif %}
{% endif %}
{% if page.previous_page_number > 2 %}
<li class="page-item">
<a class="page-link " data-page="{{page.number|add:'-2'}}" href="?{{page.number|add:'-2'}}"> {{ page.number|add:"-2" }} </a>
</li>
<li class="page-item">
<a class="page-link " data-page="{{page.number|add:'-1'}}" href="?page={{page.number|add:'-1'}}"> {{ page.number|add:"-1" }} </a>
</li>
{% endif %}
<li class="page-item active"><span class="page-link ">{{ page.number }}</span></li>
{% if page.paginator.num_pages > page.number|add:"2" %}
<li class="page-item">
<a class="page-link " data-page="{{page.number|add:'1'}}" href="?page={{page.number|add:'1'}}"> {{ page.number|add:"1" }} </a>
</li>
<li class="page-item">
<a class="page-link " data-page="{{page.number|add:'2'}}" href="?page={{page.number|add:'2'}}"> {{ page.number|add:"2" }} </a>
</li>
{% endif %}
{% if page.has_next %}
<li class="page-item">
<a class="page-link " data-page="{{page.next_page_number}}" href="?page={{ page.next_page_number }}">
<i class="fa fa-angle-right"></i>
</a>
</li>
<li class="page-item">
<a class="page-link " data-page="{{page.paginator.num_pages}}" href="?page={{page.paginator.num_pages}}">
<i class="fa fa-angle-double-right"></i>
</a>
</li>
{% endif %}
</ul>
</div>
{% endif %}
</div>
</nav>
My design just like this. If you change design for your needs.
Here click << to go first page , >> to go last page , < to go previous page and > to go next page.

How to exclude a category from Jekyll blog index?

I have a category called "tachartasan" which I have excluded from my index page however the posts in this category are still being counted in the pagination which is currently set to 10 posts per page.
7 of my most recent posts have been in the tachartasan category and it has resulted in my front page showing only 3 posts total.
<div class="container">
{% for post in paginator.posts %}
{% unless post.categories contains 'tachartasan' %}
<div class="row">
<div class="col-md-3">
<img src="{{ post.image }}" class="index-image">
</div>
<div class="col-md-9">
<h5 class="post-title">{{ post.title }}</h5>
{% if post.author %}
<p class="text-muted">{{ post.date | date: "%Y-%m-%d" }} le {{ post.author }}</p>
{% else %}
<p class="text-muted">{{ post.date | date: "%Y-%m-%d" }} le Crìstean MacMhìcheil</p>
{% endif %}
{{ post.excerpt }}
</div>
</div>
<hr/>
{% endunless %}
{% endfor %}
<!-- Pagination -->
<nav>
<ul class="pagination justify-content-center pagination-lg">
{% if paginator.next_page %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/duilleag-{{paginator.next_page}}">
<i class="fas fa-arrow-left"></i>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="{{ site.baseurl }}/">
<i class="fas fa-arrow-left"></i>
</a>
</li>
{% endif %}
<li class="page-item disabled">
<a class="page-link" href="{{ site.baseurl }}/">
Duilleag {{ paginator.page }} / {{ paginator.total_pages }}
</a>
</li>
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/">
<i class="fas fa-arrow-right"></i>
</a>
</li>
{% else %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/duilleag-{{paginator.previous_page}}">
<i class="fas fa-arrow-right"></i>
</a>
</li>
{% endif %}
{% else %}
<li class="page-item disabled">
<a class="page-link" href="{{ site.baseurl }}/">
<i class="fas fa-arrow-right"></i>
</a>
</li>
{% endif %}
</ul>
</nav>
</div>
I don't want the hidden "tachartasan" posts to be counted as part of the 10 posts per page.
Adding this line to the front matter of my excluded posts solved it. They are hidden on the index page and no longer counted against the pagination limit and are still visible on the specific category page.
hidden: true

How to change the hamburger menu to the word menu in shopify

I am using the theme Simple in my Shopify store and I need to change the hamburger menu into the text "menu" instead. Also the website is www.allabouttoytrains.com I was playing with the inspect element trying to get the desired effect but I'm also posting the file containing the HTML incase it helps.
sidebar.liquid
<div data-section-id="{{ section.id }}" data-section-type="sidebar-section">
<nav class="grid__item small--text-center medium-up--one-fifth" role="navigation">
<hr class="hr--small medium-up--hide">
<button id="ToggleMobileMenu" class="mobile-menu-icon medium-up--hide" aria-haspopup="true" aria-owns="SiteNav">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="icon__fallback-text">{{ 'layout.navigation.menu' | t }}</span>
</button>
<div id="SiteNav" class="site-nav" role="menu">
<ul class="list--nav">
{% for link in menus[section.settings.main_menu_link_list].links %}
{% assign child_list_handle = link.title | handleize %}
{% if menus[child_list_handle].links != blank %}
<li class="site-nav--has-submenu site-nav__element">
<button class="site-nav__link btn--link site-nav__expand hidden" aria-expanded="false" aria-controls="Collapsible{{ forloop.index }}">
{{ link.title }}
<span>+</span>
</button>
<button class="site-nav__link btn--link site-nav__collapse" aria-expanded="true" aria-controls="Collapsible{{ forloop.index }}">
{{ link.title }}
<span>-</span>
</button>
<ul id="Collapsible{{ forloop.index }}" class="site-nav__submenu site-nav__submenu--expanded" aria-hidden="false">
{% for childlink in menus[child_list_handle].links %}
<li class="{% if childlink.active or collection.current_type == childlink.title or collection.current_vendor == childlink.title %}{% unless forloop.first and childlink.title contains 'All' and current_tags.size > 0 %} site-nav--active {% endunless %}{% endif %}">
{{ childlink.title | escape }}
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="site-nav__element {% if link.active %}site-nav--active{% endif %}">
{{ link.title }}
</li>
{% endif %}
{% endfor %}
{% if shop.customer_accounts_enabled %}
{% if customer %}
<li>
{{ 'layout.customer.account' | t }}
</li>
<li>
{{ 'layout.customer.log_out' | t }}
</li>
{% else %}
<li>
{{ 'layout.customer.log_in' | t }}
</li>
<li>
{{ 'layout.customer.create_account' | t }}
</li>
{% endif %}
{% endif %}
</ul>
<ul class="list--inline social-links">
{% if settings.social_facebook_link != blank %}
<li>
<a href="{{ settings.social_facebook_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Facebook' }}">
{% include 'icon-facebook' %}
<span class="icon__fallback-text">Facebook</span>
</a>
</li>
{% endif %}
{% if settings.social_twitter_link != blank %}
<li>
<a href="{{ settings.social_twitter_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Twitter' }}">
{% include 'icon-twitter' %}
<span class="icon__fallback-text">Twitter</span>
</a>
</li>
{% endif %}
{% if settings.social_pinterest_link != blank %}
<li>
<a href="{{ settings.social_pinterest_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Pinterest' }}">
{% include 'icon-pinterest' %}
<span class="icon__fallback-text">Pinterest</span>
</a>
</li>
{% endif %}
{% if settings.social_instagram_link != blank %}
<li>
<a href="{{ settings.social_instagram_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Instagram' }}">
{% include 'icon-instagram' %}
<span class="icon__fallback-text">Instagram</span>
</a>
</li>
{% endif %}
{% if settings.social_google_plus_link != blank %}
<li>
<a href="{{ settings.social_google_plus_link }}" rel="publisher" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Google Plus' }}">
{% include 'icon-google-plus' %}
<span class="icon__fallback-text">Google Plus</span>
</a>
</li>
{% endif %}
{% if settings.social_tumblr_link != blank %}
<li>
<a href="{{ settings.social_tumblr_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Tumblr' }}">
{% include 'icon-tumblr' %}
<span class="icon__fallback-text">Tumblr</span>
</a>
</li>
{% endif %}
{% if settings.social_youtube_link != blank %}
<li>
<a href="{{ settings.social_youtube_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'YouTube' }}">
{% include 'icon-youtube' %}
<span class="icon__fallback-text">YouTube</span>
</a>
</li>
{% endif %}
{% if settings.social_vimeo_link != blank %}
<li>
<a href="{{ settings.social_vimeo_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Vimeo' }}">
{% include 'icon-vimeo' %}
<span class="icon__fallback-text">Vimeo</span>
</a>
</li>
{% endif %}
{% if settings.social_fancy_link != blank %}
<li>
<a href="{{ settings.social_fancy_link }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Fancy' }}">
{% include 'icon-fancy' %}
<span class="icon__fallback-text">Fancy</span>
</a>
</li>
{% endif %}
{% if settings.main_blog != blank %}
<li>
<a href="/blogs/{{ settings.main_blog }}.atom">
{% include 'icon-rss' %}
<span class="icon__fallback-text">Blog</span>
</a>
</li>
{% endif %}
</ul>
</div>
<hr class="medium-up--hide hr--small {% if template.name == 'index' %}hr--border-bottom{% endif %}">
</nav>
</div>
{% schema %}
{
"name": "Sidebar",
"settings": [
{
"type": "link_list",
"id": "main_menu_link_list",
"label": "Menu",
"default": "main-menu"
}
]
}
{% endschema %}
a possible way is, to remove the 4 times
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
maybe then you have to set the height from your menu also.
actually I saw "menu" at your site and also the hamburger menu.
btw. this is not an elegant solution, it`s more quick and dirty.
Well, work the effect based on what you already have.
var McButton = $("[data=hamburger-menu]");
var McBar1 = McButton.find("b:nth-child(1)");
var McBar2 = McButton.find("b:nth-child(2)");
var McBar3 = McButton.find("b:nth-child(3)");
McButton.click( function() {
$(this).toggleClass("active");
if (McButton.hasClass("active")) {
McBar1.velocity({ top: "50%" }, {duration: 200, easing: "swing"});
McBar3.velocity({ top: "50%" }, {duration: 200, easing: "swing"})
.velocity({rotateZ:"90deg"}, {duration: 800, delay: 200, easing: [500,20] });
McButton.velocity({rotateZ:"135deg"}, {duration: 800, delay: 200, easing: [500,20] });
} else {
McButton.velocity("reverse");
McBar3.velocity({rotateZ:"0deg"}, {duration: 800, easing: [500,20] })
.velocity({ top: "100%" }, {duration: 200, easing: "swing"});
McBar1.velocity("reverse", {delay: 800});
}
});
/* Global Styles */
body {
margin: 0;
padding: 0;
background-color: hsl(355, 75%, 56%);
}
/* Hamburger Menu */
.McButton {
position: absolute;
top: 50%;
left: 50%;
margin-left: -22px;
margin-top: -22px;
width: 44px;
height: 33px;
cursor: pointer;
}
.McButton b {
position: absolute;
left: 0;
width: 44px;
height: 3px;
background-color: white;
}
.McButton b:nth-child(1) {
top: 0;
}
.McButton b:nth-child(2) {
top: 50%;
}
.McButton b:nth-child(3) {
top: 100%;
}
/* McButton */
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.2.2/velocity.min.js"></script>
<!-- Hamburger Menu -->
<a class="McButton" data="hamburger-menu">
<b></b>
<b></b>
<b></b>
</a>