@abraca/junis 2.84.0 → 2.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +17 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +270 -22
- package/dist/runtime/assets/css/jun.css +1 -1
- package/dist/runtime/components/JunBlobBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunCampfirePresence.client.vue +75 -10
- package/dist/runtime/components/JunCollectionIntro.d.vue.ts +11 -0
- package/dist/runtime/components/JunCollectionIntro.vue +45 -0
- package/dist/runtime/components/JunCollectionIntro.vue.d.ts +11 -0
- package/dist/runtime/components/JunConfigRow.d.vue.ts +43 -0
- package/dist/runtime/components/JunConfigRow.vue +34 -0
- package/dist/runtime/components/JunConfigRow.vue.d.ts +43 -0
- package/dist/runtime/components/JunFooter.vue +1 -1
- package/dist/runtime/components/JunHead.vue +37 -5
- package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +30 -0
- package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +30 -0
- package/dist/runtime/components/JunLinksRow.d.vue.ts +16 -1
- package/dist/runtime/components/JunLinksRow.vue +17 -7
- package/dist/runtime/components/JunLinksRow.vue.d.ts +16 -1
- package/dist/runtime/components/JunLogo.vue +10 -45
- package/dist/runtime/components/JunMedia.client.d.vue.ts +1 -1
- package/dist/runtime/components/JunMedia.client.vue.d.ts +1 -1
- package/dist/runtime/components/JunNavigation.vue +21 -4
- package/dist/runtime/components/JunNoteLinks.d.vue.ts +6 -0
- package/dist/runtime/components/JunNoteLinks.vue +57 -0
- package/dist/runtime/components/JunNoteLinks.vue.d.ts +6 -0
- package/dist/runtime/components/JunPageHero.d.vue.ts +8 -2
- package/dist/runtime/components/JunPageHero.vue +15 -3
- package/dist/runtime/components/JunPageHero.vue.d.ts +8 -2
- package/dist/runtime/components/JunPatternBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunReaders.d.vue.ts +11 -0
- package/dist/runtime/components/JunReaders.vue +99 -0
- package/dist/runtime/components/JunReaders.vue.d.ts +11 -0
- package/dist/runtime/components/JunSearch.client.vue +2 -2
- package/dist/runtime/components/JunSectionPresence.client.d.vue.ts +17 -0
- package/dist/runtime/components/JunSectionPresence.client.vue +99 -0
- package/dist/runtime/components/JunSectionPresence.client.vue.d.ts +17 -0
- package/dist/runtime/components/JunShaderBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunThreadComposer.d.vue.ts +37 -0
- package/dist/runtime/components/JunThreadComposer.vue +54 -0
- package/dist/runtime/components/JunThreadComposer.vue.d.ts +37 -0
- package/dist/runtime/components/JunTravellersChip.vue +35 -5
- package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +1 -1
- package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +1 -1
- package/dist/runtime/components/JunViewControl.d.vue.ts +29 -0
- package/dist/runtime/components/JunViewControl.vue +340 -0
- package/dist/runtime/components/JunViewControl.vue.d.ts +29 -0
- package/dist/runtime/components/JunViewControls.d.vue.ts +27 -0
- package/dist/runtime/components/JunViewControls.vue +94 -0
- package/dist/runtime/components/JunViewControls.vue.d.ts +27 -0
- package/dist/runtime/components/renderers/JunAppsRenderer.vue +45 -4
- package/dist/runtime/components/renderers/JunCinemaRenderer.vue +42 -4
- package/dist/runtime/components/renderers/JunConfigRenderer.vue +362 -239
- package/dist/runtime/components/renderers/JunCourseRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunCourseRenderer.vue +229 -0
- package/dist/runtime/components/renderers/JunCourseRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunCvRenderer.vue +44 -6
- package/dist/runtime/components/renderers/JunDeckRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunDeckRenderer.vue +370 -0
- package/dist/runtime/components/renderers/JunDeckRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunEntryRenderer.vue +157 -31
- package/dist/runtime/components/renderers/JunFestivalRenderer.vue +42 -5
- package/dist/runtime/components/renderers/JunGardenRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunGardenRenderer.vue +280 -0
- package/dist/runtime/components/renderers/JunGardenRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +96 -14
- package/dist/runtime/components/renderers/JunHomeRenderer.vue +31 -132
- package/dist/runtime/components/renderers/JunItemRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunItemRenderer.vue +398 -0
- package/dist/runtime/components/renderers/JunItemRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunJournalRenderer.vue +141 -11
- package/dist/runtime/components/renderers/JunLibraryRenderer.vue +295 -12
- package/dist/runtime/components/renderers/JunLinksRenderer.vue +33 -1
- package/dist/runtime/components/renderers/JunLiveRenderer.vue +38 -2
- package/dist/runtime/components/renderers/JunMosaicRenderer.vue +3 -2
- package/dist/runtime/components/renderers/JunMovieRenderer.vue +32 -5
- package/dist/runtime/components/renderers/JunNowRenderer.vue +40 -7
- package/dist/runtime/components/renderers/JunPollRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunPollRenderer.vue +231 -0
- package/dist/runtime/components/renderers/JunPollRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunProjectRenderer.vue +74 -18
- package/dist/runtime/components/renderers/JunServicesRenderer.vue +40 -2
- package/dist/runtime/components/renderers/JunStatsRenderer.vue +37 -50
- package/dist/runtime/components/renderers/JunThreadRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunThreadRenderer.vue +304 -0
- package/dist/runtime/components/renderers/JunThreadRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunTrackRenderer.vue +32 -4
- package/dist/runtime/components/renderers/JunUsesRenderer.vue +57 -13
- package/dist/runtime/components/renderers/JunWallRenderer.vue +60 -5
- package/dist/runtime/composables/useJunDeck.d.ts +66 -0
- package/dist/runtime/composables/useJunDeck.js +61 -0
- package/dist/runtime/composables/useJunDocPage.d.ts +14 -11
- package/dist/runtime/composables/useJunDocPage.js +67 -3
- package/dist/runtime/composables/useJunFollow.d.ts +65 -9
- package/dist/runtime/composables/useJunFollow.js +237 -20
- package/dist/runtime/composables/useJunGarden.d.ts +67 -0
- package/dist/runtime/composables/useJunGarden.js +92 -0
- package/dist/runtime/composables/useJunOptions.d.ts +1 -0
- package/dist/runtime/composables/useJunPresence.d.ts +26 -0
- package/dist/runtime/composables/useJunPresence.js +9 -2
- package/dist/runtime/composables/useJunSections.d.ts +73 -0
- package/dist/runtime/composables/useJunSections.js +117 -0
- package/dist/runtime/composables/useJunSettings.d.ts +1 -1
- package/dist/runtime/composables/useJunSettings.js +5 -1
- package/dist/runtime/composables/useJunSiteConfig.d.ts +37 -0
- package/dist/runtime/composables/useJunTheme.js +49 -50
- package/dist/runtime/composables/useJunViewOptions.d.ts +85 -0
- package/dist/runtime/composables/useJunViewOptions.js +63 -0
- package/dist/runtime/pages/doc.vue +14 -8
- package/dist/runtime/plugins/jun-sw.client.d.ts +2 -0
- package/dist/runtime/plugins/jun-sw.client.js +36 -0
- package/dist/runtime/server/api/health.get.d.ts +19 -0
- package/dist/runtime/server/api/health.get.js +40 -0
- package/dist/runtime/server/api/links.get.d.ts +19 -0
- package/dist/runtime/server/api/links.get.js +37 -0
- package/dist/runtime/server/api/resolve/[...slug].get.d.ts +9 -0
- package/dist/runtime/server/api/resolve/[...slug].get.js +5 -0
- package/dist/runtime/server/api/stats.get.js +2 -1
- package/dist/runtime/server/janitor/junJanitorChores.js +8 -0
- package/dist/runtime/server/plugins/jun-bootstrap.js +103 -15
- package/dist/runtime/server/plugins/jun-doc-cache.js +42 -4
- package/dist/runtime/server/plugins/jun-janitor.js +9 -1
- package/dist/runtime/server/plugins/jun-rpc.js +293 -0
- package/dist/runtime/server/plugins/jun-watchdog.d.ts +2 -0
- package/dist/runtime/server/plugins/jun-watchdog.js +54 -0
- package/dist/runtime/server/routes/jun-icon.png.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-icon.png.get.js +25 -0
- package/dist/runtime/server/routes/jun-icon.svg.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-icon.svg.get.js +9 -0
- package/dist/runtime/server/routes/jun-splash.png.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-splash.png.get.js +37 -0
- package/dist/runtime/server/routes/jun-sw.js.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-sw.js.get.js +126 -0
- package/dist/runtime/server/routes/manifest.webmanifest.get.d.ts +24 -0
- package/dist/runtime/server/routes/manifest.webmanifest.get.js +51 -0
- package/dist/runtime/server/routes/sitemap.xml.get.js +2 -0
- package/dist/runtime/server/utils/junBoot.d.ts +1 -0
- package/dist/runtime/server/utils/junBoot.js +4 -0
- package/dist/runtime/server/utils/junBrand.d.ts +4 -0
- package/dist/runtime/server/utils/junBrand.js +9 -0
- package/dist/runtime/server/utils/junCache.d.ts +17 -0
- package/dist/runtime/server/utils/junCache.js +5 -0
- package/dist/runtime/server/utils/junIcon.d.ts +44 -0
- package/dist/runtime/server/utils/junIcon.js +374 -0
- package/dist/runtime/server/utils/junSeedGate.d.ts +68 -0
- package/dist/runtime/server/utils/junSeedGate.js +41 -0
- package/dist/runtime/types.d.ts +82 -3
- package/dist/runtime/utils/junCourse.d.ts +106 -0
- package/dist/runtime/utils/junCourse.js +65 -0
- package/dist/runtime/utils/junGarden.d.ts +193 -0
- package/dist/runtime/utils/junGarden.js +233 -0
- package/dist/runtime/utils/junIdentity.d.ts +121 -0
- package/dist/runtime/utils/junIdentity.js +115 -0
- package/dist/runtime/utils/junMark.d.ts +254 -0
- package/dist/runtime/utils/junMark.js +169 -0
- package/dist/runtime/utils/junMetaSchemas.js +8 -1
- package/dist/runtime/utils/junModeration.d.ts +67 -0
- package/dist/runtime/utils/junModeration.js +20 -0
- package/dist/runtime/utils/junMotion.d.ts +26 -0
- package/dist/runtime/utils/junMotion.js +31 -0
- package/dist/runtime/utils/junPeople.d.ts +43 -0
- package/dist/runtime/utils/junPeople.js +9 -0
- package/dist/runtime/utils/junPoll.d.ts +79 -0
- package/dist/runtime/utils/junPoll.js +82 -0
- package/dist/runtime/utils/junReadiness.d.ts +131 -0
- package/dist/runtime/utils/junReadiness.js +69 -0
- package/dist/runtime/utils/junSections.d.ts +115 -0
- package/dist/runtime/utils/junSections.js +45 -0
- package/dist/runtime/utils/junSlides.d.ts +66 -0
- package/dist/runtime/utils/junSlides.js +47 -0
- package/dist/runtime/utils/junThread.d.ts +81 -0
- package/dist/runtime/utils/junThread.js +75 -0
- package/dist/runtime/utils/junViewSpecs.d.ts +671 -0
- package/dist/runtime/utils/junViewSpecs.js +534 -0
- package/dist/runtime/utils/junViewValues.d.ts +125 -0
- package/dist/runtime/utils/junViewValues.js +104 -0
- package/dist/types.d.mts +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
options: { type: Array, required: true },
|
|
5
|
+
values: { type: Object, required: true },
|
|
6
|
+
isDefault: { type: Boolean, required: false },
|
|
7
|
+
inline: { type: Boolean, required: false },
|
|
8
|
+
title: { type: String, required: false },
|
|
9
|
+
resetLabel: { type: String, required: false }
|
|
10
|
+
});
|
|
11
|
+
const emit = defineEmits(["set", "reset"]);
|
|
12
|
+
const summary = computed(() => {
|
|
13
|
+
const variant = props.options.find((o) => o.kind === "variant");
|
|
14
|
+
if (!variant) return void 0;
|
|
15
|
+
const value = props.values[variant.key];
|
|
16
|
+
return variant.choices?.find((c) => c.value === value)?.label;
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div
|
|
22
|
+
v-if="inline"
|
|
23
|
+
class="jun-view-inline"
|
|
24
|
+
>
|
|
25
|
+
<div class="mb-2.5 flex items-baseline gap-2">
|
|
26
|
+
<p class="flex-1 text-[10px] font-medium tracking-[0.22em] text-dimmed uppercase">
|
|
27
|
+
{{ title ?? "How this page looks" }}
|
|
28
|
+
</p>
|
|
29
|
+
<UButton
|
|
30
|
+
v-if="!isDefault"
|
|
31
|
+
:label="resetLabel ?? 'Reset'"
|
|
32
|
+
size="xs"
|
|
33
|
+
color="neutral"
|
|
34
|
+
variant="ghost"
|
|
35
|
+
@click="emit('reset')"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="flex flex-col gap-3">
|
|
40
|
+
<JunViewControl
|
|
41
|
+
v-for="option in options"
|
|
42
|
+
:key="option.key"
|
|
43
|
+
:option="option"
|
|
44
|
+
:values="values"
|
|
45
|
+
@set="(k, v) => emit('set', k, v)"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<UPopover
|
|
51
|
+
v-else
|
|
52
|
+
:content="{ side: 'bottom', align: 'end', sideOffset: 8 }"
|
|
53
|
+
:ui="{ content: 'jun-chrome rounded-xl p-0 ring-0 border-0' }"
|
|
54
|
+
>
|
|
55
|
+
<UButton
|
|
56
|
+
icon="i-lucide-sliders-horizontal"
|
|
57
|
+
size="xs"
|
|
58
|
+
color="neutral"
|
|
59
|
+
variant="ghost"
|
|
60
|
+
:label="summary"
|
|
61
|
+
:aria-label="`How this page looks${summary ? ` \u2014 ${summary}` : ''}`"
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
<template #content>
|
|
65
|
+
<div class="w-72 p-3">
|
|
66
|
+
<div class="mb-2.5 flex items-baseline gap-2">
|
|
67
|
+
<p class="flex-1 text-[10px] font-medium tracking-[0.22em] text-dimmed uppercase">
|
|
68
|
+
How this page looks
|
|
69
|
+
</p>
|
|
70
|
+
<!-- Only offered when there IS something stored. "Reset" on a page that
|
|
71
|
+
has never been changed promises an action that does nothing. -->
|
|
72
|
+
<UButton
|
|
73
|
+
v-if="!isDefault"
|
|
74
|
+
label="Reset"
|
|
75
|
+
size="xs"
|
|
76
|
+
color="neutral"
|
|
77
|
+
variant="ghost"
|
|
78
|
+
@click="emit('reset')"
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="flex flex-col gap-3">
|
|
83
|
+
<JunViewControl
|
|
84
|
+
v-for="option in options"
|
|
85
|
+
:key="option.key"
|
|
86
|
+
:option="option"
|
|
87
|
+
:values="values"
|
|
88
|
+
@set="(k, v) => emit('set', k, v)"
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
</UPopover>
|
|
94
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { JunViewOption, JunViewValue } from '../composables/useJunViewOptions.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: JunViewOption[];
|
|
4
|
+
values: Record<string, JunViewValue>;
|
|
5
|
+
/** Nothing stored on the document: the page follows the site's own defaults. */
|
|
6
|
+
isDefault?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Render WITHOUT the popover — no trigger, no card.
|
|
9
|
+
*
|
|
10
|
+
* For the settings modal's *Renderers* section, which is already a panel: a
|
|
11
|
+
* popover inside a modal is a card inside a card.
|
|
12
|
+
*/
|
|
13
|
+
inline?: boolean;
|
|
14
|
+
/** Inline only: the heading over the controls. */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Inline only: what Reset says, since "Reset" alone is ambiguous there. */
|
|
17
|
+
resetLabel?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
set: (key: string, value: JunViewValue) => any;
|
|
21
|
+
reset: () => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
onSet?: ((key: string, value: JunViewValue) => any) | undefined;
|
|
24
|
+
onReset?: (() => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -14,8 +14,10 @@ import {
|
|
|
14
14
|
useJunRename,
|
|
15
15
|
useJunStudio,
|
|
16
16
|
useJunUpload,
|
|
17
|
-
useJunViewingAccent
|
|
17
|
+
useJunViewingAccent,
|
|
18
|
+
useJunViewOptions
|
|
18
19
|
} from "#imports";
|
|
20
|
+
import { junViewSpecFor } from "../../utils/junViewSpecs";
|
|
19
21
|
const props = defineProps({
|
|
20
22
|
docId: { type: String, required: true },
|
|
21
23
|
docLabel: { type: String, required: false },
|
|
@@ -34,6 +36,19 @@ const { uploadTo, imageFiles } = useJunUpload();
|
|
|
34
36
|
const { typeIdFor } = useJunPageType();
|
|
35
37
|
const { open: openDoc } = useJunOpenDoc();
|
|
36
38
|
const { accentStyle, accentTitle } = useJunViewingAccent();
|
|
39
|
+
const { view, set: setView, reset: resetView, isDefault: viewIsDefault, options: viewOptions } = useJunViewOptions(props.docId, {
|
|
40
|
+
typeKey: "apps",
|
|
41
|
+
options: junViewSpecFor("apps")
|
|
42
|
+
}, () => props.docMeta);
|
|
43
|
+
const GRID_CLASS = {
|
|
44
|
+
1: "grid-cols-1",
|
|
45
|
+
2: "grid-cols-2",
|
|
46
|
+
3: "grid-cols-2 sm:grid-cols-3",
|
|
47
|
+
4: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4",
|
|
48
|
+
5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-5",
|
|
49
|
+
6: "grid-cols-2 sm:grid-cols-4 md:grid-cols-6"
|
|
50
|
+
};
|
|
51
|
+
const gridClass = computed(() => GRID_CLASS[Number(view.value.columns)] ?? GRID_CLASS[3]);
|
|
37
52
|
const appType = computed(() => typeIdFor("app"));
|
|
38
53
|
const pageTitle = computed(() => getEntry(props.docId)?.label ?? props.docLabel ?? "Apps");
|
|
39
54
|
const pageSubtitle = computed(() => {
|
|
@@ -110,11 +125,33 @@ async function onTileFileDrop(item, e) {
|
|
|
110
125
|
<template>
|
|
111
126
|
<div class="relative mx-auto w-full max-w-5xl px-4 pt-12 pb-16 sm:px-8">
|
|
112
127
|
<JunPageHero
|
|
128
|
+
:doc-id="docId"
|
|
113
129
|
:title="pageTitle"
|
|
114
130
|
:subtitle="pageSubtitle"
|
|
115
131
|
:editable="editing"
|
|
116
132
|
@rename="renamePage"
|
|
117
133
|
@rename-subtitle="renameSubtitle"
|
|
134
|
+
>
|
|
135
|
+
<template #right>
|
|
136
|
+
<JunViewControls
|
|
137
|
+
v-if="editing"
|
|
138
|
+
:options="viewOptions"
|
|
139
|
+
:values="view"
|
|
140
|
+
:is-default="viewIsDefault"
|
|
141
|
+
@set="setView"
|
|
142
|
+
@reset="resetView"
|
|
143
|
+
/>
|
|
144
|
+
</template>
|
|
145
|
+
</JunPageHero>
|
|
146
|
+
|
|
147
|
+
<!-- The page's own prose, above its children. Collapses to nothing
|
|
148
|
+
when the document has no body, which is every site that has never
|
|
149
|
+
written one. -->
|
|
150
|
+
<JunCollectionIntro
|
|
151
|
+
:doc-id="docId"
|
|
152
|
+
:doc-label="pageTitle"
|
|
153
|
+
:doc-meta="docMeta"
|
|
154
|
+
placeholder="What you are looking at…"
|
|
118
155
|
/>
|
|
119
156
|
|
|
120
157
|
<section
|
|
@@ -128,7 +165,8 @@ async function onTileFileDrop(item, e) {
|
|
|
128
165
|
<TransitionGroup
|
|
129
166
|
tag="div"
|
|
130
167
|
name="jun-apps"
|
|
131
|
-
class="grid
|
|
168
|
+
class="grid gap-3 sm:gap-4 lg:gap-5"
|
|
169
|
+
:class="gridClass"
|
|
132
170
|
>
|
|
133
171
|
<!-- This wrapper is the TransitionGroup child on purpose: the context
|
|
134
172
|
menu renders a non-element root, which Vue cannot FLIP-animate.
|
|
@@ -206,14 +244,17 @@ async function onTileFileDrop(item, e) {
|
|
|
206
244
|
/>
|
|
207
245
|
</div>
|
|
208
246
|
|
|
209
|
-
<div
|
|
247
|
+
<div
|
|
248
|
+
v-if="view.labels"
|
|
249
|
+
class="mt-2 flex items-center justify-center sm:mt-3"
|
|
250
|
+
>
|
|
210
251
|
<span
|
|
211
252
|
class="inline-block max-w-full truncate rounded-md px-2 py-0.5 text-sm font-semibold text-highlighted transition-all duration-300 group-hover:bg-neutral-900 group-hover:text-white sm:text-base dark:group-hover:bg-neutral-100 dark:group-hover:text-neutral-900"
|
|
212
253
|
>{{ app.label }}</span>
|
|
213
254
|
</div>
|
|
214
255
|
|
|
215
256
|
<div
|
|
216
|
-
v-if="app.meta?.status"
|
|
257
|
+
v-if="app.meta?.status && view.status"
|
|
217
258
|
class="mt-1 flex justify-center"
|
|
218
259
|
>
|
|
219
260
|
<UBadge
|
|
@@ -17,8 +17,10 @@ import {
|
|
|
17
17
|
useJunRename,
|
|
18
18
|
useJunStudio,
|
|
19
19
|
useJunUpload,
|
|
20
|
-
useJunViewingAccent
|
|
20
|
+
useJunViewingAccent,
|
|
21
|
+
useJunViewOptions
|
|
21
22
|
} from "#imports";
|
|
23
|
+
import { junViewSpecFor } from "../../utils/junViewSpecs";
|
|
22
24
|
const props = defineProps({
|
|
23
25
|
docId: { type: String, required: true },
|
|
24
26
|
docLabel: { type: String, required: false },
|
|
@@ -35,6 +37,19 @@ const { renameDoc } = useJunRename();
|
|
|
35
37
|
const { uploadTo, imageFiles } = useJunUpload();
|
|
36
38
|
const { importMedia, videoFiles } = useJunMediaImport();
|
|
37
39
|
const { accentInsetStyle, accentTitle } = useJunViewingAccent();
|
|
40
|
+
const { view, set: setView, reset: resetView, isDefault: viewIsDefault, options: viewOptions } = useJunViewOptions(props.docId, {
|
|
41
|
+
typeKey: "cinema",
|
|
42
|
+
options: junViewSpecFor("cinema")
|
|
43
|
+
}, () => props.docMeta);
|
|
44
|
+
const GRID_CLASS = {
|
|
45
|
+
1: "grid-cols-1",
|
|
46
|
+
2: "grid-cols-2",
|
|
47
|
+
3: "grid-cols-2 sm:grid-cols-3",
|
|
48
|
+
4: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4",
|
|
49
|
+
5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-5",
|
|
50
|
+
6: "grid-cols-2 sm:grid-cols-4 md:grid-cols-6"
|
|
51
|
+
};
|
|
52
|
+
const gridClass = computed(() => GRID_CLASS[Number(view.value.columns)] ?? GRID_CLASS[3]);
|
|
38
53
|
const { typeIdFor } = useJunPageType();
|
|
39
54
|
const filmType = computed(() => typeIdFor("movie"));
|
|
40
55
|
const pageTitle = computed(() => getEntry(props.docId)?.label ?? props.docLabel ?? "Cinema");
|
|
@@ -206,11 +221,33 @@ function setRating(film, value) {
|
|
|
206
221
|
@drop="onPageDrop"
|
|
207
222
|
>
|
|
208
223
|
<JunPageHero
|
|
224
|
+
:doc-id="docId"
|
|
209
225
|
:title="pageTitle"
|
|
210
226
|
:subtitle="subtitle"
|
|
211
227
|
:editable="editing"
|
|
212
228
|
@rename="renamePage"
|
|
213
229
|
@rename-subtitle="renameSubtitle"
|
|
230
|
+
>
|
|
231
|
+
<template #right>
|
|
232
|
+
<JunViewControls
|
|
233
|
+
v-if="editing"
|
|
234
|
+
:options="viewOptions"
|
|
235
|
+
:values="view"
|
|
236
|
+
:is-default="viewIsDefault"
|
|
237
|
+
@set="setView"
|
|
238
|
+
@reset="resetView"
|
|
239
|
+
/>
|
|
240
|
+
</template>
|
|
241
|
+
</JunPageHero>
|
|
242
|
+
|
|
243
|
+
<!-- The page's own prose, above its children. Collapses to nothing
|
|
244
|
+
when the document has no body, which is every site that has never
|
|
245
|
+
written one. -->
|
|
246
|
+
<JunCollectionIntro
|
|
247
|
+
:doc-id="docId"
|
|
248
|
+
:doc-label="pageTitle"
|
|
249
|
+
:doc-meta="docMeta"
|
|
250
|
+
placeholder="What you are watching, and why…"
|
|
214
251
|
/>
|
|
215
252
|
|
|
216
253
|
<div
|
|
@@ -309,7 +346,8 @@ function setRating(film, value) {
|
|
|
309
346
|
<TransitionGroup
|
|
310
347
|
tag="ul"
|
|
311
348
|
name="jun-cinema"
|
|
312
|
-
class="grid
|
|
349
|
+
class="grid gap-4 px-1"
|
|
350
|
+
:class="gridClass"
|
|
313
351
|
>
|
|
314
352
|
<li
|
|
315
353
|
v-for="(film, i) in section.items"
|
|
@@ -397,14 +435,14 @@ function setRating(film, value) {
|
|
|
397
435
|
{{ film.label }}
|
|
398
436
|
</p>
|
|
399
437
|
<p class="truncate text-xs text-muted">
|
|
400
|
-
{{ [film.meta?.year, film.meta?.director].filter(Boolean).join(" \xB7 ") || "\u2014" }}
|
|
438
|
+
{{ [view.years ? film.meta?.year : void 0, film.meta?.director].filter(Boolean).join(" \xB7 ") || "\u2014" }}
|
|
401
439
|
</p>
|
|
402
440
|
</div>
|
|
403
441
|
</NuxtLink>
|
|
404
442
|
</JunItemMenu>
|
|
405
443
|
|
|
406
444
|
<div
|
|
407
|
-
v-if="film.meta?.rating || editing"
|
|
445
|
+
v-if="view.ratings && (film.meta?.rating || editing)"
|
|
408
446
|
class="mt-1 flex items-center gap-0.5 px-0.5"
|
|
409
447
|
>
|
|
410
448
|
<button
|