-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
236bc9d
commit 2fc9b01
Showing
11 changed files
with
132 additions
and
89 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,60 @@ | ||
import IconBrandGithub from "https://deno.land/x/[email protected]/tsx/brand-github.tsx" | ||
import IconBrandInstagram from "https://deno.land/x/[email protected]/tsx/brand-instagram.tsx" | ||
import IconPhone from "https://deno.land/x/[email protected]/tsx/phone.tsx" | ||
import IconMail from "https://deno.land/x/[email protected]/tsx/mail.tsx" | ||
|
||
const Footer = () => ( | ||
<footer className="flex flex-col gap-8 bg-black py-8 text-gray-50 font-light"> | ||
<div className="md:grid grid-cols-7"> | ||
<div className="col-span-1"></div> | ||
<div className="col-span-1"> | ||
<footer class="flex flex-col gap-8 bg-black py-8 text-gray-50 font-light"> | ||
<div class="md:grid grid-cols-7"> | ||
<div class="col-span-1"></div> | ||
<div class="col-span-1"> | ||
<img src="/logo.png" alt="ET logo" width="200px" /> | ||
</div> | ||
<div className="col-span-1"></div> | ||
<div className="col-span-3 flex flex-row gap-8 justify-end"> | ||
<div className="flex flex-col gap-8"> | ||
<div class="col-span-1"></div> | ||
<div class="col-span-3 flex flex-row gap-8 justify-end"> | ||
<div class="flex flex-col gap-8"> | ||
<p>English theater improv club</p> | ||
<div className="flex flex-col gap-2"> | ||
<a href="#events" title="Jump to events" className="hover:text-gray-500">Events</a> | ||
<a href="#productions" title="Jump to productions" className="hover:text-gray-500">Productions</a> | ||
<div class="flex flex-col gap-2"> | ||
<a href="#events" title="Jump to events" class="hover:text-gray-500">Events</a> | ||
<a href="#productions" title="Jump to productions" class="hover:text-gray-500">Productions</a> | ||
</div> | ||
</div> | ||
<div className="flex flex-col gap-8"> | ||
<div class="flex flex-col gap-8"> | ||
<p>Contact</p> | ||
<div className="flex flex-col"> | ||
<a href="mailto:[email protected]" className="hover:text-gray-500">[email protected]</a> | ||
<a href="tel:+1234567890" className="hover:text-gray-500">+1234567890</a> | ||
<div class="flex flex-col"> | ||
<IconMail class="w-6 h-6" /> | ||
<a href="mailto:[email protected]" class="hover:text-gray-500">[email protected]</a> | ||
<IconPhone class="w-6 h-6" /> | ||
<a href="tel:+1234567890" class="hover:text-gray-500">+1234567890</a> | ||
</div> | ||
<div> | ||
<p>Instagram:</p> | ||
<a href="http://instagram.com" className="hover:text-gray-500">@account</a> | ||
<div class="flex flex-row"> | ||
<IconBrandInstagram class="w-6 h-6" /> | ||
<p>Instagram:</p> | ||
</div> | ||
<a href="http://instagram.com" class="hover:text-gray-500">@account</a> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="col-span-1"></div> | ||
<div class="col-span-1"></div> | ||
</div> | ||
<div className="mx-16 h-[1px] bg-[#303C64]"></div> | ||
<div className="mx-16 flex justify-end"> | ||
<div class="mx-16 h-[1px] bg-[#303C64]"></div> | ||
<div class="mx-16 flex justify-between items-center"> | ||
<div class="flex flex-row items-center gap-4"> | ||
<a href="https://fresh.deno.dev"> | ||
<img | ||
width="197" | ||
height="37" | ||
src="https://fresh.deno.dev/fresh-badge-dark.svg" | ||
alt="Made with Fresh" | ||
/> | ||
</a> | ||
<a href="https://github.com/evilmonkey19/et_theater" class="px-3 py-2 bg-gray-800 text-white rounded hover:bg-gray-700 flex gap-2"><IconBrandGithub class="w-6 h-6" />Go to the repo</a> | ||
</div> | ||
<p>Made with ❤️ by | ||
<a href="https://www.linkedin.com/in/yan-zhang-899960244/" className="hover:text-gray-500">Yan Zhang (Designer)</a> | ||
<a href="https://www.linkedin.com/in/yan-zhang-899960244/" class="hover:text-gray-500">Yan Zhang (Designer)</a> | ||
& | ||
<a href="https://perpinya.eu/en" className="hover:text-gray-500">Enric Perpinyà (Programmer)</a> | ||
<a href="https://perpinya.eu/en" class="hover:text-gray-500">Enric Perpinyà (Programmer)</a> | ||
</p> | ||
</div> | ||
</footer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { useRef, useEffect } from "preact/hooks"; | ||
|
||
type CardProps = { | ||
type: string; | ||
image_path: string; | ||
title: string; | ||
date: string; | ||
description: string; | ||
}; | ||
|
||
const Card = (props: CardProps) => { | ||
const { type, image_path, title, date, description } = props; | ||
|
||
const dialogRef = useRef<HTMLDialogElement>(null); | ||
const showButtonRef = useRef<HTMLButtonElement>(null); | ||
const closeButtonRef = useRef<HTMLButtonElement>(null); | ||
|
||
useEffect(() => { | ||
const dialog = dialogRef.current; | ||
const showButton = showButtonRef.current; | ||
const closeButton = closeButtonRef.current; | ||
|
||
const showModal = () => { | ||
dialog?.showModal(); | ||
|
||
document.body.style.overflow = 'hidden'; | ||
} | ||
const closeDialog = () => { | ||
dialog?.close(); | ||
document.body.style.overflow = 'auto'; | ||
} | ||
|
||
showButton?.addEventListener("click", showModal); | ||
closeButton?.addEventListener("click", closeDialog); | ||
|
||
return () => { | ||
showButtonRef.current?.removeEventListener("click", showModal); | ||
closeButtonRef.current?.removeEventListener("click", closeDialog); | ||
}; | ||
}, []); | ||
|
||
const date_class = `text-md rounded-lg ${type === 'event' ? 'text-primary' : 'text-secondary'}`; | ||
const details_close_class = `text-xl p-2 border-2 text-center ${type === 'event' | ||
? 'text-secondary border-secondary hover:bg-secondary hover:text-gray-50' | ||
: 'text-primary border-primary hover:bg-primary hover:text-gray-50'}`; | ||
|
||
return ( | ||
<div class={`rounded-md p-4 flex flex-col gap-4 max-w-md | ||
${type === 'event' | ||
? 'bg-gray-50 text-gray-950' | ||
: 'bg-gray-900 text-gray-50'}`}> | ||
<img src={image_path} alt={title} class="rounded-lg" /> | ||
<h1 class="text-2xl">{title}</h1> | ||
<div class="flex flex-col gap-2"> | ||
<p class={date_class}>Date: {date}</p> | ||
<p class="text-sm">{description}</p> | ||
</div> | ||
<button ref={showButtonRef} class={details_close_class}>View details</button> | ||
<dialog ref={dialogRef} class="p-4 rounded-lg backdrop-blur-xl backdrop:drop-shadow-xl backdrop:backdrop-blur-xl"> | ||
<div class="text-light text-lg flex flex-col gap-4 max-w-md"> | ||
<img src={image_path} alt={title} class="rounded-lg max-w-md"/> | ||
<h1 class="text-2xl">{title}</h1> | ||
<div class="flex flex-col gap-2"> | ||
<p class={date_class}>Date: {date}</p> | ||
<p class="text-sm">{description}</p> | ||
</div> | ||
<button autofocus ref={closeButtonRef} class={details_close_class}>Close</button> | ||
</div> | ||
</dialog> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters