1
0
mirror of https://github.com/GenderDysphoria/GenderDysphoria.fyi.git synced 2025-11-25 20:42:40 +00:00

Moving new twitter page into /tweets/

This commit is contained in:
Jocelyn Badgley (Twipped)
2020-03-05 19:42:57 -08:00
parent deed26c2d9
commit 01acc1439a
6 changed files with 80 additions and 59 deletions

25
public/tweets/index.html Normal file
View File

@@ -0,0 +1,25 @@
---
title: "Trans Twitter Topics"
---
{{#extend "layout"}}
{{#content "bodyClass"}}page ttt{{/content}}
{{#content "body"}}
<section class="ttt-grid">
{{#each posts}}
<div class="ttt-post {{#if flags.bordered}} bordered{{/if}}">
<div class="ttt-head">
<div class="ttt-tags">{{#each meta.tags}}<a href="#{{@key}}" class="ttt-tag">{{this}}</a>{{/each}}</div>
<a href="{{this.url}}" class="ttt-link" title="{{date this.dateCreated 'MMMM do, yyyy'}}">{{icon 'link'}} Permalink</a>
</div>
<div class="ttt-wrap">{{{this.content}}}</div>
</div>
{{/each}}
</section>
{{/content}}
{{/extend}}

View File

@@ -1,40 +0,0 @@
---
title: "Trans Twitter Topics"
---
{{#extend "layout"}}
{{#content "bodyClass"}}page ttt{{/content}}
{{#content "body"}}
<section class="ttt-grid">
{{#each posts}}
<div class="ttt-post {{#if flags.bordered}} bordered{{/if}}">
<a href="{{this.url}}" class="ttt-tab">{{icon 'link'}} Permalink</a>
<div class="ttt-wrap">{{{this.content}}}</div>
</div>
{{/each}}
</section>
<script>
function reheight () {
$('.ttt-wrap').each((i, el) => {
const $wrap = $(el);
const $cell = $wrap.closest('.ttt-post');
const span = Math.ceil($wrap.height() / 20) + 2;
$cell.css({ 'grid-row-end': 'span ' + span });
})
}
$(() => {
reheight();
// window.addEventListener('scroll', reheight);
window.addEventListener('resize', reheight);
})
</script>
{{/content}}
{{/extend}}