Browse Source

Speicherfunktion / Buefy auf Profil angewendet

master
Edwina Barbalan 5 years ago
parent
commit
d77c8d69e3

+ 1
- 1
public/routes/bookmark.js View File

<div class="om-card-footer"> <div class="om-user-line"> <div class="om-card-footer"> <div class="om-user-line">
<i class="material-icons">account_circle</i> <i class="material-icons">account_circle</i>
Erstellt von User 1</div> Erstellt von User 1</div>
<i class="material-icons">bookmark</i>
<i class="material-icons">bookmark</i>
</div></div> </div></div>
<div class="om-card card"> <div class="om-card card">
<h6 class="msg-head"> <h6 class="msg-head">

+ 35
- 2
public/routes/msgCard.js View File

<div class="om-card-footer"> <div class="om-user-line"> <div class="om-card-footer"> <div class="om-user-line">
<i class="material-icons">account_circle</i> <i class="material-icons">account_circle</i>
Erstellt von {{ msg.user }}</div> Erstellt von {{ msg.user }}</div>
<i class="material-icons">bookmark_border</i>

<a href="#" v-if="isFavorited" @click.prevent="unFavorite(post)">
<i class="material-icons">bookmark_border</i></a>

<a href="#" v-else @click.prevent="favorite(post)">
<i class="bookmark"></i>
</a>

</div></div>`, </div></div>`,
props: ['msg']
props: ['msg'],
// props: ['post', 'favorited'],
data: function () {
return {
// isFavorited: '',
};
},
/* mounted() {
this.isFavorited = this.isFavorite ? true : false;
},
computed: {
isFavorite() {
return this.favorited;
},
},*/
methods: {
/* favorite(post) {
$.ajax({url: "api/ids", method: "POST"})
.then(response => this.isFavorited = true)
.catch(response => console.log(response.data));
},
unFavorite(post) {
$.ajax({url: "api/ids", method: "POST"})
.then(response => this.isFavorited = false)
.catch(response => console.log(response.data));
}*/
},
}); });

+ 60
- 39
public/routes/profilCard.js View File

Vue.component('ProfilCard', { Vue.component('ProfilCard', {
template: `<div> template: `<div>
<img class="profil-img rounded-circle" src="img/profil_icon.png" width=120px height=120px>
<div class="profil-card card"> <div class="profil-card card">
<div class="edit-item"><i class="material-icons" data-toggle="modal" data-target="#myModal">edit</i></div>
<br/>
<img class="prof-image" src="img/profil_icon.png" alt="Card image cap">
<div class="logout-item"><i class="material-icons" @click="$router.push('/login')">exit_to_app</i></div>
<div class="profil-text"> <div class="profil-text">
<h5><b>{{ profil.user }}</b></h5><br>
<h6>{{ profil.major }}<br><br>
{{ profil.semester }}</h6>
<h6><b>Benutzername:</b><br><br>
<b>{{ profil.user }}</b><br><br>
<b>Studiengang:</b><br><br>
{{ profil.major }}<br><br>
<b>Semester:</b><br><br>
{{ profil.semester }}<br></h6>
</div> </div>
<hr>
<div class="om-tab">
<button class="tablinks om-tablinks"><b>Abonniert<br>{{ profil.abos }}</b></button>
<button class="tablinks om-tablinks"><b>Gespeichert<br>{{ profil.saved }}</b></button>
<hr class="first">
<div class="btnprofil">
<button @click="isCardModalActive = true"><b>Abonniert: <br/>{{ profil.abos }}</b> <br/></button>
<button @click="$router.push('/bookmark')">
<b>Gespeichert:<br/> {{ profil.saved }}</b><br/></button>
</div> </div>
</div>
<section>


<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Profil Bearbeiten</h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<form class="new-msg-form">
<div class="form-group">
<label class="bmd-label-floating">Benutzername*</label>
<input type="text" class="form-control" id="user">
</div>
<div class="form-group">
<label class="bmd-label-floating">Studiengang*</label>
<input type="text" class="form-control" id="major">
</div>
<div class="form-group">
<label class="bmd-label-floating">Semester*</label>
<input type="text" class="form-control" id="semester">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class ="btn btn-default" data-dismiss="modal" id="close">Close</button>
<button type="submit" class="btn btn-raised om-btn" data-dismiss="modal" id="save">Save</button>
</div>
</div>
<b-modal :active.sync="isCardModalActive" :width="600" scroll="keep">
<div class="card">
<header class="modal-card-head">
<p class="modal-card-title">Abonnierte Kanäle</p>
</header>
<div class="card-content">
<div class="content">
<ul>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
</div>
</div> </div>
<footer class="modal-card-foot">
<b-button size="is-medium" @click="isCardModalActive = false">Close</b-button>
</footer>
</div>
</b-modal>

</section>

</div> </div>
</div>`, </div>`,
props: ['profil']

props: ['profil'],

data: function () {
return {
isCardModalActive: false
};
},
methods: {
close: function () {

}
}
}); });

+ 3
- 3
public/routes/profilData.js View File

