Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make banner clickable #170

Merged
merged 6 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _exhibits/a.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ut eleifend lacus at erat efficitur bibendum. Ut laoreet elit nec dolor molestie
Nam velit leo, mattis ac dui non, vulputate porttitor sapien. Praesent in aliquet dui. Nulla facilisi. Maecenas nulla ex, facilisis non aliquet ac, ultrices eu sem. Sed vel aliquet urna. Mauris quis ex at lectus iaculis elementum id id massa. Integer luctus nulla vel tellus rutrum, ac pulvinar erat finibus. Aliquam erat volutpat. Pellentesque vel velit sit amet mauris dignissim feugiat.


{% include parallax_image.html collection='qatar' pid='obj12' y='50%' %}
{% include parallax_image.html collection='qatar' pid='obj12' y='50%' clickable='true' %}


Duis commodo ligula libero, a pharetra ligula posuere sit amet. Sed ipsum dolor, elementum eget nisl eget, sagittis vestibulum augue. Donec tincidunt mauris et nunc sagittis, nec consectetur lorem tristique. Nulla tincidunt magna ut ullamcorper consectetur. Nulla mi urna, feugiat sed massa non, ullamcorper efficitur dolor.[^2] Sed luctus, massa eget pharetra posuere, nibh sem eleifend lectus, lobortis molestie ante libero non metus. Aenean et est sit amet est pulvinar convallis vel non tortor. Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.
Expand All @@ -26,4 +26,4 @@ Duis finibus leo non velit viverra tincidunt. Fusce efficitur laoreet convallis.

[^1]: Integer eu augue elementum, venenatis nisi vitae, ultrices magna. Nunc accumsan sem quis tristique iaculis. Quisque sed lorem tortor.

[^2]: Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.
[^2]: Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.
2 changes: 1 addition & 1 deletion _exhibits/b.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Ut eleifend lacus at erat efficitur bibendum. Ut laoreet elit nec dolor molestie

Nam velit leo, mattis ac dui non, vulputate porttitor sapien. Praesent in aliquet dui. Nulla facilisi. Maecenas nulla ex, facilisis non aliquet ac, ultrices eu sem. Sed vel aliquet urna. Mauris quis ex at lectus iaculis elementum id id massa. Integer luctus nulla vel tellus rutrum, ac pulvinar erat finibus. Aliquam erat volutpat. Pellentesque vel velit sit amet mauris dignissim feugiat.

{% include inline_image.html collection='qatar' pid='obj7' %}
{% include inline_image.html collection='qatar' pid='obj7' clickable='true' %}

Duis commodo ligula libero, a pharetra ligula posuere sit amet. Sed ipsum dolor, elementum eget nisl eget, sagittis vestibulum augue. Donec tincidunt mauris et nunc sagittis, nec consectetur lorem tristique. Nulla tincidunt magna ut ullamcorper consectetur. Nulla mi urna, feugiat sed massa non, ullamcorper efficitur dolor. Sed luctus, massa eget pharetra posuere, nibh sem eleifend lectus, lobortis molestie ante libero non metus. Aenean et est sit amet est pulvinar convallis vel non tortor. Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.

Expand Down
12 changes: 10 additions & 2 deletions _includes/parallax_image.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@
{%- capture style -%}
background-image: url('{{ image | absolute_url }}');
background-position: 0% {{ include.y | default: '15%' }};

{% if include.clickable %}
cursor: pointer;
{% endif %}
{% if include.height %}
height: {{ include.height }} !important;
{% endif %}
{%- endcapture -%}

{%- capture onclick -%}
{% if include.clickable %}
onclick="window.location='{{ item.url | absolute_url }}'; return false;"
{% endif %}
{%- endcapture -%}

<div class='wax-parallax full-width {% if page.banner %}top-banner{% else %}inline-parallax{% endif %}'>
<div class='parallax-image' style="{{ style | strip }}"></div>
<div class='parallax-image' style="{{ style | strip }}" {{ onclick | strip }}></div>

{% if item.label %}
<div class='parallax-caption'>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% if page.banner %}
{% assign b = page.banner %}
{% include parallax_image.html collection=b.collection pid=b.pid y=b.y height=b.height image=b.image %}
{% include parallax_image.html collection=b.collection pid=b.pid y=b.y height=b.height image=b.image clickable=b.clickable %}
{% endif %}

<div id='wax-main'>
Expand Down
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ banner:
collection: qatar
pid: obj10
y: 25%
clickable: yes
height: '500px'
---

Expand Down