Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/Earth4.ttf
Binary file not shown.
6 changes: 6 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/if_icon.png">
<link rel="stylesheet" href="%PUBLIC_URL%/vendor/bootstrap.min.css">
<style>
@font-face {
font-family: 'Earth4';
src: url('%PUBLIC_URL%/Earth4.ttf');
}
</style>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
7 changes: 6 additions & 1 deletion src/components/home/home.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.el {
font-family: Earth4;
font-size: xx-large !important;
}

.topics__content {
min-height: calc(100vh - 100px);
}
Expand Down Expand Up @@ -56,4 +61,4 @@

.home--hidden {
display: none;
}
}
5 changes: 3 additions & 2 deletions src/components/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,19 @@ class Home extends Component {
const { flag } = this.state;
const isVisible = this.hasMore && 'home--hidden';
const hasMore = this.hasMore();
const classes = 'topics__title '+this.state.search;

return (
<div className="main">
<article className="topics">
<div className="header">
<h1 className="topics__title en">{title}</h1>
<h1 className={classes}>{title}</h1>

<form onSubmit={this.makeSearch}>
<FormGroup >
<InputGroup>
<Flag setFlag={this.setFlag} flag={flag}/>
<FormControl type="search" name="query" value={this.state.query} onChange={this.handleChange} />
<FormControl type="search" name="query" value={this.state.query} onChange={this.handleChange} className={langService.current} />
<InputGroup.Button>
<Button type="submit">{button}</Button>
</InputGroup.Button>
Expand Down
3 changes: 2 additions & 1 deletion src/components/home/topic_list/topic_list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Link } from 'react-router-dom';
import store_home from '../../../store/home';
import configs from '../../../configs';
import './topic_list.css';
import langService from '../../../services/lang.service';

class Topics extends Component {
constructor(props) {
Expand Down Expand Up @@ -64,7 +65,7 @@ class Topics extends Component {
topics.map(topic => {

return (
<section className={"topics__item " + draftStyle(topic)} key={topic.id}>
<section className={"topics__item " + draftStyle(topic) + " " + langService.current} key={topic.id}>
<EditTopic owner={topic.owner.username} id={topic.id} />
<Link to={'/topic/' + topic.id} onClick={this.saveScroll} className="topics__item-title" data-id={topic.id}>
<h2>
Expand Down
7 changes: 5 additions & 2 deletions src/components/topic/comment_form/comment_form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { FormGroup, FormControl, ControlLabel, Button } from 'react-bootstrap';

import langService from '../../../services/lang.service';
import './comment_form.css';

class Comment extends Component {
Expand Down Expand Up @@ -64,6 +65,8 @@ class Comment extends Component {
</div>
);

const comment_classes = "comment__text " + langService.current;

return (
<div className="comment__section">
<form onSubmit={this.submitComment}>
Expand All @@ -72,7 +75,7 @@ class Comment extends Component {
<FormControl
componentClass="textarea"
ref={(ip) => this.myInp = ip}
className="comment__text"
className={comment_classes}
rows="4"
name="text"
value={text}
Expand All @@ -92,4 +95,4 @@ class Comment extends Component {
}
}

export default Comment;
export default Comment;
5 changes: 3 additions & 2 deletions src/components/topic/comments/comments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { ButtonGroup, Button } from 'react-bootstrap';
import Transaction from './transaction';
import ProgressBar from './progress_bar';
import langService from '../../../services/lang.service';

import ReactHtmlParser from 'react-html-parser';
import showdown from 'showdown';
Expand Down Expand Up @@ -95,7 +96,7 @@ export default class Comments extends Component {

return (
<div key={id} className="comment__section">
<div>{content}</div>
<div className={langService.current}>{content}</div>
<Progress />
<Buttons owner={owner} id={id} remains={remains} comment={comment}/>

Expand Down Expand Up @@ -126,4 +127,4 @@ export default class Comments extends Component {
return null;
}
}
}
}
5 changes: 3 additions & 2 deletions src/components/topic/topic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Button, Badge } from 'react-bootstrap';

import topicService from '../../services/topic.service.js';
import commentService from '../../services/comment.service.js';
import langService from '../../services/lang.service';
import configs from '../../configs';

import Menu from '../utils/menu';
Expand Down Expand Up @@ -185,13 +186,13 @@ class Topic extends Component {
const Topic = () => topic.title ?
<div className="topic__container">

<h1>{topic.title}</h1>
<h1 className={langService.current}>{topic.title}</h1>
<i>{topic.is_draft ? <p>draft</p> : ''}</i>

<EditTopic owner={topic.owner.username} id={topic.id}/>
<Tags /> <br />

<div>{ReactHtmlParser(mdConverter.makeHtml(topic.body))}</div> <br />
<div className={langService.current}>{ReactHtmlParser(mdConverter.makeHtml(topic.body))}</div> <br />
<span>{topic.owner.username}</span>
<br /><br />
</div>
Expand Down
9 changes: 7 additions & 2 deletions src/components/topic_view/topic_view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {

import topicViewService from '../../services/topic_view.service';
import topicService from '../../services/topic.service';
import langService from '../../services/lang.service';

import configs from '../../configs';
import Select from 'react-select';
import 'react-select/dist/react-select.min.css';
Expand Down Expand Up @@ -330,6 +332,9 @@ class Topic extends Component {
</Modal>
</div>;

const topic_classes = "topic_view__field " + langService.current;
const comment_classes = "comment__text " + langService.current;

return (
<div className="main">
<div className="topic_view__container">
Expand Down Expand Up @@ -361,7 +366,7 @@ class Topic extends Component {
<ControlLabel>What's on your mind?</ControlLabel>
<FormControl
id="formControlsText"
className="topic_view__field"
className={topic_classes}
type="text"
name="topic_title"
label="Title"
Expand All @@ -371,7 +376,7 @@ class Topic extends Component {
/>
<FormControl
componentClass="textarea"
className="comment__text"
className={comment_classes}
rows="10"
name="topic_text"
placeholder={"Enter your " + type.toLowerCase()}
Expand Down
10 changes: 9 additions & 1 deletion src/services/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ export default {
'Singapore',
'Frankfurt',
'Shanghai',
// '[localhost]',
],
'cn': [
'新加坡',
'法兰克福',
'上海',
// '[localhost]',
],
'ru': [
'Сингапур',
'Франкфурт',
'Шанхай',
// '[localhost]',
],
'lt': [
'Singapūras',
'Frankfurtas',
'Šanchajus',
// '[localhost]',
]
}
},
Expand All @@ -36,10 +40,14 @@ export default {
title: 'Семья Инфи́нити',
button: 'Поиск'
},
'ly': {
'lt': {
title: 'Begalybės šeima',
button: 'Paieška'
},
'el': {
title: 'C% Lyc',
button: '/(<>)'
},
},
how : {
'en': [
Expand Down
3 changes: 2 additions & 1 deletion src/services/server.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class ServerService {
this.api_servers = [
'https://inf.li',
'https://test.wfx.io',
'https://test.wefindx.io'
'https://test.wefindx.io',
// 'http://localhost:8000',
];

this.getDefault();
Expand Down