From 54cb2207bd2dad057f4735819b58d87bce5a7291 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 13 Aug 2019 14:56:16 +0530 Subject: [PATCH] feat: macros for conference pages --- foundation/www/conf/2019/exhibition.html | 103 ++++------------------ foundation/www/conf/2019/index.html | 107 ++++------------------- foundation/www/conf/2019/macros.html | 106 ++++++++++++++++++++++ foundation/www/conf/2019/sprint.html | 88 ++++--------------- foundation/www/conf/2019/talks.html | 88 ++++--------------- 5 files changed, 177 insertions(+), 315 deletions(-) create mode 100644 foundation/www/conf/2019/macros.html diff --git a/foundation/www/conf/2019/exhibition.html b/foundation/www/conf/2019/exhibition.html index 6722f9e4..fd2b0b9d 100644 --- a/foundation/www/conf/2019/exhibition.html +++ b/foundation/www/conf/2019/exhibition.html @@ -1,26 +1,19 @@ {% extends "templates/base.html" %} +{% from "www/conf/2019/macros.html" import hero, events, lead_max, footer %} +{% from "www/conf/2019/sponsor.html" import sponsor %} {% block title %}Exhibition{% endblock %} {% block content %} -
-
-
- People Meeting at Expo -
-
-

Exhibition

-

- Showcase the services you provide for ERPNext to the global community, - understand their challenges and explore solutions with them. -

-

- Book a Stall -

-
-
-
+{{ hero( + 'Exhibition', + '', + 'Showcase the services you provide for ERPNext to the global community, + understand their challenges and explore solutions with them.', + '/assets/foundation/img/conf/2019/foundation-splash.png', + 'Book a Stall' +) }} -
+

Details

