Skip to content

Commit dd5cd58

Browse files
committed
Pass height and width to the image viewer
1 parent c6ecaec commit dd5cd58

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

www/_includes/imagelist.html

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,41 @@
99
</thead>
1010
<tbody>
1111
{% assign sorted_images = page.images | sort %}{% for image in sorted_images %}
12+
{%- capture imagetype %}{{image|split:'-'|last|split:'.'|first}}{% endcapture %}
13+
{%- assign standard = false %}
14+
{%- capture alt_text %}Alternate image for {{page.title}}{% endcapture %}
15+
{%- assign theType = none %}
16+
{%- assign heightWidth = '' %}
17+
{%- for standardtype in site.data.imagetype %}
18+
{%- if standardtype.id == imagetype %}
19+
{%- assign theType = standardtype %}
20+
{%- assign standard = true %}
21+
{%- assign customstyle = standardtype.customstyle %}
22+
{%- capture alt_text %}Vector (.svg) logo for {{page.title}}: {{standardtype.title}}{% endcapture %}
23+
{%- capture heightWidth %}&amp;height={{standardtype.height}}&amp;width={{standardtype.width}}{% endcapture %}
24+
{%- endif %}
25+
{%- endfor %}
1226
<tr>
1327
<td class="d-none d-md-table-cell" style="white-space:nowrap;vertical-align:middle;">
14-
<a class="btn btn-secondary btn-sm" href="{{site.viewer}}?url={{site.production_url}}/logos/{{page.logohandle}}/{{image}}&amp;zoom=max&amp;backUrl={{site.production_url}}/logos/{{page.logohandle}}/index.html&amp;backText=Return+to+VectorLogoZone" title="preview" rel="nofollow"><i class="far fa-eye"></i></a>
28+
<a class="btn btn-secondary btn-sm" href="{{site.viewer}}?url={{site.production_url}}/logos/{{page.logohandle}}/{{image}}&amp;zoom=max&amp;backUrl={{site.production_url}}/logos/{{page.logohandle}}/index.html&amp;backText=Return+to+VectorLogoZone{{heightWidth}}" title="preview" rel="nofollow"><i class="far fa-eye"></i></a>
1529
<a class="btn btn-secondary btn-sm" download="{{image}}" href="{{image}}" title="Download"><i class="fa fa-download"></i></a>
1630
<button class="btn btn-secondary btn-sm copy2cb" data-clipboard-text="{{site.production_url}}/logos/{{page.logohandle}}/{{image}}" href="#" title="Copy URL to Clipboard" rel="nofollow"><i class="far fa-clipboard"></i></button>
1731
<div style="position:relative;display:inline-block;"><button class="btn btn-primary btn-sm copy2tip" style="position:absolute;left:0;right:0;">Copied to Clipboard</button>
1832
<a class="btn btn-secondary btn-sm" href="/util/convert_to_png.html?svg=/logos/{{page.logohandle}}/{{image}}" title="Convert to PNG" rel="nofollow"><i class="fa fa-exchange"></i></a>
1933
</div>
2034
</td>
2135
<td class="d-none d-sm-table-cell" style="white-space:nowrap;vertical-align:middle;">
22-
{%- capture imagetype %}{{image|split:'-'|last|split:'.'|first}}{% endcapture %}
23-
{%- assign standard = false %}
24-
{%- capture alt_text %}Alternate image for {{page.title}}{% endcapture %}
25-
{%- for standardtype in site.data.imagetype %}
26-
{% if standardtype.id == imagetype %}
27-
{{standardtype.title}}
28-
{% capture alt_text %}Vector (.svg) logo for {{page.title}}: {{standardtype.title}}{% endcapture %}
29-
{% assign standard = true %}
30-
{% assign customstyle = standardtype.customstyle %}
31-
{% endif %}
32-
{% endfor %}
33-
{% if standard == false %}
36+
{%- if standard %}
37+
{{theType.title}}
38+
{%- else %}
3439
{{imagetype}}
3540
{% endif %}
3641
{% capture extension %}{{image|split:'.'|last}}{% endcapture %}
3742
{% if extension == 'png' %}
3843
(Raster)
3944
{% endif %}
4045
</td>
41-
<td><a href="{{site.viewer}}?url={{site.production_url}}/logos/{{page.logohandle}}/{{image}}&amp;zoom=max&amp;backUrl={{site.production_url}}/logos/{{page.logohandle}}/index.html&amp;backText=Return+to+VectorLogoZone" rel="nofollow"><img alt="{{alt_text}}" src="{{image}}" style="{% if customstyle%}{{customstyle}}{% else %}height:120px;{% endif %}" /></a></td>
46+
<td><a href="{{site.viewer}}?url={{site.production_url}}/logos/{{page.logohandle}}/{{image}}&amp;zoom=max&amp;backUrl={{site.production_url}}/logos/{{page.logohandle}}/index.html&amp;backText=Return+to+VectorLogoZone{{heightWidth}}" rel="nofollow"><img alt="{{alt_text}}" src="{{image}}" style="{% if customstyle%}{{customstyle}}{% else %}height:120px;{% endif %}" /></a></td>
4247
</tr>
4348
{% endfor %}
4449
</tbody>

0 commit comments

Comments
 (0)