mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-21 22:27:11 +00:00
Fixing custom favicons. Fixes #220
This commit is contained in:
parent
ffc218f268
commit
159e3a0035
|
@ -133,10 +133,6 @@ server.get("/*", async (req, res) => {
|
|||
<!-- Web app manifest -->
|
||||
<link rel="manifest" href="/static/assets/manifest.webmanifest">
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/icons/favicon.svg" />
|
||||
<link rel="apple-touch-icon" href="/static/assets/icons/apple-touch-icon.png" />
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" type="text/css" href="/static/styles/styles.css" />
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import { Theme } from "./theme";
|
|||
import { Symbols } from "./symbols";
|
||||
import { GetSiteResponse } from "lemmy-js-client";
|
||||
import "./styles.scss";
|
||||
import { favIconPngUrl, favIconUrl } from "shared/utils";
|
||||
|
||||
export interface AppProps {
|
||||
siteRes: GetSiteResponse;
|
||||
|
@ -33,9 +34,15 @@ export class App extends Component<AppProps, any> {
|
|||
<Helmet>
|
||||
<link
|
||||
id="favicon"
|
||||
rel="icon"
|
||||
rel="shortcut icon"
|
||||
type="image/x-icon"
|
||||
href={this.props.siteRes.site_view.site.icon}
|
||||
href={this.props.siteRes.site_view.site.icon || favIconUrl}
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
href={
|
||||
this.props.siteRes.site_view.site.icon || favIconPngUrl
|
||||
}
|
||||
/>
|
||||
</Helmet>
|
||||
)}
|
||||
|
|
|
@ -72,8 +72,8 @@ import { i18n } from "./i18next";
|
|||
|
||||
export const wsClient = new LemmyWebsocket();
|
||||
|
||||
export const favIconUrl = "/static/assets/favicon.svg";
|
||||
export const favIconPngUrl = "/static/assets/apple-touch-icon.png";
|
||||
export const favIconUrl = "/static/assets/icons/favicon.svg";
|
||||
export const favIconPngUrl = "/static/assets/icons/apple-touch-icon.png";
|
||||
// TODO
|
||||
// export const defaultFavIcon = `${window.location.protocol}//${window.location.host}${favIconPngUrl}`;
|
||||
export const repoUrl = "https://github.com/LemmyNet";
|
||||
|
|
Loading…
Reference in a new issue