Skip to content

Commit

Permalink
update uwu
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed May 2, 2024
1 parent d022133 commit fb63299
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 23 deletions.
16 changes: 12 additions & 4 deletions components/features/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ReactNode } from 'react'
import Link from 'next/link'
import cn from 'clsx'
import { motion } from 'framer-motion'
import { motion, type HTMLMotionProps, type MotionProps } from 'framer-motion'

import styles from './index.module.css'

Expand All @@ -14,7 +14,15 @@ export function Feature({
href,
index,
...props
}) {
}: {
large?: boolean
centered?: boolean
lightOnly?: boolean
children: ReactNode
className?: string
href?: string
index?: number
} & HTMLMotionProps<'div'>) {
return (
<motion.div
initial={{ opacity: 0 }}
Expand All @@ -26,7 +34,7 @@ export function Feature({
large && styles.large,
centered && styles.centered,
lightOnly && styles['light-only'],
className
className,
)}
{...props}
>
Expand All @@ -53,4 +61,4 @@ export function Feature({

export function Features({ children }: { children: ReactNode }) {
return <div className={styles.features}>{children}</div>
}
}
35 changes: 25 additions & 10 deletions pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: Mix Space - An Alternative Personal Space.
---

import Link from "next/link";
import cn from "clsx";
import { useState } from "react";
import Image from "next/image";
import { motion } from "framer-motion";
import { Features, Feature } from "@components/features";
import styles from "./index.module.css";
import docsCard from "../public/console.png";
import docsCardDark from "../public/console-dark.png";
import Link from 'next/link'
import cn from 'clsx'
import { useState } from 'react'
import Image from 'next/image'
import { motion } from 'framer-motion'
import { Features, Feature } from '@components/features'
import styles from './index.module.css'
import docsCard from '../public/console.png'
import docsCardDark from '../public/console-dark.png'

<div className="home-content">
<div className="content-container">
Expand All @@ -19,13 +19,28 @@ import docsCardDark from "../public/console-dark.png";
<p className="subtitle">
<Link className={styles.cta} href="/docs">5 分钟拥有自己的 Mix Space <span>→</span></Link>
</p>

<img
className="uwu"
src="https://cdn.jsdelivr.net/gh/mx-space/.github@main/uwu.png"
/>

</div>
<style jsx>{`
.uwu {
float: right;
height: 230px;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.content-container {
max-width: 90rem;
padding-left: max(env(safe-area-inset-left), 1.5rem);
padding-right: max(env(safe-area-inset-right), 1.5rem);
margin: 0 auto;
position: relative;
}
.features-container {
margin: 8rem 0 0;
Expand Down Expand Up @@ -288,7 +303,7 @@ import docsCardDark from "../public/console-dark.png";
</Feature>
<Feature index={3} large id="macros-card" href="//usage/macros">
<div style={{ zIndex: 2}}>
<h3>Markdown + 自定义语法, <br/>丰富您的内容。</h3>
<h3>Markdown + 自定义语法<br/>丰富您的内容。</h3>
<p>Mix Space 支持自定义 Markdown 内语法,您可以使用自定义语法来丰富您的内容。</p>
</div>
<div className="absolute w-full h-full inset-0 hidden sm:block bg-[linear-gradient(to_right,white_250px,_transparent)] dark:bg-[linear-gradient(to_right,#202020_250px,_transparent)] z-[1]"/>
Expand Down
6 changes: 0 additions & 6 deletions pages/usage/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ import { UilArrowCircleUp } from '@components/Icons/ArrowCircleUp'
href={'/usage/serverless'}
title="云函数"
/>
<Card
icon={<UilLifeRing />}
arrow
href={'/usage/bark'}
title="Bark 通知 (WIP)"
/>
<Card
icon={<UilSearchAlt />}
arrow
Expand Down
10 changes: 7 additions & 3 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import { DocsThemeConfig, useConfig } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
const logo = (
<span>
<img src="/logo.png" />
Mix Space
<img
height={40}
src="https://cdn.jsdelivr.net/gh/mx-space/.github@main/uwu.png"
/>
<span>Mix Space</span>

<style jsx>{`
span {
padding: 0.5rem 0.5rem 0.5rem 0;
Expand All @@ -23,7 +27,7 @@ const logo = (
}
img {
margin-right: 8px;
height: 24px;
height: 40px;
}
span:hover {
mask-position: 100%;
Expand Down

0 comments on commit fb63299

Please sign in to comment.