React app
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

256 wiersze
10 KiB

  1. import React from "react";
  2. import styles from './Home.module.scss';
  3. import { ReactComponent as LogoIcon } from '../../assets/icons/anamnesis.svg';
  4. import { ReactComponent as SearchIcon } from '../../assets/icons/bx-search-alt.svg';
  5. import { ReactComponent as BookIcon } from '../../assets/icons/readme.svg';
  6. import { ReactComponent as BookMarkIcon } from '../../assets/icons/bookmark.svg';
  7. import { ReactComponent as BookShelfIcon } from '../../assets/icons/bookshelf.svg';
  8. import { ReactComponent as CalendarIcon } from '../../assets/icons/bx-calendar.svg';
  9. import { ReactComponent as TimeIcon } from '../../assets/icons/time.svg';
  10. import { ReactComponent as ActivityIcon } from '../../assets/icons/activity.svg';
  11. import { ReactComponent as CheckCircleIcon } from '../../assets/icons/check-circle.svg';
  12. import { ReactComponent as ExpandIcon } from '../../assets/icons/expand.svg';
  13. import { ReactComponent as PlusIcon } from '../../assets/icons/plus.svg';
  14. import { ReactComponent as GridIcon } from '../../assets/icons/circled.svg';
  15. import { ReactComponent as PersonSpeakerIcon } from '../../assets/icons/user-speaker.svg';
  16. import { ReactComponent as BrainIcon } from '../../assets/icons/bx-brain.svg';
  17. import { ReactComponent as InternBadge } from '../../assets/icons/intern-badge.svg';
  18. import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
  19. export const Home: React.FC = () => {
  20. return <section className="page">
  21. <header className={styles.pageHeader}>
  22. <LogoIcon />
  23. </header>
  24. <section className={styles.upfold}>
  25. <div className={styles.profileImage}>
  26. {/* eslint-disable-next-line */}
  27. <CircularProgressbar value={70} strokeWidth={4}
  28. styles={{
  29. path: {
  30. stroke: '#d45b63',
  31. strokeLinecap: 'round',
  32. },
  33. trail: {
  34. stroke: 'rgba(255, 255, 255, 0)',
  35. strokeLinecap: 'round',
  36. }}
  37. } />
  38. <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSERA5Pm3aRBV7AaI8tvpZfzpD24ZgrU1_8NA&usqp=CAU" alt="profile-image" />
  39. <InternBadge />
  40. </div>
  41. <div className={styles.userDetails}>
  42. <h2> Neymar Junior </h2>
  43. <div className={styles.stat}>
  44. <h5> 1.2K </h5>
  45. <label> Words </label>
  46. </div>
  47. <div className={styles.stat}>
  48. <h5> 10 </h5>
  49. <label> Shelves </label>
  50. </div>
  51. </div>
  52. </section>
  53. <div className={styles.searchBar}>
  54. <input type="text" placeholder={'Search and add a word'} />
  55. <SearchIcon />
  56. </div>
  57. <section className={styles.List}>
  58. <header className={styles.blockHeader}>
  59. <h4>
  60. <BookIcon />
  61. Revisions
  62. </h4>
  63. <button>
  64. <CalendarIcon />
  65. </button>
  66. </header>
  67. <ul>
  68. <li>
  69. <div className={styles.icon}>
  70. <TimeIcon />
  71. </div>
  72. <div className={styles.info}>
  73. <label> Upcoming </label>
  74. <span> 5 Words </span>
  75. </div>
  76. </li>
  77. <li>
  78. <div className={styles.icon}>
  79. <ActivityIcon />
  80. </div>
  81. <div className={styles.info}>
  82. <label> Active </label>
  83. <span> 1 Word </span>
  84. </div>
  85. </li>
  86. <li>
  87. <div className={styles.icon}>
  88. <CheckCircleIcon />
  89. </div>
  90. <div className={styles.info}>
  91. <label> Completed </label>
  92. <span> 18 Words </span>
  93. </div>
  94. </li>
  95. </ul>
  96. </section>
  97. <section className={styles.Shelf}>
  98. <header className={styles.blockHeader}>
  99. <h4>
  100. <BookShelfIcon />
  101. Active Shelves
  102. </h4>
  103. <button className={styles.expandButton}>
  104. <ExpandIcon />
  105. </button>
  106. <button>
  107. <PlusIcon />
  108. </button>
  109. </header>
  110. <ul>
  111. <li>
  112. <div className={styles.progress}>
  113. <CircularProgressbar value={30} strokeWidth={7}
  114. styles={{
  115. path: {
  116. stroke: 'white',
  117. strokeLinecap: 'round',
  118. },
  119. trail: {
  120. stroke: 'rgba(255, 255, 255, 0.25)',
  121. strokeLinecap: 'round',
  122. }}
  123. } />
  124. <span className={styles.text}> 30% </span>
  125. </div>
  126. <h5> All Words </h5>
  127. <p> Vocabulary </p>
  128. <p> 1.2K Words </p>
  129. </li>
  130. <li>
  131. <div className={styles.progress}>
  132. <CircularProgressbar value={50} strokeWidth={7}
  133. styles={{
  134. path: {
  135. stroke: 'white',
  136. strokeLinecap: 'round',
  137. },
  138. trail: {
  139. stroke: 'rgba(255, 255, 255, 0.25)',
  140. strokeLinecap: 'round',
  141. }}
  142. } />
  143. <span className={styles.text}> 50% </span>
  144. </div>
  145. <h5> IELTS Fundamentals </h5>
  146. <p> IELTS </p>
  147. <p> 250 Words </p>
  148. </li>
  149. <li>
  150. <div className={styles.progress}>
  151. <CircularProgressbar value={10} strokeWidth={7}
  152. styles={{
  153. path: {
  154. stroke: 'white',
  155. strokeLinecap: 'round',
  156. },
  157. trail: {
  158. stroke: 'rgba(255, 255, 255, 0.25)',
  159. strokeLinecap: 'round',
  160. }}
  161. } />
  162. <span className={styles.text}> 10% </span>
  163. </div>
  164. <h5> GRE Fundamentals </h5>
  165. <p> GRE </p>
  166. <p> 456 Words </p>
  167. </li>
  168. <li>
  169. <div className={styles.progress}>
  170. <CircularProgressbar value={25} strokeWidth={7}
  171. styles={{
  172. path: {
  173. stroke: 'white',
  174. strokeLinecap: 'round',
  175. },
  176. trail: {
  177. stroke: 'rgba(255, 255, 255, 0.25)',
  178. strokeLinecap: 'round',
  179. }}
  180. } />
  181. <span className={styles.text}> 25% </span>
  182. </div>
  183. <h5> Sapiens </h5>
  184. <p> Book </p>
  185. <p> 125 Words </p>
  186. </li>
  187. </ul>
  188. </section>
  189. <section className={styles.Grid}>
  190. <header className={styles.blockHeader}>
  191. <h4>
  192. <GridIcon />
  193. Categories
  194. </h4>
  195. <button className={styles.expandButton}>
  196. <ExpandIcon />
  197. </button>
  198. <button>
  199. <PlusIcon />
  200. </button>
  201. </header>
  202. <ul>
  203. <li>
  204. <div className={styles.icon}>
  205. <TimeIcon />
  206. </div>
  207. <div className={styles.info}>
  208. <label> Vocabulary </label>
  209. <span> 5 Shelves </span>
  210. </div>
  211. </li>
  212. <li>
  213. <div className={styles.icon}>
  214. <BookMarkIcon />
  215. </div>
  216. <div className={styles.info}>
  217. <label> Books </label>
  218. <span> 3 Shelves </span>
  219. </div>
  220. </li>
  221. <li>
  222. <div className={styles.icon}>
  223. <PersonSpeakerIcon />
  224. </div>
  225. <div className={styles.info}>
  226. <label> IELTS </label>
  227. <span> 5 Shelves </span>
  228. </div>
  229. </li>
  230. <li>
  231. <div className={styles.icon}>
  232. <BrainIcon />
  233. </div>
  234. <div className={styles.info}>
  235. <label> GRE </label>
  236. <span> 2 Shelves </span>
  237. </div>
  238. </li>
  239. </ul>
  240. </section>
  241. </section>
  242. }