mirror of
https://github.com/trambarhq/relaks-wordpress-example.git
synced 2025-09-08 15:10:40 +02:00
Minor adjustments.
This commit is contained in:
@@ -39,12 +39,13 @@ class FrontEnd extends PureComponent {
|
||||
if (sideNavCollapsed) {
|
||||
classNames.push('side-collapsed');
|
||||
}
|
||||
let key = route.url;
|
||||
return (
|
||||
<div className={classNames.join(' ')}>
|
||||
<SideNav route={route} wp={wp} />
|
||||
<TopNav route={route} wp={wp} />
|
||||
<div className="page-container">
|
||||
<PageComponent route={route} wp={wp} />
|
||||
<PageComponent route={route} wp={wp} key={key} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@@ -6,6 +6,7 @@ class Route {
|
||||
this.name = routeManager.name;
|
||||
this.params = routeManager.params;
|
||||
this.history = routeManager.history;
|
||||
this.url = routeManager.url;
|
||||
}
|
||||
|
||||
change(url, options) {
|
||||
|
@@ -31,11 +31,16 @@ A {
|
||||
overflow: hidden;
|
||||
color: #cccccc;
|
||||
|
||||
A:link, A:visited {
|
||||
color: #cccccc;
|
||||
A {
|
||||
opacity: 0.5;
|
||||
|
||||
&:hover {
|
||||
color: #eeccdd;
|
||||
&:link, &:visited {
|
||||
opacity: 1;
|
||||
color: #cccccc;
|
||||
|
||||
&:hover {
|
||||
color: #eeccdd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +135,7 @@ A {
|
||||
}
|
||||
|
||||
.button {
|
||||
flex: 0 0 auto;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
border-right: 1px solid transparentize(#cccccc, 0.75);
|
||||
@@ -207,12 +213,20 @@ A {
|
||||
.meta {
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-left: 1em;
|
||||
margin-top: 0.4em;
|
||||
|
||||
.author {
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
}
|
||||
|
||||
.post-list-view {
|
||||
.excerpt {
|
||||
margin-top: -0.7em;
|
||||
}
|
||||
}
|
||||
|
||||
.comments {
|
||||
font-size: 0.9em;
|
||||
padding-left: 1.5em;
|
||||
|
@@ -4,7 +4,11 @@ import ReactHtmlParser from 'react-html-parser';
|
||||
class HTML extends PureComponent {
|
||||
render() {
|
||||
let { text } = this.props;
|
||||
return ReactHtmlParser(text);
|
||||
let options = {};
|
||||
if (transformFunc) {
|
||||
options.transform = transformFunc;
|
||||
}
|
||||
return ReactHtmlParser(text, options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +19,14 @@ if (process.env.NODE_ENV !== 'production') {
|
||||
};
|
||||
}
|
||||
|
||||
let transformFunc = null;
|
||||
|
||||
function setTransformFunction(f) {
|
||||
transformFunc = f;
|
||||
}
|
||||
|
||||
export {
|
||||
HTML as default,
|
||||
HTML,
|
||||
setTransformFunction,
|
||||
};
|
||||
|
Reference in New Issue
Block a user