layout.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. export const settingsLayout = {
  2. layout: {
  3. body: ' bg-background ',
  4. defaults: {
  5. name: 'hor',
  6. theme: 'auto',
  7. lang: 'en',
  8. feed_unit: 'default',
  9. },
  10. avaliable_layouts: ['hor', 'ver', 'mixed'],
  11. avaliable_feed_units: ['Full feed', 'Compact feed'],
  12. avaliable_langs: ['auto', 'en', 'ru', 'es', 'de', 'fr'],
  13. screen: ' w-full ',
  14. max_width: ' ns--undefined-- w-full flex-auto web:h-full ne-- ',
  15. page_content_width_default: ' ns--page-content-width-- w-full max-w-8xl ne-- ',
  16. page_content_width:{
  17. layout_1_column_thin: 'w-full max-w-md',
  18. layout_1_column_half: 'w-full max-w-4xl',
  19. chat: 'w-full',
  20. // Page URI or layout name. Forks override in customization/settings.js.
  21. 'tasks-home': 'w-full',
  22. task: 'w-full',
  23. 'view-task': 'w-full',
  24. },
  25. page_content_padding: ' p-4 ',
  26. page_content_padding_default: ' p-4 ',
  27. // Per-layout padding tiers for `responsiveClasses` (same values as UNA page `config.padding`).
  28. // Missing key → `page_content_padding_default`. `[]` = off. `true` = all breakpoints.
  29. // UNA `config.padding` still wins when the page sends it.
  30. page_content_padding_layouts: {
  31. chat: [],
  32. },
  33. page_content_gap: ' gap-4 ',
  34. page_content_gap_default: ' sm:gap-4 ',
  35. max_width_landing: 'w-full max-w-8xl ',
  36. max_width_block: ' max-w-8xl ',
  37. // Lists from 40rem sit 16px in (with the items' 8px padding), as the side panels do;
  38. // narrower lists run their cards to the edges.
  39. padding_content: ' @list-sm/list:m-2',
  40. feed_container: ' w-full flex-1 max-w-3xl sm:p-4 mx-auto ',
  41. post_container: ' max-w-3xl w-full flex-1 bg-card text-card-foreground rounded-2xl p-3 sm:py-4 lg:my-4 mx-auto ', // for hor = max-w-screen-xl, for ver = max-w-screen-lg
  42. search: true,
  43. sidebar_search: true,
  44. extended_search: true,
  45. apps: true,
  46. add_menu: true,
  47. show_profile_info: true,
  48. tooltips: true,
  49. hide_header_for_non_logged: false,
  50. hide_header_for_all: false,
  51. card_animation_duration: 100,
  52. user_remote_config: true,
  53. background_image_color: '',
  54. background_image: '',
  55. background_image_dark: '',
  56. /** Interface sounds (Cuelume cues, `app/lib/sound`). Users can turn them off in their settings; false turns them off for everyone. */
  57. sounds: true,
  58. tab_sounds: false,
  59. show_login_modal: 0,
  60. //redirect_on_forbidden: '/home',
  61. lock_unconfirmed: true,
  62. lock_no_profile: true,
  63. allow_create_new_profile: true,
  64. button_style_for_actions: 'secondary',
  65. share_text: '',
  66. default_icon_stroke_width: 2,
  67. tablet_mode_from: 'lg',
  68. show_tabbar_on_mobile_non_logged: false,
  69. header: {
  70. container: ' ns--header-wrapper-- w-full z-50 header-fixed web:fixed native:absolute native:top-0 native:left-0 native:right-0 web:top-0 web:transition-[transform,background-color,border-color] web:duration-300 web:ease-in-out ne--',
  71. /**
  72. * Color wash behind glass chrome. Applied as an overlay that
  73. * extends `fade_extend` below the measured header.
  74. */
  75. fade: 'bg-linear-to-b from-background to-background/0',
  76. /** Extra px the color wash extends below the header. */
  77. fade_extend: 0,
  78. /**
  79. * Native wash where `fade_blur` is off (Android): solid through the
  80. * header, easing out over `extend` px below it — like the iOS blur —
  81. * so content scrolling underneath (chat) doesn't show through the
  82. * title row. `extend` is visual only (lists keep `fade_extend`).
  83. * null falls back to `fade` / `fade_extend`.
  84. */
  85. fade_native: { className: 'bg-linear-to-b from-background from-75% to-background/0', extend: 16 },
  86. /**
  87. * iOS: progressive blur instead of the `fade` wash, like native
  88. * bars — a SwiftUI material masked by an eased gradient (fully
  89. * blurred for `hold` of the height, then eases out). `extend` = px
  90. * past the header. `tint` = opacity of `bg-background` over the
  91. * material per scheme (dark `thin` alone reads as `bg-card`).
  92. * null keeps the `fade` wash.
  93. */
  94. // Transparency knobs: `opacity` (peak strength, blur + tint) is the
  95. // gentlest; `material` (ultraThin → thick), `hold`, `tint` also help.
  96. fade_blur: { material: 'thin', hold: 0.5, opacity: 0.8, extend: 16, tint: { dark: 0.75 } },
  97. /** Optional. When set (non-blank), appended to `container` while scrollY > 0 (full-width bar: shadow, border, etc.). */
  98. container_scrolled: ' ns--header-wrapper-scrolled-- shadow-none lg:bg-card/60 lg:backdrop-blur-lg lg:shadow-border-b dark:lg:shadow-border-b-deep ne-- ',
  99. content: ' ns--header-content-- items-center justify-between h-16 lg:bg-card/60 lg:backdrop-blur-lg lg:shadow-border-b dark:lg:shadow-border-b-deep mx-auto w-full ne-- ',
  100. /** Optional. When set (non-blank), applied to header content only while scrollY > 0. If unset, legacy `content_pinned_fixed` behavior is unchanged. */
  101. content_scrolled: ' ns--header-content-scrolled-- ',
  102. content_pinned_fixed: ' ',
  103. content_left: 'flex-none 2xl:w-full 2xl:max-w-1/4 px-4 gap-3',
  104. content_center: ' hidden flex-1 lg:flex gap-2 items-center justify-center max-w-3xl px-4 ',
  105. content_right: ' items-end flex-none 2xl:w-full 2xl:max-w-1/4 px-4 gap-3',
  106. active_item_indicator: 'absolute -bottom-2 left-0 h-0.5 rounded-full flex-none bg-ring',
  107. active_item_indicator_bg: 'absolute bottom-0 left-0 h-12 w-full overflow-hidden rounded-lg flex-none',
  108. /**
  109. * Band behind the header at rest on phones and tablets (below lg): part of the
  110. * content, so it scrolls away with it while the header's glass buttons stay.
  111. * A fork can give it a brand colour, e.g. 'bg-accent-500 lg:bg-transparent'.
  112. */
  113. band: 'bg-card sm:bg-card/80 lg:bg-transparent',
  114. /**
  115. * Colour scheme of the header's buttons and page title while they rest on the band
  116. * (iOS: SwiftUI glass chrome and labels; web: the buttons' colour tokens; the title
  117. * through Uniwind's ScopedTheme). On web a selected button (the active tab) takes the
  118. * opposite scheme, so it stands out from the band. 'auto' picks by the band colour's
  119. * contrast (white or dark labels, whichever reads better); 'light' | 'dark' set it;
  120. * null keeps the app's scheme. The app's scheme also applies once the header floats
  121. * over content, and at widths where `band` resolves to no fill (`lg:bg-transparent`).
  122. */
  123. band_scheme: null,
  124. },
  125. /**
  126. * iOS: native progressive blur behind bottom composers (post comments,
  127. * messenger / agent) and in-panel overlay headers, instead of their
  128. * `bg-linear-to-* … to-transparent` wash — same shape as
  129. * `header.fade_blur` (`hold` is measured from the anchored edge;
  130. * `extend` is unused, the containers carry their own fade run-up).
  131. * null keeps the wash.
  132. */
  133. footer_fade_blur: { material: 'thin', hold: 0.45, opacity: 0.8, tint: { dark: 0.75 } },
  134. /**
  135. * iOS NativeTabs: native blur behind the floating tab bar on tab
  136. * screens, matching `header.fade_blur`. Height = the tab screen's bottom
  137. * safe-area inset (home indicator + tab bar, 83pt on iPhone 15 Pro) +
  138. * `extend`. null leaves only the system edge effect.
  139. */
  140. tabbar_fade_blur: { material: 'thin', hold: 0.5, opacity: 0.8, extend: 44, tint: { dark: 0.75 } },
  141. vertical: {
  142. blocks: [
  143. /* {
  144. name: 'system/profile_menu/TemplServiceProfiles',
  145. showTitle: false,
  146. showBg: false,
  147. },*/
  148. ],
  149. },
  150. external_scripts: [],
  151. },
  152. layouts: {
  153. '/': {
  154. // For the splash screen (home page when not logged in)
  155. max_width: '',
  156. },
  157. '/login': {
  158. max_width: '',
  159. },
  160. '/create-account': {
  161. max_width: '',
  162. },
  163. copilot: {
  164. layout: 'chat',
  165. },
  166. home: {
  167. adjustable: false,
  168. sizable: false,
  169. cells: {
  170. left: {
  171. defaultSize: 0,
  172. minSize: 0,
  173. maxSize: 25,
  174. breakpoint: 'xl',
  175. responsive: {
  176. xl: {
  177. defaultSize: 25,
  178. minSize: 25,
  179. maxSize: 25,
  180. },
  181. '2xl': {
  182. defaultSize: 25,
  183. minSize: 25,
  184. maxSize: 25,
  185. },
  186. },
  187. },
  188. center: {
  189. defaultSize: 100,
  190. minSize: 50,
  191. maxSize: 100,
  192. responsive: {
  193. lg: {
  194. defaultSize: 65,
  195. minSize: 65,
  196. maxSize: 65,
  197. },
  198. xl: {
  199. defaultSize: 50,
  200. minSize: 50,
  201. maxSize: 50,
  202. },
  203. '2xl': {
  204. defaultSize: 50,
  205. minSize: 50,
  206. maxSize: 50,
  207. },
  208. },
  209. },
  210. right: {
  211. defaultSize: 0,
  212. minSize: 0,
  213. maxSize: 35,
  214. breakpoint: 'lg',
  215. responsive: {
  216. lg: {
  217. defaultSize: 35,
  218. minSize: 35,
  219. maxSize: 35,
  220. },
  221. xl: {
  222. defaultSize: 25,
  223. minSize: 25,
  224. maxSize: 25,
  225. },
  226. '2xl': {
  227. defaultSize: 25,
  228. minSize: 25,
  229. maxSize: 25,
  230. },
  231. },
  232. },
  233. },
  234. },
  235. wiki: {
  236. adjustable: false,
  237. sizable: true,
  238. 'panel-line': 'bg-border/0 web:hover:bg-accent-foreground/60 w-1 duration-300',
  239. cells: {
  240. left: {
  241. defaultSize: 0,
  242. minSize: 0,
  243. maxSize: 25,
  244. // Nav is primary — show from lg; TOC waits for xl.
  245. breakpoint: 'lg',
  246. responsive: {
  247. lg: {
  248. defaultSize: 25,
  249. minSize: 25,
  250. maxSize: 25,
  251. },
  252. xl: {
  253. defaultSize: 25,
  254. minSize: 25,
  255. maxSize: 25,
  256. },
  257. '2xl': {
  258. defaultSize: 20,
  259. minSize: 15,
  260. maxSize: 25,
  261. },
  262. },
  263. },
  264. center: {
  265. defaultSize: 100,
  266. minSize: 50,
  267. maxSize: 100,
  268. responsive: {
  269. lg: {
  270. defaultSize: 75,
  271. minSize: 75,
  272. maxSize: 75,
  273. },
  274. xl: {
  275. defaultSize: 50,
  276. minSize: 50,
  277. maxSize: 50,
  278. },
  279. '2xl': {
  280. defaultSize: 60,
  281. minSize: 40,
  282. maxSize: 70,
  283. },
  284. },
  285. },
  286. right: {
  287. defaultSize: 0,
  288. minSize: 0,
  289. maxSize: 35,
  290. breakpoint: 'xl',
  291. responsive: {
  292. xl: {
  293. defaultSize: 25,
  294. minSize: 25,
  295. maxSize: 25,
  296. },
  297. '2xl': {
  298. defaultSize: 20,
  299. minSize: 15,
  300. maxSize: 30,
  301. },
  302. },
  303. },
  304. },
  305. },
  306. chat: {
  307. adjustable: true,
  308. sizable: true,
  309. cells: {
  310. left: {
  311. defaultSize: 30,
  312. minSize: 20,
  313. maxSize: 40,
  314. breakpoint: 'lg',
  315. },
  316. center: { defaultSize: 70, minSize: 40, maxSize: 80 },
  317. },
  318. },
  319. 'cols-c': {
  320. adjustable: true,
  321. sizable: true,
  322. cells: {
  323. center: { defaultSize: 100, minSize: 50, maxSize: 100 },
  324. },
  325. },
  326. 'cols-l-c-r': {
  327. adjustable: true,
  328. sizable: true,
  329. cells: {
  330. left: {
  331. defaultSize: 25,
  332. minSize: 20,
  333. maxSize: 30,
  334. breakpoint: 'xl',
  335. },
  336. center: { defaultSize: 50, minSize: 40, maxSize: 60 },
  337. right: {
  338. defaultSize: 25,
  339. minSize: 20,
  340. maxSize: 30,
  341. breakpoint: 'xl',
  342. },
  343. },
  344. },
  345. 'cols-l-c': {
  346. adjustable: true,
  347. sizable: true,
  348. cells: {
  349. left: {
  350. defaultSize: 30,
  351. minSize: 15,
  352. maxSize: 30,
  353. breakpoint: 'xl',
  354. responsive: {
  355. '2xl':{
  356. defaultSize: 20,
  357. minSize: 15,
  358. maxSize: 30,
  359. }
  360. }
  361. },
  362. center: {
  363. defaultSize: 70, minSize: 70, maxSize: 80,
  364. responsive: {
  365. '2xl':{
  366. defaultSize: 80,
  367. minSize: 70,
  368. maxSize: 85,
  369. }
  370. }
  371. },
  372. },
  373. },
  374. 'cols-c-r': {
  375. adjustable: true,
  376. sizable: true,
  377. cells: {
  378. center: {
  379. defaultSize: 60,
  380. minSize: 50,
  381. maxSize: 70,
  382. responsive: {
  383. '2xl':{
  384. defaultSize: 70,
  385. minSize: 65,
  386. maxSize: 75,
  387. breakpoint: 'xl',
  388. }
  389. }
  390. },
  391. right: {
  392. defaultSize: 40,
  393. minSize: 30,
  394. maxSize: 50,
  395. breakpoint: 'lg',
  396. responsive: {
  397. '2xl':{
  398. defaultSize: 30,
  399. minSize: 25,
  400. maxSize: 35,
  401. breakpoint: 'xl',
  402. }
  403. }
  404. },
  405. },
  406. },
  407. }
  408. }