forked from zerostaticthemes/jekyll-serif-theme
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweak tags location on event template
- Loading branch information
1 parent
1523d2d
commit fb72a1f
Showing
4 changed files
with
161 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{% assign title_lower = event.title | downcase %} | ||
{% assign event_image = event.image %} | ||
{% if event.path %} | ||
{% capture event_path %}{% link {{event.path}} %}{% endcapture %} | ||
{% else %} | ||
{% assign event_path = false %} | ||
{% endif %} | ||
{% if event.image %} | ||
{% assign event_image = event.image %} | ||
{% else %} | ||
{% assign event_image = false %} | ||
{% endif %} | ||
|
||
{% unless event_path %} | ||
{% if event.url %} | ||
{% assign event_path = event.url %} | ||
{% endif %} | ||
{% endunless %} | ||
|
||
{% unless event_path %} | ||
{% if title_lower contains "bdsi walk-in hour" %} | ||
{% capture event_path %}{% link research.html %}#walk-in-hours{% endcapture %} | ||
{% assign event_image = "assets/images/open-hour-header.png" %} | ||
{% endif %} | ||
{% endunless %} | ||
|
||
{% unless event_path %} | ||
{% for community in site.communities %} | ||
{% for keyword in community.keywords %} | ||
{% assign keyword_lower = keyword | downcase %} | ||
{% if title_lower contains keyword_lower %} | ||
{% capture event_path %}{% link {{ community.path }} %}{% endcapture %} | ||
{% assign event_image = event.image | default: community.image %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endunless %} | ||
|
||
{% unless event_path %} | ||
{% assign event_path = "#" %} | ||
{% endunless %} | ||
|
||
{% unless event_image %} | ||
{% if event.img_url %} | ||
{% assign event_image = event.img_url %} | ||
{% elsif event.image %} | ||
{% capture event_image %}{% link {{event.image}} %}{% endcapture %} | ||
{% endif %} | ||
{% endunless %} | ||
|
||
{% unless event_image %} | ||
{% assign event_image = "assets/images/calendar-blank.png" %} | ||
{% endunless %} | ||
|
||
|
||
<a href="{{event_path}}" title="{{event.title}}" class="event-item"> | ||
<div class="event-item-image-wrapper"> | ||
<img src="{{event_image}}" alt="{{event.image_alt}}" class="event-item-image"> | ||
</div> | ||
<div class="event-item-content"> | ||
<div class="event-item-date-row"> | ||
{% if event.source %} | ||
<div class="event-tags"> | ||
<div class="event-item-tag">{{event.source}}</div> | ||
</div> | ||
{% endif %} | ||
<div class="event-item-date small text-muted"> | ||
{% include datetime.html page=event %} | ||
</div> | ||
</div> | ||
<h3 class="event-item-title h5">{{event.title}}</h3> | ||
</div> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
@use "../variables"; | ||
|
||
a.event-item { | ||
text-decoration: unset; | ||
color: unset; | ||
|
||
&:hover, &:focus { | ||
text-decoration: unset; | ||
filter: unset; | ||
} | ||
} | ||
|
||
.event-item { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
margin-bottom: 1em; | ||
|
||
.event-item-image-wrapper { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
flex: 0 0 auto; | ||
height: 64px; | ||
width: 64px; | ||
overflow: hidden; | ||
border-radius: 4px; | ||
background-color: #ddd; | ||
} | ||
|
||
.event-item-image { | ||
margin-bottom: 1em; | ||
height: 100%; | ||
width: 100%; | ||
object-fit: cover; | ||
transition: transform 0.3s; | ||
} | ||
|
||
&:hover .event-item-image { | ||
transform: scale(1.1); | ||
} | ||
|
||
.event-item-title { | ||
margin: 0; | ||
} | ||
|
||
.event-item-date-row { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
gap: 0.5em; | ||
|
||
align-content: center; | ||
align-items: baseline; | ||
} | ||
|
||
.event-item-tags { | ||
display: flex; | ||
flex-flow: row wrap; | ||
width: 100%; | ||
gap: 0.2em; | ||
flex-grow: 0; | ||
flex-basis: content; | ||
} | ||
|
||
.event-item-content { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
justify-content: flex-start; | ||
padding: 0 0.5em; | ||
} | ||
|
||
.event-item-tag { | ||
padding: 0.4em 0.6em 0.2em; | ||
border-radius: 4px; | ||
text-transform: uppercase; | ||
|
||
color: $dark; | ||
font-size: 70%; | ||
font-weight: lighter; | ||
background-color: #eee; | ||
|
||
white-space: nowrap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters