This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ocjojo/bildungsplattform_vision
- Loading branch information
Showing
7 changed files
with
136 additions
and
9 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,53 @@ | ||
<template> | ||
<div class="card card-md"> | ||
<div class="room-img"></div> | ||
<div class="room-info"> | ||
<h5>{{ room.Name }}</h5> | ||
<p>{{ room.Description }}</p> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
room: Object | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.card { | ||
height: 200px; | ||
display: flex; | ||
flex-direction: row; | ||
min-height: 200px; | ||
cursor: pointer; | ||
transition: 0.2s ease-in-out; | ||
&:hover { | ||
transform: scale(1.05); | ||
} | ||
.room-img { | ||
width: 200px; | ||
background: url("../assets/defaultRoom.jpg"); | ||
height: 200px; | ||
background-size: cover; | ||
background-position: center; | ||
border-radius: 15px 0 0 15px; | ||
} | ||
.room-info { | ||
width: 300px; | ||
padding-top: 0; | ||
padding: 20px; | ||
margin-bottom: 5px; | ||
overflow: hidden; | ||
padding-top: 0; | ||
text-overflow: ellipsis; | ||
h5 { | ||
font-weight: 900; | ||
font-size: 1.6rem; | ||
} | ||
} | ||
} | ||
</style> |
This file contains 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 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 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<template> | ||
<div class="help-page"> | ||
<header> | ||
<h2>Deine Räume</h2> | ||
<h2>Hilfe</h2> | ||
</header> | ||
</div> | ||
</template> |
This file contains 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 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 |
---|---|---|
@@ -1,5 +1,82 @@ | ||
<template> | ||
<div class="rooms"> | ||
<h2>Deine Räume</h2> | ||
<header> | ||
<div class="title-container"> | ||
<h2>Deine Räume</h2> | ||
</div> | ||
</header> | ||
|
||
<section> | ||
<template v-for="room of rooms"> | ||
<router-link | ||
v-bind:key="room.id" | ||
:to="{ | ||
name: 'room', | ||
params: { | ||
routeName: room.ID + '-' + getRouterString(room.Name) | ||
} | ||
}" | ||
> | ||
<RoomCard v-bind:key="room.ID" :room="room"></RoomCard> | ||
</router-link> | ||
</template> | ||
</section> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters } from "@/store"; | ||
import RoomCard from "../components/RoomCard"; | ||
export default { | ||
components: { | ||
RoomCard | ||
}, | ||
asyncComputed: { | ||
...mapGetters(["rooms"]) | ||
}, | ||
methods: { | ||
getRouterString(item) { | ||
console.log(item); | ||
return item | ||
.toString() | ||
.toLowerCase() | ||
.trim() | ||
.replace(/&/g, "-and-") // Replace & with 'and' | ||
.replace(/[\s\W-]+/g, "-") | ||
.replace(/-$/, ""); // Remove last floating dash if exists | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
header { | ||
background: url("../assets/rooms.svg"); | ||
background-size: contain; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
width: 100%; | ||
height: 320px; | ||
position: relative; | ||
.title-container { | ||
position: absolute; | ||
width: 100%; | ||
bottom: 0; | ||
height: 80px; | ||
background: rgba(37, 37, 37, 0.5); | ||
color: #fff; | ||
display: flex; | ||
align-items: center; | ||
padding: 15px; | ||
h2 { | ||
font-size: 2.4rem; | ||
font-weight: 200; | ||
margin: 10px; | ||
} | ||
} | ||
} | ||
section { | ||
padding: 12px; | ||
} | ||
</style> |