Skip to content

Commit

Permalink
Merge pull request uwdub#136 from fcjou/calendar
Browse files Browse the repository at this point in the history
More Tweaks/Fixes to Calendar/Seminar Pages
  • Loading branch information
jayfo committed Jan 1, 2016
2 parents 9b2bf29 + 25b21be commit d8a1ba0
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 99 deletions.
30 changes: 23 additions & 7 deletions _includes/seminartable.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,31 @@
</a>
</h4>
</div>
{% for item_speaker in item_publish_speakers %}
{% assign item_affiliations = '' | split: ',' %}
{% if item_publish_speakers && item_publish_speakers.size > 0 %}
{% for item_speaker in item_publish_speakers %}
{% assign item_affiliations = item_affiliations | push: item_speaker.affiliation | uniq %}
{% endfor %}
{% endif %}
{% for item_affiliation in item_affiliations %}
{% assign item_affiliation_names = '' | split: ' ' %}
{% for item_speaker in item_publish_speakers %}
{% if item_speaker.affiliation == item_affiliation %}
{% assign item_full_name = '' %}
{% for item_name in item_speaker.name offset: 1 %}
{% assign item_full_name = item_full_name | append: ' ' | append: item_name %}
{% if forloop.last %}
{% assign item_full_name = item_full_name | append: ' ' | append: item_speaker.name[0] %}
{% endif %}
{% endfor %}
{% assign item_affiliation_names = item_affiliation_names | push: item_full_name %}
{% endif %}
{% endfor %}
<div class="col-xs-12">
{% for item_name in item_speaker.name offset:1 %}
{{ item_name }}
{% endfor %}
{{ item_speaker.name[0] }}
{{ item_affiliation_names | join: ', ' }}
</div>
<div class="col-xs-12">
{{ item_speaker.affiliation }}
<div class="text-muted col-xs-12">
{{ item_affiliation }}
</div>
{% endfor %}
</div>
Expand Down
47 changes: 0 additions & 47 deletions _includes/seminartableprevious.md

This file was deleted.

