Skip to content

Commit

Permalink
refactor: update imports
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <[email protected]>
  • Loading branch information
setchy committed Dec 25, 2024
1 parent 166f1b3 commit 9f77f4f
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 25 deletions.
10 changes: 6 additions & 4 deletions src/components/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
import { Image } from "astro:assets";
import Logo from "./Logo.astro";
import notifications from "~/assets/notifications.png";
import LatestRelease from "~/components/LatestRelease.astro";
import Logo from "~/components/Logo.astro";
import { siteMetadata } from "~/constants";
import notifications from "../assets/notifications.png";
import LatestRelease from "./LatestRelease.astro";
---

<div class="bg-gray-100">
Expand All @@ -16,7 +16,9 @@ import LatestRelease from "./LatestRelease.astro";

<h1 class="text-2xl lg:text-4xl font-semibold">{siteMetadata.title}</h1>

<h2 class="mt-2 text-xl lg:text-2xl font-light">{siteMetadata.description}.</h2>
<h2 class="mt-2 text-xl lg:text-2xl font-light">
{siteMetadata.description}.
</h2>

<LatestRelease />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/LatestRelease.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { Icon } from "astro-icon/components";
import { format, parseISO } from "date-fns";
import { format } from "date-fns";
import { Octokit } from "octokit";
import { URLs, siteMetadata } from "~/constants";
Expand All @@ -9,7 +9,7 @@ import type {
DownloadLinks,
HeroData,
ReleaseAsset,
} from "../types";
} from "~/types";
const octokit = new Octokit();
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import GitHubRepo from "~/components/GitHubRepo.astro";
import Logo from "~/components/Logo.astro";
import { siteMetadata } from "~/constants";
import GitHubRepo from "./GitHubRepo.astro";
import Logo from "./Logo.astro";
const { currentPathname } = Astro.props;
const isHomepage = currentPathname === "/";
Expand Down
10 changes: 5 additions & 5 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
import Footer from "../components/Footer.astro";
import GoogleAnalytics from "../components/GoogleAnalytics.astro";
import Navbar from "../components/Navbar.astro";
import "../styles/app.css";
import Footer from "~/components/Footer.astro";
import GoogleAnalytics from "~/components/GoogleAnalytics.astro";
import Navbar from "~/components/Navbar.astro";
import { siteMetadata } from "../constants";
import "~/styles/app.css";
import { siteMetadata } from "~/constants";
export interface Props {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import Layout from "../layouts/Layout.astro";
import Layout from "~/layouts/Layout.astro";
---

<Layout title="Page Not Found">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/callback.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import Layout from "../layouts/Layout.astro";
import Layout from "~/layouts/Layout.astro";
---

<Layout title="Callback">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/faq.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { FaqAccordion } from "../components/solid/FaqAccordion";
import Layout from "../layouts/Layout.astro";
import { FaqAccordion } from "~/components/solid/FaqAccordion";
import Layout from "~/layouts/Layout.astro";
---

<Layout title="Frequently Asked Questions">
Expand Down
21 changes: 13 additions & 8 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
import { Icon } from "astro-icon/components";
import Hero from "~/components/Hero.astro";
import { openSourceLibs } from "~/icons/icons";
import Hero from "../components/Hero.astro";
import Layout from "../layouts/Layout.astro";
import SectionRow from "../layouts/SectionRow.astro";
import Layout from "~/layouts/Layout.astro";
import SectionRow from "~/layouts/SectionRow.astro";
---

<Layout title="GitHub notifications on your menu bar">
Expand All @@ -15,17 +15,17 @@ import SectionRow from "../layouts/SectionRow.astro";
title="All your GitHub notifications on your desktop. Nice & Easy."
description="<p>Ever got lost with GitHub notifications? Too many emails?</p><br /><p>Gitify is all about making your life easier. Sitting on your menu bar, it informs you for any GitHub notifications without being annoying and of course without adverts. It just gets the job done.</p><br /><p>Works with GitHub Cloud and GitHub Enterprise Server. You can even connect multiple accounts.</p>"
screenshot={{
path: 'all-read',
alt: 'Screenshot when there are no notifications read',
path: "all-read",
alt: "Screenshot when there are no notifications read",
}}
/>

<SectionRow
title="It's about your preferences."
description="<p>Gitify will notify you every time you receive a notification by playing a sound (not an annoying one - it's a promise), showing native mac OS notifications or by just turning its tray icon to green.</p><br /><p>It is not there to interupt your workflow or distract you, you can customize your settings to your preference.</p>"
screenshot={{
path: 'settings',
alt: 'Your Preferences, Settings',
path: "settings",
alt: "Your Preferences, Settings",
}}
isDark
isReversed
Expand All @@ -40,7 +40,12 @@ import SectionRow from "../layouts/SectionRow.astro";
openSourceLibs.map((item) => (
<div class="hover:bg-gray-200 p-2 m-2 rounded-lg">
<a href={item.link} target="_blank" rel="noopener noreferrer">
<Icon name={item.svg} title={item.name} size={32} class="w-8 sm:w-12" />
<Icon
name={item.svg}
title={item.name}
size={32}
class="w-8 sm:w-12"
/>
</a>
</div>
))
Expand Down

0 comments on commit 9f77f4f

Please sign in to comment.