Skip to content

Commit 32d59ba

Browse files
committed
More fixes
1 parent 9ffd8fa commit 32d59ba

6 files changed

Lines changed: 20 additions & 12 deletions

File tree

Build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ <h3>Upload File</h3>
165165
<div class="container">
166166
<div class="header">
167167
<h1>HTMLChat</h1>
168-
<p>version v0.2.0</p>
168+
<p>version v0.3.0</p>
169169
<div class="header-controls">
170170
<button class="header-btn" id="sound-toggle" title="Toggle Sounds">
171171
<i class="sound-on-icon" data-lucide="volume-2"></i>

Build/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "htmlchat",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "A retro-styled, browser-only chat client.",
55
"main": "index.js",
66
"scripts": {

Build/src/main.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,19 @@ class HTMLChatApp {
5656
const nodes = document.querySelectorAll('[data-lucide]');
5757
for (const node of nodes) {
5858
const iconName = node.getAttribute('data-lucide');
59-
const svgHTML = createIconHTML(iconName, { size: node.getAttribute('width') || 16 });
59+
// Gather all classes except 'context-icon' (which may be replaced anyway)
60+
let classes = node.className ? node.className.split(' ') : [];
61+
// Always add 'context-icon' if present
62+
const classString = classes.join(' ').trim();
63+
// Inline styles (including display:none, inline widths, etc)
64+
const styleString = node.getAttribute('style') || '';
65+
const width = node.getAttribute('width') || 16;
66+
67+
const svgHTML = createIconHTML(iconName, {
68+
size: width,
69+
class: classString,
70+
style: styleString
71+
});
6072
node.outerHTML = svgHTML;
6173
}
6274
}

Build/src/styles.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ body {
1313
}
1414

1515
.container {
16-
width: 90%;
17-
max-width: 1600px;
18-
margin: 20px auto;
1916
background: #fff;
2017
border: 2px solid #ccc;
2118
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.774);
@@ -160,7 +157,7 @@ body {
160157

161158
.main-content {
162159
display: flex;
163-
height: 600px;
160+
height: calc(100vh - 180px);
164161
}
165162

166163
.chat-area {
@@ -797,12 +794,11 @@ body {
797794
/* Mobile responsiveness */
798795
@media (max-width: 640px) {
799796
.container {
800-
margin: 10px;
801797
max-width: none;
802798
}
803799

804800
.main-content {
805-
height: 500px;
801+
height: calc(100vh - 180px);
806802
}
807803

808804
.user-list {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![GitHub Pages Build](https://github.com/HTMLToolkit/HTMLChat/actions/workflows/static.yml/badge.svg)](https://github.com/HTMLToolkit/HTMLChat/actions/workflows/static.yml)
66

77
A retro-styled, browser-only chat client.
8-
Version: **v0.2.0-beta**
8+
Version: **v0.3.0-beta**
99

1010
## What this is
1111

0 commit comments

Comments
 (0)