2024-02-29 04:08:54 +00:00
|
|
|
<template>
|
|
|
|
<div class="profile">
|
|
|
|
<div class="profile-header">
|
|
|
|
<img
|
|
|
|
v-if="profile.avatar"
|
|
|
|
:src="profile.avatar"
|
|
|
|
class="avatar"
|
|
|
|
>
|
|
|
|
|
|
|
|
<h2 class="username">{{ profile.username }}</h2>
|
|
|
|
</div>
|
2024-03-03 01:33:35 +00:00
|
|
|
|
|
|
|
<ul class="stashes nolist">
|
|
|
|
<li
|
|
|
|
v-for="stash in profile.stashes"
|
|
|
|
:key="`stash-${stash.id}`"
|
|
|
|
>
|
2024-03-21 01:59:55 +00:00
|
|
|
<div class="stash">
|
|
|
|
<a
|
|
|
|
:href="`/stash/${profile.username}/${stash.slug}`"
|
|
|
|
class="stash-name nolink"
|
|
|
|
>
|
2024-03-03 01:33:35 +00:00
|
|
|
{{ stash.name }}
|
|
|
|
|
|
|
|
<Icon
|
|
|
|
v-if="stash.primary"
|
|
|
|
icon="heart7"
|
|
|
|
class="primary"
|
|
|
|
/>
|
2024-03-21 01:59:55 +00:00
|
|
|
</a>
|
2024-03-03 01:33:35 +00:00
|
|
|
|
|
|
|
<div class="stash-counts">
|
2024-03-21 01:59:55 +00:00
|
|
|
<a
|
|
|
|
:href="`/stash/${profile.username}/${stash.slug}/scenes`"
|
|
|
|
class="stash-count nolink"
|
|
|
|
><Icon icon="clapboard-play" />{{ abbreviateNumber(stash.stashedScenes) }}</a>
|
|
|
|
|
|
|
|
<a
|
|
|
|
:href="`/stash/${profile.username}/${stash.slug}/actors`"
|
|
|
|
class="stash-count nolink"
|
|
|
|
><Icon icon="star" />{{ abbreviateNumber(stash.stashedActors) }}</a>
|
|
|
|
|
|
|
|
<a
|
|
|
|
:href="`/stash/${profile.username}/${stash.slug}/movies`"
|
|
|
|
class="stash-count nolink"
|
|
|
|
><Icon icon="movie" />{{ abbreviateNumber(stash.stashedMovies) }}</a>
|
2024-03-03 01:33:35 +00:00
|
|
|
</div>
|
2024-03-21 01:59:55 +00:00
|
|
|
</div>
|
2024-03-03 01:33:35 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
2024-02-29 04:08:54 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { inject } from 'vue';
|
|
|
|
|
|
|
|
const pageContext = inject('pageContext');
|
|
|
|
const profile = pageContext.pageProps.profile;
|
2024-03-03 01:33:35 +00:00
|
|
|
|
|
|
|
function abbreviateNumber(number) {
|
2024-03-17 04:19:28 +00:00
|
|
|
return number?.toLocaleString('en-US', { notation: 'compact' }) || 0;
|
2024-03-03 01:33:35 +00:00
|
|
|
}
|
2024-02-29 04:08:54 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.profile-header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
color: var(--highlight-strong-30);
|
|
|
|
background: var(--grey-dark-40);
|
|
|
|
}
|
|
|
|
|
|
|
|
.username {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
width: 2rem;
|
|
|
|
height: 2rem;
|
|
|
|
border-radius: .25rem;
|
|
|
|
margin-right: 1rem;
|
|
|
|
}
|
2024-03-03 01:33:35 +00:00
|
|
|
|
|
|
|
.stashes {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
|
2024-03-17 04:27:43 +00:00
|
|
|
gap: 1rem;
|
2024-03-03 01:33:35 +00:00
|
|
|
padding: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.stash {
|
|
|
|
width: 100%;
|
|
|
|
background: var(--background);
|
|
|
|
box-shadow: 0 0 3px var(--shadow-weak-30);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
box-shadow: 0 0 3px var(--shadow-weak-20);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.stash-name {
|
|
|
|
display: flex;
|
|
|
|
padding: .5rem;
|
|
|
|
border-bottom: solid 1px var(--shadow-weak-30);
|
|
|
|
font-weight: bold;
|
|
|
|
|
2024-03-21 01:59:55 +00:00
|
|
|
.icon {
|
|
|
|
margin-left: .75rem;
|
|
|
|
}
|
|
|
|
|
2024-03-03 01:33:35 +00:00
|
|
|
.icon.primary {
|
|
|
|
fill: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.stash-counts {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.stash-count {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: .5rem;
|
2024-03-21 01:59:55 +00:00
|
|
|
flex-grow: 1;
|
2024-03-03 01:33:35 +00:00
|
|
|
font-size: .9rem;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
margin-right: .5rem;
|
|
|
|
fill: var(--shadow);
|
|
|
|
}
|
2024-03-21 01:59:55 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--primary);
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
fill: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
2024-03-03 01:33:35 +00:00
|
|
|
}
|
2024-02-29 04:08:54 +00:00
|
|
|
</style>
|