-
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.
Add dialog component and about/legal dialogs
- Loading branch information
Showing
7 changed files
with
172 additions
and
5 deletions.
There are no files selected for viewing
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,49 @@ | ||
<template> | ||
<Dialog | ||
:open="dialogIsOpen" | ||
class="relative z-30" | ||
@close="view.dialogs.close()" | ||
> | ||
<div | ||
class="fixed inset-0 bg-primary-color/75 dark:bg-[#111]/85" | ||
aria-hidden="true" | ||
/> | ||
<div class="fixed inset-0 w-screen overflow-y-auto"> | ||
<div class="flex min-h-full items-center justify-center p-2"> | ||
<DialogPanel | ||
class="rounded-dialog shadow-dialog relative w-full max-w-150 select-text space-y-3 bg-blank-color p-5 font-serif text-base-serif leading-paragraph-wide dark:bg-controls-color" | ||
> | ||
<DialogTitle class="font-serif-heading text-[1.5rem] font-bold">{{ title }}</DialogTitle> | ||
<slot /> | ||
<BaseButton | ||
icon="close" | ||
class="absolute right-2 top-2 !m-0" | ||
@click="view.dialogs.close()" | ||
/> | ||
</DialogPanel> | ||
</div> | ||
</div> | ||
</Dialog> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue'; | ||
import { Dialog, DialogPanel, DialogTitle } from '@headlessui/vue'; | ||
import BaseButton from '@/components/BaseButton.vue'; | ||
import { useViewStore } from '@/stores/ViewStore'; | ||
const props = defineProps<{ | ||
id: string; | ||
title: string; | ||
}>(); | ||
const view = useViewStore(); | ||
const dialogIsOpen = computed(() => view.dialogs.openDialogId === props.id); | ||
</script> | ||
|
||
<style lang="postcss"> | ||
div[class*='rounded-dialog'] h3 { | ||
@apply !mt-6 font-bold; | ||
} | ||
</style> |
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,44 @@ | ||
<template> | ||
<PageDialog | ||
id="about" | ||
title="About This Website" | ||
> | ||
<p class="!mt-1.5"> | ||
A project by | ||
<a | ||
href="https://simonlou.com/" | ||
target="_blank" | ||
>Simon</a | ||
> | ||
and | ||
<a | ||
href="https://jona.im/" | ||
target="_blank" | ||
>Jona</a | ||
> | ||
</p> | ||
<p> | ||
This project is an attempt at rethinking the experience of browsing Hacker News by unifying | ||
the front page, linked websites and discussions as a multi-column web app. Special attention | ||
has also been paid to improving navigation and readability while keeping the information | ||
density high. | ||
</p> | ||
<p> | ||
We are interested to hear whether the interface complements your reading habits and affects | ||
your browsing experience — if you have any comments or suggestions, please reach out. Sharing | ||
the project is also much appreciated. | ||
</p> | ||
<p> | ||
The project’s source code is | ||
<a | ||
href="https://github.com/savageserif/hackernews-dot-cool" | ||
target="_blank" | ||
>available on GitHub</a | ||
>. | ||
</p> | ||
</PageDialog> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import PageDialog from '@/components/PageDialog.vue'; | ||
</script> |
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,50 @@ | ||
<template> | ||
<PageDialog | ||
id="legal" | ||
title="Legal Notice" | ||
> | ||
<h3>Impressum</h3> | ||
<p>Responsible regarding § 5 of the German Telemedia Act:</p> | ||
<blockquote class="!my-[0.8125rem] leading-paragraph-narrow"> | ||
{{ legalName }}<br />{{ legalStreet }}<br />{{ legalCity }}<br /> | ||
<a href="mailto:[email protected]">[email protected]</a> | ||
</blockquote> | ||
<p> | ||
We are neither responsible for any content fetched from the official | ||
<a | ||
href="https://github.com/hackernews/api" | ||
target="_blank" | ||
>Hacker News API</a | ||
>, which includes story titles and comments, nor for the contents of linked websites embedded | ||
within the page. | ||
</p> | ||
<h3>Privacy Policy</h3> | ||
<p> | ||
We do not collect any personal information from website visitors. We use Plausible Analytics | ||
to gather anonymized, aggregated statistics such as browser, operating system, device type, | ||
and country (approximated by IP address). Plausible Analytics operates without using cookies | ||
and does not collect any personal data. For more information, visit | ||
<a | ||
href="https://plausible.io/data-policy" | ||
target="_blank" | ||
>Plausible Analytics’ data policy</a | ||
>. This website is hosted by Vercel, which may collect anonymized logs. For more details, | ||
visit | ||
<a | ||
href="https://vercel.com/legal/privacy-policy" | ||
target="_blank" | ||
>Vercel’s privacy policy</a | ||
>. Please contact us at | ||
<a href="mailto:[email protected]">[email protected]</a> if you have any | ||
questions. | ||
</p> | ||
</PageDialog> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import PageDialog from '@/components/PageDialog.vue'; | ||
const legalName = import.meta.env.VITE_LEGAL_NAME; | ||
const legalStreet = import.meta.env.VITE_LEGAL_STREET; | ||
const legalCity = import.meta.env.VITE_LEGAL_CITY; | ||
</script> |
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
8d69ddb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for hackernews-dot-cool ready!
✅ Preview
https://hackernews-dot-cool-dgzi2q0lz-jonamil-56ba8df7.vercel.app
Built with commit 8d69ddb.
This pull request is being automatically deployed with vercel-action