Added heart button to search results. Changed warning page button design.

This commit is contained in:
DebaucheryLibrarian 2021-03-24 01:26:33 +01:00
parent bbf058480f
commit a64b25eb51
3 changed files with 39 additions and 62 deletions

View File

@ -129,18 +129,19 @@ export default {
.button { .button {
display: inline-flex; display: inline-flex;
flex-basis: 0;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: none; border: none;
font-size: 1.5rem;
padding: 0; padding: 0;
border: solid 2px transparent; position: relative;
border-radius: 1rem;
color: var(--lighten-strong); color: var(--lighten-strong);
background: none;
cursor: pointer; cursor: pointer;
font-size: 1.5rem;
text-decoration: none; text-decoration: none;
flex-basis: 0; transition: border .5s ease;
&.leave { &.leave {
flex-direction: row; flex-direction: row;
@ -158,12 +159,28 @@ export default {
flex-grow: 1; flex-grow: 1;
} }
&.straight { &.straight,
border-color: var(--primary); &.queer {
background: var(--darken-censor);
&:before {
content: '';
width: calc(100% + .3rem);
height: calc(100% + .25rem);
position: absolute;
z-index: -1;
border-radius: 1.1rem;
filter: blur(.5rem);
transition: filter .2s ease;
}
} }
&.queer { &.straight:before {
border-image: linear-gradient(90deg, #f00, #f80, #ff0, #0f0, #00f, #a0f, #fff, #f8f, #0ff) 1; background: var(--primary);
}
&.queer:before {
background: linear-gradient(90deg, #f00, #f80, #ff0, #0f0, #00f, #a0f, #fff, #f8f, #0ff);
} }
&:not(:last-child) { &:not(:last-child) {
@ -180,6 +197,11 @@ export default {
.icon { .icon {
fill: var(--text-light); fill: var(--text-light);
} }
&.straight:before,
&.queer:before {
filter: blur(0);
}
} }
} }

View File

@ -5,7 +5,7 @@
class="summary" class="summary"
>Searching...</span> >Searching...</span>
<template v-if="!loader && actors.length > 0"> <template v-if="actors.length > 0">
<span class="summary">Found {{ actors.length }} actors for '{{ query }}'</span> <span class="summary">Found {{ actors.length }} actors for '{{ query }}'</span>
<div class="tiles"> <div class="tiles">
@ -18,7 +18,7 @@
</div> </div>
</template> </template>
<template v-if="!loader && releases.length > 0"> <template v-if="releases.length > 0">
<span class="summary">Found {{ releases.length }} releases for '{{ query }}'</span> <span class="summary">Found {{ releases.length }} releases for '{{ query }}'</span>
<Releases <Releases

View File

@ -1,7 +1,8 @@
import { graphql } from '../api'; import { graphql } from '../api';
import { releaseFields } from '../fragments';
import { curateRelease, curateActor } from '../curate'; import { curateRelease, curateActor } from '../curate';
function initUiActions(_store, _router) { function initUiActions(store, _router) {
function setTagFilter({ commit }, filter) { function setTagFilter({ commit }, filter) {
const tagFilter = Array.from(new Set(filter)); const tagFilter = Array.from(new Set(filter));
@ -33,6 +34,8 @@ function initUiActions(_store, _router) {
query SearchReleases( query SearchReleases(
$query: String! $query: String!
$limit: Int = 20 $limit: Int = 20
$hasAuth: Boolean!
$userId: Int
) { ) {
results: searchReleases( results: searchReleases(
query: $query query: $query
@ -45,57 +48,7 @@ function initUiActions(_store, _router) {
} }
) { ) {
release { release {
id ${releaseFields}
title
slug
date
url
isNew
entity {
id
slug
name
url
type
independent
parent {
id
slug
name
url
type
}
}
actors: releasesActors {
actor {
id
slug
name
}
}
tags: releasesTags(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) {
tag {
id
name
slug
}
}
poster: releasesPosterByReleaseId {
media {
id
thumbnail
lazy
isS3
}
}
covers: releasesCovers {
media {
id
thumbnail
lazy
isS3
}
}
} }
rank rank
} }
@ -168,6 +121,8 @@ function initUiActions(_store, _router) {
`, { `, {
query, query,
limit, limit,
hasAuth: !!store.state.auth.user,
userId: store.state.auth.user?.id,
}); });
return { return {