130 changes: 89 additions & 41 deletions _layouts/seminar.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,51 +28,99 @@ <h1>Seminar</h1>
<div class="col-md-12">
<div class="row">
<div class="col-md-4 col-md-push-8">
<a href="/calendar.html" class="list-group-item">Upcoming Seminars</a>
<a href="/previousseminars.html" class="list-group-item">Previous Seminars</a>
<ul id="seminar-tabs" class="nav nav-pills nav-stacked" data-tabs="tabs">
<li><a href="../../calendar.html#tab_seminars_upcoming">Upcoming Seminars</a></li>
<li><a href="../../calendar.html#tab_seminars_previous">Previous Seminars</a></li>
</ul>
</div>
<div class="col-md-6 col-md-pull-2">
<h4>Title</h4>
{{ item_seminar.title }}
{% if item_seminar.name.size > 1 %}
<h4>Speakers</h4>
<div class="col-md-2 col-md-pull-4">
<div class="col-xs-12">
<h3>Date</h3>
{{ item_seminar.date | date: '%b %d, %Y'}}
</div>
<div class="col-xs-12">
<h3>Time</h3>
{{ item_seminar.time }}
</div>
<div class="col-xs-12">
<h3>Location</h3>
{{ item_seminar.location }}
</div>
</div>
<div class="col-md-6 col-md-pull-4">
{% if item_seminar.tbd %}
{% assign item_publish_speakers = null %}
{% assign item_publish_title = "TBD" %}
{% assign item_publish_abstract = null %}
{% assign item_publish_bio = null %}
{% assign item_publish_video = null %}
{% else %}
<h4>Speaker</h4>
{% assign item_publish_speakers = item_seminar.speakers %}
{% assign item_publish_title = item_seminar.title %}
{% assign item_publish_abstract = item_seminar.abstract %}
{% assign item_publish_bio = item_seminar.bio %}
{% assign item_publish_video = item_seminar.video %}
{% endif %}
{% for item_names in item_seminar.name %}
{% for item_name in item_names offset: 1 %}
{{ item_name }}
{% endfor %}
{% if forloop.last %}
{{ item_names[0] }}
{% else %}
{{ item_names[0] | append:',' }}
<div class="col-xs-12">
<h3>Title</h3>
{{ item_publish_title }}
</div>
<div class="col-xs-12">
{% if item_publish_speakers %}
{% if item_publish_speakers.size > 1 %}
<h3>Speakers</h3>
{% else %}
<h3>Speaker</h3>
{% endif %}
{% if item_publish_speakers.size > 0 %}
{% assign item_affiliations = '' | split: ',' %}
{% for item_speaker in item_seminar.speakers %}
{% assign item_affiliations = item_affiliations | push: item_speaker.affiliation | uniq %}
{% endfor %}
{% endif %}
{% for item_affiliation in item_affiliations %}
{% assign item_affiliation_names = '' | split: ' ' %}
{% for item_speaker in item_seminar.speakers %}
{% if item_speaker.affiliation == item_affiliation %}
{% assign item_full_name = '' %}
{% for item_name in item_speaker.name offset: 1 %}
{% assign item_full_name = item_full_name | append: ' ' | append: item_name %}
{% if forloop.last %}
{% assign item_full_name = item_full_name | append: ' ' | append: item_speaker.name[0] %}
{% endif %}
{% endfor %}
{% assign item_affiliation_names = item_affiliation_names | push: item_full_name %}
{% endif %}
{% endfor %}
<div>
{{ item_affiliation_names | join: ', ' }}
</div>
<div class="text-muted">
{{ item_affiliation }}
</div>
{% endfor %}
{% endif %}
{% endfor %}
<h4>Affiliation</h4>
{{ item_seminar.affiliation }}
</div>
<div class="col-md-2 col-md-pull-10">
<h4>Date</h4>
{{ item_seminar.date | date: '%b %d, %Y'}}
<h4>Time</h4>
{{ item_seminar.time }}
<h4>Location</h4>
{{ item_seminar.location }}
</div>
</div>
<div class="row">
<div class="col-md-6 col-md-push-2">
<h4>Abstract</h4>
{{ item_seminar.abstract }}
<h4>Bio</h4>
{{ item_seminar.bio }}
{% assign video_id = item_seminar.video %}
{% assign video_size = video_id.size %}
{% if video_size > 0 %}
<h4>Video</h4>
{% vimeo video_id %}
{% endif %}
</div>
<div class="col-xs-12">
{% if item_publish_abstract.size > 0 %}
<h3>Abstract</h3>
{{ item_publish_abstract }}
{% endif %}
</div>
<div class="col-xs-12">
{% if item_publish_bio.size > 0 %}
<h3>Bio</h3>
{{ item_publish_bio }}
{% endif %}
</div>
<div class="col-xs-12">
{% if item_publish_video.size > 0 %}
<h3>Video</h3>
<div class='embed-container'>
{% vimeo item_publish_video %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
Expand Down
6 changes: 2 additions & 4 deletions _seminars/2015-12-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ abstract: >
especially a number of Puget Sound high schools.
bio: >
Andrew Davidson, HCDE Senior Lecturer (and former high school teacher)
Elena Agapie, HCDE PhD Student
Kiley Sobel, HCDE PhD Student
Emma Rose, UWT Assistant Professor
Andrew Davidson is a HCDE Senior Lecturer and former high school teacher, and Elena Agapie and Kiley Sobel are HCDE PhD
students. Emma Rose is a UWT Assistant Professor.
---
19 changes: 19 additions & 0 deletions css/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,22 @@
{
margin-top: 20px;
}

// Make Vimeo embed responsive
.embed-container
{
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
}

.embed-container iframe, .embed-container object, .embed-container embed
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

0 comments on commit d8a1ba0

Please sign in to comment.