diff --git a/src/main/java/com/example/init/controllers/QuizController.java b/src/main/java/com/example/init/controllers/QuizController.java index f8fc358..2681886 100644 --- a/src/main/java/com/example/init/controllers/QuizController.java +++ b/src/main/java/com/example/init/controllers/QuizController.java @@ -1,11 +1,17 @@ package com.example.init.controllers; import com.example.init.models.Quiz; +import com.example.init.models.ResultsQuiz; +import com.example.init.repositories.CodersRepository; +import com.example.init.repositories.ResultsRepo; + import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import java.io.BufferedReader; import java.io.IOException; @@ -13,11 +19,17 @@ import java.lang.reflect.Type; import java.net.HttpURLConnection; import java.net.URL; +import java.security.Principal; import java.util.List; @Controller public class QuizController { + @Autowired + ResultsRepo resultsRepo; + @Autowired + CodersRepository codersRepository; + @GetMapping("/quiz") public String getQuiz(Model model) throws IOException { Gson gson = new Gson(); @@ -33,4 +45,18 @@ public String getQuiz(Model model) throws IOException { bufferedReader.close(); return "quiz"; } -} \ No newline at end of file + + @PostMapping("/submit") + public String submit(Model model, Principal principal) { + ResultsQuiz resultsQuiz = new ResultsQuiz(); + // ApplicationUser applicationUser = new ApplicationUser(); + Quiz quiz = new Quiz(); + // resultsQuiz.setTotalCorrect(quiz.getAnswers()); + resultsQuiz.setUsername(codersRepository.findByUsername(principal.getName())); + resultsQuiz.setTotalCorrect(resultsQuiz.getTotalCorrect()); + model.addAttribute("quiz", resultsRepo.save(resultsQuiz)); + return "result"; + + } + +} diff --git a/src/main/java/com/example/init/controllers/User.java b/src/main/java/com/example/init/controllers/User.java index 80f4938..ba4de92 100644 --- a/src/main/java/com/example/init/controllers/User.java +++ b/src/main/java/com/example/init/controllers/User.java @@ -1,8 +1,10 @@ package com.example.init.controllers; import com.example.init.models.Coders; +import com.example.init.models.Comment; import com.example.init.models.Post; import com.example.init.repositories.CodersRepository; +import com.example.init.repositories.CommentRepository; import com.example.init.repositories.ContentRepository; import org.springframework.beans.factory.annotation.Autowired; @@ -15,6 +17,7 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.view.RedirectView; @@ -22,6 +25,9 @@ import java.security.Principal; import java.util.ArrayList; import java.util.List; +import java.util.Set; + +import javax.transaction.Transactional; @Controller public class User { @@ -35,6 +41,9 @@ public class User { @Autowired ContentRepository contentRepository; + @Autowired + CommentRepository commentRepository; + @GetMapping("/signup") public String getSignUpPage() { return "signup"; @@ -93,6 +102,7 @@ public String getUsers(Model model, Principal principal) { model.addAttribute("allusers", users); Coders user = codersRepository.findByUsername(principal.getName()); model.addAttribute("username", user.getUsername()); + model.addAttribute("userProfile", user); return "users"; } @@ -108,8 +118,79 @@ public RedirectView followUser(@AuthenticationPrincipal Coders user, @RequestPar @GetMapping("/feed") public String getUsersInfo(@AuthenticationPrincipal Coders user, Model model) { Coders feed = codersRepository.findByUsername(user.getUsername()); - List following = feed.getFollowers(); + Set following = feed.getFollowers(); model.addAttribute("followers", following); + model.addAttribute("userProfile", feed); return "feed"; } + + @Transactional + @GetMapping("/delete/{id}") + public RedirectView deleteUserPost(@PathVariable String id, Principal principal, Model model) { + Post post = contentRepository.findById(Long.parseLong(id)).orElseThrow(); + Coders user = codersRepository.findByUsername(principal.getName()); + model.addAttribute("username", principal.getName()); + model.addAttribute("userProfile", user); + contentRepository.delete(post); + return new RedirectView("/profile"); + } + + @GetMapping("/edit/{id}") + public String showUpdateForm(@PathVariable("id") long id, Model model) { + Post post = contentRepository.findById(id) + .orElseThrow(() -> new IllegalArgumentException("Invalid user Id:" + id)); + model.addAttribute("post", post); + return "updateForm"; + } + + @PostMapping("/update/{id}") + public RedirectView updateUser(@PathVariable("id") long id, Post post) { + Post updatedPost = contentRepository.findById(id).orElseThrow(); + updatedPost.setBody(post.getBody()); + contentRepository.save(updatedPost); + return new RedirectView("/profile"); + } + + @PostMapping("/addComment") + public RedirectView addComment(Long id, String body) { + Post post = contentRepository.findById(id).get(); + System.out.println(post.getBody()); + Comment comment = new Comment(post, body); + commentRepository.save(comment); + System.out.println(comment.getBody()); + return new RedirectView("/post"); + } + + @GetMapping("/post") + public String getPost(Model model, @AuthenticationPrincipal Coders user) { + List posts = (List) codersRepository.findByUsername(user.getUsername()).getPosts(); + model.addAttribute("posts", posts); + return "post"; + } + + + + @GetMapping("/UserForm/{id}") + public String updateInfo(@PathVariable("id") long id, Model model) { + Coders userProfile = codersRepository.findById(id) + .orElseThrow(() -> new IllegalArgumentException("Invalid user Id:" + id)); + model.addAttribute("userProfile", userProfile); + return "UserInfoForm"; + } + + @Transactional + @PostMapping("/updateInfo/{id}") + public RedirectView updateInfo(@PathVariable("id") long id, Coders coder) { + Coders updatedCoder = codersRepository.findById(id).orElseThrow(); + updatedCoder.setEmail(coder.getEmail()); + updatedCoder.setUsername(coder.getUsername()); + updatedCoder.setPassword(coder.getPassword()); + updatedCoder.setFirstName(coder.getFirstName()); + updatedCoder.setLastName(coder.getLastName()); + updatedCoder.setDateOfBirth(coder.getDateOfBirth()); + updatedCoder.setBio(coder.getBio()); + codersRepository.save(updatedCoder); + return new RedirectView("/profile"); + } + } diff --git a/src/main/java/com/example/init/controllers/adminController.java b/src/main/java/com/example/init/controllers/adminController.java new file mode 100644 index 0000000..c5fa318 --- /dev/null +++ b/src/main/java/com/example/init/controllers/adminController.java @@ -0,0 +1,86 @@ +package com.example.init.controllers; + +import java.security.Principal; +import java.util.List; + +import javax.transaction.Transactional; + +import com.example.init.models.Coders; +import com.example.init.repositories.CodersRepository; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.view.RedirectView; + +@Controller +public class adminController { + @Autowired + CodersRepository codersRepository; + + @Autowired + BCryptPasswordEncoder bCryptPasswordEncoder; + + @GetMapping("/admin") + + String admin(Model model) { + List coders = codersRepository.findAll(); + model.addAttribute("coders", coders); + return "admin"; + } + + @PostMapping("/admin") + RedirectView addCoder(String email, String username, String password, String firstName, String lastName, + String dateOfBirth, String bio) { + + Coders newCoder = new Coders(email, username, bCryptPasswordEncoder.encode(password), firstName, lastName, + dateOfBirth, bio); + codersRepository.save(newCoder); + return new RedirectView("/admin"); + } + + @GetMapping("/coder") + public String getCoder(@RequestParam long id, Model model, Principal principal) { + Coders coder = codersRepository.findById(id).get(); + model.addAttribute("coder", coder); + return "coder"; + } + + @Transactional + @GetMapping("/del/{id}") + public RedirectView delete(@PathVariable String id, Principal principal, Model model) { + Coders coder = codersRepository.findById(Long.parseLong(id)).orElseThrow(); + model.addAttribute("coder", principal.getName()); + codersRepository.delete(coder); + return new RedirectView("/admin"); + } + + @GetMapping("/form/{id}") + public String showUpdateForm(@PathVariable("id") long id, Model model) { + Coders coder = codersRepository.findById(id) + .orElseThrow(() -> new IllegalArgumentException("Invalid user Id:" + id)); + model.addAttribute("coder", coder); + return "putForm"; + } + + @Transactional + @PostMapping("/upd/{id}") + public RedirectView updateUser(@PathVariable("id") long id, Coders coder) { + Coders updatedCoder = codersRepository.findById(id).orElseThrow(); + updatedCoder.setEmail(coder.getEmail()); + updatedCoder.setUsername(coder.getUsername()); + updatedCoder.setPassword(coder.getPassword()); + updatedCoder.setFirstName(coder.getFirstName()); + updatedCoder.setLastName(coder.getLastName()); + updatedCoder.setDateOfBirth(coder.getDateOfBirth()); + updatedCoder.setBio(coder.getBio()); + codersRepository.save(updatedCoder); + return new RedirectView("/admin"); + } + +} \ No newline at end of file diff --git a/src/main/java/com/example/init/models/Coders.java b/src/main/java/com/example/init/models/Coders.java index 1bfd666..776e9e5 100644 --- a/src/main/java/com/example/init/models/Coders.java +++ b/src/main/java/com/example/init/models/Coders.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Set; @Entity public class Coders implements UserDetails { @@ -28,11 +29,11 @@ public class Coders implements UserDetails { @OneToMany(mappedBy = "applicationUser", fetch = FetchType.EAGER) private List posts; - @ManyToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER) + @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name = "follower_follower", joinColumns = @JoinColumn(name = "from_id"), inverseJoinColumns = @JoinColumn(name = "to_id")) - List followers = new ArrayList<>(); + Set followers; @ManyToMany(mappedBy = "followers", fetch = FetchType.EAGER) - List following = new ArrayList<>(); + Set following; public Coders() { } @@ -147,19 +148,19 @@ public void setPosts(List posts) { this.posts = posts; } - public List getFollowers() { + public Set getFollowers() { return this.followers; } - public void setFollowers(List followers) { + public void setFollowers(Set followers) { this.followers = followers; } - public List getFollowing() { + public Set getFollowing() { return this.following; } - public void setFollowing(List following) { + public void setFollowing(Set following) { this.following = following; } diff --git a/src/main/java/com/example/init/models/Comment.java b/src/main/java/com/example/init/models/Comment.java new file mode 100644 index 0000000..77fbc3a --- /dev/null +++ b/src/main/java/com/example/init/models/Comment.java @@ -0,0 +1,63 @@ +package com.example.init.models; + +import javax.persistence.*; +import java.text.SimpleDateFormat; + +@Entity +public class Comment { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id", nullable = false) + private Long id; + + private String body; + + private String createdAt; + + @ManyToOne + @JoinColumn(name = "post_id") + private Post post; + + public Post getPost() { + return post; + } + + public Comment(Post post, String body) { + this.post = post; + this.body = body; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd.HH.mm"); + } + + public Comment() { + + } + + public void setPost(Post post) { + this.post = post; + } + + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body; + } + + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + +} diff --git a/src/main/java/com/example/init/models/Post.java b/src/main/java/com/example/init/models/Post.java index f8722c7..e4baff2 100644 --- a/src/main/java/com/example/init/models/Post.java +++ b/src/main/java/com/example/init/models/Post.java @@ -4,6 +4,7 @@ import java.sql.Timestamp; import java.text.SimpleDateFormat; +import java.util.List; @Entity public class Post { @@ -20,6 +21,9 @@ public class Post { private String createdAt; + @OneToMany(mappedBy = "post", fetch = FetchType.EAGER) + private List comments; + public Post() { } @@ -64,4 +68,12 @@ public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } + public List getComments() { + return comments; + } + + public void setComments(List comments) { + this.comments = comments; + } + } diff --git a/src/main/java/com/example/init/models/Quiz.java b/src/main/java/com/example/init/models/Quiz.java index 602e8ab..ba5055f 100644 --- a/src/main/java/com/example/init/models/Quiz.java +++ b/src/main/java/com/example/init/models/Quiz.java @@ -17,6 +17,9 @@ public class Quiz { public String category; public String difficulty; + public Quiz() { + } + public Quiz(int id, String question, Object description, Answers answers, String multiple_correct_answers, CorrectAnswers correct_answers, String correct_answer, Object explanation, Object tip, List tags, String category, String difficulty) { diff --git a/src/main/java/com/example/init/models/ResultsQuiz.java b/src/main/java/com/example/init/models/ResultsQuiz.java new file mode 100644 index 0000000..2129bf1 --- /dev/null +++ b/src/main/java/com/example/init/models/ResultsQuiz.java @@ -0,0 +1,52 @@ +package com.example.init.models; + +import javax.persistence.*; + +@Entity +@Table(name = "results") +public class ResultsQuiz { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + // @Column(name = "id", nullable = false) + private int id; + @ManyToOne + @JoinColumn(name = "username_id") + public Coders username; + public int totalCorrect; + + public ResultsQuiz() { + } + + public ResultsQuiz(int id, Coders username, int totalCorrect) { + this.id = id; + this.username = username; + this.totalCorrect = totalCorrect; + } + + public int getId() { + return id; + } + + public Coders getUsername() { + return username; + } + + public void setUsername(Coders username) { + this.username = username; + } + + public int getTotalCorrect() { + return totalCorrect; + } + + public void setTotalCorrect(int totalCorrect) { + this.totalCorrect = totalCorrect; + } + // public Long getId() { + // return id; + // } + // + // public void setId(Long id) { + // this.id = id; + // } +} diff --git a/src/main/java/com/example/init/repositories/CodersRepository.java b/src/main/java/com/example/init/repositories/CodersRepository.java index dde97d9..6673df8 100644 --- a/src/main/java/com/example/init/repositories/CodersRepository.java +++ b/src/main/java/com/example/init/repositories/CodersRepository.java @@ -8,5 +8,5 @@ public interface CodersRepository extends JpaRepository { public Coders findByUsername(String username); - // public Coders findUserById(Long id); + public Coders findUserById(Long id); } \ No newline at end of file diff --git a/src/main/java/com/example/init/repositories/CommentRepository.java b/src/main/java/com/example/init/repositories/CommentRepository.java new file mode 100644 index 0000000..8d83884 --- /dev/null +++ b/src/main/java/com/example/init/repositories/CommentRepository.java @@ -0,0 +1,9 @@ +package com.example.init.repositories; + +import com.example.init.models.Comment; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface CommentRepository extends JpaRepository { +} \ No newline at end of file diff --git a/src/main/java/com/example/init/repositories/ContentRepository.java b/src/main/java/com/example/init/repositories/ContentRepository.java index e015895..5ea295f 100644 --- a/src/main/java/com/example/init/repositories/ContentRepository.java +++ b/src/main/java/com/example/init/repositories/ContentRepository.java @@ -7,4 +7,7 @@ @Repository public interface ContentRepository extends JpaRepository { public Post findPostById(Long id); + + // void deletePostByAppUser_UsernameAndId(String username, Long id); + } diff --git a/src/main/java/com/example/init/repositories/ResultsRepo.java b/src/main/java/com/example/init/repositories/ResultsRepo.java new file mode 100644 index 0000000..a9b61c4 --- /dev/null +++ b/src/main/java/com/example/init/repositories/ResultsRepo.java @@ -0,0 +1,9 @@ +package com.example.init.repositories; + +import com.example.init.models.ResultsQuiz; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ResultsRepo extends JpaRepository { +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f03a366..1834ae5 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,21 @@ -spring.sql.init.platform=postgres -spring.datasource.url=jdbc:postgresql://localhost:5432/coders -spring.datasource.username=abdelqader -spring.datasource.password=0000 -spring.jpa.database=postgresql -spring.jpa.generate-ddl=true -spring.jpa.hibernate.ddl-auto=update +server.port=8081 + +# Connect to the Database +## default connection pool +spring.datasource.hikari.connectionTimeout=20000 +spring.datasource.hikari.maximumPoolSize=5 +spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true +## PostgreSQL +spring.datasource.url=jdbc:postgresql://localhost:5432/postgres +spring.datasource.username= postgres +spring.datasource.password=1234 + +spring.jpa.show-sql=true +spring.jpa.generate-ddl=false +spring.jpa.open-in-view=false +spring.jpa.properties.hibernate.show_sql=true +spring.jpa.properties.hibernate.format_sql=true +spring.jpa.properties.hibernate.type=trace + +#drop n create table again, good for testing, comment this in production +spring.jpa.hibernate.ddl-auto=create \ No newline at end of file diff --git a/src/main/resources/templates/Init.png b/src/main/resources/templates/Init.png new file mode 100644 index 0000000..0da98fb Binary files /dev/null and b/src/main/resources/templates/Init.png differ diff --git a/src/main/resources/templates/UserInfoForm.html b/src/main/resources/templates/UserInfoForm.html new file mode 100644 index 0000000..9d6eeb6 --- /dev/null +++ b/src/main/resources/templates/UserInfoForm.html @@ -0,0 +1,108 @@ + + + + + Update Form + + + +
+ +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ +
+ + diff --git a/src/main/resources/templates/admin.html b/src/main/resources/templates/admin.html new file mode 100644 index 0000000..88d419a --- /dev/null +++ b/src/main/resources/templates/admin.html @@ -0,0 +1,132 @@ + + + + + + + + Admin Panel + + +
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
IdFirst NameLast NameHandle
+ + 🖍 +
+
+ + diff --git a/src/main/resources/templates/courses.html b/src/main/resources/templates/courses.html index 072ca64..76fcf91 100644 --- a/src/main/resources/templates/courses.html +++ b/src/main/resources/templates/courses.html @@ -3,8 +3,17 @@ Courses Page + + Admin Panel +
+ diff --git a/src/main/resources/templates/designFirstSection.png b/src/main/resources/templates/designFirstSection.png new file mode 100644 index 0000000..032afa8 Binary files /dev/null and b/src/main/resources/templates/designFirstSection.png differ diff --git a/src/main/resources/templates/feed.html b/src/main/resources/templates/feed.html index 95ea331..3e0ca98 100644 --- a/src/main/resources/templates/feed.html +++ b/src/main/resources/templates/feed.html @@ -7,15 +7,24 @@ Feed page + + Admin Panel +
+

Feed Posts

Username:
diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html index 033f5e1..3ce61b5 100644 --- a/src/main/resources/templates/home.html +++ b/src/main/resources/templates/home.html @@ -1,12 +1,453 @@ - + + - Hello + Init home + + + + + + + -

Hello World

+ + +
+ + + + Login + + +
+ + + +
+ + + +
+ + +
+

+ Find your community and enjoy the process of learning <coding/> +

+
+ + +
+
+ + +
+ designFirstSection +
+ +
+
+
+

Why Init?

+

Init will initialize you to get involved with the coding community.

+

also it will provide you with everything you need to start.

+
+
+ + +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ + + + +
+
+

Interactive

+

Init will help you to collaborate, share ideas, and get the help from other programmers.

+
+ +
+ hands +
+ +
+ +
+ +
+ logo +
+ +
+

Quizes

+

Your coding and thinking skills will get better everyday, as we provide quizes for you to solve it and practice.

+

each quiz you solve you will git extra points, that you can use for buying courses from our website.

+ +
+ + + + +
+ + + + +
+ + + + + - + \ No newline at end of file diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 1fbc38b..08989a4 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -1,29 +1,35 @@ - - - + + + login - - - -
+ + + + +
Invalid username and password.
+
You have been logged out.
-
- Invalid username and password. -
-
- You have been logged out. -
- -
+
- -
-
+ +
+
- -
- - - - \ No newline at end of file + +
+ + + + diff --git a/src/main/resources/templates/nav.html b/src/main/resources/templates/nav.html new file mode 100644 index 0000000..c762fff --- /dev/null +++ b/src/main/resources/templates/nav.html @@ -0,0 +1,40 @@ + diff --git a/src/main/resources/templates/navbar.html b/src/main/resources/templates/navbar.html new file mode 100644 index 0000000..52033f1 --- /dev/null +++ b/src/main/resources/templates/navbar.html @@ -0,0 +1,29 @@ + diff --git a/src/main/resources/templates/post.html b/src/main/resources/templates/post.html new file mode 100644 index 0000000..b871ca0 --- /dev/null +++ b/src/main/resources/templates/post.html @@ -0,0 +1,40 @@ + + + + + Title + + +
+
+ + +
+
+

+

+
+
+ + +
+
+

+ + + + +
+
+
+

+

+
+
+
+ +
+ + + + diff --git a/src/main/resources/templates/profile.html b/src/main/resources/templates/profile.html index 48d79a4..c4a8a25 100644 --- a/src/main/resources/templates/profile.html +++ b/src/main/resources/templates/profile.html @@ -1,48 +1,545 @@ - + user profile + + + + + -
- ProfilePicture -
- -

-

-

+ +

+ + -
- -
-
- -
-
-
- - -
- + + + +
+
+
+ hero +
+
+ + + +
+
+ profile-pic + +

sara alllllllll;;;

+ + + + +

hotmail@hotmail

+ + + + +

Bio

+
+

hii i love code

+
+

Data of birth

+

30/4/1996

+
-
-
+ -
-
-Posts +

Posts

+ + +
+
+
+
+
+ + +
+ +
+
+
+ +
+
+ + + + +
+
+ + + +
+
+ +

username

+

2012/11/11 30:3

+

hi i love code

+ + + + delete + + + + + edit + + +
+ + +
+ + +
+
+ +
+ + + + +
+ + + + +
+
+

2012/3/3 45:8

+

wow i like coding tooo

+ +
+
+ + + + + + +
+ + + + + -
-
-
-

-

-
-
+ + +
+ + + + +
+ + \ No newline at end of file diff --git a/src/main/resources/templates/putForm.html b/src/main/resources/templates/putForm.html new file mode 100644 index 0000000..f325b48 --- /dev/null +++ b/src/main/resources/templates/putForm.html @@ -0,0 +1,108 @@ + + + + + Update Form + + + +
+ +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ +
+ + diff --git a/src/main/resources/templates/quiz.html b/src/main/resources/templates/quiz.html index b3041e1..f05bffe 100644 --- a/src/main/resources/templates/quiz.html +++ b/src/main/resources/templates/quiz.html @@ -1,37 +1,88 @@ - - + + + + + Quiz Page - - - - - - - - -
- -
- -

-

-

-

-

-

- -

-

-

-

-

-

- < - - - + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+

Only Select The Correct Answers

+ +
+
+ + +
+ +

+
+ +
+ +

+
+ +
+ +

+
+ + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/result.html b/src/main/resources/templates/result.html new file mode 100644 index 0000000..c4305ba --- /dev/null +++ b/src/main/resources/templates/result.html @@ -0,0 +1,49 @@ + + + + + Result Page + + +
+
+

Your Score

+ +
+

+
+ +
+

Total correct answer:  

+

+
+ +
+

Total false answer:  

+

+
+ +
+ + +
+
+
+ + diff --git a/src/main/resources/templates/updateForm.html b/src/main/resources/templates/updateForm.html new file mode 100644 index 0000000..6631d73 --- /dev/null +++ b/src/main/resources/templates/updateForm.html @@ -0,0 +1,21 @@ + + + + + Update Form + + +
+ +
+ + + +
+ + diff --git a/src/main/resources/templates/user.html b/src/main/resources/templates/user.html index eb882c8..0b0e30e 100644 --- a/src/main/resources/templates/user.html +++ b/src/main/resources/templates/user.html @@ -11,6 +11,8 @@ /> +
+
Suggest Friends +
+