mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-26 13:48:17 +00:00
Compare commits
216 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
194503f386 | ||
|
|
57933cceb8 | ||
|
|
1baf8bd460 | ||
|
|
4edb171236 | ||
|
|
9d8a5ab51b | ||
|
|
cdb3542844 | ||
|
|
a8abc23735 | ||
|
|
fe6974d58e | ||
|
|
939ecb6112 | ||
|
|
8498ad8ada | ||
|
|
b52c9b80a4 | ||
|
|
5ca5cff5d2 | ||
|
|
c06a0929be | ||
|
|
18afaccd24 | ||
|
|
89e5c29d80 | ||
|
|
20cc39d7ce | ||
|
|
e4f06638f9 | ||
|
|
7349310873 | ||
|
|
dc3724eb2c | ||
|
|
b69f052c54 | ||
|
|
c9b2c46495 | ||
|
|
ab035d13e5 | ||
|
|
17ff018f87 | ||
|
|
17abae3915 | ||
|
|
b3ab995397 | ||
|
|
5d3eacb694 | ||
|
|
6f1c0db559 | ||
|
|
1c320a4e82 | ||
|
|
de44eb7a48 | ||
|
|
af9b0ea531 | ||
|
|
c64cd57a95 | ||
|
|
76de845b46 | ||
|
|
c03487cb5b | ||
|
|
f30a588abc | ||
|
|
569e73859d | ||
|
|
caf2d55af8 | ||
|
|
36d8c0ac01 | ||
|
|
b23e4956e6 | ||
|
|
6e0dac1050 | ||
|
|
98678e7a1c | ||
|
|
ffa7f99109 | ||
|
|
c81123c804 | ||
|
|
b13209b956 | ||
|
|
afa89fca4f | ||
|
|
f013b314ff | ||
|
|
fc10df86bf | ||
|
|
84a109a31f | ||
|
|
486faffb0b | ||
|
|
110286622d | ||
|
|
5fceae602d | ||
|
|
e42f4a7b08 | ||
|
|
6927c5d425 | ||
|
|
c9fce00077 | ||
|
|
4430d982f4 | ||
|
|
39a97afb22 | ||
|
|
6b638f03ea | ||
|
|
3e0af6dad2 | ||
|
|
83a254e687 | ||
|
|
b42202d923 | ||
|
|
e6f678eacd | ||
|
|
b6bccf904e | ||
|
|
a7d7195487 | ||
|
|
a60fac9a95 | ||
|
|
a603e4236d | ||
|
|
1dec29a718 | ||
|
|
3f1b0ba513 | ||
|
|
0a0cd6bae1 | ||
|
|
9605a47a2a | ||
|
|
29a75d06cd | ||
|
|
e20a1d7321 | ||
|
|
38bc0d0025 | ||
|
|
0d44af1148 | ||
|
|
75e148e897 | ||
|
|
62062ae956 | ||
|
|
97cdde0abd | ||
|
|
f1b3fbda47 | ||
|
|
9c0bcdd973 | ||
|
|
2cac4c5994 | ||
|
|
27beccb1ee | ||
|
|
05a807387f | ||
|
|
cccd7afce4 | ||
|
|
020129b523 | ||
|
|
e0c242b523 | ||
|
|
05416767f8 | ||
|
|
12b6091d34 | ||
|
|
c2167f870a | ||
|
|
fb7ffe269e | ||
|
|
de448dcc3f | ||
|
|
b803ef88d0 | ||
|
|
d8450294ff | ||
|
|
d7c1b574a3 | ||
|
|
88bed3b701 | ||
|
|
d2d8d6fe43 | ||
|
|
2e0603d52b | ||
|
|
e725ef9b5c | ||
|
|
5dc71954a4 | ||
|
|
f25f5bf2d5 | ||
|
|
c375ec521f | ||
|
|
67c881eb05 | ||
|
|
21eaa93a72 | ||
|
|
69d636e3bb | ||
|
|
81ec352c4a | ||
|
|
8752d18408 | ||
|
|
2e6c69cdbc | ||
|
|
3d170a9a31 | ||
|
|
feba26f3aa | ||
|
|
a14318f776 | ||
|
|
247445b63c | ||
|
|
5628f76449 | ||
|
|
742df933a7 | ||
|
|
e11be358f9 | ||
|
|
771f1fe0d4 | ||
|
|
5b448adc76 | ||
|
|
ea424fe9e4 | ||
|
|
50ed6b90ba | ||
|
|
b96298e702 | ||
|
|
c23cbc6c8e | ||
|
|
1ec9274f4d | ||
|
|
f97d1544d5 | ||
|
|
970044b7f1 | ||
|
|
a65bbf2937 | ||
|
|
ebdc7d533d | ||
|
|
5fe64aecb3 | ||
|
|
ec3cdf4f68 | ||
|
|
80ff09b295 | ||
|
|
ca57b1bfa2 | ||
|
|
4abc13ad71 | ||
|
|
96cc63e911 | ||
|
|
145985fb54 | ||
|
|
023422d318 | ||
|
|
73da16ed19 | ||
|
|
09a0eebb16 | ||
|
|
2c1219bcda | ||
|
|
57b6a90fab | ||
|
|
fb3852b3c7 | ||
|
|
49509840aa | ||
|
|
3385e4f260 | ||
|
|
e967b89ca1 | ||
|
|
b2106dd441 | ||
|
|
9bf3d3b245 | ||
|
|
e1a1d1a0bf | ||
|
|
73f38a3f0e | ||
|
|
f36ab50a30 | ||
|
|
cd557c0e52 | ||
|
|
1713b6d82b | ||
|
|
92a49a6302 | ||
|
|
7f9d0d9514 | ||
|
|
692c8ba8c7 | ||
|
|
ac7356a222 | ||
|
|
fe5fec779e | ||
|
|
eb4d65b44a | ||
|
|
b6c7a2ede0 | ||
|
|
91d4e799a4 | ||
|
|
e724ca8aca | ||
|
|
d87f8986ee | ||
|
|
0f9ceb0d98 | ||
|
|
b2429b359d | ||
|
|
cacd093f6f | ||
|
|
afc303a889 | ||
|
|
4be3b67118 | ||
|
|
143a16c410 | ||
|
|
dc8f1d68a9 | ||
|
|
68d04646b3 | ||
|
|
03e267fe99 | ||
|
|
1cc331be52 | ||
|
|
fee3cebf54 | ||
|
|
903af97cfe | ||
|
|
b7c8b21999 | ||
|
|
6fce517b0b | ||
|
|
dbdabc7b4a | ||
|
|
66bd370f34 | ||
|
|
caff2ce258 | ||
|
|
a4ad42f40d | ||
|
|
4edef5df4b | ||
|
|
9cab9f209b | ||
|
|
f4a1fff90f | ||
|
|
ac00471cdc | ||
|
|
d97c758629 | ||
|
|
098e5cdd1e | ||
|
|
8d4d8b219e | ||
|
|
0805080cce | ||
|
|
2c60ff1ec9 | ||
|
|
f115c763a2 | ||
|
|
e5aa0d516e | ||
|
|
1ae972acd3 | ||
|
|
ded02858a8 | ||
|
|
fb7b64c4e8 | ||
|
|
8901157e01 | ||
|
|
6944b2ca4d | ||
|
|
a8a56d67e4 | ||
|
|
04e14af71a | ||
|
|
a4b296172e | ||
|
|
e16f50b349 | ||
|
|
0c2b93ff85 | ||
|
|
fb55338ea9 | ||
|
|
c279dc9ac5 | ||
|
|
6ef1a5fe9b | ||
|
|
eccb38a29c | ||
|
|
107ffae90d | ||
|
|
56b5906e01 | ||
|
|
ed6396c2c2 | ||
|
|
f41fc775a9 | ||
|
|
5e3fa7075a | ||
|
|
21634afb62 | ||
|
|
5fcb803436 | ||
|
|
305044a8fc | ||
|
|
dc80a9db9e | ||
|
|
e8d0d8eb28 | ||
|
|
efbd5f96fe | ||
|
|
630d9711ec | ||
|
|
647195f224 | ||
|
|
be09c170b9 | ||
|
|
6020ecf818 | ||
|
|
7cd1bd87fd | ||
|
|
0d6eef906f | ||
|
|
6b3d089b4b |
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: 'npm'
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
44
.github/workflows/deploy.yml
vendored
44
.github/workflows/deploy.yml
vendored
@@ -1,14 +1,22 @@
|
|||||||
name: Deploy to gh-pages Branch
|
name: Deploy to GitHub Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -18,9 +26,13 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Setup Pages
|
||||||
uses: actions/cache@v2
|
uses: actions/configure-pages@v2
|
||||||
|
|
||||||
|
- name: Restore cache
|
||||||
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
**/node_modules
|
**/node_modules
|
||||||
@@ -29,13 +41,21 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build
|
- name: Build with vite
|
||||||
run: npm run build
|
run: npm run build
|
||||||
env:
|
|
||||||
CI: ''
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Upload artifact
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
uses: actions/upload-pages-artifact@v1
|
||||||
with:
|
with:
|
||||||
branch: gh-pages
|
path: ./dist
|
||||||
folder: dist
|
|
||||||
|
deploy:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v1
|
||||||
|
|||||||
5
.github/workflows/test-deploy.yml
vendored
5
.github/workflows/test-deploy.yml
vendored
@@ -15,9 +15,10 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Restore cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
**/node_modules
|
**/node_modules
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ CONTRIBUTING.md
|
|||||||
gitprofile.config.js
|
gitprofile.config.js
|
||||||
index.html
|
index.html
|
||||||
library.config.js
|
library.config.js
|
||||||
tailwind.config.js
|
tailwind.config.mjs
|
||||||
vite.config.js
|
vite.config.js
|
||||||
stats.html
|
stats.html
|
||||||
|
|||||||
@@ -4,5 +4,6 @@
|
|||||||
"bracketSpacing": true,
|
"bracketSpacing": true,
|
||||||
"printWidth": 80,
|
"printWidth": 80,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"tabWidth": 2
|
"tabWidth": 2,
|
||||||
|
"endOfLine": "auto"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,31 +14,36 @@ with a fix.
|
|||||||
|
|
||||||
## Submitting a Pull Request
|
## Submitting a Pull Request
|
||||||
|
|
||||||
- If applicable, update the `readme`
|
1. Make sure that the contribution you want to make is explained or detailed in a GitHub issue! Find an [existing issue](https://github.com/arifszn/gitprofile/issues) or [open a new one](https://github.com/arifszn/gitprofile/issues/new).
|
||||||
- Use `npm run lint` and `npm run prettier` before committing
|
2. Once done, [fork the repository](https://github.com/arifszn/gitprofile/fork) in your own GitHub account.
|
||||||
- Example for a commit message
|
3. [Create a new Git branch](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository).
|
||||||
|
4. Make the changes on your branch.
|
||||||
|
5. [Submit the branch as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch of the main repository. <br>
|
||||||
|
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**.
|
||||||
|
|
||||||
```
|
## Development Workflow
|
||||||
Fix type validation for typescript
|
|
||||||
```
|
|
||||||
|
|
||||||
### Developing
|
### Install dependencies
|
||||||
|
|
||||||
Fork, then clone the repo:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/your-username/gitprofile.git
|
|
||||||
cd gitprofile
|
|
||||||
```
|
|
||||||
|
|
||||||
Install dependencies:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
Run dev server:
|
### Run dev server
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Linter
|
||||||
|
|
||||||
|
Each PR should pass the linter to be accepted. To fix lint and prettier errors, run `npm run lint:fix` and `npm run prettier:fix`.
|
||||||
|
|
||||||
|
### Commit Message
|
||||||
|
|
||||||
|
As minimal requirements, your commit message should:
|
||||||
|
|
||||||
|
- be capitalized
|
||||||
|
- not finish by a dot or any other punctuation character (!,?)
|
||||||
|
- start with a verb so that we can read your commit message this way: "This commit will ...", where "..." is the commit message.
|
||||||
|
e.g.: "Fix the home page button" or "Add support for dark mode"
|
||||||
|
|||||||
214
LICENSE
214
LICENSE
@@ -1,201 +1,21 @@
|
|||||||
Apache License
|
MIT License
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
Copyright (c) 2022 Ariful Alam
|
||||||
|
|
||||||
1. Definitions.
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
The above copyright notice and this permission notice shall be included in all
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
the copyright owner that is granting the License.
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
other entities that control, are controlled by, or are under common
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
control with that entity. For the purposes of this definition,
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
SOFTWARE.
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright 2022 Ariful Alam
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|||||||
221
README.md
221
README.md
@@ -1,29 +1,61 @@
|
|||||||
<h1 align="center">GitProfile</h1>
|
<br/>
|
||||||
<p align="center">Easy to use automatic portfolio builder for every GitHub user!</p>
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/arifszn/gitprofile/blob/main/CONTRIBUTING.md">
|
<img src="https://user-images.githubusercontent.com/45073703/177566625-9b84e793-4559-4475-ba54-8d3d5f4123d4.png" width="35%">
|
||||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"/>
|
|
||||||
</a>
|
<h4 align="center">Easy to use automatic portfolio builder for every GitHub user!</h4>
|
||||||
<a href="https://github.com/arifszn/gitprofile/blob/main/LICENSE">
|
|
||||||
<img src="https://img.shields.io/github/license/arifszn/gitprofile"/>
|
<p align="center">
|
||||||
</a>
|
<a href="https://codeclimate.com/github/arifszn/gitprofile/maintainability">
|
||||||
<a href="https://twitter.com/intent/tweet?text=Check%20out%20the%20portfolio%20builder.%20Create%20an%20automatic%20portfolio%20based%20on%20GitHub%20profile.&url=https://github.com/arifszn/gitprofile&hashtags=javascript,opensource,js,webdev,developers">
|
<img src="https://api.codeclimate.com/v1/badges/c60f42d7d0b61bd33e98/maintainability" />
|
||||||
<img src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Farifszn%2Fgitprofile"/>
|
</a>
|
||||||
</a>
|
<a href="https://github.com/arifszn/gitprofile/actions/workflows/test-deploy.yml">
|
||||||
|
<img src="https://github.com/arifszn/gitprofile/actions/workflows/test-deploy.yml/badge.svg" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/issues">
|
||||||
|
<img src="https://img.shields.io/github/issues/arifszn/gitprofile"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/stargazers">
|
||||||
|
<img src="https://img.shields.io/github/stars/arifszn/gitprofile"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/network/members">
|
||||||
|
<img src="https://img.shields.io/github/forks/arifszn/gitprofile"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/blob/main/package-lock.json">
|
||||||
|
<img src="https://img.shields.io/snyk/vulnerabilities/github/arifszn/gitprofile"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/blob/main/CONTRIBUTING.md">
|
||||||
|
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/blob/main/LICENSE">
|
||||||
|
<img src="https://img.shields.io/github/license/arifszn/gitprofile"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://www.buymeacoffee.com/arifszn">
|
||||||
|
<img src="https://img.shields.io/badge/sponsor-buy%20me%20a%20coffee-yellow?logo=buymeacoffee"/>
|
||||||
|
</a>
|
||||||
|
<a href="https://twitter.com/intent/tweet?text=Check%20out%20the%20portfolio%20builder.%20Create%20an%20automatic%20portfolio%20based%20on%20GitHub%20profile.&url=https://github.com/arifszn/gitprofile&hashtags=javascript,opensource,js,webdev,developers">
|
||||||
|
<img src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Farifszn%2Fgitprofile"/>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://arifszn.github.io/gitprofile">View Demo</a>
|
||||||
|
·
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/issues">Report Bug</a>
|
||||||
|
·
|
||||||
|
<a href="https://github.com/arifszn/gitprofile/discussions">Request Feature</a>
|
||||||
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://arifszn.github.io/gitprofile">
|
<a href="https://arifszn.github.io/gitprofile">
|
||||||
<img src="https://arifszn.github.io/assets/img/hosted/gitprofile/preview.gif" width="60%" alt="Preview"/>
|
<img src="https://arifszn.github.io/assets/img/hosted/gitprofile/preview.gif" alt="Preview" width="60%"/>
|
||||||
</a>
|
</a>
|
||||||
<br/>
|
<br/>
|
||||||
<a href="#arifszn"><img src="https://arifszn.github.io/assets/img/drop-shadow.png" width="60%" alt="Shadow"/></a>
|
<a href="#arifszn"><img src="https://arifszn.github.io/assets/img/drop-shadow.png" width="50%" alt="Shadow"/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
What if you could create your portfolio in 5 minutes just by providing your GitHub username and even host it without any cost? Do you want to display your skills, job history, education, or blog posts on your portfolio? Introducing **GitProfile**.
|
**GitProfile** is an easy to use portfolio builder where you can create a portfolio page automatically by just providing your GitHub username. It is built using React.js on top of Vite. But it's not necessary to have knowledge on these to get you started. You can make your own copy with zero coding experience.
|
||||||
|
|
||||||
**GitProfile** is an easy to use portfolio builder where you can create a portfolio page automatically by just providing your GitHub username. It is built using React.js on top of Vite.js. But it's not necessary to have knowledge on these to get you started. You can make your own copy with zero coding experience.
|
|
||||||
|
|
||||||
**Features:**
|
**Features:**
|
||||||
|
|
||||||
@@ -34,38 +66,53 @@ What if you could create your portfolio in 5 minutes just by providing your GitH
|
|||||||
✓ [SEO](#seo)
|
✓ [SEO](#seo)
|
||||||
✓ [Avatar and Bio](#avatar-and-bio)
|
✓ [Avatar and Bio](#avatar-and-bio)
|
||||||
✓ [Social Links](#social-links)
|
✓ [Social Links](#social-links)
|
||||||
✓ [Skills](#skills)
|
✓ [Skill Section](#skills)
|
||||||
✓ [Experience](#experience)
|
✓ [Experience Section](#experience)
|
||||||
✓ [Education](#education)
|
✓ [Education Section](#education)
|
||||||
✓ [Projects](#projects)
|
✓ [Projects Section](#projects)
|
||||||
✓ [Blog Posts](#blog-posts)
|
✓ [Blog Posts Section](#blog-posts)
|
||||||
|
|
||||||
To view a live example, **[click here](https://arifszn.github.io/gitprofile)**.
|
To view a live example, **[click here](https://arifszn.github.io/gitprofile)**.
|
||||||
|
|
||||||
Or try it **[online](https://stackblitz.com/edit/gitprofile)**.
|
Or try it **[online](https://stackblitz.com/edit/gitprofile)**.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://arifszn.github.io/assets/img/hosted/gitprofile/themes.png" alt="Themes">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## 🎉 Thank you for the 400 ★
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="https://arifszn.github.io/gitprofile">
|
||||||
|
<img src="https://user-images.githubusercontent.com/45073703/189209364-fc4df315-b66a-4654-907d-b0b7a9d2161e.gif" alt="Thank You" width="60%"/>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
## 🛠 Installation & Setup
|
## 🛠 Installation & Setup
|
||||||
|
|
||||||
There are two ways to use **GitProfile**. Use either one.
|
There are three ways to use **GitProfile**. Use any.
|
||||||
|
|
||||||
<details>
|
- Forking this repo _(recommended)_
|
||||||
<summary>Forking this repo (Click to expand)</summary>
|
- Setting up locally
|
||||||
|
- Installing as package
|
||||||
|
|
||||||
<br/>
|
### Forking this repo
|
||||||
|
|
||||||
These instructions will get you a copy of the project and deploy your portfolio online!
|
These instructions will get you a copy of the project and deploy your portfolio online!
|
||||||
|
|
||||||
- **Fork repo:** Click [here](https://github.com/arifszn/gitprofile/fork) to fork the repo so you have your own project to customize. A "fork" is a copy of a repository.
|
- **Fork repo:** Click [here](https://github.com/arifszn/gitprofile/fork) to fork the repo so you have your own project to customize. A "fork" is a copy of a repository.
|
||||||
- **Rename repo:** Rename your forked repository to `username.github.io` in GitHub, where `username` is your GitHub username (or organization name).
|
- **Rename repo:**
|
||||||
- **Enable workflows:** Go to your repo's **Actions** page and enable workflows.
|
- If you want to host your portfolio at `https://<USERNAME>.github.io`, rename your forked repository to `username.github.io` in GitHub, where `username` is your GitHub username (or organization name).
|
||||||
|
- If you want to host your portfolio at `https://<USERNAME>.github.io/<REPO>` (e.g. `https://<USERNAME>.github.io/portfolio`), rename your forked repository to `<REPO>` (e.g. `portfolio`) in GitHub.
|
||||||
|
- **Enable workflows:** Go to your repo's **Actions** tab and enable workflows.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Base Value:** Open `vite.config.js`, and change `base`'s value.
|
- **Base Value:** Open `vite.config.js`, and change `base`'s value.
|
||||||
|
|
||||||
- If you are deploying to `https://<USERNAME>.github.io/`, set `base` to `'/'`.
|
- If you are deploying to `https://<USERNAME>.github.io`, set `base` to `'/'`.
|
||||||
|
|
||||||
- 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>` (e.g. `https://<USERNAME>.github.io/portfolio`), then set `base` to `'/<REPO>/'` (e.g. `'/portfolio/'`).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// vite.config.js
|
// vite.config.js
|
||||||
@@ -75,25 +122,40 @@ These instructions will get you a copy of the project and deploy your portfolio
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- **First Commit:** Now commit to your **main** branch with your changes. The CI/CD pipeline will publish your page at the `gh-pages` branch automatically.
|
- **Commit the changes:** Now commit to your **main** branch with your changes. Wait a few minutes so that the CI/CD pipeline can publish your website to GitHub Pages. You can check the progress in the [Actions](https://github.com/arifszn/gitprofile/actions) tab.
|
||||||
- **Change deploy branch:** Go to your repo's **Settings** ➜ **Pages** ➜ **Source** and change the branch to `gh-pages` and click **save**.
|
|
||||||
|
|
||||||
Your personal portfolio will be live at `username.github.io`. Any time you commit a change to the **main** branch, the website will be automatically updated.
|
Your portfolio website will be live shortly. Any time you commit a change to the **main** branch, the website will be automatically updated. If you face any issue viewing the website, double-check the `base` value in the `vite.config.js` file. Also, check if **Source** is set to **GitHub Actions** in **Settings** ➜ **Pages** ➜ **Build and deployment**.
|
||||||
|
|
||||||
If you see only `README` at `username.github.io`, be sure to change your GitHub Page's source to `gh-pages` branch. See [how to](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site). Also, if you face any issue rendering the website, double-check the `base` value in the `vite.config.js`.
|
If you wish to add a custom domain, no CNAME file is required. Just add it to your repo's **Settings** ➜ **Pages** ➜ **Custom domain**.
|
||||||
|
|
||||||
As this is a vite project, you can also host your website to Netlify, Vercel, Heroku, or other popular services. Please refer to this [doc](https://vitejs.dev/guide/static-deploy.html) for a detailed deployment guide to other services.
|
As this is a Vite project, you can also host your website to Netlify, Vercel, Heroku, or other popular services. Please refer to this [doc](https://vitejs.dev/guide/static-deploy.html) for a detailed deployment guide to other services.
|
||||||
|
|
||||||
</details>
|
### Setting up locally
|
||||||
|
|
||||||
Or
|
- Clone the project and change directory.
|
||||||
|
|
||||||
<details>
|
```shell
|
||||||
<summary>Installing as package (Click to expand)</summary>
|
git clone https://github.com/arifszn/gitprofile.git
|
||||||
|
cd gitprofile
|
||||||
|
```
|
||||||
|
|
||||||
<br/>
|
- Install dependencies.
|
||||||
|
|
||||||
First Install **GitProfile** via <a href="https://www.npmjs.com/package/@arifszn/gitprofile">NPM</a>.
|
```shell
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
- Run dev server.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
- Finally, visit [`http://localhost:5173/gitprofile/`](http://localhost:5173/gitprofile/) from your browser.
|
||||||
|
|
||||||
|
### Installing as package
|
||||||
|
|
||||||
|
You can also use **GitProfile** by installing as an NPM package. First Install **GitProfile** via <a href="https://www.npmjs.com/package/@arifszn/gitprofile">NPM</a>.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install @arifszn/gitprofile
|
npm install @arifszn/gitprofile
|
||||||
@@ -128,8 +190,6 @@ export default App;
|
|||||||
|
|
||||||
List of all config [here](#-customization).
|
List of all config [here](#-customization).
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
**If you face any problems or have any questions, open an issue [here](https://github.com/arifszn/gitprofile/issues).**
|
**If you face any problems or have any questions, open an issue [here](https://github.com/arifszn/gitprofile/issues).**
|
||||||
|
|
||||||
## 🎨 Customization
|
## 🎨 Customization
|
||||||
@@ -153,39 +213,46 @@ const config = {
|
|||||||
linkedin: '',
|
linkedin: '',
|
||||||
twitter: '',
|
twitter: '',
|
||||||
facebook: '',
|
facebook: '',
|
||||||
|
instagram: '',
|
||||||
dribbble: '',
|
dribbble: '',
|
||||||
behance: '',
|
behance: '',
|
||||||
medium: '',
|
medium: '',
|
||||||
dev: '',
|
dev: '',
|
||||||
|
stackoverflow: '',
|
||||||
website: '',
|
website: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
email: '',
|
email: '',
|
||||||
},
|
},
|
||||||
|
resume: {
|
||||||
|
fileUrl: '', // Empty fileUrl will hide the `Download Resume` button.
|
||||||
|
},
|
||||||
skills: ['JavaScript', 'React.js'],
|
skills: ['JavaScript', 'React.js'],
|
||||||
experiences: [
|
experiences: [
|
||||||
{
|
{
|
||||||
company: 'Company name 1',
|
company: 'Company Name',
|
||||||
position: 'Software Engineer',
|
position: 'Position',
|
||||||
from: 'July 2019',
|
from: 'September 2021',
|
||||||
to: 'Present',
|
to: 'Present',
|
||||||
|
companyLink: 'https://example.com',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
company: 'Company name 2',
|
company: 'Company Name',
|
||||||
position: 'Jr. Software Engineer',
|
position: 'Position',
|
||||||
from: 'January 2019',
|
from: 'July 2019',
|
||||||
to: ' June 2019',
|
to: 'August 2021',
|
||||||
|
companyLink: 'https://example.com',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
education: [
|
education: [
|
||||||
{
|
{
|
||||||
institution: 'Institution name 1',
|
institution: 'Institution Name',
|
||||||
degree: 'ABC',
|
degree: 'Degree',
|
||||||
from: '2015',
|
from: '2015',
|
||||||
to: '2019',
|
to: '2019',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
institution: 'Institution name 2',
|
institution: 'Institution Name',
|
||||||
degree: 'XYZ',
|
degree: 'Degree',
|
||||||
from: '2012',
|
from: '2012',
|
||||||
to: '2014',
|
to: '2014',
|
||||||
},
|
},
|
||||||
@@ -193,13 +260,13 @@ const config = {
|
|||||||
// Display blog posts from your medium or dev account. (Optional)
|
// Display blog posts from your medium or dev account. (Optional)
|
||||||
blog: {
|
blog: {
|
||||||
source: 'dev', // medium | dev
|
source: 'dev', // medium | dev
|
||||||
username: 'arifszn',
|
username: 'arifszn', // to hide blog section, keep it empty
|
||||||
limit: 5, // How many posts to display. Max is 10.
|
limit: 5, // How many posts to display. Max is 10.
|
||||||
},
|
},
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
// GA3 tracking id/GA4 tag id
|
id: '', // GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX
|
||||||
id: '', // UA-XXXXXXXXX-X | G-XXXXXXXXXX
|
|
||||||
},
|
},
|
||||||
|
// Track visitor interaction and behavior. https://www.hotjar.com
|
||||||
hotjar: {
|
hotjar: {
|
||||||
id: '',
|
id: '',
|
||||||
snippetVersion: 6,
|
snippetVersion: 6,
|
||||||
@@ -215,6 +282,9 @@ const config = {
|
|||||||
// using user system preferences, instead of the hardcoded defaultTheme
|
// using user system preferences, instead of the hardcoded defaultTheme
|
||||||
respectPrefersColorScheme: true,
|
respectPrefersColorScheme: true,
|
||||||
|
|
||||||
|
// Hide the ring in Profile picture
|
||||||
|
hideAvatarRing: false,
|
||||||
|
|
||||||
// Available themes. To remove any theme, exclude from here.
|
// Available themes. To remove any theme, exclude from here.
|
||||||
themes: [
|
themes: [
|
||||||
'light',
|
'light',
|
||||||
@@ -305,10 +375,6 @@ module.exports = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="https://arifszn.github.io/assets/img/hosted/gitprofile/themes.png" alt="Themes">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
### Google Analytics
|
### Google Analytics
|
||||||
|
|
||||||
**GitProfile** supports both GA3 and GA4. If you do not want to use Google Analytics, keep the `id` empty.
|
**GitProfile** supports both GA3 and GA4. If you do not want to use Google Analytics, keep the `id` empty.
|
||||||
@@ -327,7 +393,7 @@ Besides tracking visitors, it will track `click events` on projects and blog pos
|
|||||||
|
|
||||||
### Hotjar
|
### Hotjar
|
||||||
|
|
||||||
**GitProfile** supports hotjar. If you do not want to use Hotjar, keep the `id` empty.
|
**GitProfile** supports [hotjar](https://www.hotjar.com) to track visitor interaction and behavior. If you do not want to use Hotjar, keep the `id` empty.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// gitprofile.config.js
|
// gitprofile.config.js
|
||||||
@@ -350,7 +416,7 @@ Your avatar and bio will be fetched from GitHub automatically.
|
|||||||
|
|
||||||
### Social Links
|
### Social Links
|
||||||
|
|
||||||
You can link your social media services you're using, including LinkedIn, Twitter, Facebook, Dribbble, Behance, Medium, dev, personal website, phone and email.
|
You can link your social media services you're using, including LinkedIn, Twitter, Facebook, Instagram, Dribbble, Behance, Medium, dev, Stack Overflow, personal website, phone and email.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// gitprofile.config.js
|
// gitprofile.config.js
|
||||||
@@ -358,13 +424,15 @@ module.exports = {
|
|||||||
// ...
|
// ...
|
||||||
social: {
|
social: {
|
||||||
linkedin: 'ariful-alam',
|
linkedin: 'ariful-alam',
|
||||||
twitter: 'arif_swozon',
|
twitter: 'arif_szn',
|
||||||
facebook: '',
|
facebook: '',
|
||||||
|
instagram: '',
|
||||||
dribbble: '',
|
dribbble: '',
|
||||||
behance: '',
|
behance: '',
|
||||||
medium: '',
|
medium: '',
|
||||||
dev: '',
|
dev: '',
|
||||||
website: 'https://arifszn.github.io',
|
stackoverflow: '',
|
||||||
|
website: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
email: '',
|
email: '',
|
||||||
},
|
},
|
||||||
@@ -395,16 +463,18 @@ module.exports = {
|
|||||||
// ...
|
// ...
|
||||||
experiences: [
|
experiences: [
|
||||||
{
|
{
|
||||||
company: 'Company name 1',
|
company: 'Company Name',
|
||||||
position: 'Software Engineer',
|
position: 'Position',
|
||||||
from: 'July 2019',
|
from: 'September 2021',
|
||||||
to: 'Present',
|
to: 'Present',
|
||||||
|
companyLink: 'https://example.com',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
company: 'Company name 2',
|
company: 'Company Name',
|
||||||
position: 'Jr. Software Engineer',
|
position: 'Position',
|
||||||
from: 'January 2019',
|
from: 'July 2019',
|
||||||
to: ' June 2019',
|
to: 'August 2021',
|
||||||
|
companyLink: 'https://example.com',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@@ -477,12 +547,13 @@ module.exports = {
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
The posts are fetched by [Blog-js](https://github.com/arifszn/blog-js).
|
The posts are fetched by [blog.js](https://github.com/arifszn/blog.js).
|
||||||
|
|
||||||
## 💖 Support
|
## 💖 Support
|
||||||
|
|
||||||
<a href="https://www.buymeacoffee.com/arifszn" target="_blank">
|
<p>You can show your support by starring this project. ★</p>
|
||||||
<img src="https://raw.githubusercontent.com/arifszn/arifszn/main/assets/bmc-button.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" >
|
<a href="https://github.com/arifszn/gitprofile/stargazers">
|
||||||
|
<img src="https://img.shields.io/github/stars/arifszn/gitprofile?style=social" alt="Github Star">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## 💡 Contribute
|
## 💡 Contribute
|
||||||
@@ -491,4 +562,4 @@ To contribute, see the [Contributing guide](https://github.com/arifszn/gitprofil
|
|||||||
|
|
||||||
## 📄 License
|
## 📄 License
|
||||||
|
|
||||||
**GitProfile** is licensed under the [Apache-2.0 License](https://github.com/arifszn/gitprofile/blob/main/LICENSE).
|
[MIT](https://github.com/arifszn/gitprofile/blob/main/LICENSE)
|
||||||
|
|||||||
@@ -7,85 +7,88 @@ const config = {
|
|||||||
limit: 10, // How many projects to display.
|
limit: 10, // How many projects to display.
|
||||||
exclude: {
|
exclude: {
|
||||||
forks: false, // Forked projects will not be displayed if set to true.
|
forks: false, // Forked projects will not be displayed if set to true.
|
||||||
projects: ['laravel-ecommerce'], // These projects will not be displayed. example: ['my-project1', 'my-project2']
|
projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2']
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
social: {
|
social: {
|
||||||
linkedin: 'ariful-alam',
|
linkedin: 'ariful-alam',
|
||||||
twitter: 'arif_szn',
|
twitter: 'arif_szn',
|
||||||
facebook: '',
|
facebook: '',
|
||||||
|
instagram: '',
|
||||||
dribbble: '',
|
dribbble: '',
|
||||||
behance: '',
|
behance: '',
|
||||||
medium: '',
|
medium: 'arifszn',
|
||||||
dev: 'arifszn',
|
dev: 'arifszn',
|
||||||
|
stackoverflow: '', // format: userid/username
|
||||||
website: 'https://arifszn.github.io',
|
website: 'https://arifszn.github.io',
|
||||||
phone: '',
|
phone: '',
|
||||||
email: 'arifulalamszn@gmail.com',
|
email: 'arifulalamszn@gmail.com',
|
||||||
},
|
},
|
||||||
|
resume: {
|
||||||
|
fileUrl: 'resume.pdf', // Empty fileUrl will hide the `Download Resume` button.
|
||||||
|
},
|
||||||
skills: [
|
skills: [
|
||||||
'PHP',
|
'PHP',
|
||||||
'Laravel',
|
'Laravel',
|
||||||
'JavaScript',
|
'JavaScript',
|
||||||
'React.js',
|
'React.js',
|
||||||
'Node.js',
|
'Node.js',
|
||||||
|
'Nest.js',
|
||||||
'MySQL',
|
'MySQL',
|
||||||
|
'PostgreSQL',
|
||||||
'Git',
|
'Git',
|
||||||
'Docker',
|
'Docker',
|
||||||
|
'PHPUnit',
|
||||||
'CSS',
|
'CSS',
|
||||||
'Antd',
|
'Antd',
|
||||||
'Tailwind',
|
'Tailwind',
|
||||||
'Bootstrap',
|
|
||||||
],
|
],
|
||||||
experiences: [
|
experiences: [
|
||||||
{
|
{
|
||||||
company: 'Monstarlab Bangladesh',
|
company: 'Company Name',
|
||||||
position: 'Backend Engineer II',
|
position: 'Position',
|
||||||
from: 'September 2021',
|
from: 'September 2021',
|
||||||
to: 'Present',
|
to: 'Present',
|
||||||
|
companyLink: 'https://example.com',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
company: 'My Offer 360 Degree',
|
company: 'Company Name',
|
||||||
position: 'Web Application Developer',
|
position: 'Position',
|
||||||
from: 'July 2019',
|
from: 'July 2019',
|
||||||
to: 'August 2021',
|
to: 'August 2021',
|
||||||
|
companyLink: 'https://example.com',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
education: [
|
education: [
|
||||||
{
|
{
|
||||||
institution: 'American International University-Bangladesh',
|
institution: 'Institution Name',
|
||||||
degree: 'Bachelor of Science',
|
degree: 'Degree',
|
||||||
from: '2015',
|
from: '2015',
|
||||||
to: '2019',
|
to: '2019',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
institution: 'Cantonment College, Jessore',
|
institution: 'Institution Name',
|
||||||
degree: 'Higher Secondary Certificate (HSC)',
|
degree: 'Degree',
|
||||||
from: '2012',
|
from: '2012',
|
||||||
to: '2014',
|
to: '2014',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
institution: 'Chowgacha Shahadat Pilot High School',
|
|
||||||
degree: 'Secondary School Certificate (SSC)',
|
|
||||||
from: '2007',
|
|
||||||
to: '2012',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
// Display blog posts from your medium or dev account. (Optional)
|
// Display blog posts from your medium or dev account. (Optional)
|
||||||
blog: {
|
blog: {
|
||||||
source: 'dev', // medium | dev
|
source: 'dev', // medium | dev
|
||||||
username: 'arifszn',
|
username: 'arifszn', // to hide blog section, keep it empty
|
||||||
limit: 3, // How many posts to display. Max is 10.
|
limit: 3, // How many posts to display. Max is 10.
|
||||||
},
|
},
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
// GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX
|
id: '', // GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX
|
||||||
id: 'G-WLLB5E14M6', // Please remove this and use your own tag id or keep it empty
|
|
||||||
},
|
},
|
||||||
|
// Track visitor interaction and behavior. https://www.hotjar.com
|
||||||
hotjar: {
|
hotjar: {
|
||||||
id: '2617601', // Please remove this and use your own id or keep it empty
|
id: '',
|
||||||
snippetVersion: 6,
|
snippetVersion: 6,
|
||||||
},
|
},
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
defaultTheme: 'corporate',
|
defaultTheme: 'business',
|
||||||
|
|
||||||
// Hides the switch in the navbar
|
// Hides the switch in the navbar
|
||||||
// Useful if you want to support a single color mode
|
// Useful if you want to support a single color mode
|
||||||
@@ -95,6 +98,9 @@ const config = {
|
|||||||
// using user system preferences, instead of the hardcoded defaultTheme
|
// using user system preferences, instead of the hardcoded defaultTheme
|
||||||
respectPrefersColorScheme: false,
|
respectPrefersColorScheme: false,
|
||||||
|
|
||||||
|
// Hide the ring in Profile picture
|
||||||
|
hideAvatarRing: false,
|
||||||
|
|
||||||
// Available themes. To remove any theme, exclude from here.
|
// Available themes. To remove any theme, exclude from here.
|
||||||
themes: [
|
themes: [
|
||||||
'light',
|
'light',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { defineConfig } from 'vite';
|
|||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
import tailwind from 'tailwindcss';
|
import tailwind from 'tailwindcss';
|
||||||
import autoprefixer from 'autoprefixer';
|
import autoprefixer from 'autoprefixer';
|
||||||
import tailwindConfig from './tailwind.config.js';
|
import tailwindConfig from './tailwind.config.mjs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
|
|||||||
2985
package-lock.json
generated
2985
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@arifszn/gitprofile",
|
"name": "@arifszn/gitprofile",
|
||||||
"description": "Create an automatic portfolio based on GitHub profile",
|
"description": "Create an automatic portfolio based on GitHub profile",
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"license": "Apache-2.0",
|
"license": "MIT",
|
||||||
"author": "arifszn",
|
"author": "arifszn",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -34,24 +34,24 @@
|
|||||||
"build:library": "vite build --config library.config.js",
|
"build:library": "vite build --config library.config.js",
|
||||||
"lint": "eslint --ext .js,.jsx .",
|
"lint": "eslint --ext .js,.jsx .",
|
||||||
"lint:fix": "eslint --ext .js,.jsx --fix .",
|
"lint:fix": "eslint --ext .js,.jsx --fix .",
|
||||||
"prettier": "prettier --check './**/*.{js,jsx,ts,tsx,css,md,json}'",
|
"prettier": "prettier --check \"./**/*.{js,jsx,ts,tsx,css,md,json}\"",
|
||||||
"prettier:fix": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}'"
|
"prettier:fix": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,md,json}\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.0.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.0.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@arifszn/blog-js": "^2.0.0",
|
"@arifszn/blog-js": "^2.0.0",
|
||||||
"@vitejs/plugin-react": "^1.0.7",
|
"@vitejs/plugin-react": "^2.0.0",
|
||||||
"autoprefixer": "^10.4.4",
|
"autoprefixer": "^10.4.4",
|
||||||
"axios": "^0.26.1",
|
"axios": "^1.1.3",
|
||||||
"daisyui": "^2.11.0",
|
"daisyui": "^2.11.0",
|
||||||
|
"date-fns": "^2.28.0",
|
||||||
"eslint": "^8.11.0",
|
"eslint": "^8.11.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-react": "^7.29.4",
|
"eslint-plugin-react": "^7.29.4",
|
||||||
"moment": "^2.29.1",
|
|
||||||
"postcss": "^8.4.12",
|
"postcss": "^8.4.12",
|
||||||
"prettier": "^2.6.0",
|
"prettier": "^2.6.0",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"react-hotjar": "^5.0.0",
|
"react-hotjar": "^5.0.0",
|
||||||
"react-icons": "^4.3.1",
|
"react-icons": "^4.3.1",
|
||||||
"tailwindcss": "^3.0.23",
|
"tailwindcss": "^3.0.23",
|
||||||
"vite": "^2.8.0"
|
"vite": "^3.0.1"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"git-profile",
|
"git-profile",
|
||||||
@@ -85,6 +85,10 @@
|
|||||||
"git",
|
"git",
|
||||||
"react-portfolio",
|
"react-portfolio",
|
||||||
"github",
|
"github",
|
||||||
|
"github-page",
|
||||||
|
"github-pages",
|
||||||
|
"github-portfolio",
|
||||||
|
"vite-portfolio",
|
||||||
"github-api"
|
"github-api"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
public/resume.pdf
Normal file
BIN
public/resume.pdf
Normal file
Binary file not shown.
@@ -1,6 +1,5 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Fragment, useCallback, useEffect, useState } from 'react';
|
import { Fragment, useCallback, useEffect, useState } from 'react';
|
||||||
import moment from 'moment';
|
|
||||||
import HeadTagEditor from './head-tag-editor';
|
import HeadTagEditor from './head-tag-editor';
|
||||||
import ErrorPage from './error-page';
|
import ErrorPage from './error-page';
|
||||||
import ThemeChanger from './theme-changer';
|
import ThemeChanger from './theme-changer';
|
||||||
@@ -19,10 +18,14 @@ import {
|
|||||||
setupHotjar,
|
setupHotjar,
|
||||||
tooManyRequestError,
|
tooManyRequestError,
|
||||||
sanitizeConfig,
|
sanitizeConfig,
|
||||||
|
skeleton,
|
||||||
} from '../helpers/utils';
|
} from '../helpers/utils';
|
||||||
import { HelmetProvider } from 'react-helmet-async';
|
import { HelmetProvider } from 'react-helmet-async';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import '../assets/index.css';
|
import '../assets/index.css';
|
||||||
|
import { formatDistance } from 'date-fns';
|
||||||
|
|
||||||
|
const bgColor = 'bg-base-300';
|
||||||
|
|
||||||
const GitProfile = ({ config }) => {
|
const GitProfile = ({ config }) => {
|
||||||
const [error, setError] = useState(
|
const [error, setError] = useState(
|
||||||
@@ -63,9 +66,14 @@ const GitProfile = ({ config }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
setProfile(profileData);
|
setProfile(profileData);
|
||||||
|
return data;
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then((userData) => {
|
||||||
let excludeRepo = ``;
|
let excludeRepo = ``;
|
||||||
|
if (userData.public_repos === 0) {
|
||||||
|
setRepo([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sanitizedConfig.github.exclude.projects.forEach((project) => {
|
sanitizedConfig.github.exclude.projects.forEach((project) => {
|
||||||
excludeRepo += `+-repo:${sanitizedConfig.github.username}/${project}`;
|
excludeRepo += `+-repo:${sanitizedConfig.github.username}/${project}`;
|
||||||
@@ -103,9 +111,13 @@ const GitProfile = ({ config }) => {
|
|||||||
const handleError = (error) => {
|
const handleError = (error) => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
try {
|
try {
|
||||||
let reset = moment(
|
let reset = formatDistance(
|
||||||
new Date(error.response.headers['x-ratelimit-reset'] * 1000)
|
new Date(error.response.headers['x-ratelimit-reset'] * 1000),
|
||||||
).fromNow();
|
new Date(),
|
||||||
|
{
|
||||||
|
addSuffix: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (error.response.status === 403) {
|
if (error.response.status === 403) {
|
||||||
setError(tooManyRequestError(reset));
|
setError(tooManyRequestError(reset));
|
||||||
@@ -139,7 +151,7 @@ const GitProfile = ({ config }) => {
|
|||||||
) : (
|
) : (
|
||||||
sanitizedConfig && (
|
sanitizedConfig && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className="p-4 lg:p-10 min-h-full bg-base-200">
|
<div className={`p-4 lg:p-10 min-h-full ${bgColor}`}>
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 rounded-box">
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 rounded-box">
|
||||||
<div className="col-span-1">
|
<div className="col-span-1">
|
||||||
<div className="grid grid-cols-1 gap-6">
|
<div className="grid grid-cols-1 gap-6">
|
||||||
@@ -151,7 +163,12 @@ const GitProfile = ({ config }) => {
|
|||||||
themeConfig={sanitizedConfig.themeConfig}
|
themeConfig={sanitizedConfig.themeConfig}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<AvatarCard profile={profile} loading={loading} />
|
<AvatarCard
|
||||||
|
profile={profile}
|
||||||
|
loading={loading}
|
||||||
|
avatarRing={!sanitizedConfig.themeConfig.hideAvatarRing}
|
||||||
|
resume={sanitizedConfig.resume}
|
||||||
|
/>
|
||||||
<Details
|
<Details
|
||||||
profile={profile}
|
profile={profile}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
@@ -189,13 +206,9 @@ const GitProfile = ({ config }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<footer
|
||||||
{/* The below attribution notice shall be
|
className={`p-4 footer ${bgColor} text-base-content footer-center`}
|
||||||
included in all copies or substantial portions of the Software. */}
|
>
|
||||||
{/* DO NOT REMOVE/MODIFY THE BELOW FOOTER. */}
|
|
||||||
{/* SEE 4(C) SECTION OF THE LICENSE FOR MORE DETAILS. */}
|
|
||||||
{/* https://github.com/arifszn/gitprofile/blob/main/LICENSE */}
|
|
||||||
<footer className="p-4 footer bg-base-200 text-base-content footer-center">
|
|
||||||
<div className="card compact bg-base-100 shadow">
|
<div className="card compact bg-base-100 shadow">
|
||||||
<a
|
<a
|
||||||
className="card-body"
|
className="card-body"
|
||||||
@@ -204,10 +217,15 @@ const GitProfile = ({ config }) => {
|
|||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<p className="font-mono text-sm">
|
{loading ? (
|
||||||
Made with{' '}
|
skeleton({ width: 'w-52', height: 'h-6' })
|
||||||
<span className="text-primary">GitProfile</span> and ❤️
|
) : (
|
||||||
</p>
|
<p className="font-mono text-sm">
|
||||||
|
Made with{' '}
|
||||||
|
<span className="text-primary">GitProfile</span> and
|
||||||
|
❤️
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -235,10 +253,12 @@ GitProfile.propTypes = {
|
|||||||
linkedin: PropTypes.string,
|
linkedin: PropTypes.string,
|
||||||
twitter: PropTypes.string,
|
twitter: PropTypes.string,
|
||||||
facebook: PropTypes.string,
|
facebook: PropTypes.string,
|
||||||
|
instagram: PropTypes.string,
|
||||||
dribbble: PropTypes.string,
|
dribbble: PropTypes.string,
|
||||||
behance: PropTypes.string,
|
behance: PropTypes.string,
|
||||||
medium: PropTypes.string,
|
medium: PropTypes.string,
|
||||||
dev: PropTypes.string,
|
dev: PropTypes.string,
|
||||||
|
stackoverflow: PropTypes.string,
|
||||||
website: PropTypes.string,
|
website: PropTypes.string,
|
||||||
phone: PropTypes.string,
|
phone: PropTypes.string,
|
||||||
email: PropTypes.string,
|
email: PropTypes.string,
|
||||||
@@ -276,6 +296,7 @@ GitProfile.propTypes = {
|
|||||||
defaultTheme: PropTypes.string,
|
defaultTheme: PropTypes.string,
|
||||||
disableSwitch: PropTypes.bool,
|
disableSwitch: PropTypes.bool,
|
||||||
respectPrefersColorScheme: PropTypes.bool,
|
respectPrefersColorScheme: PropTypes.bool,
|
||||||
|
hideAvatarRing: PropTypes.bool,
|
||||||
themes: PropTypes.array,
|
themes: PropTypes.array,
|
||||||
customTheme: PropTypes.shape({
|
customTheme: PropTypes.shape({
|
||||||
primary: PropTypes.string,
|
primary: PropTypes.string,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { fallbackImage, skeleton } from '../../helpers/utils';
|
import { fallbackImage, skeleton } from '../../helpers/utils';
|
||||||
import LazyImage from '../lazy-image';
|
import LazyImage from '../lazy-image';
|
||||||
|
|
||||||
const AvatarCard = ({ profile, loading }) => {
|
const AvatarCard = ({ profile, loading, avatarRing, resume }) => {
|
||||||
return (
|
return (
|
||||||
<div className="card shadow-lg compact bg-base-100">
|
<div className="card shadow-lg compact bg-base-100">
|
||||||
<div className="grid place-items-center py-8">
|
<div className="grid place-items-center py-8">
|
||||||
@@ -18,7 +18,13 @@ const AvatarCard = ({ profile, loading }) => {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="avatar opacity-90">
|
<div className="avatar opacity-90">
|
||||||
<div className="mb-8 rounded-full w-32 h-32 ring ring-primary ring-offset-base-100 ring-offset-2">
|
<div
|
||||||
|
className={`mb-8 rounded-full w-32 h-32 ${
|
||||||
|
avatarRing
|
||||||
|
? 'ring ring-primary ring-offset-base-100 ring-offset-2'
|
||||||
|
: ''
|
||||||
|
}`}
|
||||||
|
>
|
||||||
{
|
{
|
||||||
<LazyImage
|
<LazyImage
|
||||||
src={profile.avatar ? profile.avatar : fallbackImage}
|
src={profile.avatar ? profile.avatar : fallbackImage}
|
||||||
@@ -38,7 +44,9 @@ const AvatarCard = ({ profile, loading }) => {
|
|||||||
{loading || !profile ? (
|
{loading || !profile ? (
|
||||||
skeleton({ width: 'w-48', height: 'h-8' })
|
skeleton({ width: 'w-48', height: 'h-8' })
|
||||||
) : (
|
) : (
|
||||||
<span className="opacity-70">{profile.name}</span>
|
<span className="text-base-content opacity-70">
|
||||||
|
{profile.name}
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
<div className="mt-3 text-base-content text-opacity-60 font-mono">
|
<div className="mt-3 text-base-content text-opacity-60 font-mono">
|
||||||
@@ -47,6 +55,22 @@ const AvatarCard = ({ profile, loading }) => {
|
|||||||
: profile.bio}
|
: profile.bio}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{resume?.fileUrl &&
|
||||||
|
(loading ? (
|
||||||
|
<div className="mt-6">
|
||||||
|
{skeleton({ width: 'w-40', height: 'h-8' })}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<a
|
||||||
|
href={resume.fileUrl}
|
||||||
|
target="_blank"
|
||||||
|
className="btn btn-outline btn-sm text-xs mt-6 opacity-50"
|
||||||
|
download
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
|
Download Resume
|
||||||
|
</a>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -55,6 +79,10 @@ const AvatarCard = ({ profile, loading }) => {
|
|||||||
AvatarCard.propTypes = {
|
AvatarCard.propTypes = {
|
||||||
profile: PropTypes.object,
|
profile: PropTypes.object,
|
||||||
loading: PropTypes.bool.isRequired,
|
loading: PropTypes.bool.isRequired,
|
||||||
|
avatarRing: PropTypes.bool.isRequired,
|
||||||
|
resume: PropTypes.shape({
|
||||||
|
fileUrl: PropTypes.string,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AvatarCard;
|
export default AvatarCard;
|
||||||
|
|||||||
@@ -1,19 +1,13 @@
|
|||||||
import moment from 'moment';
|
|
||||||
import { Fragment, useEffect, useState } from 'react';
|
import { Fragment, useEffect, useState } from 'react';
|
||||||
import { ga, skeleton } from '../../helpers/utils';
|
import { ga, skeleton } from '../../helpers/utils';
|
||||||
import LazyImage from '../lazy-image';
|
import LazyImage from '../lazy-image';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { AiOutlineContainer } from 'react-icons/ai';
|
import { AiOutlineContainer } from 'react-icons/ai';
|
||||||
import { getDevPost, getMediumPost } from '@arifszn/blog-js';
|
import { getDevPost, getMediumPost } from '@arifszn/blog-js';
|
||||||
|
import { formatDistance } from 'date-fns';
|
||||||
|
|
||||||
const displaySection = (blog) => {
|
const displaySection = (blog) => {
|
||||||
if (
|
if (blog?.source && blog?.username) {
|
||||||
typeof blog !== 'undefined' &&
|
|
||||||
typeof blog.source !== 'undefined' &&
|
|
||||||
typeof blog.username !== 'undefined' &&
|
|
||||||
blog.source &&
|
|
||||||
blog.username
|
|
||||||
) {
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -121,8 +115,7 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
|
|||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
typeof window !== 'undefined' &&
|
window?.open(article.link, '_blank');
|
||||||
window.open(article.link, '_blank');
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="p-8 h-full w-full">
|
<div className="p-8 h-full w-full">
|
||||||
@@ -146,8 +139,10 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
|
|||||||
<h2 className="font-semibold text-base-content opacity-60">
|
<h2 className="font-semibold text-base-content opacity-60">
|
||||||
{article.title}
|
{article.title}
|
||||||
</h2>
|
</h2>
|
||||||
<p className="opacity-50 text-xs">
|
<p className="text-base-content opacity-50 text-xs">
|
||||||
{moment(article.publishedAt).fromNow()}
|
{formatDistance(article.publishedAt, new Date(), {
|
||||||
|
addSuffix: true,
|
||||||
|
})}
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-3 text-base-content text-opacity-60 text-sm">
|
<p className="mt-3 text-base-content text-opacity-60 text-sm">
|
||||||
{article.description}
|
{article.description}
|
||||||
@@ -155,7 +150,7 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
|
|||||||
<div className="mt-4 flex items-center flex-wrap justify-center md:justify-start">
|
<div className="mt-4 flex items-center flex-wrap justify-center md:justify-start">
|
||||||
{article.categories.map((category, index2) => (
|
{article.categories.map((category, index2) => (
|
||||||
<div
|
<div
|
||||||
className="py-2 px-4 text-xs leading-3 rounded-full bg-base-300 mr-1 mb-1 opacity-50"
|
className="py-2 px-4 text-xs leading-3 rounded-full bg-base-300 mr-1 mb-1 opacity-50 text-base-content"
|
||||||
key={index2}
|
key={index2}
|
||||||
>
|
>
|
||||||
#{category}
|
#{category}
|
||||||
@@ -172,7 +167,9 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
|
|||||||
) : (
|
) : (
|
||||||
<div className="text-center mb-6">
|
<div className="text-center mb-6">
|
||||||
<AiOutlineContainer className="mx-auto h-12 w-12 opacity-30" />
|
<AiOutlineContainer className="mx-auto h-12 w-12 opacity-30" />
|
||||||
<p className="mt-1 text-sm opacity-50">No recent post</p>
|
<p className="mt-1 text-sm opacity-50 text-base-content">
|
||||||
|
No recent post
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -184,10 +181,10 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
|
|||||||
<div className="grid grid-cols-2 gap-6">
|
<div className="grid grid-cols-2 gap-6">
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
<div
|
<div
|
||||||
className={`card compact ${
|
className={`card compact bg-base-100 ${
|
||||||
loading || (articles && articles.length)
|
loading || (articles && articles.length)
|
||||||
? 'bg-gradient-to-br to-base-200 from-base-100 shadow'
|
? 'card compact shadow bg-opacity-40'
|
||||||
: 'bg-base-100 shadow-lg'
|
: 'shadow-lg'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
@@ -196,7 +193,9 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
|
|||||||
{loading ? (
|
{loading ? (
|
||||||
skeleton({ width: 'w-28', height: 'h-8' })
|
skeleton({ width: 'w-28', height: 'h-8' })
|
||||||
) : (
|
) : (
|
||||||
<span className="opacity-70">Recent Posts</span>
|
<span className="text-base-content opacity-70">
|
||||||
|
Recent Posts
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { MdLocationOn, MdMail } from 'react-icons/md';
|
import { MdLocationOn, MdMail } from 'react-icons/md';
|
||||||
import { AiFillGithub, AiFillMediumSquare } from 'react-icons/ai';
|
import {
|
||||||
|
AiFillGithub,
|
||||||
|
AiFillInstagram,
|
||||||
|
AiFillMediumSquare,
|
||||||
|
} from 'react-icons/ai';
|
||||||
import { SiTwitter } from 'react-icons/si';
|
import { SiTwitter } from 'react-icons/si';
|
||||||
import { GrLinkedinOption } from 'react-icons/gr';
|
import { GrLinkedinOption } from 'react-icons/gr';
|
||||||
import { CgDribbble } from 'react-icons/cg';
|
import { CgDribbble } from 'react-icons/cg';
|
||||||
@@ -11,6 +15,7 @@ import {
|
|||||||
FaDev,
|
FaDev,
|
||||||
FaFacebook,
|
FaFacebook,
|
||||||
FaGlobe,
|
FaGlobe,
|
||||||
|
FaStackOverflow,
|
||||||
} from 'react-icons/fa';
|
} from 'react-icons/fa';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { skeleton } from '../../helpers/utils';
|
import { skeleton } from '../../helpers/utils';
|
||||||
@@ -42,6 +47,14 @@ const ListItem = ({ icon, title, value, link, skeleton = false }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isCompanyMention = (company) => {
|
||||||
|
return company.startsWith('@') && !company.includes(' ');
|
||||||
|
};
|
||||||
|
|
||||||
|
const companyLink = (company) => {
|
||||||
|
return `https://github.com/${company.substring(1)}`;
|
||||||
|
};
|
||||||
|
|
||||||
const Details = ({ profile, loading, social, github }) => {
|
const Details = ({ profile, loading, social, github }) => {
|
||||||
const renderSkeleton = () => {
|
const renderSkeleton = () => {
|
||||||
let array = [];
|
let array = [];
|
||||||
@@ -80,6 +93,11 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
icon={<FaBuilding className="mr-2" />}
|
icon={<FaBuilding className="mr-2" />}
|
||||||
title="Company:"
|
title="Company:"
|
||||||
value={profile.company}
|
value={profile.company}
|
||||||
|
link={
|
||||||
|
isCompanyMention(profile.company.trim())
|
||||||
|
? companyLink(profile.company.trim())
|
||||||
|
: null
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<ListItem
|
<ListItem
|
||||||
@@ -88,7 +106,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
value={github.username}
|
value={github.username}
|
||||||
link={`https://github.com/${github.username}`}
|
link={`https://github.com/${github.username}`}
|
||||||
/>
|
/>
|
||||||
{typeof social.twitter !== 'undefined' && social.twitter && (
|
{social?.twitter && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<SiTwitter className="mr-2" />}
|
icon={<SiTwitter className="mr-2" />}
|
||||||
title="Twitter:"
|
title="Twitter:"
|
||||||
@@ -96,7 +114,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://twitter.com/${social.twitter}`}
|
link={`https://twitter.com/${social.twitter}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.linkedin !== 'undefined' && social.linkedin && (
|
{social?.linkedin && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<GrLinkedinOption className="mr-2" />}
|
icon={<GrLinkedinOption className="mr-2" />}
|
||||||
title="LinkedIn:"
|
title="LinkedIn:"
|
||||||
@@ -104,7 +122,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://www.linkedin.com/in/${social.linkedin}`}
|
link={`https://www.linkedin.com/in/${social.linkedin}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.dribbble !== 'undefined' && social.dribbble && (
|
{social?.dribbble && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<CgDribbble className="mr-2" />}
|
icon={<CgDribbble className="mr-2" />}
|
||||||
title="Dribbble:"
|
title="Dribbble:"
|
||||||
@@ -112,7 +130,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://dribbble.com/${social.dribbble}`}
|
link={`https://dribbble.com/${social.dribbble}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.behance !== 'undefined' && social.behance && (
|
{social?.behance && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<FaBehanceSquare className="mr-2" />}
|
icon={<FaBehanceSquare className="mr-2" />}
|
||||||
title="Behance:"
|
title="Behance:"
|
||||||
@@ -120,7 +138,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://www.behance.net/${social.behance}`}
|
link={`https://www.behance.net/${social.behance}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.facebook !== 'undefined' && social.facebook && (
|
{social?.facebook && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<FaFacebook className="mr-2" />}
|
icon={<FaFacebook className="mr-2" />}
|
||||||
title="Facebook:"
|
title="Facebook:"
|
||||||
@@ -128,7 +146,15 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://www.facebook.com/${social.facebook}`}
|
link={`https://www.facebook.com/${social.facebook}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.medium !== 'undefined' && social.medium && (
|
{social?.instagram && (
|
||||||
|
<ListItem
|
||||||
|
icon={<AiFillInstagram className="mr-2" />}
|
||||||
|
title="Instagram:"
|
||||||
|
value={social.instagram}
|
||||||
|
link={`https://www.instagram.com/${social.instagram}`}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{social?.medium && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<AiFillMediumSquare className="mr-2" />}
|
icon={<AiFillMediumSquare className="mr-2" />}
|
||||||
title="Medium:"
|
title="Medium:"
|
||||||
@@ -136,7 +162,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://medium.com/@${social.medium}`}
|
link={`https://medium.com/@${social.medium}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.dev !== 'undefined' && social.dev && (
|
{social?.dev && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<FaDev className="mr-2" />}
|
icon={<FaDev className="mr-2" />}
|
||||||
title="Dev:"
|
title="Dev:"
|
||||||
@@ -144,7 +170,15 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://dev.to/${social.dev}`}
|
link={`https://dev.to/${social.dev}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.website !== 'undefined' && social.website && (
|
{social?.stackoverflow && (
|
||||||
|
<ListItem
|
||||||
|
icon={<FaStackOverflow className="mr-2" />}
|
||||||
|
title="Stack Overflow:"
|
||||||
|
value={social.stackoverflow.split('/').slice(-1)}
|
||||||
|
link={`https://stackoverflow.com/users/${social.stackoverflow}`}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{social?.website && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<FaGlobe className="mr-2" />}
|
icon={<FaGlobe className="mr-2" />}
|
||||||
title="Website:"
|
title="Website:"
|
||||||
@@ -152,7 +186,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={social.website}
|
link={social.website}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.phone !== 'undefined' && social.phone && (
|
{social?.phone && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<RiPhoneFill className="mr-2" />}
|
icon={<RiPhoneFill className="mr-2" />}
|
||||||
title="Phone:"
|
title="Phone:"
|
||||||
@@ -160,7 +194,7 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`tel:${social.phone}`}
|
link={`tel:${social.phone}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.email !== 'undefined' && social.email && (
|
{social?.email && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<MdMail className="mr-2" />}
|
icon={<MdMail className="mr-2" />}
|
||||||
title="Email:"
|
title="Email:"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const Education = ({ loading, education }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{typeof education !== 'undefined' && education.length !== 0 && (
|
{education?.length !== 0 && (
|
||||||
<div className="card shadow-lg compact bg-base-100">
|
<div className="card shadow-lg compact bg-base-100">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="mx-3">
|
<div className="mx-3">
|
||||||
@@ -48,7 +48,9 @@ const Education = ({ loading, education }) => {
|
|||||||
{loading ? (
|
{loading ? (
|
||||||
skeleton({ width: 'w-32', height: 'h-8' })
|
skeleton({ width: 'w-32', height: 'h-8' })
|
||||||
) : (
|
) : (
|
||||||
<span className="opacity-70">Education</span>
|
<span className="text-base-content opacity-70">
|
||||||
|
Education
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { skeleton } from '../../helpers/utils';
|
|||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const ListItem = ({ time, position, company }) => (
|
const ListItem = ({ time, position, company, companyLink }) => (
|
||||||
<li className="mb-5 ml-4">
|
<li className="mb-5 ml-4">
|
||||||
<div
|
<div
|
||||||
className="absolute w-2 h-2 bg-base-300 rounded-full border border-base-300 mt-1.5"
|
className="absolute w-2 h-2 bg-base-300 rounded-full border border-base-300 mt-1.5"
|
||||||
@@ -10,7 +10,11 @@ const ListItem = ({ time, position, company }) => (
|
|||||||
></div>
|
></div>
|
||||||
<div className="my-0.5 text-xs">{time}</div>
|
<div className="my-0.5 text-xs">{time}</div>
|
||||||
<h3 className="font-semibold">{position}</h3>
|
<h3 className="font-semibold">{position}</h3>
|
||||||
<div className="mb-4 font-normal">{company}</div>
|
<div className="mb-4 font-normal">
|
||||||
|
<a href={companyLink} target="_blank" rel="noreferrer">
|
||||||
|
{company}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -37,10 +41,9 @@ const Experience = ({ experiences, loading }) => {
|
|||||||
|
|
||||||
return array;
|
return array;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{typeof experiences !== 'undefined' && experiences.length !== 0 && (
|
{experiences?.length !== 0 && (
|
||||||
<div className="card shadow-lg compact bg-base-100">
|
<div className="card shadow-lg compact bg-base-100">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="mx-3">
|
<div className="mx-3">
|
||||||
@@ -48,7 +51,9 @@ const Experience = ({ experiences, loading }) => {
|
|||||||
{loading ? (
|
{loading ? (
|
||||||
skeleton({ width: 'w-32', height: 'h-8' })
|
skeleton({ width: 'w-32', height: 'h-8' })
|
||||||
) : (
|
) : (
|
||||||
<span className="opacity-70">Experience</span>
|
<span className="text-base-content opacity-70">
|
||||||
|
Experience
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,6 +69,9 @@ const Experience = ({ experiences, loading }) => {
|
|||||||
time={`${experience.from} - ${experience.to}`}
|
time={`${experience.from} - ${experience.to}`}
|
||||||
position={experience.position}
|
position={experience.position}
|
||||||
company={experience.company}
|
company={experience.company}
|
||||||
|
companyLink={
|
||||||
|
experience.companyLink ? experience.companyLink : null
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@@ -81,6 +89,7 @@ ListItem.propTypes = {
|
|||||||
time: PropTypes.node,
|
time: PropTypes.node,
|
||||||
position: PropTypes.node,
|
position: PropTypes.node,
|
||||||
company: PropTypes.node,
|
company: PropTypes.node,
|
||||||
|
companyLink: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
Experience.propTypes = {
|
Experience.propTypes = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import { Helmet } from 'react-helmet-async';
|
import { Helmet } from 'react-helmet-async';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { isThemeDarkish } from '../../helpers/utils';
|
import { isDarkishTheme } from '../../helpers/utils';
|
||||||
|
|
||||||
const HeadTagEditor = ({ profile, theme, googleAnalytics, social }) => {
|
const HeadTagEditor = ({ profile, theme, googleAnalytics, social }) => {
|
||||||
return (
|
return (
|
||||||
@@ -22,31 +22,35 @@ const HeadTagEditor = ({ profile, theme, googleAnalytics, social }) => {
|
|||||||
gtag('config', '${googleAnalytics.id}');`}
|
gtag('config', '${googleAnalytics.id}');`}
|
||||||
</script>
|
</script>
|
||||||
)}
|
)}
|
||||||
<title>Portfolio of {profile.name}</title>
|
<title>Portfolio{profile.name && ` of ${profile.name}`}</title>
|
||||||
<meta
|
<meta
|
||||||
name="theme-color"
|
name="theme-color"
|
||||||
content={isThemeDarkish(theme) ? '#000000' : '#ffffff'}
|
content={isDarkishTheme(theme) ? '#000000' : '#ffffff'}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<meta name="description" content={profile.bio} />
|
<meta name="description" content={profile.bio} />
|
||||||
|
|
||||||
<meta itemProp="name" content={`Portfolio of ${profile.name}`} />
|
<meta
|
||||||
|
itemProp="name"
|
||||||
|
content={`Portfolio${profile.name && ` of ${profile.name}`}`}
|
||||||
|
/>
|
||||||
<meta itemProp="description" content={profile.bio} />
|
<meta itemProp="description" content={profile.bio} />
|
||||||
<meta itemProp="image" content={profile.avatar} />
|
<meta itemProp="image" content={profile.avatar} />
|
||||||
|
|
||||||
<meta
|
<meta property="og:url" content={social?.website || ''} />
|
||||||
property="og:url"
|
|
||||||
content={
|
|
||||||
typeof social.website !== 'undefined' ? social.website : ''
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:title" content={`Portfolio of ${profile.name}`} />
|
<meta
|
||||||
|
property="og:title"
|
||||||
|
content={`Portfolio${profile.name && ` of ${profile.name}`}`}
|
||||||
|
/>
|
||||||
<meta property="og:description" content={profile.bio} />
|
<meta property="og:description" content={profile.bio} />
|
||||||
<meta property="og:image" content={profile.avatar} />
|
<meta property="og:image" content={profile.avatar} />
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:title" content={`Portfolio of ${profile.name}`} />
|
<meta
|
||||||
|
name="twitter:title"
|
||||||
|
content={`Portfolio${profile.name && ` of ${profile.name}`}`}
|
||||||
|
/>
|
||||||
<meta name="twitter:description" content={profile.bio} />
|
<meta name="twitter:description" content={profile.bio} />
|
||||||
<meta name="twitter:image" content={profile.avatar} />
|
<meta name="twitter:image" content={profile.avatar} />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import PropTypes from 'prop-types';
|
|||||||
import { ga, languageColor, skeleton } from '../../helpers/utils';
|
import { ga, languageColor, skeleton } from '../../helpers/utils';
|
||||||
|
|
||||||
const Project = ({ repo, loading, github, googleAnalytics }) => {
|
const Project = ({ repo, loading, github, googleAnalytics }) => {
|
||||||
|
if (!loading && Array.isArray(repo) && repo.length === 0) {
|
||||||
|
return <></>;
|
||||||
|
}
|
||||||
|
|
||||||
const renderSkeleton = () => {
|
const renderSkeleton = () => {
|
||||||
let array = [];
|
let array = [];
|
||||||
for (let index = 0; index < github.limit; index++) {
|
for (let index = 0; index < github.limit; index++) {
|
||||||
@@ -72,7 +76,7 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
|
|||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
typeof window !== 'undefined' && window.open(item.html_url, '_blank');
|
window?.open(item.html_url, '_blank');
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex justify-between flex-col p-8 h-full w-full">
|
<div className="flex justify-between flex-col p-8 h-full w-full">
|
||||||
@@ -82,7 +86,7 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
|
|||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
className="inline-block w-5 h-5 mr-2 stroke-current"
|
className="text-base-content inline-block w-5 h-5 mr-2 stroke-current"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
@@ -92,7 +96,9 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
|
|||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
<span>
|
<span>
|
||||||
<h5 className="card-title text-lg">{item.name}</h5>
|
<h5 className="card-title text-lg text-base-content">
|
||||||
|
{item.name}
|
||||||
|
</h5>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<p className="mb-5 mt-1 text-base-content text-opacity-60 text-sm">
|
<p className="mb-5 mt-1 text-base-content text-opacity-60 text-sm">
|
||||||
@@ -130,14 +136,16 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
|
|||||||
<div className="col-span-1 lg:col-span-2">
|
<div className="col-span-1 lg:col-span-2">
|
||||||
<div className="grid grid-cols-2 gap-6">
|
<div className="grid grid-cols-2 gap-6">
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
<div className="card compact bg-gradient-to-br to-base-200 from-base-100 shadow">
|
<div className="card compact bg-base-100 shadow bg-opacity-40">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="mx-3 flex items-center justify-between mb-2">
|
<div className="mx-3 flex items-center justify-between mb-2">
|
||||||
<h5 className="card-title">
|
<h5 className="card-title">
|
||||||
{loading ? (
|
{loading ? (
|
||||||
skeleton({ width: 'w-28', height: 'h-8' })
|
skeleton({ width: 'w-28', height: 'h-8' })
|
||||||
) : (
|
) : (
|
||||||
<span className="opacity-70">My Projects</span>
|
<span className="text-base-content opacity-70">
|
||||||
|
My Projects
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
@@ -147,7 +155,7 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
|
|||||||
href={`https://github.com/${github.username}?tab=repositories`}
|
href={`https://github.com/${github.username}?tab=repositories`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="opacity-50"
|
className="text-base-content opacity-50"
|
||||||
>
|
>
|
||||||
See All
|
See All
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const Skill = ({ loading, skills }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{typeof skills !== 'undefined' && skills.length !== 0 && (
|
{skills?.length !== 0 && (
|
||||||
<div className="card shadow-lg compact bg-base-100">
|
<div className="card shadow-lg compact bg-base-100">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="mx-3">
|
<div className="mx-3">
|
||||||
@@ -25,7 +25,9 @@ const Skill = ({ loading, skills }) => {
|
|||||||
{loading ? (
|
{loading ? (
|
||||||
skeleton({ width: 'w-32', height: 'h-8' })
|
skeleton({ width: 'w-32', height: 'h-8' })
|
||||||
) : (
|
) : (
|
||||||
<span className="opacity-70">Tech Stack</span>
|
<span className="text-base-content opacity-70">
|
||||||
|
Tech Stack
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const ThemeChanger = ({ theme, setTheme, loading, themeConfig }) => {
|
|||||||
{loading ? (
|
{loading ? (
|
||||||
skeleton({ width: 'w-20', height: 'h-8', className: 'mb-1' })
|
skeleton({ width: 'w-20', height: 'h-8', className: 'mb-1' })
|
||||||
) : (
|
) : (
|
||||||
<span className="opacity-70">Theme</span>
|
<span className="text-base-content opacity-70">Theme</span>
|
||||||
)}
|
)}
|
||||||
</h5>
|
</h5>
|
||||||
<span className="text-base-content text-opacity-40 capitalize text-sm">
|
<span className="text-base-content text-opacity-40 capitalize text-sm">
|
||||||
@@ -43,7 +43,7 @@ const ThemeChanger = ({ theme, setTheme, loading, themeConfig }) => {
|
|||||||
<div title="Change Theme" className="dropdown dropdown-end">
|
<div title="Change Theme" className="dropdown dropdown-end">
|
||||||
<div
|
<div
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className="btn btn-ghost m-1 normal-case opacity-50"
|
className="btn btn-ghost m-1 normal-case opacity-50 text-base-content"
|
||||||
>
|
>
|
||||||
<AiOutlineControl className="inline-block w-5 h-5 stroke-current md:mr-2" />
|
<AiOutlineControl className="inline-block w-5 h-5 stroke-current md:mr-2" />
|
||||||
<span className="hidden md:inline">Change Theme</span>
|
<span className="hidden md:inline">Change Theme</span>
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<svg width="410" height="404" viewBox="0 0 410 404" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z" fill="url(#paint0_linear)"/>
|
|
||||||
<path d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z" fill="url(#paint1_linear)"/>
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#41D1FF"/>
|
|
||||||
<stop offset="1" stop-color="#BD34FE"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#FFEA83"/>
|
|
||||||
<stop offset="0.0833333" stop-color="#FFDD35"/>
|
|
||||||
<stop offset="1" stop-color="#FFA800"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -69,220 +69,119 @@ export const ga = {
|
|||||||
// log specific events happening
|
// log specific events happening
|
||||||
event: ({ action, params }) => {
|
event: ({ action, params }) => {
|
||||||
try {
|
try {
|
||||||
typeof window !== 'undefined' && window.gtag('event', action, params);
|
window?.gtag('event', action, params);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isThemeDarkish = (theme) => {
|
export const isDarkishTheme = (theme) => {
|
||||||
if (
|
return ['dark', 'halloween', 'forest', 'black', 'luxury', 'dracula'].includes(
|
||||||
theme === 'dark' ||
|
theme
|
||||||
theme === 'halloween' ||
|
);
|
||||||
theme === 'forest' ||
|
|
||||||
theme === 'black' ||
|
|
||||||
theme === 'luxury' ||
|
|
||||||
theme === 'dracula'
|
|
||||||
) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setupHotjar = (hotjarConfig) => {
|
export const setupHotjar = (hotjarConfig) => {
|
||||||
if (hotjarConfig?.id) {
|
if (hotjarConfig?.id) {
|
||||||
let snippetVersion = hotjarConfig?.snippetVersion
|
let snippetVersion = hotjarConfig?.snippetVersion || 6;
|
||||||
? hotjarConfig?.snippetVersion
|
|
||||||
: 6;
|
|
||||||
|
|
||||||
hotjar.initialize(hotjarConfig.id, snippetVersion);
|
hotjar.initialize(hotjarConfig.id, snippetVersion);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const sanitizeConfig = (config) => {
|
export const sanitizeConfig = (config) => {
|
||||||
const customTheme =
|
const customTheme = config?.themeConfig?.customTheme || {
|
||||||
typeof config.themeConfig !== 'undefined' &&
|
primary: '#fc055b',
|
||||||
typeof config.themeConfig.customTheme !== 'undefined'
|
secondary: '#219aaf',
|
||||||
? config.themeConfig.customTheme
|
accent: '#e8d03a',
|
||||||
: {
|
neutral: '#2A2730',
|
||||||
primary: '#fc055b',
|
'base-100': '#E3E3ED',
|
||||||
secondary: '#219aaf',
|
'--rounded-box': '3rem',
|
||||||
accent: '#e8d03a',
|
'--rounded-btn': '3rem',
|
||||||
neutral: '#2A2730',
|
};
|
||||||
'base-100': '#E3E3ED',
|
|
||||||
'--rounded-box': '3rem',
|
|
||||||
'--rounded-btn': '3rem',
|
|
||||||
};
|
|
||||||
|
|
||||||
const themes =
|
const themes = config?.themeConfig?.themes || [
|
||||||
typeof config.themeConfig !== 'undefined' &&
|
'light',
|
||||||
typeof config.themeConfig.themes !== 'undefined'
|
'dark',
|
||||||
? config.themeConfig.themes
|
'cupcake',
|
||||||
: [
|
'bumblebee',
|
||||||
'light',
|
'emerald',
|
||||||
'dark',
|
'corporate',
|
||||||
'cupcake',
|
'synthwave',
|
||||||
'bumblebee',
|
'retro',
|
||||||
'emerald',
|
'cyberpunk',
|
||||||
'corporate',
|
'valentine',
|
||||||
'synthwave',
|
'halloween',
|
||||||
'retro',
|
'garden',
|
||||||
'cyberpunk',
|
'forest',
|
||||||
'valentine',
|
'aqua',
|
||||||
'halloween',
|
'lofi',
|
||||||
'garden',
|
'pastel',
|
||||||
'forest',
|
'fantasy',
|
||||||
'aqua',
|
'wireframe',
|
||||||
'lofi',
|
'black',
|
||||||
'pastel',
|
'luxury',
|
||||||
'fantasy',
|
'dracula',
|
||||||
'wireframe',
|
'cmyk',
|
||||||
'black',
|
'autumn',
|
||||||
'luxury',
|
'business',
|
||||||
'dracula',
|
'acid',
|
||||||
'cmyk',
|
'lemonade',
|
||||||
'autumn',
|
'night',
|
||||||
'business',
|
'coffee',
|
||||||
'acid',
|
'winter',
|
||||||
'lemonade',
|
'procyon',
|
||||||
'night',
|
];
|
||||||
'coffee',
|
|
||||||
'winter',
|
|
||||||
'procyon',
|
|
||||||
];
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
github: {
|
github: {
|
||||||
username: config.github.username,
|
username: config?.github?.username || '',
|
||||||
sortBy:
|
sortBy: config?.github?.sortBy || 'stars',
|
||||||
typeof config.github.sortBy !== 'undefined'
|
limit: config?.github?.limit || 8,
|
||||||
? config.github.sortBy
|
|
||||||
: 'stars',
|
|
||||||
limit:
|
|
||||||
typeof config.github.limit !== 'undefined' ? config.github.limit : 8,
|
|
||||||
exclude: {
|
exclude: {
|
||||||
forks:
|
forks: config?.github?.exclude?.forks || false,
|
||||||
typeof config.github.exclude !== 'undefined' &&
|
projects: config?.github?.exclude?.projects || [],
|
||||||
typeof config.github.exclude.forks !== 'undefined'
|
|
||||||
? config.github.exclude.forks
|
|
||||||
: false,
|
|
||||||
projects:
|
|
||||||
typeof config.github.exclude !== 'undefined' &&
|
|
||||||
typeof config.github.exclude.projects !== 'undefined'
|
|
||||||
? config.github.exclude.projects
|
|
||||||
: [],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
social: {
|
social: {
|
||||||
linkedin:
|
linkedin: config?.social?.linkedin,
|
||||||
typeof config.social !== 'undefined' &&
|
twitter: config?.social?.twitter,
|
||||||
typeof config.social.linkedin !== 'undefined'
|
facebook: config?.social?.facebook,
|
||||||
? config.social.linkedin
|
instagram: config?.social?.instagram,
|
||||||
: '',
|
dribbble: config?.social?.dribbble,
|
||||||
twitter:
|
behance: config?.social?.behance,
|
||||||
typeof config.social !== 'undefined' &&
|
medium: config?.social?.medium,
|
||||||
typeof config.social.twitter !== 'undefined'
|
dev: config?.social?.dev,
|
||||||
? config.social.twitter
|
stackoverflow: config?.social?.stackoverflow,
|
||||||
: '',
|
website: config?.social?.website,
|
||||||
facebook:
|
phone: config?.social?.phone,
|
||||||
typeof config.social !== 'undefined' &&
|
email: config?.social?.email,
|
||||||
typeof config.social.facebook !== 'undefined'
|
|
||||||
? config.social.facebook
|
|
||||||
: '',
|
|
||||||
dribbble:
|
|
||||||
typeof config.social !== 'undefined' &&
|
|
||||||
typeof config.social.dribbble !== 'undefined'
|
|
||||||
? config.social.dribbble
|
|
||||||
: '',
|
|
||||||
behance:
|
|
||||||
typeof config.social !== 'undefined' &&
|
|
||||||
typeof config.social.behance !== 'undefined'
|
|
||||||
? config.social.behance
|
|
||||||
: '',
|
|
||||||
medium:
|
|
||||||
typeof config.social !== 'undefined' &&
|
|
||||||
typeof config.social.medium !== 'undefined'
|
|
||||||
? config.social.medium
|
|
||||||
: '',
|
|
||||||
dev:
|
|
||||||
typeof config.social !== 'undefined' &&
|
|
||||||
typeof config.social.dev !== 'undefined'
|
|
||||||
? config.social.dev
|
|
||||||
: '',
|
|
||||||
website:
|
|
||||||
typeof config.social !== 'undefined' &&
|
|
||||||
typeof config.social.website !== 'undefined'
|
|
||||||
? config.social.website
|
|
||||||
: '',
|
|
||||||
phone:
|
|
||||||
typeof config.social !== 'undefined' &&
|
|
||||||
typeof config.social.phone !== 'undefined'
|
|
||||||
? config.social.phone
|
|
||||||
: '',
|
|
||||||
email:
|
|
||||||
typeof config.social !== 'undefined' &&
|
|
||||||
typeof config.social.email !== 'undefined'
|
|
||||||
? config.social.email
|
|
||||||
: '',
|
|
||||||
},
|
},
|
||||||
skills: typeof config.skills !== 'undefined' ? config.skills : [],
|
resume: {
|
||||||
experiences:
|
fileUrl: config?.resume?.fileUrl || '',
|
||||||
typeof config.experiences !== 'undefined' ? config.experiences : [],
|
},
|
||||||
education: typeof config.education !== 'undefined' ? config.education : [],
|
skills: config?.skills || [],
|
||||||
|
experiences: config?.experiences || [],
|
||||||
|
education: config?.education || [],
|
||||||
blog: {
|
blog: {
|
||||||
source:
|
source: config?.blog?.source,
|
||||||
typeof config.blog !== 'undefined' &&
|
username: config?.blog?.username,
|
||||||
typeof config.blog.source !== 'undefined'
|
limit: config?.blog?.limit || 5,
|
||||||
? config.blog.source
|
|
||||||
: '',
|
|
||||||
username:
|
|
||||||
typeof config.blog !== 'undefined' &&
|
|
||||||
typeof config.blog.username !== 'undefined'
|
|
||||||
? config.blog.username
|
|
||||||
: '',
|
|
||||||
limit:
|
|
||||||
typeof config.blog !== 'undefined' &&
|
|
||||||
typeof config.blog.limit !== 'undefined'
|
|
||||||
? config.blog.limit
|
|
||||||
: 5,
|
|
||||||
},
|
},
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
id:
|
id: config?.googleAnalytics?.id,
|
||||||
typeof config.googleAnalytics !== 'undefined' &&
|
|
||||||
typeof config.googleAnalytics.id !== 'undefined'
|
|
||||||
? config.googleAnalytics.id
|
|
||||||
: '',
|
|
||||||
},
|
},
|
||||||
hotjar: {
|
hotjar: {
|
||||||
id:
|
id: config?.hotjar?.id,
|
||||||
typeof config.hotjar !== 'undefined' &&
|
snippetVersion: config?.hotjar?.snippetVersion || 6,
|
||||||
typeof config.hotjar.id !== 'undefined'
|
|
||||||
? config.hotjar.id
|
|
||||||
: '',
|
|
||||||
snippetVersion:
|
|
||||||
typeof config.hotjar !== 'undefined' &&
|
|
||||||
typeof config.hotjar.snippetVersion !== 'undefined'
|
|
||||||
? config.hotjar.snippetVersion
|
|
||||||
: 6,
|
|
||||||
},
|
},
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
defaultTheme:
|
defaultTheme: config?.themeConfig?.defaultTheme || themes[0],
|
||||||
typeof config.themeConfig !== 'undefined' &&
|
disableSwitch: config?.themeConfig?.disableSwitch || false,
|
||||||
typeof config.themeConfig.defaultTheme !== 'undefined'
|
|
||||||
? config.themeConfig.defaultTheme
|
|
||||||
: themes[0],
|
|
||||||
disableSwitch:
|
|
||||||
typeof config.themeConfig !== 'undefined' &&
|
|
||||||
typeof config.themeConfig.disableSwitch !== 'undefined'
|
|
||||||
? config.themeConfig.disableSwitch
|
|
||||||
: false,
|
|
||||||
respectPrefersColorScheme:
|
respectPrefersColorScheme:
|
||||||
typeof config.themeConfig !== 'undefined' &&
|
config?.themeConfig?.respectPrefersColorScheme || false,
|
||||||
typeof config.themeConfig.respectPrefersColorScheme !== 'undefined'
|
hideAvatarRing: config?.themeConfig?.hideAvatarRing || false,
|
||||||
? config.themeConfig.respectPrefersColorScheme
|
|
||||||
: false,
|
|
||||||
themes: themes,
|
themes: themes,
|
||||||
customTheme: customTheme,
|
customTheme: customTheme,
|
||||||
},
|
},
|
||||||
@@ -320,7 +219,8 @@ export const notFoundError = {
|
|||||||
title: 'The Github Username is Incorrect.',
|
title: 'The Github Username is Incorrect.',
|
||||||
subTitle: (
|
subTitle: (
|
||||||
<p>
|
<p>
|
||||||
Please provide correct github username in <code>config</code>.
|
Please provide correct github username in{' '}
|
||||||
|
<code>gitprofile.config.js</code>.
|
||||||
</p>
|
</p>
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|||||||
25
types/index.d.ts
vendored
25
types/index.d.ts
vendored
@@ -54,6 +54,11 @@ export interface Social {
|
|||||||
*/
|
*/
|
||||||
facebook?: string;
|
facebook?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instagram
|
||||||
|
*/
|
||||||
|
instagram?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dribbble
|
* Dribbble
|
||||||
*/
|
*/
|
||||||
@@ -74,6 +79,11 @@ export interface Social {
|
|||||||
*/
|
*/
|
||||||
dev?: string;
|
dev?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stack Overflow
|
||||||
|
*/
|
||||||
|
stackoverflow?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Website
|
* Website
|
||||||
*/
|
*/
|
||||||
@@ -181,6 +191,11 @@ export interface ThemeConfig {
|
|||||||
*/
|
*/
|
||||||
respectPrefersColorScheme?: boolean;
|
respectPrefersColorScheme?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide the ring in Profile picture
|
||||||
|
*/
|
||||||
|
hideAvatarRing?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available themes
|
* Available themes
|
||||||
*/
|
*/
|
||||||
@@ -197,6 +212,7 @@ export interface Experience {
|
|||||||
position?: string;
|
position?: string;
|
||||||
from?: string;
|
from?: string;
|
||||||
to?: string;
|
to?: string;
|
||||||
|
companyLink?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Education {
|
export interface Education {
|
||||||
@@ -206,6 +222,10 @@ export interface Education {
|
|||||||
to?: string;
|
to?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Resume {
|
||||||
|
fileUrl?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
/**
|
/**
|
||||||
* GitHub Config
|
* GitHub Config
|
||||||
@@ -217,6 +237,11 @@ export interface Config {
|
|||||||
*/
|
*/
|
||||||
social?: Social;
|
social?: Social;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resume
|
||||||
|
*/
|
||||||
|
resume?: Resume;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skill list
|
* Skill list
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { defineConfig } from 'vite';
|
|||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
import tailwind from 'tailwindcss';
|
import tailwind from 'tailwindcss';
|
||||||
import autoprefixer from 'autoprefixer';
|
import autoprefixer from 'autoprefixer';
|
||||||
import tailwindConfig from './tailwind.config.js';
|
import tailwindConfig from './tailwind.config.mjs';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
Reference in New Issue
Block a user