Updated template to take employee profiles. Removed animatation graphics for hero images.
parent
8be9a4b173
commit
ecbed27f18
@ -0,0 +1,34 @@
|
||||
# Generated by Django 2.1.7 on 2019-03-30 19:49
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import modelcluster.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wagtailimages', '0001_squashed_0021'),
|
||||
('home', '0002_create_homepage'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Profile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=80)),
|
||||
('caption', models.CharField(max_length=255)),
|
||||
('profile_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Profile',
|
||||
'verbose_name_plural': 'Profiles',
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='homepage',
|
||||
name='profiles',
|
||||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='home.Profile'),
|
||||
),
|
||||
]
|
@ -1,7 +1,45 @@
|
||||
from django import forms
|
||||
from django.db import models
|
||||
from wagtail.admin.edit_handlers import FieldPanel
|
||||
from wagtail.snippets.models import register_snippet
|
||||
from wagtail.images.models import Image
|
||||
from wagtail.images.edit_handlers import ImageChooserPanel
|
||||
from modelcluster.fields import ParentalManyToManyField
|
||||
|
||||
from wagtail.core.models import Page
|
||||
|
||||
|
||||
class HomePage(Page):
|
||||
pass
|
||||
profiles = ParentalManyToManyField('home.Profile', blank=True)
|
||||
|
||||
content_panels = [
|
||||
FieldPanel('profiles', widget=forms.CheckboxSelectMultiple),
|
||||
]
|
||||
|
||||
@register_snippet
|
||||
class Profile(models.Model):
|
||||
name = models.CharField(max_length=80)
|
||||
profile_image = models.ForeignKey(
|
||||
'wagtailimages.Image',
|
||||
null=True,
|
||||
blank=True,
|
||||
on_delete=models.SET_NULL,
|
||||
related_name='+'
|
||||
)
|
||||
caption = models.CharField(max_length=255)
|
||||
|
||||
panels = [
|
||||
FieldPanel('name'),
|
||||
ImageChooserPanel('profile_image'),
|
||||
FieldPanel('caption'),
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __repr__(self):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Profile"
|
||||
verbose_name_plural = "Profiles"
|
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
!function(){const e=document.documentElement;if(e.classList.remove("no-js"),e.classList.add("js"),document.body.classList.contains("has-animations")){(window.sr=ScrollReveal()).reveal(".feature, .testimonial",{duration:600,distance:"50px",easing:"cubic-bezier(0.5, -0.01, 0, 1.005)",origin:"bottom",interval:100});const a=anime.timeline({autoplay:!1}),t=document.querySelector(".stroke-animation");t.setAttribute("stroke-dashoffset",anime.setDashoffset(t)),a.add({targets:".stroke-animation",strokeDashoffset:{value:0,duration:2e3,easing:"easeInOutQuart"},strokeWidth:{value:[0,2],duration:2e3,easing:"easeOutCubic"},strokeOpacity:{value:[1,0],duration:1e3,easing:"easeOutCubic",delay:1e3},fillOpacity:{value:[0,1],duration:500,easing:"easeOutCubic",delay:1300}}).add({targets:".fadeup-animation",offset:1300,translateY:{value:[100,0],duration:1500,easing:"easeOutElastic",delay:function(e,a){return 150*a}},opacity:{value:[0,1],duration:200,easing:"linear",delay:function(e,a){return 150*a}}}).add({targets:".fadeleft-animation",offset:1300,translateX:{value:[40,0],duration:400,easing:"easeOutCubic",delay:function(e,a){return 100*a}},opacity:{value:[0,1],duration:200,easing:"linear",delay:function(e,a){return 100*a}}}),e.classList.add("anime-ready"),a.play()}}();
|
File diff suppressed because one or more lines are too long
@ -1,21 +1,21 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block body_class %}template-homepage{% endblock %}
|
||||
{% block body_class %}is-boxed has-animations{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
|
||||
{% comment %}
|
||||
Delete the line below if you're just getting started and want to remove the welcome screen!
|
||||
{% endcomment %}
|
||||
<link rel="stylesheet" href="{% static 'css/welcome_page.css' %}">
|
||||
<link href="https://fonts.googleapis.com/css?family=Heebo:400,500,700|Fira+Sans:600" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
||||
{% endblock extra_css %}
|
||||
{% block title_js %}
|
||||
<script src="https://unpkg.com/animejs@2.2.0/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% comment %}
|
||||
Delete the line below if you're just getting started and want to remove the welcome screen!
|
||||
{% endcomment %}
|
||||
{% include 'home/welcome_page.html' %}
|
||||
|
||||
{% include "home/april_page.html" %}
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script type="text/javascript" src="{% static 'js/main.min.js' %}"></script>
|
||||
{% endblock extra_js %}
|
Loading…
Reference in New Issue