Changeset e958037 for reactapp/src
- Timestamp:
- 07/30/22 20:37:52 (2 years ago)
- Branches:
- main
- Children:
- 5347491
- Parents:
- 2998dc4
- Location:
- reactapp/src
- Files:
-
- 3 added
- 4 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/App.js
r2998dc4 re958037 1 import { Outlet, Link, useParams } from "react-router-dom"; 1 import { Outlet } from "react-router-dom"; 2 import { MainWrapper, MainTitle } from "./Components/Main.style"; 2 3 3 4 export default function App() { 5 //document.body.style = "background: red;"; 4 6 return ( 5 <div> 6 <h1>profesori.mk</h1> 7 <MainWrapper> 8 <style> 9 @import 10 url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'); 11 </style> 12 <style> 13 { 14 "body { background-color: papayawhip;} * {margin: 0; padding: 0; box-sizing: border-box;}" 15 } 16 </style> 17 <MainTitle>profesori.mk</MainTitle> 7 18 <Outlet /> 8 </ div>19 </MainWrapper> 9 20 ); 10 21 } -
reactapp/src/Components/OpinionTree.js
r2998dc4 re958037 1 import { OpinionCard } from "./OpinionCard.style"; 2 1 3 function OpinionTree({ professor }) { 2 4 var renderedOpinionIds = []; … … 8 10 return ( 9 11 <div key={child.postId}> 10 <p>{child.author.username} реплицирал</p> 12 <p> 13 <a href="#">{child.author.username}</a> реплицирал 14 </p> 11 15 <p>Содржина: {child.content}</p> 12 16 {child.children.map((childOfChild) => displayChildPosts(childOfChild))} … … 22 26 return ( 23 27 <div key={opinion.postId}> 24 <p>{opinion.author.username} напишал</p> 25 <p>Наслов: {opinion.title}</p> 26 <p>Содржина: {opinion.content}</p> 28 <OpinionCard> 29 <p> 30 <a href="#">{opinion.author.username}</a> напишал 31 </p> 32 33 <p>{opinion.title}</p> 34 <p>{opinion.content}</p> 35 <p>{Date(opinion.timePosted)}</p> 36 </OpinionCard> 27 37 {opinion.children.map((child) => displayChildPosts(child))} 28 <hr />29 38 </div> 30 39 ); -
reactapp/src/Pages/Professor.js
r2998dc4 re958037 3 3 import JSOG from "jsog"; 4 4 import OpinionTree from "../Components/OpinionTree"; 5 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; 6 import { 7 solid, 8 regular, 9 brands, 10 } from "@fortawesome/fontawesome-svg-core/import.macro"; 11 12 import { 13 ProfessorCard, 14 ProfessorCardDetails, 15 ProfessorCardName, 16 ProfessorCardSeparator, 17 } from "../Components/ProfessorCard.style"; 5 18 6 19 function Professor(props) { … … 32 45 return ( 33 46 <div> 34 <h2>{professor.professorName}</h2> 35 <h3>{professor.faculty.facultyName}</h3> 36 <h3>Мислења</h3> 47 <ProfessorCard> 48 <ProfessorCardName>{professor.professorName}</ProfessorCardName> 49 <ProfessorCardSeparator /> 50 <div style={{ marginTop: "20px" }}> 51 <ProfessorCardDetails fontSize="20px"> 52 {professor.faculty.facultyName} 53 </ProfessorCardDetails> 54 <ProfessorCardDetails fontSize="15px"> 55 {professor.faculty.university.universityName} 56 </ProfessorCardDetails> 57 </div> 58 </ProfessorCard> 59 <h3>{professor.relatedOpinions.length} мислења</h3> 37 60 <div className="opinionTree"> 38 61 <OpinionTree professor={professor} />
Note:
See TracChangeset
for help on using the changeset viewer.