Update speaker styling

Use site base template for all pages.
Fix speaker profile to work with Bootstrap 4.
This commit is contained in:
Joel Addison 2019-10-21 09:07:50 +10:00
parent 1022a42cf7
commit 929388220c
5 changed files with 36 additions and 43 deletions

View file

@ -26,7 +26,7 @@
{% for speaker in presentation.speakers %} {% for speaker in presentation.speakers %}
<li class="mb-4 pb-2"> <li class="mb-4 pb-2">
{% speaker_photo speaker 120 as speaker_photo_url %} {% speaker_photo speaker 120 as speaker_photo_url %}
<img src="{{ speaker_photo_url }}" class="rounded-circle"> <img src="{{ speaker_photo_url }}" alt="{{ speaker }}" class="rounded-circle img-fluid">
<p> <p>
<strong>{{ speaker }}</strong><br /> <strong>{{ speaker }}</strong><br />
{% if speaker.twitter_username %} {% if speaker.twitter_username %}

View file

@ -1,6 +1 @@
{% extends "utility_page.html" %} {% extends "site_base.html" %}
{% block utility_body %}
{% block proposals_body %}
{% endblock %}
{% endblock %}

View file

@ -5,7 +5,7 @@
{% block head_title %}{% trans "Create Speaker Profile" %}{% endblock %} {% block head_title %}{% trans "Create Speaker Profile" %}{% endblock %}
{% block page_title %}{% trans "Create Speaker Profile" %}{% endblock %} {% block page_title %}{% trans "Create Speaker Profile" %}{% endblock %}
{% block proposals_body %} {% block content %}
<form class="form-horizontal" method="POST" action="" enctype="multipart/form-data"> <form class="form-horizontal" method="POST" action="" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>

View file

@ -5,7 +5,7 @@
{% block head_title %}{% trans "Edit Speaker Profile" %}{% endblock %} {% block head_title %}{% trans "Edit Speaker Profile" %}{% endblock %}
{% block page_title %}{% trans "Edit Speaker Profile" %}{% endblock %} {% block page_title %}{% trans "Edit Speaker Profile" %}{% endblock %}
{% block proposals_body %} {% block content %}
<form class="form-horizontal" method="POST" action="" enctype="multipart/form-data"> <form class="form-horizontal" method="POST" action="" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>

View file

@ -1,47 +1,45 @@
{% extends "site_base.html" %} {% extends "symposion/speakers/base.html" %}
{% load i18n %} {% load i18n %}
{% load lca2018_tags %} {% load lca2018_tags %}
{% load thumbnail %} {% load thumbnail %}
{% if speaker.photo %}
{% block header_inset_image %}{% speaker_photo speaker 512 as speaker_photo %}{{ speaker_photo }}{% endblock %}
{% endif %}
{% block header_title %}{{ speaker.name }}{% endblock %}
{% block header_paragraph %}
{% endblock %}
{% block head_title %}{{ speaker.name }}{% endblock %} {% block head_title %}{{ speaker.name }}{% endblock %}
{% block page_title %}{{ speaker.name }}{% endblock %}
{% block content %} {% block content %}
{% if speaker.user == request.user or request.user.is_staff %} <div class="row">
<p> <div class="col-md-8">
<a class="btn btn-default pull-right" href="{% url "speaker_edit" speaker.pk %}">Edit</a> {% if speaker.user == request.user or request.user.is_staff %}
</p> <a class="btn btn-secondary float-right" href="{% url "speaker_edit" speaker.pk %}">Edit</a>
{% endif %} {% endif %}
<h3>Biography</h3> <h3>Biography</h3>
<div class="bio">{{ speaker.biography_html|safe }}</div> <div class="bio">{{ speaker.biography_html|safe }}</div>
<h3>Presentations</h3> <h3>Presentations</h3>
<ul> <ul>
{% for presentation in presentations %} {% for presentation in presentations %}
<li> <li>
<a href="{% url "schedule_presentation_detail" presentation.pk %}">{{ presentation.title }}</a> <a href="{% url "schedule_presentation_detail" presentation.pk %}">{{ presentation.title }}</a>
{% if presentation.slot %} {% if presentation.slot %}
&ndash; &ndash;
{{ presentation.slot.day.date|date:"l" }} {{ presentation.slot.day.date|date:"l" }}
{{ presentation.slot.start}}&ndash;{{ presentation.slot.end }} {{ presentation.slot.start}}&ndash;{{ presentation.slot.end }}
in in
{{ presentation.slot.rooms|join:", " }} {{ presentation.slot.rooms|join:", " }}
{% endif %} {% endif %}
</li> </li>
{% empty %} {% empty %}
<p>No presentations. This page is only visible to staff until there is a presentation.</p> <li>No presentations. This page is only visible to staff until there is a presentation.</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div>
<div class="col-md-4">
{% speaker_photo speaker 512 as speaker_photo_url %}
<img src="{{ speaker_photo_url }}" alt="{{ speaker.name }}" class="rounded-circle img-fluid">
</div>
</div>
{% endblock %} {% endblock %}