Skip to content

Commit

Permalink
Add inactive text for navbar and home live links
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzschmid committed Dec 8, 2020
1 parent 363631b commit cc0b78d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 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.0)
jekyll-theme-conference (3.0.1)
jekyll (~> 4.0)

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ Links are used at different location throughout the theme: They can either be us
Additionally, a navigation bar or main landing page link can also have the following properties:

- `menu` containing another list of links. This creates a dropdown menu of multiple sublinks. The sublinks have the same properties as regular links, or
- `live` making the link only visible during the conference and adds a live indication. The `name` property can be omitted. If streaming is enabled and any URL property is omitted, a click on the link will open the streaming modal (see section _Live Indications_ above).
- `live` making the link only visible during the conference and adds a live indication. The `name` property can be omitted. Using the optional `name_inactive` property shows a placeholder text while the conference is **not** live. If streaming is enabled and any URL property is omitted, a click on the link will open the streaming modal (see section _Live Indications_ above).

Using the `file:` indicator, the relative address is automatically set as well as the icon. Using the `video:` indicator, the link is automatically configured to open in an iframe with a corresponding title and the icon is set.

Expand Down
8 changes: 8 additions & 0 deletions _includes/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
{%- elsif link.live -%}
{%- include partials/get_live_timestamps.html -%}

{%- if link.name_inactive -%}
<li class="nav-item live-hide" data-start="{{ live_starts }}" data-end="{{ live_ends }}">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">
{{ link.name_inactive }}
</a>
</li>
{%- endif -%}

<li class="nav-item live-show d-none" data-start="{{ live_starts }}" data-end="{{ live_ends }}">
{%- if site.conference.live.streaming %}
<a class="nav-link" title="{% if link.name %}{{ link.name }}{% else %}{{ site.data.lang[site.conference.lang].live.streaming | default: "Live Stream" }}{% endif %}" data-toggle="modal" data-target="#stream-modal" data-room="" href="#">
Expand Down
16 changes: 11 additions & 5 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ <h1 class="display-3">
{% elsif link.live %}
{%- include partials/get_live_timestamps.html -%}

{% if link.name %}
{% assign link_name = link.name %}
{% else %}
{% assign link_name = site.data.lang[site.conference.lang].live.streaming | default: "Live Stream" %}
{% endif %}
{%- if link.name -%}
{%- assign link_name = link.name -%}
{%- else -%}
{%- assign link_name = site.data.lang[site.conference.lang].live.streaming | default: "Live Stream" -%}
{%- endif -%}

{%- if link.name_inactive -%}
<span class="live-hide btn btn-outline-primary btn-lg mt-2 disabled" data-start="{{ live_starts }}" data-end="{{ live_ends }}">
{{ link.name_inactive }}
</span>
{%- endif -%}

<span class="live-show d-none" data-start="{{ live_starts }}" data-end="{{ live_ends }}">
{% if site.conference.live.streaming %}
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.0"
spec.version = "3.0.1"
spec.authors = ["Lorenz Schmid"]
spec.email = ["lorenzschmid@users.noreply.github.com"]

Expand Down

0 comments on commit cc0b78d

Please sign in to comment.