Convert URL encoded images to inline SVGs with fa-icon (#303)
Avoid data: URL loading and just inject SVG inline directly for logo, receipt and loader Additional favicon path fixes --------- Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
This commit is contained in:
co-authored by
Henry Wilkinson
parent
5e995438ca
commit
858f9d61bb
+1
-1
@@ -14,7 +14,7 @@ dist/
|
||||
plugins-*/
|
||||
site/sw.js
|
||||
site/ui.js
|
||||
site/assets/
|
||||
site/favicons/
|
||||
.jekyll-cache
|
||||
|
||||
ipfs-core.min.js
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
background-color: lightgrey;
|
||||
}
|
||||
</style>
|
||||
<link rel="icon" href="/favicon.ico" sizes="32x32">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<link rel="icon" href="/favicons/favicon.ico" sizes="32x32">
|
||||
<link rel="icon" href="/favicons.favicon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/favicons/apple-touch-icon.png">
|
||||
</head>
|
||||
<body>
|
||||
<replay-web-page
|
||||
|
||||
+21
-23
@@ -152,7 +152,13 @@ export class ReplayWebApp extends LitElement {
|
||||
align-items: center;
|
||||
}
|
||||
.wr-logo-item {
|
||||
padding: 0 8px 0 0;
|
||||
padding: 0 0.5rem 0 0;
|
||||
|
||||
-webkit-user-drag: none;
|
||||
-khtml-user-drag: none;
|
||||
-moz-user-drag: none;
|
||||
-o-user-drag: none;
|
||||
user-drag: none;
|
||||
}
|
||||
.no-wrap {
|
||||
white-space: nowrap;
|
||||
@@ -246,20 +252,13 @@ export class ReplayWebApp extends LitElement {
|
||||
}
|
||||
|
||||
renderNavBrand() {
|
||||
return html` <img
|
||||
style="height: 1.25rem; user-drag: none; user-select: none; -moz-user-select: none;"
|
||||
src="data:image/svg+xml,${encodeURIComponent(
|
||||
brandLockupColor as string,
|
||||
)}"
|
||||
alt="ReplayWeb.page"
|
||||
draggable="false"
|
||||
/>
|
||||
<span
|
||||
id="home"
|
||||
class="logo-text has-text-weight-bold is-size-6 has-allcaps wide-only"
|
||||
>
|
||||
<span class="is-sr-only">Home</span>
|
||||
</span>`;
|
||||
return html` <fa-icon
|
||||
.svg="${brandLockupColor}"
|
||||
size=""
|
||||
width="9.5rem"
|
||||
height="1.25rem"
|
||||
aria-hidden="true"
|
||||
></fa-icon>`;
|
||||
}
|
||||
|
||||
renderNavBar() {
|
||||
@@ -276,7 +275,7 @@ export class ReplayWebApp extends LitElement {
|
||||
<a
|
||||
href="${this.homeUrl}"
|
||||
class="navbar-item wr-logo-item"
|
||||
aria-labelledby="home"
|
||||
aria-label="ReplayWeb.page Home"
|
||||
>
|
||||
${this.renderNavBrand()}
|
||||
</a>
|
||||
@@ -736,13 +735,12 @@ export class ReplayWebApp extends LitElement {
|
||||
<div class="content">
|
||||
<div style="display: flex">
|
||||
<div class="has-text-centered" style="width: 220px">
|
||||
<img
|
||||
style="height: 3rem;"
|
||||
src="data:image/svg+xml,${encodeURIComponent(
|
||||
rwpLogo as string,
|
||||
)}"
|
||||
alt="ReplayWeb.page Logo"
|
||||
/>
|
||||
<fa-icon
|
||||
size="3rem"
|
||||
.svg=${rwpLogo}
|
||||
aria-label="ReplayWeb.page Logo"
|
||||
role="img"
|
||||
></fa-icon>
|
||||
<div style="font-size: smaller; margin-bottom: 1em">${
|
||||
IS_APP ? "App" : ""
|
||||
} v${VERSION}</div>
|
||||
|
||||
+11
-8
@@ -310,15 +310,17 @@ export class RWPEmbedReceipt extends LitElement {
|
||||
<div>
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://github.com/webrecorder/replayweb.page"
|
||||
href="https://replayweb.page"
|
||||
aria-label="ReplayWeb.page Home"
|
||||
>
|
||||
<img
|
||||
style="height: 1.5rem;"
|
||||
src="data:image/svg+xml,${encodeURIComponent(
|
||||
brandLockupColor as string,
|
||||
)}"
|
||||
alt="ReplayWeb.page Logo"
|
||||
/>
|
||||
<fa-icon
|
||||
size=""
|
||||
height="1.5rem"
|
||||
width="12rem"
|
||||
.svg=${brandLockupColor}
|
||||
aria-label=""
|
||||
aria-hidden="true"
|
||||
></fa-icon>
|
||||
</a>
|
||||
</div>
|
||||
<span>
|
||||
@@ -326,6 +328,7 @@ export class RWPEmbedReceipt extends LitElement {
|
||||
class="has-text-black"
|
||||
target="_blank"
|
||||
href="https://github.com/webrecorder/replayweb.page"
|
||||
aria-label="ReplayWeb.page source code"
|
||||
>Source Code
|
||||
<fa-icon
|
||||
class="menu-logo ml-1"
|
||||
|
||||
+7
-5
@@ -336,11 +336,13 @@ You can select a file to upload from the main page by clicking the 'Choose File.
|
||||
return html`
|
||||
<section class="container">
|
||||
<div class="is-justify-content-center is-flex">
|
||||
<img
|
||||
style="height: 5rem; margin-bottom: 1rem;"
|
||||
src="data:image/svg+xml,${encodeURIComponent(rwpLogo as string)}"
|
||||
alt="ReplayWeb.page Logo"
|
||||
/>
|
||||
<fa-icon
|
||||
size="5rem"
|
||||
style="margin-bottom: 1rem;"
|
||||
.svg=${rwpLogo}
|
||||
aria-label="ReplayWeb.page Logo"
|
||||
role="img"
|
||||
></fa-icon>
|
||||
</div>
|
||||
${!this.embed
|
||||
? html` <div class="level">
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ const electronMainConfig = (/*env, argv*/) => {
|
||||
{ from: "build/extra_prebuilds/", to: "prebuilds" },
|
||||
{
|
||||
from: path.resolve(__dirname, "src/assets/favicons"),
|
||||
to: path.resolve(__dirname, "dist"),
|
||||
to: path.resolve(__dirname, "dist/favicons"),
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user