Add favicon to standalone build
This commit is contained in:
1 file changed
+12
-3
+12
-3
@@ -6,9 +6,18 @@
|
||||
<% const {LONG_NAME, WEBSITE} = require('../packager/brand.js'); %>
|
||||
<title><%= LONG_NAME %></title>
|
||||
<meta name="description" content="Converts Scratch projects into HTML files, zip archives, or executable programs for Windows, macOS, and Linux.">
|
||||
<% if (!process.env.STANDALONE) { %>
|
||||
<link rel="shortcut icon" href="favicon.ico?v=2" />
|
||||
<% } %>
|
||||
<% if (process.env.STANDALONE) { %>
|
||||
<%
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const faviconPath = path.resolve('static/favicon.ico');
|
||||
if (fs.existsSync(faviconPath)) {
|
||||
%>
|
||||
<link rel="shortcut icon" href="data:image/vnd.microsoft.icon;base64,<%= fs.readFileSync('static/favicon.ico').toString('base64') %>">
|
||||
<% } %>
|
||||
<% } else {%>
|
||||
<link rel="shortcut icon" href="favicon.ico?v=2">
|
||||
<% }%>
|
||||
<style>
|
||||
body[p4-splash-theme="dark"]:not([p4-loaded]) {
|
||||
background-color: #111;
|
||||
|
||||
Reference in new issue
Block a user