-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,348 additions
and
931 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
{ | ||
"site": { | ||
"title": "Açık Kaynak İnisiyatifi", | ||
"base_url": "https://acik.io", | ||
"base_path": "/", | ||
"trailing_slash": false, | ||
"favicon": "/images/favicon.png", | ||
"logo": "/images/logo.png", | ||
"logo_darkmode": "/images/logo-darkmode.png", | ||
"logo_width": "200", | ||
"logo_height": "40", | ||
"logo_text": "açık kaynaklı" | ||
}, | ||
"site": { | ||
"title": "Açık Kaynak İnisiyatifi", | ||
"base_url": "https://acik.io", | ||
"base_path": "/", | ||
"trailing_slash": false, | ||
"favicon": "/images/favicon.png", | ||
"logo": "/images/logo.png", | ||
"logo_darkmode": "/images/logo-darkmode.png", | ||
"logo_width": "200", | ||
"logo_height": "40", | ||
"logo_text": "açık kaynaklı" | ||
}, | ||
|
||
"settings": { | ||
"sticky_header": true, | ||
"theme_switcher": true, | ||
"default_theme": "system", | ||
"pagination": 2, | ||
"summary_length": 200 | ||
}, | ||
"settings": { | ||
"sticky_header": true, | ||
"theme_switcher": true, | ||
"default_theme": "system", | ||
"pagination": 2, | ||
"summary_length": 200 | ||
}, | ||
|
||
"params": { | ||
"copyright": "© 2024 [Açık Kaynak İnisiyatifi](https://acik.io)" | ||
}, | ||
"params": { | ||
"copyright": "© 2024 [Açık Kaynak İnisiyatifi](https://acik.io)" | ||
}, | ||
|
||
"navigation_button": { | ||
"enable": false, | ||
"label": "GitHub", | ||
"link": "https://github.com/acikkaynak" | ||
}, | ||
"navigation_button": { | ||
"enable": false, | ||
"label": "GitHub", | ||
"link": "https://github.com/acikkaynak" | ||
}, | ||
|
||
"metadata": { | ||
"meta_author": "acik.io", | ||
"meta_image": "/images/logo.png", | ||
"meta_description": "Açık Kaynak İnisiyatifi" | ||
} | ||
"metadata": { | ||
"meta_author": "acik.io", | ||
"meta_image": "/images/logo.png", | ||
"meta_description": "Açık Kaynak İnisiyatifi" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"main": [ | ||
], | ||
"footer": [ | ||
] | ||
"main": [], | ||
"footer": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
{ | ||
"main": [ | ||
{ | ||
"name": "telegram", | ||
"icon": "FaTelegram", | ||
"link": "https://t.me/acikkaynak" | ||
}, | ||
{ | ||
"name": "github", | ||
"icon": "FaGithub", | ||
"link": "https://github.com/acikkaynak" | ||
}, | ||
{ | ||
"name": "twitter", | ||
"icon": "FaTwitter", | ||
"link": "https://twitter.com/acik_io" | ||
} | ||
] | ||
"main": [ | ||
{ | ||
"name": "github", | ||
"icon": "FaGithub", | ||
"link": "https://github.com/acikkaynak" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
{ | ||
"colors": { | ||
"default": { | ||
"theme_color": { | ||
"primary": "#152A35", | ||
"body": "#fff", | ||
"border": "#eaeaea", | ||
"theme_light": "#fafafa", | ||
"theme_dark": "" | ||
}, | ||
"text_color": { | ||
"default": "#464646", | ||
"dark": "#353535", | ||
"light": "#717171" | ||
} | ||
}, | ||
"darkmode": { | ||
"theme_color": { | ||
"primary": "#fff", | ||
"body": "#181c2c", | ||
"border": "#3E3E3E", | ||
"theme_light": "#141828", | ||
"theme_dark": "" | ||
}, | ||
"text_color": { | ||
"default": "#B4AFB6", | ||
"dark": "#fff", | ||
"light": "#B4AFB6" | ||
} | ||
} | ||
}, | ||
"fonts": { | ||
"font_family": { | ||
"primary": "Heebo:wght@400;600", | ||
"primary_type": "sans-serif", | ||
"secondary": "Signika:wght@500;700", | ||
"secondary_type": "sans-serif" | ||
}, | ||
"font_size": { | ||
"base": "18", | ||
"scale": "1.250" | ||
} | ||
} | ||
"colors": { | ||
"default": { | ||
"theme_color": { | ||
"primary": "#152A35", | ||
"body": "#fff", | ||
"border": "#eaeaea", | ||
"theme_light": "#fafafa", | ||
"theme_dark": "" | ||
}, | ||
"text_color": { | ||
"default": "#464646", | ||
"dark": "#353535", | ||
"light": "#717171" | ||
} | ||
}, | ||
"darkmode": { | ||
"theme_color": { | ||
"primary": "#fff", | ||
"body": "#181c2c", | ||
"border": "#3E3E3E", | ||
"theme_light": "#141828", | ||
"theme_dark": "" | ||
}, | ||
"text_color": { | ||
"default": "#B4AFB6", | ||
"dark": "#fff", | ||
"light": "#B4AFB6" | ||
} | ||
} | ||
}, | ||
"fonts": { | ||
"font_family": { | ||
"primary": "Heebo:wght@400;600", | ||
"primary_type": "sans-serif", | ||
"secondary": "Signika:wght@500;700", | ||
"secondary_type": "sans-serif" | ||
}, | ||
"font_size": { | ||
"base": "18", | ||
"scale": "1.250" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { useEffect, useState } from "react"; | ||
|
||
const useTheme = (): string => { | ||
const [themeValue, setThemeValue] = useState(""); | ||
const [themeValue, setThemeValue] = useState(""); | ||
|
||
useEffect(() => { | ||
setThemeValue( | ||
document.documentElement.classList.contains("dark") ? "dark" : "light", | ||
); | ||
}, []); | ||
useEffect(() => { | ||
setThemeValue( | ||
document.documentElement.classList.contains("dark") ? "dark" : "light", | ||
); | ||
}, []); | ||
|
||
return themeValue; | ||
return themeValue; | ||
}; | ||
|
||
export default useTheme; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
import React, { type FC } from "react"; | ||
import type { IconType } from "react-icons"; | ||
import * as FaIcons from "react-icons/fa6/index.js"; | ||
// import * as AiIcons from "react-icons/ai/index.js"; | ||
// import * as BsIcons from "react-icons/bs/index.js"; | ||
// import * as FiIcons from "react-icons/fi/index.js"; | ||
// import * as Io5Icons from "react-icons/io5/index.js"; | ||
// import * as RiIcons from "react-icons/ri/index.js"; | ||
// import * as TbIcons from "react-icons/tb/index.js"; | ||
// import * as TfiIcons from "react-icons/tfi/index.js"; | ||
import * as FaIcons from "react-icons/fa6"; | ||
// import * as AiIcons from "react-icons/ai"; | ||
// import * as BsIcons from "react-icons/bs"; | ||
// import * as FiIcons from "react-icons/fi"; | ||
// import * as Io5Icons from "react-icons/io5"; | ||
// import * as RiIcons from "react-icons/ri"; | ||
// import * as TbIcons from "react-icons/tb"; | ||
// import * as TfiIcons from "react-icons/tfi"; | ||
|
||
type IconMap = Record<string, IconType>; | ||
|
||
interface IDynamicIcon extends React.SVGProps<SVGSVGElement> { | ||
icon: string; | ||
className?: string; | ||
icon: string; | ||
className?: string; | ||
} | ||
|
||
const iconLibraries: { [key: string]: IconMap } = { | ||
fa: FaIcons, | ||
fa: FaIcons, | ||
}; | ||
|
||
const DynamicIcon: FC<IDynamicIcon> = ({ icon, ...props }) => { | ||
const IconLibrary = getIconLibrary(icon); | ||
const Icon = IconLibrary ? IconLibrary[icon] : undefined; | ||
const IconLibrary = getIconLibrary(icon); | ||
const Icon = IconLibrary ? IconLibrary[icon] : undefined; | ||
|
||
if (!Icon) { | ||
return <span className="text-sm">Icon not found</span>; | ||
} | ||
if (!Icon) { | ||
return <span className="text-sm">Icon not found</span>; | ||
} | ||
|
||
return <Icon {...props} />; | ||
return <Icon {...props} />; | ||
}; | ||
|
||
const getIconLibrary = (icon: string): IconMap | undefined => { | ||
const libraryKey = icon.substring(0, 2).toLowerCase(); | ||
const libraryKey = icon.substring(0, 2).toLowerCase(); | ||
|
||
return iconLibraries[libraryKey]; | ||
return iconLibraries[libraryKey]; | ||
}; | ||
|
||
export default DynamicIcon; |
Oops, something went wrong.