Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile-first UI implementation with Semantic UI #20

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Create static layout
aelishRollo committed Jun 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 228103346ffc676290608b8d17495e55187b1099
146 changes: 146 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -18,6 +18,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"semantic-ui-css": "^2.5.0",
"semantic-ui-react": "^2.1.5",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
},
101 changes: 97 additions & 4 deletions src/Foo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,101 @@
import React from 'react';
import { Container, Header, Menu, Dropdown, Grid, Comment, Form, Button, Input, List } from 'semantic-ui-react';

const SectionView = () => (
<Container>
{/* Menu */}
<Menu>
<Menu.Item>
<Header as='h2'>My section</Header>
</Menu.Item>
<Menu.Menu position='right'>
<Dropdown item icon='ellipsis vertical' simple>
<Dropdown.Menu>
<Dropdown.Item>Edit title</Dropdown.Item>
<Dropdown.Item>Edit Progression</Dropdown.Item>
<Dropdown.Item>Duplicate</Dropdown.Item>
<Dropdown.Item>Delete</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</Menu.Menu>
</Menu>

{/* Chord Progression */}
<Header as='h3'>Progression: C Dm Em F</Header>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can borrow code from https://github.com/jamtools/section-view/blob/main/src/SectionPage.tsx to fill calls to existing hooks to get this data. Should be super straightforward

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other code will obviously be relocated into existing component files like Files.tsx and Comments.tsx etc.


let ChordProgression = () => {
return (<h1> Hello, Universe!</h1>);
};
{/* Grid Layout */}
<Grid columns={2} divided>
<Grid.Row>
<Grid.Column>
<List>
<List.Item>
<List.Icon name='file audio' />
<List.Content>
<List.Header>Bass.mp3</List.Header>
<List.Description>2 comments</List.Description>
</List.Content>
</List.Item>
<List.Item>
<List.Icon name='file audio' />
<List.Content>
<List.Header>Guitar.mp3</List.Header>
<List.Description>23 comments</List.Description>
</List.Content>
</List.Item>
<List.Item>
<List.Icon name='file audio' />
<List.Content>
<List.Header>Guitar.mp3</List.Header>
<List.Description>23 comments</List.Description>
</List.Content>
</List.Item>
</List>
</Grid.Column>
<Grid.Column>
<List.Item>
<List.Icon name='file audio' />
<List.Content>
<List.Header>Guitar.mp3</List.Header>
<List.Description>23 comments</List.Description>
</List.Content>
</List.Item>
<List.Item>
<List.Icon name='file audio' />
<List.Content>
<List.Header>Guitar.mp3</List.Header>
<List.Description>23 comments</List.Description>
</List.Content>
</List.Item>
</Grid.Column>
</Grid.Row>
</Grid>

export default ChordProgression
{/* Comments Section */}
<Header as='h3'>Comments for section</Header>
<Comment.Group>
<Comment>
<Comment.Avatar src='/images/avatar/small/matt.jpg' />
<Comment.Content>
<Comment.Author as='a'>Dave</Comment.Author>
<Comment.Text>Great section!</Comment.Text>
</Comment.Content>
</Comment>
<Comment>
<Comment.Avatar src='/images/avatar/small/matt.jpg' />
<Comment.Content>
<Comment.Author as='a'>Matthews</Comment.Author>
<Comment.Text>Great section!</Comment.Text>
</Comment.Content>
</Comment>
{/* Add more comments as needed */}
</Comment.Group>

{/* Comment Form */}
<Form reply>
<Form.TextArea />
<Button content='Submit' labelPosition='left' icon='edit' primary />
</Form>
</Container>
);

export default SectionView;
2 changes: 2 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import 'semantic-ui-css/semantic.min.css';


window.addEventListener('load', async () => {
const root = ReactDOM.createRoot(