Skip to content

Commit

Permalink
Remove link posts feature
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Jul 27, 2023
1 parent dc8e5e1 commit a24450d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
12 changes: 3 additions & 9 deletions layout/_macro/post-collapse.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@
</div>

<div class="post-title">
{%- if post.link %}{# Link posts #}
{%- set postTitleIcon = '<i class="fa fa-external-link-alt"></i>' %}
{%- set postText = post.title or post.link %}
{{ next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url'}) }}
{% else %}
<a class="post-title-link" href="{{ url_for(post.path) }}" itemprop="url">
<span itemprop="name">{{ post.title or __('post.untitled') }}</span>
</a>
{%- endif %}
<a class="post-title-link" href="{{ url_for(post.path) }}" itemprop="url">
<span itemprop="name">{{ post.title or __('post.untitled') }}</span>
</a>
</div>

{{ post_gallery(post.photos) }}
Expand Down
12 changes: 1 addition & 11 deletions layout/_macro/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,7 @@
{%- if post.header !== false %}
<header class="post-header">
<{% if is_index %}h2{% else %}h1{% endif %} class="post-title{% if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="name headline">
{# Link posts #}
{%- if post.link %}
{%- if post.sticky > 0 %}
<span class="post-sticky-flag" title="{{ __('post.sticky') }}">
<i class="fa fa-thumbtack"></i>
</span>
{%- endif %}
{%- set postTitleIcon = '<i class="fa fa-external-link-alt"></i>' %}
{%- set postText = post.title or post.link %}
{{- next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url'}) }}
{% elif is_index %}
{% if is_index %}
{%- if post.sticky > 0 %}
<span class="post-sticky-flag" title="{{ __('post.sticky') }}">
<i class="fa fa-thumbtack"></i>
Expand Down
5 changes: 0 additions & 5 deletions source/css/_common/components/post/post-collapse.styl
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@
border-bottom: 0;
color: var(--link-color);
}

.fa {
font-size: $font-size-small;
margin-left: 5px;
}
}

&::before {
Expand Down

0 comments on commit a24450d

Please sign in to comment.