|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: "CTF Writeups" |
| 4 | +permalink: /writeups/ |
| 5 | +icon: fas fa-flag |
| 6 | +order: 2 |
| 7 | +--- |
| 8 | + |
| 9 | +<h1>CTF Writeups</h1> |
| 10 | + |
| 11 | + |
| 12 | +{% include lang.html %} |
| 13 | + |
| 14 | +{% assign all_pinned = '' | split: '' %} |
| 15 | +{% assign all_normal = '' | split: '' %} |
| 16 | + |
| 17 | +{% for post in site.posts %} |
| 18 | + {% if post.tags contains "writeups" %} |
| 19 | + {% if post.pin %} |
| 20 | + {% assign all_pinned = all_pinned | push: post %} |
| 21 | + {% elsif post.hidden != true %} |
| 22 | + {% assign all_normal = all_normal | push: post %} |
| 23 | + {% endif %} |
| 24 | + {% endif %} |
| 25 | +{% endfor %} |
| 26 | + |
| 27 | +{% assign posts = all_pinned | concat: all_normal %} |
| 28 | + |
| 29 | +<div id="post-list" class="flex-grow-1 px-xl-1"> |
| 30 | + {% for post in posts %} |
| 31 | + <article class="card-wrapper card"> |
| 32 | + <a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse"> |
| 33 | + {% assign card_body_col = '12' %} |
| 34 | + |
| 35 | + {% if post.image %} |
| 36 | + {% assign src = post.image.path | default: post.image %} |
| 37 | + {% capture src %}{% include media-url.html src=src subpath=post.media_subpath %}{% endcapture %} |
| 38 | + |
| 39 | + {% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %} |
| 40 | + |
| 41 | + {% assign lqip = null %} |
| 42 | + |
| 43 | + {% if post.image.lqip %} |
| 44 | + {% capture lqip_url %}{% include media-url.html src=post.image.lqip subpath=post.media_subpath %}{% endcapture %} |
| 45 | + {% assign lqip = 'lqip="' | append: lqip_url | append: '"' %} |
| 46 | + {% endif %} |
| 47 | + |
| 48 | + <div class="col-md-5"> |
| 49 | + <img src="{{ src }}" alt="{{ alt }}" {{ lqip }}> |
| 50 | + </div> |
| 51 | + |
| 52 | + {% assign card_body_col = '7' %} |
| 53 | + {% endif %} |
| 54 | + |
| 55 | + <div class="col-md-{{ card_body_col }}"> |
| 56 | + <div class="card-body d-flex flex-column"> |
| 57 | + <h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1> |
| 58 | + |
| 59 | + <div class="card-text content mt-0 mb-3"> |
| 60 | + <p>{% include post-description.html %}</p> |
| 61 | + </div> |
| 62 | + |
| 63 | + <div class="post-meta flex-grow-1 d-flex align-items-end"> |
| 64 | + <div class="me-auto"> |
| 65 | + <!-- posted date --> |
| 66 | + <i class="far fa-calendar fa-fw me-1"></i> |
| 67 | + {% include datetime.html date=post.date lang=lang %} |
| 68 | + |
| 69 | + <!-- categories --> |
| 70 | + {% if post.categories.size > 0 %} |
| 71 | + <i class="far fa-folder-open fa-fw me-1"></i> |
| 72 | + <span class="categories"> |
| 73 | + {% for category in post.categories %} |
| 74 | + {{ category }} |
| 75 | + {%- unless forloop.last -%},{%- endunless -%} |
| 76 | + {% endfor %} |
| 77 | + </span> |
| 78 | + {% endif %} |
| 79 | + </div> |
| 80 | + |
| 81 | + {% if post.pin %} |
| 82 | + <div class="pin ms-1"> |
| 83 | + <i class="fas fa-thumbtack fa-fw"></i> |
| 84 | + <span>{{ site.data.locales[lang].post.pin_prompt }}</span> |
| 85 | + </div> |
| 86 | + {% endif %} |
| 87 | + </div> |
| 88 | + <!-- .post-meta --> |
| 89 | + </div> |
| 90 | + <!-- .card-body --> |
| 91 | + </div> |
| 92 | + </a> |
| 93 | + </article> |
| 94 | + {% endfor %} |
| 95 | +</div> |
| 96 | +<!-- #post-list --> |
| 97 | + |
0 commit comments