Skip to content

Commit

Permalink
center session template
Browse files Browse the repository at this point in the history
center event detail page

add container to base

standardize container sizes
  • Loading branch information
RachellCalhoun committed Apr 4, 2024
1 parent 9defedd commit 8422405
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 80 deletions.
60 changes: 28 additions & 32 deletions home/templates/home/general_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,32 @@
{% block body_class %}template-generalpage{% endblock %}

{% block content %}
<main>
<div class="container mx-auto flex justify-center">
<article class="box max-w-4xl blog-container">
<header>
<h2 class="text-2xl font-extrabold tracking-tight text-slate-900 dark:text-slate-700 md:text-3xl">
<a href="{% pageurl page %}">{{ page.title }}</a>
</h2>
<ul class="links">
<li>
<i class="fa fa-calendar"></i>
{{ page.date|date:"DATE_FORMAT" }}
</li>
<li>
{% for tag in page.tags.all %}
<a type="button" href="{{ page.get_parent.url }}search/?query={{ tag }}"
class="bg-purple-500 text-white font-bold py-1 px-2 text-xs rounded-full">{{ tag }}</a>
{% endfor %}
</li>
</ul>
<section class="leading-6 mt-5">
{{ page.intro|richtext }}
</section>
</header>
<section class="leading-6 mt-3">
{{ page.content }}
</section>
<section class="leading-6 mt-3">
{{ page.body|richtext }}
</section>
</article>
</div>
</main>
<main>
<header>
<h2 class="text-2xl font-extrabold tracking-tight text-slate-900 dark:text-slate-700 md:text-3xl">
<a href="{% pageurl page %}">{{ page.title }}</a>
</h2>
<ul class="links">
<li>
<i class="fa fa-calendar"></i>
{{ page.date|date:"DATE_FORMAT" }}
</li>
<li>
{% for tag in page.tags.all %}
<a type="button" href="{{ page.get_parent.url }}search/?query={{ tag }}"
class="bg-purple-500 text-white font-bold py-1 px-2 text-xs rounded-full">{{ tag }}</a>
{% endfor %}
</li>
</ul>
<section class="leading-6 mt-5">
{{ page.intro|richtext }}
</section>
</header>
<section class="leading-6 mt-3">
{{ page.body|richtext }}
</section>
<section class="leading-6 mt-3">
{{ page.content }}
</section>
</main>
{% endblock %}
2 changes: 1 addition & 1 deletion home/templates/home/includes/session_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h6 class="text-lg">Starts</h6>
</div>
<div class="px-6 py-3 mb-2 card-footer">
{% include 'home/includes/session_apply_btn.html' %}
<a href="{{ session.get_absolute_url }}" class="card-link">Details</a>
<a href="{{ session.get_absolute_url }}" class="card-link px-2">Details</a>
</div>
</div>
</div>
Expand Down
26 changes: 12 additions & 14 deletions home/templates/home/prerelease/event_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@
{% endblock social_share %}

{% block content %}
<div class="container main my-3 mx-3">
<div class="row my-3">
<main class="section my-3 mx-5">
<div class="section-container">
<h1 class="text-5xl my-3">{{ event.title }}</h1>
<div class="row">
<div class="col">
<h1 class="text-5xl my-3">{{ event.title }}</h1>
{% localtime on %}
<p><strong>Start:</strong> {{ event.start_time|date:"M d, Y H:i e" }}</p>
<p><strong>End:</strong> {{ event.end_time|date:"M d, Y H:i e" }}</p>
{% endlocaltime %}
<p><strong>Location:</strong> {{ event.location|urlizetrunc:25 }}</p>
<br>
<p>{{ event.description|linebreaksbr|urlizetrunc:25 }}</p>
</div>
</div>
<div class="row">
<div class="col">
{% localtime on %}
<p><strong>Start:</strong> {{ event.start_time|date:"M d, Y H:i e" }}</p>
<p><strong>End:</strong> {{ event.end_time|date:"M d, Y H:i e" }}</p>
{% endlocaltime %}
<p><strong>Location:</strong> {{ event.location|urlizetrunc:25 }}</p>
<br>
<p>{{ event.description|linebreaksbr|urlizetrunc:25 }}</p>
</div>
</div>
</div>
</main>
{% endblock content %}
3 changes: 2 additions & 1 deletion home/templates/home/prerelease/event_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ <h2 class="text-4xl">Upcoming Events</h2>
{% endfor %}

</div>
<h2 class="text-4xl">Past Events</h2>
<br>
<h2 class="text-4xl pt-4">Past Events</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 pt-4">

