55 Commits

Author SHA1 Message Date
Dayowe
c7a4aa01ba Improve build system and clean up project structure
- Configure build script to create backups in backup/ directory
- Add backup/ directory to .gitignore to keep repo clean
- Add .gitignore file with common exclusions
- Remove obsolete dog-food-calculator-widget.js file
- Move all temporary and reference files to sundog-calculator-meta/

This keeps the project root clean and organized while maintaining
automatic backups during builds.
2025-08-18 09:21:54 +02:00
Dayowe
73793f43a1 Reorganize source structure for better maintainability
- Move from 3-file structure to organized 5-file structure
- Create css/ and js/ subdirectories for better organization
- Split styles into main.css and themes.css for clarity
- Extract configuration constants to separate config.js file
- Rename template.html to index.html for clarity
- Update build.js to handle new organized structure
- Replace magic numbers with CALCULATOR_CONFIG constants

New structure:
  src/
    ├── index.html       (HTML template)
    ├── css/
    │   ├── main.css     (Core styles)
    │   └── themes.css   (Theme variations)
    └── js/
        ├── config.js    (Configuration constants)
        └── calculator.js (Main logic)

This provides a good balance between organization and simplicity,
making the codebase easier to maintain without over-modularization.
2025-08-18 09:05:00 +02:00
Dayowe
ba3e0a6a6a Modularize calculator into separate source files
- Split 3470-line iframe.html into manageable components
- Created src/ directory with styles.css, template.html, calculator.js
- Updated build.js to assemble from modular source files
- Maintains identical functionality with improved maintainability
- Single source of truth: edit in src/, run build.js to generate both outputs
2025-08-17 21:20:05 +02:00
Dayowe
976e7d9136 Updte file 2025-06-26 18:10:03 +02:00
Dayowe
6a22bac56c No modal bg 2025-06-26 18:09:18 +02:00
Dayowe
650b469202 Fix share/embed modals 2025-06-26 18:03:39 +02:00
Dayowe
c4a15a95b3 Update README.md 2025-06-26 17:35:39 +02:00
Dayowe
90d9055667 Update file 2025-06-26 17:29:39 +02:00
Dayowe
238e7cdc97 Move inline to css 2025-06-26 17:29:25 +02:00
Dayowe
85cf1b22cc Fixes 2025-06-26 17:24:32 +02:00
Dayowe
3ef5908b09 css variables 2025-06-26 17:19:18 +02:00
Dayowe
271c8baafd Unit as buttons and othe rimprovements 2025-06-26 16:34:38 +02:00
Dayowe
7b66f395bb Fixes 2025-06-26 15:55:39 +02:00
Dayowe
26d2b6b1db Update daily food amount with proper units 2025-06-26 15:17:13 +02:00
Dayowe
b552b5e88e Updates and fixes 2025-06-26 14:32:32 +02:00
Dayowe
f781bbae74 Update 2025-06-26 13:10:32 +02:00
Dayowe
9a9c0b9ad0 Minor fixes and changes 2025-06-26 13:02:28 +02:00
Dayowe
d3872aef40 Inplace editing 2025-06-26 12:34:06 +02:00
Dayowe
c7d4d8eb9e List food sources separately in bottom section 2025-06-26 12:29:35 +02:00
Dayowe
0a7020cb88 Percentage system overhaul 2025-06-26 12:21:18 +02:00
Dayowe
e789f481f3 Commit before redesign 2025-06-26 12:00:51 +02:00
Dayowe
61b238fdf0 Lock into place 2025-06-26 11:47:33 +02:00
Dayowe
4d493b7d71 Constrain slider 2025-06-26 11:27:03 +02:00
Dayowe
f3baa12bd3 Add lock 2025-06-26 11:19:29 +02:00
Dayowe
119f1905ec Add food sources 2025-06-26 11:09:29 +02:00
Dayowe
081c4c2a7f Fix widget data-theme and data-scale attribute handling
Fixed the build script to properly handle data-theme and data-scale attributes:
- Remove duplicate theme/scale assignments that were overriding options
- Apply theme classes to correct element (#dogCalculator)
- Support all three themes: light, dark, system
- Remove duplicate applyTheme/applyScale calls in init method
2025-06-19 11:11:33 +02:00
Dayowe
f0666c247b Update build.js to actually use iframe.html as source of truth; data-theem and data-scale not working 2025-06-19 10:50:09 +02:00
Dayowe
19416c7592 Add plausible classes 2025-06-15 22:59:45 +02:00
Dayowe
ed7205a9c2 Do not transform class names 2025-06-15 22:39:41 +02:00
Dayowe
69739c63a9 Update 2025-06-15 22:23:59 +02:00
Dayowe
fab1e5f400 Delete files 2025-06-15 22:23:26 +02:00
Dayowe
6af1f8fa13 Update file 2025-06-15 21:57:39 +02:00
Dayowe
e430783717 Initial commit 2025-06-15 21:57:27 +02:00
Dayowe
112951c240 Initial commit 2025-06-15 20:50:45 +02:00
Dayowe
28f5a459dd fixes 2025-06-09 10:12:28 +02:00
Dayowe
d3bec564a9 Scale option 2025-06-09 10:01:29 +02:00
Dayowe
768659a74f Fix border 2025-06-09 09:58:09 +02:00
Dayowe
bb04a4d63f Add North American calorie unit support (kcal/kg, kcal/cup, kcal/can) 2025-06-09 09:53:16 +02:00
Dayowe
46b3560a68 Update iframe .. rewrite a bit 2025-06-08 23:45:32 +02:00
Dayowe
c7cb3a2acb icons 2025-06-08 23:12:52 +02:00
Dayowe
4d29490f0c fix urls 2025-06-08 23:09:10 +02:00
Dayowe
f1de59e368 correct embed url 2025-06-08 23:04:59 +02:00
Dayowe
623149dc17 embed url 2025-06-08 23:02:57 +02:00
Dayowe
134ee583a2 Update url 2025-06-08 23:00:21 +02:00
Dayowe
23aa723b5f Update better, attempt visual hierarchy 2025-06-08 22:54:52 +02:00
Dayowe
6e28d3b273 Update better 2025-06-08 22:50:22 +02:00
Dayowe
aff9fb8721 Update 2025-06-08 22:46:43 +02:00
Dayowe
e84481ecb1 Update 2025-06-08 22:43:47 +02:00
Dayowe
45c243eb0b Update 2025-06-08 22:38:08 +02:00
Dayowe
954321fe6f Update 2025-06-08 22:27:21 +02:00