Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
students
survey
Commits
9eba4e12
Commit
9eba4e12
authored
Jun 24, 2022
by
Jiwon Yoon
Browse files
Header navigation
parent
8232407d
Changes
5
Hide whitespace changes
Inline
Side-by-side
frontend/src/App.tsx
View file @
9eba4e12
import
React
from
"
react
"
;
import
HomePage
from
"
./Pages/HomePage
"
;
//
import LoginPage from "./Pages/LoginPage";
//
import SignUpPage from "./Pages/SignUpPage";
import
LoginPage
from
"
./Pages/LoginPage
"
;
import
SignUpPage
from
"
./Pages/SignUpPage
"
;
import
{
BrowserRouter
,
Route
,
Routes
}
from
"
react-router-dom
"
;
import
"
tailwindcss/tailwind.css
"
;
...
...
@@ -10,8 +10,8 @@ export const App = () => {
<
BrowserRouter
>
<
Routes
>
<
Route
path
=
"/"
element
=
{
<
HomePage
/>
}
>
{
/*
<Route path="login" element={<LoginPage />} />
<Route path="signup" element={<SignUpPage />} />
*/
}
<
Route
path
=
"login"
element
=
{
<
LoginPage
/>
}
/>
<
Route
path
=
"signup"
element
=
{
<
SignUpPage
/>
}
/>
</
Route
>
</
Routes
>
</
BrowserRouter
>
...
...
frontend/src/Components/Header.tsx
0 → 100644
View file @
9eba4e12
import
React
from
"
react
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
"
tailwindcss/tailwind.css
"
;
type
HeaderProps
=
{
};
const
Header
=
({
}:
HeaderProps
)
=>
(
<
div
className
=
"bg-white border-b-2 border-b-themeColor px-2 sm:px-4 py-2.5 dark:bg-gray-800"
>
<
div
className
=
"container flex flex-wrap justify-between items-center mx-auto"
>
<
Link
to
=
"/"
className
=
"font-bold text-2xl text-themeColor"
>
Simple Survey Form
</
Link
>
<
div
className
=
"md:flex items-center justify-end md:flex-1 lg:w-0"
>
<
Link
to
=
"/login"
className
=
"whitespace-nowrap font-bold text-gray-600 hover:text-themeColor mx-1 py-2 px-3 rounded-md"
>
Login
</
Link
>
<
Link
to
=
"/signup"
className
=
"whitespace-nowrap font-bold text-white hover:bg-blue-500 mx-1 py-2 px-3 bg-themeColor rounded-md "
>
Sign Up
</
Link
>
</
div
>
</
div
>
</
div
>
);
export
default
Header
;
\ No newline at end of file
frontend/src/Pages/HomePage.tsx
View file @
9eba4e12
import
React
from
"
react
"
;
import
Header
from
"
../Components/Header
"
;
import
"
tailwindcss/tailwind.css
"
;
import
{
Outlet
}
from
"
react-router-dom
"
;
type
HomeProps
=
{
title
?:
string
;
};
const
HomePage
=
({
title
=
"
Simple Survey Form
"
}:
HomeProps
)
=>
(
<
div
className
=
"text-slate-300 text-3xl font-bold"
>
{
title
}
const
HomePage
=
({}:
HomeProps
)
=>
(
<
div
className
=
""
>
<
Header
/>
<
Outlet
/>
</
div
>
);
...
...
frontend/src/Pages/LoginPage.tsx
View file @
9eba4e12
import
React
from
"
react
"
;
import
"
tailwindcss/tailwind.css
"
;
type
LoginProps
=
{
//
type LoginProps = {
};
//
};
const
LoginPage
=
(
{
}:
LoginProps
)
=>
(
const
LoginPage
=
()
=>
(
<
div
className
=
"text-slate-300 text-3xl font-bold"
>
로그인페이지
</
div
>
...
...
frontend/tailwind.config.js
View file @
9eba4e12
...
...
@@ -2,7 +2,11 @@
module
.
exports
=
{
content
:
[
"
./src/**/*.{html,js,jsx,ts,tsx}
"
],
theme
:
{
extend
:
{},
extend
:
{
colors
:
{
'
themeColor
'
:
'
#58ACFA
'
,
},
},
},
plugins
:
[],
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment