diff --git a/client/src/components/ContentBlock.vue b/client/src/components/ContentBlock.vue index 3f8aaa7f..9a8624da 100644 --- a/client/src/components/ContentBlock.vue +++ b/client/src/components/ContentBlock.vue @@ -136,6 +136,7 @@ diff --git a/client/src/styles/_mixins.scss b/client/src/styles/_mixins.scss index a6e5d917..8d7e202c 100644 --- a/client/src/styles/_mixins.scss +++ b/client/src/styles/_mixins.scss @@ -32,3 +32,15 @@ } } + +@mixin content-box($main-color) { + background-color: rgba($main-color, 0.15); + padding: 15px; + align-items: start; + border-radius: $default-border-radius; + + /deep/ .button { + border-color: $main-color; + background-color: $color-white; + } +} diff --git a/server/books/factories.py b/server/books/factories.py index c13fb548..f647e856 100644 --- a/server/books/factories.py +++ b/server/books/factories.py @@ -93,7 +93,7 @@ class ContentBlockFactory(BasePageFactory): class Meta: model = ContentBlock - type = factory.LazyAttribute(lambda x: random.choice(['plain', 'yellow', 'green', 'blue'])) + type = factory.LazyAttribute(lambda x: random.choice(['normal', 'base_communication', 'task', 'base_society'])) contents = wagtail_factories.StreamFieldFactory({ 'text_block': TextBlockFactory, diff --git a/server/books/migrations/0003_auto_20181015_0915.py b/server/books/migrations/0003_auto_20181015_0915.py new file mode 100644 index 00000000..4d0646c1 --- /dev/null +++ b/server/books/migrations/0003_auto_20181015_0915.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.6 on 2018-10-15 09:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('books', '0002_auto_20181010_0825'), + ] + + operations = [ + migrations.AlterField( + model_name='contentblock', + name='type', + field=models.CharField(choices=[('normal', 'Normal'), ('base_communication', 'Basiswissen Sprache & Kommunikation'), ('task', 'Aufgabe'), ('base_society', 'Basiswissen Gesellschaft')], default='normal', max_length=100), + ), + ] diff --git a/server/books/models/contentblock.py b/server/books/models/contentblock.py index 34c5cb47..34b2204d 100644 --- a/server/books/models/contentblock.py +++ b/server/books/models/contentblock.py @@ -19,16 +19,16 @@ class ContentBlock(StrictHierarchyPage): verbose_name = 'Inhaltsblock' verbose_name_plural = 'Inhaltsblöcke' - PLAIN = 'plain' - YELLOW = 'yellow' - GREEN = 'green' - BLUE = 'blue' + NORMAL = 'normal' + BASE_COMMUNICATION = 'base_communication' + TASK = 'task' + BASE_SOCIETY = 'base_society' TYPE_CHOICES = ( - (PLAIN, 'Normal'), - (YELLOW, 'Gelb'), - (GREEN, 'Grün'), - (BLUE, 'Blau'), + (NORMAL, 'Normal'), + (BASE_COMMUNICATION, 'Basiswissen Sprache & Kommunikation'), + (TASK, 'Aufgabe'), + (BASE_SOCIETY, 'Basiswissen Gesellschaft'), ) hidden_for = models.ManyToManyField(SchoolClass, related_name='hidden_content_blocks') @@ -50,7 +50,7 @@ class ContentBlock(StrictHierarchyPage): type = models.CharField( max_length=100, choices=TYPE_CHOICES, - default=PLAIN + default=NORMAL ) content_panels = [ diff --git a/server/core/management/commands/dummy_data.py b/server/core/management/commands/dummy_data.py index 95d573e5..e75b0a34 100644 --- a/server/core/management/commands/dummy_data.py +++ b/server/core/management/commands/dummy_data.py @@ -83,7 +83,7 @@ data = [ 'title': '1.1 Lehrbeginn', 'content_blocks': [ { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 1', 'contents': [ { @@ -102,7 +102,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 2', 'contents': [ { @@ -139,7 +139,7 @@ data = [ ] }, { - 'type': 'yellow', + 'type': 'base_communication', 'title': 'Das Interview', 'contents': [ { @@ -151,7 +151,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 3', 'contents': [ { @@ -175,7 +175,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 4', 'contents': [ { @@ -199,7 +199,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'normal', 'title': 'Tipp', 'contents': [ { @@ -216,7 +216,7 @@ data = [ 'title': '1.2 Die drei Lernorte', 'content_blocks': [ { - 'type': 'blue', + 'type': 'base_society', 'title': 'Das Berufsbildungssystem', 'contents': [ { @@ -246,7 +246,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 5', 'contents': [ { @@ -271,7 +271,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 6', 'contents': [ { @@ -283,7 +283,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 7', 'contents': [ { @@ -325,7 +325,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 8', 'contents': [ { @@ -381,7 +381,7 @@ data = [ 'title': '2.1 Eine Welt ohne Geld?', 'content_blocks': [ { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 1', 'contents': [ { @@ -433,7 +433,7 @@ data = [ 'title': '2.2 Geld regiert die Welt', 'content_blocks': [ { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 2', 'contents': [ { @@ -493,7 +493,7 @@ data = [ 'title': '2.3 Funktionen der Geschäftsbanken', 'content_blocks': [ { - 'type': 'yellow', + 'type': 'base_communication', 'title': 'Basiswissen: Notizen', 'contents': [ { @@ -505,7 +505,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 3', 'contents': [ { @@ -535,7 +535,7 @@ data = [ 'title': '2.4 Geld aufbewahren', 'content_blocks': [ { - 'type': 'yellow', + 'type': 'base_communication', 'title': 'Basiswissen: Geldanlage', 'contents': [ { @@ -547,7 +547,7 @@ data = [ ] }, { - 'type': 'yellow', + 'type': 'base_communication', 'title': 'Basiswissen: Anlageformen', 'contents': [ { @@ -559,7 +559,7 @@ data = [ ] }, { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 4', 'contents': [ { @@ -608,7 +608,7 @@ data = [ 'title': '2.5 Geldinstitute im Vergleich', 'content_blocks': [ { - 'type': 'plain', + 'type': 'task', 'title': 'Auftrag 5', 'contents': [ {