Identicons and navbar test

This commit is contained in:
Mashy 2018-09-20 16:53:37 +10:00
parent 5b4ff2a06a
commit 30cd11d43f
2 changed files with 46 additions and 0 deletions

View File

@ -8,6 +8,9 @@ const createSocket = require('./socket');
const StatusContainer = require('./components/status.container');
{/*-- Section for html render classes --*/}
const Navbar = require('./navbar');
const store = createStore(
combineReducers({
account: reducers.accountReducer,
@ -18,11 +21,14 @@ const ws = createSocket(store);
store.subscribe(() => console.log(store.getState()));
const Cryps = () => (
<section>
<Navbar />
<div id="fizzytext" />
<StatusContainer />
</section>
);
const Main = () => (
@ -34,3 +40,4 @@ const Main = () => (
preact.render(<Main />, document.body);
fizzyText('cryps');

39
client/src/navbar.jsx Normal file
View File

@ -0,0 +1,39 @@
const preact = require('preact');
const jdenticon = require('jdenticon');
{/*Test to render navbar and some identicons*/}
const Navbar = () => (
<div>
<nav class="navbar">
<div class="navbar-end">
<a class="navbar-item is-active">
Home
</a>
<a class="navbar-item">
Store
</a>
<a class="navbar-item">
FAQ
</a>
<span class="navbar-item">
<a class="button is-info is-inverted">
<span class="icon">
<svg width="80" height="80" data-jdenticon-value="Blog"></svg>
</span>
<span>Blog</span>
</a>
</span>
</div>
</nav>
<span>
Mashy ->
<svg width="80" height="80" data-jdenticon-value="Mashy"></svg>
</span>
<span>
Ntr ->
<svg width="80" height="80" data-jdenticon-value="Ntr"></svg>
</span>
</div>
);
module.exports = Navbar;