matrix-chat/src/components/topBanner.vue

78 lines
1.4 KiB
Vue
Raw Normal View History

2020-11-02 10:03:10 +00:00
<template>
<div class="topBanner">
<div>
2020-11-06 14:42:56 +00:00
<icon class="smallIcon" id="icon-arrow" ic="./sym/arrow_back-24px.svg" />
<icon class="smallIcon" id="picTop" ic="./sym/supervisor_account-24px.svg" />
2020-11-02 19:31:08 +00:00
<div id="container">
2020-11-06 14:42:56 +00:00
<div id="chatName">{{roomInfo.name}}</div>
<div id="users">{{roomInfo.user.length}} members</div>
2020-11-02 19:31:08 +00:00
</div>
2020-11-06 15:20:42 +00:00
<icon v-on:click.native="showChatInfo()" class="smallIcon" id="icon-menu" ic="./sym/menu-24px.svg" />
2020-11-02 10:03:10 +00:00
</div>
</div>
</template>
2020-11-06 14:42:56 +00:00
<script>
import icon from '@/components/icon.vue';
export default {
name: "topBanner",
components:{
icon
},
2020-11-06 15:20:42 +00:00
methods:{
showChatInfo(){
document.getElementById("chatInformation").style.display = 'block';
}
},
2020-11-06 14:42:56 +00:00
data(){
return {
roomInfo: {
name: "open chat",
user: []
}
}
2020-11-04 17:13:49 +00:00
}
2020-11-06 14:42:56 +00:00
}
2020-11-02 10:03:10 +00:00
</script>
<style scoped>
2020-11-06 14:42:56 +00:00
.topBanner{
2020-11-02 10:03:10 +00:00
position: absolute;
width: 100%;
2020-11-06 14:42:56 +00:00
height: 3rem;
background-color: #1d1d1d;
box-shadow: 0 3px 10px #111;
}
.smallIcon{
top: 0.25rem;
2020-11-04 17:13:49 +00:00
background-color: #2d2d2d;
2020-11-06 14:42:56 +00:00
height: 2.5rem;
width: 2.5rem;
2020-11-02 10:03:10 +00:00
}
2020-11-06 14:42:56 +00:00
#icon-arrow{
position: absolute;
left: 1rem;
2020-11-02 19:31:08 +00:00
}
#picTop{
position: absolute;
left: 4rem;
2020-11-06 14:42:56 +00:00
background-color: #42a7b9;
2020-11-02 19:31:08 +00:00
}
2020-11-06 14:42:56 +00:00
#icon-menu{
position: absolute;
right: 1rem;
2020-11-04 17:13:49 +00:00
background-color: #2d2d2d;
2020-11-02 19:31:08 +00:00
}
#container{
2020-11-02 21:17:58 +00:00
position: absolute;
top: 0.55rem;
left: 7.5rem;
2020-11-02 19:31:08 +00:00
}
#chatName{
2020-11-06 14:42:56 +00:00
font-size: 1rem;
2020-11-02 21:17:58 +00:00
color: #ededed;
2020-11-02 19:31:08 +00:00
}
#users{
2020-11-06 14:42:56 +00:00
font-size: 0.75rem;
2020-11-02 21:17:58 +00:00
color: #9c9c9c;
}
2020-11-02 10:03:10 +00:00
</style>