@@ -35,76 +28,14 @@
  • Dinner starts at 6:30 PM at Matunga Gujarati Seva Mandal
  • -
    - -
    - -
    - -{% from "www/conf/2019/sponsor.html" import sponsor %} +{{ events('Other Events', ['sprint', 'talks' ]) }} {{ sponsor() }} - -
    -
    -

    ERPNext Foundation

    -

    ERPNext Conference is a community event driven by the community and organized by the ERPNext Open Source Software Foundation.

    -

    - Buy Tickets (INR) - Buy Tickets (USD) -

    -
    -
    +{{ footer( + 'Community Organized', + 'ERPNext Conference is a community event organized by the ERPNext Open Source Software Foundation.', + 'Buy Tickets (INR) Buy Tickets (USD)' +) }} {% endblock %} diff --git a/foundation/www/conf/2019/index.html b/foundation/www/conf/2019/index.html index 761e03d0..09a0e29c 100644 --- a/foundation/www/conf/2019/index.html +++ b/foundation/www/conf/2019/index.html @@ -1,97 +1,24 @@ {% extends "templates/base.html" %} +{% from "www/conf/2019/macros.html" import hero, events, lead_max, footer %} +{% from "www/conf/2019/sponsor.html" import sponsor %} {% block title %}ERPNext Conference 2019{% endblock %} {% block content %} -
    -
    - -
    -

    - ERPNext Conference 2019 -

    -

    Next Generation Enterprise

    -

    - October 15 - 18, Mumbai -

    -

    - Buy Tickets (INR) - Buy Tickets (USD) -

    -
    -
    -
    +{{ hero( + 'Next Generation Enterprise', + 'ERPNext Conference 2019', + 'October 15 - 18, Mumbai', + '/assets/foundation/img/conf/2019/foundation-splash.png', + 'Buy Tickets (INR) + Buy Tickets (USD)' +) }} -
    -
    -

    - The 6th edition of the ERPNext Conference is here! - The conference is an event for the entire community to meet the people - you chat with on the forum and understand what is happening in the ecosystem. -

    -
    - -
    - -
    - -{% from "www/conf/2019/sponsor.html" import sponsor %} +{{ lead_max(false) }} +{{ events('Events' ,['sprint', 'talks', 'expo' ]) }} {{ sponsor() }} - -
    -
    -

    Community Organized

    -

    ERPNext Conference is a community event organized by the ERPNext Open Source Software Foundation.

    -

    - Buy Tickets (INR) - Buy Tickets (USD) -

    -
    -
    +{{ footer( + 'Community Organized', + 'ERPNext Conference is a community event organized by the ERPNext Open Source Software Foundation.', + 'Buy Tickets (INR) Buy Tickets (USD)' +) }} {% endblock %} diff --git a/foundation/www/conf/2019/macros.html b/foundation/www/conf/2019/macros.html new file mode 100644 index 00000000..47f08774 --- /dev/null +++ b/foundation/www/conf/2019/macros.html @@ -0,0 +1,106 @@ +{% macro event_card(title, link, body, image, image_alt, footer) %} + +
    +
    + {{ image_alt }} +
    +
    +

    {{ title }}

    +

    {{ body }}

    +

    {{ footer }}

    +
    +
    +
    +{% endmacro %} + +{% macro lead_max(bg) %} +
    +
    +

    + The 6th edition of the ERPNext Conference is here! + The conference is an event for the entire community to meet the people + you chat with on the forum and understand what is happening in the ecosystem. +

    +
    +{% endmacro %} + +{% macro hero(title, pre_title, subtitle, bg_image, cta_html) %} +
    +
    + +
    +

    + {{ pre_title }} +

    +

    {{ title }}

    +

    + {{ subtitle }} +

    +

    + {{ cta_html }} +

    +
    +
    +
    +{% endmacro %} + +{% macro events(title, events) %} +
    +
    +
    +

    {{ title }}

    +

    Connect with the core team, maintainers, developers, implementors. This is an event you cannot miss.

    +
    +
    + {% if 'sprint' in events %} + {{ event_card( + 'Contribution Sprint', + '/conf/2019/sprint', + 'Join the global ERPNext community for a + two day sprint and contribute new features, + fixes and documentation.', + '/assets/foundation/img/conf/2019/sprint.png', + 'Sprint', + 'KJ Somaiya College of Engineering
    15 and 16 October' + ) }} + {% endif %} + + {% if 'talks' in events %} + {{ event_card( + 'Talks and Sessions', + '/conf/2019/talks', + 'Interact about the product road-map, learn about the new and + exciting features, stories and best practices.', + '/assets/foundation/img/conf/2019/talks.png', + 'Talks and Sessions', + 'Mysore Association Auditorium, Matunga
    17 and 18 October' + ) }} + {% endif %} + + {% if 'expo' in events %} + {{ event_card( + 'Exhibition', + '/conf/2019/exhibition', + 'Showcase the services you provide for ERPNext to the global community, + understand their challenges and explore solutions with them.', + '/assets/foundation/img/conf/2019/expo.png', + 'Exhibition', + 'Mysore Association Auditorium, Matunga
    17 and 18 October' + ) }} + {% endif %} +
    +
    +
    +{% endmacro %} + +{% macro footer(title, subtitle, cta_html) %} +
    +
    +

    +

    {{ subtitle }}

    +

    + {{ cta_html }} +

    +
    +
    +{% endmacro %} \ No newline at end of file diff --git a/foundation/www/conf/2019/sprint.html b/foundation/www/conf/2019/sprint.html index 98fe653e..e0174514 100644 --- a/foundation/www/conf/2019/sprint.html +++ b/foundation/www/conf/2019/sprint.html @@ -1,28 +1,21 @@ {% extends "templates/base.html" %} +{% from "www/conf/2019/macros.html" import hero, events, lead_max, footer %} +{% from "www/conf/2019/sponsor.html" import sponsor %} {% block title %}Contribution Sprint{% endblock %} {% block content %} -
    -
    -
    - blocks -
    -
    -

    Contribution Sprint

    -

    - Join the global community of ERPNext developers and users for a - two day contribution sprint and contribute new features, - fixes and documentation. -

    -

    - Buy Tickets (INR) - Buy Tickets (USD) -

    -
    -
    -
    +{{ hero( + 'Contribution Sprint', + '', + 'Join the global community of ERPNext developers and users for a + two day contribution sprint and contribute new features, + fixes and documentation.', + '/assets/foundation/img/conf/2019/foundation-splash.png', + 'Buy Tickets (INR) + Buy Tickets (USD)' +) }} -
    +

    Agenda

    @@ -59,54 +52,11 @@
    -
    - -
    - -{% from "www/conf/2019/sponsor.html" import sponsor %} +{{ events('Other Events', ['talks', 'expo' ]) }} {{ sponsor() }} - -
    -
    -

    ERPNext Foundation

    -

    ERPNext Conference is a community event driven by the community and organized by the ERPNext Open Source Software Foundation.

    -

    - Buy Tickets (INR) - Buy Tickets (USD) -

    -
    -
    +{{ footer( + 'Community Organized', + 'ERPNext Conference is a community event organized by the ERPNext Open Source Software Foundation.', + 'Buy Tickets (INR) Buy Tickets (USD)' +) }} {% endblock %} diff --git a/foundation/www/conf/2019/talks.html b/foundation/www/conf/2019/talks.html index a0aaeadf..1e518779 100644 --- a/foundation/www/conf/2019/talks.html +++ b/foundation/www/conf/2019/talks.html @@ -1,27 +1,20 @@ {% extends "templates/base.html" %} +{% from "www/conf/2019/macros.html" import hero, events, lead_max, footer %} +{% from "www/conf/2019/sponsor.html" import sponsor %} {% block title %}Talks and Sessions{% endblock %} {% block content %} -
    -
    -
    - blocks -
    -
    -

    Talks and Sessions

    -

    - Interact about the product road-map, learn about the new and - exciting features, stories and best practices. -

    -

    - Buy Tickets (INR) - Buy Tickets (USD) -

    -
    -
    -
    +{{ hero( + 'Talks and Sessions', + '', + 'Interact about the product road-map, learn about the new and + exciting features, stories and best practices.', + '/assets/foundation/img/conf/2019/foundation-splash.png', + 'Buy Tickets (INR) + Buy Tickets (USD)' +) }} -
    +

    Agenda

    @@ -63,56 +56,11 @@
    - -
    - -
    - -{% from "www/conf/2019/sponsor.html" import sponsor %} +{{ events('Other Events', ['sprint', 'expo' ]) }} {{ sponsor() }} - -
    -
    -

    ERPNext Foundation

    -

    ERPNext Conference is a community event driven by the community and organized by the ERPNext Open Source Software Foundation.

    -

    - Buy Tickets (INR) - Buy Tickets (USD) -

    -
    -
    +{{ footer( + 'Community Organized', + 'ERPNext Conference is a community event organized by the ERPNext Open Source Software Foundation.', + 'Buy Tickets (INR) Buy Tickets (USD)' +) }} {% endblock %}