add links to rss for thread & site
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
.input__actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 8px;
|
||||
background: #eee;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
.input__button {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
margin: 0 8px 0 0;
|
||||
padding: 8px 12px;
|
||||
font-size: 16px;
|
||||
border: 0;
|
||||
@@ -10,8 +10,4 @@
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
+ .input__button {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
.input__buttons {
|
||||
padding-top: 8px;
|
||||
background: #eee;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
.input__rss-link {
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
color: #0aa;
|
||||
|
||||
&:hover {
|
||||
color: #06c5c5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
.input__rss {
|
||||
margin-left: auto;
|
||||
align-self: flex-end;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
text-align: right;
|
||||
}
|
||||
@@ -4,14 +4,17 @@ export { default } from './input';
|
||||
|
||||
require('./input.scss');
|
||||
|
||||
require('./__actions/input__actions.scss');
|
||||
|
||||
require('./__button/input__button.scss');
|
||||
require('./__button/_type/_preview/input__button_type_preview.scss');
|
||||
require('./__button/_type/_send/input__button_type_send.scss');
|
||||
|
||||
require('./__buttons/input__buttons.scss');
|
||||
require('./__counter/input__counter.scss');
|
||||
require('./__error/input__error.scss');
|
||||
require('./__field/input__field.scss');
|
||||
require('./__field-wrapper/input__field-wrapper.scss');
|
||||
require('./__preview/input__preview.scss');
|
||||
require('./__preview-wrapper/input__preview-wrapper.scss');
|
||||
require('./__rss/input__rss.scss');
|
||||
require('./__rss-link/input__rss-link.scss');
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
import { h, Component } from 'preact';
|
||||
|
||||
import { DEFAULT_MAX_COMMENT_SIZE } from 'common/constants';
|
||||
import { BASE_URL, API_BASE, DEFAULT_MAX_COMMENT_SIZE } from 'common/constants';
|
||||
import { siteId, url } from 'common/settings';
|
||||
|
||||
import api from 'common/api';
|
||||
import store from 'common/store';
|
||||
|
||||
const RSS_THREAD_URL = `${BASE_URL}${API_BASE}/rss/post?site=${siteId}&url=${url}`;
|
||||
const RSS_SITE_URL = `${BASE_URL}${API_BASE}/rss/site?site=${siteId}`;
|
||||
|
||||
export default class Input extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@@ -131,7 +135,7 @@ export default class Input extends Component {
|
||||
isErrorShown && <p className="input__error" role="alert">Something went wrong. Please try again a bit later.</p>
|
||||
}
|
||||
|
||||
<div className="input__buttons">
|
||||
<div className="input__actions">
|
||||
<button
|
||||
className={b('input__button', {}, { type: 'preview' })}
|
||||
type="button"
|
||||
@@ -142,6 +146,17 @@ export default class Input extends Component {
|
||||
className={b('input__button', {}, { type: 'send' })}
|
||||
type="submit"
|
||||
>Send</button>
|
||||
|
||||
<div className="input__rss">
|
||||
Subscribe to this
|
||||
{' '}
|
||||
<a className="input__rss-link" href={RSS_THREAD_URL} target="_blank">Thread</a>
|
||||
{' '}
|
||||
or
|
||||
<a className="input__rss-link" href={RSS_SITE_URL} target="_blank">Site</a>
|
||||
{' '}
|
||||
by RSS
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user