Skip to content

%timeline ‐ Thomas

lomder-librun edited this page Sep 4, 2023 · 10 revisions
/-  common, db
|%
+$  state-0
  $%  timelines=(map path timeline)
      collections=(map cid (set path))
  ==
::
+$  cid  @t
::
:: blocks define a standard format
:: for displaying timeline posts
::
++  block
  =<  block
  |%
  +$  block
    $%  [%text text]
        [%link link]
    ==
  ::
  +$  text
    $:  text=@t
        size=?(%sm %md %lg)
        weight=?(%normal %bold)
        style=?(%normal %italic)
    ==
  ::
  ++  link
    =<  link
    |%
    +$  link
      $:  %link
          link=@t
          =metadata
      ==
    ::
    ++  metadata
      =<  metadata
      |%
      +$  metadata
        $%  [%image image]
            [%video video]
            [%audio audio]
            [%file file]
            [%link link]
            [%misc misc]
        ==
      :: metadata currently stubbed out
      ::
      +$  image  [image=@t width=@ud height=@ud]
      +$  video  [video=@t type=(%youtube %file) orientation=?(%portrait %landscape])
      +$  audio  ~
      +$  file  ~
      +$  link  [ [%raw url=@t] [%opengraph description=(unit @t) image=(unit @t) site-name=(unit @t) title=(unit @t) type=(unit @t) url=@t author=(unit @t) ]] 
      +$  misc  (map @t @t)
      --
    --
  --
::
+$  app
  $:  name=@t
      icon=@t
      action=@t
  ==
::
+$  timeline-post
  $:  ref=(unit [=path =id:common])
      app=(unit app)
      blocks=(list block)
  ==
::
+$  timeline
  $:  =path
      curators=(set ship) :: additional permission information?
      posts=((mop @da timeline-post) gth)
  ==
::
+$  action
  $%  [%create-timeline timeline]
      [%delete-timeline =path]
      [%create-timeline-post =path timeline-post]
      [%delete-timeline-post =path key=@da]
  ==
+$  update  ~
+$  view    ~
--
Clone this wiki locally