diff --git a/public/css/kursinfo-admin-web.scss b/public/css/kursinfo-admin-web.scss index db9dcaa9..9cf49bef 100644 --- a/public/css/kursinfo-admin-web.scss +++ b/public/css/kursinfo-admin-web.scss @@ -24,13 +24,6 @@ @import 'shared'; //====Common style for both pages==== -.kursinfo-main-page { - &.start-page { - nav > a { - padding-left: 5px; - } - } -} h2 { margin-bottom: 16px; @@ -57,80 +50,68 @@ h2 { } //====START ADMIN PAGE WITH CARDS==== -// TODO: karl: update start-page in own commit -.AdminPage--Alert { - margin-left: 1rem; - margin-right: 1rem; - .alert { - width: auto; +.AdminStartPage { + .introduction { + @include prose.prose; p { - margin-bottom: 1.25rem; + max-width: unset; } } - & + .AdminPage--Alert > .alert { - margin-top: -40px; - } } -// 4. Start page and cards style -.AdminPage--ShowDescription { - display: flex; - flex-direction: column; - flex-wrap: wrap; - gap: 1rem; +.AdminStartPage__cardContainer { + margin-top: 32px; + display: grid; + gap: 20px; - .card { - width: 100%; - margin: 15px 0.5em 1em 0; - .btn { - margin: 1em 0; - } - .btn:last-of-type { - margin-top: 1em; - margin-left: 1em; - } - &:last-of-type { - margin-right: 0; - } + grid-auto-flow: row; + grid-template-columns: auto; + grid-template-rows: auto; + + @media (min-width: 1024px) { + grid-auto-flow: column; + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: 1fr auto; } - .card-footer.text-right { - min-height: 8.2em; - text-align: right; - span { - display: block; - } + + .AdminStartPage__card { + padding: 20px; + border: 1px solid var(--color-border); } - @media (min-width: 768px) { - flex-direction: row; - justify-content: space-between; - flex-wrap: wrap; - .card { - width: 65em; - min-width: 18em; - max-width: 30em; - align-content: flex-start; - margin-right: 1.2em; - } - .KursInfo--SellingText.card { - width: 65em; + + .AdminStartPage__cardTitle { + @include typography.font-heading-s; + margin-bottom: 20px; + } + + .AdminStartPage__cardBody { + @include prose.prose; + > :first-child { + margin-block-start: 0; } - .card-footer { - padding: 0.75rem 1rem 0.75rem 0.75rem; - .btn.btn-primary { - padding: 0.5rem 1rem; - } + > :last-child { + margin-block-end: 0; } } - @media (min-width: 1024px) { - flex-wrap: nowrap; + + .AdminStartPage__cardFooter { + display: flex; + align-items: baseline; + justify-content: end; + flex-wrap: wrap; + gap: 10px; + .AdminStartPage__uploadMemoLink { + width: 100%; + text-align: right; + } } } // === CourseEditStartPage === -.edit-start-page { - .edit-start-page__intro { +.CourseEditStartPage { + .CourseEditStartPage__intro { margin-bottom: 40px; } } diff --git a/public/js/app/components/LinkAndInstruction.jsx b/public/js/app/components/LinkAndInstruction.jsx index 7d9a74ac..b8876772 100644 --- a/public/js/app/components/LinkAndInstruction.jsx +++ b/public/js/app/components/LinkAndInstruction.jsx @@ -1,26 +1,20 @@ import React from 'react' import { COURSE_INFO_URL, USER_MANUAL_URL } from '../util/constants' -const LinkToAboutCourseInformation = ({ courseCode, translate, lang, publicPagesHref }) => { +export const LinkToAboutCourseInformation = ({ courseCode, translate, lang, publicPagesHref }) => { const aboutCourseLink = `${publicPagesHref}${COURSE_INFO_URL}${courseCode}?l=${lang}` return ( -
{translate.instruction_p1}
{translate.instruction_p2}
@@ -32,5 +26,3 @@ export const TextAboutRights = ({ lang, translate }) => (
{startCards.sellingText_desc_p1}
-{startCards.sellingText_desc_p2}
-{startCards.coursePM_create_desc_p1}
-{startCards.coursePM_create_desc_p2}
-{startCards.coursePM_create_desc_p3}
-{startCards.courseDev_decs_p1}
-{startCards.courseDev_decs_p2}
-{startCards.sellingText_desc_p1}
+{startCards.sellingText_desc_p2}
+{startCards.coursePM_create_desc_p1}
+{startCards.coursePM_create_desc_p2}
+{startCards.coursePM_create_desc_p3}
+{startCards.courseDev_decs_p1}
+{startCards.courseDev_decs_p2}
+{labels.intro}