Skip to content

Commit a75e6d1

Browse files
committed
Changed inital landing page
1 parent 170c503 commit a75e6d1

File tree

6 files changed

+193
-1846
lines changed

6 files changed

+193
-1846
lines changed

src/PPage/PLog.js

+41-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
1-
import React from 'react';
1+
import React, { useState} from 'react';
22
import { Link } from 'react-router-dom';
33
//import "assets/css/Login.css";
44

55
export default function LoginP() {
6-
function ButtonLink({ to, children }) {
7-
return <Link to={to}>
8-
<button className="btn btn-primary btn-block">{children}
9-
</button>
10-
</Link>;
11-
}
6+
7+
8+
9+
function handleLoginClick() {
10+
const halfCircleButtons = document.querySelectorAll('.half-circle-button');
11+
const login = document.getElementById('plog')
12+
const logo = document.getElementById('logo')
13+
const logoCaption = document.querySelector('.landing-page-logo-caption')
14+
console.log("HELLO")
15+
console.log(halfCircleButtons)
16+
login.style.transition = "opacity 0.5s ease-in-out"
17+
login.style.opacity = '0';
18+
halfCircleButtons.forEach(button => {
19+
button.style.opacity = '0.8';
20+
});
21+
// wait 0.5s for fade in and then sent tranzition back to width
22+
setTimeout(() => {
23+
login.style.display = 'none';
24+
halfCircleButtons.forEach(button => {
25+
button.style.transition = 'width 0.3s ease';
26+
});
27+
logo.classList.add('expand');
28+
logoCaption.style.transform = 'translate(0%, 220%)';
29+
30+
} , 500);
31+
setTimeout(() => {
32+
logoCaption.style.opacity = '1';
33+
}, 1500);
34+
}
35+
1236
return (
13-
<div className="container mt-5" style={{ backgroundColor: '#E0F1EF' }}>
37+
<div id="plog" className="container mt-5" style={{ backgroundColor: '#FFF' }}>
1438
<div className="row justify-content-center">
1539
<div className="col-md-6">
1640
<div className="card">
@@ -39,12 +63,19 @@ export default function LoginP() {
3963
/>
4064
</div>
4165
<div className="form-group">
42-
<ButtonLink to="/Chatbot">Login</ButtonLink>
66+
<button
67+
type="button"
68+
className="btn btn-primary"
69+
id="loginButton"
70+
onClick={handleLoginClick}
71+
>
72+
Login
73+
</button>
4374
</div>
4475
</form>
4576
<footer className="mt-4">
4677
<p className="text-center">
47-
First time? <Link to="/register">Create an account</Link>.
78+
First time? <a>Create an account</a>.
4879
</p>
4980
<p className="text-center">
5081
<Link to="/">Back to Homepage</Link>.

src/assets/img/alzi_logo.jpg

35.6 KB
Loading

src/bubbleButtons.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import './landing.css';
2+
import React from 'react';
3+
import { Link } from 'react-router-dom';
4+
5+
6+
function ButtonLink({ to, children, className }) {
7+
return <Link to={to}>
8+
<button className={className}>{children}
9+
</button>
10+
</Link>;
11+
}
12+
const BubbleButtons = () => {
13+
14+
return (
15+
<div>
16+
{/* <button className="half-circle-button left">
17+
<span>Patient Chatbot</span>
18+
</button> */}
19+
<ButtonLink to="/Chatbot" className="half-circle-button left" children="Patient Chatbot"/>
20+
<ButtonLink to="/admin/Dashboard" className="half-circle-button right" children="Caregiver Dashboard"/>
21+
</div>
22+
);
23+
};
24+
25+
export default BubbleButtons;

0 commit comments

Comments
 (0)