Skip to content

Commit

Permalink
Fix docs bugs on Safari
Browse files Browse the repository at this point in the history
adeira-source-id: f418ad49b3729ac7bdd50f5df7d3e340087f42a3
  • Loading branch information
itsdouges authored and triplex-bot committed Jan 18, 2025
1 parent 0bdac67 commit 6cfdf86
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 32 deletions.
24 changes: 16 additions & 8 deletions apps/docs/components/download-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ function extname(path: string) {
}

const logos = {
apple: <Image alt="macOS" height={40} src="/logos/mac.svg" width={40} />,
apple: (
<object
aria-label="macOS"
className="pointer-events-none h-10 w-10"
data="/logos/mac.svg"
role="img"
type="image/svg+xml"
/>
),
linux: <Image alt="Linux" height={40} src="/logos/linux.png" width={40} />,
vscode: (
<Image
Expand Down Expand Up @@ -67,8 +75,8 @@ function AssetDownload({
>
<div className="text-subtlest w-9 flex-shrink-0">{logo}</div>
<div className="flex flex-col">
<span className="text-default font-medium">{title}</span>
<span className="text-subtlest">{subtitle}</span>
<span className="text-default text-base font-medium">{title}</span>
<span className="text-subtlest text-base">{subtitle}</span>
</div>
{action}
</div>
Expand Down Expand Up @@ -112,7 +120,7 @@ function List() {
<AssetDownload
action={
<a
className="text-inverse bg-brand ml-auto flex-shrink-0 rounded px-4 py-1 font-medium"
className="text-inverse bg-brand ml-auto flex-shrink-0 rounded px-4 py-1 text-base font-medium"
href="https://winstall.app/apps/Triplex.Triplex"
onClick={(e) => {
beginDownload(e, "/docs/overview?dl=winget");
Expand All @@ -134,7 +142,7 @@ function List() {
<AssetDownload
action={
<a
className="text-inverse bg-brand ml-auto rounded px-4 py-1 font-medium"
className="text-inverse bg-brand ml-auto rounded px-4 py-1 text-base font-medium"
href={asset.browser_download_url}
onClick={(e) => {
beginDownload(e, forwardURL);
Expand Down Expand Up @@ -179,7 +187,7 @@ export function DownloadList() {
<AssetDownload
action={
<a
className="text-inverse bg-brand ml-auto flex-shrink-0 rounded px-4 py-1 font-medium"
className="text-inverse bg-brand ml-auto flex-shrink-0 rounded px-4 py-1 text-base font-medium"
href="https://marketplace.visualstudio.com/items?itemName=trytriplex.triplex-vsce"
onClick={(e) => {
beginDownload(e, "/docs/overview?dl=vsce");
Expand All @@ -195,12 +203,12 @@ export function DownloadList() {
<>
Find on the Visual Studio marketplace. Using Cursor?{" "}
<a
className="text-link hover:underline"
className="text-link text-base hover:underline"
href="https://www.cursor.com/how-to-install-extension"
rel="noreferrer"
target="_blank"
>
Follow the installation guide.
Follow their installation guide.
</a>
</>
}
Expand Down
10 changes: 4 additions & 6 deletions apps/docs/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
* This source code is licensed under the GPL-3.0 license found in the LICENSE
* file in the root directory of this source tree.
*/
import Image from "next/image";
import Link from "next/link";

export function Footer() {
return (
<footer className="bg-surface border-neutral relative col-span-full border-t">
<div className="mx-auto flex gap-14 px-6 py-10 md:px-8 lg:w-full lg:gap-32 lg:px-20">
<div className="basis-1/2 sm:basis-auto lg:mr-auto lg:flex-shrink-0">
<div className="flex flex-col gap-0.5">
<Image
alt="Triplex"
className="mb-1"
<div className="flex flex-col gap-1.5">
<object
className="pointer-events-none"
data="/logos/logo-horizontal.svg"
height={Math.round(223 / 9)}
src="/logos/logo-horizontal.svg"
width={Math.round(818 / 9)}
/>
<span className="text-subtlest text-base">
Expand Down
15 changes: 6 additions & 9 deletions apps/docs/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* file in the root directory of this source tree.
*/
import { HamburgerMenuIcon, MagnifyingGlassIcon } from "@radix-ui/react-icons";
import Image from "next/image";
import Link from "next/link";
import { useEffect, type ReactNode } from "react";
import { useSearchStore } from "../stores/search";
Expand Down Expand Up @@ -42,19 +41,17 @@ export function Header({
return (
<header className="bg-surface sticky top-0 z-50 col-span-full row-start-1 flex h-14 items-center gap-4 px-6 md:gap-6 md:px-8 lg:px-20">
<Link aria-label="Home" className="flex-shrink-0" href="/">
<Image
alt="Home"
className="mb-1"
<object
className="pointer-events-none mb-1"
data="/logos/logo-horizontal.svg"
height={Math.round(223 / 9)}
priority
src="/logos/logo-horizontal.svg"
width={Math.round(818 / 9)}
/>
</Link>

<nav className="flex flex-grow items-center gap-0.5 overflow-hidden md:gap-5">
<nav className="flex flex-grow items-center gap-0.5 md:gap-5">
<button
className="text-subtle hover:bg-hovered active:bg-pressed outline-link relative ml-auto flex h-8 flex-shrink-0 cursor-default items-center rounded px-3 text-sm -outline-offset-1 focus-visible:outline focus-visible:outline-1 md:-ml-2.5 md:hidden"
className="text-subtle hover:bg-hovered active:bg-pressed outline-link relative ml-auto flex h-8 flex-shrink-0 cursor-default items-center rounded px-3 text-sm -outline-offset-1 md:-ml-2.5 md:hidden"
onClick={onShowNav}
type="submit"
>
Expand All @@ -65,7 +62,7 @@ export function Header({

<div className="flex gap-2 md:w-full md:pl-2">
<button
className="text-subtle md:bg-neutral border-neutral hover:bg-hovered active:bg-pressed outline-link relative ml-auto flex h-8 w-full cursor-default items-center rounded-md px-3 text-base -outline-offset-1 focus-visible:outline focus-visible:outline-1 md:max-w-xs md:cursor-text md:border md:pl-3 md:pr-1.5"
className="text-subtle md:bg-neutral border-neutral hover:bg-hovered active:bg-pressed outline-link relative ml-auto flex h-8 w-full cursor-default items-center rounded-md px-3 text-base -outline-offset-1 md:max-w-xs md:cursor-text md:border md:pl-3 md:pr-1.5"
onClick={showSearch}
type="button"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function PricingPanel({
"outline-brand relative outline outline-4 before:absolute lg:mt-0",
])}
>
<h2 className="text-default mt-6 text-center text-3xl font-bold">
<h2 className="text-default mt-6 text-center text-3xl font-medium">
{name}
</h2>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/nextra-triplex/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export function Layout({ children, pageOpts }: NextraThemeLayoutProps) {
)}
</div>
)}
<h1 className="text-default flex flex-wrap items-center gap-2 text-3xl font-bold lg:text-4xl">
<h1 className="text-default font-brand flex flex-wrap items-center gap-2 text-3xl font-bold lg:text-4xl">
{title}
{frontMatter.app && (
<div
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/download.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DownloadList } from "../components/download-list";

<div className="flex items-center px-6 md:px-8 pt-16 pb-20 flex-col">

<h1 className="text-default mt-4 text-5xl font-medium">
<h1 className="text-default font-brand mt-4 text-5xl font-medium">
<span>Start building with Triplex.</span>
</h1>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/pricing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Pricing } from "../components/pricing";

<div className="flex items-center px-3 pt-16 pb-20 flex-col">

<h1 className="text-default mt-4 text-center text-5xl font-medium">
<h1 className="text-default font-brand mt-4 text-center text-5xl font-medium">
<span>Plans for individuals and teams.</span>
</h1>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/public/logos/mac.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/docs/public/logos/vscode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6cfdf86

Please sign in to comment.