UI: 2024 Hero component options #103971

Merged
Márton Lente merged 66 commits from ui/2024-hero-options into main 2024-09-24 13:00:31 +02:00
13 changed files with 145 additions and 144 deletions
Showing only changes of commit 678c1e6f42 - Show all commits

View File

@ -70,6 +70,11 @@ body.is-scrolled
.hero .hero-content .hero .hero-content
padding-top: 0 padding-top: 0
img
height: calc(var(--spacer) * 14)
max-width: 100%
object-fit: contain
.content .content
position: relative position: relative
top: - var(--navbar-primary-height) top: - var(--navbar-primary-height)

View File

@ -475,6 +475,7 @@ body.is-scrolled
.event-name .event-name
line-height: var(--spacer-4) line-height: var(--spacer-4)
text-wrap: balance
.event-details .event-details
display: flex display: flex

View File

@ -0,0 +1,7 @@
style.
:root {
{% for l in edition.locations.all %}
--location-hue-{{ l.slug }}: {{ l.color_to_hsv.0 }};
{% endfor %}
}

View File

@ -0,0 +1,44 @@
.d-flex
div
small.text-muted.d-block Status
span.badge.badge-primary.badge-sm.d-inline-block(class="status-{{ object.status }}")
| {% if object.status == 'rejected' %}NOT ACCEPTED{% else %}{{ object.get_status_display|upper }}{% endif %}
| {% if object.status == 'accepted' %}
div.ml-4
small.text-muted.d-block Location
span(style="color: hsl(var(--location-hue-{{ object.location.slug }}), 50%, 50%);")
| {% if object.location.slug %}
| {{ object.location.slug | title }}
| {% else %}
| No Location
| {% endif %}
div.ml-4
small.text-muted.d-block Category
span
| {% if object.category %}
| {{ object.category | title }}
| {% else %}
| Uncategorized
| {% endif %}
div.ml-4
small.text-muted.d-block Duration
span
| {% if object.duration_minutes %}
| {{ object.duration_minutes }}m
| {% else %}
| No Duration
| {% endif %}
| {% if edition.schedule_status == 'proposed' or edition.schedule_status == 'final' %}
div.ml-4
small.text-muted.d-block Schedule {% if edition.schedule_status == 'proposed' %}(not final){% endif %}
span
| {% if object.day and object.day.date and object.time %}
a(href="{% url 'schedule' edition_path=edition.path %}#event-{{ object.id }}")
| {{ object.day.date | date:'l dS M' }} {{ object.time | time:'H:i' }}
| {% else %}
span Unscheduled
| {% endif %}
| {% endif %}
| {% endif %}

View File

@ -9,15 +9,15 @@ table.table-no-box
| {% for o in object_list %} | {% for o in object_list %}
tr tr
td(style="width: 4ch;") td(style="width: 4ch;")
span.text-muted= o.edition.year span.text-muted.text-nowrap {{ o.edition.year }}
td td
a(href=`${o.edition.path}/${o.pk}`)= o.title a(href="{% url 'festival_entry_detail' edition_path=o.edition.path pk=o.pk %}") {{ o.title }}
td.text-right td.text-right
span.badge.badge-secondary(class=`status-${o.status}`) span.badge.badge-secondary(class="status-{{ o.status }}")
| {% if o.status == 'rejected' %} | {% if o.status == 'rejected' %}
| NOT ACCEPTED | NOT ACCEPTED
| {% else %} | {% else %}
| = o.status.toUpperCase() | {{o.status | upper }}
| {% endif %} | {% endif %}
| {% endfor %} | {% endfor %}
| {% else %} | {% else %}

View File

