From 324955ed7f5b49c546846a1f0d52646cf2f7f35e Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 18 Aug 2026 11:11:41 +0200 Subject: [PATCH] update layout and descriptions --- css/style.css | 42 ++++++++++++++++++++++++++++++------------ index.html | 15 +++++++-------- js/script.js | 2 +- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/css/style.css b/css/style.css index c227e42..5fece95 100644 --- a/css/style.css +++ b/css/style.css @@ -11,9 +11,12 @@ --surface-container-low: #f2f4f6; --surface-container: #eceef0; --surface-container-high: #e6e8ea; - --on-surface: #191c1e; - --on-surface-variant: #3c4a45; - --on-background: #191c1e; + /* --on-surface: #191c1e; */ + --on-surface: #000000; + /* --on-surface-variant: #3c4a45; */ + --on-surface-variant: #000000; + /* --on-background: #191c1e; */ + --on-background: #000000; --text-muted: #64748b; --border-subtle: #e2e8f0; --outline-variant: #bbcac3; @@ -145,7 +148,8 @@ body { gap: var(--space-7); max-width: 1200px; margin: auto; - padding: var(--space-7) var(--space-6) var(--space-9); + /* padding: var(--space-7) var(--space-6) var(--space-9); */ + padding: 0 var(--space-6) var(--space-9); align-items: flex-start; } @@ -221,6 +225,13 @@ h1 { margin-bottom: var(--space-2); } +.v2 { + font-size: 18px; + line-height: 22px; + font-weight: 500; + color: var(--secondary); +} + h2 { font-size: 20px; line-height: 28px; @@ -244,12 +255,12 @@ p { a { color: var(--primary); - text-decoration: none; + text-decoration: underline; font-weight: 500; } a:hover { - text-decoration: underline; + text-decoration: none; } code { @@ -266,18 +277,25 @@ code { background: var(--surface-container-lowest); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); - padding: var(--space-4); + padding: var(--space-2); } /* First (intro) section: keep it flush/light */ .section.first-step { background: transparent; border: none; - padding: var(--space-2) 0 0; + /* padding: var(--space-5) 0 0; */ + /* border: 10px solid red; */ + padding: 0; +} + +.section.first-step p { + margin-top: 0; + padding-top: 0; } .section h2 { - margin-bottom: var(--space-4); + margin-bottom: var(--space-1); } /* Legacy divider no longer needed; cards separate content */ @@ -346,7 +364,7 @@ code { .table { display: table; - margin: var(--space-2) 0 0; + /* margin: var(--space-2) 0 0; */ width: 100%; border-collapse: collapse; } @@ -507,7 +525,7 @@ select { background: var(--surface-container); border: 1px solid transparent; border-radius: var(--radius-lg); - padding: 8px 10px; + padding: 4px 4px; transition: border-color 0.15s ease, box-shadow 0.15s ease; } @@ -630,7 +648,7 @@ input[type="file"] { /* border: 2px dashed var(--outline-variant); */ border-radius: var(--radius-lg); font-size: var(--font-size); - padding: 16px 20px; + padding: 4px 4px; margin: var(--space-2) 0 0; cursor: pointer; width: 100%; diff --git a/index.html b/index.html index 174aba4..e6ba24b 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@
- image2cpp + image2cpp v2 @@ -34,7 +34,6 @@
-

image2cpp

image2cpp is a simple tool to convert images into byte arrays (and vice versa) for use with (monochrome) displays such as OLEDs on your Arduino or Raspberry Pi.
It was originally made to work with the Adafruit OLED library (for which your can find an example Arduino sketch here) but has been expanded by the community to be useful in all kind of (embedded) projects.

@@ -95,7 +94,7 @@
- Glyph name is used to identify the image in the code. + Glyph name is used to identify the image in the output code.
@@ -107,13 +106,13 @@
-
+
Canvas size: x
- glyph name + glyph name:
@@ -274,7 +273,7 @@
Adds some extra Arduino code around the output. - If multiple images are loaded, generates a byte array for each and appends a counter to the identifier. + If multiple images are loaded, generates a byte array for each and appends its glyph name (from step 2 above) to the identifier.
Adds some extra Arduino code around the output. @@ -313,14 +312,14 @@
- Include a full example displaying the first image. +
- Use uint8_t instead of unsigned char and PROGMEM. +
diff --git a/js/script.js b/js/script.js index 86538e0..90190e4 100644 --- a/js/script.js +++ b/js/script.js @@ -868,7 +868,7 @@ function handleImageSelection(evt) { checkImagesAvailable(); }; - imageEntry.querySelector('.js-file-name').textContent = `${file.name} (file resolution: ${img.width} x ${img.height})`; + imageEntry.querySelector('.js-file-name').textContent = `${file.name} (image size: ${img.width} x ${img.height} px)`; imageEntry.querySelector('.js-remove').onclick = removeButtonOnClick; fileInputColumnEntryRemoveButton.onclick = removeButtonOnClick;