Fix main page layout

This commit is contained in:
Ananth Venkatesh 2024-02-14 19:27:24 +00:00
parent bc761bbbea
commit a0aea05e00
3 changed files with 21 additions and 16 deletions

View file

@ -1,16 +1,17 @@
import Link from 'next/link' import Link from 'next/link'
import { Inter, Zilla_Slab } from 'next/font/google'
const zillaSlab = Zilla_Slab({ weight: '600', subsets: ['latin'] })
const inter = Inter({ weight: '400', subsets: ['latin'] })
export default function News() { export default function News() {
return ( return (
<div className='bg-slate-800 rounded-lg p-6 w-full basis-full md:basis-2/5 my-4 lg:my-0 max-h-[250px] overflow-y-auto shadow-md shadow-slate-500'> <div className={inter.className + ' mt-6 bg-slate-800 rounded-lg p-6 w-full basis-full md:basis-2/5 my-4 lg:my-0 max-h-[250px] overflow-y-auto shadow-md shadow-slate-500'}>
<span className='text-3xl text-slate-200'>eeXiv News</span> <div className={zillaSlab.className + ' font-serif text-3xl text-slate-200'}>eeXiv News</div>
<br className='my-2' /> <div className='text-lg text-slate-400 mb-4'>
<span className='text-lg text-slate-400'>
Stay up to date with what is happening at eeXiv. Stay up to date with what is happening at eeXiv.
</span> </div>
<br className='my-2' /> <div className={zillaSlab.className + ' text-slate-200 text-2xl mb-2'}>Latest news</div>
<span className='text-lg text-slate-200'>Latest news</span>
<br className='my-4' />
<ul className='text-slate-50 px-6 list-disc'> <ul className='text-slate-50 px-6 list-disc'>
<li key={1}> <li key={1}>
eeXiv 2.1 has been released! Documents are now statically generated eeXiv 2.1 has been released! Documents are now statically generated

View file

@ -1,7 +1,8 @@
.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; @apply duration-300;
height: calc(200px); height: fit-content;
padding-bottom: 10px;
transition: height 0.2s ease-in-out; transition: height 0.2s ease-in-out;
width: 100vw; width: 100vw;
right: 0; right: 0;
@ -17,4 +18,5 @@
.menu-hidden { .menu-hidden {
height: 0; height: 0;
padding-bottom: 0;
} }

View file

@ -29,7 +29,7 @@ export default function Home() {
<div className='text-slate-800 flex flex-wrap md:flex-row justify-center'> <div className='text-slate-800 flex flex-wrap md:flex-row justify-center'>
<p className='font-serif text-lg basis-full md:basis-1/2 grow mr-1 text-balance'> <p className='font-serif text-lg basis-full md:basis-1/2 grow mr-1 text-balance'>
eeXiv, like arXiv, is a free distribution service and an open-access eeXiv, like arXiv, is a free distribution service and an open-access
archive for nearly {Object.keys(documents).length} scholarly articles in archive for over {Object.keys(documents).length} scholarly articles in
the fields of physics, mathematics, computer science, quantitative the fields of physics, mathematics, computer science, quantitative
biology, quantitative finance, statistics, electrical engineering and biology, quantitative finance, statistics, electrical engineering and
systems science, and economics, but mainly related to the{' '} systems science, and economics, but mainly related to the{' '}
@ -44,18 +44,20 @@ export default function Home() {
</p> </p>
<News /> <News />
<div className='grid grid-cols-1 space-y-2 mt-4 basis-full'> <div className='grid grid-cols-1 space-y-2 mt-4 basis-full'>
<hr className='mx-auto w-full h-1 border-0 bg-slate-200 my-2 rounded-md' /> <br />
<span className='font-serif text-xl'>Recently released documents</span> <div className='font-serif text-xl my-2'>Recently released documents</div>
<RecentDocuments /> <RecentDocuments />
<hr className='mx-auto w-full h-1 border-0 bg-slate-200 my-2 rounded-md' /> <hr className='mx-auto w-full h-1 border-0 bg-slate-200 my-2 rounded-md' />
<span className='font-serif text-xl'> <br />
<div className='font-serif text-xl my-2'>
Selected documents in various disciplines Selected documents in various disciplines
</span> </div>
<RandomDocs /> <RandomDocs />
<hr className='mx-auto w-full h-1 border-0 bg-slate-200 my-2 rounded-md' /> <hr className='mx-auto w-full h-1 border-0 bg-slate-200 my-2 rounded-md' />
<span className='font-serif text-xl'> <br />
<div className='font-serif text-xl'>
Our esteemed faculty and alumni Our esteemed faculty and alumni
</span> </div>
<AuthorDisplay /> <AuthorDisplay />
</div> </div>
</div> </div>