Skip to content

Commit

Permalink
Merge pull request #149 from arc42/color-distinguish-quals-reqs-in-se…
Browse files Browse the repository at this point in the history
…arch-#148

Color distinguish quals reqs in search #148
  • Loading branch information
gernotstarke authored Dec 13, 2023
2 parents e2591f2 + 2b1a116 commit d4f4036
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
48 changes: 48 additions & 0 deletions _includes/search-req-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% assign page = include.page %}

<header>
<div class="panel">
<h1>
{% if include.link %}
<a class="post-link" href="{{ page.url | prepend: site.baseurl }}" style="color: var(--req-text-color);">{{ page.title }}</a>
{% else %}
{{ page.title }}
{% endif %}
</h1>

<ul class="tags">
{% assign tags_num = (page.tags | size) %}
{% if tags_num > 0 %}
<li><i class="fa fa-tags" style="color: var(--req-text-color);"></i></li>
{% endif %}
{% for tag in page.tags %}
<li>
<a class="tag" href="{{ '/tag-' | append: tag | prepend: site.baseurl }}" style="color: var(--req-text-color);">#{{ tag }}</a>
</li>
{% endfor %}
</ul>

<div class="clearfix">
<ul class="meta">

{% if page.author %}
<li>
<a href="{{ '/search/?a=' | append: page.author | prepend: site.baseurl }}">
<i class="fa fa-user"></i>
{{ page.author }}
</a>
</li>
{% if page.icons %}
<li>
<ul class="icons">
{% include icons.html icons=page.icons %}
</ul>
</li>
{% endif %}
{% endif %}
</ul>
</div>
</div>


</header>
4 changes: 4 additions & 0 deletions _pages/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
<div id="{{ post.id | replace: '/', '-' }}" style="display: none;">
<div class="article-wrapper">
<article>
{% if post.categories contains "requirements" %}
{% include search-req-header.html page=post link=true share=false %}
{% else %}
{% include article-header.html page=post link=true share=false %}
{% endif %}
</article>
</div>
<hr class="with-no-margin"/>
Expand Down

0 comments on commit d4f4036

Please sign in to comment.