diff --git a/client/src/components/NewsTeasers.vue b/client/src/components/NewsTeasers.vue new file mode 100644 index 00000000..98b65e29 --- /dev/null +++ b/client/src/components/NewsTeasers.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/client/src/pages/news.vue b/client/src/pages/news.vue index 96b2296e..bc24398b 100644 --- a/client/src/pages/news.vue +++ b/client/src/pages/news.vue @@ -1,44 +1,16 @@ @@ -47,12 +19,11 @@ @import "@/styles/_functions.scss"; @import "@/styles/_mixins.scss"; - .teasers { - display: -ms-grid; - @supports (display: grid) { - display: grid; - } - grid-template-rows: 300px 300px; - -ms-grid-rows: auto 1fr 65px; + $news_width: 550px; + $image_height: 254px; + + .news { + padding: 0 $large-spacing; } + diff --git a/server/newsteaser/factories.py b/server/newsteaser/factories.py index fb440afa..1c5cc99f 100644 --- a/server/newsteaser/factories.py +++ b/server/newsteaser/factories.py @@ -15,7 +15,7 @@ class NewsTeaserFactory(factory.django.DjangoModelFactory): title = factory.LazyAttribute(lambda x: fake_title(max_words=2)) description = factory.LazyAttribute(lambda x: fake.sentence(nb_words=random.randint(4, 8))) - image_url = factory.LazyAttribute(lambda x: 'https://picsum.photos/600/400/?random') + image_url = factory.LazyAttribute(lambda x: 'https://picsum.photos/550/257/?random') news_article_url = factory.LazyAttribute(lambda x: 'https://myskillbox-abu-news.webflow.io/brexit') date = FuzzyDateTime(datetime.datetime(2020, 1, 1, tzinfo=UTC)) - image_source = factory.LazyAttribute(lambda x: 'https://picsum.photos/600/400/?random') + image_source = factory.LazyAttribute(lambda x: 'https://picsum.photos/550/257/?random') diff --git a/server/newsteaser/tests/test_newsteaser.py b/server/newsteaser/tests/test_newsteaser.py index d244f7bc..c8c3f611 100644 --- a/server/newsteaser/tests/test_newsteaser.py +++ b/server/newsteaser/tests/test_newsteaser.py @@ -12,7 +12,6 @@ class NewsTeaserTests(TestCase): self.client = Client(schema=schema) - def make_query(self): query = ''' query NewsTeasers {