forked from tanner/qotnews
Add forward button, convert icons to font
This commit is contained in:
parent
746932ab96
commit
6cd41f0902
|
@ -4,6 +4,7 @@ import localForage from 'localforage';
|
|||
import './Style-light.css';
|
||||
import './Style-dark.css';
|
||||
import './fonts/Fonts.css';
|
||||
import { ForwardDot } from './utils.js';
|
||||
import Feed from './Feed.js';
|
||||
import Article from './Article.js';
|
||||
import Comments from './Comments.js';
|
||||
|
@ -71,6 +72,8 @@ class App extends React.Component {
|
|||
</Switch>
|
||||
<Route path='/:id/c' exact render={(props) => <Comments {...props} cache={this.cache} />} />
|
||||
|
||||
<ForwardDot />
|
||||
|
||||
<ScrollToTop />
|
||||
</Router>
|
||||
</div>
|
||||
|
|
|
@ -174,10 +174,27 @@ span.source {
|
|||
}
|
||||
|
||||
.toggleDot .button {
|
||||
font: 3rem/1 serif;
|
||||
font: 2rem/1 'icomoon';
|
||||
position: relative;
|
||||
top: 0.1rem;
|
||||
left: 0.1rem;
|
||||
top: 0.5rem;
|
||||
left: 0.55rem;
|
||||
}
|
||||
|
||||
.forwardDot {
|
||||
position: fixed;
|
||||
bottom: 1rem;
|
||||
right: 1rem;
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
background-color: #828282;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.forwardDot .button {
|
||||
font: 2.5rem/1 'icomoon';
|
||||
position: relative;
|
||||
top: 0.25rem;
|
||||
left: 0.3rem;
|
||||
}
|
||||
|
||||
.search form {
|
||||
|
|
|
@ -21,3 +21,8 @@
|
|||
font-style: italic;
|
||||
src: url('AppSILBI.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Icomoon';
|
||||
src: url('icomoon.ttf') format('truetype');
|
||||
}
|
||||
|
|
BIN
webclient/src/fonts/icomoon.ttf
Normal file
BIN
webclient/src/fonts/icomoon.ttf
Normal file
Binary file not shown.
|
@ -1,74 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="11.834147mm"
|
||||
height="11.62744mm"
|
||||
viewBox="0 0 11.834147 11.62744"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="switch.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6"
|
||||
inkscape:cx="30.478118"
|
||||
inkscape:cy="30.752042"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="2"
|
||||
fit-margin-left="2"
|
||||
fit-margin-right="2"
|
||||
fit-margin-bottom="2"
|
||||
inkscape:window-width="1616"
|
||||
inkscape:window-height="1108"
|
||||
inkscape:window-x="1291"
|
||||
inkscape:window-y="782"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-72.951327,-125.63605)">
|
||||
<g
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="flowRoot4518" />
|
||||
<g
|
||||
aria-label="⇄"
|
||||
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text4528">
|
||||
<path
|
||||
d="m 74.951327,133.23261 v -0.46509 l 2.030884,-2.03089 0.620117,0.62012 -1.204061,1.20406 h 6.299357 v 0.8785 h -6.299357 l 1.204061,1.20406 -0.620117,0.62012 z m 7.834147,-3.56568 v 0.46509 l -2.030884,2.03088 -0.620117,-0.62011 1.204061,-1.20407 h -6.299357 v -0.87849 h 6.299357 l -1.204061,-1.20407 0.620117,-0.62011 z"
|
||||
style="stroke-width:0.26458332px"
|
||||
id="path4531"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.8 KiB |
|
@ -2,8 +2,6 @@ import React from 'react';
|
|||
import moment from 'moment';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import Switch from './switch.svg';
|
||||
|
||||
export const sourceLink = (story) => {
|
||||
const url = story.url || story.link;
|
||||
const urlObj = new URL(url);
|
||||
|
@ -31,7 +29,7 @@ export class ToggleDot extends React.Component {
|
|||
<div className='toggleDot'>
|
||||
<div className='button'>
|
||||
<Link to={'/' + id + (article ? '' : '/c')}>
|
||||
<img src={Switch} alt='toggle between article and comments' />
|
||||
{article ? '' : ''}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,6 +37,20 @@ export class ToggleDot extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export class ForwardDot extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className='forwardDot'>
|
||||
<div className='button'>
|
||||
<a href='javascript:void(0)' onClick={() => window.history.forward()}>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export const logos = {
|
||||
hackernews: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4wgeBhwhciGZUAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAGCSURBVFjD7Za/S0JRFMc/+oSgLWjLH/2AIKEhC2opIp1amqw/INCo9lbHghCnKDdpN5OoIGhISSLwx2RCEYSjUWhWpO+9hicopCHh8w29Mx3u/XLv95z7Pedcg+y1VQEBbUw0ang5gGBEY9MJ6ARMbaH6HdBnBlmC+5PfsVYX9PTCSx4KyQ4RsI6DxwcYIGSFxF5znHkOtvZBECDoa4tAe0+QDMFDVvFd7ta4pU0QTAo2GeqwBqIHIEkwMAQzaz/3LfNgn1Qw0aAKIswdQzZVy8Jyk+g3lNTfpSEXUakKjgJQrYB5GKY9DRpZALsDxCqEAyqWYT4G6etaFlYaol8HowCZBOSvVO4DR374+gTLCEytgs0JYxPKWtivUh9otOcM3FzC7CI43fBWVKK/vYBCqkudMLIN7yUYHFXe/qMMkZ0utuLyE8ROwWBU6j5+BqXHLs+C+GHdP9/VYBhJ1bpfedXHsU5A5Q9JKxEWa+KT5T8fY5C9NlnXgE7g3xMQNbxf/AZyEGqvyYs/dQAAAABJRU5ErkJggg==',
|
||||
reddit: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAI8HpUWHRSYXcgc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