Skip to content

Commit

Permalink
Improve program layout if schedule contains only few tracks (rooms)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzschmid committed Dec 14, 2020
1 parent cc0b78d commit 7205dfc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
jekyll-theme-conference (3.0.1)
jekyll-theme-conference (3.0.2)
jekyll (~> 4.0)

GEM
Expand Down
22 changes: 11 additions & 11 deletions _layouts/program.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ <h1 class="display-5 {% if nbr_days > 1 -%} mb-2 {%- else -%} mb-4 {%- endif %}"
{%- endif %}

<div class="sticky-top syncscroll overflow-hidden" name="sync-table">
<table class="table mb-0">
<table class="table mb-0 mx-auto">
<thead>
<tr>
<th scope="col" class="text-right">#<span class="invisible">I0</span></th>
<th class="p-0" scope="col"></th>
<th scope="col" class="col-title text-right">#<span class="invisible">I0</span></th>
<th class="col-space p-0" scope="col"></th>
{%- assign nbr_rooms = d.rooms | size -%}
{%- for r in d.rooms -%}
{%- assign room = site.rooms | where: 'name', r.name | first %}
Expand All @@ -48,7 +48,7 @@ <h1 class="display-5 {% if nbr_days > 1 -%} mb-2 {%- else -%} mb-4 {%- endif %}"
{%- endif -%}
</th>
{%- unless forloop.last %}
<th class="p-0" scope="col"></th>
<th class="col-space p-0" scope="col"></th>
{%- endunless -%}
{%- endfor %}
</tr>
Expand All @@ -57,7 +57,7 @@ <h1 class="display-5 {% if nbr_days > 1 -%} mb-2 {%- else -%} mb-4 {%- endif %}"
</div>

<div class="syncscroll overflow-y-hidden" name="sync-table">
<table class="table">
<table class="table mx-auto">
<tbody>
{%- include partials/get_day_time.html -%}

Expand Down Expand Up @@ -85,17 +85,17 @@ <h1 class="display-5 {% if nbr_days > 1 -%} mb-2 {%- else -%} mb-4 {%- endif %}"
<tr>

{%- if current_min == 0 -%}
<th scope="row" class="text-right" style="z-index: {{ z-index-max }}">
<th scope="row" class="col-title text-right" style="z-index: {{ z-index-max }}">
{{- current_time -}}
</th>
{%- elsif site.conference.program.show_alltimes -%}
<th scope="row" class="text-right text-muted font-weight-normal" style="z-index: {{ z-index-max }}">
<th scope="row" class="col-title text-right text-muted font-weight-normal" style="z-index: {{ z-index-max }}">
:{{ current_min }}
</th>
{%- else -%}
<th scope="row" style="z-index: {{ z-index-max }}"></th>
<th scope="row" class="col-title" style="z-index: {{ z-index-max }}"></th>
{%- endif %}
<td class="p-0"></td>
<td class="col-space p-0"></td>

{%- for r in d.rooms -%}
{%- assign room = site.rooms | where: 'name', r.name | first -%}
Expand Down Expand Up @@ -135,7 +135,7 @@ <h1 class="display-5 {% if nbr_days > 1 -%} mb-2 {%- else -%} mb-4 {%- endif %}"

{%- assign talk_nbr_steps = talk_duration_min | divided_by: site.conference.program.time_steps -%}
{%- include partials/get_main_category.html -%}
<td rowspan="{{ talk_nbr_steps }}" class="alert alert-{{ main_cat_color }} shadow-sm" style="z-index: {{ z-index-max | minus: i }}">
<td rowspan="{{ talk_nbr_steps }}" class="alert alert-{{ main_cat_color }} shadow-sm overflow-hidden" style="z-index: {{ z-index-max | minus: i }}">

{%- assign live_button_styleclass = "mb-2" %}
{%- include partials/show_live_button.html %}
Expand All @@ -161,7 +161,7 @@ <h1 class="display-5 {% if nbr_days > 1 -%} mb-2 {%- else -%} mb-4 {%- endif %}"
{%- endunless -%}

{%- if forloop.last != true %}
<td class="p-0"></td>
<td class="col-space p-0"></td>
{%- endif -%}

{%- endfor %}
Expand Down
20 changes: 11 additions & 9 deletions _sass/conference.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,24 @@ ul.btn-group {
// First row defines width for all columns
table-layout: fixed;

// Table width
min-width: 100%;
// Columns define table width
width: auto;

// Column widths
tr {
th, td {
// Width of columns with content (default)
width: 220px;
min-width: 220px;

// Spacing between columns
> :nth-child(even) {
&.col-space {
width: 10px;
}
// Width of columns with content
> :nth-child(odd) {
width: 180px;
min-width: 10px;
}
// Width of first column containing timestamps
> :nth-child(1) {
&.col-title {
width: 4.5em;
min-width: 4.5em;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion jekyll-theme-conference.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-conference"
spec.version = "3.0.1"
spec.version = "3.0.2"
spec.authors = ["Lorenz Schmid"]
spec.email = ["lorenzschmid@users.noreply.github.com"]

Expand Down

0 comments on commit 7205dfc

Please sign in to comment.