aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-16 18:54:06 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:52 +0300
commit5bc9a7cc3f45697d7d0c0913b6971fedd87f096b (patch)
tree807f9bd9309937442e387c254e025136eb792def
parent683bd826dfc3885a8f15f9db4e0a8af7f158c967 (diff)
Footer
-rw-r--r--vnext/src/components/Footer.js26
-rw-r--r--vnext/src/index.js88
2 files changed, 72 insertions, 42 deletions
diff --git a/vnext/src/components/Footer.js b/vnext/src/components/Footer.js
new file mode 100644
index 00000000..b2551b95
--- /dev/null
+++ b/vnext/src/components/Footer.js
@@ -0,0 +1,26 @@
+import React from 'react'
+
+import Icon from './Icon'
+
+export default function Footer(props) {
+
+ return (
+ <div id="footer">
+ <div id="footer-right"> &middot;
+ <a href="/help/contacts" rel="nofollow">Contacts</a> &middot;
+ <a href="/help/tos" rel="nofollow">TOS</a>
+ </div>
+ <div id="footer-social">
+ <a href="https://twitter.com/Juick" rel="nofollow"><Icon name="ei-sc-twitter" size="m" /></a>
+ <a href="https://vk.com/juick" rel="nofollow"><Icon name="ei-sc-vk" size="m" /></a>
+ <a href="https://www.facebook.com/JuickCom" rel="nofollow"><Icon name="ei-sc-facebook" size="m" /></a>
+ </div>
+ <div id="footer-left">juick.com &copy; 2008-2018
+ </div>
+ {
+ props.links &&
+ <div>Sponsors: {props.links}</div>
+ }
+ </div>
+ )
+} \ No newline at end of file
diff --git a/vnext/src/index.js b/vnext/src/index.js
index 88c13ae3..963aa968 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -6,6 +6,7 @@ import Discover from './components/Discover';
import Post from './components/Post';
import Thread from './components/Thread';
import LoginButton from './components/LoginButton';
+import Footer from './components/Footer';
class App extends React.Component {
constructor(props) {
@@ -16,49 +17,52 @@ class App extends React.Component {
}
render() {
return (
- <Router>
- <div className="wrapper">
- <header>
- <div id="header_wrapper">
- {this.state.visitor.uid > 0 ?
- <div id="ctitle">
- <a href="/{this.state.visitor.name}">
- <img src="//i.juick.com/a/{this.state.visitor.uid}.png" alt=""/>{this.state.visitor.name}
- </a>
- </div>
- :
- <div id="logo"><Link to="/">Juick</Link></div>
- }
- <div id="search">
- <form action="/">
- <input name="search" className="text"
- placeholder="Search..." />
- </form>
- </div>
- <nav id="global">
- <ul>
- {this.state.visitor.uid > 0 ?
- <li><Link to={{ pathname: '/'}}><Icon name="ei-comment" size="s"/>Discuss</Link></li>
- :
- <li><Link to='/?media=1' rel="nofollow"><Icon name="ei-camera" size="s"/>Photos</Link></li>
- }
- <li><Link to={{ pathname: '/'}} rel="nofollow"><Icon name="ei-search" size="s"/>Discover</Link></li>
- <li>
- {this.state.visitor.uid > 0 ?
- <Link to={{ pathname: '/post'}}><Icon name="ei-pencil" size="s"/>Post</Link>
- :
- <LoginButton title="Login" onAuth={this.auth.bind(this)} />
+ <React.Fragment>
+ <Router>
+ <div className="wrapper">
+ <header>
+ <div id="header_wrapper">
+ {this.state.visitor.uid > 0 ?
+ <div id="ctitle">
+ <a href="/{this.state.visitor.name}">
+ <img src="//i.juick.com/a/{this.state.visitor.uid}.png" alt="" />{this.state.visitor.name}
+ </a>
+ </div>
+ :
+ <div id="logo"><Link to="/">Juick</Link></div>
+ }
+ <div id="search">
+ <form action="/">
+ <input name="search" className="text"
+ placeholder="Search..." />
+ </form>
+ </div>
+ <nav id="global">
+ <ul>
+ {this.state.visitor.uid > 0 ?
+ <li><Link to={{ pathname: '/' }}><Icon name="ei-comment" size="s" />Discuss</Link></li>
+ :
+ <li><Link to='/?media=1' rel="nofollow"><Icon name="ei-camera" size="s" />Photos</Link></li>
}
- </li>
- </ul>
- </nav>
- </div>
- </header>
- <Route exact path="/" component={Discover} />
- <Route path="/:user/:mid" component={Thread} />
- <Route path="/post" component={Post} />
- </div>
- </Router>
+ <li><Link to={{ pathname: '/' }} rel="nofollow"><Icon name="ei-search" size="s" />Discover</Link></li>
+ <li>
+ {this.state.visitor.uid > 0 ?
+ <Link to={{ pathname: '/post' }}><Icon name="ei-pencil" size="s" />Post</Link>
+ :
+ <LoginButton title="Login" onAuth={this.auth.bind(this)} />
+ }
+ </li>
+ </ul>
+ </nav>
+ </div>
+ </header>
+ <Route exact path="/" component={Discover} />
+ <Route path="/:user/:mid" component={Thread} />
+ <Route path="/post" component={Post} />
+ </div>
+ </Router>
+ <Footer />
+ </React.Fragment>
)
}
auth(data) {