diff --git a/tpl/artist.haml b/tpl/artist.haml new file mode 100644 index 0000000..d2b7045 --- /dev/null +++ b/tpl/artist.haml @@ -0,0 +1,8 @@ +%span.badge{"onclick": "filterArtist({{artistkey|tojson}})"} + = artist.name +- for sn in artist['@'] + - with si=social[sn] + %span.badge + %a{'href': '{{artist[sn]}}'} + %i{'aria-hidden': 'true', 'class': 'fa fa-{{si["icon"]}}'} + = si['name'] \ No newline at end of file diff --git a/tpl/cardbody.haml b/tpl/cardbody.haml index 38d0b00..495ab66 100644 --- a/tpl/cardbody.haml +++ b/tpl/cardbody.haml @@ -7,24 +7,29 @@ %span %i.fa.fa-calendar-check-o{'aria-hidden': 'true'} Completed on: - %span.month= 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(',')[info['date'][1]-1] - %span.day= info['date'][2]|string + (['st', 'nd', 'rd']+['th']*17+['st', 'nd', 'rd']+['th']*7+['st'])[info['date'][2]-1] + ', ' - %span.year= info['date'][0]|string + - with dt=info['date'] + - include 'datefmt.html' .artist %span %i.fa.fa-paint-brush{'aria-hidden': 'true'} Artist: - = info['artist'] + - with artistkey=info['artist'] + - with artist=artists[artistkey] + - include 'artist.html' .technology %span - %i.fa.fa-rocket{'aria-hidden': 'true'} + %i.fa.fa-wrench{'aria-hidden': 'true'} Technology: - = info['technology'] + - with tagkey=info['technology'] + - with tag=tags[tagkey] + - include 'tag.html' .tags %span %i.fa.fa-tags{'aria-hidden': 'true'} Tags: - =info['tags'] + - for tagkey in info['tags'] + - with tag=tags[tagkey] + - include 'tag.html' - if info['link'] .link %span diff --git a/tpl/datefmt.haml b/tpl/datefmt.haml new file mode 100644 index 0000000..e340cf7 --- /dev/null +++ b/tpl/datefmt.haml @@ -0,0 +1,3 @@ +%span.month= 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(',')[dt[1]-1] +%span.day= dt[2]|string + (['st', 'nd', 'rd']+['th']*17+['st', 'nd', 'rd']+['th']*7+['st'])[dt[2]-1] + ', ' +%span.year= dt[0]|string \ No newline at end of file diff --git a/tpl/tag.haml b/tpl/tag.haml new file mode 100644 index 0000000..8695782 --- /dev/null +++ b/tpl/tag.haml @@ -0,0 +1,3 @@ +%span.badge{"onclick": "filterTag({{tagkey|tojson}})"} + %i{'aria-hidden': 'true', 'class': 'fa fa-{{tag["icon"]}}'} + = tag['name'] \ No newline at end of file