Skip to content

Commit f65d2e0

Browse files
committed
changed icon library and minor css changes
1 parent 8146382 commit f65d2e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+186
-602
lines changed

BLOG_CONSTANTS/_BLOG_SETUP.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { LogoType, NavbarType } from "../src/shared/enums";
22
import { IAuthor, iSEO } from "../src/shared/interfaces";
3+
import { AiFillYoutube, AiFillGithub, AiOutlineTwitter, AiFillLinkedin, AiFillInstagram, AiFillFacebook } from "react-icons/ai";
34

45
/**
56
* EXAMPLE AUTHOR
@@ -9,13 +10,13 @@ import { IAuthor, iSEO } from "../src/shared/interfaces";
910
designation: "Work Designation",
1011
bio: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
1112
profilePic: "",
12-
social: [
13+
social: [
1314
{
14-
icon: <i className="icon-2-Z font-32" />,
15+
icon: <AiFillGithub />,
1516
link: 'https://github.com/'
1617
},
1718
{
18-
icon: <i className="icon-I font-36" />,
19+
icon: <AiFillLinkedin />,
1920
link: 'https://www.linkedin.com/'
2021
},
2122
]
@@ -26,14 +27,14 @@ export const MAYUR: IAuthor = {
2627
name: "Mayur Nalwala",
2728
designation: "Software Engineer",
2829
bio: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
29-
profilePic: "https://robohash.org/1f2fb9642c825da07a83e5cac078e838?set=set3&bgset=&size=200x200",
30+
profilePic: "",
3031
social: [
3132
{
32-
icon: <i className="icon-2-Z font-32" />,
33+
icon: <AiFillGithub />,
3334
link: 'https://github.com/nmayur'
3435
},
3536
{
36-
icon: <i className="icon-I font-36" />,
37+
icon: <AiFillLinkedin />,
3738
link: 'https://www.linkedin.com/in/mayur-nalwala/'
3839
},
3940
]
@@ -43,14 +44,14 @@ export const RUPALI: IAuthor = {
4344
name: "Rupali Yadav",
4445
designation: "IT Analyst",
4546
bio: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
46-
profilePic: "https://gravatar.com/avatar/8fab154171e299e9b8fe24305267a8fd?s=200&d=robohash&r=r",
47+
profilePic: "",
4748
social: [
4849
{
49-
icon: <i className="icon-2-Z font-32" />,
50+
icon: <AiFillGithub />,
5051
link: 'https://github.com/rupali-yadav'
5152
},
5253
{
53-
icon: <i className="icon-I font-36" />,
54+
icon: <AiFillLinkedin />,
5455
link: 'https://www.linkedin.com/in/rupali-yadav-087bb4112/'
5556
},
5657
]
@@ -142,15 +143,15 @@ export const PRIMARY_NAV = {
142143
socials: [
143144
{
144145
link: 'https://www.facebook.com/',
145-
icon: <i className="icon-F" />
146+
icon: <AiFillFacebook />
146147
},
147148
{
148149
link: 'https://www.instagram.com/',
149-
icon: <i className="icon-2-I" />
150+
icon: <AiFillInstagram />
150151
},
151152
{
152153
link: 'https://twitter.com/WebExpe',
153-
icon: <i className="icon-L" />
154+
icon: <AiOutlineTwitter />
154155
},
155156
]
156157
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"out": "next build && next export"
1212
},
1313
"dependencies": {
14-
"@heroicons/react": "^1.0.6",
1514
"@uiw/react-textarea-code-editor": "^1.4.4",
1615
"css-loader": "^6.7.1",
1716
"next": "12.1.0",
@@ -22,6 +21,8 @@
2221
"prismjs": "^1.28.0",
2322
"react": "17.0.2",
2423
"react-dom": "17.0.2",
24+
"react-icons": "^4.4.0",
25+
"react-medium-image-zoom": "^5.0.1",
2526
"sass": "^1.52.1",
2627
"sass-loader": "^13.0.0",
2728
"style-loader": "^3.3.1",

pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import '../src/styles/globals.scss'
2-
import '../src/assets/fontCss/icofont.css'
32

43
import type { AppProps } from 'next/app'
54
import Head from 'next/head'
@@ -13,6 +12,7 @@ import { CREATE_SEO_CONFIG } from '../src/utils/utils';
1312
import { ThemeProvider } from 'next-themes'
1413

1514
import "@uiw/react-textarea-code-editor/dist.css";
15+
import 'react-medium-image-zoom/dist/styles.css';
1616

1717

1818
function MyApp({ Component, pageProps }: AppProps) {

pages/about-us.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const AboutUs = () => {
1818
<a href="https://webexpe.com/" target="_blank" rel="noopener noreferrer" className="block md:w-[15%] w-[50%] ">
1919
<Image src="/public/images/YT Logo.png" size={ImageSize.DEFAULT} alt="webexpe.com" className="rounded-lg overflow-hidden" />
2020
</a>
21-
<Text title className='mb-5 mt-10 text-blue-600'>
21+
<Text title className='mb-5 mt-10 dark:text-sky-400 text-sky-600'>
2222
Hi we are WebExpe.
2323
</Text>
2424
<Text subtitle className='text-xl mb-5'>

pages/blog/tutorial/how-to-write-your-first-article.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const Article = () => {
7878
</li>
7979
<li>
8080
<b>thumbnail : </b>
81-
Save the image file in public-images folder and paste the image path. This will be displayed in article cards on home page
81+
Save the image file in public-images folder and paste the image path. This will be displayed in article cards on home page. For thumpbails the recommended size is <b>540x300px</b>.
8282
</li>
8383
<li>
8484
<b>shortIntro : </b>

pages/icons.tsx

Lines changed: 78 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
11
/**These are necessary imports / components for the page */
2-
import { ImageSize, TextAlign, ListType } from "../src/shared/enums";
3-
import { PageLayout, Text, List, Image, LinkTo, Seperator, Slider } from "../src/components";
4-
import { iconsArray } from "../src/constants/appConstants";
5-
import { combineClasses } from "../src/utils/utils";
2+
import { PageLayout, Text, LinkTo, Seperator, Image } from "../src/components";
3+
import CodeBlock from "../src/components/CodeBlock";
64
import { iSEO } from "../src/shared/interfaces";
5+
import { AiFillYoutube, AiFillTwitterCircle } from "react-icons/ai";
6+
import { BiAbacus, BiAdjust } from "react-icons/bi";
7+
8+
const HowToUseIcons = `
9+
// import icons from react-icons
10+
import { ..., AiFillYoutube } from "react-icons/ai";
11+
const Article = () => {
12+
return (
13+
<AiFillYoutube />
14+
{/*to change size*/}
15+
<AiFillYoutube className="text-[50px]" />
16+
{/*to change color*/}
17+
<AiFillYoutube className="text-[#631E9E]" />
18+
{/*to change color using tailwind css classes*/}
19+
<AiFillYoutube className="text-blue-600" />
20+
{/*to give paddings and margins*/}
21+
<AiFillYoutube className="ml-[15px] mr-[20px] p-[20px]" />
22+
{/*to use inline i.e one after other in a line*/}
23+
<AiFillYoutube className="inline-block" />
24+
)
25+
}
26+
27+
export default Article;
28+
`
29+
30+
const HowToUseDiffGroupIcons = `
31+
// icons from Ant Icons
32+
import { AiFillYoutube } from "react-icons/ai";
33+
// icons from BoxIcons
34+
import { BiAbacus, BiAdjust } from "react-icons/bi";
35+
const Article = () => {
36+
return (
37+
{/*icons from Ant Icons*/}
38+
<AiFillYoutube />
39+
<AiFillTwitterCircle />
40+
{/*icons from BoxIcons*/}
41+
<BiAbacus />
42+
<BiAdjust />
43+
)
44+
}
45+
46+
export default Article;
47+
`
748

