diff --git a/productMods/css/individual/individual-vivo.css b/productMods/css/individual/individual-vivo.css index 3fc2171b..dd75d3bc 100644 --- a/productMods/css/individual/individual-vivo.css +++ b/productMods/css/individual/individual-vivo.css @@ -46,7 +46,6 @@ div.overview-value :last-child { vertical-align: text-top; } - /* <------ POSITIONS */ ul#individual-personInPosition { list-style-type: circle; @@ -58,6 +57,7 @@ ul#individual-personInPosition li { ul#individual-personInPosition li:last-child { padding-bottom: 15px; } + /* <------ RESEARCH AREA */ ul#individual-hasResearchArea { padding-bottom: 24px; @@ -70,4 +70,25 @@ ul#individual-hasResearchArea li { } ul#individual-hasResearchArea li:first-child { padding-left: 0; +} + +/* <------ QR Code */ +h5.qrCode { + margin-top: 1em; + padding: 0; +} +span#qrCodeImage { + position: absolute; + top: -9em; + left: 2em; + border: solid 1px #ccc; + background: white; +} +span#qrCodeImage img { + padding: 1.7em 1.7em 0 1.7em; +} +a.qrCloseLink { + float: right; + margin-right: .5em; + font-size: .8em; } \ No newline at end of file diff --git a/productMods/js/individual/individualUtils.js b/productMods/js/individual/individualUtils.js index c5e17bf2..9abbdb89 100644 --- a/productMods/js/individual/individualUtils.js +++ b/productMods/js/individual/individualUtils.js @@ -41,4 +41,10 @@ $(document).ready(function(){ }); }); + // Reveal vCard QR code when QR icon is clicked + $('#qrIcon, .qrCloseLink').click(function() { + $('#qrCodeImage').toggleClass('hide'); + // event.preventDefault(); + return false; + }); }); \ No newline at end of file diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl index 157e086f..62d45973 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl @@ -3,6 +3,7 @@ <#-- Individual profile page template for foaf:Person individuals --> <#include "individual-setup.ftl"> +<#include "individual-qrCodeFoafPerson.ftl">
@@ -33,7 +34,7 @@
  • RDF
  • - <#include "individual-qrCodeFoafPerson.ftl"> + <@qrCode /> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl index 7a0bc83c..4319c52c 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl @@ -1,7 +1,27 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#include "individual-qrCodeGenerator.ftl"> +<#include "individual-qrCodeGenerator.ftl"> -<#if hasValidVCard()> -
  • qr icon
  • - \ No newline at end of file +<#-- 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><@qrCodeVCard qrCodeWidth=width /> + + <#if (display == "full")> +
    vCard QR
    + ${qrCodeLinkedImage} + <#elseif (display == "icon")> +
  • + qr icon + ${qrCodeLinkedImage} Close +
  • + <#else> +

    You have passed an invalid value for the qrCode display parameter.

    + + + + \ No newline at end of file