diff --git a/projects/laji/src/app/+home/home-data.service.ts b/projects/laji/src/app/+home/home-data.service.ts index 7148dac048..a53ed062d3 100644 --- a/projects/laji/src/app/+home/home-data.service.ts +++ b/projects/laji/src/app/+home/home-data.service.ts @@ -8,6 +8,8 @@ import { GraphQLService } from '../graph-ql/service/graph-ql.service'; import { HistoryService } from '../shared/service/history.service'; import { Image } from '../shared/gallery/image-gallery/image.interface'; import { News } from '../shared/model/News'; +import { environment } from '../../environments/environment'; +import { Global } from '../../environments/global'; export interface IHomeData { observations: { @@ -48,6 +50,11 @@ export interface IHomeData { }; } +const NEWS_TAGS = ['release', 'taxonomy', 'technical', 'luke.fi', 'luomus.fi', 'syke.fi', 'vieraslajit.fi']; +if (environment.type === Global.type.vir) { + NEWS_TAGS.push('viranomaiset'); +} + /* eslint-disable max-len */ const HOME_QUERY = gql` query($pageSize: Int = 5, $after: String = "", $week: String = "") { @@ -84,7 +91,7 @@ const HOME_QUERY = gql` } } }, - news(pageSize: $pageSize) { + news(pageSize: $pageSize, tag: "${NEWS_TAGS.join(',')}") { prevPage, nextPage, results { diff --git a/projects/laji/src/app/+home/home.component.html b/projects/laji/src/app/+home/home.component.html index 8c1e9d6d96..4aefa6e155 100644 --- a/projects/laji/src/app/+home/home.component.html +++ b/projects/laji/src/app/+home/home.component.html @@ -9,7 +9,7 @@

{{ 'home.main-page.title' | translate }}

{{ 'home.main-page.text' | translate }}

- +
diff --git a/projects/laji/src/app/+home/home.component.scss b/projects/laji/src/app/+home/home.component.scss index 1af66acaa9..102566a7b8 100644 --- a/projects/laji/src/app/+home/home.component.scss +++ b/projects/laji/src/app/+home/home.component.scss @@ -168,24 +168,6 @@ flex-wrap: wrap; } -.home-main { - padding-right: $sp-6; - @include media-query-phone { - padding-right: 10px; - padding-left: 10px; - } -} - -laji-news-list { - max-width: 400px; - padding-left: $sp-6; - border-left: 1px solid $neutral-4; - @media only screen and (max-width: map-get($map: $breakpoints, $key: "xs")) { - border-left: none; - padding-left: unset; - } -} - .content-max-width { width: 100%; max-width: 1200px; diff --git a/projects/laji/src/styles/laji.scss b/projects/laji/src/styles/laji.scss index 794d4c11a3..4f5685e6fa 100644 --- a/projects/laji/src/styles/laji.scss +++ b/projects/laji/src/styles/laji.scss @@ -1358,3 +1358,21 @@ span.simple-option { .ljb-picker-highlighter { z-index: 1070 !important; } + +.home-main { + padding-right: $sp-6; + @include media-query-phone { + padding-right: 10px; + padding-left: 10px; + } +} + +.home-news-list { + max-width: 400px; + padding-left: $sp-6; + border-left: 1px solid $neutral-4; + @media only screen and (max-width: map-get($map: $breakpoints, $key: "xs")) { + border-left: none; + padding-left: unset; + } +} diff --git a/projects/vir/src/app/+home/home.component.html b/projects/vir/src/app/+home/home.component.html index b4992b1fae..7602fd14ce 100644 --- a/projects/vir/src/app/+home/home.component.html +++ b/projects/vir/src/app/+home/home.component.html @@ -1,63 +1,68 @@ -
-

{{ 'home.authority.title' | translate }}

- -
-
-
-
-
-
-
-
-  {{ 'home.carousel.observations' | translate }} -
-
- -  {{ 'observation.results.species' | translate }} -
-
+
+
+
+

{{ 'home.authority.title' | translate }}

+ +
+
+
+
+
+
+
+
+  {{ 'home.carousel.observations' | translate }} +
+
+ +  {{ 'observation.results.species' | translate }} +
+
-
-
- -
+
+
+ +
-
-
-

vir.home.virInstructions

- {{ "vir.home.virInstructions.btn" | translate }} -

vir.home.loginInstructions

- {{ "vir.home.loginInstructions.btn" | translate }} -

vir.home.agreement

- {{ "vir.home.agreement.btn" | translate }} -

vir.home.changelog

- {{ "vir.home.changelog.btn" | translate }} -
-
- -
-
+
+
+

vir.home.virInstructions

+ {{ "vir.home.virInstructions.btn" | translate }} +

vir.home.loginInstructions

+ {{ "vir.home.loginInstructions.btn" | translate }} +

vir.home.agreement

+ {{ "vir.home.agreement.btn" | translate }} +

vir.home.changelog

+ {{ "vir.home.changelog.btn" | translate }} +
+
+ +
+
-
diff --git a/projects/vir/src/app/+home/home.component.scss b/projects/vir/src/app/+home/home.component.scss index 9035d3abb5..eabd2c2f24 100644 --- a/projects/vir/src/app/+home/home.component.scss +++ b/projects/vir/src/app/+home/home.component.scss @@ -136,3 +136,11 @@ font-size: $fs-2; font-weight: 400; } + +@media (max-width: 767px) { + .home-news-list { + margin-top: $sp-5; + padding-right: 10px; + padding-left: 10px; + } +}