-
+
Share your project
@@ -91,7 +90,7 @@ export default defineRoute((_req, ctx) => {
((_req, ctx) => {
URL
diff --git a/static/styles.css b/static/styles.css
index b5c61c956..7f996dc04 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -1,3 +1,42 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+.button-styles {
+ @apply px-4 py-2 bg-primary text-white rounded-lg border border-primary transition duration-100 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-transparent hover:text-primary;
+}
+
+.input-styles {
+ @apply px-4 py-2 bg-transparent rounded-lg outline-none border border-gray-300 hover:border-black transition duration-100 disabled:opacity-50 disabled:cursor-not-allowed hover:dark:border-white;
+}
+
+.site-bar-styles {
+ @apply flex justify-between p-4 gap-4;
+}
+
+.nav-styles {
+ @apply flex flex-wrap justify-start gap-x-8 gap-y-4 items-center justify-between h-full;
+}
+
+.nav-item {
+ @apply text-gray-500 px-3 py-4 sm:py-2;
+}
+
+.link-styles {
+ @apply text-gray-500 transition duration-100 hover:text-black hover:dark:text-white;
+}
+
+/* .active-link-styles {
+ @apply data-[current]:!text-black data-[current]:!dark:text-white;
+}
+
+.active-ancestor-link-styles {
+ @apply data-[ancestor]:!text-black data-[ancestor]:!dark:text-white;
+} */
+
+.heading-styles {
+ @apply text-3xl font-bold;
+}
+
+.heading-with-margin-styles {
+ @apply text-3xl font-bold mb-8;
+}
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 53a55ba2c..e7a53aaec 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -5,12 +5,6 @@ export default {
content: [
"{routes,islands,components}/**/*.{ts,tsx}",
],
- safelist: [
- "gap-x-8",
- "hover:dark:text-white",
- "disabled:opacity-50",
- "disabled:cursor-not-allowed",
- ],
theme: {
extend: {
colors: {
diff --git a/utils/constants.ts b/utils/constants.ts
index 9e304ec3a..6b356b7f0 100644
--- a/utils/constants.ts
+++ b/utils/constants.ts
@@ -1,24 +1,3 @@
// Copyright 2023 the Deno authors. All rights reserved. MIT license.
export const SITE_NAME = "Deno Hunt (Beta)";
export const SITE_DESCRIPTION = "Discover new Deno projects. Share your own.";
-
-/**
- * These are base styles for some elements. This approach is chosen as it avoids more complex alternatives:
- * 1. Writing custom classes in Tailwind CSS (see https://tailwindcss.com/docs/reusing-styles#compared-to-css-abstractions)
- * 2. Writing custom components which offer no additional functionality beyond styling
- */
-export const BUTTON_STYLES =
- "px-4 py-2 bg-primary text-white rounded-lg border-1 border-primary transition duration-100 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-transparent hover:text-primary";
-export const INPUT_STYLES =
- "px-4 py-2 bg-transparent rounded rounded-lg outline-none border-1 border-gray-300 hover:border-black transition duration-100 disabled:opacity-50 disabled:cursor-not-allowed hover:dark:border-white";
-export const SITE_BAR_STYLES = "flex justify-between p-4 gap-4";
-export const NAV_STYLES =
- "flex flex-wrap justify-start gap-x-8 gap-y-4 items-center justify-between h-full";
-export const LINK_STYLES =
- "text-gray-500 transition duration-100 hover:text-black hover:dark:text-white";
-export const ACTIVE_LINK_STYLES =
- "data-[current]:!text-black data-[current]:!dark:text-white";
-export const ACTIVE_ANCESTOR_LINK_STYLES =
- "data-[ancestor]:!text-black data-[ancestor]:!dark:text-white";
-export const HEADING_STYLES = "text-3xl font-bold";
-export const HEADING_WITH_MARGIN_STYLES = HEADING_STYLES + " mb-8";