Style list items

This commit is contained in:
Simon Bruder 2019-08-01 20:41:33 +00:00
parent 4795aaa758
commit 9b65b4db1d
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -1,8 +1,10 @@
<template> <template>
<RouterLink :to="action"> <RouterLink :to="action">
<div class="list-item"> <div class="list-item">
<h2>{{ title }}</h2>
<img v-bind:src="thumbnail"/> <img v-bind:src="thumbnail"/>
<div class="image-overlay">
<span>{{ title }}</span>
</div>
</div> </div>
</RouterLink> </RouterLink>
</template> </template>
@ -20,7 +22,35 @@ export default {
<style scoped> <style scoped>
.list-item { .list-item {
padding: 8px; margin: 8px;
border-radius: 8px;
overflow: hidden;
position: relative;
}
.list-item img {
max-height: 512px;
max-width: 512px;
border-radius: 8px;
vertical-align: top;
}
.image-overlay {
position: absolute;
bottom: 0px;
background-color: #eee;
width: 100%;
font-size: 1.5em;
line-height: 3em;
height: 3em;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.image-overlay span {
margin: 4px;
} }
a { a {