@ -19,49 +19,47 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
.container.mt-3 .container.mt-3
.row .row
.col .col
.card.mb-3 .box.mb-3
.card-body | {% if permissions.can_change %}
| {% if permissions.can_change %} //- Status.
.event-detail-header .row
//- Status. .col-8
.row .d-flex
.col-8 div
.d-flex small.text-muted.d-block Submitted on
div span(title="{{ object.created_at | date:'D d M, Y @ H:i' }}")
small.text-muted.d-block Submitted on | {{ object.created_at | date:'l d M, Y' }}
span(title="{{ object.created_at | date:'D d M, Y @ H:i' }}")
| {{ object.created_at | date:'l d M, Y' }}
| {% if object.category %} | {% if object.category %}
div.ml-4 div.ml-4
small.text-muted.d-block Category small.text-muted.d-block Category
span span
| {{ object.category | title }} | {{ object.category | title }}
| {% endif %}
div.ml-4
small.text-muted.d-block Status
span.badge.badge-primary(class="status-{{ object.status }}")
| {% if object.status == 'rejected' %}NOT ACCEPTED{% else %}{{ object.status | upper }}{% endif %}
.col-4
.d-flex
.ml-auto
.btn-row
a.btn(
href="{% url 'festival_entry_update' edition_path=object.edition.path pk=object.pk %}")
i.i-edit
span Edit Submission
| {% if request.user.is_superuser %}
a.btn.btn-admin(
href="{% url 'admin:conference_main_festivalentry_change' object.pk %}")
| Admin
| {% endif %} | {% endif %}
div.ml-4
small.text-muted.d-block Status
span.badge.badge-primary(class="status-{{ object.status }}")
| {% if object.status == 'rejected' %}NOT ACCEPTED{% else %}{{ object.status | upper }}{% endif %}
.col-4
.d-flex
.ml-auto
.btn-row
a.btn(
href="{% url 'festival_entry_update' edition_path=object.edition.path pk=object.pk %}")
i.i-edit
span Edit Submission
| {% if request.user.is_superuser %}
a.btn.btn-admin(
href="{% url 'admin:conference_main_festivalentry_change' object.pk %}")
| Admin
| {% endif %}
| {% endif %} | {% endif %}
.p-4 .p-4
.d-flex .d-flex
h2 {{ object.title }} h2.me-2 {{ object.title }}
.ml-auto .ml-auto
| {% if not user.is_authenticated %} | {% if not user.is_authenticated %}

View File

