summaryrefslogtreecommitdiff
path: root/desk/web/components/post-header.hoon
blob: a9cb1e2af4f623c73f98a67a5c05f15dd5ad658e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/-  tp=trill-post
/+  sr=sortug, lib=boke
=<  html
|%
++  css  ^~  %-  trip
'''
    #post-header{
      -webkit-locale: "en";
      text-size-adjust: 100%;
      color: rgb(0, 0, 0);
      font-size: 16px;
      font-weight: 400;
      text-rendering: optimizelegibility;
      -webkit-font-smoothing: antialiased;
      line-height: 1.618;
      text-shadow: rgb(0, 0, 0) 0px 0px 0px;
      align-items: center;
      border-bottom-color: rgb(223, 223, 223);
      border-bottom-style: dotted;
      border-bottom-width: 1px;
      box-sizing: border-box;
      margin-left: 0px;
      margin-right: 0px;
      padding-bottom: 30px;
      padding-left: 32px;
      padding-right: 32px;
      padding-top: 30px;
      text-align: center;

    &  h2{
        font-size: 2.1rem;
        text-transform: uppercase;
      }

   & #post-meta, .comment-meta, .entry-footer {
      font-size: 90%;
      font-style: italic;
      color: #969696;
    }
    @media (min-width: 768px){
   &     .col-md-4 {
            -ms-flex: 0 0 33.333333%;
            flex: 0 0 33.333333%;
            max-width: 33.333333%;
        }
    }
  &  .breadcrumbs {
        list-style: none;
        display: inline-block;
        margin: 0;
        padding: 0;
        border: none;
        background: transparent;
        text-indent: 0;
    
    }
  &  .breadcrumbs li {
        display: inline-block;
        margin: 0 0.3rem;
        padding: 0;
        border: none;
        background: transparent;
        text-indent: 0;
    }
 &   .tags{
        display: block;
        text-transform: capitalize;
    }

    }
'''
++  html
|=  p=post:tp  ^-  manx
=/  url  (trip (spat (title-to-path:lib title.p id.p)))  :: TODO check for relative/absolute path
=/  date  (date-to-tape:string:sr id.p "-")

=+  [[a y] m [d h mm s f]]=(yore id.p)
=/  ys  %-  trip  (ud-to-cord:string:sr y)

::
;div#post-header
  ;style:"{css}"
  ;h2:"{(trip title.p)}"
  ;div#post-meta
    ;span
      ;  Posted by Spandrell on
      ;ul.breadcrumbs
        ;li
          ;a/"{ys}":"{ys}"
        ==
        ; /
        ;li
          ;a/"{ys}/{<m.m>}":"{<m.m>}"
        ==
        ; /
        ;li
          ;a/"{ys}/{<m.m>}/{<d.d>}":"{<d.d>}"
        ==
      ==
    ==
    ;+  ?:  .=(0 ~(wyt in tags.p))  ;span:""
    ;div.tags
      ;*  %+  mapi:sr  ~(tap in tags.p)
          |=  [i=@ t=@t]  ^-  manx
          ?.  .=(i (dec ~(wyt in tags.p)))
          ;a/"/tags/{(trip t)}":"{(trip t)}, "
          ;a/"/tags/{(trip t)}":"{(trip t)}"
    ==
  ==
==
--