Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

css fixes

Steven Tey73a49f8d4e04
diff --git a/app/dub.co/(blog-post)/blog/[slug]/page.tsx b/app/dub.co/(blog-post)/blog/[slug]/page.tsx
index d0a297feee..f3356847cd 100644
--- a/app/dub.co/(blog-post)/blog/[slug]/page.tsx
+++ b/app/dub.co/(blog-post)/blog/[slug]/page.tsx
@@ -10,6 +10,7 @@ import { constructMetadata, formatDate } from "#/lib/utils";
import BlurImage from "#/ui/blur-image";
import { BLOG_CATEGORIES } from "#/lib/constants/content";
import { getAndCacheTweet } from "#/lib/twitter";
+import getRepos from "#/lib/github";
export async function generateStaticParams() {
return allBlogPosts.map((post) => ({
@@ -48,7 +49,7 @@ export default async function BlogArticle({
notFound();
}
- const [thumbnailBlurhash, images, tweets] = await Promise.all([
+ const [thumbnailBlurhash, images, tweets, repos] = await Promise.all([
getBlurDataURL(data.image),
await Promise.all(
data.images.map(async (src: string) => ({
@@ -59,6 +60,7 @@ export default async function BlogArticle({
await Promise.all(
data.tweetIds.map(async (id: string) => getAndCacheTweet(id)),
),
+ getRepos(data.githubRepos),
]);
const category = BLOG_CATEGORIES.find(
@@ -114,6 +116,7 @@ export default async function BlogArticle({
code={data.body.code}
images={images}
tweets={tweets}
+ repos={repos}
className="px-5 pb-20 pt-4 sm:px-10"
/>
</div>
diff --git a/app/ui/content/mdx.tsx b/app/ui/content/mdx.tsx
index 0b0e6eb162..5de6abd98f 100644
--- a/app/ui/content/mdx.tsx
+++ b/app/ui/content/mdx.tsx
@@ -66,6 +66,38 @@ const components = {
{...props}
/>
),
+ Quote: (props: {
+ author: string;
+ authorSrc: string;
+ title: string;
+ company: string;
+ companySrc: string;
+ text: string;
+ }) => (
+ <div className="not-prose mt-4 flex flex-col items-center justify-center space-y-4 rounded-md border border-gray-200 bg-white p-10">
+ <div className="w-fit rounded-full bg-gradient-to-r from-blue-100 to-green-100 p-1.5">
+ <img
+ className="h-20 w-20 rounded-full border-2 border-white"
+ src={props.authorSrc}
+ alt={props.author}
+ />
+ </div>
+ <p className="text-center text-lg text-gray-600 [text-wrap:balance]">
+ "{props.text}"
+ </p>
+ <div className="flex items-center justify-center space-x-2">
+ <img
+ className="h-12 w-12 rounded-md border-2 border-white"
+ src={props.companySrc}
+ alt={props.company}
+ />
+ <div className="flex flex-col">
+ <p className="font-semibold text-gray-600">{props.author}</p>
+ <p className="text-sm text-gray-500">{props.title}</p>
+ </div>
+ </div>
+ </div>
+ ),
Prerequisites: (props: any) => (
<div className="mt-4 rounded-md border border-gray-200 bg-white px-6 py-1 text-[0.95rem] leading-[1.4rem] shadow-md">
<div className="-mb-6 flex items-center space-x-2 text-gray-600">
@@ -185,7 +217,7 @@ export function MDX({ code, images, tweets, repos, className }: MDXProps) {
...components,
Image: MDXImage,
Tweet,
- MDXRepo,
+ GithubRepo: MDXRepo,
}}
/>
</article>
diff --git a/app/ui/popover.tsx b/app/ui/popover.tsx
index 998838dbfc..a68abcddcf 100644
--- a/app/ui/popover.tsx
+++ b/app/ui/popover.tsx
@@ -23,7 +23,7 @@ export default function Popover({
if (isMobile) {
return (
<Drawer.Root open={openPopover} onOpenChange={setOpenPopover}>
- <div className="md:hidden">{children}</div>
+ <div className="sm:hidden">{children}</div>
<Drawer.Overlay className="fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur" />
<Drawer.Portal>
<Drawer.Content className="fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white">
@@ -42,13 +42,13 @@ export default function Popover({
return (
<PopoverPrimitive.Root open={openPopover} onOpenChange={setOpenPopover}>
- <PopoverPrimitive.Trigger className="hidden md:inline-flex" asChild>
+ <PopoverPrimitive.Trigger className="hidden sm:inline-flex" asChild>
{children}
</PopoverPrimitive.Trigger>
<PopoverPrimitive.Content
sideOffset={8}
align={align}
- className="z-50 hidden animate-slide-up-fade items-center rounded-md border border-gray-200 bg-white drop-shadow-lg md:block"
+ className="z-50 hidden animate-slide-up-fade items-center rounded-md border border-gray-200 bg-white drop-shadow-lg sm:block"
>
{content}
</PopoverPrimitive.Content>
diff --git a/components/app/links/link-card.tsx b/components/app/links/link-card.tsx
index d46a6371b3..ff86c03abf 100644
--- a/components/app/links/link-card.tsx
+++ b/components/app/links/link-card.tsx
@@ -255,7 +255,7 @@ export default function LinkCard({
e.stopPropagation(); // to avoid selecting the link card
}}
className={cn(
- "w-full max-w-[170px] truncate text-sm font-semibold text-blue-800 sm:max-w-[300px] sm:text-base md:max-w-[360px] xl:max-w-[500px]",
+ "w-full max-w-[140px] truncate text-sm font-semibold text-blue-800 sm:max-w-[300px] sm:text-base md:max-w-[360px] xl:max-w-[500px]",
{
"text-gray-500": archived,
},
@@ -335,7 +335,7 @@ export default function LinkCard({
<p className="whitespace-nowrap text-sm text-gray-500">
{timeAgo(createdAt)}
</p>
- <p>•</p>
+ <p className="hidden xs:block">•</p>
{rewrite && (
<Tooltip
content={
@@ -346,7 +346,7 @@ export default function LinkCard({
/>
}
>
- <EyeOff className="h-4 w-4 text-gray-500" />
+ <EyeOff className="hidden h-4 w-4 text-gray-500 xs:block" />
</Tooltip>
)}
<a
@@ -356,7 +356,7 @@ export default function LinkCard({
href={url}
target="_blank"
rel="noopener noreferrer"
- className="max-w-[180px] truncate text-sm font-medium text-gray-700 underline-offset-2 hover:underline sm:max-w-[300px] md:max-w-[360px] xl:max-w-[440px]"
+ className="hidden max-w-[140px] truncate text-sm font-medium text-gray-700 underline-offset-2 hover:underline xs:block sm:max-w-[300px] md:max-w-[360px] xl:max-w-[440px]"
>
{url}
</a>
diff --git a/components/layout/app/index.tsx b/components/layout/app/index.tsx
index 07cce6decc..a0db0caf6d 100644
--- a/components/layout/app/index.tsx
+++ b/components/layout/app/index.tsx
@@ -157,14 +157,14 @@ export default function AppLayout({
<div className="flex items-center space-x-6">
<a
href={`${HOME_DOMAIN}/changelog`}
- className="hidden text-sm text-gray-500 transition-colors hover:text-gray-700 md:block"
+ className="hidden text-sm text-gray-500 transition-colors hover:text-gray-700 sm:block"
target="_blank"
>
Changelog
</a>
<button
onClick={() => setShowCMDK(true)}
- className="hidden text-sm text-gray-500 transition-colors hover:text-gray-700 md:block"
+ className="hidden text-sm text-gray-500 transition-colors hover:text-gray-700 sm:block"
>
Help
</button>
diff --git a/lib/auth.ts b/lib/auth.ts
index 680c0821dc..8ec2580234 100644
--- a/lib/auth.ts
+++ b/lib/auth.ts
@@ -116,7 +116,6 @@ const withProjectAuth =
return handler(req, res, project, session);
}
- console.log(req.url);
if (
project.plan === "enterprise" &&
!requiredRole.includes(project.users[0].role) &&
diff --git a/lib/utils.ts b/lib/utils.ts
index 4ef0069ec3..90d66d2d17 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -9,7 +9,6 @@ import {
SPECIAL_APEX_DOMAINS,
ccTLDs,
SECOND_LEVEL_DOMAINS,
- HOME_HOSTNAMES,
HOME_DOMAIN,
} from "./constants";
diff --git a/tailwind.config.js b/tailwind.config.js
index b20c3481ab..e77c514057 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -10,6 +10,9 @@ module.exports = {
},
theme: {
extend: {
+ screens: {
+ xs: "420px",
+ },
fontFamily: {
display: ["var(--font-satoshi)", "system-ui", "sans-serif"],
default: ["var(--font-inter)", "system-ui", "sans-serif"],