Further refinements and refactoring of QR code display based on feedback from Rebecca
This commit is contained in:
parent
38811be868
commit
fceaaf8aa3
3 changed files with 26 additions and 29 deletions
|
@ -3,7 +3,7 @@
|
|||
<#-- Individual profile page template for foaf:Person individuals -->
|
||||
|
||||
<#include "individual-setup.ftl">
|
||||
<#include "individual-qrCodeFoafPerson.ftl">
|
||||
<#import "individual-qrCodeGenerator.ftl" as qr>
|
||||
|
||||
<section id="individual-intro" class="vcard person" role="region">
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
<li role="listitem"><a title="View this individual in RDF format" class="icon-rdf" href="${rdfUrl}">RDF</a></li>
|
||||
</#if>
|
||||
|
||||
<@qrCode />
|
||||
<@qr.renderCode />
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#include "individual-qrCodeGenerator.ftl">
|
||||
|
||||
<#-- This macro will display a vCard QR code (includes email, phone number, URI, etc)
|
||||
* default display is a small icon that reveals the full QR code when clicked
|
||||
* setting the display to "full" will render a full-size QR code (<@qrCode display="full" />)
|
||||
* the size can be set using the width parameter (default is 125px)
|
||||
-->
|
||||
<#macro qrCode display="icon" width="125">
|
||||
<#if hasValidVCard()>
|
||||
<#assign qrCodeLinkedImage><a title="Export QR codes" href="${individual.doQrData().exportQrCodeUrl}"><@qrCodeVCard qrCodeWidth=width /></a></#assign>
|
||||
|
||||
<#if (display == "full")>
|
||||
<h5 class="qrCode">vCard QR</h5>
|
||||
${qrCodeLinkedImage}
|
||||
<#elseif (display == "icon")>
|
||||
<li role="listitem">
|
||||
<a id="qrIcon" title="vCard QR Code" href="${individual.doQrData().exportQrCodeUrl}"><img class="middle" src="${urls.images}/individual/qr_icon.png" alt="qr icon" /></a>
|
||||
<span id="qrCodeImage" class="hide">${qrCodeLinkedImage} <a class="qrCloseLink" href="#">Close</a></span>
|
||||
</li>
|
||||
<#else>
|
||||
<p class="notice">You have passed an invalid value for the qrCode display parameter.</p>
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
</#macro>
|
|
@ -20,6 +20,30 @@
|
|||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#-- This macro will display a vCard QR code (includes email, phone number, URI, etc)
|
||||
* default display is a small icon that reveals the full QR code when clicked
|
||||
* setting the display to "full" will render a full-size QR code (<@renderCode display="full" />)
|
||||
* the size can be set using the width parameter (default is 125px)
|
||||
-->
|
||||
<#macro renderCode display="icon" width="125">
|
||||
<#if hasValidVCard()>
|
||||
<#assign qrCodeLinkedImage><a title="Export QR codes" href="${individual.doQrData().exportQrCodeUrl}"><@qrCodeVCard qrCodeWidth=width /></a></#assign>
|
||||
|
||||
<#if (display == "full")>
|
||||
<h5 class="qrCode">vCard QR</h5>
|
||||
${qrCodeLinkedImage}
|
||||
<#elseif (display == "icon")>
|
||||
<li role="listitem">
|
||||
<a id="qrIcon" title="vCard QR Code" href="${individual.doQrData().exportQrCodeUrl}"><img class="middle" src="${urls.images}/individual/qr_icon.png" alt="qr icon" /></a>
|
||||
<span id="qrCodeImage" class="hide">${qrCodeLinkedImage} <a class="qrCloseLink" href="#">Close</a></span>
|
||||
</li>
|
||||
<#else>
|
||||
<p class="notice">You have passed an invalid value for the qrCode display parameter.</p>
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
|
||||
|
||||
<#function getQrCodeUrlForVCard qrCodeWidth>
|
||||
|
|
Loading…
Add table
Reference in a new issue