@ -3,14 +3,7 @@
| {% load conference_main %} | {% load conference_main %}
| {% block content %} | {% block content %}
style. | {% include "conference_main/components/event_style.pug" %}
:root {
{% for l in edition.locations.all %}
--location-hue-{{ l.slug }}: {{ l.color_to_hsv.0 }};
{% endfor %}
--locations-count: calc({{ edition.locations.all|length }} - 2)
}
.panel-container .panel-container
section.panel-events-list.panel-ajax-refresh( section.panel-events-list.panel-ajax-refresh(

View File

@ -3,12 +3,7 @@
| {% load conference_main %} | {% load conference_main %}
| {% block content %} | {% block content %}
style. | {% include "conference_main/components/event_style.pug" %}
:root {
{% for l in edition.locations.all %}
--location-hue-{{ l.slug }}: {{ l.color_to_hsv.0 }};
{% endfor %}
}
.panel-container.panel-location .panel-container.panel-location
ul.board-events( ul.board-events(

View File

@ -30,36 +30,23 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
| {% block content %} | {% block content %}
| {% is_attending_edition user object.edition as is_attending %} | {% is_attending_edition user object.edition as is_attending %}
.container.event-detail.mt-3 .container.event-detail.mt-3
style. | {% include "conference_main/components/event_style.pug" %}
:root {
{% for l in edition.locations.all %}
--location-hue-{{ l.slug }}: {{ l.color_to_hsv.0 }};
{% endfor %}
}
.row .row
.col .col
.box.mb-3.p-3 .box.mb-3.p-3
| {% if permissions.can_change %} | {% if permissions.can_change %}
.mb-3.row .mb-3.row
.col-sm-6 .col-sm-8
.d-flex | {% include "conference_main/components/review_header_details.pug" %}
div .col-sm-4
small.text-muted.d-block Submitted on
span(title="{{ object.created_at | date:'D d M, Y @ H:i' }}")
| {{ object.created_at | date:'l d M, Y' }}
div.ml-4
small.text-muted.d-block Status
span.badge.badge-primary(class="status-{{ object.status }}")
| {% if object.status == 'rejected' %}NOT ACCEPTED{% else %}{{ object.status|upper|replace:'_| ' }}{% endif %}
.col-sm-6
.d-flex .d-flex
.ml-auto .ml-auto
.btn-row.justify-content-end .btn-row.justify-content-end
a.btn( a.btn(
href="{% url 'presentation_update' edition_path=object.edition.path pk=object.pk %}") href="{% url 'presentation_update' edition_path=object.edition.path pk=object.pk %}")
i.i-edit i.i-edit
span Edit Presentation span Edit
a.btn( a.btn(
href="{% url 'presentation_review' edition_path=object.edition.path pk=object.pk %}") href="{% url 'presentation_review' edition_path=object.edition.path pk=object.pk %}")
i.i-comment i.i-comment
@ -69,7 +56,7 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
href="{% url 'admin:conference_main_event_change' object.pk %}") href="{% url 'admin:conference_main_event_change' object.pk %}")
| Admin | Admin
| {% endif %} | {% endif %}
| {% endif %} | {% endif %}
| {% if object.recording %} | {% if object.recording %}
.video-container .video-container
@ -139,16 +126,13 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
| {% if speaker.bio %} | {% if speaker.bio %}
.attendee-bio .attendee-bio
| {{ speaker.bio|truncatechars:400|linebreaks|urlizetrunc:80 }} | {{ speaker.bio|truncatechars:400|linebreaks|urlizetrunc:80 }}
| {% if speaker.bio|length > 400 %} | {% if speaker.bio|length > 400 %}
a(href="{% url 'profile_detail' pk=speaker.pk %}") read more. a.btn.btn-sm(href="{% url 'profile_detail' pk=speaker.pk %}")
| Speaker Profile
| {% endif %} | {% endif %}
| {% endif %} | {% endif %}
| {{ speaker.events_per_edition }} | {{ speaker.events_per_edition }}
| {% endfor %} | {% endfor %}
| {% if permissions.can_change %}
.alert.alert-info
| Messages have been moved to #[a(href="{% url 'presentation_review' edition_path=object.edition.path pk=object.pk %}") #[u the review page]].
| {% endif %}
| {% endblock content %} | {% endblock content %}

View File

@ -30,27 +30,21 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
| {% block header %}{% endblock %} | {% block header %}{% endblock %}
| {% block content %} | {% block content %}
| {% include "conference_main/components/event_style.pug" %}
| {% is_attending_edition user object.edition as is_attending %} | {% is_attending_edition user object.edition as is_attending %}
| {% if permissions.can_change %} | {% if permissions.can_change %}
.event-detail-header.review .event-detail-header.review
.row .row
.col-md-8.col-lg-6 .col-md-8.col-lg-8
.d-flex | {% include "conference_main/components/review_header_details.pug" %}
div
small.text-muted.d-block Submitted on
span(title="{{ object.created_at | date:'D d M, Y @ H:i' }}")
| {{ object.created_at | date:'l d M, Y' }}
div.ml-4
small.text-muted.d-block Status
span.badge.badge-primary(class="status-{{ object.status }}")
| {% if object.status == 'rejected' %}NOT ACCEPTED{% else %}{{ object.get_status_display|upper }}{% endif %}
.col-md-4.col-lg-6.d-flex.flex-column.justify-content-center .col-md-4.col-lg-4.d-flex.flex-column.justify-content-center
.btn-row.justify-content-end .btn-row.justify-content-end
a.btn( a.btn(
href="{% url 'presentation_update' edition_path=object.edition.path pk=object.pk %}") href="{% url 'presentation_update' edition_path=object.edition.path pk=object.pk %}")
i.i-edit i.i-edit
span Edit Presentation span Edit
a.btn( a.btn(
href="{% url 'presentation_detail' edition_path=object.edition.path pk=object.pk %}") href="{% url 'presentation_detail' edition_path=object.edition.path pk=object.pk %}")
i.i-eye i.i-eye
@ -73,7 +67,7 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
| {{ object.recording | oembed }} | {{ object.recording | oembed }}
| {% endif %} | {% endif %}
.row.mb-3 .row
| {% if object.picture and not object.recording %} | {% if object.picture and not object.recording %}
.col-md-3 .col-md-3
| {% thumbnail object.picture "480x270" crop="50%" format="JPEG" as picture %} | {% thumbnail object.picture "480x270" crop="50%" format="JPEG" as picture %}
@ -82,48 +76,30 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
| {% endthumbnail %} | {% endthumbnail %}
| {% endif %} | {% endif %}
div(class="col-md-{% if object.picture and not object.recording %}9{% else %}12{% endif %}") div(class="col-md-{% if object.picture and not object.recording %}9{% else %}12{% endif %}")
| {% if object.day and object.time %}
.event-header.mb-3
ul.event-description
| {% if object.location.slug %}
li.event-location
| {{ object.location.slug | upper }}
| {% endif %}
| {% if object.category %}
li.event-category
| {{ object.category | upper }}
| {% endif %}
| {% if object.duration_minutes %}
li.event-duration
| {{ object.duration_minutes }} min
| {% endif %}
| {% if object.day.date and object.time %}
li.event-date
a(href="{% url 'schedule' edition_path=edition.path %}#event-{{ object.id }}")
| {{ object.day.date | date:'l dS M' }} {{ object.time | time:'H:i' }}
| {% endif %}
li.divider
| {% include "conference_main/components/event_buttons.pug" with event=object %}
| {% endif %}
h3.mb-3 {{ object.name }} h3.mb-3 {{ object.name }}
| {% if object.description %} | {% if object.description %}
div {{ object.description | urlizetrunc:40 | linebreaks }} div {{ object.description | urlizetrunc:40 | linebreaks }}
| {% endif %} | {% endif %}
.event-tags
| {% if event.tags.all %}
| {% for tag in event.tags.all %}
.badge.badge-secondary.badge-sm(title="{{ tag.name }}")
| {{ tag.name }}
| {% endfor %}
| {% else %}
small No tags set yet.
| {% endif %}
| {% if object.proposal %} | {% if object.proposal %}
.row.mb-4 .row.mb-4
.col-md-12 .col-md-12
//- Original Proposal. //- Original Proposal.
details details
summary Original Proposal summary Original Proposal - {{ object.created_at | date:'D d M, Y @ H:i' }}
div {{ object.proposal | urlizetrunc:40 | linebreaks }} div {{ object.proposal | urlizetrunc:40 | linebreaks }}
| {% endif %} | {% endif %}
@ -161,14 +137,16 @@ meta(name='twitter:image', content='{{request.scheme}}://{{request.META.HTTP_HOS
.col-md-12.mt-3 .col-md-12.mt-3
.attendee-bio .attendee-bio
| {{ speaker.bio|truncatechars:400|linebreaks|urlizetrunc:80 }} | {{ speaker.bio|truncatechars:400|linebreaks|urlizetrunc:80 }}
| {% if speaker.bio|length > 400 %} | {% if speaker.bio|length > 400 %}
a(href="{% url 'profile_detail' pk=speaker.pk %}") read more. a.btn.btn-sm(href="{% url 'profile_detail' pk=speaker.pk %}")
| Speaker Profile
| {% endif %} | {% endif %}
| {% endif %} | {% endif %}
| {% if request.user.is_superuser %} | {% if request.user.is_superuser %}
| {% if speaker.other_events %} | {% if speaker.other_events %}
h5.pt-2.text-muted SESSIONS h5.pt-4.mb-0.text-muted SESSIONS
table.mb-2 table.mb-2
tbody tbody

View File

@ -22,12 +22,7 @@ a.alert.alert-fluid.alert-info(
| This is a proposed version of the schedule. The final version will be available 2 weeks before the event. | This is a proposed version of the schedule. The final version will be available 2 weeks before the event.
| {% endif %} | {% endif %}
style. | {% include "conference_main/components/event_style.pug" %}
:root {
{% for l in edition.locations.all %}
--location-hue-{{ l.slug }}: {{ l.color_to_hsv.0 }};
{% endfor %}
}
.schedule-container.horizontal .schedule-container.horizontal
.schedule-filters-container .schedule-filters-container

View File

@ -22,12 +22,7 @@ a.alert.alert-fluid.alert-info(
| This is a proposed version of the schedule. The final version will be available 2 weeks before the event. | This is a proposed version of the schedule. The final version will be available 2 weeks before the event.
| {% endif %} | {% endif %}
style. | {% include "conference_main/components/event_style.pug" %}
:root {
{% for l in edition.locations.all %}
--location-hue-{{ l.slug }}: {{ l.color_to_hsv.0 }};
{% endfor %}
}
.schedule-filters-container .schedule-filters-container
.row .row

View File

@ -6,9 +6,15 @@
.mb-3 .mb-3
h2.d-inline Edit Presentation h2.d-inline Edit Presentation
a.btn.float-right.d-inline(href="{% url 'presentation_detail' edition_path=object.edition.path pk=object.pk %}") .btn-row.float-right
i.i-eye | {% if request.user.is_staff %}
span View Presentation a.btn(href="{% url 'presentation_review' edition_path=object.edition.path pk=object.pk %}")
i.i-comment
span Review
| {% endif %}
a.btn(href="{% url 'presentation_detail' edition_path=object.edition.path pk=object.pk %}")
i.i-eye
span View
form(action="{% url 'presentation_update' edition_path=object.edition.path pk=object.pk %}", method="post", enctype="multipart/form-data") form(action="{% url 'presentation_update' edition_path=object.edition.path pk=object.pk %}", method="post", enctype="multipart/form-data")
.form-group .form-group