_profilcard = [ _profilcard = [
{ {
id: 1, id: 1,
user: 'Benutzername',
major: 'Studiengang',
semester: 'Semester',
user: '',
major: '',
semester: '',
abos: '7', abos: '7',
saved: '3', saved: '3',
}, },

+ 51
- 14
public/style/style.css View File

z-index: 1; z-index: 1;
width: 100%; width: 100%;
display: block; display: block;
z-index: 10;
} }
.om-header { .om-header {
justify-content: space-between; justify-content: space-between;
height: 65px; height: 65px;
width: 100%; width: 100%;
background-color: #0046a0; background-color: #0046a0;
z-index: 5;
z-index: 10;
} }
.om-nav i { .om-nav i {
color: white; color: white;
margin: 10px; margin: 10px;
} }
.profil-text { .profil-text {
margin-top: 70px;
margin-bottom: 10px;
margin-top: 90px;
text-align: center; text-align: center;
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
z-index: 2;
} }
.profil-card { .profil-card {
margin: 10px;
margin-top: -80px;
margin-left: 10px;
margin-right: 10px;
margin-top: 130px;
padding-top: 10px;
margin-bottom: 15px;
position: relative; position: relative;
z-index: 1; z-index: 1;
} }
.profil-img {
.prof-image {
background-color: #0046a0; background-color: #0046a0;
border-style: solid; border-style: solid;
border-color: #0046a0; border-color: #0046a0;
border-width: thick; border-width: thick;
border-radius: 50%;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
display: block; display: block;
position: absolute;
top: -50px;
left: 50%;
margin-left: -60px;
width: 120px !important;
height: 120px;
z-index: 4;
}
hr.first {
margin-top: 0px;
margin-bottom: 0px;
}
.btnprofil {
height: 60px;
margin-top: 10px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
position: relative;
z-index: 2;
margin-bottom: 10px;
text-align: center;
}
.btnprofil button {
width: 110px;
display: inline-block;
margin-right: 20px;
margin-left: 20px;
} }
.edit-item {
.logout-item {
color: #0046a0; color: #0046a0;
margin-top: 10px;
margin-top: -25px;
margin-right: 10px; margin-right: 10px;
} }
.edit-item i {
.logout-item i {
float: right; float: right;
font-size: 30px; font-size: 30px;
z-index: 3;
} }
.modal-dialog {
height: 90%;
.vertical-alignment-helper {
display: table;
height: 100%;
width: 100%;
}
.vertical-align-center {
/* To center vertically */
display: table-cell;
vertical-align: middle;
} }
.modal-content { .modal-content {
height: 100%;
width: inherit;
height: 80%;
/* To center horizontally */
margin: 0 auto;
} }
.om-tab { .om-tab {
font-size: 16px; font-size: 16px;

+ 50
- 19
public/style/style.less View File

z-index: 1; z-index: 1;
width: 100%; width: 100%;
display: block; display: block;
z-index:10;
} }


.om-header{ .om-header{
height: 65px; height: 65px;
width: 100%; width: 100%;
background-color: @color; background-color: @color;
z-index:5;
z-index:10;
i{ i{
color: white; color: white;
} }


// profil // profil
.profil-text { .profil-text {
margin-top: 70px;
margin-bottom: 10px;
margin-top: 90px;
text-align: center; text-align: center;
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
z-index:2;
} }
.profil-card { .profil-card {
margin: 10px;
margin-top: -80px;
margin-left: 10px;
margin-right: 10px;
margin-top: 130px;
padding-top: 10px;
margin-bottom: 15px;
position: relative; position: relative;
z-index:1; z-index:1;
} }
.profil-img {
.prof-image {
background-color: @color; background-color: @color;
border-style: solid; border-style: solid;
border-color: @color; border-color: @color;
border-width: thick; border-width: thick;
border-radius: 50%;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
display: block; display: block;
position: absolute;
top: -50px;
left: 50%;
margin-left: -60px;
width: 120px !important;
height: 120px;
z-index:4;
}
hr.first {
margin-top: 0px;
margin-bottom: 0px;
}
.btnprofil {
height: 60px;
margin-top: 10px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
position: relative;
z-index:2;
margin-bottom: 10px;
text-align: center;
button {
width: 110px;
display: inline-block;
margin-right: 20px;
margin-left: 20px;
} }
.edit-item {
}
.logout-item {
color: @color; color: @color;
margin-top: 10px;
margin-top: -25px;
margin-right: 10px; margin-right: 10px;
i { i {
float: right; float: right;
font-size: 30px; font-size: 30px;
z-index:3;
} }
} }


// Modal // Modal
.modal-dialog {
height: 90%;
.vertical-alignment-helper {
display:table;
height: 100%;
width: 100%;
}
.vertical-align-center {
/* To center vertically */
display: table-cell;
vertical-align: middle;
} }

.modal-content { .modal-content {
height: 100%;
width:inherit;
height: 80%;
/* To center horizontally */
margin: 0 auto;
} }


//.modal-header {
// background-color: @color;
// color: #FFF;
//}

.om-tab { .om-tab {
font-size: 16px; font-size: 16px;
display: block; display: block;

Loading…
Cancel
Save