mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 20:31:13 +00:00
Merge pull request #321 from LemmyNet/fix/symbols_issue
Fix/symbols issue
This commit is contained in:
commit
b4bb672cc8
4 changed files with 178 additions and 184 deletions
|
@ -15,6 +15,7 @@ import IsomorphicCookie from "isomorphic-cookie";
|
|||
import { GetSite, GetSiteResponse, LemmyHttp } from "lemmy-js-client";
|
||||
import process from "process";
|
||||
import { Helmet } from "inferno-helmet";
|
||||
import { SYMBOLS } from "../shared/components/symbols";
|
||||
import { initializeSite } from "../shared/initialize";
|
||||
import { httpBaseInternal } from "../shared/env";
|
||||
import { IncomingHttpHeaders } from "http";
|
||||
|
@ -99,6 +100,7 @@ server.get("/*", async (req, res) => {
|
|||
);
|
||||
|
||||
const root = renderToString(wrapper);
|
||||
const symbols = renderToString(SYMBOLS);
|
||||
const cspStr = process.env.LEMMY_EXTERNAL_HOST ? renderToString(cspHtml) : "";
|
||||
const helmet = Helmet.renderStatic();
|
||||
|
||||
|
@ -130,6 +132,10 @@ server.get("/*", async (req, res) => {
|
|||
|
||||
<!-- Current theme and more -->
|
||||
${helmet.link.toString()}
|
||||
|
||||
<!-- Icons -->
|
||||
${symbols}
|
||||
|
||||
</head>
|
||||
|
||||
<body ${helmet.bodyAttributes.toString()}>
|
||||
|
|
|
@ -8,7 +8,6 @@ import { Navbar } from "./navbar";
|
|||
import { Footer } from "./footer";
|
||||
import { NoMatch } from "./no-match";
|
||||
import { Theme } from "./theme";
|
||||
import { Symbols } from "./symbols";
|
||||
import { GetSiteResponse } from "lemmy-js-client";
|
||||
import "./styles.scss";
|
||||
import { favIconPngUrl, favIconUrl } from "../utils";
|
||||
|
@ -59,7 +58,6 @@ export class App extends Component<AppProps, any> {
|
|||
))}
|
||||
<Route render={props => <NoMatch {...props} />} />
|
||||
</Switch>
|
||||
<Symbols />
|
||||
</div>
|
||||
<Footer site={this.props.siteRes} />
|
||||
</div>
|
||||
|
|
|
@ -13,10 +13,10 @@ export class Icon extends Component<IconProps, any> {
|
|||
render() {
|
||||
return (
|
||||
<svg class={`icon ${this.props.classes}`}>
|
||||
<use xlinkHref={`#icon-${this.props.icon}`}></use>
|
||||
<div class="sr-only">
|
||||
<title>{this.props.icon}</title>
|
||||
</div>
|
||||
<use xlinkHref={`#icon-${this.props.icon}`}></use>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue