-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from chnm/refactor/api-data
This PR adds the three column general page layout
- Loading branch information
Showing
5 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Generated by Django 5.0.6 on 2024-10-09 17:06 | ||
|
||
import django.db.models.deletion | ||
import wagtail.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("exhibits", "0029_exhibitpage_image_first_column_zoomable_and_more"), | ||
("wagtailcore", "0093_uploadedfile"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="GeneralPageThreeColumn", | ||
fields=[ | ||
( | ||
"page_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="wagtailcore.page", | ||
), | ||
), | ||
( | ||
"column_one", | ||
wagtail.fields.RichTextField( | ||
blank=True, help_text="Column one content." | ||
), | ||
), | ||
( | ||
"column_two", | ||
wagtail.fields.RichTextField( | ||
blank=True, help_text="Column two content." | ||
), | ||
), | ||
( | ||
"column_three", | ||
wagtail.fields.RichTextField( | ||
blank=True, help_text="Column three content." | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("wagtailcore.page",), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
exhibits/templates/exhibits/general_page_three_column.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% extends 'base.html' %} | ||
{% load static %} | ||
{% load wagtailcore_tags wagtailimages_tags %} | ||
|
||
{% block title %}Connecting Threads | {{ page.title }}{% endblock title %} | ||
|
||
{% block content %} | ||
<div class="container mx-auto px-4 py-8"> | ||
<div class="prose mb-4"> | ||
<h1>{{ page.title }}</h1> | ||
</div> | ||
|
||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-2"> | ||
<!-- First Column --> | ||
<div class="prose"> | ||
{{ page.column_one|richtext }} | ||
</div> | ||
<!-- Second Column --> | ||
<div class="prose"> | ||
{{ page.column_two|richtext }} | ||
</div> | ||
<!-- Third Column --> | ||
<div class="prose"> | ||
{{ page.column_three|richtext }} | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock content %} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters