@prosophia/lab-classic 0.0.2 → 0.0.4
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/BookPage.module.css +314 -0
- package/dist/ContactCTA.module.css +99 -0
- package/dist/ContactPage.module.css +259 -0
- package/dist/Footer.module.css +240 -0
- package/dist/HomePage.module.css +879 -0
- package/dist/Layout.module.css +368 -0
- package/dist/LegalPage.module.css +239 -0
- package/dist/NewsArticlePage.module.css +214 -0
- package/dist/NewsPage.module.css +189 -0
- package/dist/PastMembersPage.module.css +236 -0
- package/dist/PeoplePage.module.css +465 -0
- package/dist/PicturesPage.module.css +196 -0
- package/dist/PublicationDetailPage.module.css +213 -0
- package/dist/PublicationsPage.module.css +181 -0
- package/dist/ResearchPage.module.css +173 -0
- package/dist/ThemeToggle.module.css +114 -0
- package/dist/index-CSdV51Jq.d.mts +26 -0
- package/dist/index-CSdV51Jq.d.ts +26 -0
- package/dist/index.css +1587 -0
- package/dist/index.d.mts +279 -0
- package/dist/index.d.ts +279 -0
- package/dist/index.js +854 -94
- package/dist/index.mjs +805 -86
- package/dist/layouts/index.css +594 -0
- package/dist/layouts/index.d.mts +13 -0
- package/dist/layouts/index.d.ts +13 -0
- package/dist/layouts/index.js +389 -0
- package/dist/layouts/index.mjs +352 -0
- package/dist/schemas/index.d.mts +182 -0
- package/dist/schemas/index.d.ts +182 -0
- package/dist/schemas/index.js +1026 -0
- package/dist/schemas/index.mjs +987 -0
- package/dist/styles/globals.css +1169 -0
- package/package.json +24 -9
|
@@ -0,0 +1,987 @@
|
|
|
1
|
+
// src/schemas/schemaTypes/publication.ts
|
|
2
|
+
import { defineField, defineType } from "sanity";
|
|
3
|
+
var publication_default = defineType({
|
|
4
|
+
name: "publication",
|
|
5
|
+
title: "Publication",
|
|
6
|
+
type: "document",
|
|
7
|
+
fields: [
|
|
8
|
+
defineField({
|
|
9
|
+
name: "title",
|
|
10
|
+
title: "Title",
|
|
11
|
+
type: "string",
|
|
12
|
+
validation: (Rule) => Rule.required()
|
|
13
|
+
}),
|
|
14
|
+
defineField({
|
|
15
|
+
name: "slug",
|
|
16
|
+
title: "Slug",
|
|
17
|
+
type: "slug",
|
|
18
|
+
options: {
|
|
19
|
+
source: "title",
|
|
20
|
+
maxLength: 96
|
|
21
|
+
},
|
|
22
|
+
description: 'A unique URL-friendly version of the title. Click "Generate".',
|
|
23
|
+
validation: (Rule) => Rule.required()
|
|
24
|
+
}),
|
|
25
|
+
defineField({
|
|
26
|
+
name: "authors",
|
|
27
|
+
title: "Authors",
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "List the authors as they should appear, e.g., Rutherford, N., Doe, J., Smith, A.",
|
|
30
|
+
validation: (Rule) => Rule.required()
|
|
31
|
+
}),
|
|
32
|
+
defineField({
|
|
33
|
+
name: "journal",
|
|
34
|
+
title: "Journal or Conference",
|
|
35
|
+
type: "string",
|
|
36
|
+
validation: (Rule) => Rule.required()
|
|
37
|
+
}),
|
|
38
|
+
defineField({
|
|
39
|
+
name: "publicationDate",
|
|
40
|
+
title: "Publication Date",
|
|
41
|
+
type: "date",
|
|
42
|
+
options: {
|
|
43
|
+
dateFormat: "YYYY-MM"
|
|
44
|
+
// Format for year and month
|
|
45
|
+
},
|
|
46
|
+
validation: (Rule) => Rule.required()
|
|
47
|
+
}),
|
|
48
|
+
defineField({
|
|
49
|
+
name: "abstract",
|
|
50
|
+
title: "Abstract",
|
|
51
|
+
type: "text",
|
|
52
|
+
// Use 'text' for longer paragraphs
|
|
53
|
+
description: "Optional but recommended - helps visitors understand the research"
|
|
54
|
+
}),
|
|
55
|
+
defineField({
|
|
56
|
+
name: "journalLink",
|
|
57
|
+
title: "Link to Journal/Article",
|
|
58
|
+
type: "url",
|
|
59
|
+
validation: (Rule) => Rule.required()
|
|
60
|
+
})
|
|
61
|
+
],
|
|
62
|
+
// Sort publications by date by default in the studio
|
|
63
|
+
orderings: [
|
|
64
|
+
{
|
|
65
|
+
title: "Publication Date, Newest",
|
|
66
|
+
name: "publicationDateDesc",
|
|
67
|
+
by: [{ field: "publicationDate", direction: "desc" }]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// src/schemas/schemaTypes/person.ts
|
|
73
|
+
import { defineField as defineField2, defineType as defineType2 } from "sanity";
|
|
74
|
+
var person_default = defineType2({
|
|
75
|
+
name: "person",
|
|
76
|
+
title: "Person",
|
|
77
|
+
type: "document",
|
|
78
|
+
groups: [
|
|
79
|
+
{ name: "basic", title: "Basic Info" },
|
|
80
|
+
{ name: "links", title: "Links & Social" }
|
|
81
|
+
],
|
|
82
|
+
fields: [
|
|
83
|
+
defineField2({
|
|
84
|
+
name: "name",
|
|
85
|
+
title: "Name",
|
|
86
|
+
type: "string",
|
|
87
|
+
group: "basic",
|
|
88
|
+
validation: (Rule) => Rule.required()
|
|
89
|
+
}),
|
|
90
|
+
defineField2({
|
|
91
|
+
name: "role",
|
|
92
|
+
title: "Role / Position",
|
|
93
|
+
type: "string",
|
|
94
|
+
description: "E.g., Principal Investigator, PhD Candidate, Postdoc",
|
|
95
|
+
group: "basic",
|
|
96
|
+
validation: (Rule) => Rule.required()
|
|
97
|
+
}),
|
|
98
|
+
defineField2({
|
|
99
|
+
name: "image",
|
|
100
|
+
title: "Image",
|
|
101
|
+
type: "image",
|
|
102
|
+
group: "basic",
|
|
103
|
+
options: {
|
|
104
|
+
hotspot: true
|
|
105
|
+
// Allows for better image cropping in the studio
|
|
106
|
+
}
|
|
107
|
+
}),
|
|
108
|
+
defineField2({
|
|
109
|
+
name: "status",
|
|
110
|
+
title: "Status",
|
|
111
|
+
type: "string",
|
|
112
|
+
group: "basic",
|
|
113
|
+
options: {
|
|
114
|
+
list: [
|
|
115
|
+
{ title: "Principal Investigator", value: "PI" },
|
|
116
|
+
{ title: "Current Member", value: "Current" },
|
|
117
|
+
{ title: "Past Member (Alumni)", value: "Past" }
|
|
118
|
+
],
|
|
119
|
+
layout: "radio"
|
|
120
|
+
// Makes it a radio button selector
|
|
121
|
+
},
|
|
122
|
+
initialValue: "Current",
|
|
123
|
+
validation: (Rule) => Rule.required()
|
|
124
|
+
}),
|
|
125
|
+
defineField2({
|
|
126
|
+
name: "currentPosition",
|
|
127
|
+
title: "Current Position (for Alumni)",
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "E.g., Assistant Professor, Stanford University",
|
|
130
|
+
group: "basic",
|
|
131
|
+
// This field will only show up if the status is 'Past'
|
|
132
|
+
hidden: ({ document }) => document?.status !== "Past"
|
|
133
|
+
}),
|
|
134
|
+
// Social & Professional Links
|
|
135
|
+
defineField2({
|
|
136
|
+
name: "websiteUrl",
|
|
137
|
+
title: "Personal Website",
|
|
138
|
+
type: "url",
|
|
139
|
+
description: "Personal or academic website URL",
|
|
140
|
+
group: "links"
|
|
141
|
+
}),
|
|
142
|
+
defineField2({
|
|
143
|
+
name: "googleScholarUrl",
|
|
144
|
+
title: "Google Scholar",
|
|
145
|
+
type: "url",
|
|
146
|
+
description: "Google Scholar profile URL",
|
|
147
|
+
group: "links"
|
|
148
|
+
}),
|
|
149
|
+
defineField2({
|
|
150
|
+
name: "twitterUrl",
|
|
151
|
+
title: "X (Twitter)",
|
|
152
|
+
type: "url",
|
|
153
|
+
description: "X/Twitter profile URL",
|
|
154
|
+
group: "links"
|
|
155
|
+
}),
|
|
156
|
+
defineField2({
|
|
157
|
+
name: "linkedinUrl",
|
|
158
|
+
title: "LinkedIn",
|
|
159
|
+
type: "url",
|
|
160
|
+
description: "LinkedIn profile URL",
|
|
161
|
+
group: "links"
|
|
162
|
+
})
|
|
163
|
+
],
|
|
164
|
+
preview: {
|
|
165
|
+
select: {
|
|
166
|
+
title: "name",
|
|
167
|
+
subtitle: "role",
|
|
168
|
+
media: "image"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
orderings: [
|
|
172
|
+
{
|
|
173
|
+
title: "Name, A-Z",
|
|
174
|
+
name: "nameAsc",
|
|
175
|
+
by: [{ field: "name", direction: "asc" }]
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// src/schemas/schemaTypes/blockContent.ts
|
|
181
|
+
import { defineType as defineType3, defineArrayMember } from "sanity";
|
|
182
|
+
var blockContent_default = defineType3({
|
|
183
|
+
title: "Block Content",
|
|
184
|
+
name: "blockContent",
|
|
185
|
+
type: "array",
|
|
186
|
+
of: [
|
|
187
|
+
defineArrayMember({
|
|
188
|
+
title: "Block",
|
|
189
|
+
type: "block",
|
|
190
|
+
// Styles let you set what is available in the dropdown box.
|
|
191
|
+
styles: [
|
|
192
|
+
{ title: "Normal", value: "normal" },
|
|
193
|
+
{ title: "H2", value: "h2" },
|
|
194
|
+
{ title: "H3", value: "h3" },
|
|
195
|
+
{ title: "Quote", value: "blockquote" }
|
|
196
|
+
],
|
|
197
|
+
lists: [{ title: "Bullet", value: "bullet" }],
|
|
198
|
+
// Marks let you mark up inline text in the Portable Text editor.
|
|
199
|
+
marks: {
|
|
200
|
+
// Decorators let you change the inline styling of text.
|
|
201
|
+
decorators: [
|
|
202
|
+
{ title: "Strong", value: "strong" },
|
|
203
|
+
{ title: "Emphasis", value: "em" }
|
|
204
|
+
],
|
|
205
|
+
// Annotations are links that can be applied to inline text.
|
|
206
|
+
annotations: [
|
|
207
|
+
{
|
|
208
|
+
title: "URL",
|
|
209
|
+
name: "link",
|
|
210
|
+
type: "object",
|
|
211
|
+
fields: [
|
|
212
|
+
{
|
|
213
|
+
title: "URL",
|
|
214
|
+
name: "href",
|
|
215
|
+
type: "url"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
}),
|
|
222
|
+
// You can also allow editors to embed images directly in the article body
|
|
223
|
+
defineArrayMember({
|
|
224
|
+
type: "image",
|
|
225
|
+
options: { hotspot: true }
|
|
226
|
+
})
|
|
227
|
+
]
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
// src/schemas/schemaTypes/newsArticle.ts
|
|
231
|
+
import { defineField as defineField3, defineType as defineType4 } from "sanity";
|
|
232
|
+
var newsArticle_default = defineType4({
|
|
233
|
+
name: "newsArticle",
|
|
234
|
+
title: "News Article",
|
|
235
|
+
type: "document",
|
|
236
|
+
fields: [
|
|
237
|
+
defineField3({
|
|
238
|
+
name: "title",
|
|
239
|
+
title: "Title",
|
|
240
|
+
type: "string",
|
|
241
|
+
validation: (Rule) => Rule.required()
|
|
242
|
+
}),
|
|
243
|
+
defineField3({
|
|
244
|
+
name: "slug",
|
|
245
|
+
title: "Slug",
|
|
246
|
+
type: "slug",
|
|
247
|
+
options: {
|
|
248
|
+
source: "title",
|
|
249
|
+
maxLength: 96
|
|
250
|
+
},
|
|
251
|
+
description: 'A unique URL-friendly identifier for the article. Click "Generate" to create from title.',
|
|
252
|
+
validation: (Rule) => Rule.required()
|
|
253
|
+
}),
|
|
254
|
+
defineField3({
|
|
255
|
+
name: "publicationDate",
|
|
256
|
+
title: "Publication Date",
|
|
257
|
+
type: "date",
|
|
258
|
+
validation: (Rule) => Rule.required()
|
|
259
|
+
}),
|
|
260
|
+
defineField3({
|
|
261
|
+
name: "author",
|
|
262
|
+
title: "Author",
|
|
263
|
+
type: "string",
|
|
264
|
+
description: "E.g., Dr. Rutherford, Lab Announcement, Jane Doe",
|
|
265
|
+
initialValue: "Lab Announcement"
|
|
266
|
+
}),
|
|
267
|
+
defineField3({
|
|
268
|
+
name: "featuredImage",
|
|
269
|
+
title: "Featured Image",
|
|
270
|
+
type: "image",
|
|
271
|
+
options: {
|
|
272
|
+
hotspot: true
|
|
273
|
+
}
|
|
274
|
+
}),
|
|
275
|
+
defineField3({
|
|
276
|
+
name: "summary",
|
|
277
|
+
title: "Summary",
|
|
278
|
+
type: "text",
|
|
279
|
+
description: "A short summary of the article for the main news list page.",
|
|
280
|
+
validation: (Rule) => Rule.required()
|
|
281
|
+
}),
|
|
282
|
+
defineField3({
|
|
283
|
+
name: "content",
|
|
284
|
+
title: "Content",
|
|
285
|
+
type: "blockContent",
|
|
286
|
+
// This references the schema we created in Step 1
|
|
287
|
+
validation: (Rule) => Rule.required()
|
|
288
|
+
})
|
|
289
|
+
],
|
|
290
|
+
preview: {
|
|
291
|
+
select: {
|
|
292
|
+
title: "title",
|
|
293
|
+
subtitle: "publicationDate",
|
|
294
|
+
media: "featuredImage"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
orderings: [
|
|
298
|
+
{
|
|
299
|
+
title: "Publication Date, Newest",
|
|
300
|
+
name: "publicationDateDesc",
|
|
301
|
+
by: [{ field: "publicationDate", direction: "desc" }]
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
// src/schemas/schemaTypes/researchPage.ts
|
|
307
|
+
import { defineField as defineField4, defineType as defineType5 } from "sanity";
|
|
308
|
+
var researchPage_default = defineType5({
|
|
309
|
+
name: "researchPage",
|
|
310
|
+
title: "Research Page",
|
|
311
|
+
type: "document",
|
|
312
|
+
fields: [
|
|
313
|
+
defineField4({
|
|
314
|
+
name: "title",
|
|
315
|
+
title: "Title",
|
|
316
|
+
type: "string",
|
|
317
|
+
initialValue: "Research Page Content",
|
|
318
|
+
hidden: true
|
|
319
|
+
}),
|
|
320
|
+
defineField4({
|
|
321
|
+
name: "pageContent",
|
|
322
|
+
title: "Page Content",
|
|
323
|
+
description: "The entire content for the Research page. Use headings (H2, H3) to structure the different sections.",
|
|
324
|
+
type: "blockContent",
|
|
325
|
+
validation: (Rule) => Rule.required()
|
|
326
|
+
})
|
|
327
|
+
],
|
|
328
|
+
// REMOVED the deprecated __experimental_actions property
|
|
329
|
+
preview: {
|
|
330
|
+
select: {
|
|
331
|
+
title: "title"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
// src/schemas/schemaTypes/bookPage.ts
|
|
337
|
+
import { defineField as defineField5, defineType as defineType6 } from "sanity";
|
|
338
|
+
var bookPage_default = defineType6({
|
|
339
|
+
name: "bookPage",
|
|
340
|
+
title: "Book Page",
|
|
341
|
+
type: "document",
|
|
342
|
+
fields: [
|
|
343
|
+
defineField5({
|
|
344
|
+
name: "title",
|
|
345
|
+
title: "Title",
|
|
346
|
+
type: "string",
|
|
347
|
+
initialValue: "Book Page Content",
|
|
348
|
+
hidden: true
|
|
349
|
+
}),
|
|
350
|
+
defineField5({
|
|
351
|
+
name: "bookTitle",
|
|
352
|
+
title: "Book Title",
|
|
353
|
+
type: "string",
|
|
354
|
+
validation: (Rule) => Rule.required()
|
|
355
|
+
}),
|
|
356
|
+
defineField5({
|
|
357
|
+
name: "bookCover",
|
|
358
|
+
title: "Book Cover Image",
|
|
359
|
+
type: "image",
|
|
360
|
+
options: {
|
|
361
|
+
hotspot: true
|
|
362
|
+
},
|
|
363
|
+
validation: (Rule) => Rule.required()
|
|
364
|
+
}),
|
|
365
|
+
defineField5({
|
|
366
|
+
name: "amazonLink",
|
|
367
|
+
title: "Amazon Purchase Link",
|
|
368
|
+
type: "url",
|
|
369
|
+
validation: (Rule) => Rule.required()
|
|
370
|
+
}),
|
|
371
|
+
defineField5({
|
|
372
|
+
name: "cambridgeLink",
|
|
373
|
+
title: "Cambridge Press Purchase Link",
|
|
374
|
+
type: "url",
|
|
375
|
+
validation: (Rule) => Rule.required()
|
|
376
|
+
}),
|
|
377
|
+
defineField5({
|
|
378
|
+
name: "description",
|
|
379
|
+
title: "Description (Frontmatter)",
|
|
380
|
+
type: "text",
|
|
381
|
+
// Simple long-form text is sufficient here
|
|
382
|
+
validation: (Rule) => Rule.required()
|
|
383
|
+
})
|
|
384
|
+
],
|
|
385
|
+
preview: {
|
|
386
|
+
select: {
|
|
387
|
+
title: "bookTitle",
|
|
388
|
+
media: "bookCover"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// src/schemas/schemaTypes/contactPage.ts
|
|
394
|
+
import { defineField as defineField6, defineType as defineType7 } from "sanity";
|
|
395
|
+
var contactPage_default = defineType7({
|
|
396
|
+
name: "contactPage",
|
|
397
|
+
title: "Contact Page",
|
|
398
|
+
type: "document",
|
|
399
|
+
fields: [
|
|
400
|
+
defineField6({
|
|
401
|
+
name: "title",
|
|
402
|
+
title: "Title",
|
|
403
|
+
type: "string",
|
|
404
|
+
initialValue: "Contact Page Content",
|
|
405
|
+
hidden: true
|
|
406
|
+
// For internal CMS use only
|
|
407
|
+
}),
|
|
408
|
+
defineField6({
|
|
409
|
+
name: "piName",
|
|
410
|
+
title: "Principal Investigator Name",
|
|
411
|
+
type: "string",
|
|
412
|
+
description: "e.g., Ioannis Rutherford, Ph.D.",
|
|
413
|
+
validation: (Rule) => Rule.required()
|
|
414
|
+
}),
|
|
415
|
+
defineField6({
|
|
416
|
+
name: "email",
|
|
417
|
+
title: "Contact Email",
|
|
418
|
+
type: "string",
|
|
419
|
+
validation: (Rule) => Rule.email().required()
|
|
420
|
+
}),
|
|
421
|
+
defineField6({
|
|
422
|
+
name: "labAddress",
|
|
423
|
+
title: "Lab Address",
|
|
424
|
+
type: "text",
|
|
425
|
+
description: "The physical address of the lab, including line breaks.",
|
|
426
|
+
validation: (Rule) => Rule.required()
|
|
427
|
+
}),
|
|
428
|
+
defineField6({
|
|
429
|
+
name: "googleMapsLink",
|
|
430
|
+
title: "Google Maps Link",
|
|
431
|
+
type: "url",
|
|
432
|
+
description: 'The URL for the "View on Google Maps" button.',
|
|
433
|
+
validation: (Rule) => Rule.required()
|
|
434
|
+
}),
|
|
435
|
+
defineField6({
|
|
436
|
+
name: "googleMapsEmbedUrl",
|
|
437
|
+
title: "Google Maps Embed URL",
|
|
438
|
+
type: "url",
|
|
439
|
+
description: "From Google Maps, click Share > Embed a map > Copy HTML. Paste the src URL here.",
|
|
440
|
+
validation: (Rule) => Rule.required()
|
|
441
|
+
}),
|
|
442
|
+
defineField6({
|
|
443
|
+
name: "guidanceText",
|
|
444
|
+
title: "Guidance for Applicants",
|
|
445
|
+
description: "The section with information for prospective students and collaborators.",
|
|
446
|
+
type: "blockContent"
|
|
447
|
+
// Reusing our rich text editor
|
|
448
|
+
})
|
|
449
|
+
]
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
// src/schemas/schemaTypes/galleryImage.ts
|
|
453
|
+
import { defineField as defineField7, defineType as defineType8 } from "sanity";
|
|
454
|
+
var galleryImage_default = defineType8({
|
|
455
|
+
name: "galleryImage",
|
|
456
|
+
title: "Gallery Image",
|
|
457
|
+
type: "document",
|
|
458
|
+
fields: [
|
|
459
|
+
defineField7({
|
|
460
|
+
name: "image",
|
|
461
|
+
title: "Image",
|
|
462
|
+
type: "image",
|
|
463
|
+
options: {
|
|
464
|
+
hotspot: true
|
|
465
|
+
// This allows for better cropping
|
|
466
|
+
},
|
|
467
|
+
validation: (Rule) => Rule.required()
|
|
468
|
+
}),
|
|
469
|
+
defineField7({
|
|
470
|
+
name: "caption",
|
|
471
|
+
title: "Caption / Description",
|
|
472
|
+
type: "string",
|
|
473
|
+
description: 'A short description of the picture (e.g., "Lab retreat, Fall 2025").'
|
|
474
|
+
}),
|
|
475
|
+
defineField7({
|
|
476
|
+
name: "altText",
|
|
477
|
+
title: "Alternative Text",
|
|
478
|
+
type: "string",
|
|
479
|
+
description: "A descriptive text for screen readers. Important for accessibility.",
|
|
480
|
+
validation: (Rule) => Rule.required()
|
|
481
|
+
})
|
|
482
|
+
],
|
|
483
|
+
orderings: [
|
|
484
|
+
{
|
|
485
|
+
title: "Date Created, Newest",
|
|
486
|
+
name: "dateCreatedDesc",
|
|
487
|
+
by: [{ field: "_createdAt", direction: "desc" }]
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
// src/schemas/schemaTypes/siteSettings.ts
|
|
493
|
+
import { defineField as defineField8, defineType as defineType9 } from "sanity";
|
|
494
|
+
var siteSettings_default = defineType9({
|
|
495
|
+
name: "siteSettings",
|
|
496
|
+
title: "Site Settings",
|
|
497
|
+
type: "document",
|
|
498
|
+
groups: [
|
|
499
|
+
{ name: "general", title: "General" },
|
|
500
|
+
{ name: "theme", title: "Theme & Design" },
|
|
501
|
+
{ name: "seo", title: "SEO & Social" },
|
|
502
|
+
{ name: "analytics", title: "Analytics" },
|
|
503
|
+
{ name: "legal", title: "Legal Pages" }
|
|
504
|
+
],
|
|
505
|
+
fields: [
|
|
506
|
+
// --- General Settings ---
|
|
507
|
+
defineField8({
|
|
508
|
+
name: "labName",
|
|
509
|
+
title: "Lab Name",
|
|
510
|
+
type: "string",
|
|
511
|
+
description: 'The primary name of the lab (e.g., "Rutherford")',
|
|
512
|
+
group: "general",
|
|
513
|
+
validation: (Rule) => Rule.required()
|
|
514
|
+
}),
|
|
515
|
+
defineField8({
|
|
516
|
+
name: "labNameAccent",
|
|
517
|
+
title: "Lab Name Accent",
|
|
518
|
+
type: "string",
|
|
519
|
+
description: 'The second part of the name to be styled differently (e.g., "Lab")',
|
|
520
|
+
group: "general"
|
|
521
|
+
}),
|
|
522
|
+
defineField8({
|
|
523
|
+
name: "labNameDescription",
|
|
524
|
+
title: "Lab Description",
|
|
525
|
+
type: "text",
|
|
526
|
+
description: "A brief description of the research group (shown in footer and meta)",
|
|
527
|
+
group: "general"
|
|
528
|
+
}),
|
|
529
|
+
defineField8({
|
|
530
|
+
name: "footerText",
|
|
531
|
+
title: "Footer Copyright Text",
|
|
532
|
+
type: "string",
|
|
533
|
+
description: "Custom copyright text. Leave blank for default.",
|
|
534
|
+
group: "general"
|
|
535
|
+
}),
|
|
536
|
+
// --- Theme Settings ---
|
|
537
|
+
defineField8({
|
|
538
|
+
name: "colorTheme",
|
|
539
|
+
title: "Color Theme",
|
|
540
|
+
type: "string",
|
|
541
|
+
description: "Choose a color scheme for your website. Each theme includes matching light and dark mode colors.",
|
|
542
|
+
group: "theme",
|
|
543
|
+
initialValue: "verdant",
|
|
544
|
+
options: {
|
|
545
|
+
list: [
|
|
546
|
+
{ title: "\u{1F33F} Verdant (Green) - Nature-inspired, calming", value: "verdant" },
|
|
547
|
+
{ title: "\u{1F30A} Ocean (Blue) - Professional, trustworthy", value: "ocean" },
|
|
548
|
+
{ title: "\u{1F305} Sunset (Orange) - Warm, energetic", value: "sunset" },
|
|
549
|
+
{ title: "\u{1F49C} Violet (Purple) - Creative, innovative", value: "violet" },
|
|
550
|
+
{ title: "\u{1F338} Rose (Pink) - Modern, distinctive", value: "rose" },
|
|
551
|
+
{ title: "\u{1F537} Slate (Gray) - Neutral, corporate", value: "slate" },
|
|
552
|
+
{ title: "\u{1F949} Copper (Bronze) - Elegant, sophisticated", value: "copper" },
|
|
553
|
+
{ title: "\u{1F332} Forest (Dark Green) - Deep, scholarly", value: "forest" }
|
|
554
|
+
],
|
|
555
|
+
layout: "dropdown"
|
|
556
|
+
}
|
|
557
|
+
}),
|
|
558
|
+
defineField8({
|
|
559
|
+
name: "headingFont",
|
|
560
|
+
title: "Heading Font",
|
|
561
|
+
type: "string",
|
|
562
|
+
description: "Font family for headings and titles",
|
|
563
|
+
group: "theme",
|
|
564
|
+
options: {
|
|
565
|
+
list: [
|
|
566
|
+
{ title: "Merriweather (Classic Serif)", value: "Merriweather" },
|
|
567
|
+
{ title: "Source Serif Pro (Modern Serif)", value: "Source Serif Pro" },
|
|
568
|
+
{ title: "Playfair Display (Elegant Serif)", value: "Playfair Display" },
|
|
569
|
+
{ title: "Roboto Slab (Contemporary Serif)", value: "Roboto Slab" },
|
|
570
|
+
{ title: "Inter (Clean Sans-Serif)", value: "Inter" },
|
|
571
|
+
{ title: "Montserrat (Bold Sans-Serif)", value: "Montserrat" },
|
|
572
|
+
{ title: "Poppins (Modern Sans-Serif)", value: "Poppins" }
|
|
573
|
+
],
|
|
574
|
+
layout: "dropdown"
|
|
575
|
+
}
|
|
576
|
+
}),
|
|
577
|
+
defineField8({
|
|
578
|
+
name: "bodyFont",
|
|
579
|
+
title: "Body Font",
|
|
580
|
+
type: "string",
|
|
581
|
+
description: "Font family for body text and paragraphs",
|
|
582
|
+
group: "theme",
|
|
583
|
+
options: {
|
|
584
|
+
list: [
|
|
585
|
+
{ title: "Source Sans 3 (Clean & Professional)", value: "Source Sans 3" },
|
|
586
|
+
{ title: "Inter (Modern Sans-Serif)", value: "Inter" },
|
|
587
|
+
{ title: "Open Sans (Friendly Sans-Serif)", value: "Open Sans" },
|
|
588
|
+
{ title: "Lato (Neutral Sans-Serif)", value: "Lato" },
|
|
589
|
+
{ title: "Roboto (Tech Sans-Serif)", value: "Roboto" },
|
|
590
|
+
{ title: "Work Sans (Contemporary)", value: "Work Sans" },
|
|
591
|
+
{ title: "System UI (Native)", value: "system-ui" }
|
|
592
|
+
],
|
|
593
|
+
layout: "dropdown"
|
|
594
|
+
}
|
|
595
|
+
}),
|
|
596
|
+
// --- SEO Settings ---
|
|
597
|
+
defineField8({
|
|
598
|
+
name: "seoTitle",
|
|
599
|
+
title: "SEO Title",
|
|
600
|
+
type: "string",
|
|
601
|
+
description: "Title for search engines (50-60 characters recommended)",
|
|
602
|
+
group: "seo",
|
|
603
|
+
validation: (Rule) => Rule.max(60).warning("SEO titles should be under 60 characters")
|
|
604
|
+
}),
|
|
605
|
+
defineField8({
|
|
606
|
+
name: "seoDescription",
|
|
607
|
+
title: "SEO Description",
|
|
608
|
+
type: "text",
|
|
609
|
+
description: "Description for search engines (150-160 characters recommended)",
|
|
610
|
+
group: "seo",
|
|
611
|
+
validation: (Rule) => Rule.max(160).warning("SEO descriptions should be under 160 characters")
|
|
612
|
+
}),
|
|
613
|
+
defineField8({
|
|
614
|
+
name: "seoKeywords",
|
|
615
|
+
title: "SEO Keywords",
|
|
616
|
+
type: "array",
|
|
617
|
+
of: [{ type: "string" }],
|
|
618
|
+
description: "Keywords for search engines",
|
|
619
|
+
group: "seo",
|
|
620
|
+
options: {
|
|
621
|
+
layout: "tags"
|
|
622
|
+
}
|
|
623
|
+
}),
|
|
624
|
+
defineField8({
|
|
625
|
+
name: "socialImage",
|
|
626
|
+
title: "Social Share Image",
|
|
627
|
+
type: "image",
|
|
628
|
+
description: "Image shown when sharing on social media (1200x630px recommended)",
|
|
629
|
+
group: "seo",
|
|
630
|
+
options: {
|
|
631
|
+
hotspot: true
|
|
632
|
+
}
|
|
633
|
+
}),
|
|
634
|
+
defineField8({
|
|
635
|
+
name: "twitterHandle",
|
|
636
|
+
title: "Twitter Handle",
|
|
637
|
+
type: "string",
|
|
638
|
+
description: "Twitter/X username (e.g., @labname)",
|
|
639
|
+
group: "seo"
|
|
640
|
+
}),
|
|
641
|
+
defineField8({
|
|
642
|
+
name: "linkedinUrl",
|
|
643
|
+
title: "LinkedIn URL",
|
|
644
|
+
type: "url",
|
|
645
|
+
description: "Full LinkedIn page URL",
|
|
646
|
+
group: "seo"
|
|
647
|
+
}),
|
|
648
|
+
// --- Analytics ---
|
|
649
|
+
defineField8({
|
|
650
|
+
name: "googleAnalyticsId",
|
|
651
|
+
title: "Google Analytics ID",
|
|
652
|
+
type: "string",
|
|
653
|
+
description: "Google Analytics 4 Measurement ID (e.g., G-XXXXXXXXXX)",
|
|
654
|
+
group: "analytics"
|
|
655
|
+
}),
|
|
656
|
+
defineField8({
|
|
657
|
+
name: "plausibleDomain",
|
|
658
|
+
title: "Plausible Analytics Domain",
|
|
659
|
+
type: "string",
|
|
660
|
+
description: "Domain configured in Plausible (optional alternative to GA)",
|
|
661
|
+
group: "analytics"
|
|
662
|
+
}),
|
|
663
|
+
// --- Legal Pages Settings ---
|
|
664
|
+
defineField8({
|
|
665
|
+
name: "showPrivacyPolicy",
|
|
666
|
+
title: "Show Privacy Policy Link",
|
|
667
|
+
type: "boolean",
|
|
668
|
+
description: "Display the Privacy Policy link in the footer",
|
|
669
|
+
group: "legal",
|
|
670
|
+
initialValue: true
|
|
671
|
+
}),
|
|
672
|
+
defineField8({
|
|
673
|
+
name: "privacyPolicyUrl",
|
|
674
|
+
title: "External Privacy Policy URL",
|
|
675
|
+
type: "url",
|
|
676
|
+
description: "Optional: Use an external URL instead of the built-in page (e.g., university policy page)",
|
|
677
|
+
group: "legal",
|
|
678
|
+
hidden: ({ document }) => !document?.showPrivacyPolicy
|
|
679
|
+
}),
|
|
680
|
+
defineField8({
|
|
681
|
+
name: "showTerms",
|
|
682
|
+
title: "Show Terms & Conditions Link",
|
|
683
|
+
type: "boolean",
|
|
684
|
+
description: "Display the Terms & Conditions link in the footer",
|
|
685
|
+
group: "legal",
|
|
686
|
+
initialValue: true
|
|
687
|
+
}),
|
|
688
|
+
defineField8({
|
|
689
|
+
name: "termsUrl",
|
|
690
|
+
title: "External Terms & Conditions URL",
|
|
691
|
+
type: "url",
|
|
692
|
+
description: "Optional: Use an external URL instead of the built-in page (e.g., university terms page)",
|
|
693
|
+
group: "legal",
|
|
694
|
+
hidden: ({ document }) => !document?.showTerms
|
|
695
|
+
})
|
|
696
|
+
],
|
|
697
|
+
preview: {
|
|
698
|
+
select: {
|
|
699
|
+
title: "labName",
|
|
700
|
+
subtitle: "labNameAccent"
|
|
701
|
+
},
|
|
702
|
+
prepare({ title, subtitle }) {
|
|
703
|
+
return {
|
|
704
|
+
title: `${title || "Site"} ${subtitle || ""} Settings`
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
|
|
710
|
+
// src/schemas/schemaTypes/homePage.ts
|
|
711
|
+
import { defineField as defineField9, defineType as defineType10 } from "sanity";
|
|
712
|
+
var homePage_default = defineType10({
|
|
713
|
+
name: "homePage",
|
|
714
|
+
title: "Home Page",
|
|
715
|
+
type: "document",
|
|
716
|
+
groups: [
|
|
717
|
+
{ name: "hero", title: "Hero Section" },
|
|
718
|
+
{ name: "research", title: "Research Areas" },
|
|
719
|
+
{ name: "stats", title: "Statistics" }
|
|
720
|
+
],
|
|
721
|
+
fields: [
|
|
722
|
+
// Internal title for CMS organization
|
|
723
|
+
defineField9({
|
|
724
|
+
name: "title",
|
|
725
|
+
title: "Title",
|
|
726
|
+
type: "string",
|
|
727
|
+
initialValue: "Home Page Content",
|
|
728
|
+
hidden: true
|
|
729
|
+
}),
|
|
730
|
+
// --- Hero Section ---
|
|
731
|
+
defineField9({
|
|
732
|
+
name: "heroTagline",
|
|
733
|
+
title: "Hero Tagline",
|
|
734
|
+
type: "string",
|
|
735
|
+
description: 'Small text above the main heading (e.g., "#1 Research Lab in the Field")',
|
|
736
|
+
group: "hero"
|
|
737
|
+
}),
|
|
738
|
+
defineField9({
|
|
739
|
+
name: "heroHeading",
|
|
740
|
+
title: "Hero Heading",
|
|
741
|
+
type: "string",
|
|
742
|
+
description: 'Main heading text (e.g., "Empowering innovation with the knowledge of")',
|
|
743
|
+
group: "hero",
|
|
744
|
+
validation: (Rule) => Rule.required()
|
|
745
|
+
}),
|
|
746
|
+
defineField9({
|
|
747
|
+
name: "heroHeadingAccent",
|
|
748
|
+
title: "Hero Heading Accent Word",
|
|
749
|
+
type: "string",
|
|
750
|
+
description: 'The highlighted word in the heading (e.g., "Matter")',
|
|
751
|
+
group: "hero",
|
|
752
|
+
validation: (Rule) => Rule.required()
|
|
753
|
+
}),
|
|
754
|
+
defineField9({
|
|
755
|
+
name: "heroDescription",
|
|
756
|
+
title: "Hero Description",
|
|
757
|
+
type: "text",
|
|
758
|
+
description: "Supporting text below the main heading",
|
|
759
|
+
group: "hero",
|
|
760
|
+
validation: (Rule) => Rule.required()
|
|
761
|
+
}),
|
|
762
|
+
defineField9({
|
|
763
|
+
name: "heroCtaText",
|
|
764
|
+
title: "Hero CTA Button Text",
|
|
765
|
+
type: "string",
|
|
766
|
+
description: "Text for the primary call-to-action button",
|
|
767
|
+
initialValue: "Explore Our Work",
|
|
768
|
+
group: "hero"
|
|
769
|
+
}),
|
|
770
|
+
defineField9({
|
|
771
|
+
name: "heroCtaLink",
|
|
772
|
+
title: "Hero CTA Button Link",
|
|
773
|
+
type: "string",
|
|
774
|
+
description: 'Link for the primary CTA (e.g., "/research")',
|
|
775
|
+
initialValue: "/research",
|
|
776
|
+
group: "hero"
|
|
777
|
+
}),
|
|
778
|
+
defineField9({
|
|
779
|
+
name: "heroImage",
|
|
780
|
+
title: "Hero Image",
|
|
781
|
+
type: "image",
|
|
782
|
+
options: {
|
|
783
|
+
hotspot: true
|
|
784
|
+
},
|
|
785
|
+
description: "Main image for the hero section",
|
|
786
|
+
group: "hero"
|
|
787
|
+
}),
|
|
788
|
+
// --- Research Areas ---
|
|
789
|
+
defineField9({
|
|
790
|
+
name: "researchAreasTitle",
|
|
791
|
+
title: "Research Areas Section Title",
|
|
792
|
+
type: "string",
|
|
793
|
+
initialValue: "Research Focus Areas",
|
|
794
|
+
group: "research"
|
|
795
|
+
}),
|
|
796
|
+
defineField9({
|
|
797
|
+
name: "researchAreas",
|
|
798
|
+
title: "Research Areas",
|
|
799
|
+
type: "array",
|
|
800
|
+
group: "research",
|
|
801
|
+
of: [
|
|
802
|
+
{
|
|
803
|
+
type: "object",
|
|
804
|
+
fields: [
|
|
805
|
+
{
|
|
806
|
+
name: "title",
|
|
807
|
+
title: "Title",
|
|
808
|
+
type: "string",
|
|
809
|
+
validation: (Rule) => Rule.required()
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
name: "description",
|
|
813
|
+
title: "Description",
|
|
814
|
+
type: "text",
|
|
815
|
+
validation: (Rule) => Rule.required()
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
name: "icon",
|
|
819
|
+
title: "Icon",
|
|
820
|
+
type: "string",
|
|
821
|
+
description: "Icon key: microscope, atom, dna, brain, flask, chart",
|
|
822
|
+
options: {
|
|
823
|
+
list: [
|
|
824
|
+
{ title: "Microscope", value: "microscope" },
|
|
825
|
+
{ title: "Atom", value: "atom" },
|
|
826
|
+
{ title: "DNA", value: "dna" },
|
|
827
|
+
{ title: "Brain", value: "brain" },
|
|
828
|
+
{ title: "Flask", value: "flask" },
|
|
829
|
+
{ title: "Chart", value: "chart" }
|
|
830
|
+
]
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
],
|
|
834
|
+
preview: {
|
|
835
|
+
select: {
|
|
836
|
+
title: "title",
|
|
837
|
+
subtitle: "description"
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
validation: (Rule) => Rule.max(6)
|
|
843
|
+
}),
|
|
844
|
+
// --- Statistics ---
|
|
845
|
+
defineField9({
|
|
846
|
+
name: "statsEnabled",
|
|
847
|
+
title: "Show Statistics Section",
|
|
848
|
+
type: "boolean",
|
|
849
|
+
initialValue: true,
|
|
850
|
+
group: "stats"
|
|
851
|
+
}),
|
|
852
|
+
defineField9({
|
|
853
|
+
name: "stats",
|
|
854
|
+
title: "Statistics",
|
|
855
|
+
type: "array",
|
|
856
|
+
group: "stats",
|
|
857
|
+
of: [
|
|
858
|
+
{
|
|
859
|
+
type: "object",
|
|
860
|
+
fields: [
|
|
861
|
+
{
|
|
862
|
+
name: "value",
|
|
863
|
+
title: "Value",
|
|
864
|
+
type: "string",
|
|
865
|
+
description: 'The number or value to display (e.g., "150+", "$12M")',
|
|
866
|
+
validation: (Rule) => Rule.required()
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
name: "label",
|
|
870
|
+
title: "Label",
|
|
871
|
+
type: "string",
|
|
872
|
+
description: 'Description of the stat (e.g., "Publications")',
|
|
873
|
+
validation: (Rule) => Rule.required()
|
|
874
|
+
}
|
|
875
|
+
],
|
|
876
|
+
preview: {
|
|
877
|
+
select: {
|
|
878
|
+
title: "value",
|
|
879
|
+
subtitle: "label"
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
],
|
|
884
|
+
validation: (Rule) => Rule.max(4)
|
|
885
|
+
})
|
|
886
|
+
],
|
|
887
|
+
preview: {
|
|
888
|
+
select: {
|
|
889
|
+
title: "heroHeading",
|
|
890
|
+
media: "heroImage"
|
|
891
|
+
},
|
|
892
|
+
prepare({ title, media }) {
|
|
893
|
+
return {
|
|
894
|
+
title: "Home Page",
|
|
895
|
+
subtitle: title,
|
|
896
|
+
media
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
|
|
902
|
+
// src/schemas/schemaTypes/legalPage.ts
|
|
903
|
+
import { defineField as defineField10, defineType as defineType11 } from "sanity";
|
|
904
|
+
var legalPage_default = defineType11({
|
|
905
|
+
name: "legalPage",
|
|
906
|
+
title: "Legal Pages",
|
|
907
|
+
type: "document",
|
|
908
|
+
fields: [
|
|
909
|
+
defineField10({
|
|
910
|
+
name: "pageType",
|
|
911
|
+
title: "Page Type",
|
|
912
|
+
type: "string",
|
|
913
|
+
options: {
|
|
914
|
+
list: [
|
|
915
|
+
{ title: "Privacy Policy", value: "privacy" },
|
|
916
|
+
{ title: "Terms & Conditions", value: "terms" }
|
|
917
|
+
],
|
|
918
|
+
layout: "radio"
|
|
919
|
+
},
|
|
920
|
+
validation: (Rule) => Rule.required()
|
|
921
|
+
}),
|
|
922
|
+
defineField10({
|
|
923
|
+
name: "title",
|
|
924
|
+
title: "Page Title",
|
|
925
|
+
type: "string",
|
|
926
|
+
description: "The title displayed at the top of the page",
|
|
927
|
+
validation: (Rule) => Rule.required()
|
|
928
|
+
}),
|
|
929
|
+
defineField10({
|
|
930
|
+
name: "lastUpdated",
|
|
931
|
+
title: "Last Updated",
|
|
932
|
+
type: "date",
|
|
933
|
+
description: "When this policy was last updated"
|
|
934
|
+
}),
|
|
935
|
+
defineField10({
|
|
936
|
+
name: "content",
|
|
937
|
+
title: "Content",
|
|
938
|
+
type: "blockContent",
|
|
939
|
+
description: "The full content of the legal page"
|
|
940
|
+
})
|
|
941
|
+
],
|
|
942
|
+
preview: {
|
|
943
|
+
select: {
|
|
944
|
+
title: "title",
|
|
945
|
+
pageType: "pageType"
|
|
946
|
+
},
|
|
947
|
+
prepare({ title, pageType }) {
|
|
948
|
+
return {
|
|
949
|
+
title: title || (pageType === "privacy" ? "Privacy Policy" : "Terms & Conditions"),
|
|
950
|
+
subtitle: pageType === "privacy" ? "Privacy Policy" : "Terms & Conditions"
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
|
|
956
|
+
// src/schemas/schemaTypes/index.ts
|
|
957
|
+
var schemaTypes = [
|
|
958
|
+
// Singleton Pages
|
|
959
|
+
siteSettings_default,
|
|
960
|
+
homePage_default,
|
|
961
|
+
researchPage_default,
|
|
962
|
+
bookPage_default,
|
|
963
|
+
contactPage_default,
|
|
964
|
+
// Document Collections
|
|
965
|
+
publication_default,
|
|
966
|
+
person_default,
|
|
967
|
+
newsArticle_default,
|
|
968
|
+
galleryImage_default,
|
|
969
|
+
legalPage_default,
|
|
970
|
+
// Content Types
|
|
971
|
+
blockContent_default
|
|
972
|
+
];
|
|
973
|
+
export {
|
|
974
|
+
blockContent_default as blockContent,
|
|
975
|
+
bookPage_default as bookPage,
|
|
976
|
+
contactPage_default as contactPage,
|
|
977
|
+
galleryImage_default as galleryImage,
|
|
978
|
+
homePage_default as homePage,
|
|
979
|
+
legalPage_default as legalPage,
|
|
980
|
+
newsArticle_default as newsArticle,
|
|
981
|
+
person_default as person,
|
|
982
|
+
publication_default as publication,
|
|
983
|
+
researchPage_default as researchPage,
|
|
984
|
+
schemaTypes,
|
|
985
|
+
schemaTypes as schemas,
|
|
986
|
+
siteSettings_default as siteSettings
|
|
987
|
+
};
|