Add white/black Folio icon variants and theme-aware in-app icon
- Recolor the in-app glyph (Design B) to a solid white master and generate a black variant; the desktop/app icon set (build/icons) is now the white master at all sizes (verified bundled white in the AppImage/deb) - In-app icon switches with the existing data-theme: black in Light mode (visible on the light panel) and white in Dark mode (visible on the near-black panel); the desktop/application icon stays white
BIN
build/brand-icons/128x128-black.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 778 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 947 B After Width: | Height: | Size: 392 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 605 B |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 797 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 1.6 KiB |
|
|
@ -30,6 +30,10 @@ const copyAssets = {
|
||||||
path.join("build", "icons", "128x128.png"),
|
path.join("build", "icons", "128x128.png"),
|
||||||
path.join("dist", "brand-icon.png")
|
path.join("dist", "brand-icon.png")
|
||||||
);
|
);
|
||||||
|
fs.copyFileSync(
|
||||||
|
path.join("build", "brand-icons", "128x128-black.png"),
|
||||||
|
path.join("dist", "brand-icon-black.png")
|
||||||
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -323,11 +323,21 @@ html, body {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The brand logo is a dark glyph; on the near-black dark theme it would be
|
/* The brand icon ships as two color variants of the same glyph: a black one
|
||||||
invisible. Render it white there (light theme keeps the dark logo). */
|
for Light mode (visible on the light panel) and a white one for Dark mode
|
||||||
:root[data-theme="dark-mode"] .brand-icon,
|
(visible on the near-black panel). Toggle them with the existing data-theme
|
||||||
:root[data-theme="dark-mode"] .welcome-brand {
|
attribute so the switch is automatic and the shape never changes. */
|
||||||
filter: brightness(0) invert(1);
|
.brand-icon-dark,
|
||||||
|
.welcome-brand-dark {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
:root[data-theme="dark-mode"] .brand-icon-light,
|
||||||
|
:root[data-theme="dark-mode"] .welcome-brand-light {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
:root[data-theme="dark-mode"] .brand-icon-dark,
|
||||||
|
:root[data-theme="dark-mode"] .welcome-brand-dark {
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- welcome ---- */
|
/* ---- welcome ---- */
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@
|
||||||
<aside class="sidebar">
|
<aside class="sidebar">
|
||||||
<div class="sidebar-header">
|
<div class="sidebar-header">
|
||||||
<div class="sidebar-brand">
|
<div class="sidebar-brand">
|
||||||
<img class="brand-icon" src="./brand-icon.png" alt="Folio" draggable="false" />
|
<img class="brand-icon brand-icon-light" src="./brand-icon-black.png" alt="Folio" draggable="false" />
|
||||||
|
<img class="brand-icon brand-icon-dark" src="./brand-icon.png" alt="Folio" draggable="false" />
|
||||||
<span class="sidebar-title">Chapters</span>
|
<span class="sidebar-title">Chapters</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="icon-button" id="addChapterBtn" title="Add chapter">+</button>
|
<button class="icon-button" id="addChapterBtn" title="Add chapter">+</button>
|
||||||
|
|
@ -40,7 +41,8 @@
|
||||||
</aside>
|
</aside>
|
||||||
<main class="editor" id="editor">
|
<main class="editor" id="editor">
|
||||||
<div class="welcome" id="welcome">
|
<div class="welcome" id="welcome">
|
||||||
<img class="welcome-brand" src="./brand-icon.png" alt="Folio" draggable="false" />
|
<img class="welcome-brand welcome-brand-light" src="./brand-icon-black.png" alt="Folio" draggable="false" />
|
||||||
|
<img class="welcome-brand welcome-brand-dark" src="./brand-icon.png" alt="Folio" draggable="false" />
|
||||||
<h1 class="app-name">Folio</h1>
|
<h1 class="app-name">Folio</h1>
|
||||||
<p class="app-tagline">Your stories, in folders you choose.</p>
|
<p class="app-tagline">Your stories, in folders you choose.</p>
|
||||||
<div class="welcome-actions">
|
<div class="welcome-actions">
|
||||||
|
|
|
||||||