| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,3 @@ | |||
| 1 | + node_modules | ||
| 2 | + build | ||
| 3 | + package-lock.json | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + { | ||
| 2 | + "semi": true, | ||
| 3 | + "trailingComma": "all", | ||
| 4 | + "singleQuote": true, | ||
| 5 | + "printWidth": 80, | ||
| 6 | + "tabWidth": 2 | ||
| 7 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,7 @@ | |||
| 26 | 26 | "test": "react-scripts test", | |
| 27 | 27 | "eject": "react-scripts eject", | |
| 28 | 28 | "lint": "eslint src/**/*.{js,jsx} --fix", | |
| 29 | + "format": "prettier --write \"src/**/*.{js,jsx,css,json}\"", | ||
| 29 | 30 | "predeploy": "npm run build", | |
| 30 | 31 | "deploy": "gh-pages -d build -b gh-pages" | |
| 31 | 32 | }, | |
@@ -53,6 +54,7 @@ | |||
| 53 | 54 | "cross-env": "^10.1.0", | |
| 54 | 55 | "gh-pages": "^6.3.0", | |
| 55 | 56 | "postcss": "^8.5.6", | |
| 57 | + "prettier": "^3.6.2", | ||
| 56 | 58 | "tailwindcss": "^3.4.18" | |
| 57 | 59 | } | |
| 58 | 60 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,4 +16,4 @@ function App() { | |||
| 16 | 16 | ); | |
| 17 | 17 | } | |
| 18 | 18 | ||
| 19 | - export default App; | ||
| 19 | + export default App; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,20 +13,20 @@ import NotFoundPage from '../pages/NotFoundPage'; | |||
| 13 | 13 | ||
| 14 | 14 | const pageVariants = { | |
| 15 | 15 | initial: { | |
| 16 | - opacity: 0 | ||
| 16 | + opacity: 0, | ||
| 17 | 17 | }, | |
| 18 | 18 | in: { | |
| 19 | - opacity: 1 | ||
| 19 | + opacity: 1, | ||
| 20 | 20 | }, | |
| 21 | 21 | out: { | |
| 22 | - opacity: 0 | ||
| 23 | - } | ||
| 22 | + opacity: 0, | ||
| 23 | + }, | ||
| 24 | 24 | }; | |
| 25 | 25 | ||
| 26 | 26 | const pageTransition = { | |
| 27 | - type: "tween", | ||
| 28 | - ease: "easeInOut", | ||
| 29 | - duration: 0.3 | ||
| 27 | + type: 'tween', | ||
| 28 | + ease: 'easeInOut', | ||
| 29 | + duration: 0.3, | ||
| 30 | 30 | }; | |
| 31 | 31 | ||
| 32 | 32 | function AnimatedRoutes() { | |
@@ -35,18 +35,135 @@ function AnimatedRoutes() { | |||
| 35 | 35 | return ( | |
| 36 | 36 | <AnimatePresence mode="wait"> | |
| 37 | 37 | <Routes location={location} key={location.pathname}> | |
| 38 | - <Route path="/" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><HomePage /></motion.div>} /> | ||
| 39 | - <Route path="/blog" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><BlogPage /></motion.div>} /> | ||
| 40 | - <Route path="/blog/:slug" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><BlogPostPage /></motion.div>} /> | ||
| 41 | - <Route path="/projects" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><ProjectsPage /></motion.div>} /> | ||
| 42 | - <Route path="/projects/:slug" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><ProjectPage /></motion.div>} /> | ||
| 43 | - <Route path="/about" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><AboutPage /></motion.div>} /> | ||
| 44 | - <Route path="/logs" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><LogsPage /></motion.div>} /> | ||
| 45 | - <Route path="/logs/:slug" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><LogDetailPage /></motion.div>} /> | ||
| 46 | - <Route path="*" element={<motion.div initial="initial" animate="in" exit="out" variants={pageVariants} transition={pageTransition}><NotFoundPage /></motion.div>} /> | ||
| 38 | + <Route | ||
| 39 | + path="/" | ||
| 40 | + element={ | ||
| 41 | + <motion.div | ||
| 42 | + initial="initial" | ||
| 43 | + animate="in" | ||
| 44 | + exit="out" | ||
| 45 | + variants={pageVariants} | ||
| 46 | + transition={pageTransition} | ||
| 47 | + > | ||
| 48 | + <HomePage /> | ||
| 49 | + </motion.div> | ||
| 50 | + } | ||
| 51 | + /> | ||
| 52 | + <Route | ||
| 53 | + path="/blog" | ||
| 54 | + element={ | ||
| 55 | + <motion.div | ||
| 56 | + initial="initial" | ||
| 57 | + animate="in" | ||
| 58 | + exit="out" | ||
| 59 | + variants={pageVariants} | ||
| 60 | + transition={pageTransition} | ||
| 61 | + > | ||
| 62 | + <BlogPage /> | ||
| 63 | + </motion.div> | ||
| 64 | + } | ||
| 65 | + /> | ||
| 66 | + <Route | ||
| 67 | + path="/blog/:slug" | ||
| 68 | + element={ | ||
| 69 | + <motion.div | ||
| 70 | + initial="initial" | ||
| 71 | + animate="in" | ||
| 72 | + exit="out" | ||
| 73 | + variants={pageVariants} | ||
| 74 | + transition={pageTransition} | ||
| 75 | + > | ||
| 76 | + <BlogPostPage /> | ||
| 77 | + </motion.div> | ||
| 78 | + } | ||
| 79 | + /> | ||
| 80 | + <Route | ||
| 81 | + path="/projects" | ||
| 82 | + element={ | ||
| 83 | + <motion.div | ||
| 84 | + initial="initial" | ||
| 85 | + animate="in" | ||
| 86 | + exit="out" | ||
| 87 | + variants={pageVariants} | ||
| 88 | + transition={pageTransition} | ||
| 89 | + > | ||
| 90 | + <ProjectsPage /> | ||
| 91 | + </motion.div> | ||
| 92 | + } | ||
| 93 | + /> | ||
| 94 | + <Route | ||
| 95 | + path="/projects/:slug" | ||
| 96 | + element={ | ||
| 97 | + <motion.div | ||
| 98 | + initial="initial" | ||
| 99 | + animate="in" | ||
| 100 | + exit="out" | ||
| 101 | + variants={pageVariants} | ||
| 102 | + transition={pageTransition} | ||
| 103 | + > | ||
| 104 | + <ProjectPage /> | ||
| 105 | + </motion.div> | ||
| 106 | + } | ||
| 107 | + /> | ||
| 108 | + <Route | ||
| 109 | + path="/about" | ||
| 110 | + element={ | ||
| 111 | + <motion.div | ||
| 112 | + initial="initial" | ||
| 113 | + animate="in" | ||
| 114 | + exit="out" | ||
| 115 | + variants={pageVariants} | ||
| 116 | + transition={pageTransition} | ||
| 117 | + > | ||
| 118 | + <AboutPage /> | ||
| 119 | + </motion.div> | ||
| 120 | + } | ||
| 121 | + /> | ||
| 122 | + <Route | ||
| 123 | + path="/logs" | ||
| 124 | + element={ | ||
| 125 | + <motion.div | ||
| 126 | + initial="initial" | ||
| 127 | + animate="in" | ||
| 128 | + exit="out" | ||
| 129 | + variants={pageVariants} | ||
| 130 | + transition={pageTransition} | ||
| 131 | + > | ||
| 132 | + <LogsPage /> | ||
| 133 | + </motion.div> | ||
| 134 | + } | ||
| 135 | + /> | ||
| 136 | + <Route | ||
| 137 | + path="/logs/:slug" | ||
| 138 | + element={ | ||
| 139 | + <motion.div | ||
| 140 | + initial="initial" | ||
| 141 | + animate="in" | ||
| 142 | + exit="out" | ||
| 143 | + variants={pageVariants} | ||
| 144 | + transition={pageTransition} | ||
| 145 | + > | ||
| 146 | + <LogDetailPage /> | ||
| 147 | + </motion.div> | ||
| 148 | + } | ||
| 149 | + /> | ||
| 150 | + <Route | ||
| 151 | + path="*" | ||
| 152 | + element={ | ||
| 153 | + <motion.div | ||
| 154 | + initial="initial" | ||
| 155 | + animate="in" | ||
| 156 | + exit="out" | ||
| 157 | + variants={pageVariants} | ||
| 158 | + transition={pageTransition} | ||
| 159 | + > | ||
| 160 | + <NotFoundPage /> | ||
| 161 | + </motion.div> | ||
| 162 | + } | ||
| 163 | + /> | ||
| 47 | 164 | </Routes> | |
| 48 | 165 | </AnimatePresence> | |
| 49 | 166 | ); | |
| 50 | 167 | } | |
| 51 | 168 | ||
| 52 | - export default AnimatedRoutes; | ||
| 169 | + export default AnimatedRoutes; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,7 +28,7 @@ const CodeModal = ({ isOpen, onClose, children }) => { | |||
| 28 | 28 | > | |
| 29 | 29 | <motion.div | |
| 30 | 30 | className="relative bg-gray-800 rounded-lg shadow-lg p-6 w-3/4 h-3/4" | |
| 31 | - onClick={e => e.stopPropagation()} | ||
| 31 | + onClick={(e) => e.stopPropagation()} | ||
| 32 | 32 | initial={{ scale: 0.8, opacity: 0 }} | |
| 33 | 33 | animate={{ scale: 1, opacity: 1 }} | |
| 34 | 34 | exit={{ scale: 0.8, opacity: 0 }} | |
@@ -45,7 +45,9 @@ const CodeModal = ({ isOpen, onClose, children }) => { | |||
| 45 | 45 | language="jsx" | |
| 46 | 46 | PreTag="pre" | |
| 47 | 47 | className="overflow-auto h-full" | |
| 48 | - codeTagProps={{ style: { fontFamily: "'JetBrains Mono', monospace" } }} | ||
| 48 | + codeTagProps={{ | ||
| 49 | + style: { fontFamily: "'JetBrains Mono', monospace" }, | ||
| 50 | + }} | ||
| 49 | 51 | > | |
| 50 | 52 | {children} | |
| 51 | 53 | </SyntaxHighlighter> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,14 +36,19 @@ const ColorLegends = ({ onLegendClick, hiddenLegends }) => { | |||
| 36 | 36 | <div key={category} className="flex items-center mb-2"> | |
| 37 | 37 | <div | |
| 38 | 38 | className={`w-4 h-4 rounded-full mr-2 cursor-pointer ${ | |
| 39 | - hiddenLegends.includes(category) ? "opacity-50" : "opacity-100" | ||
| 39 | + hiddenLegends.includes(category) ? 'opacity-50' : 'opacity-100' | ||
| 40 | 40 | }`} | |
| 41 | - style={{ backgroundColor: categoryStyles[category].backgroundColor, border: `1px solid ${categoryStyles[category].borderColor}` }} | ||
| 41 | + style={{ | ||
| 42 | + backgroundColor: categoryStyles[category].backgroundColor, | ||
| 43 | + border: `1px solid ${categoryStyles[category].borderColor}`, | ||
| 44 | + }} | ||
| 42 | 45 | onClick={() => onLegendClick(category)} | |
| 43 | 46 | ></div> | |
| 44 | 47 | <span | |
| 45 | 48 | className={`cursor-pointer text-white font-light ${ | |
| 46 | - hiddenLegends.includes(category) ? "opacity-50 line-through" : "opacity-100" | ||
| 49 | + hiddenLegends.includes(category) | ||
| 50 | + ? 'opacity-50 line-through' | ||
| 51 | + : 'opacity-100' | ||
| 47 | 52 | }`} | |
| 48 | 53 | onClick={() => onLegendClick(category)} | |
| 49 | 54 | > | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,4 +26,4 @@ const Fez = () => ( | |||
| 26 | 26 | </svg> | |
| 27 | 27 | ); | |
| 28 | 28 | ||
| 29 | - export default Fez; | ||
| 29 | + export default Fez; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments