Display text when no modules have been visited by the user

This commit is contained in:
Ramon Wenger 2020-07-01 11:33:15 +02:00
parent fadebb8bd3
commit 240fcf0795
3 changed files with 12 additions and 1 deletions

View File

@ -94,6 +94,7 @@ describe('Current Module', () => {
// module list exists, but does not have anything in it
cy.checkHome(0, true);
cy.get('[data-cy=no-modules-yet]').should('exist').should('contain', 'Sie haben sich noch kein Modul angeschaut. Legen Sie jetzt los!');
cy.goToModule('1. Geld und Kauf', 'Modul 2');
cy.get('[data-cy=module-title]').should('contain', 'Geld');

View File

@ -87,6 +87,7 @@
body {
overflow-y: auto;
overflow-x: hidden;
height: 100vh;
}

View File

@ -5,6 +5,10 @@
class="start-page__modules start-sections"
data-cy="start-modules-list">
<h2 class="start-page__heading">Letzte Module</h2>
<h3
class="start-page__no-modules"
data-cy="no-modules-yet"
v-if="!me.recentModules.length">Sie haben sich noch kein Modul angeschaut. Legen Sie jetzt los!</h3>
<div class="start-page__modules-list">
<module-teaser
:key="index"
@ -104,7 +108,7 @@
justify-content: space-between;
@supports (display: grid) {
display: grid;
justify-content: stretch;
justify-content: center;
}
grid-template-rows: auto 1fr auto;
min-height: 100vh;
@ -147,6 +151,11 @@
}
}
&__no-modules {
@include heading-3;
margin-bottom: 0;
}
&__modules {
margin-bottom: $large-spacing;
}