Skip to content

Commit

Permalink
Merge branch 'main' into rue-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhu-x committed Nov 15, 2021
2 parents ca164c0 + 811824f commit 86f57ac
Show file tree
Hide file tree
Showing 30 changed files with 179 additions and 103 deletions.
14 changes: 8 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,28 @@ group = 'com.amigo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

springBoot {
mainClass = 'com.amigo.app.AmigoApplication'
}

// run {
// mainClassName = 'com.amigo.logic.Driver'
// standardInput = System.in
// }

dependencies {
testImplementation 'junit:junit:4.13.1'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'junit:junit:4.13.1'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// implementation 'com.microsoft.sqlserver:mssql-jdbc:9.4.0.jre11'
runtimeOnly 'mysql:mysql-connector-java'
}

test {
useJUnitPlatform()

// log on console
testLogging {
events "passed", "skipped", "failed"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.amigo.app;
package com.amigo.control;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/amigo/control/LoginController.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ public class LoginController {
@GetMapping("/login")
public String showLoginPage(Model model) {
model.addAttribute("credentials", new Credentials());
return "login";
return "log-in";
}

/**
* Returns "greeting" once the system finds the html file and calls on it.
*/
@PostMapping("/auth")
@PostMapping("/login-success")
public String getCredentials(Model model, @ModelAttribute("credentials") Credentials cred) {
model.addAttribute("name", cred.getUsername());
return "greeting";
return "log-in-success";
}

}
82 changes: 76 additions & 6 deletions app/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html><!-- This site was created in Webflow. http:https://www.webflow.com -->
<!-- Last Published: Thu Nov 11 2021 22:18:47 GMT+0000 (Coordinated Universal Time) -->
<html lang="en" xmlns:th="http:https://www.thymeleaf.org">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test</title>
<meta charset="utf-8">
<title>CSC207 webapp final</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="Webflow" name="generator">
<link href="css/normalize.css" rel="stylesheet" type="text/css">
<link href="css/webflow.css" rel="stylesheet" type="text/css">
<link href="css/csc207-webapp-final.webflow.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script>
<script
type="text/javascript">WebFont.load({ google: { families: ["Raleway:regular,500,300italic,italic", "Just Me Again Down Here:regular", "Roboto:regular"] } });</script>
<script
type="text/javascript">!function (o, c) { var n = c.documentElement, t = " w-mod-"; n.className += t + "js", ("ontouchstart" in o || o.DocumentTouch && c instanceof DocumentTouch) && (n.className += t + "touch") }(window, document);</script>
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="images/webclip.png" rel="apple-touch-icon">
</head>
<body>
<p>Get your greeting <a href="/greeting">here</a></p>

<body class="body">
<div class="navigator-div">
<a href="index.html" aria-current="page" class="button-2 w-button w--current"><strong>Amigos</strong></a>
<a href="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/CSC207-UofT/course-project-super-turtle-hackers" target="_blank"
class="button w-button"><strong>SuperTurtleHackers</strong></a>
<link rel="prefetch" href="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/CSC207-UofT/course-project-super-turtle-hackers"><img
src="images/github.png" loading="lazy" width="38" alt="" class="image-9">
</div>
<div class="columns-3 w-row">
<div class="column-3 w-col w-col-6">
<div class="title-div-block">
<h1 class="amigos-title">Amigos</h1>
<div class="normal-text-style">From classmates to Amigos</div>
</div>
</div>
<div class="column-4 w-col w-col-6">
<div class="login-div-block-copy"><img src="images/Step1.png" loading="lazy" width="344"
sizes="(max-width: 479px) 72vw, (max-width: 767px) 344px, (max-width: 991px) 38vw, 344px"
srcset="images/Step1-p-500.png 500w, images/Step1-p-800.png 800w, images/Step1-p-1080.png 1080w, images/Step1.png 1440w"
alt="">
<div class="w-form">
<form id="email-form" name="email-form" data-name="Email Form"
redirect="https://csc207-webapp-final.webflow.io/create-account-1"
data-redirect="https://csc207-webapp-final.webflow.io/create-account-1" class="form">
<label for="name">Create Account</label>
<input type="email" class="text-field w-input" maxlength="256"
name="name" data-name="Name" placeholder="[email protected]" id="name"
required="">
<input type="text" class="text-field w-input" maxlength="256" name="First-Name"
data-name="First Name" placeholder="First Name" id="First-Name" required="">
<input type="text"
class="text-field w-input" maxlength="256" name="Last-Name" data-name="Last Name" placeholder="Last Name"
id="Last-Name" required="">
<input type="text" class="text-field w-input" maxlength="256" name="Password"
data-name="Password" placeholder="Password" id="Password" required="">
<input type="text"
class="text-field w-input" maxlength="256" name="Confirm-Password" data-name="Confirm Password"
placeholder="Confirm Password" id="Confirm-Password" required="">
<input type="submit" value="Register"
data-wait="Please wait..." class="submit-button-3 w-button">
</form>
<div class="w-form-done">
<div>Thank you! Your submission has been received!</div>
</div>
<div class="w-form-fail">
<div>Oops! Something went wrong while submitting the form.</div>
</div>
</div>
<a href="/login" class="button-4 w-button">Sign in</a>
</div>
</div>
</div>
<script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=6186d05657b40287f8dd3978"
type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
<script src="js/webflow.js" type="text/javascript"></script>
</body>

</html>
File renamed without changes.
51 changes: 0 additions & 51 deletions app/src/main/resources/templates/index.html

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html><!-- This site was created in Webflow. http:https://www.webflow.com -->
<!-- Last Published: Thu Nov 11 2021 22:18:47 GMT+0000 (Coordinated Universal Time) -->
<html data-wf-page="61886cd21368e698eecbba1e" data-wf-site="6186d05657b40287f8dd3978">
<html lang="en" xmlns:th="http:https://www.thymeleaf.org">

<head>
<meta charset="utf-8">
<title>Log in page</title>
Expand All @@ -12,17 +13,21 @@
<link href="css/webflow.css" rel="stylesheet" type="text/css">
<link href="css/csc207-webapp-final.webflow.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script>
<script type="text/javascript">WebFont.load({ google: { families: ["Raleway:regular,500,300italic,italic","Just Me Again Down Here:regular","Roboto:regular"] }});</script>
<!-- [if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif] -->
<script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script>
<script
type="text/javascript">WebFont.load({ google: { families: ["Raleway:regular,500,300italic,italic", "Just Me Again Down Here:regular", "Roboto:regular"] } });</script>
<script
type="text/javascript">!function (o, c) { var n = c.documentElement, t = " w-mod-"; n.className += t + "js", ("ontouchstart" in o || o.DocumentTouch && c instanceof DocumentTouch) && (n.className += t + "touch") }(window, document);</script>
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="images/webclip.png" rel="apple-touch-icon">
</head>

<body class="body">
<div class="navigator-div">
<a href="index.html" class="button-2 w-button"><strong>Amigos</strong></a>
<a href="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/CSC207-UofT/course-project-super-turtle-hackers" target="_blank" class="button w-button"><strong>SuperTurtleHackers</strong></a>
<link rel="prefetch" href="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/CSC207-UofT/course-project-super-turtle-hackers"><img src="images/github.png" loading="lazy" width="38" alt="" class="image-9">
<a href="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/CSC207-UofT/course-project-super-turtle-hackers" target="_blank"
class="button w-button"><strong>SuperTurtleHackers</strong></a>
<link rel="prefetch" href="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/CSC207-UofT/course-project-super-turtle-hackers"><img
src="images/github.png" loading="lazy" width="38" alt="" class="image-9">
</div>
<div class="columns-3 w-row">
<div class="column-3 w-col w-col-6">
Expand All @@ -33,11 +38,21 @@ <h1 class="amigos-title">Amigos</h1>
</div>
<div class="column-4 w-col w-col-6">
<div class="login-div-block">
<a href="https://csc207-webapp-final.webflow.io/" class="w-inline-block"><img src="images/arrow-left.png" loading="lazy" width="68" alt="" class="image-6"></a>
<a href="/" class="w-inline-block"><img src="images/arrow-left.png"
loading="lazy" width="68" alt="" class="image-6"></a>
<div class="w-form">
<form id="email-form" name="email-form" data-name="Email Form" redirect="https://csc207-webapp-final.webflow.io/log-in-successful-page" data-redirect="https://csc207-webapp-final.webflow.io/log-in-successful-page">
<div class="text-block-2"><strong>Username</strong></div><input type="text" class="text-field-2 w-input" maxlength="256" name="Username" data-name="Username" placeholder="Username" id="Username" required="">
<div class="text-block-2"><strong>Password</strong></div><input type="text" class="text-field-2 w-input" maxlength="256" name="Password" data-name="Password" placeholder="Password" id="Password" required=""><input type="submit" value="Continue &gt; " data-wait="Please wait..." class="submit-button-4 w-button">
<form id="email-form" name="email-form"
th:action="@{/login-success}" th:object="${credentials}" method="post">
<div class="text-block-2"><strong>Username</strong></div>
<input type="text" class="text-field-2 w-input" maxlength="256" name="Username"
placeholder="Username" id="Username" required=""
th:field="*{username}">
<div class="text-block-2"><strong>Password</strong></div>
<input type="text" class="text-field-2 w-input" maxlength="256" name="Password"
placeholder="Password" id="Password" required=""
th:field="*{password}">
<input type="submit" value="Continue &gt; " data-wait="Please wait..."
class="submit-button-4 w-button">
</form>
<div class="w-form-done">
<div>Thank you! Your submission has been received!</div>
Expand All @@ -49,8 +64,10 @@ <h1 class="amigos-title">Amigos</h1>
</div>
</div>
</div>
<script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=6186d05657b40287f8dd3978" type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="js/webflow.js" type="text/javascript"></script>
<!-- [if lte IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/placeholders/3.0.2/placeholders.min.js"></script><![endif] -->
<script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=6186d05657b40287f8dd3978"
type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
<script th:src="@{js/webflow.js}" type="text/javascript"></script>
</body>

</html>
13 changes: 0 additions & 13 deletions app/src/test/java/com/amigo/app/AmigoApplicationTests.java

This file was deleted.

Loading

0 comments on commit 86f57ac

Please sign in to comment.