-
Notifications
You must be signed in to change notification settings - Fork 107
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 #954 from okfn/902/make-frontpage-dynamic
Make front page dynamic
- Loading branch information
Showing
33 changed files
with
623 additions
and
443 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
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
|
||
|
||
class FeatureBlockForm(ModelForm): | ||
image = SvgAndImageFormField() | ||
image = SvgAndImageFormField(required=False) |
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
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
31 changes: 31 additions & 0 deletions
31
foundation/okfplugins/feature_block/migrations/0010_alter_featureblock_block_type.py
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,31 @@ | ||
# Generated by Django 4.2.3 on 2023-08-09 09:36 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("feature_block", "0009_alter_featureblock_block_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="featureblock", | ||
name="block_type", | ||
field=models.CharField( | ||
choices=[ | ||
("yellow", "Yellow"), | ||
("white", "White"), | ||
("transparent_title", "Transparent with Title"), | ||
("transparent_no_title", "Transparent without Title"), | ||
("background_rounded", "Rounded corners"), | ||
("header_background", "Header Background"), | ||
("blue", "Blue Background"), | ||
("yellow", "Yellow Background"), | ||
("purple", "Purple Background"), | ||
], | ||
default="yellow", | ||
max_length=20, | ||
), | ||
), | ||
] |
36 changes: 36 additions & 0 deletions
36
foundation/okfplugins/feature_block/migrations/0011_featureblockcontainer.py
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,36 @@ | ||
# Generated by Django 4.2.3 on 2023-08-14 06:08 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("cms", "0022_auto_20180620_1551"), | ||
("feature_block", "0010_alter_featureblock_block_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="FeatureBlockContainer", | ||
fields=[ | ||
( | ||
"cmsplugin_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
related_name="%(app_label)s_%(class)s", | ||
serialize=False, | ||
to="cms.cmsplugin", | ||
), | ||
), | ||
("title", models.CharField(max_length=200)), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("cms.cmsplugin",), | ||
), | ||
] |
12 changes: 12 additions & 0 deletions
12
foundation/okfplugins/feature_block/migrations/0012_merge_20230822_0807.py
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,12 @@ | ||
# Generated by Django 4.2.3 on 2023-08-22 08:07 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("feature_block", "0010_featureblock_text_color"), | ||
("feature_block", "0011_featureblockcontainer"), | ||
] | ||
|
||
operations = [] |
31 changes: 31 additions & 0 deletions
31
foundation/okfplugins/feature_block/migrations/0013_alter_featureblock_block_type.py
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,31 @@ | ||
# Generated by Django 4.2.3 on 2023-08-22 08:52 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("feature_block", "0012_merge_20230822_0807"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="featureblock", | ||
name="block_type", | ||
field=models.CharField( | ||
choices=[ | ||
("yellow_box", "Yellow Box"), | ||
("white_box", "White Box"), | ||
("transparent_title", "Transparent with Title"), | ||
("transparent_no_title", "Transparent without Title"), | ||
("background_rounded", "Rounded corners"), | ||
("header_background", "Header Background"), | ||
("blue", "Blue Background"), | ||
("yellow", "Yellow Background"), | ||
("purple", "Purple Background"), | ||
], | ||
default="yellow", | ||
max_length=20, | ||
), | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
foundation/okfplugins/feature_block/migrations/0014_featureblockcontainer_show_title.py
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,17 @@ | ||
# Generated by Django 4.2.3 on 2023-09-13 07:39 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("feature_block", "0013_alter_featureblock_block_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="featureblockcontainer", | ||
name="show_title", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
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
12 changes: 12 additions & 0 deletions
12
foundation/okfplugins/feature_block/templates/feature_block_container_plugin.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,12 @@ | ||
<section class="sect sect-features -tighten-1 mb-20"> | ||
<div class="sect__content"> | ||
{% if instance.show_title %} | ||
<h2 class="mb-20 text-h1 text-center font-bold leading-none">{{ instance.title | safe }}</h2> | ||
{% endif %} | ||
<div class="grid grid-cols-1 md:grid-cols-3 gap-10 lg:gap-16 mx-auto"> | ||
{% for instance in instance.child_plugin_instances %} | ||
{% include 'feature_block_plugin.html' with instance=instance %} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</section> |
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
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
Oops, something went wrong.