mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Add custom theme option
This commit is contained in:
47
README.md
47
README.md
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
It's all possible using [GitHub API](https://developer.github.com/v3/) (for automatically populating your website with content) and [Article-api](https://github.com/arifszn/article-api) (for fetching recent blog posts).
|
It's all possible using [GitHub API](https://developer.github.com/v3/) (for automatically populating your website with content) and [Article-api](https://github.com/arifszn/article-api) (for fetching recent blog posts).
|
||||||
|
|
||||||
✓ [21 Themes](#themes)\
|
✓ [30 Themes](#themes)\
|
||||||
✓ [Google Analytics](#google-analytics)\
|
✓ [Google Analytics](#google-analytics)\
|
||||||
✓ [Hotjar](#hotjar)\
|
✓ [Hotjar](#hotjar)\
|
||||||
✓ [Meta Tags](#meta-tags)\
|
✓ [Meta Tags](#meta-tags)\
|
||||||
@@ -180,7 +180,28 @@ const config = {
|
|||||||
'black',
|
'black',
|
||||||
'luxury',
|
'luxury',
|
||||||
'dracula',
|
'dracula',
|
||||||
|
'cmyk',
|
||||||
|
'autumn',
|
||||||
|
'business',
|
||||||
|
'acid',
|
||||||
|
'lemonade',
|
||||||
|
'night',
|
||||||
|
'coffee',
|
||||||
|
'winter',
|
||||||
|
'procyon',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Custom theme
|
||||||
|
customTheme: {
|
||||||
|
procyon: {
|
||||||
|
primary: '#fc055b',
|
||||||
|
secondary: '#219aaf',
|
||||||
|
accent: '#e8d03a',
|
||||||
|
neutral: '#2A2730',
|
||||||
|
'base-100': '#E3E3ED',
|
||||||
|
'--rounded-box': '3rem',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -189,7 +210,7 @@ const config = {
|
|||||||
|
|
||||||
### Themes
|
### Themes
|
||||||
|
|
||||||
There are 21 themes available that can be selected from the dropdown.
|
There are 30 themes available that can be selected from the dropdown.
|
||||||
|
|
||||||
The default theme can be specified.
|
The default theme can be specified.
|
||||||
|
|
||||||
@@ -204,6 +225,28 @@ module.exports = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can create your own custom theme by modifying these values:
|
||||||
|
|
||||||
|
```js
|
||||||
|
// gitprofile.config.js
|
||||||
|
module.exports = {
|
||||||
|
// ...
|
||||||
|
themeConfig: {
|
||||||
|
customTheme: {
|
||||||
|
procyon: {
|
||||||
|
primary: '#fc055b',
|
||||||
|
secondary: '#219aaf',
|
||||||
|
accent: '#e8d03a',
|
||||||
|
neutral: '#2A2730',
|
||||||
|
'base-100': '#E3E3ED',
|
||||||
|
'--rounded-box': '3rem',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// ...
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Here are some screenshots of different themes.\
|
Here are some screenshots of different themes.\
|
||||||
|
|||||||
@@ -132,7 +132,20 @@ const config = {
|
|||||||
'night',
|
'night',
|
||||||
'coffee',
|
'coffee',
|
||||||
'winter',
|
'winter',
|
||||||
|
'procyon',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Custom theme
|
||||||
|
customTheme: {
|
||||||
|
procyon: {
|
||||||
|
primary: '#fc055b',
|
||||||
|
secondary: '#219aaf',
|
||||||
|
accent: '#e8d03a',
|
||||||
|
neutral: '#2A2730',
|
||||||
|
'base-100': '#E3E3ED',
|
||||||
|
'--rounded-box': '3rem',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
module.exports = {
|
import tailwind from 'tailwindcss';
|
||||||
plugins: {
|
import autoprefixer from 'autoprefixer';
|
||||||
tailwindcss: {},
|
import tailwindConfig from './tailwind.config.js';
|
||||||
autoprefixer: {},
|
|
||||||
},
|
export default {
|
||||||
|
plugins: [tailwind(tailwindConfig), autoprefixer],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
module.exports = {
|
import config from './gitprofile.config';
|
||||||
|
|
||||||
|
export default {
|
||||||
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {},
|
||||||
@@ -6,5 +8,6 @@ module.exports = {
|
|||||||
plugins: [require('daisyui')],
|
plugins: [require('daisyui')],
|
||||||
daisyui: {
|
daisyui: {
|
||||||
logs: false,
|
logs: false,
|
||||||
|
themes: [...config.themeConfig.themes, config.themeConfig.customTheme],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
|
import postcss from './postcss.config.js';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -7,4 +8,7 @@ export default defineConfig({
|
|||||||
// If you are deploying to https://<USERNAME>.github.io/<REPO>/, for example your repository is at https://github.com/<USERNAME>/<REPO>, then set base to '/<REPO>/'.
|
// If you are deploying to https://<USERNAME>.github.io/<REPO>/, for example your repository is at https://github.com/<USERNAME>/<REPO>, then set base to '/<REPO>/'.
|
||||||
base: '/gitprofile/',
|
base: '/gitprofile/',
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
|
css: {
|
||||||
|
postcss,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user