-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cfca13
commit 6851601
Showing
13 changed files
with
138 additions
and
20 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
app/contrib/frontend/landpage/migrations/0010_auto_20240117_2042.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,23 @@ | ||
# Generated by Django 3.2 on 2024-01-17 20:42 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('landpage', '0009_auto_20231020_1853'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='footer', | ||
name='font', | ||
field=models.CharField(blank=True, choices=[('Abel', 'Abel'), ('Anton', 'Anton'), ('Archivo Narrow', 'Archivo Narrow'), ('Arvo', 'Arvo'), ('Asap', 'Asap'), ('Baloo Bhai', 'Baloo Bhai'), ('Bebas Neue Pro', 'Bebas Neue Pro'), ('Bitter', 'Bitter'), ('Bree Serif', 'Bree Serif'), ('Capriola', 'Capriola'), ('Cabin', 'Cabin'), ('Catamaran', 'Catamaran'), ('Crimson Text', 'Crimson Text'), ('Cuprum', 'Cuprum'), ('David Libre', 'David Libre'), ('Dosis', 'Dosis'), ('Droid Sans', 'Droid Sans'), ('Exo', 'Exo'), ('Exo 2', 'Exo 2'), ('Fira Sans', 'Fira Sans'), ('Fjalla One', 'Fjalla One'), ('Francois One', 'Francois One'), ('Gidugu', 'Gidugu'), ('Hind', 'Hind'), ('Inconsolata', 'Inconsolata'), ('Indie Flower', 'Indie Flower'), ('Josefin Sans', 'Josefin Sans'), ('Karla', 'Karla'), ('Lalezar', 'Lalezar'), ('Lato', 'Lato'), ('Libre Baskerville', 'Libre Baskerville'), ('Lobster', 'Lobster'), ('Lora', 'Lora'), ('Merriweather Sans', 'Merriweather Sans'), ('Montserrat', 'Montserrat'), ('Muli', 'Muli'), ('Noto Serif', 'Noto Serif'), ('Nunito Sans', 'Nunito Sans'), ('Open Sans', 'Open Sans'), ('Open Sans Condensed', 'Open Sans Condensed'), ('Oswald', 'Oswald'), ('Oxygen', 'Oxygen'), ('PT Sans', 'PT Sans'), ('PT Serif', 'PT Serif'), ('Pacifico', 'Pacifico'), ('Playfair Display', 'Playfair Display'), ('Poiret One', 'Poiret One'), ('Poppins', 'Poppins'), ('Quicksand', 'Quicksand'), ('Raleway', 'Raleway'), ('Roboto', 'Roboto'), ('Roboto Condensed', 'Roboto Condensed'), ('Roboto Mono', 'Roboto Mono'), ('Roboto Slab', 'Roboto Slab'), ('Ruslan Display', 'Ruslan Display'), ('Signika', 'Signika'), ('Slabo 27px', 'Slabo 27px'), ('Source Sans Pro', 'Source Sans Pro'), ('Titillium Web', 'Titillium Web'), ('Ubuntu', 'Ubuntu'), ('Ubuntu Condensed', 'Ubuntu Condensed'), ('Varela Round', 'Varela Round'), ('Yanone Kaffeesatz', 'Yanone Kaffeesatz')], max_length=100, null=True, verbose_name='Estilo de fonte'), | ||
), | ||
migrations.AlterField( | ||
model_name='navbar', | ||
name='font', | ||
field=models.CharField(blank=True, choices=[('Abel', 'Abel'), ('Anton', 'Anton'), ('Archivo Narrow', 'Archivo Narrow'), ('Arvo', 'Arvo'), ('Asap', 'Asap'), ('Baloo Bhai', 'Baloo Bhai'), ('Bebas Neue Pro', 'Bebas Neue Pro'), ('Bitter', 'Bitter'), ('Bree Serif', 'Bree Serif'), ('Capriola', 'Capriola'), ('Cabin', 'Cabin'), ('Catamaran', 'Catamaran'), ('Crimson Text', 'Crimson Text'), ('Cuprum', 'Cuprum'), ('David Libre', 'David Libre'), ('Dosis', 'Dosis'), ('Droid Sans', 'Droid Sans'), ('Exo', 'Exo'), ('Exo 2', 'Exo 2'), ('Fira Sans', 'Fira Sans'), ('Fjalla One', 'Fjalla One'), ('Francois One', 'Francois One'), ('Gidugu', 'Gidugu'), ('Hind', 'Hind'), ('Inconsolata', 'Inconsolata'), ('Indie Flower', 'Indie Flower'), ('Josefin Sans', 'Josefin Sans'), ('Karla', 'Karla'), ('Lalezar', 'Lalezar'), ('Lato', 'Lato'), ('Libre Baskerville', 'Libre Baskerville'), ('Lobster', 'Lobster'), ('Lora', 'Lora'), ('Merriweather Sans', 'Merriweather Sans'), ('Montserrat', 'Montserrat'), ('Muli', 'Muli'), ('Noto Serif', 'Noto Serif'), ('Nunito Sans', 'Nunito Sans'), ('Open Sans', 'Open Sans'), ('Open Sans Condensed', 'Open Sans Condensed'), ('Oswald', 'Oswald'), ('Oxygen', 'Oxygen'), ('PT Sans', 'PT Sans'), ('PT Serif', 'PT Serif'), ('Pacifico', 'Pacifico'), ('Playfair Display', 'Playfair Display'), ('Poiret One', 'Poiret One'), ('Poppins', 'Poppins'), ('Quicksand', 'Quicksand'), ('Raleway', 'Raleway'), ('Roboto', 'Roboto'), ('Roboto Condensed', 'Roboto Condensed'), ('Roboto Mono', 'Roboto Mono'), ('Roboto Slab', 'Roboto Slab'), ('Ruslan Display', 'Ruslan Display'), ('Signika', 'Signika'), ('Slabo 27px', 'Slabo 27px'), ('Source Sans Pro', 'Source Sans Pro'), ('Titillium Web', 'Titillium Web'), ('Ubuntu', 'Ubuntu'), ('Ubuntu Condensed', 'Ubuntu Condensed'), ('Varela Round', 'Varela Round'), ('Yanone Kaffeesatz', 'Yanone Kaffeesatz')], max_length=100, null=True, verbose_name='Estilo de fonte'), | ||
), | ||
] |
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,18 @@ | ||
# Generated by Django 3.2 on 2024-01-17 20:42 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('frontend', '0004_auto_20231005_1254'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='button', | ||
name='font', | ||
field=models.CharField(blank=True, choices=[('Abel', 'Abel'), ('Anton', 'Anton'), ('Archivo Narrow', 'Archivo Narrow'), ('Arvo', 'Arvo'), ('Asap', 'Asap'), ('Baloo Bhai', 'Baloo Bhai'), ('Bebas Neue Pro', 'Bebas Neue Pro'), ('Bitter', 'Bitter'), ('Bree Serif', 'Bree Serif'), ('Capriola', 'Capriola'), ('Cabin', 'Cabin'), ('Catamaran', 'Catamaran'), ('Crimson Text', 'Crimson Text'), ('Cuprum', 'Cuprum'), ('David Libre', 'David Libre'), ('Dosis', 'Dosis'), ('Droid Sans', 'Droid Sans'), ('Exo', 'Exo'), ('Exo 2', 'Exo 2'), ('Fira Sans', 'Fira Sans'), ('Fjalla One', 'Fjalla One'), ('Francois One', 'Francois One'), ('Gidugu', 'Gidugu'), ('Hind', 'Hind'), ('Inconsolata', 'Inconsolata'), ('Indie Flower', 'Indie Flower'), ('Josefin Sans', 'Josefin Sans'), ('Karla', 'Karla'), ('Lalezar', 'Lalezar'), ('Lato', 'Lato'), ('Libre Baskerville', 'Libre Baskerville'), ('Lobster', 'Lobster'), ('Lora', 'Lora'), ('Merriweather Sans', 'Merriweather Sans'), ('Montserrat', 'Montserrat'), ('Muli', 'Muli'), ('Noto Serif', 'Noto Serif'), ('Nunito Sans', 'Nunito Sans'), ('Open Sans', 'Open Sans'), ('Open Sans Condensed', 'Open Sans Condensed'), ('Oswald', 'Oswald'), ('Oxygen', 'Oxygen'), ('PT Sans', 'PT Sans'), ('PT Serif', 'PT Serif'), ('Pacifico', 'Pacifico'), ('Playfair Display', 'Playfair Display'), ('Poiret One', 'Poiret One'), ('Poppins', 'Poppins'), ('Quicksand', 'Quicksand'), ('Raleway', 'Raleway'), ('Roboto', 'Roboto'), ('Roboto Condensed', 'Roboto Condensed'), ('Roboto Mono', 'Roboto Mono'), ('Roboto Slab', 'Roboto Slab'), ('Ruslan Display', 'Ruslan Display'), ('Signika', 'Signika'), ('Slabo 27px', 'Slabo 27px'), ('Source Sans Pro', 'Source Sans Pro'), ('Titillium Web', 'Titillium Web'), ('Ubuntu', 'Ubuntu'), ('Ubuntu Condensed', 'Ubuntu Condensed'), ('Varela Round', 'Varela Round'), ('Yanone Kaffeesatz', 'Yanone Kaffeesatz')], max_length=100, null=True, verbose_name='Estilo de fonte'), | ||
), | ||
] |
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
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,34 @@ | ||
from cms.plugin_pool import plugin_pool | ||
|
||
from nossas.design.cms_plugins import UICMSPluginBase | ||
|
||
from nossas.plugins.models.containermodel import Container | ||
from nossas.plugins.forms.containerform import ContainerPluginForm | ||
|
||
@plugin_pool.register_plugin | ||
class ContainerPlugin(UICMSPluginBase): | ||
name = "Container" | ||
module = "NOSSAS" | ||
model = Container | ||
form = ContainerPluginForm | ||
render_template = "nossas/plugins/container.html" | ||
allow_children = True | ||
fieldsets = ( | ||
("Atributos", {"fields": ["attributes"]}), | ||
("Fundo", {"fields": ["background"]}) | ||
) | ||
|
||
def get_form(self, request, obj, change, **kwargs): | ||
if not change: | ||
self.form = ContainerPluginForm | ||
|
||
return super().get_form(request, obj, change, **kwargs) | ||
|
||
def get_fieldsets(self, request, obj=None): | ||
if not obj: | ||
self.fieldsets = ( | ||
(None, {"fields": ["attributes"]}), | ||
("Fundo", {"fields": ["background"]}), | ||
) | ||
|
||
return super().get_fieldsets(request, obj) |
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,16 @@ | ||
from django import forms | ||
|
||
from nossas.design.forms import ( | ||
UIBackgroundFormMixin | ||
) | ||
|
||
from nossas.plugins.models.containermodel import Container | ||
|
||
|
||
class ContainerPluginForm( | ||
UIBackgroundFormMixin, forms.ModelForm | ||
): | ||
class Meta: | ||
model = Container | ||
entangled_fields = {"attributes": []} | ||
|
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,27 @@ | ||
# Generated by Django 3.2 on 2024-01-17 20:42 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import nossas.design.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cms', '0022_auto_20180620_1551'), | ||
('plugins', '0008_accordion'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Container', | ||
fields=[ | ||
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='plugins_container', serialize=False, to='cms.cmsplugin')), | ||
('attributes', models.JSONField(blank=True, null=True)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=(nossas.design.models.UIBackgroundMixin, 'cms.cmsplugin'), | ||
), | ||
] |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
from .accordionmodel import * | ||
from .boxmodel import * | ||
from .buttonmodel import * | ||
from .containermodel import * | ||
from .gridmodel import * | ||
from .navbarmodel import * | ||
from .slidermodel import * | ||
from .slidermodel import * |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from nossas.design.models import UICMSPlugin, UIBackgroundMixin | ||
|
||
|
||
class Container(UIBackgroundMixin, UICMSPlugin): | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load cms_tags %} | ||
|
||
<div class="{{ instance.classes }}"> | ||
<div class="container"> | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% render_plugin plugin %} | ||
{% endfor %} | ||
</div> | ||
</div> |
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