diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..fae6117 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,53 @@ + + + + + https://mldl.study/ + 2025-11-04T12:23:46+00:00 + 1.00 + + + https://mldl.study/prerequisites + 2025-11-04T12:23:46+00:00 + 0.80 + + + https://mldl.study/machinelearning + 2025-11-04T12:23:46+00:00 + 0.80 + + + https://mldl.study/deeplearning + 2025-11-04T12:23:46+00:00 + 0.80 + + + https://mldl.study/genai + 2025-11-04T12:23:46+00:00 + 0.80 + + + https://mldl.study/questionbank + 2025-11-04T12:23:46+00:00 + 0.80 + + + https://mldl.study/books + 2025-11-04T12:23:46+00:00 + 0.80 + + + https://mldl.study/privacy + 2025-11-04T12:23:46+00:00 + 0.50 + + + https://mldl.study/terms + 2025-11-04T12:23:46+00:00 + 0.50 + + diff --git a/public/sitemap.xsl b/public/sitemap.xsl new file mode 100644 index 0000000..6fe8477 --- /dev/null +++ b/public/sitemap.xsl @@ -0,0 +1,72 @@ + + + + + + + + + + + Sitemap – mldl.study + + + +

📍 Sitemap – mldl.study

+ + + + + + + + + + + + +
URLLast Modified
+ + +
+
diff --git a/src/App.css b/src/App.css index cc740ca..704ee3f 100644 --- a/src/App.css +++ b/src/App.css @@ -1,4 +1,3 @@ -/* Remove the restrictive max-width and padding */ #root { width: 100%; margin: 0; diff --git a/src/App.jsx b/src/App.jsx index cd1fcff..05a83d5 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -11,6 +11,8 @@ import Books from './components/Books'; import Journey from './components/Journey'; import QuestionBank from './components/QuestionBank'; import Search from './components/Search'; +import PrivacyPolicy from './components/PrivacyPolicy'; +import TermsOfUse from './components/TermsOfUse'; import ReactGA from 'react-ga4'; const trackingId = import.meta.env.VITE_APP_GA_TRACKING_ID; if (trackingId) { @@ -32,6 +34,8 @@ const App = () => { } /> } /> } /> + } /> + } /> } /> diff --git a/src/components/BackToTopButton.jsx b/src/components/BackToTopButton.jsx new file mode 100644 index 0000000..794246f --- /dev/null +++ b/src/components/BackToTopButton.jsx @@ -0,0 +1,43 @@ +import React, { useState, useEffect } from 'react'; +import { ArrowUp } from 'lucide-react'; + +const BackToTopButton = () => { + const [isVisible, setIsVisible] = useState(false); + + // Show button when page is scrolled down + const toggleVisibility = () => { + if (window.scrollY > 300) { + setIsVisible(true); + } else { + setIsVisible(false); + } + }; + + // Scroll to top smoothly + const scrollToTop = () => { + window.scrollTo({ + top: 0, + behavior: 'smooth' + }); + }; + + useEffect(() => { + window.addEventListener('scroll', toggleVisibility); + + return () => { + window.removeEventListener('scroll', toggleVisibility); + }; + }, []); + + return ( + + ); +}; + +export default BackToTopButton; \ No newline at end of file diff --git a/src/components/Books.jsx b/src/components/Books.jsx index ecbbe9a..0edac34 100644 --- a/src/components/Books.jsx +++ b/src/components/Books.jsx @@ -1,9 +1,10 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState } from 'react'; import ReactGA from 'react-ga4'; import { Book, ExternalLink, Search } from 'lucide-react'; import Navbar from './Navbar'; import Footer from './Footer'; import { Helmet } from 'react-helmet'; +import useDarkMode from './useDarkMode'; const books = [ { title: 'Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow', author: 'Aurélien Géron', link: 'https://www.bayanbox.ir/view/9006149947423722897/Hands-On-Machine-Learning-with-Scikit-Learn-Keras-and-TensorFlow.pdf', category: 'Machine Learning' }, @@ -31,23 +32,10 @@ const articles = [ const Books = () => { ReactGA.send({ hitType: 'pageview', page: window.location.pathname }); - const [darkMode, setDarkMode] = useState(false); + const [darkMode, toggleDarkMode] = useDarkMode(); const [searchTerm, setSearchTerm] = useState(''); const [selectedCategory, setSelectedCategory] = useState('all'); - useEffect(() => { - const savedDarkMode = localStorage.getItem('darkMode') === 'true'; - setDarkMode(savedDarkMode); - document.documentElement.classList.toggle('dark', savedDarkMode); - }, []); - - const toggleDarkMode = () => { - const newDarkMode = !darkMode; - setDarkMode(newDarkMode); - document.documentElement.classList.toggle('dark', newDarkMode); - localStorage.setItem('darkMode', newDarkMode); - }; - const categories = ['all', ...new Set([...books, ...articles].map(item => item.category))]; const filteredBooks = books.filter(book => @@ -102,15 +90,18 @@ const Books = () => {
- +
setSearchTerm(e.target.value)} /> @@ -120,10 +111,12 @@ const Books = () => {
+