Skip to content

Commit

Permalink
Merge pull request #2498 from matrix-org/MTRNord/conference-config
Browse files Browse the repository at this point in the history
Add config options for the conference information banner and disable it since conf is over
  • Loading branch information
MTRNord authored Sep 22, 2024
2 parents 5a7ea34 + 6eb802d commit 52c7917
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 13 deletions.
14 changes: 14 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ skip_anchor_prefixes = [
# Spec page does not have anchors in the html it seems. (Probably loading using js.) This causes a false positive
"https://spec.matrix.org/v1.3/changelog/",
]

[extra]
banner = false

# Possible states: "cfp", "awaiting_schedule", "scheduled", "no_tickets", "live", "none"
# None is used when elections instead are used
conference_state = "none"

conference_website = "https://2024.matrix.org"
conference_dates = "Sep 19-22"
conference_location = "Berlin, Germany"

governence_board_elections = false
governence_board_elections_page = "/governing-board/elections/2024"
7 changes: 0 additions & 7 deletions sass/_elections.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,3 @@
}
}
}

#elections-banner {
width: 100%;
padding: .4em 1em;
background-color: #ffcb006b;
text-align: center;
}
7 changes: 7 additions & 0 deletions sass/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,10 @@
}
}
}

#information-banner {
width: 100%;
padding: .4em 1em;
background-color: #ffcb006b;
text-align: center;
}
45 changes: 39 additions & 6 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,45 @@
{% endblock head_extra %}
{% block content %}
{% set sponsors_data = load_data(path="content/sponsors.toml") %}
<div id="elections-banner">
<p>We are happy to launch <a href="https://2024.matrix.org">The Matrix Conference</a> on Sep 19-22 in Berlin,
Germany. <a href="https://2024.matrix.org">Learn more</a> about it, <a
href="https://2024.matrix.org/register/">buy a
ticket</a>, or <a href="https://2024.matrix.org/schedule/">check the schedule</a>!</p>

{% if config.extra.banner %}
<div id="information-banner">
{% if config.extra.conference_state == "cfp" %}
<p>We are happy to launch <a href="{{ config.extra.conference_website }}">The Matrix Conference</a> on {{
config.extra.conference_dates }} in
{{ config.extra.conference_location }}. <a href="{{ config.extra.conference_website }}">Learn more</a> about it,
or <a href="https://cfp.matrix.org">submit a
proposal</a>!</p>
{% elif config.extra.conference_state == "awaiting_schedule" %}
<p>We are happy to launch <a href="{{ config.extra.conference_website }}">The Matrix Conference</a> on {{
config.extra.conference_dates }} in
{{ config.extra.conference_location }}. <a href="{{ config.extra.conference_website }}">Learn more</a> about it,
<a href="{{ config.extra.conference_website }}/register/">buy a
ticket</a>!
</p>
{% elif config.extra.conference_state == "scheduled" %}
<p>We are happy to launch <a href="{{ config.extra.conference_website }}">The Matrix Conference</a> on {{
config.extra.conference_dates }} in
{{ config.extra.conference_location }}. <a href="{{ config.extra.conference_website }}">Learn more</a> about it,
<a href="{{ config.extra.conference_website }}/register/">buy a
ticket</a>, or <a href="{{ config.extra.conference_website }}/schedule/">check the schedule</a>!
</p>
{% elif config.extra.conference_state == "no_tickets" %}
<p>We are happy to launch <a href="{{ config.extra.conference_website }}">The Matrix Conference</a> on {{
config.extra.conference_dates }} in
{{ config.extra.conference_location }}. <a href="{{ config.extra.conference_website }}">Learn more</a> about it,
or <a href="{{ config.extra.conference_website }}/schedule/">check the schedule</a>!</p>
{% elif config.extra.conference_state == "live" %}
<p><a href="{{ config.extra.conference_website }}">The Matrix Conference</a> is Live.
<a href="{{ config.extra.conference_website }}/watch/">Check the livestreams</a>!
</p>
{% endif %}
{% if config.extra.governence_board_elections %}
<p>We are holding our Governing Board elections. Find all the information <a
href="{{ governence_board_elections_page }}">on the elections page.</a></p>
{% endif %}
</div>
{% endif %}
<div id="frontpage">
<div id="hero" class="section">
<div class="hero_content">
Expand Down Expand Up @@ -73,4 +106,4 @@ <h2>Build on Matrix</h2>
</div>
</div>
</div>
{% endblock content %}
{% endblock content %}

0 comments on commit 52c7917

Please sign in to comment.