Skip to content

Update publications page to include teaser image #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description : &description "Associate Professor at University of Ne
url : https://scottbateman.github.io # the base hostname & protocol for your site e.g. "https://mmistakes.github.io"
baseurl : "" # the subpath of your site, e.g. "/blog"
repository : "scottbateman/scottbateman.github.io"
teaser : # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png"
teaser : "2019-01-01.png"
breadcrumbs : false # true, false (default)
words_per_minute : 160
future : true
Expand Down
72 changes: 38 additions & 34 deletions _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,56 @@
{% endif %}

<div class="{{ include.type | default: "list" }}__item">
<article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
<article style="display: flex;" class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
{% if teaser %}
<div style="margin-right: 32px;">
<img src="{{ teaser | prepend: "/images/" | prepend: base_path }}" alt="" width="128px">
</div>
{% endif %}
{% if include.type == "grid" and teaser %}
<div class="archive__item-teaser">
<!-- <div class="archive__item-teaser">
<img src=
{% if teaser contains "://" %}
"{{ teaser }}"
{% else %}
"{{ teaser | prepend: "/images/" | prepend: base_path }}"
{% endif %}
alt="">
</div>
</div> -->
{% endif %}
<div style="width: 70%;">
<h2 style="text-decoration: none;" class="archive__item-title" itemprop="headline">
{% if post.link %}
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ base_path }}{{ post.url }}" rel="permalink"><i class="fa fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
{% else %}
<a style="color: inherit; text-decoration: none;" href="{{ base_path }}{{ post.url }}" rel="permalink">{{ title }}</a>
{% endif %}
</h2>

<h2 class="archive__item-title" itemprop="headline">
{% if post.link %}
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ base_path }}{{ post.url }}" rel="permalink"><i class="fa fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
{% else %}
<a href="{{ base_path }}{{ post.url }}" rel="permalink">{{ title }}</a>
{% if post.read_time %}
<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>
{% endif %}
</h2>

{% if post.read_time %}
<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>
{% endif %}

{% if post.collection == 'teaching' %}
<p> {{ post.type }}, <i>{{ post.venue }}</i>, {{ post.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif post.collection == 'publications' %}
<p>Published in <i>{{ post.venue }}</i>, {{ post.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif post.date %}
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ post.date | default: "1900-01-01" | date_to_xmlschema }}">{{ post.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
{% endif %}

{% if post.excerpt and site.read_more != 'enabled' %}
<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify }}</p>
{% elsif post.excerpt and site.read_more == 'enabled' %}
<p class="archive__item-excerpt" itemprop="description"><p>{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}<strong><a href="{{ base_path }}{{ post.url }}" rel="permalink"> Read more</a></strong></p></p>
{% endif %}

{% if post.citation and post.paperurl %}
<p>Recommended citation: {{ post.citation }} <a href="{{ post.paperurl }}"><u>{{ post.paperurl }}</u></a></p>
{% elsif post.citation %}
<p>Recommended citation: {{ post.citation }} </p>
{% elsif post.paperurl %}
<p>Download <a href=" {{ post.paperurl }} "><u>here</u></a></p>
{% endif %}
{% if post.collection == 'teaching' %}
<p> {{ post.type }}, <i>{{ post.venue }}</i>, {{ post.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif post.collection == 'publications' %}
<p>Published in <i>{{ post.venue }}</i>, {{ post.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif post.date %}
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ post.date | default: "1900-01-01" | date_to_xmlschema }}">{{ post.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
{% endif %}

{% if post.excerpt and site.read_more != 'enabled' %}
<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify }}</p>
{% elsif post.excerpt and site.read_more == 'enabled' %}
<p class="archive__item-excerpt" itemprop="description"><p>{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}<strong><a href="{{ base_path }}{{ post.url }}" rel="permalink"> Read more</a></strong></p></p>
{% endif %}
<!-- {% if post.citation and post.paperurl %}
<p>Recommended citation: {{ post.citation }} <a href="{{ post.paperurl }}"><u>{{ post.paperurl }}</u></a></p>
{% elsif post.citation %}
<p>Recommended citation: {{ post.citation }} </p>
{% elsif post.paperurl %}
<p>Download <a href=" {{ post.paperurl }} "><u>here</u></a></p>
{% endif %} -->
</div>
</article>
</div>
2 changes: 1 addition & 1 deletion _pages/publications.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Publications"
permalink: /publications/
author_profile: true
---
# Publications
<!-- # Publications -->
{% if author.googlescholar %}
You can also find my articles on <u><a href="{{author.googlescholar}}">my Google Scholar profile</a>.</u>
{% endif %}
Expand Down
Binary file added images/2019-01-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.