|
1 | 1 | <template> |
2 | | -<nav |
3 | | - class="post-nav col p-0 sticky-top border-0" |
4 | | - :class="{ 'd-none': !isPostNavExpanded }" :aria-expanded="isPostNavExpanded"> |
5 | | - <AMenu |
6 | | - v-model:selectedKeys="selectedThreads" v-model:openKeys="expandedPages" @click="selectThread($event)" |
7 | | - forceSubMenuRender :inlineIndent="16" mode="inline"> |
8 | | - <template v-for="posts in data?.pages ?? []"> |
9 | | - <ASubMenu |
10 | | - v-for="cursor in [posts.pages.currentCursor]" |
11 | | - :key="pageMenuKey(cursor)" :eventKey="pageMenuKey(cursor)" :title="cursorTemplate(cursor)"> |
12 | | - <AMenuItem |
13 | | - v-for="thread in posts.threads" :key="threadMenuKey(cursor, thread.tid)" |
14 | | - ref="threadMenuItemsRef" :title="thread.title" |
15 | | - :class="menuThreadClasses(thread)" class="post-nav-thread border ps-2 ps-lg-3 pe-1"> |
16 | | - {{ thread.title }} |
17 | | - <div class="d-block btn-group p-1 text-wrap" role="group"> |
18 | | - <template v-for="reply in thread.replies" :key="reply.pid"> |
19 | | - <NuxtLink |
20 | | - @click.prevent="navigate(cursor, reply)" :to="routeHash(reply)" |
21 | | - :class="menuReplyClasses(cursor, reply)" class="post-nav-reply btn ms-0 px-2"> |
22 | | - {{ reply.floor }}L |
23 | | - </NuxtLink> |
24 | | - </template> |
25 | | - </div> |
26 | | - </AMenuItem> |
27 | | - </ASubMenu> |
28 | | - </template> |
29 | | - </AMenu> |
30 | | -</nav> |
31 | | -<div |
32 | | - :class="{ |
33 | | - 'border-start': isPostNavExpanded, |
34 | | - 'border-end': !isPostNavExpanded |
35 | | - }" |
36 | | - class="post-nav-expand col-auto align-items-center d-flex sticky-top border-light-subtle"> |
37 | | - <a |
38 | | - v-if="!hydrationStore.isHydratingOrSSR" |
39 | | - @click="togglePostNavExpanded()" class="text-primary"> |
40 | | - <FontAwesome v-show="isPostNavExpanded" :icon="faAngleLeft" /> |
41 | | - <FontAwesome v-show="!isPostNavExpanded" :icon="faAngleRight" /> |
42 | | - </a> |
| 2 | +<div> |
| 3 | + <nav |
| 4 | + class="post-nav col p-0 sticky-top border-0" |
| 5 | + :class="{ 'd-none': !isPostNavExpanded }" :aria-expanded="isPostNavExpanded"> |
| 6 | + <AMenu |
| 7 | + v-model:selectedKeys="selectedThreads" v-model:openKeys="expandedPages" @click="selectThread($event)" |
| 8 | + forceSubMenuRender :inlineIndent="16" mode="inline"> |
| 9 | + <template v-for="posts in data?.pages ?? []"> |
| 10 | + <ASubMenu |
| 11 | + v-for="cursor in [posts.pages.currentCursor]" |
| 12 | + :key="pageMenuKey(cursor)" :eventKey="pageMenuKey(cursor)" :title="cursorTemplate(cursor)"> |
| 13 | + <AMenuItem |
| 14 | + v-for="thread in posts.threads" :key="threadMenuKey(cursor, thread.tid)" |
| 15 | + ref="threadMenuItemsRef" :title="thread.title" |
| 16 | + :class="menuThreadClasses(thread)" class="post-nav-thread border ps-2 ps-lg-3 pe-1"> |
| 17 | + {{ thread.title }} |
| 18 | + <div class="d-block btn-group p-1 text-wrap" role="group"> |
| 19 | + <template v-for="reply in thread.replies" :key="reply.pid"> |
| 20 | + <NuxtLink |
| 21 | + @click.prevent="navigate(cursor, reply)" :to="routeHash(reply)" |
| 22 | + :class="menuReplyClasses(cursor, reply)" class="post-nav-reply btn ms-0 px-2"> |
| 23 | + {{ reply.floor }}L |
| 24 | + </NuxtLink> |
| 25 | + </template> |
| 26 | + </div> |
| 27 | + </AMenuItem> |
| 28 | + </ASubMenu> |
| 29 | + </template> |
| 30 | + </AMenu> |
| 31 | + </nav> |
| 32 | + <div |
| 33 | + :class="{ |
| 34 | + 'border-start': isPostNavExpanded, |
| 35 | + 'border-end': !isPostNavExpanded |
| 36 | + }" |
| 37 | + class="post-nav-expand col-auto align-items-center d-flex sticky-top border-light-subtle"> |
| 38 | + <a |
| 39 | + v-if="!hydrationStore.isHydratingOrSSR" |
| 40 | + @click="togglePostNavExpanded()" class="text-primary"> |
| 41 | + <FontAwesome v-show="isPostNavExpanded" :icon="faAngleLeft" /> |
| 42 | + <FontAwesome v-show="!isPostNavExpanded" :icon="faAngleRight" /> |
| 43 | + </a> |
| 44 | + </div> |
43 | 45 | </div> |
44 | 46 | </template> |
45 | 47 |
|
|
0 commit comments