Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit 0dfa7fd

Browse files
committed
feat: reorganize action buttons into 3x3 grid layout
- Reorganize action buttons into centered 3x3 grid pattern - Copy buttons form cross pattern (top, bottom, left, right) - Download buttons positioned at corners - Copy path button centered in grid - Fix event listener selector to use card-actions-grid - Update README with usage examples and format conversion details - Pin Node.js version to 22 in GitHub Actions workflows - Improve button visibility and interaction on hover The new layout provides better visual organization with copy actions forming a cross pattern, downloads at corners, and the copy path button prominently displayed in the center.
1 parent 8f442f9 commit 0dfa7fd

File tree

6 files changed

+480
-162
lines changed

6 files changed

+480
-162
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Node.js (for fallback)
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: '20'
29+
node-version: '22'
3030
- name: Generate assets.json if missing (fallback)
3131
run: |
3232
if [ ! -f "assets.json" ]; then

.github/workflows/update-assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Node.js
2323
uses: actions/setup-node@v4
2424
with:
25-
node-version: '20'
25+
node-version: '22'
2626

2727
- name: Generate assets.json
2828
run: |

README.md

Lines changed: 170 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,171 @@
1-
# visual-assets
1+
# Visual Assets
22

3-
Original format-ready visual assets for everyone
3+
Original format-ready visual assets for everyone.
4+
5+
## Adding Assets
6+
7+
**Important:** All assets must be placed inside the `assets/` directory only.
8+
9+
### Directory Structure
10+
11+
Place your assets in the appropriate subdirectory:
12+
13+
- **Icons**: `assets/icons/` - Small icon files (typically SVG)
14+
- **Logos**: `assets/logos/` - Logo files (typically SVG)
15+
- **Images**: `assets/images/` - Image files (PNG, JPG, WebP, etc.)
16+
17+
### Supported File Formats
18+
19+
The following formats are supported:
20+
21+
- **SVG** (recommended for icons and logos) - Vector format, scalable without quality loss
22+
- **PNG** - Raster format with transparency support
23+
- **JPG/JPEG** - Raster format, smaller file size, no transparency
24+
- **WebP** - Modern raster format with excellent compression
25+
26+
### Format Conversion
27+
28+
All assets can be converted between supported formats directly in the browser using the asset gallery interface. The conversion is performed client-side using the browser's Canvas API.
29+
30+
**Conversion Matrix:**
31+
32+
| From → To | PNG | JPG | WebP | SVG |
33+
|-----------|-----|-----|------|-----|
34+
| **SVG** |||| ✅ (original) |
35+
| **PNG** | ✅ (original) ||| ⚠️ (embedded) |
36+
| **JPG** || ✅ (original) || ⚠️ (embedded) |
37+
| **WebP** ||| ✅ (original) | ⚠️ (embedded) |
38+
39+
**Notes:**
40+
41+
-**Full conversion** - Maintains quality and dimensions
42+
- ⚠️ **Embedded conversion** - Raster images embedded in SVG (not true vector conversion)
43+
- SVG to raster conversions maintain quality at the original size
44+
- Raster to raster conversions preserve image dimensions
45+
- Use the copy/download buttons in the asset gallery to access different formats
46+
- Conversions are performed on-demand in your browser (no server processing)
47+
48+
### Example
49+
50+
To add a new icon:
51+
52+
1. Place your file in `assets/icons/your-icon-name.svg`
53+
2. Commit and push to the repository
54+
3. The system will automatically update `assets.json` (see below)
55+
56+
## Automatic Asset Registration
57+
58+
**`assets.json` is updated programmatically** - you should not edit it manually.
59+
60+
When you add, modify, or remove files in the `assets/` directory:
61+
62+
1. A GitHub Action workflow automatically scans the filesystem
63+
2. Extracts metadata (name, type, tags, size) from your files
64+
3. Generates or updates `assets.json` automatically
65+
4. Commits the changes back to the repository
66+
67+
The system automatically:
68+
69+
- Extracts tags from filenames (e.g., `aws-black-orange-icon.svg` → tags: `["aws", "black", "orange", "icon"]`)
70+
- Determines asset type from directory (`icons/``icon`, `logos/``logo`)
71+
- Extracts size information from SVG files (viewBox or width/height attributes)
72+
- Generates descriptions based on filename and metadata
73+
74+
## Direct Asset URLs
75+
76+
Assets are automatically made available at shorter, direct URLs:
77+
78+
- Icons: `https://assets.awsug.nz/icons/filename.svg`
79+
- Logos: `https://assets.awsug.nz/logos/filename.svg`
80+
- Images: `https://assets.awsug.nz/images/filename.png`
81+
82+
For example:
83+
84+
- `assets/icons/aws-black-orange.svg``https://assets.awsug.nz/icons/aws-black-orange.svg`
85+
- `assets/logos/datacom-primary-blue.svg``https://assets.awsug.nz/logos/datacom-primary-blue.svg`
86+
87+
**Full URL format:** All assets can be accessed using the full URL path:
88+
89+
- `https://assets.awsug.nz/icons/aws-black-orange.svg`
90+
- `https://assets.awsug.nz/logos/datacom-primary-blue.svg`
91+
- `https://assets.awsug.nz/images/your-image.png`
92+
93+
These URLs are created automatically during deployment - no manual configuration needed.
94+
95+
## Usage
96+
97+
### Direct Image Links
98+
99+
You can link directly to any asset using its direct URL:
100+
101+
**Icons:**
102+
103+
- `https://assets.awsug.nz/icons/aws-black-orange.svg`
104+
- `https://assets.awsug.nz/icons/aws-blue-orange.svg`
105+
106+
**Logos:**
107+
108+
- `https://assets.awsug.nz/logos/aws-black-orange-sphere.svg`
109+
- `https://assets.awsug.nz/logos/datacom-primary-blue.svg`
110+
111+
**Images:**
112+
113+
- `https://assets.awsug.nz/images/your-image.png`
114+
115+
### In HTML
116+
117+
Embed an image directly:
118+
119+
```html
120+
<img src="https://assets.awsug.nz/icons/aws-black-orange.svg" alt="AWS Icon">
121+
```
122+
123+
Link to an image (opens in new tab):
124+
125+
```html
126+
<a href="https://assets.awsug.nz/icons/aws-black-orange.svg" target="_blank">
127+
View AWS Icon
128+
</a>
129+
```
130+
131+
### In Markdown
132+
133+
Display an image:
134+
135+
```markdown
136+
![AWS Icon](https://assets.awsug.nz/icons/aws-black-orange.svg)
137+
```
138+
139+
Link to an image:
140+
141+
```markdown
142+
[View AWS Icon](https://assets.awsug.nz/icons/aws-black-orange.svg)
143+
```
144+
145+
### In CSS
146+
147+
Use as background image:
148+
149+
```css
150+
background-image: url('https://assets.awsug.nz/logos/datacom-primary-blue.svg');
151+
```
152+
153+
### In React/JSX
154+
155+
```jsx
156+
<img src="https://assets.awsug.nz/icons/aws-black-orange.svg" alt="AWS Icon" />
157+
```
158+
159+
### Download Links
160+
161+
You can also use these URLs as download links:
162+
163+
```html
164+
<a href="https://assets.awsug.nz/icons/aws-black-orange.svg" download>
165+
Download AWS Icon
166+
</a>
167+
```
168+
169+
## License
170+
171+
Use responsibly and according to their respective licenses.

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<header class="header">
1515
<h1><a href="/" class="header-title-link">Visual Assets</a></h1>
1616
<div class="header-actions">
17-
<a href="https://github.com/jajera/visual-assets" class="github-button" aria-label="View on GitHub"
18-
target="_blank" rel="noopener noreferrer">
17+
<a href="https://github.com/aws-user-group-nz/visual-assets" class="github-button"
18+
aria-label="View on GitHub" target="_blank" rel="noopener noreferrer">
1919
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
2020
<path
2121
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />

0 commit comments

Comments
 (0)