Skip to content

Commit

Permalink
added back folder structure and added a guitar logo on login. changed…
Browse files Browse the repository at this point in the history
… some stylings to make guitar look ok on login.
  • Loading branch information
jrosengrant committed Feb 8, 2024
1 parent f78b649 commit a53ca46
Show file tree
Hide file tree
Showing 154 changed files with 60 additions and 50 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.DS_Store
32 changes: 0 additions & 32 deletions components/Header.jsx

This file was deleted.

6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head> </head>
<head>
<link rel="stylesheet" href="./src/frontend/App.css" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/frontend/main.jsx"></script>
<script type="module" src="./src/frontend/main.jsx"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions App.css → src/frontend/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
padding: 2rem;
text-align: center;
}

.login-logo {
height: 100%;
width: 70%;
object-fit: cover;
}
6 changes: 3 additions & 3 deletions App.jsx → src/frontend/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function App() {
<div>
<BrowserRouter>
<Routes>
<Route path='/' element={<LoginPage />} />
<Route path='/signup' element={<SignupPage />} />
<Route path='/home' element={<HomePage />} />
<Route path="/" element={<LoginPage />} />
<Route path="/signup" element={<SignupPage />} />
<Route path="/home" element={<HomePage />} />
</Routes>
</BrowserRouter>
</div>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// ChordDisplay.jsx
import React from 'react';
import DraggableChord from './DraggableChord';
import { allC } from '../../../chords/C-chords.mjs';
import { allC } from '../chords/C-chords.mjs';
import './ChordDisplay.css';
import { frets } from '../../../chords/Frets.mjs';
import { frets } from '../chords/Frets.mjs';

export default function ChordDisplay({ selectedOption }) {
function findChordByName(objectsArray, targetName) {
Expand All @@ -16,7 +16,7 @@ export default function ChordDisplay({ selectedOption }) {
function mapChord(chord) {
for (let i = 1; i < Object.values(chord).length; i++) {
const reversedChordLine = (
<div key={i} className='chord-line'>
<div key={i} className="chord-line">
{chord[i]
.slice()
.reverse()
Expand Down Expand Up @@ -168,11 +168,11 @@ export default function ChordDisplay({ selectedOption }) {
const chunkedChordData = chunkArray(chordData, 4);

return (
<div className='grid-container'>
<div className="grid-container">
{chunkedChordData.map((row, rowIndex) => (
<div key={rowIndex} style={{ display: 'flex' }}>
{row.map((chord, colIndex) => (
<div key={colIndex} className='grid-item'>
<div key={colIndex} className="grid-item">
<DraggableChord chordName={chord} />
</div>
))}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { allCNames } from '../../../chords/C-chords.mjs';
import { allCNames } from '../chords/C-chords.mjs';

export default function ChordSelect({ onSelect }) {
const [selectedOption, setSelectedOption] = useState('');
Expand All @@ -13,9 +13,9 @@ export default function ChordSelect({ onSelect }) {

return (
<div>
<label htmlFor='dropdown'>Select a chord </label>
<select id='dropdown' value={selectedOption} onChange={handleSelect}>
<option value=''>choose</option>
<label htmlFor="dropdown">Select a chord </label>
<select id="dropdown" value={selectedOption} onChange={handleSelect}>
<option value="">choose</option>
{options.map((option, index) => (
<option key={index} value={option}>
{option}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions src/frontend/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Link } from 'react-router-dom';

export default function Header({
heading,
paragraph,
linkName,
linkUrl = '#',
}) {
return (
<div className="mb-10">
<div style={{ height: '50vh' }}>
<img
alt="logo"
className="login-logo"
src="src/frontend/assets/images/acoustic-guitar-logo.jpeg"
/>
</div>
<h2 className="mt-6 text-center text-3xl font-extrabold text-gray-900">
{heading}
</h2>
<p className="mt-2 text-center text-sm text-gray-600 mt-5">
{paragraph}{' '}
<Link
to={linkUrl}
className="font-medium text-purple-600 hover:text-purple-500"
>
{linkName}
</Link>
</p>
</div>
);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions components/Signup.jsx → src/frontend/components/Signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export default function Signup() {
};

return (
<form className='mt-8 space-y-6' onSubmit={handleSubmit}>
<div className=''>
<form className="mt-8 space-y-6" onSubmit={handleSubmit}>
<div className="">
{fields.map((field) => (
<Input
key={field.id}
Expand All @@ -64,7 +64,7 @@ export default function Signup() {
placeholder={field.placeholder}
/>
))}
<FormAction handleSubmit={handleSubmit} text='Signup' />
<FormAction handleSubmit={handleSubmit} text="Signup" />
</div>
</form>
);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion main.jsx → src/frontend/main.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.jsx';
import './index.css';
// import './index.css';

ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a53ca46

Please sign in to comment.