-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
325 additions
and
105 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,18 @@ | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import React from 'react'; | ||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; | ||
import Home from './components/homePage'; | ||
import Sheets from './components/sheets'; | ||
|
||
function App() { | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<p> | ||
Edit <code>src/App.js</code> and save to reload. | ||
</p> | ||
<a | ||
className="App-link" | ||
href="https://reactjs.org" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Learn React | ||
</a> | ||
</header> | ||
</div> | ||
<Router> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/sheets" element={<Sheets />} /> | ||
{/* Define more routes here if needed */} | ||
</Routes> | ||
</Router> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { useDrag } from 'react-dnd'; | ||
|
||
const MyDraggableComponent = ({ isDragging, text }) => { | ||
const [{ opacity }, dragRef] = useDrag( | ||
() => ({ | ||
type: 'card', | ||
collect: (monitor) => ({ | ||
opacity: monitor.isDragging() ? 0.5 : 1 | ||
}) | ||
}), | ||
[] | ||
) | ||
return ( | ||
<div ref={dragRef} style={{ opacity }}> | ||
<label>Character Name<input type="text" name="name" id="characterName" /></label> | ||
</div> | ||
) | ||
}; | ||
|
||
export default MyDraggableComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import '../styles/main.css'; // Import CSS/LESS file directly | ||
|
||
const Home = () => { | ||
return ( | ||
<div className="home page"> | ||
<nav className="nav"> | ||
<Link to="/builder" className='navButton'>Builder</Link> | ||
<Link to="/sheets" className='navButton'>Sheets</Link> | ||
</nav> | ||
<main className="content"> | ||
<section id="about"> | ||
<h1>About SheetBuilder</h1> | ||
<p>SheetBuilder is a web application that allows users to build and share custom character sheets for any RPG out there, using a simple Drag n Drop system</p> | ||
</section> | ||
</main> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import '../styles/main.css'; // Import CSS/LESS file directly | ||
import { DndProvider } from 'react-dnd'; | ||
import { HTML5Backend } from 'react-dnd-html5-backend'; | ||
import LabelInput from './draggables/labelInput.jsx'; | ||
|
||
|
||
const Home = () => { | ||
return ( | ||
<div className="home page"> | ||
<nav className="nav"> | ||
<Link to="/builder" className='navButton'>Builder</Link> | ||
<Link to="/sheets" className='navButton'>Sheets</Link> | ||
</nav> | ||
<main className="content"> | ||
<aside className='sidebar'> | ||
<h2>Pick your draggable component</h2> | ||
<div className="picker"> | ||
<DndProvider backend={HTML5Backend}> | ||
<LabelInput /> | ||
</DndProvider> | ||
</div> | ||
</aside> | ||
<section id="create"> | ||
<h1>Create your own</h1> | ||
|
||
|
||
</section> | ||
</main> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Home; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.