{% for event in past_events %}
Expand Down
50 changes: 24 additions & 26 deletions home/templates/home/prerelease/session_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,32 @@

{% block content %}
{% include 'home/includes/email_confirmed_warning.html' %}
<div class="container main my-3 mx-3">
<div class="row my-3">
<main class="section my-3 mx-5">
<div class="section-container">
<h1 class="text-5xl">{{ session.title }}</h1>
<div class="row pt-4 pb-4">
<div class="col">
<h1 class="text-5xl my-3">{{ session.title }}</h1>
<dl class="px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-2 sm:px-0">
<dt class="text-sm font-bold leading-6 text-gray-900">Applications Open:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.application_start_date|date:"M d, Y" }} AOE</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">Applications Close:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.application_end_date|date:"M d, Y" }} AOE</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">Invitations Sent:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.invitation_date|date:"M d, Y" }}</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">Start:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.start_date|date:"M d, Y" }}</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">End:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.end_date|date:"M d, Y" }}</dd>
</dl>
<p>{{ session.description|linebreaksbr|urlizetrunc:25 }}</p>
{% if session.is_accepting_applications and not session.completed_application %}
<br />
<h2 class="text-4xl">You have {{ session.application_end_anywhere_on_earth|timeuntil}} to submit your application</h2>
<br />
{% endif %}
{% include 'home/includes/session_apply_btn.html' %}
</div>
</div>
<div class="row">
<div class="col">
<dl class="px-4 py-3 sm:grid sm:grid-cols-3 sm:gap-2 sm:px-0">
<dt class="text-sm font-bold leading-6 text-gray-900">Applications Open:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.application_start_date|date:"M d, Y" }} AOE</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">Applications Close:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.application_end_date|date:"M d, Y" }} AOE</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">Invitations Sent:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.invitation_date|date:"M d, Y" }}</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">Start:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.start_date|date:"M d, Y" }}</dd>
<dt class="text-sm font-bold leading-6 text-gray-900">End:</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">{{ session.end_date|date:"M d, Y" }}</dd>
</dl>
<p>{{ session.description|linebreaksbr|urlizetrunc:25 }}</p>
{% if session.is_accepting_applications and not session.completed_application %}
<br />
<h2 class="text-4xl">You have {{ session.application_end_anywhere_on_earth|timeuntil}} to submit your application</h2>
<br />
{% endif %}
{% include 'home/includes/session_apply_btn.html' %}
</div>
</div>
</div>
</main>
{% endblock content %}
10 changes: 7 additions & 3 deletions indymeet/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@
<script src="https://unpkg.com/[email protected]"></script>
{% wagtailuserbar %}
{% include 'includes/messages.html' %}
{% block content %}
{# other page stuff goes here #}
{% endblock %}
<div class="{% if not blog_page %}container flex justify-center mx-auto max-w-screen-xl {% endif %}">
<div class="{% if not blog_page %}w-3/4{% endif %}">
{% block content %}
{# other page stuff goes here #}
{% endblock %}
</div>
</div>
{# Global javascript #}
{% include 'includes/footer.html' %}
</body>
Expand Down
2 changes: 1 addition & 1 deletion indymeet/templates/includes/nav.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load i18n static wagtailcore_tags %}
<nav class="bg-white {% if 'Home' in page.title %}stars{% endif %}">
<div class="mx-2 flex h-16 max-w-screen-xl items-center gap-8 px-1 sm:px-4 lg:px-2">
<div class="mx-2 flex h-16 items-center gap-8 px-1 sm:px-4 lg:px-2">
<a class="block text-teal-600" href="/">
<img alt="Djangonaut Space" class="nav-brand-icon" src="{% static 'img/main-purple-transparent.png' %}"/>
</a>
Expand Down
4 changes: 2 additions & 2 deletions indymeet/templates/puput/entry_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@

{% block content %}
<div class="container mx-auto flex justify-center">
<article class="box max-w-4xl blog-container"
<article class="box max-w-5xl blog-container"
{% if self.id %}data-entry-page-update-comments-url="{% url 'entry_page_update_comments' self.id %}{% endif %}">
{% include 'puput/entry_page_header.html' with entry=self %}
<section>
{% if self.header_image %}
<div class="image featured">
{% image self.header_image fill-800x450 as header_image %}
<img alt="{{ self.header_image.title }}" src="{{ header_image.url }}">
<img alt="{{ self.header_image.title }}" class="mx-auto" src="{{ header_image.url }}">
</div>
{% endif %}
{% include 'puput/entry_links.html' with entry=self %}
Expand Down

0 comments on commit 8422405

Please sign in to comment.