Last active
October 6, 2019 21:19
-
-
Save ivan-vilches/315be92049f8d2b9c9ee653e68877a85 to your computer and use it in GitHub Desktop.
home page models
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
{% extends "base.html" %} | |
{% block content %} | |
{% load static %} | |
{% load wagtailcore_tags wagtailimages_tags %} | |
<!-- PORTAFOLIO --> | |
<section class="portafolio "> | |
<div class="titulo"> | |
<h2>portafolio</h2> | |
<h3>galería de obras</h3> | |
</div> | |
<div class="botones-portafolio filters-button-group"> | |
<button class="boton-filtro boton" data-filter="*">todas</button> | |
<button class="boton-filtro boton" data-filter=".obras"> | |
obras | |
</button> | |
<button class="boton-filtro boton" data-filter=".talleres"> | |
talleres | |
</button> | |
<button class="boton-filtro boton" data-filter=".exposiciones"> | |
exposiciones | |
</button> | |
</div> | |
<ul class="grid"> | |
<li class="grid-item exposiciones"> | |
<a href="#"><img src="{% static "img/gal_1.jpg" %}"/></a> | |
</li> | |
<li class="grid-item obras talleres"> | |
<a href="#"><img src="{% static "img/gal_2.jpg" %}"/></a> | |
</li> | |
<li class="grid-item talleres"> | |
<a href="#"><img src="{% static "img/gal_3.jpg" %}"/></a> | |
</li> | |
<li class="grid-item exposiciones"> | |
<a href="#"><img src="{% static "img/gal_11.jpg" %}"/></a> | |
</li> | |
<li class="grid-item obras"> | |
<a href="#"><img src="{% static "img/gal_5.jpg" %}"/></a> | |
</li> | |
<li class="grid-item exposiciones"> | |
<a href="#"><img src="{% static "img/gal_6.jpg" %}"/></a> | |
</li> | |
<li class="grid-item talleres"> | |
<a href="#"><img src="{% static "img/gal_7.jpg" %}"/></a> | |
</li> | |
<li class="grid-item talleres"> | |
<a href="#"><img src="{% static "img/gal_8.jpg" %}"/></a> | |
</li> | |
<li class="grid-item talleres"> | |
<a href="#"><img src="{% static "img/gal_9.jpg" %}"/></a> | |
</li> | |
<li class="grid-item talleres"> | |
<a href="#"><img src="{% static "img/gal_10.jpg" %}"/></a> | |
</li> | |
<li class="grid-item talleres"> | |
<a href="#"><img src="{% static "img/gal_4.jpg" %}"/></a> | |
</li> | |
</ul> | |
</section> | |
<!-- NUESTRA HISTORIA --> | |
<section class="nuestra-historia seccion"> | |
<div class="container titulo"> | |
<h2>nuestra historia</h2> | |
<h3>homenaje a los artistas de un pasado remoto</h3> | |
<div class="parrafo"> | |
<div class="nosotros-texto-central"> | |
{{flex.texto_central|richtext}} | |
</div> | |
<p> | |
La realización del proyecto de creación | |
<strong class="st">CODIGOS SAGRADOS</strong> nace con el objetivo | |
de poner en valor la historia de la alfarería regional a través | |
del rescate de técnicas y el uso de materia primas locales, además | |
del uso de técnicas mixtas con materias primas actuales, serán 12 | |
piezas únicas, creativas y contemporáneas. | |
</p> | |
<p> | |
Cada asentamiento humano tuvo un lenguaje mítico - religioso en | |
sus múltiples morfologías, siempre estuvo presente su vinculación | |
con una conexión cósmica, sus códigos estéticos fundamentalmente | |
fueron ontológicos y conceptuales. | |
</p> | |
</div> | |
<div class="single-post-btn"> | |
<a class="btn boton" href="acerca-de-mi.html" role="button" | |
>leer más</a | |
> | |
</div> | |
</div> | |
</section> | |
<!-- BLOG --> | |
<section class="blog"> | |
<div class="container"> | |
<h2>de nuestro blog</h2> | |
<h3>revisa nuestros últimos artículos</h3> | |
<div class="row"> | |
<div class="col-sm-4"> | |
<div | |
class="home-img-post" | |
style="background: url('{% static "img/post1.jpg" %}') center center no-repeat; background-size: cover;" | |
></div> | |
<h3>Lorem ipsum dolor sit amet vero sequi</h3> | |
</div> | |
<div class="col-sm-4"> | |
<div | |
class="home-img-post" | |
style="background: url('{% static "img/post2.jpg" %}') center center no-repeat; background-size: cover;" | |
></div> | |
<h3>Lorem ipsum dolor sit amet vero sequi</h3> | |
</div> | |
<div class="col-sm-4"> | |
<div | |
class="home-img-post" | |
style="background: url('{% static "img/post3.jpg" %}') center center no-repeat; background-size: cover;" | |
></div> | |
<h3>Lorem ipsum dolor sit amet vero sequi</h3> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- PROGRAMACIÓN --> | |
<section> | |
<div | |
class="header-titulo" | |
style="background: url('{% static "img/programacion_bg.jpg" %}'); background-position: center center; background-repeat: no-repeat; background-size: cover;" | |
> | |
<div class="overlay"></div> | |
<h2>programación</h2> | |
</div> | |
</section> | |
<!-- CONTACTO --> | |
<section id="contact" class="contacto"> | |
<div class="container titulo "> | |
<h2>contacto</h2> | |
<h3>nos encantaría saber de ti</h3> | |
<form class="formulario" action=""> | |
<div class="entradas"> | |
<input | |
class="input-1" | |
type="text" | |
placeholder="NOMBRE" | |
name="name" | |
required | |
/> | |
<input | |
class="in-2" | |
type="text" | |
placeholder="EMAIL" | |
name="email" | |
required | |
/> | |
<input | |
class="input-3" | |
type="text" | |
placeholder="ASUNTO" | |
name="subject" | |
required | |
/> | |
</div> | |
<div class="area"> | |
<textarea | |
class="" | |
placeholder="MENSAJE" | |
cols="40" | |
rows="15" | |
></textarea> | |
</div> | |
<div class="enviar"> | |
<input class="btn-enviar" type="submit" value="ENVIAR" /> | |
</div> | |
</form> | |
</div> | |
</section> | |
{% endblock %} |
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
from django.db import models | |
from wagtail.core.models import Page | |
from wagtail.core.fields import RichTextField | |
from wagtail.admin.edit_handlers import FieldPanel | |
from wagtail.images.edit_handlers import ImageChooserPanel | |
# Create your models here. | |
class FlexPage(Page): | |
template = "flex/flex_page.html" | |
# content = StreamField() | |
titulo = models.CharField(max_length=50, null=True, blank=True) | |
subtitulo = models.CharField(max_length=100, null=True, blank=True) | |
texto_central = RichTextField(features=["bold", "italic"]) | |
image_nosotros = models.ForeignKey( | |
"wagtailimages.Image", | |
null=True, | |
blank=True, | |
on_delete=models.SET_NULL, | |
related_name="+", | |
) | |
content_panels = Page.content_panels + [ | |
FieldPanel("titulo"), | |
FieldPanel("subtitulo"), | |
FieldPanel("texto_central"), | |
ImageChooserPanel("image_nosotros") | |
] | |
class Meta: | |
verbose_name = "Página" | |
verbose_name_plural = "Páginas" |
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
from django.db import models | |
""" IMPORTING DATA FROM FLEX APP """ | |
from flex.models import FlexPage | |
from wagtail.core.models import Page | |
class HomePage(Page): | |
""" Home page model """ | |
templates = "home/home_page.html" | |
max_count = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment