Skip to content

Commit

Permalink
Edited index.html and hero_data..liquid as well as added site-specifi…
Browse files Browse the repository at this point in the history
…c-articles.liquid from the source code of HT Condor. Banners and contents are rotating every week now.
  • Loading branch information
abakirci committed Sep 29, 2023
1 parent abcd61f commit 37eaf9f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
3 changes: 1 addition & 2 deletions _data/people/alperen_bakirci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ title: Student Web Developer
active: green
institution: Morgridge Institute for Research
website:
image: images/team/alperen-bakirci.jpg
presentations:
image: images/team/alperen-bakirci.jpg
20 changes: 18 additions & 2 deletions _includes/get/hero_data.liquid
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{% include get/spotlights.liquid %}
{% assign story_in_array = spotlights | where: "id", "/spotlights/EHT" %}
{% assign hero_data = story_in_array[0] %}

{% assign 3_months_ago = "now" | date: "%s" | minus: 15768000 %}
{% assign features = "" | split : "" %}
{% for feature in spotlights %}
{% assign feature_date = feature.date | date: "%s" | plus: 0 %}
{% if feature_date > 3_months_ago and feature.banner_src != nil %}
{% assign features = features | push: feature %}
{% endif %}
{% endfor %}

{% if features.size == 0 %}
{% assign features = spotlights %}
{% endif %}

{% assign day = "now" | date: "%e" | plus: 1 %}
{% assign index = day | modulo: features.size %}

{% assign hero_data = features[index] %}
1 change: 1 addition & 0 deletions _includes/get/site-specific-articles.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% assign site-specific-articles = site.spotlights | where_exp: "featured-user", "featured-user.publish_on contains site.key" | sort: "date" | reverse %}
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
css_extension:
- href: "/assets/css/homepage.css"
---

{% include /get/hero_data.liquid %}
<div id="hero-image" class="vh-75 vh-md-50">
<div class="container-xxl">
<div class="row justify-content-end">
{% if hero_data.additional_image %}
<div class="col-12 col-sm-10 col-md-6 col-xxl-7 col- d-flex order-md-2">
<img class="img-fluid pt-3 pt-lg-0" src="{{ hero_data.additional_image.src | relative_url }}" alt="{{ hero_data.additional_image.alt }}" />
</div>
{% endif %}
<div class="col-12 col-md-5 col-xxl-5">
{% include /get/hero_data.liquid %}
<div class="p-3 mb-3 mt-4 d-flex flex-column" id="hero-content-container">
<h3 class="text-white">{{ hero_data.title }}</h3>
<hr>
Expand Down
1 change: 1 addition & 0 deletions osg-htc.github.io
Submodule osg-htc.github.io added at b0cba6

0 comments on commit 37eaf9f

Please sign in to comment.