Skip to content

Commit

Permalink
feat: add grave photo indicator, move wikidata link on hover
Browse files Browse the repository at this point in the history
Closes #7.
  • Loading branch information
yarl committed Oct 18, 2018
1 parent 03b8c4b commit e55c574
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/components/PersonPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<div class="media-content">
<div class="content">
<p>
<img v-if="person.graveImage" :src="icons.greenIcon" alt="Grave image present">
<img v-else :src="icons.redIcon" alt="Grave image missing">
<a class="wikidata-link"
:href="`//www.wikidata.org/wiki/${person.id}`"
target="_blank">
Expand All @@ -40,6 +42,8 @@

<script>
import store from '@/store';
import redIcon from '@/assets/marker_red.png';
import greenIcon from '@/assets/marker_green.png';
function showModal() {
console.log(this.person);
Expand All @@ -48,19 +52,28 @@
}
export default {
data() {
return {
icons: { redIcon, greenIcon },
};
},
props: ['person'],
methods: { showModal },
};
</script>

<style scoped>
.panel-block {
position: relative;
border-left: 0;
border-right: 0;
}
.panel-block:first-child {
border-top: 0;
}
.panel-block:hover .wikidata-link {
display: inline;
}
.image {
background: #ccc;
}
Expand All @@ -78,6 +91,15 @@
margin: auto;
}
.wikidata-link {
vertical-align: text-bottom;
display: none;
position: absolute;
top: 6px;
right: 10px;
width: 30px;
height: 30px;
background: whitesmoke;
border-radius: 50%;
line-height: 27px;
text-align: center;
}
</style>

0 comments on commit e55c574

Please sign in to comment.