Skip to content

Commit

Permalink
fix: adjust flexbox handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerd Müller committed Jun 13, 2020
1 parent 83b6769 commit 4c86b83
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 34 deletions.
29 changes: 12 additions & 17 deletions apps/demol/src/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"value": "daheim_karte"
},
{
"type": "misc",
"type": "smokingpit",
"layer": "base",
"value": "smokingpit"
}
Expand All @@ -37,7 +37,7 @@
},
{
"type": "image",
"layer": "fore",
"layer": "first",
"value": "daheim_kinder"
},
{
Expand All @@ -58,17 +58,17 @@
},
{
"type": "image",
"layer": "fore",
"layer": "third",
"value": "daheim_karl"
},
{
"layer": "fore",
"type": "image",
"layer": "third",
"value": "daheim_gerda"
},
{
"type": "image",
"layer": "fore",
"layer": "third",
"value": "daheim_anna"
}
]
Expand All @@ -84,7 +84,7 @@
},
{
"type": "image",
"layer": "base",
"layer": "first",
"value": "daheim_familie"
}
]
Expand All @@ -100,33 +100,28 @@
},
{
"type": "video",
"layer": "fore",
"layer": "fourth",
"value": "3_Annas_Alltag",
"title": "Annas Alltag"
},
{
"type": "video",
"layer": "fore",
"layer": "fourth",
"value": "4_Annas_Zuhause",
"title": "Annas Lebensumfeld"
},
{
"type": "video",
"layer": "fore",
"layer": "fourth",
"value": "2_Anna_Familie",
"title": "Annas Familie"
},
{
"type": "video",
"layer": "fore",
"layer": "fourth",
"value": "1_Anna_Großvater",
"title": "Annas Großvater"
},
{
"type": "image",
"layer": "back",
"value": "daheim_familie2"
},
{
"type": "text",
"layer": "fore",
Expand All @@ -145,7 +140,7 @@
},
{
"type": "image",
"layer": "base",
"layer": "first",
"value": "daheim_werbung"
},
{
Expand All @@ -170,7 +165,7 @@
"value": "Hilf Anna, ihn wieder zusammenzufügen, um zum Treffpunkt der Ortsgruppe zu gelangen. Ziehe dazu die durcheinandergewürfelten Kartenausschnitte in das entsprechende vorgezeichnete Feld. Wenn du das Puzzle richtig gelöst hast, kommst du zum nächsten Kapitel."
},
{
"type": "game",
"type": "puzzle",
"layer": "base",
"value": "puzzle"
},
Expand Down
3 changes: 2 additions & 1 deletion libs/data/src/lib/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export enum ContentType {
Video = "video",
Image = "image",
Game = "game",
Misc = "misc",
SmokingPit = "smokingpit",
Puzzle = "puzzle",
Decission = "decission"
}

Expand Down
12 changes: 1 addition & 11 deletions libs/ui/src/lib/chapter/chapter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,11 @@
display: flex;
align-items: center;
justify-content: center;
flex-flow: row wrap;

&--fore {
transform: translateZ(90px) scale(.7);
z-index: 1;

picture {
width: 75%;
display: flex;
}

&.row > * {
width: 25%;
}
}

&--base {
Expand All @@ -46,7 +38,6 @@
filter: saturate(.8);

picture {
display: flex;
margin-top: 50%;
}
}
Expand All @@ -56,7 +47,6 @@
z-index: 3;

picture {
display: flex;
margin-top: -25%;
}
}
Expand Down
13 changes: 13 additions & 0 deletions libs/ui/src/lib/image/image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,16 @@
filter: saturate(.8);
opacity: .9;
}

.first {
width: 75%;
}

.third {
width: 33%;
}

img {
height:auto;
width: 100%;
}
3 changes: 2 additions & 1 deletion libs/ui/src/lib/image/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import './image.scss';
/* eslint-disable-next-line */
export interface ImageProps {
value: string
width?: string
}

export const Image = (props: ImageProps) => {
return (
<picture className="chapter_picture">
<picture className={`chapter_picture ${props.width}`}>
<source srcSet={"./assets/"+props.value+IMAGE_SUFFIX} type='image/webp' />
<source srcSet={"./assets/fallback/"+props.value+IMAGE_SUFFIX_ALTERNATE} type='image/png' />
<img draggable="false" src={"./assets/fallback/"+props.value+IMAGE_SUFFIX_ALTERNATE} alt={props.value} />
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/src/lib/smokingpit/smokingpit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface SmokingpitProps {
export const Smokingpit = (props: SmokingpitProps) => {
return (
<div className='smokingPit'>
<Image value='daheim_arbeiterschaft' />
<Image value='daheim_arbeiterschaft'/>
<div className='smoke'>
<span className='s0'></span>
<span className='s1'></span>
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/src/lib/text/text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
}

.column {
flex-direction: column;
flex-flow: column nowrap;
}
6 changes: 5 additions & 1 deletion libs/ui/src/lib/video/video.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ video {
height: auto;
}

.video {
.chapter_video {
position: relative;
}

.fourth {
width: 25%;
}

.play {
position: absolute;
top: 50%;
Expand Down
3 changes: 2 additions & 1 deletion libs/ui/src/lib/video/video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import './video.scss';
/* eslint-disable-next-line */
export interface VideoProps {
value: string,
width: string
title: string
}

Expand All @@ -16,7 +17,7 @@ export const Video = (props: VideoProps) => {
// };

return (
<div className="video">
<div className={`chapter_video ${props.width}`}>
<p>{props.title}</p>
<video>
<source type='video/mp4' src={"./assets/movies/"+props.value+VIDEO_SUFFIX}></source>
Expand Down

0 comments on commit 4c86b83

Please sign in to comment.