summaryrefslogtreecommitdiff
path: root/desk/web/components/post-header.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'desk/web/components/post-header.hoon')
-rw-r--r--desk/web/components/post-header.hoon111
1 files changed, 111 insertions, 0 deletions
diff --git a/desk/web/components/post-header.hoon b/desk/web/components/post-header.hoon
new file mode 100644
index 0000000..a9cb1e2
--- /dev/null
+++ b/desk/web/components/post-header.hoon
@@ -0,0 +1,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)}"
+ ==
+ ==
+==
+-- \ No newline at end of file