├── src
├── assets
│ └── styles
│ │ └── img.jpg
├── react-app-env.d.ts
├── types
│ ├── index.d.ts
│ ├── Weather.ts
│ └── Country.ts
├── index.css
├── App.tsx
├── index.tsx
├── routes.tsx
├── components
│ ├── Navbar
│ │ ├── Link.tsx
│ │ ├── StaticNavbar.tsx
│ │ └── index.tsx
│ ├── Home
│ │ ├── Regions
│ │ │ ├── RegionCard.tsx
│ │ │ └── index.tsx
│ │ ├── About
│ │ │ ├── index.tsx
│ │ │ └── AboutCard.tsx
│ │ ├── Inspirations
│ │ │ ├── InspirationFooter.tsx
│ │ │ ├── InspirationCard.tsx
│ │ │ └── index.tsx
│ │ ├── Hero.tsx
│ │ ├── Nature.tsx
│ │ └── Destinations
│ │ │ └── index.tsx
│ └── Footer
│ │ ├── WeatherCard.tsx
│ │ └── index.tsx
├── utils
│ ├── weather.ts
│ └── country.ts
└── pages
│ └── index.tsx
├── public
├── robots.txt
├── monument-of-the-martyr.png
└── index.html
├── postcss.config.js
├── tailwind.config.js
├── .gitignore
├── tsconfig.json
├── package.json
└── README.md
/src/assets/styles/img.jpg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/src/types/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module "react-algeria-map";
2 | declare module "react-animated-bg";
3 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/public/monument-of-the-martyr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ramzykemmoun/discover-algeria-country/HEAD/public/monument-of-the-martyr.png
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: ["./src/**/*.{js,jsx,ts,tsx}"],
4 | theme: {
5 | extend: {},
6 | },
7 | plugins: [],
8 | };
9 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | html {
6 | scroll-behavior: smooth;
7 | }
8 | body {
9 | margin: 0;
10 | padding: 0;
11 | }
12 |
13 | *,
14 | *::after,
15 | *::before {
16 | box-sizing: border-box;
17 | }
18 |
--------------------------------------------------------------------------------
/src/App.tsx:
--------------------------------------------------------------------------------
1 | import Footer from "./components/Footer";
2 | import Navbar from "./components/Navbar";
3 | import Router from "./routes";
4 |
5 | function App() {
6 | return (
7 | <>
8 |
9 |
10 |
11 | >
12 | );
13 | }
14 |
15 | export default App;
16 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import "./index.css";
2 | import React from "react";
3 | import ReactDOM from "react-dom/client";
4 | import { BrowserRouter } from "react-router-dom";
5 | import App from "./App";
6 |
7 | const root = ReactDOM.createRoot(
8 | document.getElementById("root") as HTMLElement
9 | );
10 |
11 | root.render(
12 |
13 |
14 |
15 |
16 |
17 | );
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
25 | # Local Netlify folder
26 | .netlify
27 |
--------------------------------------------------------------------------------
/src/routes.tsx:
--------------------------------------------------------------------------------
1 | import { useLayoutEffect } from "react";
2 | import { useLocation, useRoutes } from "react-router-dom";
3 | import { AnimatePresence } from "framer-motion";
4 | import Home from "./pages";
5 |
6 | export default function Router() {
7 | const { pathname } = useLocation();
8 | useLayoutEffect(() => {
9 | document.documentElement.scrollTo({
10 | top: 0,
11 | left: 0,
12 | behavior: "smooth",
13 | });
14 | }, [pathname]);
15 |
16 | const routes = useRoutes([
17 | {
18 | path: "/",
19 | element: ,
20 | },
21 | ]);
22 |
23 | return {routes} ;
24 | }
25 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/src/components/Navbar/Link.tsx:
--------------------------------------------------------------------------------
1 | import c from "classnames";
2 |
3 | type Props = {
4 | text: string;
5 | section: string;
6 | };
7 |
8 | export default function Link({ text, section }: Props) {
9 | return (
10 |
11 |
12 |
13 | {text}
14 |
15 |
20 |
21 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/src/utils/weather.ts:
--------------------------------------------------------------------------------
1 | export const getWeather = async (place: string, signal: AbortSignal) => {
2 | const url = `http://api.weatherapi.com/v1/current.json?key=de645bc435ea4fbd811171251221510&q=${place}&aqi=no`;
3 | const response = await fetch(url, { signal });
4 | return await response.json();
5 | };
6 |
7 | export const formatTime = (time: Date) => {
8 | return (
9 | setZero(time.getHours()) +
10 | ":" +
11 | setZero(time.getMinutes()) +
12 | ":" +
13 | setZero(time.getSeconds())
14 | );
15 | };
16 |
17 | export const setZero = (number: number) => {
18 | if (number > 9) {
19 | return number;
20 | } else {
21 | return "0" + number;
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import Hero from "../components/Home/Hero";
2 | import Regions from "../components/Home/Regions";
3 | import Destinations from "../components/Home/Destinations";
4 | import Inspirations from "../components/Home/Inspirations";
5 | import Nature from "../components/Home/Nature";
6 | import About from "../components/Home/About";
7 |
8 | const Home = () => {
9 | return (
10 | <>
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 | >
22 | );
23 | };
24 |
25 | export default Home;
26 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
16 |
17 | Discover Algeria
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/utils/country.ts:
--------------------------------------------------------------------------------
1 | export const getCountry = async (signal: AbortSignal) => {
2 | const url = "https://restcountries.com/v3.1/name/Algeria";
3 | const response = await fetch(url, { signal });
4 | return await response.json();
5 | };
6 |
7 | export function formatNumber(num: number | undefined) {
8 | if (!num) return;
9 | var first = String(num).split(",");
10 | var digits = first[0].split("").reverse();
11 | var new_digits = [];
12 | for (var i = 0; i < digits.length; i++) {
13 | if ((i + 1) % 3 === 0) {
14 | new_digits.push(digits[i]);
15 | new_digits.push(".");
16 | } else {
17 | new_digits.push(digits[i]);
18 | }
19 | }
20 | var new_num = new_digits.reverse().join("");
21 | return new_num;
22 | }
23 |
--------------------------------------------------------------------------------
/src/components/Navbar/StaticNavbar.tsx:
--------------------------------------------------------------------------------
1 | import Link from "./Link";
2 | import logo from "../../assets/algeria.png";
3 |
4 | export default function StaticNavbar() {
5 | return (
6 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/src/components/Home/Regions/RegionCard.tsx:
--------------------------------------------------------------------------------
1 | type Props = {
2 | img: string;
3 | head: string;
4 | body: string;
5 | };
6 |
7 | export default function RegionCard(props: Props) {
8 | return (
9 |
10 |
11 |
16 |
17 |
18 |
19 | {props.head}
20 |
21 |
{props.body}
22 |
23 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/src/components/Home/About/index.tsx:
--------------------------------------------------------------------------------
1 | import AboutCard from "./AboutCard";
2 |
3 | export default function About() {
4 | return (
5 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/src/components/Home/Inspirations/InspirationFooter.tsx:
--------------------------------------------------------------------------------
1 | import { motion, Variants } from "framer-motion";
2 | import { FiMapPin } from "react-icons/fi";
3 | import { BiTime } from "react-icons/bi";
4 | type Props = {
5 | location: string;
6 | duration: string;
7 | };
8 |
9 | export default function InspirationFooter(props: Props) {
10 | return (
11 |
18 |
19 |
20 |
{props.location}
21 |
22 |
23 |
24 |
{props.duration}
25 |
26 |
27 | );
28 | }
29 |
30 | const variants: Variants = {
31 | initial: { y: 20 },
32 | animate: { y: 0 },
33 | exit: { y: 80 },
34 | };
35 |
--------------------------------------------------------------------------------
/src/components/Home/Hero.tsx:
--------------------------------------------------------------------------------
1 | import { motion } from "framer-motion";
2 | import classes from "../../assets/styles/main-hero.module.css";
3 |
4 | export default function Hero() {
5 | return (
6 |
7 |
8 |
14 | Destinations in Algeria
15 |
16 |
22 | Algerian regions and distinct seasons offer seemingly endless things
23 | to do and see.
24 |
25 |
26 |
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/src/types/Weather.ts:
--------------------------------------------------------------------------------
1 | export interface Weather {
2 | location: Location;
3 | current: Current;
4 | }
5 |
6 | export interface Current {
7 | last_updated_epoch: number;
8 | last_updated: string;
9 | temp_c: number;
10 | temp_f: number;
11 | is_day: number;
12 | condition: Condition;
13 | wind_mph: number;
14 | wind_kph: number;
15 | wind_degree: number;
16 | wind_dir: string;
17 | pressure_mb: number;
18 | pressure_in: number;
19 | precip_mm: number;
20 | precip_in: number;
21 | humidity: number;
22 | cloud: number;
23 | feelslike_c: number;
24 | feelslike_f: number;
25 | vis_km: number;
26 | vis_miles: number;
27 | uv: number;
28 | gust_mph: number;
29 | gust_kph: number;
30 | }
31 |
32 | export interface Condition {
33 | text: string;
34 | icon: string;
35 | code: number;
36 | }
37 |
38 | export interface Location {
39 | name: string;
40 | region: string;
41 | country: string;
42 | lat: number;
43 | lon: number;
44 | tz_id: string;
45 | localtime_epoch: number;
46 | localtime: string;
47 | }
48 |
--------------------------------------------------------------------------------
/src/components/Navbar/index.tsx:
--------------------------------------------------------------------------------
1 | import { motion, useScroll, Variants } from "framer-motion";
2 | import { useEffect, useState } from "react";
3 | import StaticNavbar from "./StaticNavbar";
4 |
5 | type Props = {};
6 |
7 | export default function Navbar(props: Props) {
8 | const { scrollY } = useScroll();
9 | const [hidden, setHidden] = useState(false);
10 | useEffect(() => {
11 | return scrollY.onChange((latest) => {
12 | if (latest < scrollY.getPrevious()) {
13 | setHidden(false);
14 | } else if (latest > 100 && latest > scrollY.getPrevious()) {
15 | setHidden(true);
16 | }
17 | });
18 | });
19 |
20 | return (
21 |
27 |
28 |
29 | );
30 | }
31 |
32 | const variants: Variants = {
33 | visible: { opacity: 1, y: 0 },
34 | hidden: { opacity: 0, y: -25 },
35 | };
36 |
--------------------------------------------------------------------------------
/src/components/Home/Nature.tsx:
--------------------------------------------------------------------------------
1 | import classes from "../../assets/styles/main-nature.module.css";
2 | import { motion } from "framer-motion";
3 |
4 | export default function Nature() {
5 | return (
6 |
9 |
16 | Nature in Algeria
17 |
18 |
25 | From Desert to endless green forests to vast arctic wilderness, Algerian
26 | nature is incredibly rich and accessible – even from within city limits.
27 |
28 |
32 | Explore Algerian nature
33 |
34 |
35 | );
36 | }
37 |
--------------------------------------------------------------------------------
/src/components/Home/Inspirations/InspirationCard.tsx:
--------------------------------------------------------------------------------
1 | import { AnimatePresence } from "framer-motion";
2 | import { useState } from "react";
3 | import InspirationFooter from "./InspirationFooter";
4 |
5 | type Props = {
6 | inspiration: {
7 | img: string;
8 | text: string;
9 | location: string;
10 | duration: string;
11 | };
12 | };
13 |
14 | export default function InspirationCard({ inspiration }: Props) {
15 | const [showFooter, setShowFooter] = useState(false);
16 | const onShowFooter = () => {
17 | setShowFooter(true);
18 | };
19 | const onHideFooter = () => {
20 | setShowFooter(false);
21 | };
22 | return (
23 |
31 |
36 |
37 | {inspiration.text}
38 |
39 |
40 | {showFooter && (
41 |
45 | )}
46 |
47 |
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "discover-algeria",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.5",
7 | "@testing-library/react": "^13.4.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "@types/jest": "^27.5.2",
10 | "@types/node": "^16.11.65",
11 | "@types/react": "^18.0.21",
12 | "@types/react-dom": "^18.0.6",
13 | "@types/react-router-dom": "^5.3.3",
14 | "classnames": "^2.3.2",
15 | "framer-motion": "^7.5.3",
16 | "react": "^18.2.0",
17 | "react-algeria-map": "^1.2.0",
18 | "react-dom": "^18.2.0",
19 | "react-icons": "^4.6.0",
20 | "react-router-dom": "^6.4.2",
21 | "react-scripts": "5.0.1",
22 | "swiper": "^8.4.4",
23 | "typescript": "^4.8.4",
24 | "web-vitals": "^2.1.4"
25 | },
26 | "scripts": {
27 | "start": "react-scripts start",
28 | "build": "react-scripts build",
29 | "test": "react-scripts test",
30 | "eject": "react-scripts eject"
31 | },
32 | "eslintConfig": {
33 | "extends": [
34 | "react-app",
35 | "react-app/jest"
36 | ]
37 | },
38 | "browserslist": {
39 | "production": [
40 | ">0.2%",
41 | "not dead",
42 | "not op_mini all"
43 | ],
44 | "development": [
45 | "last 1 chrome version",
46 | "last 1 firefox version",
47 | "last 1 safari version"
48 | ]
49 | },
50 | "devDependencies": {
51 | "autoprefixer": "^10.4.12",
52 | "postcss": "^8.4.18",
53 | "tailwindcss": "^3.1.8"
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/components/Footer/WeatherCard.tsx:
--------------------------------------------------------------------------------
1 | import { memo, useEffect, useState } from "react";
2 | import { formatTime, getWeather } from "../../utils/weather";
3 | import { Weather } from "../../types/Weather";
4 |
5 | function WeatherCard() {
6 | const [weather, setWeather] = useState();
7 | const [time, setTime] = useState(new Date());
8 |
9 | useEffect(() => {
10 | const abortController = new AbortController();
11 | getWeather("algiers", abortController.signal).then((data) =>
12 | setWeather(data)
13 | );
14 | let timer = setInterval(() => {
15 | setTime(new Date());
16 | }, 1000);
17 | return () => {
18 | abortController.abort();
19 | clearInterval(timer);
20 | };
21 | }, []);
22 | return (
23 |
24 | {/* Meteo */}
25 |
26 |
27 |
36 |
{weather?.current.temp_c || 27}°
37 |
38 |
{formatTime(time)}
39 |
40 | {/* City */}
41 |
42 | {weather?.location.name || "Algiers"}:{" "}
43 | {weather?.current.condition.text.toLowerCase() || "partly cloudy"}
44 |
45 |
46 | );
47 | }
48 |
49 | export default memo(WeatherCard);
50 |
--------------------------------------------------------------------------------
/src/types/Country.ts:
--------------------------------------------------------------------------------
1 | export interface Country {
2 | name: Name;
3 | tld: string[];
4 | cca2: string;
5 | ccn3: string;
6 | cca3: string;
7 | cioc: string;
8 | independent: boolean;
9 | status: string;
10 | unMember: boolean;
11 | currencies: Currencies;
12 | idd: Idd;
13 | capital: string[];
14 | altSpellings: string[];
15 | region: string;
16 | subregion: string;
17 | languages: Languages;
18 | translations: { [key: string]: Translation };
19 | latlng: number[];
20 | landlocked: boolean;
21 | borders: string[];
22 | area: number;
23 | demonyms: Demonyms;
24 | flag: string;
25 | maps: Maps;
26 | population: number;
27 | gini: Gini;
28 | fifa: string;
29 | car: Car;
30 | timezones: string[];
31 | continents: string[];
32 | flags: CoatOfArms;
33 | coatOfArms: CoatOfArms;
34 | startOfWeek: string;
35 | capitalInfo: CapitalInfo;
36 | postalCode: PostalCode;
37 | }
38 |
39 | export interface CapitalInfo {
40 | latlng: number[];
41 | }
42 |
43 | export interface Car {
44 | signs: string[];
45 | side: string;
46 | }
47 |
48 | export interface CoatOfArms {
49 | png: string;
50 | svg: string;
51 | }
52 |
53 | export interface Currencies {
54 | DZD: Dzd;
55 | }
56 |
57 | export interface Dzd {
58 | name: string;
59 | symbol: string;
60 | }
61 |
62 | export interface Demonyms {
63 | eng: Eng;
64 | fra: Eng;
65 | }
66 |
67 | export interface Eng {
68 | f: string;
69 | m: string;
70 | }
71 |
72 | export interface Gini {
73 | "2011": number;
74 | }
75 |
76 | export interface Idd {
77 | root: string;
78 | suffixes: string[];
79 | }
80 |
81 | export interface Languages {
82 | ara: string;
83 | }
84 |
85 | export interface Maps {
86 | googleMaps: string;
87 | openStreetMaps: string;
88 | }
89 |
90 | export interface Name {
91 | common: string;
92 | official: string;
93 | nativeName: NativeName;
94 | }
95 |
96 | export interface NativeName {
97 | ara: Translation;
98 | }
99 |
100 | export interface Translation {
101 | official: string;
102 | common: string;
103 | }
104 |
105 | export interface PostalCode {
106 | format: string;
107 | regex: string;
108 | }
109 |
--------------------------------------------------------------------------------
/src/components/Home/Regions/index.tsx:
--------------------------------------------------------------------------------
1 | import nord from "../../../assets/nord.jpg";
2 | import RegionCard from "./RegionCard";
3 | import { motion } from "framer-motion";
4 |
5 | export default function Regions() {
6 | return (
7 |
14 |
24 |
28 | {regions.map((region, key) => (
29 |
35 | ))}
36 |
37 |
38 | );
39 | }
40 |
41 | const regions: any[] = [
42 | {
43 | img: nord,
44 | head: "Algeirs",
45 | body: "Learn more about The Capital and organize a trip to experience the Northern Lights.",
46 | },
47 | {
48 | img: nord,
49 | head: "Constantine",
50 | body: "Discover Constantine, national parks and towns of the region during your trip to Algeria.",
51 | },
52 | {
53 | img: nord,
54 | head: "Tlemcen",
55 | body: "Charming seaside resort and the westernmost city of Algeria.",
56 | },
57 | {
58 | img: nord,
59 | head: "Sahara",
60 | body: "Learn what to do and see in the Algerian Desert, a place tourists love to visit for its beautiful landscapes.",
61 | },
62 | {
63 | img: nord,
64 | head: "Béjaïa",
65 | body: "Spend your summer by one or more of these Algerian lakes of Béjaïa.",
66 | },
67 | {
68 | img: nord,
69 | head: "Annaba",
70 | body: "Purest air in the world and winter activities from skiing to reindeer rides.",
71 | },
72 | ];
73 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | DEMO LINK : https://discover-algeria-country.netlify.app
4 |
5 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
6 |
7 | ## Available Scripts
8 |
9 | In the project directory, you can run:
10 |
11 | ### `npm start`
12 |
13 | Runs the app in the development mode.\
14 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
15 |
16 | The page will reload if you make edits.\
17 | You will also see any lint errors in the console.
18 |
19 | ### `npm test`
20 |
21 | Launches the test runner in the interactive watch mode.\
22 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
23 |
24 | ### `npm run build`
25 |
26 | Builds the app for production to the `build` folder.\
27 | It correctly bundles React in production mode and optimizes the build for the best performance.
28 |
29 | The build is minified and the filenames include the hashes.\
30 | Your app is ready to be deployed!
31 |
32 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
33 |
34 | ### `npm run eject`
35 |
36 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
37 |
38 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
39 |
40 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
41 |
42 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
43 |
44 | ## Learn More
45 |
46 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
47 |
48 | To learn React, check out the [React documentation](https://reactjs.org/).
49 |
50 | # discover-algeria-country
51 |
52 |
--------------------------------------------------------------------------------
/src/components/Home/Inspirations/index.tsx:
--------------------------------------------------------------------------------
1 | import { Navigation, Pagination, Scrollbar, A11y } from "swiper";
2 | import { Swiper, SwiperSlide } from "swiper/react";
3 | import InspirationCard from "./InspirationCard";
4 | import "swiper/css";
5 | import "swiper/css/navigation";
6 | import { motion } from "framer-motion";
7 | import nord from "../../../assets/nord.jpg";
8 |
9 | export default function Inspirations() {
10 | return (
11 |
19 |
30 |
43 | {inspirations.map((inspiration, key) => (
44 |
45 |
46 |
47 | ))}
48 |
49 |
50 | );
51 | }
52 |
53 | const inspirations: any[] = [
54 | {
55 | img: nord,
56 | text: "Learn About The History of Algeria",
57 | location: "Algeria",
58 | duration: "7 days",
59 | },
60 | {
61 | img: nord,
62 | text: "Learn About Islam",
63 | location: "Islamic World",
64 | duration: "30 days",
65 | },
66 | {
67 | img: nord,
68 | text: "Taste Algerian Cuisine",
69 | location: "Algeria",
70 | duration: "7 days",
71 | },
72 | {
73 | img: nord,
74 | text: "Take The Cable Car",
75 | location: "Belouizdad",
76 | duration: "5 min",
77 | },
78 |
79 | {
80 | img: nord,
81 | text: "Relax in the Botanical Garden Hamma",
82 | location: "Hamma",
83 | duration: "1 day",
84 | },
85 | ];
86 |
--------------------------------------------------------------------------------
/src/components/Footer/index.tsx:
--------------------------------------------------------------------------------
1 | import { Link } from "react-router-dom";
2 | import { BsLinkedin } from "react-icons/bs";
3 | import { AiFillFacebook } from "react-icons/ai";
4 | import { FaGithubSquare, FaYoutubeSquare } from "react-icons/fa";
5 | import classes from "../../assets/styles/footer.module.css";
6 | import logo from "../../assets/algeria.png";
7 | import WeatherCard from "./WeatherCard";
8 |
9 | export default function Footer() {
10 | return (
11 |
12 |
13 | {/* Logo */}
14 |
15 |
16 |
17 | Discover Algeria
18 |
19 |
20 |
21 | {/* ul container */}
22 |
23 |
24 | Work with us
25 | {links.map(([text, path], key) => (
26 |
27 | {text}
28 |
29 | ))}
30 |
31 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | );
54 | }
55 |
56 | const links = [
57 | ["Business Events", "/"],
58 | ["Media", "/"],
59 | ["Travel Trade", "/"],
60 | ];
61 |
62 | const socials = [
63 | [
64 | AiFillFacebook,
65 | "https://www.facebook.com/profile.php?id=100080514721686",
66 | "#3B5998",
67 | "fb",
68 | ],
69 | [
70 | FaGithubSquare,
71 | "https://github.com/ramzy1453/holy-quran-website",
72 | "#333",
73 | "gt",
74 | ],
75 | [
76 | FaYoutubeSquare,
77 | "https://www.youtube.com/watch?v=EskulLuwaGA",
78 | "#FF0000",
79 | "yt",
80 | ],
81 | [
82 | BsLinkedin,
83 | "https://www.linkedin.com/in/ramzy-kemmoun-1a3725237/",
84 | "#007BB5",
85 | "ld",
86 | ],
87 | ];
88 |
--------------------------------------------------------------------------------
/src/components/Home/Destinations/index.tsx:
--------------------------------------------------------------------------------
1 | import nord from "../../../assets/nord.jpg";
2 | import RegionCard from "../Regions/RegionCard";
3 | import { motion } from "framer-motion";
4 | type Props = {};
5 |
6 | export default function Destinations(props: Props) {
7 | return (
8 |
16 |
27 |
31 | {destinations.map((destination, key) => (
32 |
38 | ))}
39 |
40 |
41 | );
42 | }
43 |
44 | const destinations: any[] = [
45 | {
46 | img: nord,
47 | head: "Casbah of Algiers",
48 | body: "The upper old part of Algiers has interesting Moorish houses, minarets and old citadel.",
49 | },
50 | {
51 | img: nord,
52 | head: "Emir Abdelkader Mosque",
53 | body: "I visit so many mosques around the world but this one put me in tears as the beauty of the edifice is beyond any expectation!",
54 | },
55 | {
56 | img: nord,
57 | head: "Sidi M'Cid Bridge",
58 | body: "Very high bridge, We walked to cross it, it is very scary but amazing is the same time ! To do it again!",
59 | },
60 | {
61 | img: nord,
62 | head: "Pic des Singes",
63 | body: "Yet another great view is to be encountered here of the sea and the lighthouse. And don't forget the macaques ",
64 | },
65 | {
66 | img: nord,
67 | head: "Ahmed Bey Palace",
68 | body: "The palace was commissioned during the rule of Ahmed Bey ben Mohamed Chérif in 1825, Ahmad Bay summoned a Genovese engineer Chiavino, and two well known artists Al-Jabari and Al-Khatabi for the architectural design.",
69 | },
70 |
71 | {
72 | img: nord,
73 | head: "Palais des Rais",
74 | body: "Palais des Rais is an historic and architectural site. It is also a center of art and culture.",
75 | },
76 | ];
77 |
--------------------------------------------------------------------------------
/src/components/Home/About/AboutCard.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react";
2 | import { formatNumber, getCountry } from "../../../utils/country";
3 | import { Country } from "../../../types/Country";
4 | import { Map } from "react-algeria-map";
5 | export default function AboutCard() {
6 | const [country, setCountry] = useState();
7 | useEffect(() => {
8 | const abortController = new AbortController();
9 | getCountry(abortController.signal).then((data) => setCountry(data[0]));
10 | return () => {
11 | abortController.abort();
12 | };
13 | }, []);
14 | return (
15 |
16 |
20 |
21 |
26 |
{country?.name.common}
27 |
28 |
29 |
30 | Relgion : Islam
31 |
32 |
33 | Region : {country?.region}
34 |
35 |
36 | Sub region : {country?.subregion}
37 |
38 |
39 | Population :{" "}
40 | {formatNumber(country?.population)}
41 |
42 |
43 | Area :{" "}
44 | {formatNumber(country?.area)}
45 |
46 |
47 | Capital :{" "}
48 | {country?.capital.join(", ")}
49 |
50 |
51 | Top Level Domain :{" "}
52 | {country?.tld[0]}
53 |
54 |
55 | Currencies :{" "}
56 | {country?.currencies.DZD.name}
57 |
58 |
59 | Languages :{" "}
60 | {country?.languages.ara}
61 |
62 |
63 |
64 |
68 |
75 |
76 |
77 | );
78 | }
79 |
80 | const wilayas = [
81 | "Adrar",
82 | "Alger",
83 | "Annaba",
84 | "Aïn Defla",
85 | "Aïn Témouchent",
86 | "Batna",
87 | "Biskra",
88 | "Blida",
89 | "Bordj Badji Mokhtar",
90 | "Bordj Bou Arreridj",
91 | "Bouira",
92 | "Boumerdès",
93 | "Béchar",
94 | "Béjaïa",
95 | "Béni Abbès",
96 | "Chlef",
97 | "Constantine",
98 | "Djanet",
99 | "Djelfa",
100 | "El Bayadh",
101 | "El Meghaier",
102 | "El Menia",
103 | "El Oued",
104 | "El Tarf",
105 | "Ghardaïa",
106 | "Guelma",
107 | "Illizi",
108 | "In Guezzam",
109 | "In Salah",
110 | "Jijel",
111 | "Khenchela",
112 | "Laghouat",
113 | "M'Sila",
114 | "Mascara",
115 | "Mila",
116 | "Mostaganem",
117 | "Médéa",
118 | "Naâma",
119 | "Oran",
120 | "Ouargla",
121 | "Ouled Djellal",
122 | "Oum El Bouaghi",
123 | "Relizane",
124 | "Saïda",
125 | "Sidi Bel Abbès",
126 | "Skikda",
127 | "Souk Ahras",
128 | "Sétif",
129 | "Tamanrasset",
130 | "Timimoun",
131 | "Tindouf",
132 | "Tipaza",
133 | "Tissemsilt",
134 | "Tizi Ouzou",
135 | "Tlemcen",
136 | "Touggourt",
137 | "Tébessa",
138 | ];
139 |
140 | const objectWilaya: any = {};
141 | wilayas.forEach((wilaya) => {
142 | objectWilaya[wilaya] = wilaya;
143 | });
144 |
--------------------------------------------------------------------------------