blob: 68f25be628773da3446862544c2a644feb5259db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{%- set_global bg = " " %}
{%- set_global bgname = " " %}
{%- for source in sources %}
{%- set sourcename = source | split(pat=".") | first %}
{%- if loop.first %}
{%- set_global bg = source %}
{%- set_global bgname = source | split(pat=".") | first %}
{%- else %}
<div id="{{ sourcename }}">## {{ sourcename }} </div>
<a onmouseover="document.getElementById('{{ sourcename }}').innerHTML='{{ bgname }}';" onmouseout="document.getElementById('{{ sourcename }}').innerHTML='{{ sourcename }}';" href="#"><div id="{{ sourcename }}image"> </div></a>
{%- endif %}
{%- endfor %}
<style>
{%- for source in sources %}
{%- set sourcename = source | split(pat=".") | first %}
{%- if not loop.first %}
#{{ sourcename | safe }}image {
background-image: url('{{ get_url(path="/", trailing_slash=false) }}{{ page.path | safe }}{{ source | safe }}');
width: 560px;
height: 650px;
}
#{{ sourcename | safe }}image:hover {
background-image: url('{{ get_url(path="/", trailing_slash=false) }}{{ page.path | safe }}{{ bg | safe }}');
}
{%- endif %}
{%- endfor %}
</style>
|