Skip to content

Commit

Permalink
image product and fullscreen little update
Browse files Browse the repository at this point in the history
  • Loading branch information
albertcasado authored and bloodbare committed Oct 6, 2014
1 parent 428e9ff commit 07eb762
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 36 deletions.
33 changes: 13 additions & 20 deletions plone/app/contenttypes/browser/templates/image.pt
Expand Up @@ -10,27 +10,20 @@
<metal:content-core fill-slot="content-core">
<metal:block define-macro="content-core"
tal:define="size context/image/getSize">

<a class="discreet"
tal:attributes="href string:${context/@@plone_context_state/object_url}/image_view_fullscreen"
tal:define="scale context/@@images;
img_tag python:scale.scale('image', scale='preview').tag()"
tal:on-error="string: Image cannot be displayed">
<figure class="image-product">
<a class="discreet"
tal:attributes="href string:${context/@@plone_context_state/object_url}/image_view_fullscreen"
tal:define="scale context/@@images;
img_tag python:scale.scale('image', scale='large').tag()"
tal:on-error="string: Image cannot be displayed">
<img tal:replace="structure img_tag" />
<br />
<span class="visualNoPrint">
<img src="" alt="" tal:replace="structure context/search_icon.png" />
<span i18n:translate="label_click_to_view_full_image">Click to view full-size image&hellip;</span>
</span>
</a>

<span class="discreet visualNoPrint">
&mdash;
<span i18n:translate="label_size">Size</span>:
<span tal:replace="python:size/1024">
File size
</span>KB
</span>

<figcaption class="discreet">
<strong class="sr-only" i18n:translate="label_click_to_view_full_image">Click to view full-size image&hellip;</strong>
<span><tal:span i18n:translate="label_size">Size</tal:span>: <tal:span tal:replace="python:size/1024"> File size </tal:span>KB</span>
</figcaption>
</a>
</figure>
</metal:block>
</metal:content-core>
</body>
Expand Down
38 changes: 22 additions & 16 deletions plone/app/contenttypes/browser/templates/image_view_fullscreen.pt
Expand Up @@ -18,25 +18,27 @@
body {
background-color: white;
color: black;
font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
font-size: 69%;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
padding:0;
margin:0;
}

a {
display:block;
margin: 0.5em;
color: #436976;
text-decoration: underline;
line-height:1.5em;
color: #08c;
text-decoration: none;
text-align:center;
}
a:hover {text-decoration:underline;}
a span {
display:block;
line-height:1.5em;
padding:12px;
}

img {
border: 0px;
padding: 5px;
}

#content-core {
text-align: center;
border: 0;
display:block;
margin:0 auto;
}

</style>
Expand All @@ -50,12 +52,16 @@
<a href=""
tal:attributes="href request/HTTP_REFERER"
tal:condition="request/HTTP_REFERER"
><span i18n:translate="label_back_to_site">Back to site</span><br /><tal:block replace="structure context/@@images/image" /></a>
><span i18n:translate="label_back_to_site">Back to site</span>
<tal:block replace="structure context/@@images/image" />
</a>

<a href=""
tal:attributes="href context/portal_url"
tal:condition="not: request/HTTP_REFERER"
><span i18n:translate="label_home">Home</span><br /><tal:block replace="structure context/@@images/image" /></a>
><span i18n:translate="label_home">Home</span>
<tal:block replace="structure context/@@images/image" />
</a>
</div>

</body>
Expand Down

0 comments on commit 07eb762

Please sign in to comment.