Skip to content
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

Squared images #7

Merged
merged 3 commits into from
Aug 18, 2020
Merged
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: 2 additions & 0 deletions content/team/eric-ma/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ twitter_url: https://twitter.com/ericmjl
linkedin_url: https://www.linkedin.com/in/ericmjl/
---
specializations: Deep learning, Graph theory, Bayesian statistics
---
personal_url: https://ericmjl.github.io/
43 changes: 35 additions & 8 deletions templates/macros/teammate.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{% macro render_teammate_card(teammate) %}
<style>
.image-force-square {
width: 10vw;
height: 10vw;
object-fit: cover;
}

.img-center {
display: block;
margin: 0 auto;
}

</style>
<div class="col-md-3 mb-5">
<div class="card border-light h-100">
<a href="{{ teammate._slug }}/">
<img class="img-round card-img-top" src="{{ teammate.picture }}" alt="">
</a>
<div class="card-body">
<a href="{{ teammate._slug }}/">
<img class="img-round card-img-top image-force-square img-center " src="{{ teammate.picture }}" alt="">
</a>
<h4 class="card-title text-center">{{ teammate.name }}</h4>
</div>
<div class="card-footer text-center">
Expand Down Expand Up @@ -38,14 +51,28 @@ <h4 class="card-title text-center">{{ teammate.name }}</h4>


{% macro render_teammate_page(teammate) %}
<div class="col-md-6 mb-5">
<style>
.image-force-square {
width: 100%;
height: 100%;
object-fit: cover;
justify-content: center;
}

.center {
display: block;
margin: 0 auto;
}

</style>
<div class="col-md-4 mb-5">
<div class="card border-light h-100">
<a href="{{ teammate.slug }}">
<img class="img-round card-img-top" src="{{ teammate.picture }}" alt="">
</a>
<div class="card-body">
<h4 class="card-title text-center">{{ teammate.name }}</h4>
<div class="center">
<img class="img-round card-img-top image-force-square" src="{{ teammate.picture }}" alt="">
</div>

<h4 class="card-title text-center">{{ teammate.name }}</h4>
{%if teammate.blurb %}
<p>{{ teammate.blurb }}</p>
{% endif %}
Expand Down