-
Notifications
You must be signed in to change notification settings - Fork 0
Homescreen and Infoscreen #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
a2fc888
added rectImage (WIP)
LinkKF 2fa8b00
refactored image components to one component
LinkKF 67b7944
e498bfd
refactored image components to one component
LinkKF 8b94b83
added image size
LinkKF de2f117
adding picture on left/right side
LinkKF 9edd6e0
renamed "shape" to "props"
LinkKF c31d4c1
added component homescreen
LinkKF 233d44c
inserting adapting text (no real design yet)
LinkKF 1ec31da
Removed Hello World Text (for testing purposes)
LinkKF 08d222b
removed content (for testing purposes)
LinkKF bc1f9bf
renamed container
LinkKF 16c35de
added float left/right
LinkKF 47ac3fa
added info component (not yet finished)
LinkKF f6d789b
added textField
LinkKF d5022ac
fixed homescreen
LinkKF cde5404
changed from float to flexboxes
LinkKF aaddfb6
Homescreen adaptations
LinkKF b12fbd2
added second content page with "Code" for content
LinkKF 60729a2
made text variable
LinkKF ef119ff
added border radius
LinkKF 13705c5
added responsive design
LinkKF 7f55237
filter:none
LinkKF 5c92cf4
added white background to welcome text
LinkKF add9c8d
added additiona Information div for things
LinkKF 232fcb0
removed additional Info div, when empty
LinkKF d0b4047
Merge branch 'development' into new-components
LinkKF 006343f
add contentPage for development purpose
LinkKF 8bf3641
""
LinkKF da38877
added module stuff
LinkKF 10722d9
made homescreen background variable
LinkKF 74315cd
undid changes in helloWorld
LinkKF edab7cc
deleted classes roundImage and textField
LinkKF 39cd744
merge branch development into new-components
LinkKF 10f92a7
reformatted Info method
LinkKF 80a21e5
removed round-image
LinkKF 3552986
Merge branch 'development' into new-components
LinkKF 0bf04fc
adressed PR changes
LinkKF b7f5bfe
remove position relative
LinkKF 655c9e0
added max-size for full image size
LinkKF 946514b
resize navbar to fit to page
LinkKF 41c18f6
undid changes on navbar
LinkKF 6630bb0
reformatted package/removed redundant package-lock
LinkKF f186974
reformatted files
LinkKF 9325b77
reformatted file
LinkKF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
frontend/src/components/mdx/homescreen/homescreen.module.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@use '../../style/globals'; | ||
|
||
.homeContainer { | ||
display: grid; | ||
place-items: center; | ||
position: absolute; | ||
bottom: 0; | ||
color: black; | ||
content: ""; | ||
z-index: -5; | ||
width: 100%; | ||
height: 100%; | ||
background-size: cover; | ||
background-position: center 0%; | ||
} | ||
|
||
.homeContainer-inside { | ||
background-color: white; | ||
color: black; | ||
font-size: 40pt; | ||
text-align: center; | ||
z-index: 1; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import homescreenStyles from './homescreen.module.scss'; | ||
import React from "react"; | ||
|
||
export function Homescreen({ src, text }: { src: string, props: string, alt: string, text: string }): React.ReactElement { | ||
return <div className={`${homescreenStyles["homeContainer"]}`} style={{backgroundImage: `url(${src})`}} > | ||
<div className={`${homescreenStyles["homeContainer-inside"]}`}> | ||
{text} | ||
</div> | ||
</div>; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import imageStyles from './image.module.scss'; | ||
|
||
import React from "react"; | ||
|
||
export type ImageSize = "small" | "medium" | "large" | "full"; | ||
export type ImageShape = "round" | "rectangle"; | ||
|
||
export function Image({ src, alt, size, shape }: { src: string, alt: string, size?: ImageSize, shape?: ImageShape}): React.ReactElement { | ||
const sizeStyleName: keyof typeof imageStyles = `square-${size ?? "medium"}` as const; | ||
const shapeStyleName: keyof typeof imageStyles = shape ?? "rectangle" as const; | ||
Quaffel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
return <img src={src} className={`${imageStyles[shapeStyleName]} ${imageStyles[sizeStyleName]}`} alt={alt} />; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@use '../../style/globals'; | ||
|
||
.infoContainer { | ||
display: flex; | ||
position: relative; | ||
text-align: center; | ||
width: 100%; | ||
color: rgb(0, 0, 0); | ||
font-size: 20pt; | ||
flex-direction: column; | ||
margin-bottom: 25px; | ||
} | ||
|
||
.text { | ||
width: 100%; | ||
} | ||
|
||
.image { | ||
width: 100%; | ||
} | ||
|
||
.additionalInfo { | ||
display: none; | ||
} | ||
|
||
@media (min-width: 450px) { | ||
.infoContainer-left { | ||
flex-direction: row; | ||
} | ||
|
||
.infoContainer-right { | ||
flex-direction: row-reverse; | ||
} | ||
|
||
.text { | ||
width: 65%; | ||
} | ||
|
||
.image { | ||
width: 25%; | ||
} | ||
.additionalInfo { | ||
width: 15%; | ||
font-size: 10pt; | ||
display: flex; | ||
&:empty { | ||
display: none; | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import infoStyles from './info.module.scss'; | ||
import { Image } from 'components/mdx/image/image'; | ||
|
||
import React from "react"; | ||
|
||
export type ImagePosition = "left" | "right"; | ||
|
||
export function Info({ src, text, addInfo, imagePosition, alt } | ||
:{ src: string, text: string, addInfo: string, propsImage: string, imagePosition?: ImagePosition, alt: string }) | ||
: React.ReactElement { | ||
const position: keyof typeof infoStyles = `infoContainer-${imagePosition ?? "left"}` as const; | ||
|
||
return <div className={`${infoStyles[position]} ${infoStyles["infoContainer"]}`}> | ||
Quaffel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div className={`${infoStyles["additionalInfo"]}`}>{addInfo}</div> | ||
<div className={`${infoStyles["image"]}`}> | ||
<Image src={src} size="full" shape="rectangle" alt={alt} /> | ||
</div> | ||
<div className={`${infoStyles["text"]}`}> | ||
{text} | ||
</div> | ||
</div>; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Info } from '../components/mdx/info/info'; | ||
import {Homescreen} from '../components/mdx/homescreen/homescreen'; | ||
|
||
<Homescreen src={"https://upload.wikimedia.org/wikipedia/commons/9/99/Karlsruhe-Schloss-meph666-2005-Apr-22.jpg"} | ||
propsImage={"image-rectangle image-full"} text={"Willkommen in Karlsruhe"} alt={"A lorem picsum"}/> | ||
|
||
|
||
<Info src={"https://upload.wikimedia.org/wikipedia/commons/9/99/Karlsruhe-Schloss-meph666-2005-Apr-22.jpg"} | ||
imagePosition={"left"} alt={"A lorem picsum"} text={"Bilder können sowohl links vom Text,"} | ||
addInfo={"Hier stehen Öfnnungszeiten, Adresse, o.ä."}/> | ||
<Info src={"https://upload.wikimedia.org/wikipedia/commons/9/99/Karlsruhe-Schloss-meph666-2005-Apr-22.jpg"} | ||
imagePosition={"right"} alt={"A lorem picsum"} | ||
text={"als auch rechts vom Text sein. Problem ist jetzt nur noch, dass Bilder in Zeilen ohne addInfo ein wenig größer sind."} | ||
addInfo={"Zum nächsten Bild gibts keine zusätzlichen Infos, deshalb wird dort nichts angezeigt!"}/> | ||
<Info src={"https://upload.wikimedia.org/wikipedia/commons/9/99/Karlsruhe-Schloss-meph666-2005-Apr-22.jpg"} | ||
imagePosition={"left"} alt={"A lorem picsum"} text={"Das ist das Karlsruher Schloss. Gebaut wurde es damals und seitdem steht es da."}/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.