diff --git a/oshc/main/admin.py b/oshc/main/admin.py index 83ff580..f30bc7b 100644 --- a/oshc/main/admin.py +++ b/oshc/main/admin.py @@ -3,13 +3,17 @@ from django.contrib import admin -from main.models import chatSession, Contest +from main.models import chatSession, Contest, Journey class chatSessionAdmin(admin.ModelAdmin): list_display = ('title', 'start_date') +class journeyAdmin(admin.ModelAdmin): + list_display = ('title', 'start_date') + + class contestAdmin(admin.ModelAdmin): list_display = ('name', 'link', 'description', 'start_date', 'end_date', 'approved') @@ -26,4 +30,5 @@ def approve_contest(self, request, queryset): admin.site.register(chatSession, chatSessionAdmin) +admin.site.register(Journey, journeyAdmin) admin.site.register(Contest, contestAdmin) diff --git a/oshc/main/migrations/0002_journey.py b/oshc/main/migrations/0002_journey.py new file mode 100644 index 0000000..88a212b --- /dev/null +++ b/oshc/main/migrations/0002_journey.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-12-17 21:29 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Journey', + fields=[ + ('id', models.AutoField(auto_created=True, + primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(help_text='Journey title', + max_length=128)), + ('description', models.TextField(help_text='Session details', + max_length=512)), + ('start_date', models.DateTimeField()), + ], + ), + ] diff --git a/oshc/main/models.py b/oshc/main/models.py index 6a7b78a..daa224f 100644 --- a/oshc/main/models.py +++ b/oshc/main/models.py @@ -29,3 +29,12 @@ class Contest(models.Model): def __str__(self): return self.name + + +class Journey(models.Model): + title = models.CharField(max_length=128, help_text="Journey title") + start_date = models.DateField(null=True) + + def __str__(self): + return self.title + \ No newline at end of file diff --git a/oshc/main/static/main/css/app.css b/oshc/main/static/main/css/app.css index 793c61c..193444f 100644 --- a/oshc/main/static/main/css/app.css +++ b/oshc/main/static/main/css/app.css @@ -420,3 +420,72 @@ footer .container { .subtitle { margin: 0 !important; } + +/* TIMELINE CHANGES */ + +body { + background: #d4e5f7; +} + +.timeline ul { + background: #d4e5f7; + padding: 50px 0; +} + +.timeline ul li { + list-style-type: none; + position: relative; + width: 6px; + margin: 0 auto; + padding-top: 50px; + background: #ffffff; +} + +.timeline ul li::after { + content: ''; + position: absolute; + left: 50%; + bottom: 0; + transform: translateX(-50%); + width: 30px; + height: 30px; + border-radius: 50%; + background: inherit; +} + +.timeline ul li div { + position: relative; + bottom: 0; + width: 400px; + padding: 15px; + background: #ffffff; +} + +.timeline ul li div::before { + content: ''; + position: absolute; + bottom: 7px; + width: 0; + height: 0; + border-style: solid; +} + +.timeline ul li:nth-child(odd) div { + left: 45px; +} + +.timeline ul li:nth-child(odd) div::before { + left: -15px; + border-width: 8px 16px 8px 0; + border-color: transparent #ffffff transparent transparent; +} + +.timeline ul li:nth-child(even) div { + left: -439px; +} + +.timeline ul li:nth-child(even) div::before { + right: -15px; + border-width: 8px 0 8px 16px; + border-color: transparent transparent transparent #ffffff; +} \ No newline at end of file diff --git a/oshc/main/templates/base.html b/oshc/main/templates/base.html index 0229935..581fadd 100644 --- a/oshc/main/templates/base.html +++ b/oshc/main/templates/base.html @@ -33,7 +33,8 @@