fix some styling wip
This commit is contained in:
parent
27358c4c87
commit
d14528243e
5 changed files with 40 additions and 9 deletions
|
@ -5,6 +5,7 @@ import { Zilla_Slab } from 'next/font/google'
|
||||||
import { notFound } from 'next/navigation'
|
import { notFound } from 'next/navigation'
|
||||||
import DocumentCard from '@/app/components/DocumentCard'
|
import DocumentCard from '@/app/components/DocumentCard'
|
||||||
import findDocumentsByAuthor from './findDocumentsByAuthor'
|
import findDocumentsByAuthor from './findDocumentsByAuthor'
|
||||||
|
import cardEffects from '@/app/styles/cardEffects.module.css'
|
||||||
|
|
||||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
|
@ -41,11 +42,15 @@ export default function AuthorDisplay({
|
||||||
) : null}
|
) : null}
|
||||||
<div className='my-4 max-h-12 flex flex-wrap gap-2'>
|
<div className='my-4 max-h-12 flex flex-wrap gap-2'>
|
||||||
{affiliation.map((a: string) => (
|
{affiliation.map((a: string) => (
|
||||||
<Link key={a} href={`/affiliation/${a.split('@')[1]}`}>
|
<Link
|
||||||
|
key={a}
|
||||||
|
href={`/affiliation/${a.split('@')[1]}`}
|
||||||
|
className={cardEffects['card-small']}
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
src={affiliations[a.split('@')[1]].image}
|
src={affiliations[a.split('@')[1]].image}
|
||||||
alt={affiliations[a.split('@')[1]].name}
|
alt={affiliations[a.split('@')[1]].name}
|
||||||
className='h-12 shadow-sm shadow-slate-400 rounded-md'
|
className='h-12 rounded-md'
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -14,7 +14,7 @@ const DocumentCard = ({ doc, href }: { doc: Document; href: string }) => {
|
||||||
return (
|
return (
|
||||||
<Link href={href} className='no-link-style'>
|
<Link href={href} className='no-link-style'>
|
||||||
<div
|
<div
|
||||||
className={`${cardEffects.card} border-4 rounded-lg border-gray-300 hover:border-blue-500 p-5 my-4 w-full cursor-pointer shadow-slate-300 shadow-md`}
|
className={`${cardEffects['card-large']} border-4 rounded-lg border-gray-300 hover:border-blue-500 p-5 my-4 w-full cursor-pointer shadow-slate-300 shadow-md`}
|
||||||
role='button' // this is a critical DEI concern as we have marked this element as a button with ARIA role, yet we have not supported button accessiblity features
|
role='button' // this is a critical DEI concern as we have marked this element as a button with ARIA role, yet we have not supported button accessiblity features
|
||||||
>
|
>
|
||||||
<h2 className={`${zillaSlab.className} text-3xl`}>{title}</h2>
|
<h2 className={`${zillaSlab.className} text-3xl`}>{title}</h2>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
.menu {
|
.menu {
|
||||||
@apply overflow-hidden left-[0] top-[235px] z-10 absolute bg-slate-200;
|
@apply overflow-hidden left-[0] top-[235px] z-10 absolute bg-slate-200;
|
||||||
@apply duration-300;
|
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
transition: height 0.2s ease-in-out;
|
transition: height 0.2s ease-in-out;
|
||||||
|
|
|
@ -42,7 +42,7 @@ const SearchResult = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${cardEffects.card} border-4 rounded-lg border-gray-300 hover:border-blue-500 p-5 my-4 w-full cursor-pointer`}
|
className={`${cardEffects['card-large']} border-4 rounded-lg border-gray-300 hover:border-blue-500 p-5 my-4 w-full cursor-pointer`}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
role='button' // this is a critical DEI concern as we have marked this element as a button with ARIA role, yet we have not supported button accessiblity features
|
role='button' // this is a critical DEI concern as we have marked this element as a button with ARIA role, yet we have not supported button accessiblity features
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/* creates a 3D card effect using a pseudo element for performance reasons */
|
/* creates a 3D card effect using a pseudo element for performance reasons */
|
||||||
|
|
||||||
.card {
|
.card-large {
|
||||||
@apply shadow-sm shadow-slate-300;
|
@apply shadow-sm shadow-slate-300;
|
||||||
/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
|
/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
|
||||||
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
|
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.card::after {
|
.card-large::after {
|
||||||
@apply shadow-lg shadow-slate-500;
|
@apply shadow-lg shadow-slate-500;
|
||||||
content: '';
|
content: '';
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
@ -19,10 +19,37 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover {
|
.card-large:hover {
|
||||||
transform: scale(1.02, 1.02);
|
transform: scale(1.02, 1.02);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover::after {
|
.card-large:hover::after {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-small {
|
||||||
|
@apply shadow-sm shadow-slate-300;
|
||||||
|
/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
|
||||||
|
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.card-small::after {
|
||||||
|
@apply shadow-md shadow-slate-500;
|
||||||
|
content: '';
|
||||||
|
z-index: -1;
|
||||||
|
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-small:hover {
|
||||||
|
transform: scale(1.08, 1.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-small:hover::after {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue