Fix some card stuff.

master
Max Willsey 7 years ago
parent 229d1a5414
commit 27d79c7d07

@ -14,7 +14,7 @@
{% if post.shortnews %} {% if post.shortnews %}
{{ post.content | remove: '<p>' | remove: '</p>' }} {{ post.content | remove: '<p>' | remove: '</p>' }}
{% else %} {% else %}
<h4> <a href="{{ site.base }}{{ post.url }}"> {{ post.title }}</a> </h4> <h5> <a href="{{ site.base }}{{ post.url }}"> {{ post.title }} </a> </h5>
{{ post.excerpt | remove: '<p>' | remove: '</p>' }} {{ post.excerpt | remove: '<p>' | remove: '</p>' }}
<br> <br>
<a href="{{ site.base }}{{ post.url }}"> Read more &raquo;</a> <a href="{{ site.base }}{{ post.url }}"> Read more &raquo;</a>

@ -13,11 +13,17 @@ text-decoration hack is for Safari. We don't SVGs to be underlined.
{% if person.image %} {% if person.image %}
{% capture image %} {% capture image %}
<img class="rounded-circle profile" src="{{ site.base }}{{ person.image }}" /> <img class="rounded-circle profile"
alt="{{ person.display_name }}"
title="{{ person.display_name }}"
src="{{ site.base }}{{ person.image }}" />
{% endcapture %} {% endcapture %}
{% else %} {% else %}
{% capture image %} {% capture image %}
<svg class="profile noprofile" viewBox="0 0 100 100"> <svg class="profile noprofile"
alt="{{ person.display_name }}"
viewBox="0 0 100 100">
<title>{{ person.display_name }}</title>
<circle r="50" cx="50" cy="50" /> <circle r="50" cx="50" cy="50" />
<text x="50" y="50" <text x="50" y="50"
font-size="70" font-size="70"

@ -33,7 +33,7 @@ there by default by Bootstrap columns.
{% include person-image.html person=person %} {% include person-image.html person=person %}
</div> </div>
<div class="col pl-0"> <div class="col pl-0">
<h4> {{ name }} </h4> <h6 class="person-name"> {{ name }} </h6>
{% if person.bio %} {% if person.bio %}
<div class="bio">{{person.bio}}</div> <div class="bio">{{person.bio}}</div>
{% endif %} {% endif %}

@ -1,7 +1,13 @@
{% assign project = include.project %} {% assign project = include.project %}
{% capture card-content %} {% if project.link %}
{% assign proj-url = project.link %}
{% else %}
{% capture proj-url %}{{site.base}}{{project.url}}.html{% endcapture %}
{% endif %}
<div class="card">
<div class="card-body"> <div class="card-body">
{% if project.image %} {% if project.image %}
{% assign imgurl = project.image %} {% assign imgurl = project.image %}
@ -9,14 +15,26 @@
{% if init == "/" %} {% if init == "/" %}
{% capture imgurl %}{{site.base}}{{project.image}}{% endcapture %} {% capture imgurl %}{{site.base}}{{project.image}}{% endcapture %}
{% endif %} {% endif %}
<a href="{{ proj-url }}">
<img class="img-fluid mb-3" src="{{imgurl}}" alt="{{project.title}}"/> <img class="img-fluid mb-3" src="{{imgurl}}" alt="{{project.title}}"/>
</a>
{% endif %} {% endif %}
{% if project.notitle != true %} {% if project.notitle != true %}
<h3 class="card-title">{{project.title}}</h3> <h4 class="card-title">
{{ project.title }}
</h4>
{% endif %}
{% if project.subtitle != null and project.subtitle != "" %}
<h6 class="card-subtitle mb-2 text-muted">
{{ project.subtitle }}
</h6>
{% endif %} {% endif %}
<div class="card-text"> <div class="card-text">
{{ project.description | markdownify }} {{ project.description | markdownify }}
</div> </div>
{% if project.no-link != true or project.link %}
<a href="{{ proj-url }}"> Read more &raquo;</a>
{% endif %}
</div> </div>
{% if project.people %} {% if project.people %}
<div class="card-footer d-flex flex-row flex-wrap justify-content-center"> <div class="card-footer d-flex flex-row flex-wrap justify-content-center">
@ -28,22 +46,4 @@
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
{% endcapture %} </div>
{% if project.link %}
{% assign proj-url = project.link %}
{% else %}
{% capture proj-url %}{{site.base}}{{project.url}}.html{% endcapture %}
{% endif %}
{% if proj-url %}
<div class="card link">
<a href="{{proj-url}}">
{{ card-content }}
</a>
</div>
{% else %}
<div class="card">
{{ card-content }}
</div>
{% endif %}

@ -1,10 +1,10 @@
--- ---
title: Project with a Longer Title title: Project with a Longer Title
subtitle: And a subtitle
description: | description: |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut hendrerit blandit This project has a long title, but no other content.
varius. Pellentesque habitant morbi tristique senectus et netus et malesuada Setting the `no-link` property means that there's no link.
fames ac turpis egestas.
people: people:
- storm - storm
@ -14,30 +14,5 @@ people:
- wolverine - wolverine
layout: project layout: project
no-link: true
--- ---
Proin massa augue, eleifend non ultricies eget, feugiat ut nisl. Fusce at
aliquet justo, id elementum lacus. Praesent eleifend tempus molestie. Nunc
vulputate sed tortor a ultrices. Nullam blandit hendrerit nisi, at suscipit
augue ultricies quis. Nulla tincidunt rhoncus nisl sed consectetur. Phasellus
dapibus, leo in varius tempus, nibh velit tincidunt lacus, ut porta eros ex et
eros. Ut diam purus, sagittis vitae cursus eu, molestie eget turpis. Sed
consectetur magna in posuere faucibus. Morbi nibh eros, blandit ut vehicula ac,
pellentesque ut urna.
Maecenas scelerisque ut enim non convallis. Mauris ut nisl vitae mi dictum
mollis. Pellentesque iaculis lacinia nisl viverra laoreet. Integer ac lacus quis
elit varius mollis et ultrices tortor. Aliquam id dolor cursus, sagittis arcu
tincidunt, scelerisque nisi. Morbi scelerisque feugiat mi in faucibus. Maecenas
suscipit aliquet est et efficitur. Nullam sed purus nec nulla placerat ultrices
ac at ipsum. Mauris a imperdiet eros.
Aenean malesuada tellus nulla, ut ultrices purus dictum et. Nunc non eleifend
nulla, ut luctus nulla. Nulla et accumsan odio. Fusce libero nisl, rutrum ac
risus sit amet, interdum feugiat eros. Morbi semper scelerisque magna vel
malesuada. Curabitur in blandit orci. Cras eu tincidunt odio. Sed consectetur
nunc purus, id pharetra felis fermentum vitae. Sed rhoncus lacus lacus. Aenean a
ante et quam viverra pharetra interdum id ligula. Vestibulum lobortis ipsum ac
risus sagittis, non dapibus metus finibus. Quisque efficitur felis sed felis
luctus, non egestas ex dapibus. Sed pharetra gravida augue, id posuere nunc
fringilla eget.

@ -106,14 +106,6 @@ section {
.card { .card {
&.link:hover { border-color: $gray }
> a {
color: inherit;
&:hover { text-decoration: none }
}
.profile { .profile {
height: 40px; height: 40px;
width: 40px; width: 40px;
@ -135,6 +127,10 @@ section {
.bio { .bio {
color: $gray; color: $gray;
} }
.person-name {
margin: 0;
}
} }
.person-without-image { .person-without-image {

Loading…
Cancel
Save