topBanner styling and implementation

topBanner
adb 4 years ago
parent dafcb5da40
commit 2465487417

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 210 B

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 350 B

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 465 B

@ -28,7 +28,8 @@ name: "icon",
position: absolute; position: absolute;
height: 1.5rem; height: 1.5rem;
width: auto; width: auto;
top: 0.75rem; top: 50%;
left: 0.75rem; left: 50%;
transform: translate(-50%, -50%);
} }
</style> </style>

@ -1,8 +1,10 @@
<template> <template>
<div class="newMessageBanner"> <div class="newMessageBanner">
<label for="newMessageInput"></label> <label for="newMessageInput"></label>
<textarea @input="resizeMessageBanner()" ref="newMessageInput" id="newMessageInput" class="newMessageInput" autocomplete="off" placeholder="type a message ..." v-model="msg.content.text" /> <textarea @input="resizeMessageBanner()" ref="newMessageInput" id="newMessageInput" class="newMessageInput"
<icon @click.native="sendMessage()" id="sendMessageBtn" style="position: absolute; right: 1rem; bottom: 0.5rem;" ic="./sym/ic_send_white_24px.svg" /> autocomplete="off" placeholder="type a message ..." v-model="msg.content.text" />
<icon @click.native="sendMessage()" id="sendMessageBtn" style="position: absolute; right: 1rem; bottom: 0.5rem;"
ic="./sym/ic_send_white_24px.svg" />
</div> </div>
</template> </template>
@ -30,7 +32,7 @@ export default {
id.style.height = `${id.scrollHeight}px` id.style.height = `${id.scrollHeight}px`
let msgContainer = document.getElementById("messagesContainer") let msgContainer = document.getElementById("messagesContainer")
msgContainer.style.height msgContainer.style.height
= `calc(100% - ${id.parentElement.clientHeight}px)` = `calc(100% - ${id.parentElement.clientHeight}px - 3rem)`
//msgContainer.scrollTo(0, msgContainer.scrollHeight) //msgContainer.scrollTo(0, msgContainer.scrollHeight)
} }
}, },

@ -1,50 +1,60 @@
<template> <template>
<div class="topBanner"> <div class="topBanner">
<div> <div>
<div id = "icon-arrow" ><img alt="arrow" class="arrow-Top-Left" src="../sym/arrow_back-24px.svg"></div> <icon class="smallIcon" id="icon-arrow" ic="./sym/arrow_back-24px.svg" />
<div id = "picTop"><img alt="Bild" id="picTopPic" src="../sym/supervisor_account-24px.svg"></div> <icon class="smallIcon" id="picTop" ic="./sym/supervisor_account-24px.svg" />
<div id="container"> <div id="container">
<div id = "chatName"> OpenChat</div> <div id="chatName">{{roomInfo.name}}</div>
<div id = "users">9 Mitglieder</div> <div id="users">{{roomInfo.user.length}} members</div>
</div> </div>
<div id = "icon-menu"><img alt="menu" class="menu-Top-Right" src="../sym/menu-24px.svg"></div> <icon class="smallIcon" id="icon-menu" ic="./sym/menu-24px.svg" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import icon from '@/components/icon.vue';
export default { export default {
name: "topBanner" name: "topBanner",
components:{
icon
},
data(){
return {
roomInfo: {
name: "open chat",
user: []
}
}
}
} }
</script> </script>
<style scoped> <style scoped>
#icon-arrow{ .topBanner{
position: absolute; position: absolute;
top: 0.24rem;
left: 1rem;
width: 100%; width: 100%;
height: 100%; height: 3rem;
max-height: 2.3rem; background-color: #1d1d1d;
max-width: 2.3rem; box-shadow: 0 3px 10px #111;
border-radius: 1.5rem; }
text-align: center; .smallIcon{
top: 0.25rem;
background-color: #2d2d2d; background-color: #2d2d2d;
height: 2.5rem;
width: 2.5rem;
} }
.arrow-Top-Left{ #icon-arrow{
margin-top: 0.2rem; position: absolute;
height: 2rem; left: 1rem;
width: 2rem;
} }
#picTop{ #picTop{
top: 0.24rem;
position: absolute; position: absolute;
fill: #42a7b9;
left: 4rem; left: 4rem;
background-color: #42a7b9;
} }
#picTopPic{ #icon-menu{
width: 2.3rem; position: absolute;
height: 2.3rem; right: 1rem;
border-radius: 1.5rem;
background-color: #2d2d2d; background-color: #2d2d2d;
} }
#container{ #container{
@ -53,35 +63,11 @@
left: 7.5rem; left: 7.5rem;
} }
#chatName{ #chatName{
font-size: medium; font-size: 1rem;
color: #ededed; color: #ededed;
} }
#users{ #users{
font-size: x-small; font-size: 0.75rem;
color: #9c9c9c; color: #9c9c9c;
} }
#icon-menu{
position: absolute;
top: 0.24rem;
right: 1rem;
width: 100%;
height: 100%;
max-height: 2.3rem;
max-width: 2.3rem;
border-radius: 1.5rem;
text-align: center;
background-color: #2d2d2d;
}
.menu-Top-Right {
margin-top: 0.2rem;
height: 2rem;
width: 2rem;
}
.topBanner{
position: absolute;
width: 100%;
height: 3rem;
background-color: #1d1d1d;
}
</style> </style>

@ -26,6 +26,7 @@
</div> </div>
</div> </div>
<newMessage /> <newMessage />
<topBanner />
</div> </div>
</template> </template>
@ -33,13 +34,15 @@
import message from '@/components/message.vue'; import message from '@/components/message.vue';
import messageReceive from '@/components/messageReceive.vue'; import messageReceive from '@/components/messageReceive.vue';
import newMessage from '@/components/newMessage.vue'; import newMessage from '@/components/newMessage.vue';
import topBanner from "@/components/topBanner";
export default { export default {
name: 'chat', name: 'chat',
components: { components: {
message, message,
messageReceive, messageReceive,
newMessage newMessage,
topBanner
} }
} }
</script> </script>
@ -49,8 +52,8 @@ export default {
position: absolute; position: absolute;
margin: 0; margin: 0;
left: 0; left: 0;
top: 0; top: 3rem;
height: calc(100% - 4rem); height: calc(100% - 7rem);
width: 100%; width: 100%;
overflow-y: auto; overflow-y: auto;
} }

Loading…
Cancel
Save