diff --git a/home/migrations/0004_auto_20201202_1134.py b/home/migrations/0004_auto_20201202_1134.py new file mode 100644 index 0000000..97c0c5a --- /dev/null +++ b/home/migrations/0004_auto_20201202_1134.py @@ -0,0 +1,24 @@ +# Generated by Django 3.1.3 on 2020-12-02 10:34 + +from django.db import migrations +import wagtail.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0003_auto_20201124_1724'), + ] + + operations = [ + migrations.AddField( + model_name='homepage', + name='email', + field=wagtail.core.fields.RichTextField(blank=True), + ), + migrations.AddField( + model_name='homepage', + name='phone', + field=wagtail.core.fields.RichTextField(blank=True), + ), + ] diff --git a/home/models.py b/home/models.py index 67a4a8e..bdb7766 100644 --- a/home/models.py +++ b/home/models.py @@ -11,6 +11,8 @@ from wagtail.admin.edit_handlers import FieldPanel, InlinePanel class HomePage(Page): body = RichTextField(blank=True) address = RichTextField(blank=True) + email = RichTextField(blank=True) + phone = RichTextField(blank=True) image = models.ForeignKey( 'wagtailimages.Image', on_delete=models.PROTECT, null=True, related_name='+' ) @@ -18,5 +20,7 @@ class HomePage(Page): content_panels = Page.content_panels + [ FieldPanel('body', classname="full"), FieldPanel('address', classname="full"), + FieldPanel('email', classname="full"), + FieldPanel('phone', classname="full"), ImageChooserPanel('image'), ] \ No newline at end of file diff --git a/home/templates/home/home_page.html b/home/templates/home/home_page.html index d8b124f..23e6f26 100644 --- a/home/templates/home/home_page.html +++ b/home/templates/home/home_page.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load wagtailcore_tags %} +{% load wagtailcore_tags wagtailimages_tags %} {% block body_class %}template-homepage{% endblock %} @@ -10,5 +10,7 @@ {% block content %} + {% image page.image width-1100 id="banner" %} {{ page.body|richtext }} + {% endblock content %} diff --git a/media/images/118703245_2653551634748208_77299427656457371.max-165x165.jpg b/media/images/118703245_2653551634748208_77299427656457371.max-165x165.jpg deleted file mode 100644 index 92e3589..0000000 Binary files a/media/images/118703245_2653551634748208_77299427656457371.max-165x165.jpg and /dev/null differ diff --git a/media/original_images/118703245_2653551634748208_7729942765645737115_n.jpg b/media/original_images/118703245_2653551634748208_7729942765645737115_n.jpg deleted file mode 100644 index 1a53999..0000000 Binary files a/media/original_images/118703245_2653551634748208_7729942765645737115_n.jpg and /dev/null differ diff --git a/media/original_images/banner.jpg b/media/original_images/banner.jpg new file mode 100644 index 0000000..557778c Binary files /dev/null and b/media/original_images/banner.jpg differ diff --git a/veterina/settings/base.py b/veterina/settings/base.py index d8e4b06..ed883dc 100644 --- a/veterina/settings/base.py +++ b/veterina/settings/base.py @@ -122,7 +122,7 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/3.1/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'cs' TIME_ZONE = 'Europe/Prague' diff --git a/veterina/static/css/veterina.css b/veterina/static/css/veterina.css index e69de29..6fd5750 100644 --- a/veterina/static/css/veterina.css +++ b/veterina/static/css/veterina.css @@ -0,0 +1,8 @@ +#banner{ + margin: 10 auto; +} + +#homepage_text{ + font-size: 20px; + text-align: center; +} \ No newline at end of file diff --git a/veterina/templates/base.html b/veterina/templates/base.html index 630de46..c73e176 100644 --- a/veterina/templates/base.html +++ b/veterina/templates/base.html @@ -18,6 +18,7 @@ {# Global stylesheets #} + {% block extra_css %} @@ -27,8 +28,22 @@ {% wagtailuserbar %} +
+
Company name
+ + Sign up +
+
+ {% block content %} - {% block content %}{% endblock %} + {% endblock %} +
+ {# Global javascript #}