File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public IActionResult Index()
3030
3131 ViewBag . PageTitle = siteMapping . IndentLevel is 0 ? siteMapping . ChapterTitle + " " + siteMapping . RawHeading : siteMapping . RawHeading ;
3232 ViewBag . NextPage = FlipPage ( siteMapping ! . ChapterNumber , siteMapping . PageNumber , true ) ;
33+ ViewBag . CurrentPageKey = siteMapping . Key ;
3334 ViewBag . PreviousPage = FlipPage ( siteMapping . ChapterNumber , siteMapping . PageNumber , false ) ;
3435 ViewBag . HeadContents = headHtml ;
3536 ViewBag . Contents = html ;
Original file line number Diff line number Diff line change 124124 <a v-if =" chapterParentPage" :href =" chapterParentPage.href" class =" menu-chapter-title text-light" >
125125 <span v-cloak >{{ chapterParentPage .title }} </span >
126126 </a >
127+ <div class =" menu-chapter-title text-light" >
128+ {{ currentPageCount }} / {{ totalPageCount }}
129+ </div >
127130
128131 <div class =" d-flex align-items-center" >
129132 <div class =" border-end pe-3 d-none d-md-block" >
269272 @{
270273 var tocData = _SiteMappings .GetTocData ();
271274 }
272-
275+ CURRENT_PAGE_COUNT = @Json .Serialize (currentPageCount)
276+ TOTAL_PAGE_COUNT = @Json .Serialize (overallCount)
273277 PREVIOUS_PAGE = @Json .Serialize (ViewBag .PreviousPage )
274278 NEXT_PAGE = @Json .Serialize (ViewBag .NextPage )
275279 TOC_DATA = @Json .Serialize (tocData)
320324 </li >
321325 </template >
322326 <script src =" ~/js/site.js" type =" module" asp-append-version =" true" ></script >
323-
324327</body >
325328</html >
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { useWindowSize } from "vue-window-size";
1818 * @prop {TocItem[] } [items]
1919 */
2020/** @type {TocItem } */
21+ debugger ;
2122const tocData = markRaw ( TOC_DATA ) ;
2223
2324//Add new content or features here:
@@ -210,6 +211,9 @@ const app = createApp({
210211
211212 const currentPage = findCurrentPage ( [ ] , tocData ) ?? [ ] ;
212213
214+ const currentPageCount = CURRENT_PAGE_COUNT ;
215+ const totalPageCount = TOTAL_PAGE_COUNT ;
216+
213217 const chapterParentPage = currentPage . find ( ( parent ) => parent . level === 0 ) ;
214218
215219 const sectionTitle = ref ( currentPage ?. [ 0 ] ?. title || "Essential C#" ) ;
@@ -334,6 +338,8 @@ const app = createApp({
334338 tocData,
335339 expandedTocs,
336340 currentPage,
341+ currentPageCount,
342+ totalPageCount,
337343 chapterParentPage,
338344
339345 searchQuery,
You can’t perform that action at this time.
0 commit comments