849
const Icons = () => {
950
const PAGE_SEO: iSEO = {
@@ -17,28 +58,42 @@ const Icons = () => {
1758
<Text title className="text-3xl">
1859
Icons
1960
</Text>
20-
<p className="mb-10 mt-5">
21-
To use these icons, simply copy the text below the icon and paste in className in {"<i />"} tag, and to change the size and color of the icon use font attributes like text-sm or text-[12px] and text-blue-800 in className.
22-
23-
<br /> <br />
24-
<b>Example:</b> {' <i className="icon-A text-[80px] text-blue-800" />'}
25-
<br />
26-
<i className="icon-A text-[80px] text-blue-800" />
61+
<p className="my-5">
62+
We have used <b><LinkTo href="https://react-icons.github.io/react-icons">ReactIcons</LinkTo></b> in this project, so you use the icons please check the <u><LinkTo href="https://react-icons.github.io/react-icons">official website</LinkTo></u>.
2763
</p>
2864
<hr />
29-
<div className="flex flex-wrap justify-around">
30-
{
31-
iconsArray.map((icon, i) => {
32-
return (
33-
<div key={icon + i} className="flex flex-col text-center md:px-[46px] px-[30px] py-3" style={{ flexShrink: 0, minWidth: "100px" }} >
34-
35-
<i className={combineClasses(icon, 'text-[80px]')} />
36-
<p className="font-light text-sm mt-3">{icon}</p>
37-
</div>
38-
);
39-
})
40-
}
65+
<Text subtitle className="mt-5">
66+
How to use
67+
</Text>
68+
<CodeBlock code={HowToUseIcons} className="my-5" />
69+
<Text subtitle className="mt-5">
70+
Demo
71+
</Text>
72+
The above code block will show you the following icon. <br />
73+
<AiFillYoutube />
74+
{/*to change size*/}
75+
<AiFillYoutube className="text-[50px]" />
76+
{/*to change color*/}
77+
<AiFillYoutube className="text-[#631E9E]" />
78+
{/*to change color using tailwind css classes*/}
79+
<AiFillYoutube className="text-blue-600" />
80+
<Seperator dots />
81+
<Text subtitle className="mt-5">
82+
How to use different group/family of icons in ReactIcons,
83+
</Text>
84+
In react icons we have around 22 icons groups or types like <b>"Ant design icons, Bootstrap icons, Boxicons . . ."</b> etc. When you click on the sidebar list button we se a proper import statement and list of all icons in the icon group.
85+
<Image src="/public/imp_assets/tutorials/reacticons.png" alt="webexpe.com" caption="ReactIcons website screenshot" />
86+
here we can see each icons in <b>BoxIcons</b> there is a <b>"Bi"</b> prefix i.e each icon in <b>BoxIcons</b> start with a <b>"Bi"</b> like <b>"BiAbacus, BiAdjust . . ."</b> etc. so when want to use any icon from BoxIcons you have to import the icon as <b>{'import { IconName } from "react-icons/bi";'}</b>
87+
<CodeBlock code={HowToUseDiffGroupIcons} className="my-5" />
88+
<div className="text-4xl mb-2">
89+
<AiFillYoutube className="inline-block mr-3" />
90+
<AiFillTwitterCircle className="inline-block mr-3" />
91+
{/*icons from BoxIcons*/}
92+
<BiAbacus className="inline-block mr-3" />
93+
<BiAdjust className="inline-block " />
4194
</div>
95+
96+
<b>Note* :</b> when you search any icon using the search option in react icons, all the icons from different groups will be displayed mixed so to know from where to import the icons see the first 2 letters of the icon name then import that icon group.
4297
<div className="px-4 py-3 dark:bg-slate-800 bg-blue-200 rounded my-5">
4398
<Text p className="!text-lg leading-relaxed mb-0">
4499
For any any queries related to this project / template feel free to connect with us at <u>webexpe13@gmail.com</u>.

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Home = () => {
3737
</div>
3838
</div>
3939
</section>
40-
<div className="container mx-auto md:px-[15px] px-0">
40+
<div className="container mx-auto lg:px-[15px] px-0">
4141
<div className={'flex flex-wrap'}>
4242
<Text subtitle className="mb-5 md:!text-4xl text-3xl w-full px-3 !font-medium">
4343
Featured Articles
45.1 KB
Loading

0 commit comments

Comments
 (0)