UI: Implement Web Assets' theme system, and add 'dark' theme #103972
21
conference_main/migrations/0078_edition_logo_small.py
Normal file
21
conference_main/migrations/0078_edition_logo_small.py
Normal file
@ -0,0 +1,21 @@
|
||||
# Generated by Django 4.2.13 on 2024-09-24 13:32
|
||||
|
||||
import conference_main.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('conference_main', '0077_code_of_conduct_flatpage'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='edition',
|
||||
name='logo_small',
|
||||
field=models.ImageField(
|
||||
blank=True, upload_to=conference_main.models.get_edition_media_upload_path
|
||||
),
|
||||
),
|
||||
]
|
@ -126,6 +126,9 @@ class Edition(models.Model):
|
||||
date_end = models.DateField(blank=True, null=True)
|
||||
|
||||
logo = models.ImageField(upload_to=get_edition_media_upload_path, blank=True)
|
||||
# Logo Small is used for navbars and other places that require minimal representation of the logo
|
||||
logo_small = models.ImageField(upload_to=get_edition_media_upload_path, blank=True)
|
||||
|
||||
header = models.ImageField(upload_to=get_edition_media_upload_path, blank=True)
|
||||
thumbnail = models.ImageField(
|
||||
upload_to=get_edition_media_upload_path,
|
||||
|
@ -50,7 +50,7 @@ footer
|
||||
.footer-logo
|
||||
margin-top: -.2rem
|
||||
|
||||
svg
|
||||
svg, img
|
||||
fill: var(--color-text-tertiary)
|
||||
height: auto
|
||||
max-width: var(--spacer-5)
|
||||
max-width: var(--spacer-6)
|
||||
|
@ -71,8 +71,8 @@ body.is-scrolled
|
||||
padding-top: 0
|
||||
|
||||
img
|
||||
height: calc(var(--spacer) * 14)
|
||||
max-width: calc(var(--spacer) * 30)
|
||||
max-height: calc(var(--spacer) * 20)
|
||||
max-width: calc(var(--spacer) * 40)
|
||||
object-fit: contain
|
||||
|
||||
.content
|
||||
|
@ -63,6 +63,32 @@ body.is-scrolled
|
||||
max-height: calc(var(--spacer) * 11.25)
|
||||
min-height: initial
|
||||
|
||||
.hero-gradient
|
||||
background: linear-gradient(0deg, var(--body-color-bg) 0%, rgba(0, 0, 0, 0) 100%)
|
||||
bottom: 0
|
||||
height: calc(var(--spacer) * 8)
|
||||
left: 0
|
||||
position: absolute
|
||||
width: 100%
|
||||
|
||||
.hero-lg
|
||||
--hero-max-height: calc(var(--spacer) * 50)
|
||||
--hero-min-height: calc(var(--spacer) * 45)
|
||||
|
||||
.hero-content
|
||||
img
|
||||
transform: translateY(calc(var(--spacer) * -4))
|
||||
|
||||
+media-sm
|
||||
transform: translateY(calc(var(--spacer) * -2))
|
||||
|
||||
&.is-container-overlap
|
||||
&+.container
|
||||
--page-with-header-content-offset: calc(var(--spacer) * 20)
|
||||
|
||||
+media-sm
|
||||
--page-with-header-content-offset: calc(var(--spacer) * 18)
|
||||
|
||||
.btn-float-right
|
||||
position: absolute
|
||||
right: calc(var(--spacer) * 2)
|
||||
|
5
conference_main/templates/conference_main/2024/home.pug
Normal file
5
conference_main/templates/conference_main/2024/home.pug
Normal file
@ -0,0 +1,5 @@
|
||||
| {% extends "flatpages/home.pug" %}
|
||||
|
||||
| {% block jumbotron %}
|
||||
| {% include "conference_main/components/hero.pug" with is_large=True show_logo=True show_gradient=True %}
|
||||
| {% endblock jumbotron %}
|
@ -7,11 +7,13 @@ footer
|
||||
ul
|
||||
li
|
||||
a.footer-logo(href="{% if edition %}{% url 'homepage' edition_path=edition.path %}{% else %}/{% endif %}")
|
||||
svg(width='427' height='105' viewbox='0 0 427 105' fill='none' xmlns='http://www.w3.org/2000/svg')
|
||||
path(d='M263.767 0C236.814 0 214.565 20.5896 211.784 46.9279C213.787 46.3585 215.903 46.0472 218.099 46.0472C230.942 46.0472 241.216 56.4294 241.216 69.3251C241.216 78.7853 235.678 86.8061 227.663 90.4174C237.057 99.4397 249.773 105 263.767 105C292.594 105 316.048 81.4491 316.048 52.501C316.048 23.5518 292.594 0 263.767 0Z')
|
||||
path(d='M204.696 50.3478C198.837 54.5589 195.048 61.4732 195.048 69.3251C195.048 82.2209 205.257 92.4734 218.099 92.4734C218.744 92.4734 219.379 92.4401 220.009 92.388C210.465 81.8399 204.642 67.8406 204.642 52.5C204.642 51.7783 204.671 51.0635 204.696 50.3478Z')
|
||||
path(fill-rule='evenodd' clip-rule='evenodd' d='M184.985 72.9094C185.787 80.569 189.133 87.4368 194.178 92.6448C190.613 95.6903 186.59 98.1819 182.109 100.12C175.005 103.192 167.085 104.728 158.349 104.728C148.077 104.728 138.765 102.52 130.413 98.1037C122.157 93.5917 115.629 87.3997 110.829 79.5277C106.125 71.5597 103.773 62.5837 103.773 52.5997C103.773 42.6157 106.125 33.6877 110.829 25.8157C115.629 17.8477 122.157 11.6557 130.413 7.23968C138.765 2.72768 148.125 0.47168 158.493 0.47168C167.229 0.47168 175.101 2.00768 182.109 5.07968C189.213 8.15168 195.165 12.5677 199.965 18.3277L184.989 32.1517C178.173 24.2797 169.725 20.3437 159.645 20.3437C153.405 20.3437 147.837 21.7357 142.941 24.5197C138.045 27.2077 134.205 30.9997 131.421 35.8957C128.733 40.7917 127.389 46.3597 127.389 52.5997C127.389 58.8397 128.733 64.4077 131.421 69.3037C134.205 74.1997 138.045 78.0397 142.941 80.8237C147.837 83.5117 153.405 84.8557 159.645 84.8557C169.723 84.8557 178.169 80.8736 184.985 72.9094ZM74.016 50.5837C79.776 52.4077 84.288 55.4797 87.552 59.7997C90.816 64.0237 92.448 69.2557 92.448 75.4957C92.448 84.3277 88.992 91.1437 82.08 95.9437C75.264 100.648 65.28 103 52.128 103H0V2.19967H49.248C61.536 2.19967 70.944 4.55167 77.472 9.25568C84.096 13.9597 87.408 20.3437 87.408 28.4077C87.408 33.3037 86.208 37.6717 83.808 41.5117C81.504 45.3517 78.24 48.3757 74.016 50.5837ZM23.184 19.7677V43.5277H46.368C52.128 43.5277 56.496 42.5197 59.472 40.5037C62.448 38.4877 63.936 35.5117 63.936 31.5757C63.936 27.6397 62.448 24.7117 59.472 22.7917C56.496 20.7757 52.128 19.7677 46.368 19.7677H23.184ZM50.4 85.4317C56.544 85.4317 61.152 84.4237 64.224 82.4077C67.392 80.3917 68.976 77.2717 68.976 73.0477C68.976 64.6957 62.784 60.5197 50.4 60.5197H23.184V85.4317H50.4Z')
|
||||
path(d='M426.448 1.86426V102.664H407.296L357.04 41.4643V102.664H334V1.86426H353.296L403.408 63.0643V1.86426H426.448Z')
|
||||
{% if edition.logo_small %}
|
||||
img(src="{{ edition.logo_small.url }}", alt="{{ edition.title }}")
|
||||
{% elif edition.logo %}
|
||||
img(src="{{ edition.logo.url }}", alt="{{ edition.title }}")
|
||||
{% else %}
|
||||
img(src="{% static 'images/BCON_logo.svg'%}", alt="{{ edition.title }}")
|
||||
{% endif %}
|
||||
|
||||
| {% if main_menu_editions|length >= 2 or edition not in main_menu_editions and main_menu_editions|length >= 1 %}
|
||||
li
|
||||
|
@ -3,10 +3,12 @@
|
||||
|
||||
.navbar-logo-with-dates
|
||||
div
|
||||
{% if edition.logo %}
|
||||
img(src="{{ edition.logo.url }}", alt="Blender Conference logo")
|
||||
{% if edition.logo_small %}
|
||||
img(src="{{ edition.logo_small.url }}", alt="{{ edition.title }}")
|
||||
{% elif edition.logo %}
|
||||
img(src="{{ edition.logo.url }}", alt="{{ edition.title }}")
|
||||
{% else %}
|
||||
img(src="{% static 'images/BCON_logo.svg'%}", alt="Blender Conference logo")
|
||||
img(src="{% static 'images/BCON_logo.svg'%}", alt="{{ edition.title }}")
|
||||
{% endif %}
|
||||
|
||||
.navbar-dates
|
||||
|
@ -4,28 +4,7 @@
|
||||
|
||||
| {% block header %}
|
||||
| {% block jumbotron %}
|
||||
.hero.is-container-overlap
|
||||
.container
|
||||
.hero-content
|
||||
{% if edition.logo %}
|
||||
img.d-block.mb-3.mx-auto.img-fluid(src="{{ edition.logo.url }}", alt="{{ edition.title }}")
|
||||
{% else %}
|
||||
img.d-block.mb-3.mx-auto.img-fluid(src="{% static 'images/BCON_logo.svg' %}", alt="{{ edition.title }}")
|
||||
{% endif %}
|
||||
|
||||
{% if edition.date_start %}
|
||||
h2.mx-auto.text-center {{ edition.date_start | date:'d' }}-{{ edition.date_end | date:'d M, Y' }}
|
||||
{% endif %}
|
||||
|
||||
{% if edition.location %}
|
||||
.hero-subtitle.mx-auto.text-center {{ edition.location }}
|
||||
{% endif %}
|
||||
|
||||
{% if edition.header %}
|
||||
.hero-bg(style="background-image: url({{ edition.header.url }});")
|
||||
{% endif %}
|
||||
|
||||
.hero-overlay
|
||||
| {% include "conference_main/components/hero.pug" with show_logo=True show_date=True show_location=True show_gradient=True show_overlay=True %}
|
||||
| {% endblock jumbotron %}
|
||||
| {% endblock header %}
|
||||
|
||||
|
@ -0,0 +1,41 @@
|
||||
| {% load static %}
|
||||
|
||||
.hero.is-container-overlap(class="{% if is_large %}hero-lg{% endif %}")
|
||||
.container
|
||||
.hero-content.text-center
|
||||
| {% if show_logo %}
|
||||
| {% if edition.logo %}
|
||||
img.d-block.mx-auto.img-fluid(src="{{ edition.logo.url }}", alt="{{ edition.title }}")
|
||||
| {% else %}
|
||||
img.d-block.mx-auto.img-fluid(src="{% static 'images/BCON_logo.svg' %}", alt="{{ edition.title }}")
|
||||
| {% endif %}
|
||||
| {% endif %}
|
||||
|
||||
| {% if title %}
|
||||
h1.mx-auto {{ title }}
|
||||
| {% endif %}
|
||||
|
||||
| {% if subtitle %}
|
||||
.hero-subtitle.mx-auto {{ subtitle }}
|
||||
| {% endif %}
|
||||
|
||||
| {% if show_date and edition.date_start %}
|
||||
h2.mb-0.mx-auto {{ edition.date_start | date:'d' }}-{{ edition.date_end | date:'d M, Y' }}
|
||||
| {% endif %}
|
||||
|
||||
| {% if show_location and edition.location %}
|
||||
.hero-subtitle.mt-1.mx-auto {{ edition.location }}
|
||||
| {% endif %}
|
||||
|
||||
| {% if edition.header %}
|
||||
.hero-bg(style="background-image: url({{ edition.header.url }}); background-position-y: 50%")
|
||||
|
||||
| {% if show_overlay %}
|
||||
.hero-overlay
|
||||
| {% endif %}
|
||||
|
||||
| {% if show_gradient %}
|
||||
.hero-gradient
|
||||
| {% endif %}
|
||||
|
||||
| {% endif %}
|
@ -4,22 +4,15 @@
|
||||
|
||||
| {% block header %}
|
||||
| {% block jumbotron %}
|
||||
.hero
|
||||
.container
|
||||
.hero-content
|
||||
h1 Suzanne Awards {{ edition.path }}
|
||||
.hero-subtitle Submit your entry to the animation festival.
|
||||
|
||||
{% if edition.header %}
|
||||
.hero-bg(style="background-image: url({{ edition.header.url }})")
|
||||
{% else %}
|
||||
.hero-bg(style="background-image: url({% static 'images/bcon19_cityscape_notext.jpg' %})")
|
||||
{% endif %}
|
||||
.hero-overlay
|
||||
| {% with title="Suzanne Awards "|add:edition.path subtitle="Submit your entry to the animation festival." %}
|
||||
| {% include "conference_main/components/hero.pug" with title=title subtitle=subtitle show_gradient=True show_overlay=True %}
|
||||
| {% endwith %}
|
||||
| {% endblock jumbotron %}
|
||||
| {% endblock header %}
|
||||
|
||||
| {% block content_main %}
|
||||
| {% block content %}
|
||||
.container
|
||||
.box
|
||||
.p-3
|
||||
p Make sure you read the #[a(href="{% url 'festival' edition_path=edition.path %}") Submission Guidelines] before submitting your film.
|
||||
|
||||
@ -31,5 +24,4 @@
|
||||
.d-flex
|
||||
button.btn.btn-primary.px-5.ml-auto(type='submit')
|
||||
| Submit Festival Entry
|
||||
|
||||
| {% endblock content_main %}
|
||||
| {% endblock content %}
|
||||
|
@ -8,20 +8,9 @@
|
||||
|
||||
| {% block header %}
|
||||
| {% block jumbotron %}
|
||||
.hero.text-center.is-container-overlap
|
||||
.container
|
||||
.hero-content
|
||||
h1 Better Together
|
||||
.hero-subtitle.mx-auto
|
||||
| The following attendees made #[br]
|
||||
| {{ edition.title }} special.
|
||||
|
||||
{% if edition.header %}
|
||||
.hero-bg(style="background-image: url({{ edition.header.url }})")
|
||||
{% else %}
|
||||
.hero-bg(style="background-image: url({% static 'images/bcon19_cityscape_notext.jpg' %})")
|
||||
{% endif %}
|
||||
.hero-overlay
|
||||
| {% with title="Better Together" subtitle="The following attendees made<br>Blender Conference "|add:edition.path|add:" special." %}
|
||||
| {% include "conference_main/components/hero.pug" with title=title subtitle=subtitle|safe show_gradient=True show_overlay=True %}
|
||||
| {% endwith %}
|
||||
| {% endblock jumbotron %}
|
||||
| {% endblock header %}
|
||||
|
||||
@ -39,6 +28,6 @@
|
||||
| {% endfor %}
|
||||
| {% else %}
|
||||
.text-center.text-muted.p-5
|
||||
p No publicly visible attendees yet.
|
||||
p.my-5 No publicly visible attendees yet.
|
||||
| {% endif %}
|
||||
| {% endblock content %}
|
||||
|
@ -7,26 +7,20 @@
|
||||
| {% block h1 %}Speakers - {{ edition.title }}{% endblock %}
|
||||
|
||||
| {% block header %}
|
||||
| {% block jumbotron %}
|
||||
.hero.text-center.is-container-overlap
|
||||
.container
|
||||
.hero-content
|
||||
h1 Speakers
|
||||
.hero-subtitle.mx-auto
|
||||
| Artists, developers, teachers, researchers and scientists. #[br]
|
||||
| {{ edition.title }} brings everyone together.
|
||||
|
||||
{% if edition.header %}
|
||||
.hero-bg(style="background-image: url({{ edition.header.url }});")
|
||||
{% else %}
|
||||
.hero-bg(style="background-image: url({% static 'images/bcon19_cityscape_notext.jpg' %})")
|
||||
{% endif %}
|
||||
.hero-overlay
|
||||
| {% block jumbotron %}
|
||||
| {% with title="Speakers" subtitle="Artists, developers, teachers, scientists.<br> Blender Conference "|add:edition.path|add:" brings everyone together." %}
|
||||
| {% include "conference_main/components/hero.pug" with title=title subtitle=subtitle|safe show_gradient=True show_overlay=True %}
|
||||
| {% endwith %}
|
||||
| {% endblock jumbotron %}
|
||||
| {% endblock header %}
|
||||
|
||||
| {% block content_main %}
|
||||
| {% block content %}
|
||||
.container
|
||||
.box
|
||||
| {% if speakers %}
|
||||
.row
|
||||
.col
|
||||
.attendees.py-4
|
||||
| {% for speaker in speakers %}
|
||||
| {% if user.is_superuser or speaker.full_name and speaker.portrait %}
|
||||
@ -34,8 +28,7 @@
|
||||
| {% endif %}
|
||||
| {% endfor %}
|
||||
| {% else %}
|
||||
.text-center.text-muted
|
||||
p No speakers confirmed yet.
|
||||
.text-center.text-muted.p-5
|
||||
p.my-5 No speakers confirmed yet.
|
||||
| {% endif %}
|
||||
|
||||
| {% endblock content_main %}
|
||||
| {% endblock content %}
|
||||
|
Loading…
Reference in New Issue
Block a user