Skip to content

Commit

Permalink
added link and conditional to image
Browse files Browse the repository at this point in the history
  • Loading branch information
romer8 committed Oct 4, 2023
1 parent 4c9a7c1 commit 4b2abc3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions backend/templates/hydroshare_resource_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

.truncate {
position: relative;
max-width:300px;
max-width:350px;
/* need automatic multi-line height */
white-space: nowrap;
overflow: hidden;
Expand All @@ -59,7 +59,15 @@
<div class="card border-light mb-3 w-100" style="max-width:900px;">
<div class="row g-0">
<div class="col-md-4">
<img src="{{ instance.image }}" class="img-fluid rounded-start" alt="...">
{% if instance.web_site_url %}
<a href="{{ instance.web_site_url }}">
<img src="{{ instance.image }}" class="img-fluid rounded-start" alt="...">
</a>
{% else %}
<a href='javascript:void(0)' class='portfolio-link'>
<img src="{{ instance.image }}" class="img-fluid rounded-start" alt="...">
</a>
{% endif %}
</div>
<div class="col-md-8">
<div class="card-body">
Expand All @@ -72,8 +80,6 @@ <h5 class="card-title card-h5">{{ instance.title }}</h5>
</a>
<span><i class="bi bi-chevron-compact-up"></i></span>
</p>


<p class="card-text my-2 fs-6 lh-1.5 fw-light d-flex flex-row justify-content-between w-25" style="max-width:300px;">
{% if instance.github_url %}
<a href="{{ instance.github_url }}" class="text-decoration-none text-secondary" title="github"> <i class="bi bi-github"></i></a>
Expand Down

0 comments on commit 4b2abc3

Please sign in to comment.