Add ability to toggle CFP and ticket sales

This commit is contained in:
Oliver Davies 2019-05-02 23:25:06 +01:00
parent 9bd5a64fa8
commit ef28b6b498
3 changed files with 24 additions and 7 deletions

View file

@ -1,5 +1,11 @@
title: DrupalCamp Bristol 2019
date: 2019-07-28
cfp:
open: true
url: '%papercall.url%'
eventbrite:
url: https://www.eventbrite.co.uk/e/drupalcamp-bristol-2019-tickets-58986869314
@ -10,11 +16,18 @@ main_menu:
- title: Tickets
url: '%eventbrite.url%'
pattern: ~
enabled: '%tickets.available%'
- title: Submit a session
url: '%papercall.url%'
pattern: ~
enabled: '%cfp.open%'
- title: Sponsor us
url: /sponsor-us
pattern: /^\/sponsor-us\/?/
enabled: true
tickets:
available: true
url: '%eventbrite.url%'

View file

@ -9,7 +9,7 @@
<nav role="navigation" aria-labelledby="block-dcb2017-main-menu-menu" id="block-dcb2017-main-menu" class="block block-menu navigation menu--main">
<h2 class="visually-hidden" id="block-dcb2017-main-menu-menu">Main navigation</h2>
<ul class="tw-list-reset tw-flex tw-flex-wrap tw-justify-center tw--ml-8">
{% for item in site.main_menu %}
{% for item in site.main_menu if item.enabled == true %}
<li class="tw-mb-2 tw-mx-4 md:tw-m-0 md:tw-ml-8">
<a
class="tw-uppercase tw-no-underline hocus:tw-text-green-600 {{ item.pattern and page.url matches item.pattern ? 'tw-text-green-600' : 'tw-text-black' }}"

View file

@ -19,13 +19,17 @@ update_text: Session submissions are now open!
</div>
<div class="md:tw-flex md:tw-justify-center tw-mt-8 tw-leading-snug">
<a class="tw-button tw-bg-pink-600 tw-mb-4 md:tw-mb-0" href="{{ site.eventbrite.url }}">
Buy tickets
</a>
{% if site.tickets.available %}
<a class="tw-button tw-bg-pink-600 tw-mb-4 md:tw-mb-0" href="{{ site.eventbrite.url }}">
Buy tickets
</a>
{% endif %}
<a class="tw-button tw-bg-purple-600" href="{{ site.papercall.url }}">
Submit a session
</a>
{% if site.cfp.open %}
<a class="tw-button tw-bg-purple-600" href="{{ site.papercall.url }}">
Submit a session
</a>
{% endif %}
</div>
</div>
</div>