@@ -97,33 +97,38 @@ function addReadingList() {
9797 path_parts . push ( new_pos ) ;
9898 new_pos_link = path_parts . join ( "/" ) ;
9999 fst = active . cloneNode ( true ) ;
100- let txt = document . createTextNode ( `, Page ${ position + 1 } of ${ num_readings } , ` ) ;
100+ let txt = document . createElement ( "p" ) ;
101+ txt . textContent = `Page ${ position + 1 } of ${ num_readings } , ` ;
101102 var fst_lnk = document . createElement ( "a" ) ;
102103 //fst_lnk.className = "btn btn-lg reading-navigation prev-reading";
103104 fst_lnk . href = new_pos_link ;
104105 fst_lnk . textContent = `Back to page ${
105106 position
106107 } of ${ num_readings } : ${ reading_names [ position - 1 ] } .`;
108+ txt . append ( fst_lnk ) ;
107109 fst . append ( txt ) ;
108- fst . append ( fst_lnk ) ;
110+
109111 } else if ( position == 0 ) {
110112 fst = active . cloneNode ( true ) ;
111- let txt = document . createTextNode ( `, Page 1 of ${ num_readings } .` ) ;
113+ let txt = document . createElement ( "p" ) ;
114+ txt . textContent = `<br/>Page 1 of ${ num_readings } .` ;
112115 fst . append ( txt ) ;
113116 } else {
114117 new_pos = eBookConfig . readings [ 0 ] ;
115118 path_parts = cur_path_parts . slice ( 0 , cur_path_parts . length - endLop ) ;
116119 path_parts . push ( new_pos ) ;
117120 new_pos_link = path_parts . join ( "/" ) ;
118121 fst = active . cloneNode ( true ) ;
119- let txt = document . createTextNode ( ", Notice: this page is not part of the assignment. To remove this warning click " ) ;
122+ let txt = document . createElement ( "p" ) ;
123+ txt . textContent = "Notice: this page is not part of the assignment. To remove this warning click " ;
124+ txt . append ( exit_link ) ;
120125 fst . append ( txt ) ;
121- fst . append ( exit_link ) ;
122126 }
123127 if ( position == eBookConfig . readings . length - 1 ) {
124128 // no more readings
125129 snd = active ;
126- let txt = document . createTextNode ( `, Page ${ num_readings } of ${ num_readings } : ${ reading_names [ position ] } ` ) ;
130+ let txt = document . createElement ( "p" ) ;
131+ txt . textContent = `Page ${ num_readings } of ${ num_readings } : ${ reading_names [ position ] } ` ;
127132 snd . append ( txt ) ;
128133 } else if ( position >= 0 ) {
129134 // get next name
@@ -138,32 +143,37 @@ function addReadingList() {
138143 snd_lnk . textContent = `Continue to page ${
139144 position + 2
140145 } of ${ num_readings } : ${ reading_names [ position + 1 ] } `;
141- let txt = document . createTextNode ( ", " ) ;
146+ let txt = document . createElement ( "p" ) ;
147+ txt . append ( snd_lnk ) ;
142148 snd . append ( txt ) ;
143- snd . append ( snd_lnk ) ;
149+
144150 } else {
145151 snd = active . cloneNode ( true ) ;
146- let txt = document . createTextNode ( ", Notice: this page is not part of the assignment. To remove this warning click ") ;
147- snd . append ( txt ) ;
152+ let txt = document . createElement ( "p ") ;
153+ txt . textContent = "Notice: this page is not part of the assignment. To remove this warning click " ;
148154 let exit_clone = exit_link . cloneNode ( true ) ;
149155
150156 exit_clone . addEventListener ( 'click' , function ( event ) {
151157 localStorage . removeItem ( "currentAssignmentInfo" ) ;
152158 } ) ;
153- snd . append ( exit_clone ) ;
159+ txt . append ( exit_clone ) ;
160+ snd . append ( txt ) ;
161+
154162
155163 }
156164
157165 top = document . createElement ( "div" ) ;
158- top . className = "runestone assigment-nav top-assignment-nav"
166+ top . className = "ptx-runestone-container"
167+ fst . className = "runestone assignment-nav top-assignment-nav"
159168 //top.style.backgroundColor = "var(--componentBgColor)"
160169 //top.style.borderColor = "var(--componentBorderColor)"
161170 //top.style.borderWidth = "1px"
162171 top . append ( fst ) ;
163172 //top.append(snd);
164173
165174 bottom = document . createElement ( "div" ) ;
166- bottom . className = "runestone assigment-nav bottom-assignment-nav"
175+ bottom . className = "ptx-runestone-container"
176+ snd . className = "runestone assignment-nav bottom-assignment-nav"
167177 //bottom.style.backgroundColor = "var(--componentBgColor)"
168178 //bottom.style.borderColor = "var(--componentBorderColor)"
169179 //bottom.style.borderWidth = "1px"
0 commit comments