Some cleanup in css and removed other service providers from listing

This commit is contained in:
Raghavendra Kamath
2018-03-05 12:56:04 +05:30
parent b91f16321e
commit 7b3a7645e8
9 changed files with 238 additions and 203 deletions

View File

@@ -9,7 +9,7 @@
<section class='top-spacer hero text-center about'>
<div class="container">
<img class="about-img bottom-spacer" src="/assets/foundation/img/community-colored.jpg">
<h1 class="header1">ERPNext Foundation</h1>
<h1 class="header-1">ERPNext Foundation</h1>
<p class="intro-copy text-medium">We are a Non Profit Foundation representing a community of ERPNext Users, Developers and Service Providers. Our goal is to provide a platform for the ERPNext Community to
come together, join hands and build assets to help build and enhance ERPNext around the world.</p><p class="intro-copy text-medium"> ERPNext Foundation aims to be a community driven organization and run in a transparent manner. If you want to be more involved in the ERPNext Community, read the <a href="/faq" class="secondary-link" target="_blank">FAQ</a>.
</div>

View File

@@ -9,7 +9,7 @@
<a class="button button-primary" href="/get-started.html">Get Started</a>
</div>
</section>
<section class="feature gray-bg left-aligned">
<section class="feature gray-bg text-left">
<div class="container">
<h2 class="header-1 bottom-spacer-4 text-center">Industries</h1>
<ul class="list-unstyled grid-of-four">
@@ -61,8 +61,8 @@
</section>
<section class="feature">
<div class="container">
<div class="three-column left-aligned">
<div class="columns">
<div class="columns text-left">
<div class="column">
<h1 class="header-2">Events & Meetups</h1>
<ul class="bulleted-list list-circle">
{# get first three events from portal events doctype #}
@@ -73,7 +73,7 @@
{% endfor %}
</ul>
</div>
<div class="columns">
<div class="column">
<h1 class="header-2">Help Us Improve</h1>
<ul class="bulleted-list list-circle">
<li>
@@ -87,7 +87,7 @@
</li>
</ul>
</div>
<div class="columns">
<div class="column">
<h1 class="header-2">Need Help?</h1>
<ul class="bulleted-list list-circle">
<li>

View File

@@ -4,42 +4,40 @@
{% macro gold_member(m) %}
<div class="media {{ 'text-muted' if m.placeholder else '' }}" style="cursor: pointer;" onclick="location.href='{{ m.route }}'">
<div class="media-left">
<a href="{{ m.route }}">
<img class="thumb-small media-object" src="{{ m.image or '/assets/foundation/img/gold.png' }}">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">{{ m.title }}</h4>
{{ m.introduction }}
</div>
<div class="media-left">
<a href="{{ m.route }}">
<img class="thumb-small media-object" src="{{ m.image or '/assets/foundation/img/gold.png' }}">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">{{ m.title }}</h4>
{{ m.introduction }}
</div>
</div>
{% endmacro %}
{% macro silver_member(m) %}
<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>
{% endmacro %}
{% macro show_member(s) %}
<div class='individual-member columns'>
<h3><a class='secondary-link bold' href="/{{ s.route }}">{{ s.title and s.title[:25] }}</a></h3>
<p>
{{ s.introduction and s.introduction | truncate(140) }}
</p>
</div>
<div class='individual-member column'>
<h3><a class='secondary-link bold' href="/{{ s.route }}">{{ s.title and s.title[:25] }}</a></h3>
<p>
{{ s.introduction and s.introduction | truncate(140) }}
</p>
</div>
{% endmacro %}
{% block page_content %}
{% if form_dict.country %}
{% endif %}
<section class="gold bottom-spacer-4">
<h2 class='media-heading'>Gold Members</h2>
{% for m in gold_members %}
{{ gold_member(m) }}
{{ gold_member(m) }}
{% endfor %}
{% if has_gold_member %}
<p class="top-spacer text-center"><a class='text-muted' href='/members'>
@@ -48,46 +46,41 @@
</section>
<section class="silver bottom-spacer-4">
<h2 class='media-heading'>Silver Members</h2>
<div class="grid-of-three">
{% for m in silver_members %}
<h2 class='media-heading'>Silver Members</h2>
<div class="grid-of-three">
{% for m in silver_members %}
{{ silver_member(m) }}
{% endfor %}
</div>
{% endfor %}
</div>
{% if has_silver_member %}
<p class="top-spacer text-center"><a class='text-muted' href='/members'>
Become a Silver Member and get your company featured here</a></p>
<p class="top-spacer text-center"><a class='text-muted' href='/members'>
Become a Silver Member and get your company featured here</a></p>
{% endif %}
</section>
<section class="bottom-spacer-4">
<h2>Individual Members</h2>
<div class="grid-of-three">
{% for s in individual_members %}
{{ show_member(s) }}
{{ show_member(s) }}
{% endfor %}
</div>
{% if has_individual_member %}
<p class="top-spacer text-center"><a class='text-muted' href='/members'>
Become an Individual Member and get your company featured here</a></p>
{% endif %}
</section>
{% if form_dict.country %}
<section class="bottom-spacer-4">
<h2>Other Service Providers</h2>
<div class="grid-of-three">
{% for s in service_providers %}
{{ show_member(s) }}
{% endfor %}
</div>
</section>
{% else %}
{% if not form_dict.country %}
<section>
<h2>Select by country</h2>
<div class='four-column flex-wrap'>
{% for c in countries %}
<div class='countries columns'>
<p>
<div class='columns flex-wrap'>
{% for c in countries %}
<div class='countries column'>
<p>
<a class="secondary-link" href="/service-providers?country={{ c[0] }}">{{ c[0] }} ({{ c[1] }})</a>
</p>
</p>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</section>
{% endif %}
{% endblock %}

View File

@@ -56,12 +56,15 @@ def get_context(context):
filters['member'] = ('in', individual_members)
context.individual_members = frappe.get_all('Service Provider',
'title, introduction, `image`, route', filters)
if context.individual_members:
context.has_individual_member = 1
else:
context.individual_members = [dict(
context.individual_members.append(dict(
title='Your Company',
introduction='Become an invidual member to list here',
route='/members'
)]
))
if context.form_dict.country:
context.title = 'ERPNext Service Providers in {0}'.format(context.form_dict.country)