Skip to content

Commit 82a2c1c

Browse files
fix formatting
1 parent ec74a2f commit 82a2c1c

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
## Quick Start
3737

3838
### For Visitors
39+
3940
Simply visit: **[fernandotonacoder.github.io](https://fernandotonacoder.github.io)**
4041

4142
### For Developers
43+
4244
```bash
4345
# Clone and install
4446
git clone https://github.com/fernandotonacoder/fernandotonacoder.github.io.git

docs/CONTRIBUTING.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ git push origin feature/your-feature
2626
```
2727

2828
**CI/CD Pipeline:**
29+
2930
- **On PR:** Tests, linting, format checks
3031
- **On merge to main:** Auto-deploys to GitHub Pages
3132

@@ -48,16 +49,19 @@ npm run format:check # Check if formatted correctly
4849
### Translation System
4950

5051
**Why custom instead of i18n library?**
52+
5153
- No external dependencies
5254
- Tiny footprint (~100 lines)
5355
- Does exactly what we need, nothing more
5456

5557
**Language detection priority:**
58+
5659
1. localStorage (`language` key)
5760
2. Browser language (`navigator.language`)
5861
3. Fallback to English
5962

6063
**Translation keys:** Flat structure in `/locales/*.json`. HTML elements use `data-translate` attributes:
64+
6165
- `data-translate="key"` → Updates `textContent`
6266
- `data-translate-alt="key"` → Updates `alt` attribute
6367
- `data-translate-html="key"` → Updates `innerHTML` (supported but unused)
@@ -67,6 +71,7 @@ npm run format:check # Check if formatted correctly
6771
### Custom Language Selector
6872

6973
**Why not a normal `<select>`?**
74+
7075
- Needed custom styling (glassmorphism effect)
7176
- Better control over appearance
7277
- Still accessible with keyboard navigation
@@ -76,6 +81,7 @@ npm run format:check # Check if formatted correctly
7681
**Color scheme:** CSS variables in `:root` for easy theming
7782

7883
**Icon colors:** SVG filters for color manipulation:
84+
7985
```css
8086
/* White icons on dark background */
8187
filter: brightness(0) invert(1);
@@ -85,6 +91,7 @@ filter: brightness(0) invert(0);
8591
```
8692

8793
**Glassmorphism effect:**
94+
8895
```css
8996
background: rgba(255, 255, 255, 0.1);
9097
backdrop-filter: blur(10px);
@@ -93,15 +100,17 @@ backdrop-filter: blur(10px);
93100
### ESLint Config
94101

95102
**Why flat config (`eslint.config.mjs`)?**
103+
96104
- ESLint 9+ requires it
97105
- Different environments need different globals:
98-
- Browser JS: `setLanguage`, `getCurrentLanguage` (custom globals)
99-
- Test files: Jest globals (`describe`, `test`, `expect`)
100-
- Jest config: Node.js globals (`module`)
106+
- Browser JS: `setLanguage`, `getCurrentLanguage` (custom globals)
107+
- Test files: Jest globals (`describe`, `test`, `expect`)
108+
- Jest config: Node.js globals (`module`)
101109

102110
### Prettier Config
103111

104112
**Why these settings?**
113+
105114
- Double quotes, no trailing commas, always parens → Personal preference from TypeScript/C# background
106115
- `tabWidth: 4` → Personal preference from C# background
107116

@@ -128,29 +137,35 @@ backdrop-filter: blur(10px);
128137
## Gotchas
129138

130139
**Tests failing?**
140+
131141
- Make sure JSON files don't have trailing commas (Prettier removes them automatically)
132142
- Run `npm test -- --clearCache` if weird caching issues
133143

134144
**Translations not loading?**
145+
135146
- Check browser console for fetch errors
136147
- Verify JSON is valid
137148
- Check file paths are correct
138149

139150
**Styles not applying?**
151+
140152
- Hard refresh: `Ctrl+Shift+R` (Windows/Linux) or `Cmd+Shift+R` (Mac)
141153

142154
**Can't push to main?**
155+
143156
- That's intentional. Create a feature branch and PR.
144157

145158
---
146159

147160
## Testing Strategy
148161

149162
**What we test:**
163+
150164
- Translation system: Loading, language switching, localStorage persistence
151165
- Custom selector: UI interactions, language selection
152166

153167
**What we don't test:**
168+
154169
- Bootstrap components (already tested by Bootstrap)
155170
- Browser APIs (fetch, localStorage)
156171
- CSS styling
@@ -162,17 +177,20 @@ backdrop-filter: blur(10px);
162177
## Design Tokens
163178

164179
### Colors
180+
165181
```css
166-
--clr-navy: #001f3f; /* Primary background */
167-
--clr-blue-text: #2563eb; /* Accent text */
182+
--clr-navy: #001f3f; /* Primary background */
183+
--clr-blue-text: #2563eb; /* Accent text */
168184
--clr-linkedin: #0077b5;
169185
--clr-github: #333;
170186
```
171187

172188
### Spacing Scale (Bootstrap)
189+
173190
`0` = 0, `1` = 4px, `2` = 8px, `3` = 16px, `4` = 24px, `5` = 48px
174191

175192
### Breakpoints
193+
176194
- Mobile first approach
177195
- Key breakpoint: 992px (tablets → desktop)
178196

src/index.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ <h1 class="display-5 fw-bold lh-1 mb-3" style="color: #070f2b">
9595
target="_blank"
9696
rel="noopener noreferrer"
9797
>
98-
<button
99-
type="button"
100-
class="btn btn-github-outline btn-lg px-4"
101-
>
98+
<button type="button" class="btn btn-github-outline btn-lg px-4">
10299
<img
103100
src="./assets/images/github.svg"
104101
alt="GitHub logo"

0 commit comments

Comments
 (0)