Small style adjustments

This commit is contained in:
Arne Keller 2021-02-21 10:34:09 +01:00
parent 1dc5f861c3
commit d09345259a
4 changed files with 24 additions and 23 deletions

View File

@ -1,8 +1,7 @@
#slideLayout { #slideLayout {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 0; padding: 0;
padding-bottom: 0;
} }
#explanation { #explanation {

View File

@ -6,21 +6,22 @@
#horizontalLine { #horizontalLine {
align-self: center; align-self: center;
width: 50%; width: 55em;
max-width: 100%;
min-height: 1px; min-height: 1px;
} }
#introduction { #textContainer {
width: 50%; max-width: 55em;
} }
#linkContainer { #linkContainer {
width: 50%; margin: 0;
margin-top: 0;
} }
#slideProgress { #slideProgress {
width: 50%; width: 55em;
max-width: 100%;
margin-top: 30px; margin-top: 30px;
margin-bottom: 0; margin-bottom: 0;
} }
@ -35,12 +36,10 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
overflow: hidden;
height: 100%;
width: 100%; width: 100%;
} }
#slideShow { #slideShow {
height: 500px; height: 500px;
width: 100vw; width: 100%;
} }

View File

@ -6,8 +6,10 @@ import com.vaadin.flow.component.Text;
import com.vaadin.flow.component.dependency.CssImport; import com.vaadin.flow.component.dependency.CssImport;
import com.vaadin.flow.component.dependency.JsModule; import com.vaadin.flow.component.dependency.JsModule;
import com.vaadin.flow.component.html.Anchor; import com.vaadin.flow.component.html.Anchor;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.H1; import com.vaadin.flow.component.html.H1;
import com.vaadin.flow.component.html.Hr; import com.vaadin.flow.component.html.Hr;
import com.vaadin.flow.component.html.Paragraph;
import com.vaadin.flow.component.html.Span; import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.component.orderedlayout.VerticalLayout; import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.progressbar.ProgressBar; import com.vaadin.flow.component.progressbar.ProgressBar;
@ -32,7 +34,7 @@ public class StartPageView extends VerticalLayout implements ControlPanelView, L
private static final String HEADING_ID = "startPage-Heading"; private static final String HEADING_ID = "startPage-Heading";
private static final String H_LINE_ID = "horizontalLine"; private static final String H_LINE_ID = "horizontalLine";
private static final String INTRODUCTION_ID = "introduction"; private static final String TEXT_CONTAINER_ID = "textContainer";
private static final String LINK_CONTAINER_ID = "linkContainer"; private static final String LINK_CONTAINER_ID = "linkContainer";
private static final String SLIDE_PROGRESS_ID = "slideProgress"; private static final String SLIDE_PROGRESS_ID = "slideProgress";
private static final String CONTROL_PANEL_ID = "controlPanel"; private static final String CONTROL_PANEL_ID = "controlPanel";
@ -41,7 +43,6 @@ public class StartPageView extends VerticalLayout implements ControlPanelView, L
private static final String DOT = "."; private static final String DOT = ".";
private final ControlPanel controlPanel;
private final Span introduction; private final Span introduction;
private final Carousel slideShow; private final Carousel slideShow;
private final ProgressBar slideProgress; private final ProgressBar slideProgress;
@ -52,11 +53,11 @@ public class StartPageView extends VerticalLayout implements ControlPanelView, L
* Fills the view with content. * Fills the view with content.
*/ */
public StartPageView() { public StartPageView() {
controlPanel = new ControlPanel(this, this); ControlPanel controlPanel = new ControlPanel(this, this);
controlPanel.setId(CONTROL_PANEL_ID); controlPanel.setId(CONTROL_PANEL_ID);
controlPanel.setEnabledShareButton(false); controlPanel.setEnabledShareButton(false);
slideShow = createSzenarioCarousel(); slideShow = createScenarioCarousel();
slideShow.setId(SLIDE_SHOW_ID); slideShow.setId(SLIDE_SHOW_ID);
H1 heading = new H1(getTranslation("root.typicalc")); H1 heading = new H1(getTranslation("root.typicalc"));
@ -65,23 +66,26 @@ public class StartPageView extends VerticalLayout implements ControlPanelView, L
line1.setId(H_LINE_ID); line1.setId(H_LINE_ID);
Hr line2 = new Hr(); Hr line2 = new Hr();
line2.setId(H_LINE_ID); line2.setId(H_LINE_ID);
introduction = new Span(getTranslation("root.slideExp")); Div textContainer = new Div();
introduction.setId(INTRODUCTION_ID); textContainer.setId(TEXT_CONTAINER_ID);
introduction = new Span();
linkText = new Text(getTranslation("root.linkText")); linkText = new Text(getTranslation("root.linkText"));
link = new Anchor(getTranslation("root.link"), getTranslation("root.here")); link = new Anchor(getTranslation("root.link"), getTranslation("root.here"));
link.setTarget("_blank"); // opens new tab link.setTarget("_blank"); // opens new tab
Span linkContainer = new Span(linkText, link, new Text(DOT)); Paragraph linkContainer = new Paragraph(linkText, link, new Text(DOT));
linkContainer.setId(LINK_CONTAINER_ID); linkContainer.setId(LINK_CONTAINER_ID);
textContainer.add(introduction, linkContainer);
slideProgress = new ProgressBar(slideShow.getStartPosition(), slideShow.getSlides().length - 1); slideProgress = new ProgressBar(slideShow.getStartPosition(), slideShow.getSlides().length - 1);
slideProgress.setId(SLIDE_PROGRESS_ID); slideProgress.setId(SLIDE_PROGRESS_ID);
add(heading, line1, introduction, linkContainer, slideProgress, slideShow, line2, controlPanel); add(heading, line1, textContainer, slideProgress, slideShow, line2, controlPanel);
setId(START_PAGE_ID); setId(START_PAGE_ID);
} }
private Carousel createSzenarioCarousel() { private Carousel createScenarioCarousel() {
Slide slide1 = new ImageSlide(getTranslation("root.image1"), "root.text1"); Slide slide1 = new ImageSlide(getTranslation("root.image1"), "root.text1");
Slide slide2 = new ImageSlide(getTranslation("root.image2"), "root.text2"); Slide slide2 = new ImageSlide(getTranslation("root.image2"), "root.text2");
Slide slide3 = new ImageSlide(getTranslation("root.image3"), "root.text3"); Slide slide3 = new ImageSlide(getTranslation("root.image3"), "root.text3");

View File

@ -73,7 +73,6 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
initializeWithAssumptions(types); initializeWithAssumptions(types);
layout.add(heading, buttons, assumptionContainer); layout.add(heading, buttons, assumptionContainer);
add(layout); add(layout);
setCloseOnOutsideClick(false);
} }
/** /**