various changes
This commit is contained in:
parent
3dc674485c
commit
5b0fa42f92
@ -47,15 +47,14 @@ main{
|
||||
width: 100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
#sidebar{
|
||||
display: block;
|
||||
padding: 10px;
|
||||
//padding-left:10px;
|
||||
width: 150px;
|
||||
background-color: #888;
|
||||
height:100%
|
||||
}
|
||||
ul{
|
||||
align-self: left;
|
||||
}
|
||||
|
||||
a, a:visited, a:hover {
|
||||
/* text-decoration: none; */
|
||||
color: inherit;
|
||||
}
|
||||
a.selected, a.selected:visited{
|
||||
color:red;
|
||||
}
|
||||
@ -56,7 +56,7 @@ class Root extends react.ReactComponentOf<RootProps,RootState> {
|
||||
<$Route exact="true" path="/">
|
||||
<$Redirect to="/home" />
|
||||
</$Route>
|
||||
<$Route exact="true" path="/home">
|
||||
<$Route path="/home">
|
||||
<HomeContent/>
|
||||
</$Route>
|
||||
<$Route path="/projects">
|
||||
|
||||
@ -12,9 +12,6 @@ header {
|
||||
header nav a{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.selected{
|
||||
color:red;
|
||||
}
|
||||
.logo{
|
||||
font-size: 3vw;
|
||||
width:fit-content;
|
||||
|
||||
@ -17,17 +17,17 @@ class Header extends ReactComponent{
|
||||
DRIVEBY!
|
||||
</div>
|
||||
<nav>
|
||||
<$NavLink exact="true" to="/" activeClassName="selected">
|
||||
Home
|
||||
<$NavLink to="/home" activeClassName="selected">
|
||||
>Home
|
||||
</NavLink>
|
||||
<$NavLink to="/links" activeClassName="selected">
|
||||
Links
|
||||
>Links
|
||||
</NavLink>
|
||||
<$NavLink to="/projects" activeClassName="selected">
|
||||
Projects
|
||||
>Projects
|
||||
</NavLink>
|
||||
<$NavLink to="/gameservers" activeClassName="selected">
|
||||
Game Servers
|
||||
>Game Servers
|
||||
</NavLink>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@ -3,6 +3,10 @@ import react.ReactMacro.jsx;
|
||||
import react.ReactComponent;
|
||||
import js.Browser;
|
||||
import Webpack.*;
|
||||
import react.router.ReactRouter;
|
||||
import react.router.Route.RouteRenderProps;
|
||||
import react.router.Route;
|
||||
import components.blog.Overview;
|
||||
|
||||
class HomeContent extends ReactComponent {
|
||||
|
||||
@ -14,14 +18,28 @@ class HomeContent extends ReactComponent {
|
||||
|
||||
override public function render() {
|
||||
return jsx('
|
||||
<div>
|
||||
<$Route exact="true" path={["/home","/home/about"]}>
|
||||
<div>
|
||||
<h2>Welcome to DRIVEBY!</h2>
|
||||
<p>
|
||||
DRIVEBY! is many things to many people. It is a community, a software distributor, a game studio and a place for my personal projects.<br/>
|
||||
DRIVEBY! is the home of my personal projects. This includes but is not limited to:<br/>
|
||||
- Gamedev<br/>
|
||||
- Software<br/>
|
||||
- Music<br/>
|
||||
- Art<br/>
|
||||
DRIVEBY! is run and operated by Hion-V. I am comitted to bringing you best-in-class entertainment and software.<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</$Route>
|
||||
<$Route exact="true" path={["/home","/home/news"]}>
|
||||
<div>
|
||||
<h2>News</h2>
|
||||
<$Overview/>
|
||||
</div>
|
||||
</$Route>
|
||||
</div>
|
||||
');
|
||||
}
|
||||
}
|
||||
36
app/src/components/blog/Overview.hx
Normal file
36
app/src/components/blog/Overview.hx
Normal file
@ -0,0 +1,36 @@
|
||||
package components.blog;
|
||||
import react.ReactMacro.jsx;
|
||||
import react.ReactComponent;
|
||||
import js.Browser;
|
||||
import Webpack.*;
|
||||
import react.router.NavLink;
|
||||
|
||||
class Overview extends ReactComponent {
|
||||
|
||||
//static var STYLES = require('./HomeContent.css');
|
||||
|
||||
public function yeet(){
|
||||
trace(state);
|
||||
}
|
||||
|
||||
public static var items:Array<String> = [
|
||||
'yeetus',
|
||||
'deletus'
|
||||
];
|
||||
private static function printList(){
|
||||
var result = [];
|
||||
for (item in items){
|
||||
result.push(jsx('<li>$item</li>'));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
override public function render() {
|
||||
var _print = printList();
|
||||
return jsx('
|
||||
<ul>
|
||||
${_print}
|
||||
</ul>
|
||||
');
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ import react.ReactMacro.jsx;
|
||||
import react.ReactComponent;
|
||||
import js.Browser;
|
||||
import Webpack.*;
|
||||
import react.router.NavLink;
|
||||
|
||||
class SBHome extends ReactComponent {
|
||||
|
||||
@ -15,8 +16,12 @@ class SBHome extends ReactComponent {
|
||||
override public function render() {
|
||||
return jsx('
|
||||
<ul>
|
||||
<li>About</li>
|
||||
<li>News</li>
|
||||
<li>
|
||||
<$NavLink to="/home/about" activeClassName="selected">About</$NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<$NavLink to="/home/news" activeClassName="selected">News</$NavLink>
|
||||
</li>
|
||||
</ul>
|
||||
');
|
||||
}
|
||||
|
||||
13
app/src/components/sidebar/Sidebar.css
Normal file
13
app/src/components/sidebar/Sidebar.css
Normal file
@ -0,0 +1,13 @@
|
||||
#sidebar{
|
||||
display: block;
|
||||
padding: 10px;
|
||||
//padding-left:10px;
|
||||
width: 150px;
|
||||
background-color: #888;
|
||||
height:100%
|
||||
}
|
||||
#sidebar ul, #sidebar li{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
@ -10,7 +10,7 @@ import react.router.Route;
|
||||
|
||||
class Sidebar extends ReactComponent {
|
||||
|
||||
//static var STYLES = require('./HomeContent.css');
|
||||
static var STYLES = require('./Sidebar.css');
|
||||
|
||||
public function yeet(){
|
||||
trace(state);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user