SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit f20af9f4 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

add preface text to proceedings

refactor proceedings issue pages
parent 5a7e21d9
No related branches found
No related tags found
No related merge requests found
# Generated by Django 3.2.18 on 2023-09-07 09:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('proceedings', '0009_auto_20210422_0833'),
]
operations = [
migrations.AddField(
model_name='proceedings',
name='preface_text',
field=models.TextField(blank=True),
),
migrations.AddField(
model_name='proceedings',
name='preface_title',
field=models.CharField(blank=True, max_length=256),
),
]
...@@ -58,6 +58,10 @@ class Proceedings(TimeStampedModel): ...@@ -58,6 +58,10 @@ class Proceedings(TimeStampedModel):
submissions_deadline = models.DateField() submissions_deadline = models.DateField()
submissions_close = models.DateField() submissions_close = models.DateField()
# Proceedings optinal preface
preface_title = models.CharField(max_length=256, blank=True)
preface_text = models.TextField(blank=True)
# Templates # Templates
template_latex_tgz = models.FileField( template_latex_tgz = models.FileField(
verbose_name="Template (LaTeX, gzipped tarball)", verbose_name="Template (LaTeX, gzipped tarball)",
......
{% if proceedings.cover_image %} <div class="row">
<div class="row"> <div class="col">
<div class="col-md-10"> <div class="row">
{% endif %}
<div class="col">
<h3>
{{ proceedings.event_name }}
{% if proceedings.event_suffix %}({{ proceedings.event_suffix }}){% endif %}
</h3>
<div class="mb-4">Event dates: from {{ proceedings.event_start_date }} to {{ proceedings.event_end_date }}.</div>
</div>
{% if proceedings.logo %}
<div class="col-md-4">
<img style="max-width: 100%"
class="d-flex me-3"
src="{{ proceedings.logo.url }}"
alt="logo" />
</div>
{% endif %}
{% if proceedings.logo %}
<div class="row">
<div class="col-md-8">
{% endif %}
<h3>{{ proceedings.event_name }} {% if proceedings.event_suffix %}({{ proceedings.event_suffix }}){% endif %}</h3>
<div class="mb-4">
Event dates: from {{ proceedings.event_start_date }} to {{ proceedings.event_end_date }}.
</div>
{% if proceedings.logo %}
</div>
<div class="col-md-4">
<img style="max-width: 100%;" class="d-flex me-3" src="{{ proceedings.logo.url }}" alt="logo"/>
</div> </div>
<p>{{ proceedings.event_description|safe|linebreaksbr }}</p>
</div> </div>
{% endif %}
<p>{{ proceedings.event_description|safe|linebreaksbr }}</p> {% if proceedings.cover_image %}
{% if proceedings.picture %} <div class="col-2">
<figure class="mx-4 my-2"> <img style="max-width: 100%"
<img style="max-width: 100%;" src="{{ proceedings.picture.url }}" alt="picture"/> class="d-flex me-3"
{% if proceedings.picture_credit %}<figcaption>{{ proceedings.picture_credit }}</figcaption>{% endif %} src="{{ proceedings.cover_image.url }}"
</figure> alt="cover_image" />
<br> </div>
{% endif %} {% endif %}
{% if proceedings.picture %}
<div class="col-12">
<figure class="mx-4 my-2">
<img style="max-width: 100%"
src="{{ proceedings.picture.url }}"
alt="picture" />
{% if proceedings.picture_credit %}<figcaption>{{ proceedings.picture_credit }}</figcaption>{% endif %}
</figure>
<br />
</div>
{% endif %}
</div>
{% if proceedings.open_for_submission %} {% if proceedings.open_for_submission %}
<h3>Instructions for submitting to these Proceedings:</h3> <h3>Instructions for submitting to these Proceedings:</h3>
<ul> <ul>
<li> <li>
Prepare your manuscript according to <a href="{% url 'submissions:author_guidelines' %}">our guidelines</a>, using our template: Prepare your manuscript according to <a href="{% url 'submissions:author_guidelines' %}">our guidelines</a>, using our template:
<ul> <ul>
{% if proceedings.template_latex_tgz %}
<li><a href="{{ proceedings.template_latex_tgz.url }}" type="application/gzip" download>LaTeX (gzipped tarball)</a></li> {% if proceedings.template_latex_tgz %}
{% else %}
<li>Template will be available soon!</li> <li>
{% endif %} <a href="{{ proceedings.template_latex_tgz.url }}"
type="application/gzip"
download>LaTeX (gzipped tarball)</a>
</li>
{% else %}
<li>Template will be available soon!</li>
{% endif %}
</ul> </ul>
</li> </li>
<li> <li>
...@@ -46,19 +80,35 @@ ...@@ -46,19 +80,35 @@
</ul> </ul>
{% endif %} {% endif %}
{% if proceedings.cover_image %}
</div>
<div class="col-md-2">
<img style="max-width: 100%;" class="d-flex me-3" src="{{ proceedings.cover_image.url }}" alt="cover_image"/>
</div>
</div>
{% endif %}
{% if proceedings.fellowships.all.exists %} {% if proceedings.fellowships.all.exists %}
<h3>(Guest) Fellows responsible for this Issue</h3> <h3>(Guest) Fellows responsible for this Issue</h3>
<ul> <ul>
{% for fellow in proceedings.fellowships.all %} {% for fellow in proceedings.fellowships.all %}
<li>{{ fellow.contributor.profile.get_title_display }} {{ fellow.contributor.user.first_name }} {{ fellow.contributor.user.last_name }}{% if fellow.contributor.affiliation.name %}, {{ fellow.contributor.affiliation.name }}{% endif %}</li>
<li>
{{ fellow.contributor.profile.get_title_display }} {{ fellow.contributor.user.first_name }} {{ fellow.contributor.user.last_name }}
{% if fellow.contributor.affiliation.name %}, {{ fellow.contributor.affiliation.name }}{% endif %}
</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% if proceedings.preface_title and proceedings.preface_text %}
<details class="border border-primary bg-primary bg-opacity-10 p-2 my-4">
<summary>
<div class="p-2 border-bottom border-primary border-opacity-50 d-flex justify-content-between align-content-center">
<span class="fs-4 fs-bold text-primary">{{ proceedings.preface_title }}</span> <span class="text-muted">(click to expand/contract)</span>
</div>
<p class="details-preview p-2 mb-0">{{ proceedings.preface_text|safe|truncatewords_html:60 }}</p>
</summary>
<p class="card-text p-2">{{ proceedings.preface_text|safe|linebreaksbr }}</p>
</details>
{% endif %}
...@@ -253,4 +253,18 @@ summary { ...@@ -253,4 +253,18 @@ summary {
// Rotate the equilateral triangle when summary is open // Rotate the equilateral triangle when summary is open
details[open] summary.list-triangle::before { details[open] summary.list-triangle::before {
content: "▼"; content: "▼";
}
// Utilities for details element
// Hide details preview when open
details[open] {
.details-preview {
display: none;
}
}
details[closed] {
.details-preview {
display: unset;
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment