Fix sidebar

This commit is contained in:
Raghavendra Kamath
2018-04-19 14:38:52 +05:30
parent 7d6023315c
commit 3c72ad8585
4 changed files with 170 additions and 22 deletions

View File

@@ -1,3 +1,3 @@
.media-img {
max-width: 200px;
max-width: 150px;
}

View File

@@ -0,0 +1,150 @@
<footer class="my-5 px-3 pt-5 border-top">
<div class="row">
<div class="col-sm-3">
<h6>Industries</h6>
<ul class="list-unstyled">
<li>
<a href="/docs/user/manual/en/manufacturing">Manufacturing</a>
</li>
<li>
<a href="/docs/user/manual/en/stock">Distribution</a>
</li>
<li>
<a href="/docs/user/manual/en/projects">Services</a>
</li>
<li>
<a href="/docs/user/manual/en/accounts/point-of-sale-pos-invoice">Retail</a>
</li>
<li>
<a href="/docs/user/manual/en/education">Education</a>
</li>
<li>
<a href="/docs/user/manual/en/healthcare">Healthcare</a>
</li>
<li>
<a href="/docs/user/manual/en/agriculture">Agriculture</a>
</li>
<li>
<a href="/docs/user/manual/en/non_profit">Non Profit</a>
</li>
</ul>
</div>
<div class="col-sm-3">
<h6>Foundation</h6>
<ul class="list-unstyled">
<li>
<a href="/about">About</a>
</li>
<li>
<a href="/blog">Blog</a>
</li>
<li>
<a href="/members">Memberships</a>
</li>
<li>
<a href="/foundation-fellow">Fellow</a>
</li>
<li>
<a href="/bounties">Bounties</a>
</li>
<li>
<a href="/conf">Conferences</a>
</li>
<li>
<a href="/contact">Contact</a>
</li>
<li>
<a href="/login">Member Login</a>
</li>
</ul>
</div>
<div class="col-sm-3">
<h6>Community</h6>
<ul class="list-unstyled">
<li>
<a href="/chapters">Chapters</a>
</li>
<li>
<a href="https://discuss.erpnext.com" target="_blank" >Forum</a>
</li>
<li>
<a href="/service-providers">Service Providers</a>
</li>
<li>
<a href="/erpnext-jobs">ERPNext Jobs</a>
</li>
<li>
<a href="/apps">Apps</a>
</li>
<li>
<a href="https://gitter.im/frappe/erpnext" target="_blank" >Chat (Gitter)</a>
</li>
<li>
<a href="https://github.com/frappe/erpnext" target="_blank" >GitHub</a>
</li>
<li>
<a href="https://erpnext.com" target="_blank" >ERPNext.com</a>
</li>
</ul>
</div>
<div class="col-sm-3">
<h6>Documentation</h6>
<ul class="list-unstyled">
<li>
<a href="/docs/user/manual">Manual</a>
</li>
<li>
<a href="https://www.youtube.com/c/erpnext" target="_blank" >Video Tutorials</a>
</li>
<li>
<a href="/docs/current">ERPNext Model & API</a>
</li>
</ul>
<h6>Find Us On</h6>
<ul class="list-unstyled">
<li>
<a href="https://twitter.com/erpnext" target="_blank">Twitter</a>
</li>
<li>
<a href="https://www.facebook.com/ERPNext/" target="_blank">Facebook</a>
</li>
<li>
<a href="https://medium.com/frappé-thoughts/" target="_blank">Medium</a>
</li>
</ul>
</div>
</div>
<div class="pt-3 mt-33 mt-33 mt-3 border-top">
<span>&copy; <span id="year"></span> ERPNext Open Source Software Foundation. Content licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank"> CC-BY-SA 3.0</a> Read the <a href="/terms" >Terms of use</a>.</span>
</div>
<script type="text/javascript">
frappe.ready(function() {
var d = new Date();
var currentYear = d.getFullYear();
$("#year").text(currentYear);
$('.js-subscribe-form').on('submit', function(e) {
e.preventDefault();
const form = this;
const formdata = new FormData(this);
const email = formdata.get('email');
const input = $(form).find('input');
const button = $(form).find('button');
erpnext.subscribe_to_newsletter({
email,
callback(r) {
if (!r.exc) {
form.reset();
button.text('Added');
setTimeout(() => {
button.text('Subscribe');
}, 3000);
}
}
})
});
});
</script>
</footer>

View File

