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,25 +1,17 @@
{% 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 %}
<div class="row">
<div class="col-md-8">
{% if speaker.user == request.user or request.user.is_staff %} {% 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>
<a class="btn btn-default pull-right" href="{% url "speaker_edit" speaker.pk %}">Edit</a>
</p>
{% endif %} {% endif %}
<h3>Biography</h3> <h3>Biography</h3>
@ -41,7 +33,13 @@
{% 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 %}