refactor: minor style changes

This commit is contained in:
Shivam Mishra
2019-08-01 19:41:56 +05:30
parent 5518bb5a6d
commit 8cffb0f077
3 changed files with 86 additions and 1 deletions

View File

View File

@@ -9,7 +9,7 @@
<img src='/assets/foundation/img/illustrations/enterprise-buildings.png' alt='Enterprise Buildings'>
</div>
<div class="align-self-center">
<p class='lead mb-0'>
<p class='lead' style="font-size:1.5em;">
ERPNext Conference 2019
</p>
<h1>Next Generation Enterprise</h1>

View File

@@ -0,0 +1,85 @@
{% set platinum_sponsors = [
{
'image': '/assets/foundation/img/no-image.png',
'title': 'Global Company #1',
'website_url': 'http://www.example.com/'
},
{
'image': '/assets/foundation/img/no-image.png',
'title': 'Global Company #2',
'website_url': 'http://www.example.com/'
}
] %}
{% set silver_sponsors = [
{
'image': '/assets/foundation/img/no-image.png',
'title': 'Global Company #3',
'website_url': 'http://www.example.com/'
},
{
'image': '/assets/foundation/img/no-image.png',
'title': 'Global Company #4',
'website_url': 'http://www.example.com/'
},
{
'image': '/assets/foundation/img/no-image.png',
'title': 'Global Company #5',
'website_url': 'http://www.example.com/'
},
] %}
{% macro show_section(sponsors, with_img = False, color=False) %}
<div class='row mt-4'>
{% for sponsor in sponsors %}
<div class='col-sm-4 mb-4'>
<a href='{{ ("{}{}".format("" if sponsor.website_url.startswith("http") else "//", sponsor.website_url)) if sponsor.website_url else "#" }}' target='_blank' class='card h-100'>
{% if with_img %}
<div class='square-img'>
<img class="{% if not color %}greyscale{% endif %} p-5"
src="{{ sponsor.image or "/assets/foundation/img/people/tux.png" }}"
alt="{{ sponsor.title }}">
</div>
{% endif %}
<div class="card-body">
<h6>
{{ sponsor.title }}
</h6>
</div>
</a>
</div>
{% if loop.index is divisibleby 4 %}
</div><div class='row'>
{% endif %}
{% endfor %}
</div>
{% endmacro %}
{% macro sponsor() %}
<section class="section-padding section-bg">
<div class='container text-center'>
<div>
<h2>Become a Sponsor</h2>
<p class='lead'>Become a patron for the conference and get associated with a global community of tens of thousands of users and developers.</p>
<a class="mt-3 btn btn-dark btn" href="/contact">Sponsor</a>
</div>
<div class="mt-7">
{% if platinum_sponsors %}
<h4>Platinum Sponsors<h4>
{{ show_section(platinum_sponsors, color=True, with_img=True) }}
{% endif %}
{% if gold_sponsors %}
<h4 class="mt-4">Gold Sponsors<h4>
{{ show_section(gold_sponsors, with_img=True) }}
{% endif %}
{% if silver_sponsors %}
<h4 class="mt-4">Silver Sponsors<h4>
{{ show_section(silver_sponsors, with_img=True) }}
{% endif %}
</div>
</div>
</section>
{% endmacro %}