11<!DOCTYPE html>
22< html lang ="en ">
3+
34< head >
45 < meta http-equiv ="Content-Security-Policy " content ="
56 default-src 'self' blob: data:;
1314 upgrade-insecure-requests; block-all-mixed-content; ">
1415 < meta charset ="UTF-8 ">
1516 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
17+ < meta name ="description " content ="A modern EPUB reader with library management ">
1618 < title > HTMLReader</ title >
1719 < link rel ="stylesheet " href ="./src/style.css " />
1820</ head >
21+
1922< body >
2023 < header >
2124 < div class ="title ">
2225 < span > HTMLReader</ span >
2326 < span class ="book-title " id ="book-title "> </ span >
2427 </ div >
2528 < div class ="controls ">
26- < button id ="toc-button " disabled > Table of Contents</ button >
27- < button id ="open-button "> Open EPUB</ button >
28- < button id ="library-button "> Library</ button >
29- < input type ="file " id ="file-input " class ="file-input " accept =".epub ">
30- <!-- Fallback multiple file input for library import -->
31- < input type ="file " id ="library-input " class ="file-input " accept =".epub " multiple >
32- < button id ="install-button " hidden > Install App</ button > <!-- New Install Button -->
29+ < button id ="toc-button " disabled title ="View table of contents ">
30+ Contents
31+ </ button >
32+ < button id ="open-button " title ="Open an EPUB file ">
33+ Open EPUB
34+ </ button >
35+ < button id ="library-button " title ="Browse your library ">
36+ Library
37+ </ button >
38+ < input type ="file " id ="file-input " class ="file-input " accept =".epub " aria-label ="Select EPUB file ">
39+ < input type ="file " id ="library-input " class ="file-input " accept =".epub " multiple
40+ aria-label ="Select multiple EPUB files for library ">
41+ < button id ="install-button " hidden title ="Install as PWA ">
42+ Install
43+ </ button >
44+ < button id ="fullscreen-button " title ="Toggle fullscreen reading ">
45+ Fullscreen
46+ </ button >
3347 </ div >
3448 </ header >
49+
3550 < main >
36- < div id ="viewer "> </ div >
51+ < div id ="viewer " role ="main " aria-live ="polite "> </ div >
52+ < div id ="reading-progress " class ="progress-bar " style ="display: none; ">
53+ < div id ="reading-progress-fill " class ="progress-fill "> </ div >
54+ </ div >
3755 </ main >
56+
3857 < footer >
39- < button id ="prev-button " disabled > ⬅ Previous</ button >
58+ < button id ="prev-button " disabled title ="Previous page (Left arrow) " aria-label ="Previous page ">
59+ ⬅ Previous
60+ </ button >
4061 < div class ="page-info ">
41- < span > Page</ span >
42- < input type ="number " id ="current-page " min ="1 " value ="1 ">
62+ < label for =" current-page " > Page</ label >
63+ < input type ="number " id ="current-page " min ="1 " value ="1 " aria-label =" Current page number " >
4364 < span > of</ span >
4465 < span id ="total-pages "> 1</ span >
4566 </ div >
46- < button id ="next-button " disabled > Next ➡</ button >
67+ < button id ="next-button " disabled title ="Next page (Right arrow) " aria-label ="Next page ">
68+ Next ➡
69+ </ button >
4770 </ footer >
48- <!-- TOC Container -->
49- < div class ="toc-container " id ="toc-container ">
71+
72+ <!-- Table of Contents -->
73+ < nav class ="toc-container " id ="toc-container " role ="navigation " aria-label ="Table of Contents ">
5074 < div class ="toc-header ">
5175 < h3 > Table of Contents</ h3 >
52- < button id ="close-toc "> Close</ button >
76+ < button id ="close-toc " title =" Close table of contents " > ✕ </ button >
5377 </ div >
54- < div class ="toc-content " id ="toc-content "> </ div >
55- </ div >
56- <!-- Library Popup (hidden by default) -->
57- < div class ="library-container " id ="library-container ">
78+ < div class ="toc-content " id ="toc-content " role ="list "> </ div >
79+ </ nav >
80+
81+ <!-- Library Modal -->
82+ < div class ="library-container " id ="library-container " role ="dialog " aria-labelledby ="library-title " aria-modal ="true ">
5883 < div class ="library-header ">
59- < h3 > Library</ h3 >
60- < button id ="close-library "> Close</ button >
84+ < h3 id =" library-title " > Your Library</ h3 >
85+ < button id ="close-library " title =" Close library " > ✕ </ button >
6186 </ div >
62- < div class ="library-content " id ="library-content "> </ div >
87+ < div class ="library-content " id ="library-content " role =" grid " > </ div >
6388 </ div >
64- < div class ="overlay " id ="overlay "> </ div >
65- < div class ="message " id ="loading-message ">
89+
90+ <!-- Overlay -->
91+ < div class ="overlay " id ="overlay " aria-hidden ="true "> </ div >
92+
93+ <!-- Loading Message -->
94+ < div class ="message " id ="loading-message " role ="status " aria-live ="polite ">
95+ < div class ="loading-spinner " aria-hidden ="true "> </ div >
6696 < h3 > Loading EPUB...</ h3 >
6797 < p > Please wait while your book is being processed.</ p >
98+ < div class ="progress-bar ">
99+ < div id ="loading-progress " class ="progress-fill "> </ div >
100+ </ div >
68101 </ div >
69- < div class ="message " id ="error-message ">
102+
103+ <!-- Error Message -->
104+ < div class ="message " id ="error-message " role ="alert " aria-live ="assertive ">
70105 < h3 > Error</ h3 >
71106 < p id ="error-text "> There was an error processing your EPUB file.</ p >
72107 < button id ="close-error "> Close</ button >
108+ < button id ="retry-action " style ="display: none; "> Retry</ button >
109+ </ div >
110+
111+ <!-- Success Message -->
112+ < div class ="message " id ="success-message " role ="status ">
113+ < h3 > Success</ h3 >
114+ < p id ="success-text "> Operation completed successfully!</ p >
115+ < button id ="close-success "> Close</ button >
73116 </ div >
117+
118+ < script src ="node_modules/eruda/eruda.js "> </ script >
119+ < script > eruda . init ( ) ; </ script >
120+ < script type ="module " src ="./src/main.js "> </ script >
74121</ body >
75- < script type =" module " src =" ./src/main.js " > </ script >
122+
76123</ html >
0 commit comments