@@ -1,15 +1,15 @@
{% extends base_template_path %}
{% block hero %}{% endblock %}
{% block content %}
<div class="page">
<div class="page-container" id="page-{{ name or route }}"
<div class="page px-3 pt-3">
<div class="row" id="page-{{ name or route }}"
data-path="{{ pathname }}" {%- if page_or_generator=="Generator" %} data-doctype="{{ doctype }}"{% endif %}>
{% if show_sidebar %}
<div class="sidebar-block">
<div class="pt-3 col-sm-2 border-right">
{% include "templates/includes/web_sidebar.html" %}
</div>
{% endif %}
<div class="{% if show_sidebar %}page-content with-sidebar{% elif doctype == 'Blog Post' %} blog-page {% else %}page-content without-sidebar{% endif %}">
<div class="{% if show_sidebar %}pt-3 col-sm-10{% else %} col-sm-12 {% endif %}">
<div class="page-content-wrapper">
<div class="row page-head">
<div class='col-sm-12'>

View File

@@ -3,7 +3,7 @@
{% from "foundation/templates/includes/macros.html" import media %}
{% macro gold_member(m) %}
<div class="media {{ 'text-muted' if m.placeholder else '' }}" style="cursor: pointer;" onclick="location.href='{{ m.route }}'">
<div class="media mb-4 {{ 'text-muted' if m.placeholder else '' }}" style="cursor: pointer;" onclick="location.href='{{ m.route }}'">
<a class="mr-3" href="{{ m.route }}">
<img class="media-img img-thumbnail" src="{{ m.image or '/assets/foundation/img/gold.png' }}">
</a>
@@ -16,19 +16,17 @@
{% macro silver_member(m) %}
<div class="col-sm-4">
<div class="card">
<div class="box clickable {{ 'text-muted' if m.placeholder else '' }}"
style="cursor: pointer;" onclick="location.href='{{ m.route }}'">
<h4>{{ m.title }}</h4>
<p>{{ m.introduction | truncate(140) }}</p>
</div>
<div class="box clickable {{ 'text-muted' if m.placeholder else '' }}"
style="cursor: pointer;" onclick="location.href='{{ m.route }}'">
<h4>{{ m.title }}</h4>
<p>{{ m.introduction | truncate(140) }}</p>
</div>
</div>
{% endmacro %}
{% macro show_member(s) %}
<div class='col-sm-4'>
<h3><a class='secondary-link bold' href="/{{ s.route }}">{{ s.title and s.title[:25] }}</a></h3>
<h3><a href="/{{ s.route }}">{{ s.title and s.title[:25] }}</a></h3>
<p>
{{ s.introduction and s.introduction | truncate(140) }}
</p>
@@ -37,46 +35,46 @@
{% block page_content %}
<section class="my-5 px-3">
<h2>Gold Members</h2>
<h3 class="mb-5">Gold Members</h3>
{% for m in gold_members %}
{{ gold_member(m) }}
{% endfor %}
{% if has_gold_member %}
<p class="top-spacer text-center"><a class='text-muted' href='/members'>
<p class="pt-3"><a href='/members'>
Become a Gold Member and get your company featured here</a></p>
{% endif %}
</section>
<section class="my-5 px-3">
<h2>Silver Members</h2>
<h3 class="mb-5">Silver Members</h3>
<div class="row">
{% for m in silver_members %}
{{ silver_member(m) }}
{% endfor %}
</div>
{% if has_silver_member %}
<p class="top-spacer text-center"><a class='text-muted' href='/members'>
<p class="pt-3"><a href='/members'>
Become a Silver Member and get your company featured here</a></p>
{% endif %}
</section>
<section class="my-5 px-3">
<h2>Individual Members</h2>
<h3 class="mb-5">Individual Members</h3>
<div class="row page-padding">
{% for s in individual_members %}
{{ show_member(s) }}
{% endfor %}
</div>
{% if has_individual_member %}
<p class="top-spacer text-center"><a class='text-muted' href='/members'>
<p class="pt-3"><a href='/members'>
Become an Individual Member and get your company featured here</a></p>
{% endif %}
</section>
{% if not form_dict.country %}
<section>
<h2>Select by country</h2>
<section class="my-5 px-3">
<h3>Select by country</h3>
<div class='row'>
{% for c in countries %}
<div class='col-sm-3'>
<div class='col-xs-2 col-sm-4 col-md-3'>
<p>
<a class="secondary-link" href="/service-providers?country={{ c[0] }}">{{ c[0] }} ({{ c[1] }})</a>
</p>