Commit 08fa99e2 by Jonathan Thomas

Fixing project thumbnails for tall aspect ratios, so it crops the thumbnail…

Fixing project thumbnails for tall aspect ratios, so it crops the thumbnail image instead of stretching out the row.
parent e9f59be6
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<!-- Project thumbnails --> <!-- Project thumbnails -->
<div class="row gy-2 gx-2 mb-2"> <div class="row gy-2 gx-2 mb-2">
<div v-for="project in thumbnailedProjects" :key="project.id" class="col-sm-12 col-md-6 col-lg-3" style="position: relative;"> <div v-for="project in thumbnailedProjects" :key="project.id" class="col-sm-12 col-md-6 col-lg-3 project-card" style="position: relative;">
<!-- Project name badge --> <!-- Project name badge -->
<span class="project-badge badge">{{ project.name }}</span> <span class="project-badge badge">{{ project.name }}</span>
...@@ -223,11 +223,14 @@ export default { ...@@ -223,11 +223,14 @@ export default {
...mapMutations(['setProject', 'clearErrors']) ...mapMutations(['setProject', 'clearErrors'])
}, },
computed: { computed: {
...mapGetters(['thumbnailedProjects']), ...mapGetters(['thumbnailedProjects', 'isAuthenticated']),
}, },
async mounted() { async mounted() {
console.log("Projects component mounted")
this.show_spinner = true this.show_spinner = true
await this.loadProjects() if (this.isAuthenticated) {
await this.loadProjects()
}
this.show_spinner = false this.show_spinner = false
} }
} }
...@@ -259,6 +262,8 @@ export default { ...@@ -259,6 +262,8 @@ export default {
.project-thumbnail { .project-thumbnail {
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;
height: 100%;
object-fit: cover;
} }
.profile-label { .profile-label {
color: #ffffff; color: #ffffff;
...@@ -272,6 +277,9 @@ export default { ...@@ -272,6 +277,9 @@ export default {
padding: 3px; padding: 3px;
opacity: 0.75; opacity: 0.75;
} }
.project-card {
height: 184px;
}
.project-badge { .project-badge {
position: absolute; position: absolute;
bottom: 5%; bottom: 5%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment