Skip to content

Commit

Permalink
add font on tailwind.config.cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-josheghani committed Feb 29, 2024
1 parent 7e133a8 commit 548aa4e
Show file tree
Hide file tree
Showing 42 changed files with 1,239 additions and 91 deletions.
1,078 changes: 1,070 additions & 8 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"eslint": "^8.56.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"vite": "^5.1.4"
}
}
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Binary file added public/font/TTF/Kalameh-Black.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-Bold.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-ExtraBold.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-ExtraLight.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-Light.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-Medium.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-Regular.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-SemiBold.ttf
Binary file not shown.
Binary file added public/font/TTF/Kalameh-Thin.ttf
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-Black.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-Bold.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-ExtraBold.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-ExtraLight.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-Light.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-Medium.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-Regular.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-SemiBold.woff
Binary file not shown.
Binary file added public/font/_Woff/KalamehWeb-Thin.woff
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-Black.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-Bold.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-ExtraBold.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-ExtraLight.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-Light.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-Medium.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-Regular.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-SemiBold.woff2
Binary file not shown.
Binary file added public/font/_Woff2/KalamehWeb-Thin.woff2
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-Black.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-Bold.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-ExtraBold.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-ExtraLight.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-Light.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-Medium.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-Regular.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-SemiBold.eot
Binary file not shown.
Binary file added public/font/_eot/KalamehWeb-Thin.eot
Binary file not shown.
44 changes: 9 additions & 35 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,9 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'

function App() {
const [count, setCount] = useState(0)

return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
)
}

export default App
import React from 'react'

const App = () => {
return (
<div className='font-kalameh'>اپ شما</div>
)
}

export default App
172 changes: 124 additions & 48 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,68 +1,144 @@
@font-face {
font-family: 'kalameh';
src: url('./assets/font/*.eot') format('eot'),
url('./assets/font/*.woff') format('woff'),
url('./assets/font/*.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
--black-gradient: linear-gradient(
144.39deg,
#ffffff -278.56%,
#6d6d6d -78.47%,
#11101d 91.61%
);
--card-shadow: 0px 20px 100px -10px rgba(66, 71, 91, 0.1);
}

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
* {
scroll-behavior: smooth;
}

font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
.text-gradient {
background: radial-gradient(
64.18% 64.18% at 71.16% 35.69%,
#def9fa 0.89%,
#bef3f5 17.23%,
#9dedf0 42.04%,
#7de7eb 55.12%,
#5ce1e6 71.54%,
#33bbcf 100%
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-fill-color: transparent;
}

a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
.bg-blue-gradient {
background: linear-gradient(
157.81deg,
#def9fa -43.27%,
#bef3f5 -21.24%,
#9dedf0 12.19%,
#7de7eb 29.82%,
#5ce1e6 51.94%,
#33bbcf 90.29%
);
}
a:hover {
color: #535bf2;

.bg-black-gradient {
background: linear-gradient(
144.39deg,
#ffffff -278.56%,
#6d6d6d -78.47%,
#11101d 91.61%
);
}

body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
.bg-black-gradient-2 {
background: linear-gradient(
-168.39deg,
#ffffff -278.56%,
#6d6d6d -78.47%,
#11101d 91.61%
);
}

h1 {
font-size: 3.2em;
line-height: 1.1;
.bg-gray-gradient {
background: linear-gradient(
153.47deg,
rgba(255, 255, 255, 0) -341.94%,
#14101d 95.11%
);
}

button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
.bg-discount-gradient {
background: linear-gradient(125.17deg, #272727 0%, #11101d 100%);
}
button:hover {
border-color: #646cff;

.box-shadow {
box-shadow: 0px 20px 100px -10px rgba(66, 71, 91, 0.1);
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;

.sidebar {
-webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
@-webkit-keyframes slide-top {
0% {
-webkit-transform: translateY(100px);
transform: translateY(100px);
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
a:hover {
color: #747bff;
}

@keyframes slide-top {
0% {
-webkit-transform: translateY(100px);
transform: translateY(100px);
}
button {
background-color: #f9f9f9;
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}

.feature-card:hover {
background: var(--black-gradient);
box-shadow: var(--card-shadow);
}

.feedback-container .feedback-card:last-child {
margin-left: 0px;
}

.feedback-card {
background: transparent;
}

.feedback-card:hover {
background: var(--black-gradient);
}

.blue__gradient {
background: linear-gradient(180deg, rgba(188, 165, 255, 0) 0%, #214d76 100%);
filter: blur(123px);
}

.pink__gradient {
background: linear-gradient(90deg, #f4c4f3 0%, #fc67fa 100%);
filter: blur(900px);
}

.white__gradient {
background: rgba(255, 255, 255, 0.6);
filter: blur(750px);
}
27 changes: 27 additions & 0 deletions tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./index.html", "./src/**/*.{js,jsx}"],
mode: "jit",
theme: {
extend: {
colors: {
primary: "#00040f",
secondary: "#00f6ff",
dimWhite: "rgba(255, 255, 255, 0.7)",
dimBlue: "rgba(9, 151, 124, 0.1)",
},
fontFamily: {
kalameh: ['kalameh'],
},
},
screens: {
xs: "480px",
ss: "620px",
sm: "768px",
md: "1060px",
lg: "1200px",
xl: "1700px",
},
},
plugins: [],
};

0 comments on commit 548aa4e

Please sign in to comment.