Skip to content

Commit

Permalink
Merge pull request #2 from Matdweb/chore/create-global-styles
Browse files Browse the repository at this point in the history
style: create global styles
  • Loading branch information
Matdweb authored Oct 20, 2023
2 parents 13be000 + ccb3c98 commit f219466
Show file tree
Hide file tree
Showing 9 changed files with 7,494 additions and 122 deletions.
7,354 changes: 7,354 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@
"lint": "next lint"
},
"dependencies": {
"@next/font": "^13.5.5",
"next": "13.5.5",
"react": "^18",
"react-dom": "^18",
"next": "13.5.5"
"react-dom": "^18"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.5",
"postcss": "^8",
"tailwindcss": "^3",
"eslint": "^8",
"eslint-config-next": "13.5.5"
"typescript": "^5"
}
}
83 changes: 75 additions & 8 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
--background-end-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
}

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
Expand All @@ -25,3 +17,78 @@ body {
)
rgb(var(--background-start-rgb));
}

h1,h2,h3,p {
@apply text-black;
line-height: normal;
font-style: normal;
}

.font-big-title {
font-family: var(--font-roboto);
font-size: 5rem;
font-weight: 900;
}

.font-primary-title-roboto {
font-family: var(--font-roboto);
font-size: 2.5rem;
font-weight: 900;
}

.font-primary-title-bold {
font-family: var(--font-segoe-ui);
font-size: 1.5rem;
font-weight: 700;
}

.font-primary-text {
font-family: var(--font-segoe-ui);
font-size: 1.2rem;
font-weight: 600;
}

p, .font-secondary-text {
font-family: var(--font-segoe-ui);
font-size: 1rem;
font-weight: 400;
}

.font-gray-text {
opacity: .6;
}

.btn-primary {
@apply bg-primary-blue font-primary-title-bold rounded-full;
transition: transform .8s;
}

.btn-primary:hover {
opacity: .8;
}

.btn-primary:active {
transform: scale(.8);
}

.btn-secondary {
@apply btn-primary;
background-color: black;
}

.btn-edit {
@apply btn-primary text-black outline outline-2 outline-black;
background-color: white;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}

h1,h2,h3,p {
@apply text-white;
}
}
32 changes: 29 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import { Roboto } from 'next/font/google'
import localFont from '@next/font/local'
import './globals.css'

const inter = Inter({ subsets: ['latin'] })
const roboto = Roboto({
subsets: ['latin'],
weight: '900',
variable: '--font-roboto'
});

const Segoe_UI = localFont({
src: [
{
path: '../fonts/Segoe_UI/Segoe_UI.ttf',
weight: '400',
style: 'normal',
},
{
path: '../fonts/Segoe_UI/Segoe_UI_Italic.ttf',
weight: '400',
style: 'italic',
},
{
path: '../fonts/Segoe_UI/Segoe_UI_Bold.ttf',
weight: '600',
style: 'normal',
},
],
variable: '--font-segoe-ui',
});

export const metadata: Metadata = {
title: 'Create Next App',
Expand All @@ -16,7 +42,7 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={`${roboto.variable} ${Segoe_UI.variable}`}>{children}</body>
</html>
)
}
123 changes: 17 additions & 106 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,112 +2,23 @@ import Image from 'next/image'

export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">src/app/page.tsx</code>
<>
<section className='p-16'>
<h1 className='font-big-title'>font-big-title</h1>
<h2 className='font-primary-title-roboto'>font-primary-title-roboto</h2>
<h3 className='font-primary-title-bold'>font-primary-title-bold: Bobur</h3>
<p className='font-gray-text'>@bobur_mavlonov</p>
<p className='font-primary-text'>font-primary-text: Home</p>
<p>secondary text:
<br />
4-kursni tugatgunimcha kamida bitta biznesim bo'lishini, uylanish uchun moddiy jihatdan to'la-to'kis tayyor bo'lishni, sog'lik va jismoniy holatni normallashtirishni reja qildim
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{' '}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
</div>
</div>

<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>

<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>

<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>

<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore the Next.js 13 playground.
</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
</main>
</section>
<section className='p-16 pt-4 bg-white'>
<button className='btn-primary w-40 m-4 ml-0 p-4'>Tweet</button>
<button className='btn-secondary w-40 m-4 ml-0 p-4'>Follow</button>
<button className='btn-edit w-40 m-4 ml-0 p-4'>Edit profile</button>
</section>
</>
)
}
Binary file added src/fonts/Segoe_UI/Segoe_UI.ttf
Binary file not shown.
Binary file added src/fonts/Segoe_UI/Segoe_UI_Bold.ttf
Binary file not shown.
Binary file added src/fonts/Segoe_UI/Segoe_UI_Italic.ttf
Binary file not shown.
13 changes: 13 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Config } from 'tailwindcss'

const config: Config = {
darkMode: 'class',
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
Expand All @@ -13,6 +14,18 @@ const config: Config = {
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
},
fontFamily: {
roboto: ['var(--font-roboto)'],
segoe_ui: ['var(--font-segoe-ui)'],
},
colors: {
primary :{
blue: '#1D9BF0',
gray: '#E7ECF0'
},
'black': '#000',
'white': '#FFF'
}
},
},
plugins: [],
Expand Down

0 comments on commit f219466

Please sign in to comment.