ERROR

Switch View
  1. <% --[[
  2. ********************************************************************************
  3. Begin Setup
  4. ******************************************************************************** ]]
  5. local LrApplication = import "LrApplication"
  6. local major = LrApplication.versionTable().major
  7. local lrwebengine = "CE4-Gallery.lrwebengine"
  8. local markdownloc = "lib/lua/"
  9. local M = _G.model
  10. function cleandata(metadata)
  11. metadata = string.gsub(metadata, "&", "&")
  12. metadata = string.gsub(metadata, "&", "&")
  13. metadata = string.gsub(metadata, "&amp;", "&")
  14. metadata = string.gsub(metadata, "\r\n", "<br />")
  15. metadata = string.gsub(metadata, "\n", "<br />")
  16. metadata = string.gsub(metadata, "\"", """)
  17. return metadata
  18. end
  19. local phplugins_gstyle
  20. if mobile then
  21. phplugins_gstyle = "Mobile"
  22. elseif cart then
  23. phplugins_gstyle = "Cart"
  24. else
  25. phplugins_gstyle = "Gallery"
  26. end
  27. local operator
  28. if MAC_ENV then
  29. operator = "CMD"
  30. else
  31. operator = "CTRL"
  32. end
  33. local preview = false
  34. if mode == 'preview' then
  35. preview = true
  36. end
  37. local publish = false
  38. if mode == 'publish' then
  39. publish = true
  40. end
  41. local theRoot
  42. theRoot = "."
  43. local siteRoot
  44. if preview then
  45. siteRoot = theRoot ..'/'
  46. elseif publish and M.phplugins.enable then
  47. siteRoot = "<?php echo TTG_SITE; ".."?"..">"
  48. elseif publish and not M.phplugins.enable then
  49. siteRoot = M.page_setup.site.root
  50. end
  51. local resources = theRoot ..'/lib'
  52. if publisher or cart then
  53. resources = "<?php echo $resources_url; ".."?"..">"
  54. end
  55. local sharedResources = resources
  56. if M.resources.share.enabled then
  57. sharedResources = siteRoot .. "lib"
  58. end
  59. local phplugins_path
  60. if model.phplugins.path == '' then
  61. phplugins_path = theRoot ..'/phplugins'
  62. else
  63. phplugins_path = model.phplugins.path
  64. end
  65. local albumTitle = M.album.title
  66. if publisher and not single then
  67. albumTitle = "<?php echo $album->getTitle(); ".."?"..">"
  68. elseif publisher and single then
  69. albumTitle = "<?php echo $photo->getTitle(); ".."?"..">"
  70. elseif not publisher and single and getImage(index).metadata.imgTitle ~= '' then
  71. albumTitle = getImage(index).metadata.imgTitle
  72. elseif not publisher and single and getImage(index).metadata.imgTitle == '' then
  73. albumTitle = getImage(index).exportFilename
  74. end
  75. local albumTitleVal
  76. if publisher and not single then
  77. albumTitleVal = '$album->getTitle()'
  78. elseif publisher and single then
  79. albumTitleVal = '$photo->getTitle()'
  80. else
  81. albumTitleVal = "'".. string.gsub(albumTitle, "'", "'") .."'"
  82. end
  83. local pageTitle = 'Page Title'
  84. if publisher and M.page_setup.html.title == '' then
  85. pageTitle = albumTitle
  86. elseif publisher then
  87. pageTitle = albumTitle .. " - " .. M.page_setup.html.title
  88. elseif cart then
  89. pageTitle = "<?php echo str_replace('[COMPANY_NAME]', __c('COMPANY_NAME'), __c('TITLE')); ".."?"..">"
  90. else
  91. if M.page_setup.html.title == '' and albumTitle == '' then
  92. pageTitle = ''
  93. elseif M.page_setup.html.title == '' then
  94. pageTitle = albumTitle
  95. elseif albumTitle == '' then
  96. pageTitle = M.page_setup.html.title
  97. else
  98. pageTitle = albumTitle .. " - " .. M.page_setup.html.title
  99. end
  100. end
  101. local socialTitle
  102. if publisher and not single then
  103. socialTitle = "<?php echo $album->getTitle(70); ".."?"..">"
  104. elseif publisher and single then
  105. socialTitle = "<?php echo $photo->getTitle(70); ".."?"..">"
  106. else
  107. socialTitle = "<?php echo truncate(\"".. albumTitle .."\", 70); ".."?"..">"
  108. end
  109. local pageDescription = M.album.description
  110. if publisher and not single then
  111. pageDescription = "<?php echo (!$album->getDescription() ? $album->getTitle() : $album->getDescription()); ".."?"..">"
  112. elseif publisher and single then
  113. pageDescription = "<?php echo $photo->getDescription(); ".."?"..">"
  114. elseif not publisher and single then
  115. pageDescription = getImage(index).metadata.imgAlt
  116. end
  117. local socialDescription = "<?php echo truncate(\"".. M.album.description .."\", 200); ".."?"..">"
  118. if publisher and not single then
  119. socialDescription = "<?php echo (!$album->getDescription() ? $album->getTitle(200) : $album->getDescription(200)); ".."?"..">"
  120. elseif publisher and single then
  121. socialDescription = "<?php echo (!$photo->getDescription() ? $photo->getTitle(200) : $photo->getDescription(200)); ".."?"..">"
  122. elseif not publisher and single then
  123. socialDescription = "<?php echo truncate(\"".. getImage(index).metadata.imgAlt .."\", 200); ".."?"..">"
  124. end
  125. local pageImage
  126. if publisher and single then
  127. pageImage = "\"photos/\".$singleFilename"
  128. elseif publisher then
  129. pageImage = "\"photos/\".basename($album->getCoverImage())"
  130. elseif single then
  131. pageImage = "\"photos/".. getImage(index).exportFilename ..".jpg\""
  132. elseif getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then
  133. pageImage = "\"photos/".. getImage(M.the_block.image.id).exportFilename ..".jpg\""
  134. else
  135. pageImage = "\"".. theRoot .."/lib/images/identityplate.png\""
  136. end
  137. local pageImageFile
  138. if publisher and single then
  139. pageImageFile = "<?php echo $singleFilename; ".."?"..">"
  140. elseif publisher then
  141. pageImageFile = "<?php echo basename($album->getCoverImage()); ".."?"..">"
  142. elseif single then
  143. pageImageFile = getImage(index).exportFilename ..".jpg"
  144. else
  145. pageImageFile = getImage(M.the_block.image.id).exportFilename ..".jpg"
  146. end
  147. local login_user
  148. if publisher then
  149. login_user = "defined('USERNAME')?USERNAME:'".. M.password.login.guest_username .. "';"
  150. else
  151. login_user = "'" .. M.password.login.guest_username .. "';"
  152. end
  153. local login_password
  154. if publisher then
  155. login_password = "defined('PASSWORD')?PASSWORD:'".. M.password.login.guest_password .. "';"
  156. else
  157. login_password = "'" .. M.password.login.guest_password .. "';"
  158. end
  159. local downloadFolder
  160. if mode == 'preview' then
  161. downloadFolder = "photos"
  162. elseif publisher and M.publisher.imageDownload.enable then
  163. downloadFolder = "<?php echo $downloadPath ".."?"..">"
  164. else
  165. downloadFolder = M.imageDownload.folder
  166. end
  167. local downloadExtension
  168. if mode == 'preview' then
  169. downloadExtension = "jpg"
  170. elseif publisher and M.publisher.imageDownload.enable then
  171. downloadExtension = "jpg"
  172. else
  173. downloadExtension = M.imageDownload.filetype
  174. end
  175. --[[
  176. ********************************************************************************
  177. Navigation Hyperlinks
  178. ******************************************************************************** ]]
  179. local newWindow
  180. if preview then
  181. newWindow = ''
  182. else
  183. newWindow = ' onclick="window.open(this.href); return false;"'
  184. end
  185. local tail
  186. if preview then
  187. tail = '.html'
  188. elseif publish then
  189. tail = '.php'
  190. end
  191. local menuTarget01 = M.nav_link.nav_01.target
  192. if menuTarget01 == ( 'index' ) then
  193. menuTarget01 = siteRoot .. menuTarget01 .. tail
  194. elseif menuTarget01 == ( 'blog/' ) then
  195. menuTarget01 = siteRoot .. menuTarget01
  196. elseif menuTarget01 == ( 'galleries' ) then
  197. menuTarget01 = siteRoot .. menuTarget01 .. tail
  198. elseif menuTarget01 == ( 'services' ) then
  199. menuTarget01 = siteRoot .. menuTarget01 .. tail
  200. elseif menuTarget01 == ( 'info' ) then
  201. menuTarget01 = siteRoot .. menuTarget01 .. tail
  202. elseif menuTarget01 == ( 'about' ) then
  203. menuTarget01 = siteRoot .. menuTarget01 .. tail
  204. elseif menuTarget01 == ( 'contact' ) then
  205. menuTarget01 = siteRoot .. menuTarget01 .. tail
  206. elseif menuTarget01 == ( 'search/' ) then
  207. menuTarget01 = siteRoot .. menuTarget01
  208. end
  209. local menuTarget02 = M.nav_link.nav_02.target
  210. if menuTarget02 == ( 'index' ) then
  211. menuTarget02 = siteRoot .. menuTarget02 .. tail
  212. elseif menuTarget02 == ( 'blog/' ) then
  213. menuTarget02 = siteRoot .. menuTarget02
  214. elseif menuTarget02 == ( 'galleries' ) then
  215. menuTarget02 = siteRoot .. menuTarget02 .. tail
  216. elseif menuTarget02 == ( 'services' ) then
  217. menuTarget02 = siteRoot .. menuTarget02 .. tail
  218. elseif menuTarget02 == ( 'info' ) then
  219. menuTarget02 = siteRoot .. menuTarget02 .. tail
  220. elseif menuTarget02 == ( 'about' ) then
  221. menuTarget02 = siteRoot .. menuTarget02 .. tail
  222. elseif menuTarget02 == ( 'contact' ) then
  223. menuTarget02 = siteRoot .. menuTarget02 .. tail
  224. elseif menuTarget02 == ( 'search/' ) then
  225. menuTarget02 = siteRoot .. menuTarget02
  226. end
  227. local menuTarget03 = M.nav_link.nav_03.target
  228. if menuTarget03 == ( 'index' ) then
  229. menuTarget03 = siteRoot .. menuTarget03 .. tail
  230. elseif menuTarget03 == ( 'blog/' ) then
  231. menuTarget03 = siteRoot .. menuTarget03
  232. elseif menuTarget03 == ( 'galleries' ) then
  233. menuTarget03 = siteRoot .. menuTarget03 .. tail
  234. elseif menuTarget03 == ( 'services' ) then
  235. menuTarget03 = siteRoot .. menuTarget03 .. tail
  236. elseif menuTarget03 == ( 'info' ) then
  237. menuTarget03 = siteRoot .. menuTarget03 .. tail
  238. elseif menuTarget03 == ( 'about' ) then
  239. menuTarget03 = siteRoot .. menuTarget03 .. tail
  240. elseif menuTarget03 == ( 'contact' ) then
  241. menuTarget03 = siteRoot .. menuTarget03 .. tail
  242. elseif menuTarget03 == ( 'search/' ) then
  243. menuTarget03 = siteRoot .. menuTarget03
  244. end
  245. local menuTarget04 = M.nav_link.nav_04.target
  246. if menuTarget04 == ( 'index' ) then
  247. menuTarget04 = siteRoot .. menuTarget04 .. tail
  248. elseif menuTarget04 == ( 'blog/' ) then
  249. menuTarget04 = siteRoot .. menuTarget04
  250. elseif menuTarget04 == ( 'galleries' ) then
  251. menuTarget04 = siteRoot .. menuTarget04 .. tail
  252. elseif menuTarget04 == ( 'services' ) then
  253. menuTarget04 = siteRoot .. menuTarget04 .. tail
  254. elseif menuTarget04 == ( 'info' ) then
  255. menuTarget04 = siteRoot .. menuTarget04 .. tail
  256. elseif menuTarget04 == ( 'about' ) then
  257. menuTarget04 = siteRoot .. menuTarget04 .. tail
  258. elseif menuTarget04 == ( 'contact' ) then
  259. menuTarget04 = siteRoot .. menuTarget04 .. tail
  260. elseif menuTarget04 == ( 'search/' ) then
  261. menuTarget04 = siteRoot .. menuTarget04
  262. end
  263. local menuTarget05 = M.nav_link.nav_05.target
  264. if menuTarget05 == ( 'index' ) then
  265. menuTarget05 = siteRoot .. menuTarget05 .. tail
  266. elseif menuTarget05 == ( 'blog/' ) then
  267. menuTarget05 = siteRoot .. menuTarget05
  268. elseif menuTarget05 == ( 'galleries' ) then
  269. menuTarget05 = siteRoot .. menuTarget05 .. tail
  270. elseif menuTarget05 == ( 'services' ) then
  271. menuTarget05 = siteRoot .. menuTarget05 .. tail
  272. elseif menuTarget05 == ( 'info' ) then
  273. menuTarget05 = siteRoot .. menuTarget05 .. tail
  274. elseif menuTarget05 == ( 'about' ) then
  275. menuTarget05 = siteRoot .. menuTarget05 .. tail
  276. elseif menuTarget05 == ( 'contact' ) then
  277. menuTarget05 = siteRoot .. menuTarget05 .. tail
  278. elseif menuTarget05 == ( 'search/' ) then
  279. menuTarget05 = siteRoot .. menuTarget05
  280. end
  281. local menuTarget06 = M.nav_link.nav_06.target
  282. if menuTarget06 == ( 'index' ) then
  283. menuTarget06 = siteRoot .. menuTarget06 .. tail
  284. elseif menuTarget06 == ( 'blog/' ) then
  285. menuTarget06 = siteRoot .. menuTarget06
  286. elseif menuTarget06 == ( 'galleries' ) then
  287. menuTarget06 = siteRoot .. menuTarget06 .. tail
  288. elseif menuTarget06 == ( 'services' ) then
  289. menuTarget06 = siteRoot .. menuTarget06 .. tail
  290. elseif menuTarget06 == ( 'info' ) then
  291. menuTarget06 = siteRoot .. menuTarget06 .. tail
  292. elseif menuTarget06 == ( 'about' ) then
  293. menuTarget06 = siteRoot .. menuTarget06 .. tail
  294. elseif menuTarget06 == ( 'contact' ) then
  295. menuTarget06 = siteRoot .. menuTarget06 .. tail
  296. elseif menuTarget06 == ( 'search/' ) then
  297. menuTarget06 = siteRoot .. menuTarget06
  298. end
  299. local menuTarget07 = M.nav_link.nav_07.target
  300. if menuTarget07 == ( 'index' ) then
  301. menuTarget07 = siteRoot .. menuTarget07 .. tail
  302. elseif menuTarget07 == ( 'blog/' ) then
  303. menuTarget07 = siteRoot .. menuTarget07
  304. elseif menuTarget07 == ( 'galleries' ) then
  305. menuTarget07 = siteRoot .. menuTarget07 .. tail
  306. elseif menuTarget07 == ( 'services' ) then
  307. menuTarget07 = siteRoot .. menuTarget07 .. tail
  308. elseif menuTarget07 == ( 'info' ) then
  309. menuTarget07 = siteRoot .. menuTarget07 .. tail
  310. elseif menuTarget07 == ( 'about' ) then
  311. menuTarget07 = siteRoot .. menuTarget07 .. tail
  312. elseif menuTarget07 == ( 'contact' ) then
  313. menuTarget07 = siteRoot .. menuTarget07 .. tail
  314. elseif menuTarget07 == ( 'search/' ) then
  315. menuTarget07 = siteRoot .. menuTarget07
  316. end
  317. local menuTarget08 = M.nav_link.nav_08.target
  318. if menuTarget08 == ( 'index' ) then
  319. menuTarget08 = siteRoot .. menuTarget08 .. tail
  320. elseif menuTarget08 == ( 'blog/' ) then
  321. menuTarget08 = siteRoot .. menuTarget08
  322. elseif menuTarget08 == ( 'galleries' ) then
  323. menuTarget08 = siteRoot .. menuTarget08 .. tail
  324. elseif menuTarget08 == ( 'services' ) then
  325. menuTarget08 = siteRoot .. menuTarget08 .. tail
  326. elseif menuTarget08 == ( 'info' ) then
  327. menuTarget08 = siteRoot .. menuTarget08 .. tail
  328. elseif menuTarget08 == ( 'about' ) then
  329. menuTarget08 = siteRoot .. menuTarget08 .. tail
  330. elseif menuTarget08 == ( 'contact' ) then
  331. menuTarget08 = siteRoot .. menuTarget08 .. tail
  332. elseif menuTarget08 == ( 'search/' ) then
  333. menuTarget08 = siteRoot .. menuTarget08
  334. end
  335. local menuTarget09 = M.nav_link.nav_09.target
  336. if menuTarget09 == ( 'index' ) then
  337. menuTarget09 = siteRoot .. menuTarget09 .. tail
  338. elseif menuTarget09 == ( 'blog/' ) then
  339. menuTarget09 = siteRoot .. menuTarget09
  340. elseif menuTarget09 == ( 'galleries' ) then
  341. menuTarget09 = siteRoot .. menuTarget09 .. tail
  342. elseif menuTarget09 == ( 'services' ) then
  343. menuTarget09 = siteRoot .. menuTarget09 .. tail
  344. elseif menuTarget09 == ( 'info' ) then
  345. menuTarget09 = siteRoot .. menuTarget09 .. tail
  346. elseif menuTarget09 == ( 'about' ) then
  347. menuTarget09 = siteRoot .. menuTarget09 .. tail
  348. elseif menuTarget09 == ( 'contact' ) then
  349. menuTarget09 = siteRoot .. menuTarget09 .. tail
  350. elseif menuTarget09 == ( 'search/' ) then
  351. menuTarget09 = siteRoot .. menuTarget09
  352. end
  353. local menuTarget10 = M.nav_link.nav_10.target
  354. if menuTarget10 == ( 'index' ) then
  355. menuTarget10 = siteRoot .. menuTarget10 .. tail
  356. elseif menuTarget10 == ( 'blog/' ) then
  357. menuTarget10 = siteRoot .. menuTarget10
  358. elseif menuTarget10 == ( 'galleries' ) then
  359. menuTarget10 = siteRoot .. menuTarget10 .. tail
  360. elseif menuTarget10 == ( 'services' ) then
  361. menuTarget10 = siteRoot .. menuTarget10 .. tail
  362. elseif menuTarget10 == ( 'info' ) then
  363. menuTarget10 = siteRoot .. menuTarget10 .. tail
  364. elseif menuTarget10 == ( 'about' ) then
  365. menuTarget10 = siteRoot .. menuTarget10 .. tail
  366. elseif menuTarget10 == ( 'contact' ) then
  367. menuTarget10 = siteRoot .. menuTarget10 .. tail
  368. elseif menuTarget10 == ( 'search/' ) then
  369. menuTarget10 = siteRoot .. menuTarget10
  370. end
  371. if preview then
  372. menuTarget01 = '#'
  373. menuTarget02 = '#'
  374. menuTarget03 = '#'
  375. menuTarget04 = '#'
  376. menuTarget05 = '#'
  377. menuTarget06 = '#'
  378. menuTarget07 = '#'
  379. menuTarget08 = '#'
  380. menuTarget09 = '#'
  381. menuTarget10 = '#'
  382. end
  383. --[[
  384. ********************************************************************************
  385. Markdown
  386. ******************************************************************************** ]]
  387. LrFileUtils = import 'LrFileUtils'
  388. LrFunctionContext = import 'LrFunctionContext'
  389. LrPathUtils = import 'LrPathUtils'
  390. if WIN_ENV then
  391. webGalleriesFolder = LrPathUtils.child(LrPathUtils.getStandardFilePath("appData"), "Web Galleries")
  392. else
  393. webGalleriesFolder = LrPathUtils.child(LrPathUtils.getStandardFilePath("home"), "Library/Application Support/Adobe/Lightroom/Web Galleries/")
  394. end
  395. local webenginePath = LrPathUtils.child(webGalleriesFolder, lrwebengine)
  396. if LrFileUtils.exists(webenginePath) == 'directory' then -- verify markdown is accessible
  397. local mdenvPath = LrPathUtils.child(webenginePath, markdownloc.."markdownenv.lua")
  398. local luaString = LrFileUtils.readFile(mdenvPath)
  399. local func, errorMsg = loadstring(luaString, 'markdownenv.lua' )
  400. local env = { assert = assert, ipairs = ipairs, dofile = dofile, error = error, getmetatable = getmetatable, ipairs = ipairs, load = load, loadfile = loadfile, loadstring = loadstring, next = next, pairs = pairs, pcall = pcall, print = print, rawequal = rawequal, rawget = rawget, rawset = rawset, require = require, select = select, setmetatable = function() end, tonumber = tonumber, tostring = tostring, type = type, unpack = unpack, setenv = function() end, import = import, io = io, os = os, file = file, table = table, math = math, string = string, WIN_ENV = WIN_ENV, webGalleriesFolder = webGalleriesFolder, lrwebengine = lrwebengine, markdownloc = markdownloc }
  401. LrFunctionContext.callWithEnvironment(func, env)
  402. markdown = env._G.markdown
  403. else -- markdown is broken
  404. function markdown(text)
  405. text = ""
  406. return text
  407. end
  408. LrDialogs = import 'LrDialogs'
  409. local mdError = "Plugin Installation Error."
  410. local mdInfo = "The plugin is badly named or in the wrong location. Please review our online installation guide :\nhttp://ce4.theturninggate.net/docs/"
  411. LrDialogs.message(mdError, mdInfo)
  412. end -- verify markdown is accessible
  413. --[[
  414. ********************************************************************************
  415. End Setup
  416. ******************************************************************************** ]] %>
  417. <%
  418. if cart and mode == 'publish' then
  419. write ("<?php\n"..
  420. "$resources_url = TTG_BE_DIR.'/'.TEMPLATE_DIR.'/gallery/'.__c('CART_TEMPLATE').'/lib';\n"..
  421. "if (isset($resources_url) && $resources_url)\n"..
  422. " define('RESOURCES_URL', $resources_url);\n"..
  423. "else\n"..
  424. " define('RESOURCES_URL', './lib');\n"..
  425. "?".. ">") end
  426. if publish and M.phplugins.enable then --[[ setup PHPlugins ]]
  427. write ("<?php\n"..
  428. "/*\n"..
  429. " *\n"..
  430. " * TTG Core Elements - \"PHPlugins\" User Hook interface\n"..
  431. " * designed by john bishop images (http://johnbishopimages.com)\n"..
  432. " * for Matthew Campagna of The Turning Gate (http://theturninggate.net)\n"..
  433. " *\n"..
  434. " */\n"..
  435. "\n"..
  436. "// Begin hook processing\n"..
  437. "\n"..
  438. "define( 'TTG_ROOT', __FILE__ );\n"..
  439. "\n"..
  440. "define( 'TTG_HOOK', '".. phplugins_path .. "' );\n"..
  441. "\n"..
  442. "define( 'TTG_COMP', 'TTG CE4-".. phplugins_gstyle .. " 4.0' );\n"..
  443. "\n"..
  444. "if (file_exists( TTG_HOOK . '/phplugins.php')) {\n"..
  445. " require_once TTG_HOOK . '/phplugins.php';\n"..
  446. "}\n"..
  447. "\n"..
  448. "if (function_exists('ttg_user_load')) {\n"..
  449. " $void = ttg_user_load( TTG_COMP, TTG_ROOT );\n"..
  450. "}\n"..
  451. "\n"..
  452. "?".. ">")
  453. end
  454. if publish and publisher and M.phplugins.enable then
  455. write ("<?php\n"..
  456. " define(\"G_SLUG\", $album->getSlug());\n"..
  457. " define(\"G_TEMPLATE\", $album->getTemplateName());\n"..
  458. "?".. ">")
  459. end
  460. if publish and (M.is.php or publisher) then --[[ setup PHP constants ]]
  461. write ("<?php\n"..
  462. " if (!function_exists('currentPageURL')) {\n"..
  463. " // Gets current page URL\n"..
  464. " function currentPageURL() {\n"..
  465. " $pageURL = 'http';\n"..
  466. "\n"..
  467. " if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {$pageURL .= \"s\";}\n"..
  468. " $pageURL .= \"://\";\n"..
  469. "\n"..
  470. " if ($_SERVER[\"SERVER_PORT\"] != \"80\" && strpos($host, ':') === false) {\n"..
  471. " $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n"..
  472. " } else {\n"..
  473. " $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n"..
  474. " }\n"..
  475. "\n"..
  476. " return $pageURL;\n"..
  477. " }\n"..
  478. " }\n"..
  479. "\n"..
  480. " if (!function_exists('currentPageLocation')) {\n"..
  481. " // Gets current page parent location\n"..
  482. " function currentPageLocation() {\n"..
  483. "\n"..
  484. " $currentPageURL = currentPageURL();\n"..
  485. " $returnURL = '';\n"..
  486. "\n"..
  487. " $finalSlash = strrpos(currentPageURL(), '/');\n"..
  488. " if (strrpos($currentPageURL, '.') > strrpos($currentPageURL, '/')) // has a file after the final slash, e.g. http://url/directory/index.php\n"..
  489. " $returnURL = substr($currentPageURL, 0, $finalSlash);\n"..
  490. " else if (strrpos($currentPageURL, '?') > strrpos($currentPageURL, '/')) // has a ? after the final slash, e.g. http://url/directory/index.php\n"..
  491. " $returnURL = substr($currentPageURL, 0, $finalSlash);\n"..
  492. " else if ($finalSlash == strlen($currentPageURL)-1) // final character is a slash, e.g. http://url/directory/\n"..
  493. " $returnURL = substr($currentPageURL, 0, $finalSlash);\n"..
  494. " else // final character is not a slash, e.g. http://url/directory\n"..
  495. " $returnURL = $currentPageURL;\n"..
  496. "\n"..
  497. " return $returnURL;\n"..
  498. " }\n"..
  499. " }\n"..
  500. "\n"..
  501. " if (!function_exists('currentPageName')) {\n"..
  502. " // Gets current page name.\n"..
  503. " function currentPageName() {\n"..
  504. " return substr($_SERVER[\"SCRIPT_NAME\"],strrpos($_SERVER[\"SCRIPT_NAME\"],\"/\")+1);\n"..
  505. " }\n"..
  506. " }\n"..
  507. "\n"..
  508. " if (!function_exists('truncate')) {\n"..
  509. " // Truncates string to length.\n"..
  510. " function truncate($str, $len=70) {\n"..
  511. " if (strlen($str) > $len) {\n"..
  512. " return substr($str, 0, $len-2) . '…';\n"..
  513. " } else {\n"..
  514. " return $str;\n"..
  515. " }\n"..
  516. " }\n"..
  517. " }\n"..
  518. "\n"..
  519. " // Set constants for use in PHPlugins\n"..
  520. " define(\"PAGEIMAGE\", ".. pageImage ..");\n"..
  521. " define(\"CURRENTPAGEURL\", currentPageURL());\n"..
  522. " define(\"CURRENTPAGELOCATION\", currentPageLocation());\n"..
  523. " define(\"CURRENTPAGENAME\", currentPageName());\n"..
  524. " define(\"ALBUMTITLE\", ".. albumTitleVal ..");\n"..
  525. " if (!defined('TTG_SITE')) {\n"..
  526. " define(\"TTG_SITE\", \"".. M.page_setup.site.root .."\");\n"..
  527. " }\n"..
  528. "?".. ">")
  529. end
  530. if publish and M.is.php and M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' and not cart then --[[ setup Bit.ly URL shortening ]]
  531. --[[ https://bitly.com/a/your_api_key ]]
  532. write ("<?php\n"..
  533. "/* returns the shortened url */\n"..
  534. "if (!function_exists('get_bitly_short_url')) {\n"..
  535. " function get_bitly_short_url($url,$login,$appkey,$format='txt') {\n"..
  536. " $connectURL = 'http://api.bit.ly/v3/shorten?login='.$login.'&apiKey='.$appkey.'&uri='.urlencode($url).'&format='.$format;\n"..
  537. " return curl_get_result($connectURL);\n"..
  538. " }\n"..
  539. "}\n"..
  540. "/* returns expanded url */\n"..
  541. "if (!function_exists('get_bitly_long_url')) {\n"..
  542. " function get_bitly_long_url($url,$login,$appkey,$format='txt') {\n"..
  543. " $connectURL = 'http://api.bit.ly/v3/expand?login='.$login.'&apiKey='.$appkey.'&shortUrl='.urlencode($url).'&format='.$format;\n"..
  544. " return curl_get_result($connectURL);\n"..
  545. " }\n"..
  546. "}\n"..
  547. "/* returns a result form url */\n"..
  548. "if (!function_exists('curl_get_result')) {\n"..
  549. " function curl_get_result($url) {\n"..
  550. " $ch = curl_init();\n"..
  551. " $timeout = 5;\n"..
  552. " curl_setopt($ch,CURLOPT_URL,$url);\n"..
  553. " curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\n"..
  554. " curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\n"..
  555. " $data = curl_exec($ch);\n"..
  556. " curl_close($ch);\n"..
  557. " return $data;\n"..
  558. " }\n"..
  559. "}\n"..
  560. "/* get the short url */\n"..
  561. "$short_url = get_bitly_short_url(currentPageLocation(),'".. M.sharing.bitly.username .."','".. M.sharing.bitly.apikey .."');\n"..
  562. "/* get the long url from the short one */\n"..
  563. "$long_url = get_bitly_long_url($short_url,'".. M.sharing.bitly.username .."','".. M.sharing.bitly.apikey .."');\n"..
  564. "?".. ">")
  565. end
  566. %><%
  567. --[[ Insert just before DOCTYPE ]]
  568. if M.password.enable and mode == 'publish' and not publisher and not cart then
  569. write ("<?php\n" ..
  570. "// PHP Password Protection Script\n" ..
  571. "// developed by john bishop images (http://johnbishopimages.com)\n" ..
  572. "// for Matthew Campagna at http://theturninggate.net\n" ..
  573. "\n" ..
  574. "/* * * * * START OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * */\n" ..
  575. "// Ensure page and cookies are not cached by the browser or gateways, proxy servers, etc\n" ..
  576. "\n" ..
  577. "header('Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate');\n" ..
  578. "header('Cache-Control: no-cache=\"set-cookie\"', false);\n" ..
  579. "header('Cache-Control: post-check=0, pre-check=0', false);\n" ..
  580. "header('Pragma: no-cache');\n" ..
  581. "header('Expires: -1');\n" ..
  582. "\n" ..
  583. "/* * * * * END OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * * */\n" ..
  584. "\n" ..
  585. "$product = \"PHP Password Protection Script\"; // Set module name\n" ..
  586. "$file_ver = '2.1.0'; // Set plugin/module/file version\n" ..
  587. "\n" ..
  588. "$path_self = $_SERVER['PHP_SELF']; // Develop pathname\n" ..
  589. "$path_self = substr($path_self, 0, strripos($path_self, '/'));\n" ..
  590. "$path_lock = \"_ttg_lock_\" . md5($path_self); // lockname = hash(pathname))\n" ..
  591. "\n" ..
  592. "$master_lock = \"_ttg_lock_master_\"; // master lock\n" ..
  593. "\n" ..
  594. "// Define your username and password\n" ..
  595. "$username = " .. login_user .. "\n" ..
  596. "$password = " .. login_password .. "\n" ..
  597. "\n" ..
  598. "// Define master key in use or not and master username and password\n" ..
  599. "$master_used = true; // Set true to use master user and pswd; false otherwise\n" ..
  600. "$master_name = '" .. M.password.login.master_username .. "'; // Do not leave empty if\n" ..
  601. "$master_pswd = '" .. M.password.login.master_password .. "'; // $master_used == true.\n"..
  602. "\n" ..
  603. "// Set lock state to value returned by browser or ''\n" ..
  604. "$ttg_lockey = isset($_COOKIE[$path_lock]) ? $_COOKIE[$path_lock] : \"\";\n" ..
  605. "$master_key = isset($_COOKIE[$master_lock]) ? $_COOKIE[$master_lock] : \"\";\n" ..
  606. "\n" ..
  607. "// Pick up any username or password returned\n" ..
  608. "$ttg_username = isset($_POST[\"ttg_username\"]) ? $_POST[\"ttg_username\"] : \"\";\n" ..
  609. "$ttg_password = isset($_POST[\"ttg_password\"]) ? $_POST[\"ttg_password\"] : \"\";\n" ..
  610. "\n" ..
  611. "// Assume not logged in ...\n" ..
  612. "$logged_in = false;\n" ..
  613. "\n" ..
  614. "// We are already logged in ...\n" ..
  615. "if (($ttg_lockey == \"OPEN\") | ($master_key == \"OPEN\")) {\n" ..
  616. " $logged_in = true;\n" ..
  617. "}\n" ..
  618. "\n" ..
  619. "else {\n" ..
  620. " if (($ttg_username == $username) & ($ttg_password == $password)) {\n" ..
  621. " // username and password match - save a cookie for this path ...\n" ..
  622. " setcookie($path_lock, \"OPEN\", 0, \"/\");\n" ..
  623. " $logged_in = true;\n" ..
  624. " }\n" ..
  625. " else {\n" ..
  626. " // username and password dont match - clear cookie for this path ...\n" ..
  627. " setcookie($path_lock, false, time()-86400, \"/\");\n" ..
  628. " }\n" ..
  629. " if ($master_used & ($ttg_username == $master_name) & ($ttg_password == $master_pswd)) {\n" ..
  630. " // master passkey given - set master lock \n" ..
  631. " setcookie($master_lock, \"OPEN\", 0, \"/\");\n" ..
  632. " $logged_in = true;\n" ..
  633. " }\n" ..
  634. " else {\n" ..
  635. " // master passkey not given - clear master lock\n" ..
  636. " setcookie($master_lock, false, time()-86400, \"/\");\n" ..
  637. " }\n" ..
  638. "}\n" ..
  639. "\n" ..
  640. "$logout = trim($_SERVER[\"QUERY_STRING\"]);\n" ..
  641. "if ($logout == 'logout') {\n" ..
  642. " setcookie($path_lock, false, time()-86400, \"/\");\n" ..
  643. " setcookie($master_lock, false, time()-86400, \"/\");\n" ..
  644. " $logged_in = false;\n" ..
  645. "}\n" ..
  646. "\n" ..
  647. "// End PHP Password Protection Script" .. " ?" .. ">" )
  648. end
  649. if cart and mode == 'publish' then
  650. write ("<?php\n"..
  651. "/* * * * * START OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * */\n"..
  652. "// Ensure page and cookies are not cached by the browser or gateways, proxy servers, etc.\n"..
  653. "header('Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate');\n"..
  654. "header('Cache-Control: no-cache=\"set-cookie\"', false);\n"..
  655. "header('Cache-Control: post-check=0, pre-check=0', false);\n"..
  656. "header('Pragma: no-cache');\n"..
  657. "header('Expires: -1');\n"..
  658. "/* * * * * END OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * * */\n"..
  659. "?".. ">") end
  660. %><!DOCTYPE html>
  661. <!--[if lt IE 7]><html class="ce4 no-js lt-ie9 lt-ie8 lt-ie7" dir="<%= M.page_setup.html.dir %>" lang="<%= M.page_setup.html.lang %>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><![endif]-->
  662. <!--[if IE 7]><html class="ce4 no-js lt-ie9 lt-ie8" dir="<%= M.page_setup.html.dir %>" lang="<%= M.page_setup.html.lang %>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><![endif]-->
  663. <!--[if IE 8]><html class="ce4 no-js lt-ie9" dir="<%= M.page_setup.html.dir %>" lang="<%= M.page_setup.html.lang %>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><![endif]-->
  664. <!--[if gt IE 8]><!--><html class="ce4 no-js <% if M.nonCSS.like.ie8 then %>lt-ie9<% else %>gt-ie8<% end %>" dir="<%= M.page_setup.html.dir %>" lang="<%= M.page_setup.html.lang %>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><!--<![endif]-->
  665. <head>
  666. <meta charset="<%= M.page_setup.html.charset %>" />
  667. <!--[if IE]><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><![endif]-->
  668. <% if M.page_setup.html.robots == 'disallow' or M.password.enable then %>
  669. <meta name="robots" content="noarchive, noindex, nofollow" />
  670. <% end %>
  671. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  672. <% if M.page_setup.meta.author ~= "" then %>
  673. <meta name="author" content="<%= M.page_setup.meta.author %>" />
  674. <% end %>
  675. <meta name="title" content="<%= pageTitle %>" />
  676. <% if publisher or M.album.description ~= "" then %>
  677. <meta name="description" content="<%= pageDescription %>" />
  678. <% end %>
  679. <meta name="generator" content="<%= M.engine.name %> <%= M.engine.version %>, <% if publisher then %>via Publisher<% else %><%= numImages %> published image<% if numImages ~= 1 then %>s<% end end %>" />
  680. <% if M.page_setup.meta.keywords ~= "" then %>
  681. <meta name="keywords" content="<%= M.page_setup.meta.keywords %>" />
  682. <% end %>
  683. <meta name="apple-mobile-web-app-capable" content="yes" />
  684. <meta name="HandheldFriendly" content="True" />
  685. <meta name="MobileOptimized" content="320" />
  686. <meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" />
  687. <% if M.page_setup.googleWebmasterTools.id ~= '' then %>
  688. <meta name="google-site-verification" content="<%= M.page_setup.googleWebmasterTools.id %>" />
  689. <% end %>
  690. <title><%= pageTitle %></title>
  691. <% if publish and (M.sharing.ogp or M.sharing.display) and not cart then %>
  692. <!-- Open Graph Protocol (Facebook) and Twitter Information -->
  693. <!-- http://developers.facebook.com/tools/debug -->
  694. <link rel="image_src" href="<% write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">")%>photos/<%= pageImageFile %>" />
  695. <meta property="og:description" content="<%= socialDescription %>" />
  696. <meta property="og:image" content="<% write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">")%>photos/<%= pageImageFile %>" />
  697. <meta property="og:site_name" content="<%= M.page_setup.html.title %>" />
  698. <meta property="og:type" content="website" />
  699. <meta property="og:title" content="<%= socialTitle %>" />
  700. <% if single then %>
  701. <meta property="og:url" content="<% write("<?php echo currentPageURL(); ".."?"..">")%>" />
  702. <% else %>
  703. <meta property="og:url" content="<% write("<?php echo currentPageLocation(); ".."?"..">")%>/" />
  704. <% end %>
  705. <!-- https://dev.twitter.com/docs/cards/preview -->
  706. <meta name="twitter:card" value="<% if not publisher and pageImageFile == '????????.DNG' then %>summary<% else %>summary_large_image<% end %>" />
  707. <% if M.sharing.twitter.creator ~= "" then %>
  708. <meta name="twitter:creator" value="@<%= M.sharing.twitter.creator %>" />
  709. <% end %>
  710. <meta name="twitter:description" value="<%= socialDescription %>" />
  711. <meta name="twitter:image" value="<% write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">")%>photos/<%= pageImageFile %>" />
  712. <meta name="twitter:image:src" value="<% write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">")%>photos/<%= pageImageFile %>" />
  713. <meta name="twitter:site" value="@<%= M.sharing.twitter.creator %>" />
  714. <meta name="twitter:title" value="<%= socialTitle %>" />
  715. <% if single then %>
  716. <meta name="twitter:url" value="<% write("<?php echo currentPageURL(); ".."?"..">")%>" />
  717. <% else %>
  718. <meta name="twitter:url" value="<% write("<?php echo currentPageLocation(); ".."?"..">")%>/" />
  719. <% end %>
  720. <% if single then %>
  721. <link rel="canonical" href="<% write("<?php echo currentPageURL(); ".."?"..">")%>" />
  722. <% else %>
  723. <link rel="canonical" href="<% write("<?php echo currentPageLocation(); ".."?"..">")%>/" />
  724. <% end %>
  725. <% end %>
  726. <% if mode == 'publish' and M.page_setup.blog.feed ~= "" then %>
  727. <link rel="alternate" type="application/rss+xml" title="<%= M.page_setup.blog.title %>" href="<%= M.page_setup.blog.feed %>" />
  728. <% end %>
  729. <% if M.page_setup.appletouchicon.address ~= "" then %>
  730. <link rel="apple-touch-icon-precomposed" href="<% if M.page_setup.appletouchicon.address == '... apple-touch-icon.png' then %><%= sharedResources %>/images/apple-touch-icon.png<% else %><%= M.page_setup.appletouchicon.address %><% end %>" />
  731. <% end %>
  732. <% if M.page_setup.favicon.address ~= "" then %>
  733. <link rel="icon" type="image/x-icon" href="<% if M.page_setup.favicon.address == '... favicon.ico' then %><%= sharedResources %>/images/favicon.ico<% else %><%= M.page_setup.favicon.address %><% end %>" />
  734. <% end %>
  735. <% if mode == 'publish' and not cart and not mobile and not single then %>
  736. <script>
  737. if (screen.width < 768 || navigator.userAgent.match(/Android|Blackberry|SymbianOS|iPhone|iPod|iPad/i)){
  738. window.location.replace('mobile.<% if M.is.php or publisher then %>php<% else %>html<% end %><% if publisher then write("<?php echo isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ? '?'.$_SERVER['QUERY_STRING'] : ''; ".."?"..">") end %>'); }
  739. </script>
  740. <% end %>
  741. <link rel="stylesheet" type="text/css" media="all" href="<%= sharedResources %>/css/scaffolding.min.css" />
  742. <link rel="stylesheet" type="text/css" media="all" href="<%= sharedResources %>/css/font-awesome.min.css" />
  743. <%
  744. if mode == 'preview' then %>
  745. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/01-typography.css" />
  746. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/02-page-structure.css" />
  747. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/03-masthead.css" />
  748. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/05-social-media-profiles.css" />
  749. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/05-social-media-sharing.css" />
  750. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/06-footer.css" />
  751. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/07-the-block.css" />
  752. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/08-the-grid.css" />
  753. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/09-grid-layout.css" />
  754. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/10-presentation.css" />
  755. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/20-pagination.css" />
  756. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/100-miscellaneous.css" />
  757. <% if major <= 5 then %>
  758. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/101-gradients-for-LR-preview.css" />
  759. <% end %>
  760. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/04-navigation-01.css" />
  761. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/04-navigation-02.css" />
  762. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/04-navigation-03.css" />
  763. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/04-navigation-04.css" />
  764. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/04-navigation-05.css" />
  765. <% else %>
  766. <link rel="stylesheet" type="text/css" media="all" href="<%= sharedResources %>/css/style-common.css" />
  767. <link rel="stylesheet" type="text/css" media="all" href="<%= resources %>/css/style-component.css" />
  768. <% if cart and publish then
  769. write(" <?php HTMLHelper::stylesheet('cart.css'); ".."?"..">")
  770. write(" <?php HTMLHelper::stylesheet('modal.css'); ".."?"..">")
  771. end %>
  772. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  773. "$add_mode = true;\n"..
  774. "if ( function_exists('ttg_style_navigation') ) {\n"..
  775. " if ( !(ttg_style_navigation( TTG_COMP, TTG_ROOT )) ) {\n"..
  776. " $add_mode = false;\n"..
  777. " }\n"..
  778. "}\n"..
  779. "if ( $add_mode ) { ".."?"..">") end %>
  780. <% if M.navigation.display then %>
  781. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/css/navigation.css" />
  782. <% end --[[ navigation.display ]] %>
  783. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_style_navigation ]] %>
  784. <% end --[[ style ]] %>
  785. <link rel="stylesheet" type="text/css" media="print" href="<%= sharedResources %>/css/print.css" />
  786. <script src="<%= sharedResources %>/js/modernizr.custom.79601.js"></script>
  787. <script src="<%= sharedResources %>/js/jquery-1.11.3.min.js"></script>
  788. <script src="<%= sharedResources %>/js/jquery.ba-throttle-debounce.min.js"></script>
  789. <script src="<%= sharedResources %>/js/init.head.min.js"></script>
  790. <% if cart and publish then %>
  791. <script>
  792. var continueLocation = '<?php echo isset($_SESSION['referer'])?$_SESSION['referer']:' / '; ?>';
  793. </script>
  794. <% write(" <?php HTMLHelper::script('cart.js'); ".."?"..">")
  795. end %>
  796. <% if single then %>
  797. <script>
  798. // if referrer is mobile, return to mobile
  799. $(document).ready(function() {
  800. // var hash = window.location.hash;
  801. var vars = [], hash,
  802. q = document.URL.split('?')[1];
  803. if(q != undefined){
  804. q = q.split('&');
  805. for(var i = 0; i < q.length; i++){
  806. hash = q[i].split('=');
  807. vars.push(hash[1]);
  808. vars[hash[0]] = hash[1];
  809. }
  810. }
  811. $("#single-image-slide a").on("click", function(e){
  812. if(vars['mobile']){
  813. e.preventDefault();
  814. location.href=$("#single-image-slide a").attr("href") + "?mobile=true";
  815. }
  816. });
  817. $("li.index a").on("click", function(e){
  818. if(vars['mobile']){
  819. e.preventDefault();
  820. location.href="mobile.<% if M.is.php or publisher then %>php<% else %>html<% end %>#cell-" + $("#single-image-slide img").attr("id");
  821. }
  822. });
  823. $("li.next a").on("click", function(e){
  824. if(vars['mobile']){
  825. e.preventDefault();
  826. location.href=$("li.next a").attr("href") + "?mobile=true";
  827. }
  828. });
  829. $("li.previous a").on("click", function(e){
  830. if(vars['mobile']){
  831. e.preventDefault();
  832. location.href=$("li.previous a").attr("href") + "?mobile=true";
  833. }
  834. });
  835. <% if M.imageDownload.enable then %>
  836. if(vars['mobile']){
  837. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  838. $(".single-image-download,.single-cart-button").hide();
  839. <% else %>
  840. $(".single-image-download").hide();
  841. <% end %>
  842. }
  843. <% end %>
  844. });
  845. </script>
  846. <% end %>
  847. <% if mode == 'publish' and M.cart.integration.enabled and not cart then %>
  848. <script>
  849. var options = {
  850. magnific_exists: true,
  851. cart_url: '<%= M.cart.integration.path %>',
  852. <% if publisher then %>
  853. pricing_scheme: '<% write("<?php echo $album->getPricingScheme(); ".."?"..">")%>',
  854. <% else %>
  855. pricing_scheme: '<%= M.cart.integration.pricing %>',
  856. <% end %>
  857. local_js_path: '<%= resources %>/js/',
  858. button_html: '',
  859. gallery_selector: '#page-body',
  860. cart_button_selector: '.add-to-cart',
  861. };
  862. // Do not edit below this line
  863. options['cart_url'] += (options['cart_url'][options['cart_url'].length-1])!='/'?'/':'';
  864. $(function() {
  865. jQuery.getScript(options['cart_url'] + 'lib/js/jquery.ttgcart-ce4.js', function() {
  866. if (!("TTGCart" in window)) {
  867. return;
  868. }
  869. $('body').ttgcart(options);
  870. options['cart_button_selector'] = '.add-package-to-cart';
  871. $('body').ttgpackage(options);
  872. });
  873. });
  874. </script>
  875. <% end %>
  876. <% if mode == 'publish' and M.page_setup.googleAnalytics.id ~= '' then %>
  877. <!-- Google Analytics -->
  878. <script>
  879. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  880. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  881. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  882. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  883. ga('create', '<%= M.page_setup.googleAnalytics.id %>');
  884. ga('send', 'pageview');
  885. </script>
  886. <!-- End Google Analytics -->
  887. <% end %>
  888. <!--[if (gte IE 6)&(lte IE 8)]>
  889. <script src="<%= sharedResources %>/js/respond.min.js"></script>
  890. <![endif]-->
  891. <!--[if (lte IE 10)]>
  892. <![endif]-->
  893. <% if publish and M.phplugins.enable then write ("<?php\n" ..
  894. "if ( function_exists('ttg_head_end') ) {\n"..
  895. " $void = ttg_head_end( TTG_COMP, TTG_ROOT );\n"..
  896. "} ".."?"..">") end --[[ ttg_head_end ]] %>
  897. </head>
  898. <body class="<% if M.cart.integration.enabled and mode == 'publish' then %>cart-unready <% end %>clearfix">
  899. <% if publish and M.phplugins.enable then write ("<?php\n"..
  900. "if ( function_exists('ttg_body_top') ) {\n"..
  901. " $void = ttg_body_top( TTG_COMP, TTG_ROOT );\n"..
  902. "} ".."?"..">") end --[[ ttg_body_top ]] %>
  903. <div id="body-mantle" class="body-mantle clearfix">
  904. <div id="body-core" class="body-core clearfix">
  905. <% if M.masthead.orphan or (M.navigation.orphan and M.navigation.type ~= "column") then %>
  906. <div id="body-core-outer" class="body-core-outer clearfix">
  907. <% if M.masthead.orphan and not M.masthead.drop then %>
  908. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  909. "$add_mode = true;\n"..
  910. "if ( function_exists('ttg_header_masthead') ) {\n"..
  911. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  912. " $add_mode = false;\n"..
  913. " }\n"..
  914. "}\n"..
  915. "if ( $add_mode ) { ".."?"..">") end %>
  916. <% if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else %>
  917. <% if M.masthead.display and M.identityplate.role ~= "integrated" then %>
  918. <div id="masthead" class="block-id masthead clearfix">
  919. <div class="mantle clearfix">
  920. <div class="core clearfix">
  921. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  922. <div id="profile-image" class="profile-image clearfix">
  923. <div id="profile-icon" class="profile-icon clearfix">
  924. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a>
  925. </div>
  926. <div id="profile-labels" class="profile-labels clearfix">
  927. <% end %>
  928. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then %>
  929. <h1><span><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><%= M.masthead.h1.label %></a></span></h1>
  930. <% elseif M.masthead.h1.label ~= '' then %>
  931. <h1><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %></span></a></h1>
  932. <% end %>
  933. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then %>
  934. <h2><span><%= M.masthead.h2.label %></span></h2>
  935. <% elseif M.masthead.h2.label ~= '' then %>
  936. <h2><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a></h2>
  937. <% end %>
  938. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  939. </div>
  940. </div><!-- #profile-image -->
  941. <% end %>
  942. </div>
  943. </div>
  944. <% if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then %>
  945. <% if M.social_media.display then %>
  946. <div class="social-media-profiles social-media clearfix">
  947. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  948. <div class="mantle clearfix">
  949. <div class="core clearfix">
  950. <% end --[[ masthead ]] %>
  951. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  952. "$add_mode = true;\n"..
  953. "if ( function_exists('ttg_social_media') ) {\n"..
  954. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  955. " $add_mode = false;\n"..
  956. " }\n"..
  957. "}\n"..
  958. "if ( $add_mode ) { ".."?"..">") end %>
  959. <ul class="clearfix">
  960. <% if M.social_media.profiles.label ~= '' then %>
  961. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  962. <% end %>
  963. <% if M.social_media.profiles.user ~= '' then %>
  964. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  965. <% end %>
  966. <% if M.social_media.profiles.aboutme ~= '' then %>
  967. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  968. <% end %>
  969. <% if M.social_media.profiles.pinterest ~= '' then %>
  970. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  971. <% end %>
  972. <% if M.social_media.profiles.google_plus ~= '' then %>
  973. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  974. <% end %>
  975. <% if M.social_media.profiles.twitter ~= '' then %>
  976. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  977. <% end %>
  978. <% if M.social_media.profiles.linkedin ~= '' then %>
  979. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  980. <% end %>
  981. <% if M.social_media.profiles.facebook ~= '' then %>
  982. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  983. <% end %>
  984. <% if M.social_media.profiles.instagram ~= '' then %>
  985. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  986. <% end %>
  987. <% if M.social_media.profiles.tumblr ~= '' then %>
  988. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  989. <% end %>
  990. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  991. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  992. <% end %>
  993. <% if M.social_media.profiles.flickr ~= '' then %>
  994. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  995. <% end %>
  996. <% if M.social_media.profiles.behance ~= '' then %>
  997. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  998. <% end %>
  999. <% if M.social_media.profiles.vimeo ~= '' then %>
  1000. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1001. <% end %>
  1002. <% if M.social_media.profiles.youtube ~= '' then %>
  1003. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1004. <% end %>
  1005. <% if M.social_media.profiles.rss ~= '' then %>
  1006. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  1007. <% end %>
  1008. </ul>
  1009. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  1010. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1011. </div>
  1012. </div>
  1013. <% end --[[ masthead ]] %>
  1014. </div> <!-- #social-media-profiles -->
  1015. <% end --[[ social_media.display ]] %>
  1016. <% end %>
  1017. </div> <!-- #masthead -->
  1018. <% end --[[ masthead.display ]] %>
  1019. <% end --[[ help ]] %>
  1020. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] %>
  1021. <% end --[[ masthead.orphan ]] %>
  1022. <% if M.navigation.orphan then %>
  1023. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1024. "$add_mode = true;\n"..
  1025. "if ( function_exists('ttg_header_navigation') ) {\n"..
  1026. " if ( !(ttg_header_navigation( TTG_COMP, TTG_ROOT )) ) {\n"..
  1027. " $add_mode = false;\n"..
  1028. " }\n"..
  1029. "}\n"..
  1030. "if ( $add_mode ) { ".."?"..">") end %>
  1031. <% if mode == 'preview' and M.the_block.now_showing == 'help' then else %>
  1032. <% if M.navigation.display then %>
  1033. <div id="navigation-container" class="navigation-container clearfix">
  1034. <% if M.navigation.spurs.enable and not M.navigation.orphan then %>
  1035. <div class="navigation-left-spur"></div>
  1036. <% if M.navigation.type ~= 'column' then %>
  1037. <div class="navigation-right-spur"></div>
  1038. <% end %><% end %>
  1039. <div id="navigation" class="block-id navigation clearfix">
  1040. <div class="mantle clearfix">
  1041. <div class="core clearfix">
  1042. <div id="navigation-background">
  1043. <div id="r2d2-menu" class="clearfix">
  1044. <ul id="pull">
  1045. <% if M.identityplate.role == "integrated" then %>
  1046. <li id="integrated-mobile" class="ip-<%= M.identityplate.on %>">
  1047. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1048. </li>
  1049. <% end %>
  1050. <li><span> </span></li>
  1051. <li><span> </span></li>
  1052. <li><span> </span></li>
  1053. <li><span> </span></li>
  1054. <li id="open-nav"><a href="#r2d2-menu"><% if M.metadata.collapsed_label.navigation == "" then %><i class="fa fa-reorder"></i><% else %><span style="display:block;font-size:14px;"><%= M.metadata.collapsed_label.navigation %></span><% end %></a></li>
  1055. <li id="close-nav"><a href="#"><% if M.metadata.collapsed_label.navigation == "" then %><i class="fa fa-times"></i><% else %><span style="display:block;font-size:14px;"><%= M.metadata.collapsed_label.navigation %></span><% end %></a></li>
  1056. </ul><!-- #pull -->
  1057. <% if M.navigation.type == 'single-level' then %>
  1058. <p id="nav">
  1059. <% if M.identityplate.role == "integrated" then %>
  1060. <span id="integrated-identity" class="ip-<%= M.identityplate.on %>">
  1061. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1062. </span>
  1063. <% end %>
  1064. <% if M.nav_link.nav_01.label ~= "" then %> <span><a href="<%= menuTarget01 %>"<% if M.nav_link.nav_01.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_01.label %></a></span>
  1065. <% end %>
  1066. <% if M.nav_link.nav_02.label ~= "" then %> <span><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a></span>
  1067. <% end %>
  1068. <% if M.nav_link.nav_03.label ~= "" then %> <span><a href="<%= menuTarget03 %>"<% if M.nav_link.nav_03.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_03.label %></a></span>
  1069. <% end %>
  1070. <% if M.nav_link.nav_04.label ~= "" then %> <span><a href="<%= menuTarget04 %>"<% if M.nav_link.nav_04.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_04.label %></a></span>
  1071. <% end %>
  1072. <% if M.nav_link.nav_05.label ~= "" then %> <span><a href="<%= menuTarget05 %>"<% if M.nav_link.nav_05.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_05.label %></a></span>
  1073. <% end %>
  1074. <% if M.nav_link.nav_06.label ~= "" then %> <span><a href="<%= menuTarget06 %>"<% if M.nav_link.nav_06.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_06.label %></a></span>
  1075. <% end %>
  1076. <% if M.nav_link.nav_07.label ~= "" then %> <span><a href="<%= menuTarget07 %>"<% if M.nav_link.nav_07.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_07.label %></a></span>
  1077. <% end %>
  1078. <% if M.nav_link.nav_08.label ~= "" then %> <span><a href="<%= menuTarget08 %>"<% if M.nav_link.nav_08.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_08.label %></a></span>
  1079. <% end %>
  1080. <% if M.nav_link.nav_09.label ~= "" then %> <span><a href="<%= menuTarget09 %>"<% if M.nav_link.nav_09.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_09.label %></a></span>
  1081. <% end %>
  1082. <% if M.nav_link.nav_10.label ~= "" then %> <span><a href="<%= menuTarget10 %>"<% if M.nav_link.nav_10.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_10.label %></a></span>
  1083. <% end %>
  1084. </p><!-- #nav -->
  1085. <% elseif M.navigation.type == 'multi-level' then %>
  1086. <ul id="nav">
  1087. <% if M.identityplate.role == "integrated" then %>
  1088. <li id="integrated-identity" class="ip-<%= M.identityplate.on %>">
  1089. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1090. </li>
  1091. <% end %>
  1092. <% if M.nav_link.nav_01.label ~= "" then %> <li><a href="<%= menuTarget01 %>"<% if M.nav_link.nav_01.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_01.label %></a></li>
  1093. <% end %>
  1094. <% if M.nav_link.nav_02.label ~= "" and mode == 'publish' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a></li>
  1095. <% elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a>
  1096. <ul>
  1097. <li><a href="#">Example Drop-down Menus :</a></li>
  1098. <li><a href="#">A Few Good Bands</a>
  1099. <ul>
  1100. <li><a href="#">Efterklang</a></li>
  1101. <li><a href="#">Émilie Simon</a></li>
  1102. <li><a href="#">Liam Finn</a></li>
  1103. <li><a href="#">Sigur Rós</a></li>
  1104. <li><a href="#">The Dø</a></li>
  1105. </ul>
  1106. </li>
  1107. <li><a href="#">A Few Good Movies</a>
  1108. <ul>
  1109. <li><a href="#">Blade Runner</a></li>
  1110. <li><a href="#">The Brothers Bloom</a></li>
  1111. <li><a href="#">The Darjeeling Limited</a></li>
  1112. <li><a href="#">The Life Aquatic w/ Steve Zissou</a></li>
  1113. <li><a href="#">Pacific Rim</a></li>
  1114. </ul>
  1115. </li>
  1116. <li><a href="#">A Few Good TV Shows</a>
  1117. <ul>
  1118. <li><a href="#">Battlestar Galactica</a></li>
  1119. <li><a href="#">Castle</a></li>
  1120. <li><a href="#">Doctor Who</a></li>
  1121. <li><a href="#">Eureka</a></li>
  1122. <li><a href="#">Farscape</a></li>
  1123. <li><a href="#">Firefly</a></li>
  1124. <li><a href="#">Legend of Korra</a></li>
  1125. <li><a href="#">Luther</a></li>
  1126. </ul>
  1127. </li>
  1128. </ul>
  1129. </li>
  1130. <% end %>
  1131. <% if M.nav_link.nav_03.label ~= "" then %> <li><a href="<%= menuTarget03 %>"<% if M.nav_link.nav_03.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_03.label %></a></li>
  1132. <% end %>
  1133. <% if M.nav_link.nav_04.label ~= "" then %> <li><a href="<%= menuTarget04 %>"<% if M.nav_link.nav_04.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_04.label %></a></li>
  1134. <% end %>
  1135. <% if M.nav_link.nav_05.label ~= "" then %> <li><a href="<%= menuTarget05 %>"<% if M.nav_link.nav_05.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_05.label %></a></li>
  1136. <% end %>
  1137. <% if M.nav_link.nav_06.label ~= "" then %> <li><a href="<%= menuTarget06 %>"<% if M.nav_link.nav_06.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_06.label %></a></li>
  1138. <% end %>
  1139. <% if M.nav_link.nav_07.label ~= "" then %> <li><a href="<%= menuTarget07 %>"<% if M.nav_link.nav_07.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_07.label %></a></li>
  1140. <% end %>
  1141. <% if M.nav_link.nav_08.label ~= "" then %> <li><a href="<%= menuTarget08 %>"<% if M.nav_link.nav_08.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_08.label %></a></li>
  1142. <% end %>
  1143. <% if M.nav_link.nav_09.label ~= "" then %> <li><a href="<%= menuTarget09 %>"<% if M.nav_link.nav_09.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_09.label %></a></li>
  1144. <% end %>
  1145. <% if M.nav_link.nav_10.label ~= "" then %> <li><a href="<%= menuTarget10 %>"<% if M.nav_link.nav_10.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_10.label %></a></li>
  1146. <% end %>
  1147. </ul><!-- #nav -->
  1148. <% elseif M.navigation.type == 'column' then %>
  1149. <ul id="nav">
  1150. <% if M.identityplate.role == "integrated" then %>
  1151. <li id="integrated-identity" class="ip-<%= M.identityplate.on %>">
  1152. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1153. </li>
  1154. <% end %>
  1155. <% if M.nav_link.nav_01.label ~= "" then %> <li><a href="<%= menuTarget01 %>"<% if M.nav_link.nav_01.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_01.label %></a></li>
  1156. <% end %>
  1157. <% if M.nav_link.nav_02.label ~= "" and mode == 'publish' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a></li>
  1158. <% elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a>
  1159. <ul>
  1160. <li><a href="#">Example Child Menus :</a></li>
  1161. <li><a href="#">A Few Good Bands</a>
  1162. <ul>
  1163. <li><a href="#">Efterklang</a></li>
  1164. <li><a href="#">Émilie Simon</a></li>
  1165. <li><a href="#">Liam Finn</a></li>
  1166. <li><a href="#">Sigur Rós</a></li>
  1167. <li><a href="#">The Dø</a></li>
  1168. </ul>
  1169. </li>
  1170. </ul>
  1171. </li>
  1172. <% end %>
  1173. <% if M.nav_link.nav_03.label ~= "" then %> <li><a href="<%= menuTarget03 %>"<% if M.nav_link.nav_03.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_03.label %></a></li>
  1174. <% end %>
  1175. <% if M.nav_link.nav_04.label ~= "" then %> <li><a href="<%= menuTarget04 %>"<% if M.nav_link.nav_04.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_04.label %></a></li>
  1176. <% end %>
  1177. <% if M.nav_link.nav_05.label ~= "" then %> <li><a href="<%= menuTarget05 %>"<% if M.nav_link.nav_05.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_05.label %></a></li>
  1178. <% end %>
  1179. <% if M.nav_link.nav_06.label ~= "" then %> <li><a href="<%= menuTarget06 %>"<% if M.nav_link.nav_06.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_06.label %></a></li>
  1180. <% end %>
  1181. <% if M.nav_link.nav_07.label ~= "" then %> <li><a href="<%= menuTarget07 %>"<% if M.nav_link.nav_07.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_07.label %></a></li>
  1182. <% end %>
  1183. <% if M.nav_link.nav_08.label ~= "" then %> <li><a href="<%= menuTarget08 %>"<% if M.nav_link.nav_08.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_08.label %></a></li>
  1184. <% end %>
  1185. <% if M.nav_link.nav_09.label ~= "" then %> <li><a href="<%= menuTarget09 %>"<% if M.nav_link.nav_09.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_09.label %></a></li>
  1186. <% end %>
  1187. <% if M.nav_link.nav_10.label ~= "" then %> <li><a href="<%= menuTarget10 %>"<% if M.nav_link.nav_10.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_10.label %></a></li>
  1188. <% end %>
  1189. </ul><!-- #nav -->
  1190. <% end --[[ navigation.type ]] %>
  1191. </div><!-- #r2d2-menu -->
  1192. </div><!-- #navigation-background -->
  1193. </div>
  1194. </div>
  1195. </div> <!-- #navigation -->
  1196. <% if M.navigation.type == 'column' and M.social_media.profiles.location == 'navigation-column' then %>
  1197. <% if M.social_media.display then %>
  1198. <div class="social-media-profiles social-media clearfix">
  1199. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1200. <div class="mantle clearfix">
  1201. <div class="core clearfix">
  1202. <% end --[[ masthead ]] %>
  1203. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1204. "$add_mode = true;\n"..
  1205. "if ( function_exists('ttg_social_media') ) {\n"..
  1206. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1207. " $add_mode = false;\n"..
  1208. " }\n"..
  1209. "}\n"..
  1210. "if ( $add_mode ) { ".."?"..">") end %>
  1211. <ul class="clearfix">
  1212. <% if M.social_media.profiles.label ~= '' then %>
  1213. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  1214. <% end %>
  1215. <% if M.social_media.profiles.user ~= '' then %>
  1216. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  1217. <% end %>
  1218. <% if M.social_media.profiles.aboutme ~= '' then %>
  1219. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  1220. <% end %>
  1221. <% if M.social_media.profiles.pinterest ~= '' then %>
  1222. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1223. <% end %>
  1224. <% if M.social_media.profiles.google_plus ~= '' then %>
  1225. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1226. <% end %>
  1227. <% if M.social_media.profiles.twitter ~= '' then %>
  1228. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1229. <% end %>
  1230. <% if M.social_media.profiles.linkedin ~= '' then %>
  1231. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1232. <% end %>
  1233. <% if M.social_media.profiles.facebook ~= '' then %>
  1234. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1235. <% end %>
  1236. <% if M.social_media.profiles.instagram ~= '' then %>
  1237. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1238. <% end %>
  1239. <% if M.social_media.profiles.tumblr ~= '' then %>
  1240. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1241. <% end %>
  1242. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  1243. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1244. <% end %>
  1245. <% if M.social_media.profiles.flickr ~= '' then %>
  1246. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1247. <% end %>
  1248. <% if M.social_media.profiles.behance ~= '' then %>
  1249. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  1250. <% end %>
  1251. <% if M.social_media.profiles.vimeo ~= '' then %>
  1252. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1253. <% end %>
  1254. <% if M.social_media.profiles.youtube ~= '' then %>
  1255. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1256. <% end %>
  1257. <% if M.social_media.profiles.rss ~= '' then %>
  1258. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  1259. <% end %>
  1260. </ul>
  1261. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  1262. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1263. </div>
  1264. </div>
  1265. <% end --[[ masthead ]] %>
  1266. </div> <!-- #social-media-profiles -->
  1267. <% end --[[ social_media.display ]] %>
  1268. <% end %>
  1269. </div> <!-- #navigation-container -->
  1270. <% end --[[ navigation.display ]] %>
  1271. <% end --[[ help ]] %>
  1272. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_navigation ]] %>
  1273. <% if M.cart.integration.enabled then %>
  1274. <div id="status-bar" class="block-id status-bar clearfix"<% if mode == 'publish' then %> style="display:none;"<% end %>>
  1275. <div class="mantle clearfix">
  1276. <div class="core clearfix">
  1277. <% if mode == 'publish' then %>
  1278. <ul id="cart-status" class="status-buttons clearfix"></ul>
  1279. <% else %>
  1280. <ul id="cart-status" class="status-buttons clearfix">
  1281. <li><a href="javascript:void(0);"><i class="fa fa-shopping-cart fa-fw"></i> 2 : $50.00<span class="currency"> USD</span><span class="view-cart"> / View Cart</span></a></a></li>
  1282. </ul>
  1283. <script>
  1284. $(function(){
  1285. $('#body-mantle').css('margin-top', $('#status-bar').height());
  1286. });
  1287. </script>
  1288. <% end %>
  1289. </div>
  1290. </div>
  1291. </div><!-- #status -->
  1292. <% end --[[ cart.integration ]] %>
  1293. <% end --[[ navigation.orphan ]] %>
  1294. <% if M.masthead.orphan and M.masthead.drop then %>
  1295. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1296. "$add_mode = true;\n"..
  1297. "if ( function_exists('ttg_header_masthead') ) {\n"..
  1298. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  1299. " $add_mode = false;\n"..
  1300. " }\n"..
  1301. "}\n"..
  1302. "if ( $add_mode ) { ".."?"..">") end %>
  1303. <% if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else %>
  1304. <% if M.masthead.display and M.identityplate.role ~= "integrated" then %>
  1305. <div id="masthead" class="block-id masthead clearfix">
  1306. <div class="mantle clearfix">
  1307. <div class="core clearfix">
  1308. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  1309. <div id="profile-image" class="profile-image clearfix">
  1310. <div id="profile-icon" class="profile-icon clearfix">
  1311. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a>
  1312. </div>
  1313. <div id="profile-labels" class="profile-labels clearfix">
  1314. <% end %>
  1315. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then %>
  1316. <h1><span><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><%= M.masthead.h1.label %></a></span></h1>
  1317. <% elseif M.masthead.h1.label ~= '' then %>
  1318. <h1><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %></span></a></h1>
  1319. <% end %>
  1320. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then %>
  1321. <h2><span><%= M.masthead.h2.label %></span></h2>
  1322. <% elseif M.masthead.h2.label ~= '' then %>
  1323. <h2><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a></h2>
  1324. <% end %>
  1325. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  1326. </div>
  1327. </div><!-- #profile-image -->
  1328. <% end %>
  1329. </div>
  1330. </div>
  1331. <% if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then %>
  1332. <% if M.social_media.display then %>
  1333. <div class="social-media-profiles social-media clearfix">
  1334. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1335. <div class="mantle clearfix">
  1336. <div class="core clearfix">
  1337. <% end --[[ masthead ]] %>
  1338. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1339. "$add_mode = true;\n"..
  1340. "if ( function_exists('ttg_social_media') ) {\n"..
  1341. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1342. " $add_mode = false;\n"..
  1343. " }\n"..
  1344. "}\n"..
  1345. "if ( $add_mode ) { ".."?"..">") end %>
  1346. <ul class="clearfix">
  1347. <% if M.social_media.profiles.label ~= '' then %>
  1348. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  1349. <% end %>
  1350. <% if M.social_media.profiles.user ~= '' then %>
  1351. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  1352. <% end %>
  1353. <% if M.social_media.profiles.aboutme ~= '' then %>
  1354. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  1355. <% end %>
  1356. <% if M.social_media.profiles.pinterest ~= '' then %>
  1357. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1358. <% end %>
  1359. <% if M.social_media.profiles.google_plus ~= '' then %>
  1360. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1361. <% end %>
  1362. <% if M.social_media.profiles.twitter ~= '' then %>
  1363. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1364. <% end %>
  1365. <% if M.social_media.profiles.linkedin ~= '' then %>
  1366. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1367. <% end %>
  1368. <% if M.social_media.profiles.facebook ~= '' then %>
  1369. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1370. <% end %>
  1371. <% if M.social_media.profiles.instagram ~= '' then %>
  1372. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1373. <% end %>
  1374. <% if M.social_media.profiles.tumblr ~= '' then %>
  1375. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1376. <% end %>
  1377. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  1378. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1379. <% end %>
  1380. <% if M.social_media.profiles.flickr ~= '' then %>
  1381. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1382. <% end %>
  1383. <% if M.social_media.profiles.behance ~= '' then %>
  1384. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  1385. <% end %>
  1386. <% if M.social_media.profiles.vimeo ~= '' then %>
  1387. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1388. <% end %>
  1389. <% if M.social_media.profiles.youtube ~= '' then %>
  1390. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1391. <% end %>
  1392. <% if M.social_media.profiles.rss ~= '' then %>
  1393. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  1394. <% end %>
  1395. </ul>
  1396. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  1397. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1398. </div>
  1399. </div>
  1400. <% end --[[ masthead ]] %>
  1401. </div> <!-- #social-media-profiles -->
  1402. <% end --[[ social_media.display ]] %>
  1403. <% end %>
  1404. </div> <!-- #masthead -->
  1405. <% end --[[ masthead.display ]] %>
  1406. <% end --[[ help ]] %>
  1407. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] %>
  1408. <% end --[[ masthead.orphan ]] %>
  1409. </div> <!-- #body-core-outer -->
  1410. <% end --[[ orphans ]] %>
  1411. <div id="body-core-inner" class="body-core-inner clearfix">
  1412. <section>
  1413. <div id="page-body" class="page-body<% if M.footer.concrete_shoes then %> concrete-shoes<% end %><% if M.cart.integration.enabled then %> cart<% end %> clearfix">
  1414. <% if not M.masthead.orphan and not M.masthead.drop then %>
  1415. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1416. "$add_mode = true;\n"..
  1417. "if ( function_exists('ttg_header_masthead') ) {\n"..
  1418. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  1419. " $add_mode = false;\n"..
  1420. " }\n"..
  1421. "}\n"..
  1422. "if ( $add_mode ) { ".."?"..">") end %>
  1423. <% if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else %>
  1424. <% if M.masthead.display and M.identityplate.role ~= "integrated" then %>
  1425. <div id="masthead" class="block-id masthead clearfix">
  1426. <div class="mantle clearfix">
  1427. <div class="core clearfix">
  1428. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  1429. <div id="profile-image" class="profile-image clearfix">
  1430. <div id="profile-icon" class="profile-icon clearfix">
  1431. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a>
  1432. </div>
  1433. <div id="profile-labels" class="profile-labels clearfix">
  1434. <% end %>
  1435. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then %>
  1436. <h1><span><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><%= M.masthead.h1.label %></a></span></h1>
  1437. <% elseif M.masthead.h1.label ~= '' then %>
  1438. <h1><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %></span></a></h1>
  1439. <% end %>
  1440. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then %>
  1441. <h2><span><%= M.masthead.h2.label %></span></h2>
  1442. <% elseif M.masthead.h2.label ~= '' then %>
  1443. <h2><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a></h2>
  1444. <% end %>
  1445. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  1446. </div>
  1447. </div><!-- #profile-image -->
  1448. <% end %>
  1449. </div>
  1450. </div>
  1451. <% if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then %>
  1452. <% if M.social_media.display then %>
  1453. <div class="social-media-profiles social-media clearfix">
  1454. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1455. <div class="mantle clearfix">
  1456. <div class="core clearfix">
  1457. <% end --[[ masthead ]] %>
  1458. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1459. "$add_mode = true;\n"..
  1460. "if ( function_exists('ttg_social_media') ) {\n"..
  1461. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1462. " $add_mode = false;\n"..
  1463. " }\n"..
  1464. "}\n"..
  1465. "if ( $add_mode ) { ".."?"..">") end %>
  1466. <ul class="clearfix">
  1467. <% if M.social_media.profiles.label ~= '' then %>
  1468. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  1469. <% end %>
  1470. <% if M.social_media.profiles.user ~= '' then %>
  1471. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  1472. <% end %>
  1473. <% if M.social_media.profiles.aboutme ~= '' then %>
  1474. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  1475. <% end %>
  1476. <% if M.social_media.profiles.pinterest ~= '' then %>
  1477. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1478. <% end %>
  1479. <% if M.social_media.profiles.google_plus ~= '' then %>
  1480. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1481. <% end %>
  1482. <% if M.social_media.profiles.twitter ~= '' then %>
  1483. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1484. <% end %>
  1485. <% if M.social_media.profiles.linkedin ~= '' then %>
  1486. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1487. <% end %>
  1488. <% if M.social_media.profiles.facebook ~= '' then %>
  1489. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1490. <% end %>
  1491. <% if M.social_media.profiles.instagram ~= '' then %>
  1492. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1493. <% end %>
  1494. <% if M.social_media.profiles.tumblr ~= '' then %>
  1495. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1496. <% end %>
  1497. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  1498. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1499. <% end %>
  1500. <% if M.social_media.profiles.flickr ~= '' then %>
  1501. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1502. <% end %>
  1503. <% if M.social_media.profiles.behance ~= '' then %>
  1504. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  1505. <% end %>
  1506. <% if M.social_media.profiles.vimeo ~= '' then %>
  1507. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1508. <% end %>
  1509. <% if M.social_media.profiles.youtube ~= '' then %>
  1510. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1511. <% end %>
  1512. <% if M.social_media.profiles.rss ~= '' then %>
  1513. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  1514. <% end %>
  1515. </ul>
  1516. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  1517. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1518. </div>
  1519. </div>
  1520. <% end --[[ masthead ]] %>
  1521. </div> <!-- #social-media-profiles -->
  1522. <% end --[[ social_media.display ]] %>
  1523. <% end %>
  1524. </div> <!-- #masthead -->
  1525. <% end --[[ masthead.display ]] %>
  1526. <% end --[[ help ]] %>
  1527. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] %>
  1528. <% end --[[ masthead.orphan ]] %>
  1529. <% if not M.navigation.orphan then %>
  1530. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1531. "$add_mode = true;\n"..
  1532. "if ( function_exists('ttg_header_navigation') ) {\n"..
  1533. " if ( !(ttg_header_navigation( TTG_COMP, TTG_ROOT )) ) {\n"..
  1534. " $add_mode = false;\n"..
  1535. " }\n"..
  1536. "}\n"..
  1537. "if ( $add_mode ) { ".."?"..">") end %>
  1538. <% if mode == 'preview' and M.the_block.now_showing == 'help' then else %>
  1539. <% if M.navigation.display then %>
  1540. <div id="navigation-container" class="navigation-container clearfix">
  1541. <% if M.navigation.spurs.enable and not M.navigation.orphan then %>
  1542. <div class="navigation-left-spur"></div>
  1543. <% if M.navigation.type ~= 'column' then %>
  1544. <div class="navigation-right-spur"></div>
  1545. <% end %><% end %>
  1546. <div id="navigation" class="block-id navigation clearfix">
  1547. <div class="mantle clearfix">
  1548. <div class="core clearfix">
  1549. <div id="navigation-background">
  1550. <div id="r2d2-menu" class="clearfix">
  1551. <ul id="pull">
  1552. <% if M.identityplate.role == "integrated" then %>
  1553. <li id="integrated-mobile" class="ip-<%= M.identityplate.on %>">
  1554. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1555. </li>
  1556. <% end %>
  1557. <li><span> </span></li>
  1558. <li><span> </span></li>
  1559. <li><span> </span></li>
  1560. <li><span> </span></li>
  1561. <li id="open-nav"><a href="#r2d2-menu"><% if M.metadata.collapsed_label.navigation == "" then %><i class="fa fa-reorder"></i><% else %><span style="display:block;font-size:14px;"><%= M.metadata.collapsed_label.navigation %></span><% end %></a></li>
  1562. <li id="close-nav"><a href="#"><% if M.metadata.collapsed_label.navigation == "" then %><i class="fa fa-times"></i><% else %><span style="display:block;font-size:14px;"><%= M.metadata.collapsed_label.navigation %></span><% end %></a></li>
  1563. </ul><!-- #pull -->
  1564. <% if M.navigation.type == 'single-level' then %>
  1565. <p id="nav">
  1566. <% if M.identityplate.role == "integrated" then %>
  1567. <span id="integrated-identity" class="ip-<%= M.identityplate.on %>">
  1568. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1569. </span>
  1570. <% end %>
  1571. <% if M.nav_link.nav_01.label ~= "" then %> <span><a href="<%= menuTarget01 %>"<% if M.nav_link.nav_01.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_01.label %></a></span>
  1572. <% end %>
  1573. <% if M.nav_link.nav_02.label ~= "" then %> <span><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a></span>
  1574. <% end %>
  1575. <% if M.nav_link.nav_03.label ~= "" then %> <span><a href="<%= menuTarget03 %>"<% if M.nav_link.nav_03.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_03.label %></a></span>
  1576. <% end %>
  1577. <% if M.nav_link.nav_04.label ~= "" then %> <span><a href="<%= menuTarget04 %>"<% if M.nav_link.nav_04.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_04.label %></a></span>
  1578. <% end %>
  1579. <% if M.nav_link.nav_05.label ~= "" then %> <span><a href="<%= menuTarget05 %>"<% if M.nav_link.nav_05.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_05.label %></a></span>
  1580. <% end %>
  1581. <% if M.nav_link.nav_06.label ~= "" then %> <span><a href="<%= menuTarget06 %>"<% if M.nav_link.nav_06.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_06.label %></a></span>
  1582. <% end %>
  1583. <% if M.nav_link.nav_07.label ~= "" then %> <span><a href="<%= menuTarget07 %>"<% if M.nav_link.nav_07.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_07.label %></a></span>
  1584. <% end %>
  1585. <% if M.nav_link.nav_08.label ~= "" then %> <span><a href="<%= menuTarget08 %>"<% if M.nav_link.nav_08.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_08.label %></a></span>
  1586. <% end %>
  1587. <% if M.nav_link.nav_09.label ~= "" then %> <span><a href="<%= menuTarget09 %>"<% if M.nav_link.nav_09.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_09.label %></a></span>
  1588. <% end %>
  1589. <% if M.nav_link.nav_10.label ~= "" then %> <span><a href="<%= menuTarget10 %>"<% if M.nav_link.nav_10.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_10.label %></a></span>
  1590. <% end %>
  1591. </p><!-- #nav -->
  1592. <% elseif M.navigation.type == 'multi-level' then %>
  1593. <ul id="nav">
  1594. <% if M.identityplate.role == "integrated" then %>
  1595. <li id="integrated-identity" class="ip-<%= M.identityplate.on %>">
  1596. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1597. </li>
  1598. <% end %>
  1599. <% if M.nav_link.nav_01.label ~= "" then %> <li><a href="<%= menuTarget01 %>"<% if M.nav_link.nav_01.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_01.label %></a></li>
  1600. <% end %>
  1601. <% if M.nav_link.nav_02.label ~= "" and mode == 'publish' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a></li>
  1602. <% elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a>
  1603. <ul>
  1604. <li><a href="#">Example Drop-down Menus :</a></li>
  1605. <li><a href="#">A Few Good Bands</a>
  1606. <ul>
  1607. <li><a href="#">Efterklang</a></li>
  1608. <li><a href="#">Émilie Simon</a></li>
  1609. <li><a href="#">Liam Finn</a></li>
  1610. <li><a href="#">Sigur Rós</a></li>
  1611. <li><a href="#">The Dø</a></li>
  1612. </ul>
  1613. </li>
  1614. <li><a href="#">A Few Good Movies</a>
  1615. <ul>
  1616. <li><a href="#">Blade Runner</a></li>
  1617. <li><a href="#">The Brothers Bloom</a></li>
  1618. <li><a href="#">The Darjeeling Limited</a></li>
  1619. <li><a href="#">The Life Aquatic w/ Steve Zissou</a></li>
  1620. <li><a href="#">Pacific Rim</a></li>
  1621. </ul>
  1622. </li>
  1623. <li><a href="#">A Few Good TV Shows</a>
  1624. <ul>
  1625. <li><a href="#">Battlestar Galactica</a></li>
  1626. <li><a href="#">Castle</a></li>
  1627. <li><a href="#">Doctor Who</a></li>
  1628. <li><a href="#">Eureka</a></li>
  1629. <li><a href="#">Farscape</a></li>
  1630. <li><a href="#">Firefly</a></li>
  1631. <li><a href="#">Legend of Korra</a></li>
  1632. <li><a href="#">Luther</a></li>
  1633. </ul>
  1634. </li>
  1635. </ul>
  1636. </li>
  1637. <% end %>
  1638. <% if M.nav_link.nav_03.label ~= "" then %> <li><a href="<%= menuTarget03 %>"<% if M.nav_link.nav_03.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_03.label %></a></li>
  1639. <% end %>
  1640. <% if M.nav_link.nav_04.label ~= "" then %> <li><a href="<%= menuTarget04 %>"<% if M.nav_link.nav_04.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_04.label %></a></li>
  1641. <% end %>
  1642. <% if M.nav_link.nav_05.label ~= "" then %> <li><a href="<%= menuTarget05 %>"<% if M.nav_link.nav_05.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_05.label %></a></li>
  1643. <% end %>
  1644. <% if M.nav_link.nav_06.label ~= "" then %> <li><a href="<%= menuTarget06 %>"<% if M.nav_link.nav_06.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_06.label %></a></li>
  1645. <% end %>
  1646. <% if M.nav_link.nav_07.label ~= "" then %> <li><a href="<%= menuTarget07 %>"<% if M.nav_link.nav_07.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_07.label %></a></li>
  1647. <% end %>
  1648. <% if M.nav_link.nav_08.label ~= "" then %> <li><a href="<%= menuTarget08 %>"<% if M.nav_link.nav_08.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_08.label %></a></li>
  1649. <% end %>
  1650. <% if M.nav_link.nav_09.label ~= "" then %> <li><a href="<%= menuTarget09 %>"<% if M.nav_link.nav_09.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_09.label %></a></li>
  1651. <% end %>
  1652. <% if M.nav_link.nav_10.label ~= "" then %> <li><a href="<%= menuTarget10 %>"<% if M.nav_link.nav_10.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_10.label %></a></li>
  1653. <% end %>
  1654. </ul><!-- #nav -->
  1655. <% elseif M.navigation.type == 'column' then %>
  1656. <ul id="nav">
  1657. <% if M.identityplate.role == "integrated" then %>
  1658. <li id="integrated-identity" class="ip-<%= M.identityplate.on %>">
  1659. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.identityplate.on then %><img alt="<%= M.masthead.h1.label %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /><% else %><%= M.masthead.h1.label %><% end %></span></a>
  1660. </li>
  1661. <% end %>
  1662. <% if M.nav_link.nav_01.label ~= "" then %> <li><a href="<%= menuTarget01 %>"<% if M.nav_link.nav_01.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_01.label %></a></li>
  1663. <% end %>
  1664. <% if M.nav_link.nav_02.label ~= "" and mode == 'publish' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a></li>
  1665. <% elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then %> <li><a href="<%= menuTarget02 %>"<% if M.nav_link.nav_02.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_02.label %></a>
  1666. <ul>
  1667. <li><a href="#">Example Child Menus :</a></li>
  1668. <li><a href="#">A Few Good Bands</a>
  1669. <ul>
  1670. <li><a href="#">Efterklang</a></li>
  1671. <li><a href="#">Émilie Simon</a></li>
  1672. <li><a href="#">Liam Finn</a></li>
  1673. <li><a href="#">Sigur Rós</a></li>
  1674. <li><a href="#">The Dø</a></li>
  1675. </ul>
  1676. </li>
  1677. </ul>
  1678. </li>
  1679. <% end %>
  1680. <% if M.nav_link.nav_03.label ~= "" then %> <li><a href="<%= menuTarget03 %>"<% if M.nav_link.nav_03.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_03.label %></a></li>
  1681. <% end %>
  1682. <% if M.nav_link.nav_04.label ~= "" then %> <li><a href="<%= menuTarget04 %>"<% if M.nav_link.nav_04.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_04.label %></a></li>
  1683. <% end %>
  1684. <% if M.nav_link.nav_05.label ~= "" then %> <li><a href="<%= menuTarget05 %>"<% if M.nav_link.nav_05.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_05.label %></a></li>
  1685. <% end %>
  1686. <% if M.nav_link.nav_06.label ~= "" then %> <li><a href="<%= menuTarget06 %>"<% if M.nav_link.nav_06.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_06.label %></a></li>
  1687. <% end %>
  1688. <% if M.nav_link.nav_07.label ~= "" then %> <li><a href="<%= menuTarget07 %>"<% if M.nav_link.nav_07.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_07.label %></a></li>
  1689. <% end %>
  1690. <% if M.nav_link.nav_08.label ~= "" then %> <li><a href="<%= menuTarget08 %>"<% if M.nav_link.nav_08.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_08.label %></a></li>
  1691. <% end %>
  1692. <% if M.nav_link.nav_09.label ~= "" then %> <li><a href="<%= menuTarget09 %>"<% if M.nav_link.nav_09.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_09.label %></a></li>
  1693. <% end %>
  1694. <% if M.nav_link.nav_10.label ~= "" then %> <li><a href="<%= menuTarget10 %>"<% if M.nav_link.nav_10.open_new and mode == 'publish' then %><%= newWindow %><% end %>><%= M.nav_link.nav_10.label %></a></li>
  1695. <% end %>
  1696. </ul><!-- #nav -->
  1697. <% end --[[ navigation.type ]] %>
  1698. </div><!-- #r2d2-menu -->
  1699. </div><!-- #navigation-background -->
  1700. </div>
  1701. </div>
  1702. </div> <!-- #navigation -->
  1703. <% if M.navigation.type == 'column' and M.social_media.profiles.location == 'navigation-column' then %>
  1704. <% if M.social_media.display then %>
  1705. <div class="social-media-profiles social-media clearfix">
  1706. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1707. <div class="mantle clearfix">
  1708. <div class="core clearfix">
  1709. <% end --[[ masthead ]] %>
  1710. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1711. "$add_mode = true;\n"..
  1712. "if ( function_exists('ttg_social_media') ) {\n"..
  1713. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1714. " $add_mode = false;\n"..
  1715. " }\n"..
  1716. "}\n"..
  1717. "if ( $add_mode ) { ".."?"..">") end %>
  1718. <ul class="clearfix">
  1719. <% if M.social_media.profiles.label ~= '' then %>
  1720. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  1721. <% end %>
  1722. <% if M.social_media.profiles.user ~= '' then %>
  1723. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  1724. <% end %>
  1725. <% if M.social_media.profiles.aboutme ~= '' then %>
  1726. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  1727. <% end %>
  1728. <% if M.social_media.profiles.pinterest ~= '' then %>
  1729. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1730. <% end %>
  1731. <% if M.social_media.profiles.google_plus ~= '' then %>
  1732. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1733. <% end %>
  1734. <% if M.social_media.profiles.twitter ~= '' then %>
  1735. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1736. <% end %>
  1737. <% if M.social_media.profiles.linkedin ~= '' then %>
  1738. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1739. <% end %>
  1740. <% if M.social_media.profiles.facebook ~= '' then %>
  1741. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1742. <% end %>
  1743. <% if M.social_media.profiles.instagram ~= '' then %>
  1744. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1745. <% end %>
  1746. <% if M.social_media.profiles.tumblr ~= '' then %>
  1747. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1748. <% end %>
  1749. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  1750. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1751. <% end %>
  1752. <% if M.social_media.profiles.flickr ~= '' then %>
  1753. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1754. <% end %>
  1755. <% if M.social_media.profiles.behance ~= '' then %>
  1756. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  1757. <% end %>
  1758. <% if M.social_media.profiles.vimeo ~= '' then %>
  1759. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1760. <% end %>
  1761. <% if M.social_media.profiles.youtube ~= '' then %>
  1762. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1763. <% end %>
  1764. <% if M.social_media.profiles.rss ~= '' then %>
  1765. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  1766. <% end %>
  1767. </ul>
  1768. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  1769. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1770. </div>
  1771. </div>
  1772. <% end --[[ masthead ]] %>
  1773. </div> <!-- #social-media-profiles -->
  1774. <% end --[[ social_media.display ]] %>
  1775. <% end %>
  1776. </div> <!-- #navigation-container -->
  1777. <% end --[[ navigation.display ]] %>
  1778. <% end --[[ help ]] %>
  1779. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_navigation ]] %>
  1780. <% if M.cart.integration.enabled then %>
  1781. <div id="status-bar" class="block-id status-bar clearfix"<% if mode == 'publish' then %> style="display:none;"<% end %>>
  1782. <div class="mantle clearfix">
  1783. <div class="core clearfix">
  1784. <% if mode == 'publish' then %>
  1785. <ul id="cart-status" class="status-buttons clearfix"></ul>
  1786. <% else %>
  1787. <ul id="cart-status" class="status-buttons clearfix">
  1788. <li><a href="javascript:void(0);"><i class="fa fa-shopping-cart fa-fw"></i> 2 : $50.00<span class="currency"> USD</span><span class="view-cart"> / View Cart</span></a></a></li>
  1789. </ul>
  1790. <script>
  1791. $(function(){
  1792. $('#body-mantle').css('margin-top', $('#status-bar').height());
  1793. });
  1794. </script>
  1795. <% end %>
  1796. </div>
  1797. </div>
  1798. </div><!-- #status -->
  1799. <% end --[[ cart.integration ]] %>
  1800. <% end --[[ navigation.orphan ]] %>
  1801. <% if not M.masthead.orphan and M.masthead.drop then %>
  1802. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1803. "$add_mode = true;\n"..
  1804. "if ( function_exists('ttg_header_masthead') ) {\n"..
  1805. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  1806. " $add_mode = false;\n"..
  1807. " }\n"..
  1808. "}\n"..
  1809. "if ( $add_mode ) { ".."?"..">") end %>
  1810. <% if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else %>
  1811. <% if M.masthead.display and M.identityplate.role ~= "integrated" then %>
  1812. <div id="masthead" class="block-id masthead clearfix">
  1813. <div class="mantle clearfix">
  1814. <div class="core clearfix">
  1815. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  1816. <div id="profile-image" class="profile-image clearfix">
  1817. <div id="profile-icon" class="profile-icon clearfix">
  1818. <a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a>
  1819. </div>
  1820. <div id="profile-labels" class="profile-labels clearfix">
  1821. <% end %>
  1822. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then %>
  1823. <h1><span><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><%= M.masthead.h1.label %></a></span></h1>
  1824. <% elseif M.masthead.h1.label ~= '' then %>
  1825. <h1><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><span><% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %></span></a></h1>
  1826. <% end %>
  1827. <% if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then %>
  1828. <h2><span><%= M.masthead.h2.label %></span></h2>
  1829. <% elseif M.masthead.h2.label ~= '' then %>
  1830. <h2><a href="<% if mode == 'preview' then %>index.html<% else %><%= M.page_setup.site.root %><% end %>"><img alt="<% if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then %><%= M.masthead.h1.label %><% else %><%= M.page_setup.html.title %><% end %>" src="<%= sharedResources %>/images/identityplate.png" width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" /></a></h2>
  1831. <% end %>
  1832. <% if M.identityplate.on and M.identityplate.role == 'profile' then %>
  1833. </div>
  1834. </div><!-- #profile-image -->
  1835. <% end %>
  1836. </div>
  1837. </div>
  1838. <% if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then %>
  1839. <% if M.social_media.display then %>
  1840. <div class="social-media-profiles social-media clearfix">
  1841. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1842. <div class="mantle clearfix">
  1843. <div class="core clearfix">
  1844. <% end --[[ masthead ]] %>
  1845. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1846. "$add_mode = true;\n"..
  1847. "if ( function_exists('ttg_social_media') ) {\n"..
  1848. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1849. " $add_mode = false;\n"..
  1850. " }\n"..
  1851. "}\n"..
  1852. "if ( $add_mode ) { ".."?"..">") end %>
  1853. <ul class="clearfix">
  1854. <% if M.social_media.profiles.label ~= '' then %>
  1855. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  1856. <% end %>
  1857. <% if M.social_media.profiles.user ~= '' then %>
  1858. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  1859. <% end %>
  1860. <% if M.social_media.profiles.aboutme ~= '' then %>
  1861. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  1862. <% end %>
  1863. <% if M.social_media.profiles.pinterest ~= '' then %>
  1864. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1865. <% end %>
  1866. <% if M.social_media.profiles.google_plus ~= '' then %>
  1867. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1868. <% end %>
  1869. <% if M.social_media.profiles.twitter ~= '' then %>
  1870. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1871. <% end %>
  1872. <% if M.social_media.profiles.linkedin ~= '' then %>
  1873. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1874. <% end %>
  1875. <% if M.social_media.profiles.facebook ~= '' then %>
  1876. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1877. <% end %>
  1878. <% if M.social_media.profiles.instagram ~= '' then %>
  1879. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1880. <% end %>
  1881. <% if M.social_media.profiles.tumblr ~= '' then %>
  1882. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1883. <% end %>
  1884. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  1885. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1886. <% end %>
  1887. <% if M.social_media.profiles.flickr ~= '' then %>
  1888. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1889. <% end %>
  1890. <% if M.social_media.profiles.behance ~= '' then %>
  1891. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  1892. <% end %>
  1893. <% if M.social_media.profiles.vimeo ~= '' then %>
  1894. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1895. <% end %>
  1896. <% if M.social_media.profiles.youtube ~= '' then %>
  1897. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1898. <% end %>
  1899. <% if M.social_media.profiles.rss ~= '' then %>
  1900. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  1901. <% end %>
  1902. </ul>
  1903. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  1904. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  1905. </div>
  1906. </div>
  1907. <% end --[[ masthead ]] %>
  1908. </div> <!-- #social-media-profiles -->
  1909. <% end --[[ social_media.display ]] %>
  1910. <% end %>
  1911. </div> <!-- #masthead -->
  1912. <% end --[[ masthead.display ]] %>
  1913. <% end --[[ help ]] %>
  1914. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] %>
  1915. <% end --[[ masthead.orphan ]] %>
  1916. <div id="page-content" class="page-content clearfix">
  1917. <% if M.sharing.ogp and M.sharing.display and M.sharing.location == 'beneath-navigation' and not cart then %>
  1918. <div id="social-media-sharing" class="social-media-sharing clearfix">
  1919. <% if M.sharing.location == 'beneath-navigation' then %>
  1920. <div class="mantle clearfix">
  1921. <div class="core clearfix">
  1922. <% end %>
  1923. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  1924. "$add_mode = true;\n"..
  1925. "if ( function_exists('ttg_sharing') ) {\n"..
  1926. " if ( !(ttg_sharing( TTG_COMP, TTG_ROOT )) ) {\n"..
  1927. " $add_mode = false;\n"..
  1928. " }\n"..
  1929. "}\n"..
  1930. "if ( $add_mode ) { ".."?"..">") end %>
  1931. <% if M.sharing.float ~= 'none' then %>
  1932. <ul class="clearfix">
  1933. <li class="social-bg share-page facebook"><a href="<% if publish then %>https://www.facebook.com/sharer/sharer.php?u=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&title=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></li>
  1934. <li class="social-bg share-page linkedin"><a href="<% if publish then %>http://www.linkedin.com/shareArticle?mini=true&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></li>
  1935. <li class="social-bg share-page twitter"><a href="<% if publish then %>http://twitter.com/intent/tweet?text=<% if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then %><% write("<?php echo $short_url; ".."?"..">")%><% else %><% write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">")%><% end %><% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %><% end %>" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></li>
  1936. <li class="social-bg share-page google-plus"><a href="<% if publish then %>https://plus.google.com/share?url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></li>
  1937. <li class="social-bg share-page pinterest"><a href="<% if publish then %>http://pinterest.com/pin/create/bookmarklet/?media=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>/<% write("<?php echo urlencode(PAGEIMAGE)".."?"..">")%>&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&is_video=false&description=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></li>
  1938. <li class="social-bg email"><a href="<% if publish then %>mailto:?Subject=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>&Body=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>%0D%0A<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></li>
  1939. </ul>
  1940. <% else %>
  1941. <p class="clearfix">
  1942. <span class="social-bg share-page facebook"><a href="<% if publish then %>https://www.facebook.com/sharer/sharer.php?u=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&title=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></span>
  1943. <span class="social-bg share-page linkedin"><a href="<% if publish then %>http://www.linkedin.com/shareArticle?mini=true&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></span>
  1944. <span class="social-bg share-page twitter"><a href="<% if publish then %>http://twitter.com/intent/tweet?text=<% if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then %><% write("<?php echo $short_url; ".."?"..">")%><% else %><% write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">")%><% end %><% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %><% end %>" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></span>
  1945. <span class="social-bg share-page google-plus"><a href="<% if publish then %>https://plus.google.com/share?url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></span>
  1946. <span class="social-bg share-page pinterest"><a href="<% if publish then %>http://pinterest.com/pin/create/bookmarklet/?media=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>/<% write("<?php echo urlencode(PAGEIMAGE)".."?"..">")%>&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&is_video=false&description=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></span>
  1947. <span class="social-bg email"><a href="<% if publish then %>mailto:?Subject=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>&Body=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>%0D%0A<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></span>
  1948. </p>
  1949. <% end %>
  1950. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_sharing ]] %>
  1951. <% if M.sharing.location == 'beneath-navigation' then %>
  1952. </div>
  1953. </div>
  1954. <% end %>
  1955. </div> <!-- #social-media-sharing -->
  1956. <% end %>
  1957. <% if publish and M.phplugins.enable then write ("<?php\n"..
  1958. "if ( function_exists('ttg_canvas_top') ) {\n"..
  1959. " $void = ttg_canvas_top( TTG_COMP, TTG_ROOT );\n"..
  1960. "} ".."?"..">") end --[[ ttg_canvas_top ]] %>
  1961. <% if M.password.enable and mode == 'publish' and not cart then
  1962. write ( "<?php if ((!isset($enablePassword) || $enablePassword) && !$logged_in) { " .. "?" .. ">" )
  1963. end %>
  1964. <% if (( M.password.enable and mode == 'publish' ) or ( M.password.enable and M.password.preview )) and not cart then %>
  1965. <div id="login" class="login form clearfix">
  1966. <div class="mantle clearfix">
  1967. <div class="core clearfix">
  1968. <form id="password-protection" class="password-protection" name="form" method="post" action="<% if mode == 'publish' then %><% write ( "<?php echo $_SERVER['PHP_SELF'].(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] && $_SERVER['QUERY_STRING'] != 'logout'?'?'.$_SERVER['QUERY_STRING']:''); " .. "?" .. ">" ) %><% end %>">
  1969. <% if M.password.label.message ~= '' then %>
  1970. <div id="login-message" class="login-message collapse">
  1971. <% write(markdown( M.password.label.message ))%>
  1972. </div>
  1973. <% end %>
  1974. <div id="login-form" class="login-form collapse">
  1975. <fieldset>
  1976. <p>
  1977. <label for="ttg_username"><%= M.password.label.username %></label>
  1978. <input id="login-username" class="" name="ttg_username" type="text" autocomplete="off" autocapitalize="off" placeholder="" required />
  1979. </p>
  1980. <p>
  1981. <label for="ttg_password"><%= M.password.label.password %></label>
  1982. <input id="login-password" class="" name="ttg_password" type="password" autocomplete="off" placeholder="" required />
  1983. </p>
  1984. <p><input type="submit" name="Submit" value="<%= M.password.label.login %>" /></p>
  1985. </fieldset>
  1986. </div>
  1987. </form>
  1988. </div>
  1989. </div>
  1990. </div> <!-- #login -->
  1991. <% if M.password.enable and M.password.preview then %>
  1992. <style> #the-block, #the-grid { display: none !important; } </style>
  1993. <% end end %>
  1994. <% if M.password.enable and mode == 'publish' and not cart then
  1995. write ( "<?php } else { " .. "?" .. ">" )
  1996. end %>
  1997. <% if M.social_media.profiles.location == 'above-the-block' and not cart then %>
  1998. <% if M.social_media.display then %>
  1999. <div class="social-media-profiles social-media clearfix">
  2000. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  2001. <div class="mantle clearfix">
  2002. <div class="core clearfix">
  2003. <% end --[[ masthead ]] %>
  2004. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  2005. "$add_mode = true;\n"..
  2006. "if ( function_exists('ttg_social_media') ) {\n"..
  2007. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  2008. " $add_mode = false;\n"..
  2009. " }\n"..
  2010. "}\n"..
  2011. "if ( $add_mode ) { ".."?"..">") end %>
  2012. <ul class="clearfix">
  2013. <% if M.social_media.profiles.label ~= '' then %>
  2014. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  2015. <% end %>
  2016. <% if M.social_media.profiles.user ~= '' then %>
  2017. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  2018. <% end %>
  2019. <% if M.social_media.profiles.aboutme ~= '' then %>
  2020. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  2021. <% end %>
  2022. <% if M.social_media.profiles.pinterest ~= '' then %>
  2023. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  2024. <% end %>
  2025. <% if M.social_media.profiles.google_plus ~= '' then %>
  2026. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  2027. <% end %>
  2028. <% if M.social_media.profiles.twitter ~= '' then %>
  2029. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  2030. <% end %>
  2031. <% if M.social_media.profiles.linkedin ~= '' then %>
  2032. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  2033. <% end %>
  2034. <% if M.social_media.profiles.facebook ~= '' then %>
  2035. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  2036. <% end %>
  2037. <% if M.social_media.profiles.instagram ~= '' then %>
  2038. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  2039. <% end %>
  2040. <% if M.social_media.profiles.tumblr ~= '' then %>
  2041. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  2042. <% end %>
  2043. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  2044. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  2045. <% end %>
  2046. <% if M.social_media.profiles.flickr ~= '' then %>
  2047. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  2048. <% end %>
  2049. <% if M.social_media.profiles.behance ~= '' then %>
  2050. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  2051. <% end %>
  2052. <% if M.social_media.profiles.vimeo ~= '' then %>
  2053. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  2054. <% end %>
  2055. <% if M.social_media.profiles.youtube ~= '' then %>
  2056. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  2057. <% end %>
  2058. <% if M.social_media.profiles.rss ~= '' then %>
  2059. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  2060. <% end %>
  2061. </ul>
  2062. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  2063. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  2064. </div>
  2065. </div>
  2066. <% end --[[ masthead ]] %>
  2067. </div> <!-- #social-media-profiles -->
  2068. <% end --[[ social_media.display ]] %>
  2069. <% end %>
  2070. <% if mode == 'publish' and publisher then %>
  2071. <% write("<?php if ($album->showBreadcrumbs()) { ".."?"..">")%>
  2072. <div id="breadcrumb-container" class="block-id the-block clearfix">
  2073. <div class="mantle clearfix">
  2074. <div class="core clearfix">
  2075. <% write("<?php echo $album->getBreadcrumbs(array('root_name' => __c('BREADCRUMB_HOME_NAME'), 'container' => 'ul.breadcrumbs', 'child_container' => 'li.crumb', 'separator' => ' '.__c('BREADCRUMB_SEPARATOR').' ')); ".."?"..">")%>
  2076. </div>
  2077. </div>
  2078. </div> <!-- #breadcrumb-container -->
  2079. <% write("<?php } ".."?"..">")%>
  2080. <% elseif mode == 'preview' and M.breadcrumbs.preview then %>
  2081. <div id="breadcrumb-container" class="block-id the-block clearfix">
  2082. <div class="mantle clearfix">
  2083. <div class="core clearfix"><ul class="breadcrumbs">
  2084. <li class="crumb"><a><span>Galleries</span></a></li><li class="crumb"> » </li><li class="crumb"><a><span><% if M.album.title ~= '' then %><%= M.album.title %><% else %>Album Title<% end %></span></a></li>
  2085. </ul></div>
  2086. </div>
  2087. </div> <!-- #breadcrumb-container -->
  2088. <% end %>
  2089. <% if M.the_block.location == 'top' then %>
  2090. <% if (M.the_block.display and (page == 1 or M.the_block.display_all or mobile or publisher)) or cart then %>
  2091. <div id="the-block" class="block-id the-block clearfix">
  2092. <div class="mantle clearfix">
  2093. <div class="core clearfix">
  2094. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  2095. "$add_mode = true;\n"..
  2096. "if ( function_exists('ttg_block_top') ) {\n"..
  2097. " if ( !(ttg_block_top( TTG_COMP, TTG_ROOT )) ) {\n"..
  2098. " $add_mode = false;\n"..
  2099. " }\n"..
  2100. "}\n"..
  2101. "if ( $add_mode ) { ".."?"..">") end %>
  2102. <div class="container_12 collapse clearfix">
  2103. <% if cart then
  2104. write ("<?php\n"..
  2105. "$message = MessageHelper::flash();\n"..
  2106. "if ($message) {\n"..
  2107. "include(APP_DIR.'/views/message.php');\n"..
  2108. "}".."?"..">")
  2109. write ("<?php\n"..
  2110. "$viewFilePath = APP_DIR.'/views/';\n"..
  2111. "$fullFilePath = $viewFilePath.$file_name.'.php';\n"..
  2112. "if (!is_file($fullFilePath)) {\n"..
  2113. " echo '<div id=\"message\" class=\"error\"><h1>Error: The included page was not found on the server</h1>';\n"..
  2114. " echo '<p>Please upload <strong>'.TTG_BE_DIRECTORY.'/'.APP_SLUG.'/'.$fullFilePath.'</strong> from your downloaded '.APP_SHORT_NAME.' zip to <strong>'.TTG_BE_DIRECTORY.'/'.APP_SLUG.'/'.$viewFilePath.'admin/</strong> on your server</div>';\n"..
  2115. "} else {\n"..
  2116. " include($fullFilePath);\n"..
  2117. "}".."?"..">") else %>
  2118. <% if mode == 'preview' and M.the_block.now_showing == 'actual' then %>
  2119. <% if M.page_setup.site.root == '' then %>
  2120. <p class="alert">
  2121. The <strong>Site Root</strong> is empty! Please designate your site root in <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Website</strong>.<br />
  2122. The root address of your website should begin with "http://" and end with a trailing slash, "/". For example:<br />
  2123. <span style="letter-spacing:1px;"><strong style="color:#ff2c2c;">http://</strong>yourdomain.com<strong style="color:#ff2c2c;">/</strong></span>
  2124. </p>
  2125. <% elseif M.page_setup.site.root ~= '' and M.page_setup.site.root ~= '/' and M.page_setup.site.root ~= './' then
  2126. local website = M.page_setup.site.root
  2127. if (string.sub(website, 1,7) ~= 'http://' and string.sub(website, 1,8) ~= 'https://' and string.sub(website, 1,1) ~= '/' and string.sub(website, 1,2) ~= './') or string.sub(website, -1,-1) ~= '/' then
  2128. %>
  2129. <p class="alert alert-error">Your <strong>Site Root</strong> is wrong! <br />
  2130. Please ensure that your site root, entered in <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Website</strong>, begins with "<strong style="color:#369;">http://</strong>" and ends with a trailing slash "<strong style="color:#369;">/</strong>". <br />
  2131. For example: <span style="letter-spacing:1px;"><strong style="color:#369;">http://</strong>yourdomain.com<strong style="color:#369;">/</strong></span>
  2132. </p>
  2133. <% end end %>
  2134. <% if M.cart.integration.enabled and M.fotomoto.integration.enabled then %>
  2135. <p class="alert alert-error"><i class="fa fa-fw fa-exclamation-triangle"></i>
  2136. <strong>Shopping Cart Integration</strong> and <strong>Fotomoto Integration</strong> cannot be enabled simultaneously. Please enable one, and disable the other.
  2137. </p>
  2138. <% end %>
  2139. <% end %>
  2140. <% if mode == 'preview' and M.the_block.now_showing == 'help' then %>
  2141. <div class="grid_8 gutter_24px alpha collapse_top clearfix">
  2142. <hr />
  2143. <h2>Plugin Quick Reference</h2>
  2144. <hr />
  2145. <dl>
  2146. <dt><i class="fa fa-chevron-circle-left"></i> Template Browser</dt>
  2147. <dd style="font-size:smaller;margin-top: 4px;">
  2148. Don't lose your work! Use the Template Browser to save templates of your gallery configuration(s) for later use. You may also copy the settings from your saved template to use in other CE4 plugins. If the Template Browser is not visible, open the lefthand control panel to access it.
  2149. </dd>
  2150. </dl>
  2151. <hr />
  2152. <p><i class="fa fa-lightbulb-o fa-lg"></i> To dismiss this screen, go to <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Now Showing</strong> near the top, and select "<strong>Page Preview</strong>".
  2153. <hr />
  2154. <p>Use <strong>CE4 Gallery</strong> to customize and publish responsive image galleries to be viewed on any modern device, including desktop and laptop computers, tablets and mobile phones.</p>
  2155. <p>Create standalone image galleries, or combine with <strong>CE4 Auto Index</strong> and/or <strong>CE4 Publisher</strong> to easily organize and publish any number of galleries. Pair with <strong>CE4 Cart</strong> for self-managed image sales, or signup with Fotomoto.com to handle products and delivery.</p>
  2156. <hr />
  2157. <h3>Avoid Common Problems</h3>
  2158. <dl>
  2159. <dt><i class="fa fa-compass"></i> Trust the Defaults</dt>
  2160. <dd style="font-size:smaller;margin-top: 4px;">
  2161. If you don't understand an option and fail to observe its impact on the page, check the online documentation for help. If you're still in the dark, keep the default setting. Defaults are safe.
  2162. </dd>
  2163. <dt><i class="fa fa-folder-o"></i> Folders</dt>
  2164. <dd style="font-size:smaller;margin-top: 4px;">
  2165. When exporting, avoid spaces and non-alphanumeric characters in your folder names. Do not use commas, apostrophes, quotation marks, parentheses, etc. It's okay to use hyphens ( - ) or underscores ( _ ) to replace spaces.
  2166. </dd>
  2167. <dt><i class="fa fa-file-o"></i> Files</dt>
  2168. <dd style="font-size:smaller;margin-top: 4px;">
  2169. In the Library, avoid spaces and non-alphanumeric characters in your image file names. Do not use commas, apostrophes, quotation marks, parentheses, etc. It's okay to use hyphens ( - ) or underscores ( _ ) to replace spaces.
  2170. </dd>
  2171. </dl>
  2172. </div>
  2173. <div class="grid_4 gutter_24px omega collapse_top clearfix">
  2174. <hr />
  2175. <dl>
  2176. <dt>Site Info <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2177. <dd style="font-size:smaller;margin-top: 4px;">
  2178. Set global parameters and common design elements for your website, including masthead, navigation, typography styling and the page footer, and under-the-hood items for SEO, Google Analytics, etc.
  2179. </dd>
  2180. <dt>Color Palette <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2181. <dd style="font-size:smaller;margin-top: 4px;">
  2182. Setup "The Block", the exposition area.
  2183. </dd>
  2184. <dt>Appearance <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2185. <dd style="font-size:smaller;margin-top: 4px;">
  2186. Setup "The Grid", the media area, and configure your gallery presentation.
  2187. </dd>
  2188. <dt>Image Info <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2189. <dd style="font-size:smaller;margin-top: 4px;">
  2190. Assign metadata to appear with each image. Provide metadata to images in the Library module.
  2191. </dd>
  2192. <dt>Output Settings <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2193. <dd style="font-size:smaller;margin-top: 4px;">
  2194. Set parameters for exported images, setup password protection, enable e-commerce support and other auxiliary settings.
  2195. </dd>
  2196. <dt>Upload Settings <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2197. <dd style="font-size:smaller;margin-top: 4px;">
  2198. We advise against using the Web module's upload feature. Instead, you should Export to desktop and upload to your server using a proper FTP client, as this is the most reliable way to publish your content online.
  2199. </dd>
  2200. </dl>
  2201. <hr />
  2202. </div>
  2203. <% elseif mode == 'preview' and M.the_block.now_showing == 'typography' then %>
  2204. <h1>Heading 1 <span>(<%= M.typography_headings.h1_font_size %>px)</span></h1>
  2205. <h2>Heading 2 <span>(<%= M.typography_headings.h2_font_size %>px)</span></h2>
  2206. <h3>Heading 3 <span>(<%= M.typography_headings.h3_font_size %>px)</span></h3>
  2207. <h4>Heading 4 <span>(<%= M.typography_headings.h4_font_size %>px)</span></h4>
  2208. <h5>Heading 5 <span>(<%= M.typography_headings.h5_font_size %>px)</span></h5>
  2209. <h6>Heading 6 <span>(<%= M.typography_headings.h6_font_size %>px)</span></h6>
  2210. <h2 class="h3">Paragraphs</h2>
  2211. <p>Lorem ipsum dolor sit amet, <a href="#">consectetur adipisicing elit</a>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  2212. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  2213. <h2 class="h3">Blockquote</h2>
  2214. <blockquote>
  2215. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  2216. </blockquote>
  2217. <hr />
  2218. <h6>Horizontal Rule: <hr /></h6>
  2219. <hr />
  2220. <h2 class="h3">Form</h2>
  2221. <form class="form clearfix" style="margin: 0; max-width:480px;">
  2222. <fieldset>
  2223. <label for="input1">An Input</label>
  2224. <p><input id="input1" type="text" /></p>
  2225. <label for="input2">Another Input</label>
  2226. <p><input id="input2" type="text" /></p>
  2227. <p>
  2228. <input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" />
  2229. <label for="subscribe">Notify me of followup comments via e-mail</label>
  2230. </p>
  2231. <p>
  2232. <input id="male" type="radio" name="sex" value="male">
  2233. <label for="male">Male</label>
  2234. <input id="female" type="radio" name="sex" value="female">
  2235. <label for="female">Female</label>
  2236. </p>
  2237. </fieldset>
  2238. <p><input type="submit" value="Submit" /></p>
  2239. </form>
  2240. <h2 class="h3">Table</h2>
  2241. <table class="table table-bordered table-striped">
  2242. <thead>
  2243. <tr>
  2244. <th>Element</th>
  2245. <th>Use</th>
  2246. </tr>
  2247. </thead>
  2248. <tbody>
  2249. <tr>
  2250. <td><code><strong></code></td>
  2251. <td>Strong emphasis</td>
  2252. </tr>
  2253. <tr>
  2254. <td><code><b></code></td>
  2255. <td>Presentational bold</td>
  2256. </tr>
  2257. <tr>
  2258. <td><code><em></code></td>
  2259. <td>Emphasis</td>
  2260. </tr>
  2261. <tr>
  2262. <td><code><i></code></td>
  2263. <td>Presentational italics</td>
  2264. </tr>
  2265. <tr>
  2266. <td><code><abbr></code></td>
  2267. <td>Abbreviations and acronyms</td>
  2268. </tr>
  2269. <tr>
  2270. <td><code><address></code></td>
  2271. <td>Content contact information</td>
  2272. </tr>
  2273. </tbody>
  2274. </table>
  2275. <h2 class="h3">Unordered list</h2>
  2276. <ul>
  2277. <li>Unordered list item</li>
  2278. <li>Unordered list item</li>
  2279. <li>Unordered list item</li>
  2280. <li>Unordered list item</li>
  2281. <li>Unordered list item</li>
  2282. <li>Unordered list item</li>
  2283. </ul>
  2284. <h2 class="h3">Ordered list</h2>
  2285. <ol>
  2286. <li>Ordered list item</li>
  2287. <li>Ordered list item</li>
  2288. <li>Ordered list item</li>
  2289. <li>Ordered list item</li>
  2290. <li>Ordered list item</li>
  2291. <li>Ordered list item</li>
  2292. </ol>
  2293. <h2 class="h3">Unordered, Bordered list</h2>
  2294. <ul class="list-bordered">
  2295. <li>Bordered list item</li>
  2296. <li>Bordered list item</li>
  2297. <li>Bordered list item</li>
  2298. <li>Bordered list item</li>
  2299. <li>Bordered list item</li>
  2300. <li>Bordered list item</li>
  2301. </ul>
  2302. <h2 class="h3">Definition list</h2>
  2303. <dl>
  2304. <dt>Definition term</dt>
  2305. <dd>Definition description</dd>
  2306. <dt>Definition term</dt>
  2307. <dd>Definition description</dd>
  2308. </dl>
  2309. <mark>mark</mark><br />
  2310. <del>del</del><br />
  2311. <ins>ins</ins><br />
  2312. <abbr title="The Turning Gate">TTG</abbr>
  2313. <% else --[[ actual: ]] %>
  2314. <!-- primary content -->
  2315. <% if M.the_block.columns == '1col' then %>
  2316. <div id="primary-content" class="grid_12 collapse clearfix">
  2317. <% else %>
  2318. <div id="primary-content" class="grid_<%= M.the_block.content_width %><% if M.the_block.content_position == 'right' then %> push_<%= math.floor(12 - M.the_block.content_width) %><% end %><% if M.the_block.content_width ~= 12 then %> gutter_<%= M.the_block.content_gutters%><% if M.the_block.content_position == 'right' then %> omega<% else %> alpha<% end %><% end %> collapse shelf_line clearfix">
  2319. <% end %>
  2320. <% if mode == 'publish' and publisher then %>
  2321. <% write("<?php echo $album->hook_preContentBlock(); ".."?"..">")%>
  2322. <% end %>
  2323. <% if mode == 'publish' and publisher then %>
  2324. <% write("<?php if ($album->placePageCopyAbove()) {\n"..
  2325. " echo $album->getPageCopy();\n"..
  2326. "} ".."?"..">")%>
  2327. <% write("<?php if ($album->replacePageCopy()) {\n"..
  2328. " echo $album->getPageCopy();\n"..
  2329. "} else { ".."?"..">")%>
  2330. <% end %>
  2331. <% if M.the_block.image.location == "primary" then %>
  2332. <% if getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then %>
  2333. <img class="the-block-image align<%= M.the_block.image.float %>" src="photos/<%= getImage(M.the_block.image.id).exportFilename %>.jpg" alt="<%= getImage(M.the_block.image.id).metadata.imgAlt %>" width="<%= getImage(M.the_block.image.id).renditions.photos.width %>" height="<%= getImage(M.the_block.image.id).renditions.photos.height %>" />
  2334. <% else %>
  2335. <p class="alert"><strong>ERROR</strong> : The specified ID does not correspond to any image in your filmstrip.</p>
  2336. <% end %><% end %>
  2337. <% write (markdown ( M.the_block.content ) ) %>
  2338. <% if mode == 'publish' and publisher then %>
  2339. <% write("<?php } ".."?"..">")%>
  2340. <% write("<?php if ($album->placePageCopyBelow()) {\n"..
  2341. " echo $album->getPageCopy();\n"..
  2342. "} ".."?"..">")%>
  2343. <% end %>
  2344. <% if M.sharing.ogp and M.sharing.display and M.sharing.location == 'end-block' then %>
  2345. <div id="social-media-sharing" class="social-media-sharing clearfix">
  2346. <% if M.sharing.location == 'beneath-navigation' then %>
  2347. <div class="mantle clearfix">
  2348. <div class="core clearfix">
  2349. <% end %>
  2350. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  2351. "$add_mode = true;\n"..
  2352. "if ( function_exists('ttg_sharing') ) {\n"..
  2353. " if ( !(ttg_sharing( TTG_COMP, TTG_ROOT )) ) {\n"..
  2354. " $add_mode = false;\n"..
  2355. " }\n"..
  2356. "}\n"..
  2357. "if ( $add_mode ) { ".."?"..">") end %>
  2358. <% if M.sharing.float ~= 'none' then %>
  2359. <ul class="clearfix">
  2360. <li class="social-bg share-page facebook"><a href="<% if publish then %>https://www.facebook.com/sharer/sharer.php?u=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&title=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></li>
  2361. <li class="social-bg share-page linkedin"><a href="<% if publish then %>http://www.linkedin.com/shareArticle?mini=true&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></li>
  2362. <li class="social-bg share-page twitter"><a href="<% if publish then %>http://twitter.com/intent/tweet?text=<% if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then %><% write("<?php echo $short_url; ".."?"..">")%><% else %><% write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">")%><% end %><% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %><% end %>" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></li>
  2363. <li class="social-bg share-page google-plus"><a href="<% if publish then %>https://plus.google.com/share?url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></li>
  2364. <li class="social-bg share-page pinterest"><a href="<% if publish then %>http://pinterest.com/pin/create/bookmarklet/?media=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>/<% write("<?php echo urlencode(PAGEIMAGE)".."?"..">")%>&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&is_video=false&description=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></li>
  2365. <li class="social-bg email"><a href="<% if publish then %>mailto:?Subject=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>&Body=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>%0D%0A<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></li>
  2366. </ul>
  2367. <% else %>
  2368. <p class="clearfix">
  2369. <span class="social-bg share-page facebook"><a href="<% if publish then %>https://www.facebook.com/sharer/sharer.php?u=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&title=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></span>
  2370. <span class="social-bg share-page linkedin"><a href="<% if publish then %>http://www.linkedin.com/shareArticle?mini=true&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></span>
  2371. <span class="social-bg share-page twitter"><a href="<% if publish then %>http://twitter.com/intent/tweet?text=<% if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then %><% write("<?php echo $short_url; ".."?"..">")%><% else %><% write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">")%><% end %><% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %><% end %>" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></span>
  2372. <span class="social-bg share-page google-plus"><a href="<% if publish then %>https://plus.google.com/share?url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></span>
  2373. <span class="social-bg share-page pinterest"><a href="<% if publish then %>http://pinterest.com/pin/create/bookmarklet/?media=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>/<% write("<?php echo urlencode(PAGEIMAGE)".."?"..">")%>&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&is_video=false&description=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></span>
  2374. <span class="social-bg email"><a href="<% if publish then %>mailto:?Subject=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>&Body=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>%0D%0A<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></span>
  2375. </p>
  2376. <% end %>
  2377. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_sharing ]] %>
  2378. <% if M.sharing.location == 'beneath-navigation' then %>
  2379. </div>
  2380. </div>
  2381. <% end %>
  2382. </div> <!-- #social-media-sharing -->
  2383. <% end --[[ sharing.display ]] %>
  2384. </div>
  2385. <!-- /primary content -->
  2386. <% if M.the_block.columns ~= '1col' then %>
  2387. <!-- secondary content -->
  2388. <div id="secondary-content" class="grid_<%= math.floor(12 - M.the_block.content_width) %> collapse<% if M.the_block.content_position == 'right' then %> pull_<%= M.the_block.content_width %><% end %><% if M.the_block.content_width ~= 12 then %> gutter_<%= M.the_block.content_gutters%><% if M.the_block.content_position == 'right' then %> alpha<% else %> omega<% end %><% end %> clearfix">
  2389. <% if mode == 'publish' and publisher then %>
  2390. <% write("<?php if ($album->placeSidebarCopyAbove()) {\n"..
  2391. " echo $album->getSidebarCopy();\n"..
  2392. "} ".."?"..">")%>
  2393. <% write("<?php if ($album->replaceSidebarCopy()) {\n"..
  2394. " echo $album->getSidebarCopy();\n"..
  2395. "} else { ".."?"..">")%>
  2396. <% end %>
  2397. <% if M.the_block.image.location == "secondary" then %>
  2398. <% if getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then %>
  2399. <img class="the-block-image align<%= M.the_block.image.float %>" src="photos/<%= getImage(M.the_block.image.id).exportFilename %>.jpg" alt="<%= getImage(M.the_block.image.id).metadata.imgAlt %>" width="<%= getImage(M.the_block.image.id).renditions.photos.width %>" height="<%= getImage(M.the_block.image.id).renditions.photos.height %>" />
  2400. <% else %>
  2401. <p class="alert"><strong>ERROR</strong> : The specified ID does not correspond to any image in your filmstrip.</p>
  2402. <% end %><% end %>
  2403. <% write (markdown ( M.the_block.sidebar.content ) ) %>
  2404. <% if mode == 'publish' and publisher then %>
  2405. <% write("<?php } ".."?"..">")%>
  2406. <% write("<?php if ($album->placeSidebarCopyBelow()) {\n"..
  2407. " echo $album->getSidebarCopy();\n"..
  2408. "} ".."?"..">")%>
  2409. <% end %>
  2410. </div>
  2411. <!-- /secondary content -->
  2412. <% end --[[ the_block.columns ~= '1col' ]] %>
  2413. <% end --[[ now_showing ]] %>
  2414. <% end --[[ cart ]] %>
  2415. </div><!-- #container_12 -->
  2416. <% if publish and M.phplugins.enable then write ("<?php\n" ..
  2417. "} // end ttg_block_top\n"..
  2418. "if ( function_exists('ttg_block_bottom') ) {\n" ..
  2419. " $void = ttg_block_bottom( TTG_COMP, TTG_ROOT );\n" ..
  2420. "} ".."?"..">") end --[[ ttg_block_bottom ]] %>
  2421. </div>
  2422. </div>
  2423. </div> <!-- #the-block -->
  2424. <% end --[[ the_block.display ]] %>
  2425. <% end %>
  2426. <% if not cart then %>
  2427. <% if mode == 'preview' and M.the_block.now_showing == 'help' then else %>
  2428. <% if M.the_grid.display then %>
  2429. <div id="the-grid" class="<% if not mobile then %><%= M.grid.type.desktop %><% if M.grid_cell.iconic.enabled then %> iconic<% end %><% else %><%= M.grid.type.mobile %><% end %> block-id the-grid clearfix">
  2430. <div class="mantle clearfix">
  2431. <div class="core clearfix">
  2432. <div id="the-gallery" class="the-gallery clearfix">
  2433. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  2434. "$add_mode = true;\n"..
  2435. "if ( function_exists('ttg_grid_top') ) {\n"..
  2436. " if ( !(ttg_grid_top( TTG_COMP, TTG_ROOT )) ) {\n"..
  2437. " $add_mode = false;\n"..
  2438. " }\n"..
  2439. "}\n"..
  2440. "if ( $add_mode ) { ".."?"..">") end %>
  2441. <% if (not mobile and M.grid.type.desktop == 'ce4-standard') and not publisher then %>
  2442. <% if M.cart.integration.enabled and M.cart.integration.packageButton then %>
  2443. <button class="add-package-to-cart add-package" data-price="<%= M.cart.integration.package_pricing %>"><i class="fa fa-fw fa-shopping-cart"></i> <span><%= M.cart.integration.package_label %></span></button>
  2444. <% end %>
  2445. <% if numGridPages > 1 then %>
  2446. <div class="pagination <% if page >= 6 then %>page-6-or-greater<% else %>page-<%= page %><% end %> pagination-top clearfix">
  2447. <ul class="page-navigation clearfix"><lr:Pagination>
  2448. <lr:CurrentPage>
  2449. <li class="pagenumber current">$page</li>
  2450. </lr:CurrentPage>
  2451. <lr:OtherPages>
  2452. <li class="pagenumber page-link"><a href="$link">$page</a></li>
  2453. </lr:OtherPages>
  2454. <lr:PreviousEnabled>
  2455. <li class="previous page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.previous %></a></li>
  2456. </lr:PreviousEnabled>
  2457. <lr:PreviousDisabled>
  2458. <li class="previous page-link disabled"><span><%= M.grid.pagination.previous %></span></li>
  2459. </lr:PreviousDisabled>
  2460. <lr:NextEnabled>
  2461. <li class="next page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.next %></a></li>
  2462. </lr:NextEnabled>
  2463. <lr:NextDisabled>
  2464. <li class="next page-link disabled"><span><%= M.grid.pagination.next %></span></li>
  2465. </lr:NextDisabled>
  2466. </lr:Pagination></ul>
  2467. </div><!-- pagination -->
  2468. <% end --[[ pagination ]] %>
  2469. <% if (not mobile and M.grid.presentation.desktop == "touch") or (mobile and M.grid.presentation.mobile == "touch") then %>
  2470. <div class="sliderHolder" data-elem="sliderHolder">
  2471. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  2472. <div class="sliderBg"></div>
  2473. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:<%= M.touchnswipe.maxzoom %>; playDuration:<%= M.touchnswipe.playduration %>; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  2474. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2475. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2476. <div class="captionHolder ui-off" data-elem="captionHolder">
  2477. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  2478. </div>
  2479. <div class="controlHolder ui-off"><ul>
  2480. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  2481. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  2482. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  2483. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  2484. <% if M.cart.integration.enabled and publisher then %>
  2485. <% write("<?php if ($album->cartEnabled()) { ".."?"..">")%>
  2486. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2487. <% write("<?php } ".."?"..">")%>
  2488. <% elseif M.cart.integration.enabled or M.fotomoto.integration.enabled then %>
  2489. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2490. <% else
  2491. if M.permalinks.on then %>
  2492. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  2493. <% else %>
  2494. <li> </li>
  2495. <% end end %>
  2496. <% if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then %>
  2497. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  2498. <% end %>
  2499. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  2500. <li class="touch-share-menu touch-facebook share-off"><a><i class="fa fa-fw fa-facebook"></i></a></li>
  2501. <li class="touch-share-menu touch-linkedin share-off"><a><i class="fa fa-fw fa-linkedin"></i></a></li>
  2502. <li class="touch-share-menu touch-twitter share-off"><a><i class="fa fa-fw fa-twitter"></i></a></li>
  2503. <li class="touch-share-menu touch-google-plus share-off"><a><i class="fa fa-fw fa-google-plus"></i></a></li>
  2504. <li class="touch-share-menu touch-pinterest share-off"><a><i class="fa fa-fw fa-pinterest"></i></a></li>
  2505. <li class="touch-share-menu touch-email share-off"><a><i class="fa fa-fw fa-envelope"></i></a></li>
  2506. <% end --[[ socialmedia ]] %>
  2507. <% if (M.cart.integration.enabled or M.fotomoto.integration.enabled) and M.permalinks.on then %>
  2508. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  2509. <% end %>
  2510. <% if M.googleMaps.enable then %>
  2511. <li class="touch-share-menu touch-maps share-off"><a><i class="fa fa-fw fa-map-marker"></i></a></li>
  2512. <% end %>
  2513. <% if M.imageDownload.enable then %>
  2514. <li class="touch-share-menu touch-download share-off"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>
  2515. <% end %>
  2516. </ul></div>
  2517. <% if not publisher then %>
  2518. <ul data-elem="items">
  2519. <%
  2520. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  2521. local firstId = page * imagesPerPage - imagesPerPage + 1
  2522. local lastId = imagesPerPage * page
  2523. if numImages <= lastId then
  2524. lastId = numImages
  2525. end
  2526. for index=firstId, lastId do
  2527. %>
  2528. <li><a href="$theRoot/photos/<%= getImage(index).exportFilename %>.jpg"><img src="$theRoot/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg" data-info="thumbId:<%= getImage(index).exportFilename %>;" title="<%= cleandata(getImage(index).metadata.imgTitle) %>" alt="<%= cleandata(getImage(index).metadata.imgAlt) %>" /></a>
  2529. <div class="imageCaption" data-elem="imgCaption">
  2530. <p>
  2531. <% if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then %>
  2532. <span class="color-label color<%= getImage(index).colorLabelNumber %>" title="<%= getImage(index).colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></span>
  2533. <% end %>
  2534. <% if M.highslide.display.headings then %><span class="caption-title"><%= cleandata(getImage(index).metadata.imgTitle) %></span><% end %><% if (getImage(index).metadata.imgTitle ~= '' and M.highslide.display.headings) and (getImage(index).metadata.imgAlt ~= '' and M.highslide.display.captions) then %><br /><% end %>
  2535. <% if M.highslide.display.captions then %><%= cleandata(getImage(index).metadata.imgAlt) %><% end %>
  2536. </p>
  2537. </div>
  2538. </li>
  2539. <% end --[[ loop ]] %>
  2540. </ul>
  2541. <% else --[[ if publisher ]] %>
  2542. <ul data-elem="items">
  2543. <% write("<?php foreach ($album->getPhotosForPage() as $photo) { ".."?"..">")%>
  2544. <li><a href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"><img src="<?php echo $photo->getURL('thumbnails-for-mobile');?>" data-info="thumbId:<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>; albumURL:<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php $altCopy = $photo->hasMetadata('image_caption') ? $photo->getMetadata('image_caption') : $photo->getItemNumber() . '.jpg'; echo $altcopy; ".."?"..">")%>" /></a>
  2545. <div class="imageCaption" data-elem="imgCaption">
  2546. <p>
  2547. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  2548. <span class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></span>
  2549. <% write("<?php } ".."?"..">")%><% end %>
  2550. <% if M.highslide.display.headings then %><span class="caption-title"><% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%></span><% end %><% if M.highslide.display.headings and M.highslide.display.captions then %><% write("<?php echo $photo->hasMetadata('image_title') && $photo->hasMetadata('image_caption') ? '<br />' : ''; ".."?"..">")%><% end %>
  2551. <% if M.highslide.display.captions then %><% write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">")%><% end %>
  2552. </p>
  2553. </div>
  2554. </li>
  2555. <% write("<?php } ".."?"..">")%>
  2556. </ul>
  2557. <% end --[[ is publisher or not? ]] %>
  2558. </div>
  2559. </div><!-- sliderHolder -->
  2560. <% end %>
  2561. <div class="clearfix">
  2562. <lr:ThumbnailGrid>
  2563. <%
  2564. -- determine number of cells necessary to fill the last row,
  2565. -- later apply the "cell-excess" class to hide excessive cells
  2566. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  2567. local lastPageImages = numImages - math.floor(imagesPerPage * (numGridPages - 1))
  2568. local lastPageRows = math.ceil(lastPageImages / M.grid_cell.columns)
  2569. local desiredCells = numImages - lastPageImages + (lastPageRows * M.grid_cell.columns)
  2570. local border = 0
  2571. if M.grid_cell.image_border.enabled then border = 2 end
  2572. local thumbnailsFolder = "thumbnails-for-mobile"
  2573. if M.grid_cell.iconic.enabled then
  2574. thumbnailsFolder = "thumbnails"
  2575. end
  2576. %>
  2577. <lr:GridPhotoCell>
  2578. <%
  2579. local gpsData = image.metadata.gpsLocation
  2580. local thumbnailRendition = image.renditions.thumbnailsMobile
  2581. if M.grid_cell.iconic.enabled then
  2582. thumbnailRendition = image.renditions.thumbnails
  2583. end %><%
  2584. --[[ Get GPS location data ]]
  2585. --[[ Rather than defining gpsData here, we are defining it separately for desktop and mobile in the respective page templates
  2586. local gpsData = image.metadata.gpsLocation ]]
  2587. --[[ Begin Google Maps ]]
  2588. if model.googleMaps.enable then
  2589. if gpsData == "" then
  2590. else
  2591. --[[ Round to idp decimal places ]]
  2592. function round(num, idp)
  2593. local mult = 10^(idp or 0)
  2594. return math.floor(num * mult + 0.5) / mult
  2595. end
  2596. --[[ Convert DMS to DD ]]
  2597. function latlongDMStoDD(brng)
  2598. local precision = 6
  2599. local dms = {}
  2600. for w in string.gfind(brng, "%d+") do
  2601. table.insert(dms, w)
  2602. end
  2603. local deg = dms[1]/1 + dms[2]/60 + dms[3]/3600
  2604. deg = round(deg, precision)
  2605. local dir = string.match(brng, "%u")
  2606. if dir == "S" then
  2607. deg = -deg
  2608. elseif dir == "W" then
  2609. deg = -deg
  2610. else
  2611. end
  2612. return deg
  2613. end
  2614. --[[ Find latitude and longitude strings ]]
  2615. local dms_pattern = "%d+%W+%d+%W+%d+%W+%u"
  2616. local latlongDMS = {}
  2617. for w in string.gfind(gpsData, dms_pattern) do
  2618. table.insert(latlongDMS, w)
  2619. end
  2620. --[[ Create latitude,longitude decimal degree string ]]
  2621. local latlongDD = latlongDMStoDD(latlongDMS[1]) .. "," .. latlongDMStoDD(latlongDMS[2])
  2622. --[[ Create Google Maps URL ]]
  2623. googleURL = "http://maps.google.com/maps/api/staticmap?center=" .. latlongDD
  2624. googleURL = googleURL .. "&markers=color:red|label:A|" .. latlongDD
  2625. googleURL = googleURL .. "&maptype=" .. model.googleMaps.mapType
  2626. googleURL = googleURL .. "&zoom=18"
  2627. googleURL = googleURL .. "&size=640x640"
  2628. googleURL = googleURL .. "&sensor=false"
  2629. googleMapsURL = "http://maps.google.com/maps?f=q&q=loc:" .. latlongDD --[[ marker location ]]
  2630. googleMapsURL = googleMapsURL .. "&ll=" .. latlongDD --[[ map center ]]
  2631. googleMapsURL = googleMapsURL .. "&t=" .. model.googleMaps.mapType
  2632. --[[ googleMapsURL = googleMapsURL .. "&iwloc=near" ]]
  2633. googleMapsURL = googleMapsURL .. "&z=18"
  2634. end
  2635. else end
  2636. --[[ End Google Maps ]]
  2637. %>
  2638. <div class="gridcell clearfix" id="cell-<%= image.exportFilename %>">
  2639. <div class="griditem <% if image.renditions.thumbnailsMobile.width > image.renditions.thumbnailsMobile.height then %>landscape<% else %>portrait<% end %> clearfix" style="background-image: url(<%= theRoot %>/<%= thumbnailsFolder %>/<%= image.exportFilename %>.jpg);">
  2640. <% if M.grid_cell.numbers.enabled then %>
  2641. <div class="cellnumber"><%= cellIndex %></div>
  2642. <% end %>
  2643. <a id="<%= image.exportFilename %>" class="image-link gridicon<% if M.grid_cell.image_shadows then %> drop-shadow<% end %>"
  2644. style="<% --[[
  2645. ]] %>top: <%= math.floor((M.grid_cell.height - M.grid_cell.bt - M.grid_cell.bb - border - image.renditions.thumbnailsMobile.height)/2) %>px; <% --[[
  2646. ]] %>left: <%= math.floor((M.grid_cell.width - M.grid_cell.br - M.grid_cell.bl - border - image.renditions.thumbnailsMobile.width)/2) %>px; <% --[[
  2647. ]] %>width: <%= image.renditions.thumbnailsMobile.width %>px; <% --[[
  2648. ]] %>height: <%= image.renditions.thumbnailsMobile.height %>px; <% --[[
  2649. ]] %>"
  2650. <% if M.grid.presentation.desktop == "HTML" then %>
  2651. href="<%= theRoot %>/<%= image.exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"
  2652. <% elseif M.grid.presentation.desktop == "hs_slideshow" then %>
  2653. href="<%= theRoot %>/photos/<%= image.exportFilename %>.jpg" onclick="return hs.expand(this,{ slideshowGroup: 'images', maxWidth: <%= image.renditions.photos.width %>, captionId: 'caption_<%= image.exportFilename %>', headingId: 'heading_<%= image.exportFilename %>', autoplay: <%= M.highslide.autoplay %> })"<% if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then %> data-colorLabelNumber="color<%= image.colorLabelNumber %>" data-colorLabel="<%= image.colorLabel %>"<% end %><% if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  2654. <% elseif M.grid.presentation.desktop == "magnific" then %>
  2655. href="<%= theRoot %>/photos/<%= image.exportFilename %>.jpg"<% if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then %> data-colorLabelNumber="color<%= image.colorLabelNumber %>" data-colorLabel="<%= image.colorLabel %>"<% end %><% if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  2656. <% elseif M.grid.presentation.desktop == "photoswipe" then %>
  2657. href="<%= theRoot %>/photos/<%= image.exportFilename %>.jpg" data-size="<%= image.renditions.photos.width %>x<%= image.renditions.photos.height %>"<% if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then %> data-colorLabelNumber="color<%= image.colorLabelNumber %>" data-colorLabel="<%= image.colorLabel %>"<% end %><% if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  2658. <% elseif M.grid.presentation.desktop == "touch" then %>
  2659. data-link="slider:#thumbnail-gallery; index:<%= math.floor(cellIndex - (page * imagesPerPage - imagesPerPage + 1)) %>"<% if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  2660. <% end %>
  2661. >
  2662. <img src="$theRoot/thumbnails-for-mobile/<%= image.exportFilename %>.jpg" id="img<%= image.imageID %>" title="<%= cleandata(image.metadata.imgTitle) %>" alt="<% if image.metadata.imgAlt ~= '' then %><%= cleandata(image.metadata.imgAlt) %><% else %><%= image.exportFilename %>.jpg<% end %>" height="<%= image.renditions.thumbnailsMobile.height %>" width="<%= image.renditions.thumbnailsMobile.width %>"
  2663. style="<% --[[
  2664. ]] %>height: <%= image.renditions.thumbnailsMobile.height %>px; <% --[[
  2665. ]] %>width: <%= image.renditions.thumbnailsMobile.width %>px; <% --[[
  2666. ]] %>" <% if M.fotomoto.integration.enabled then %> rel="ftmt_img:photos/<%= image.exportFilename %>.jpg"<% end %> />
  2667. </a><!-- .gridicon -->
  2668. <% if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then %>
  2669. <ul class="grid-icons grid-icons-tl">
  2670. <li class="color-label color<%= image.colorLabelNumber %>" title="<%= image.colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></li>
  2671. </ul><!-- grid-icons-tl -->
  2672. <% end %>
  2673. <% if M.cart.integration.enabled then
  2674. if (not M.cart.integration.mixed_pricing and M.cart.integration.pricing ~= "not-for-sale") or (M.cart.integration.mixed_pricing and image.metadata.itemPricing ~= "not-for-sale") then %>
  2675. <ul class="grid-icons grid-icons-tr">
  2676. <li class="cart-button" title=""><a class="add-to-cart"<% if mode == 'publish' then %> data-item="<%= image.exportFilename %>" data-name="<% if image.metadata.itemName ~= '' then %><%= cleandata(image.metadata.itemName) %><% else %><%= image.exportFilename %><% end %>" data-price="<% if M.cart.integration.mixed_pricing and image.metadata.itemPricing ~= '' then %><%= image.metadata.itemPricing %><% else %><%= M.cart.integration.pricing %><% end %>" data-thumbnail="$theRoot/thumbnails-for-mobile/<%= image.exportFilename %>.jpg"<% end %>><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  2677. </ul><!-- grid-icons-tr -->
  2678. <% end end %>
  2679. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  2680. <ul class="grid-icons grid-icons-tr">
  2681. <li class="cart-button" title=""><a id="fm_purchase_<%= image.exportFilename %>" class="add-to-cart" href="javascript:void(0);" onclick="showPrint('#<%= image.exportFilename %> img');"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  2682. </ul><!-- grid-icons-tr -->
  2683. <% end %>
  2684. <ul class="grid-icons grid-icons-bl">
  2685. <li class="single-image-page-link-for-seo"><a href="<%= theRoot %>/<%= image.exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"><% if image.metadata.imgTitle ~= '' then %><%= cleandata(image.metadata.imgTitle) %><% else %><%= image.exportFilename %><% end %></a></li>
  2686. </ul><!-- grid-icons-bl -->
  2687. <ul class="grid-icons grid-icons-br">
  2688. <% if M.slideshowTracking.enable and M.grid.presentation.desktop == "HTML" then %>
  2689. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="<%= theRoot %>/<%= image.exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  2690. <% elseif M.slideshowTracking.enable and (M.grid.presentation.desktop == "hs_slideshow" or M.grid.presentation.desktop == "magnific") then %>
  2691. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" onclick="$('a#<%= image.exportFilename %>').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  2692. <% elseif M.slideshowTracking.enable and M.grid.presentation.desktop == "touch" then %>
  2693. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:<%= math.floor(cellIndex - (page * imagesPerPage - imagesPerPage + 1)) %>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  2694. <% end %>
  2695. <% if M.imageDownload.enable and M.imageDownload.grid.icon then %>
  2696. <li class="download-button" title="<%= M.imageDownload.title %>"><a href="<% if mode == "publish" then %><% if M.imageDownload.method == "php" then %>download.php?file=<% else %><%= theRoot %>/<% end %><%= downloadFolder %>/<%= image.exportFilename %>.<%= downloadExtension %><% else %>#<% end %>"><i class="fa fa-cloud-download fa-fw"></i></a></li>
  2697. <% end %>
  2698. </ul><!-- grid-icons-br -->
  2699. </div><!-- .griditem -->
  2700. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  2701. <ul class="image-metadata clearfix">
  2702. <% if M.perImageSetting.metadata1.enabled then %>
  2703. <li class="metadata1"><% if image.metadata.metadata1 ~= '' then %><%= cleandata(image.metadata.metadata1) %><% else %> <% end %></li>
  2704. <% end %>
  2705. <% if M.perImageSetting.metadata2.enabled then %>
  2706. <li class="metadata2"><% if image.metadata.metadata2 ~= '' then %><%= cleandata(image.metadata.metadata2) %><% else %> <% end %></li>
  2707. <% end %>
  2708. </ul>
  2709. <% end %>
  2710. </div><!-- .gridcell -->
  2711. <% if M.grid.presentation.desktop == "hs_slideshow" then %>
  2712. <% if image.metadata.imgTitle ~= '' and M.highslide.display.headings then %>
  2713. <div id="heading_<%= image.exportFilename %>" class="highslide-heading highslide-text">
  2714. <p><%= cleandata(image.metadata.imgTitle) %></p>
  2715. </div>
  2716. <% end %>
  2717. <% if image.metadata.imgAlt ~= '' and M.highslide.display.captions then %>
  2718. <div id="caption_<%= image.exportFilename %>" class="highslide-caption highslide-text">
  2719. <p><%= cleandata(image.metadata.imgAlt) %></p>
  2720. </div>
  2721. <% end %>
  2722. <% end --[[ if highslide ]] %>
  2723. </lr:GridPhotoCell>
  2724. <lr:GridEmptyCell>
  2725. <% if cellIndex <= desiredCells and M.grid_cell.empty then %>
  2726. <div class="gridcell cell-empty clearfix">
  2727. <div class="griditem">
  2728. </div><!-- .griditem -->
  2729. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  2730. <ul class="image-metadata clearfix">
  2731. <% if M.perImageSetting.metadata1.enabled then %>
  2732. <li class="metadata1"> </li>
  2733. <% end %>
  2734. <% if M.perImageSetting.metadata2.enabled then %>
  2735. <li class="metadata2"> </li>
  2736. <% end %>
  2737. </ul>
  2738. <% end %>
  2739. </div><!-- .gridcell -->
  2740. <% end %>
  2741. </lr:GridEmptyCell>
  2742. </lr:ThumbnailGrid>
  2743. </div>
  2744. <% if numGridPages > 1 then %>
  2745. <div class="pagination <% if page >= 6 then %>page-6-or-greater<% else %>page-<%= page %><% end %> pagination-bottom clearfix">
  2746. <ul class="page-navigation clearfix"><lr:Pagination>
  2747. <lr:CurrentPage>
  2748. <li class="pagenumber current">$page</li>
  2749. </lr:CurrentPage>
  2750. <lr:OtherPages>
  2751. <li class="pagenumber page-link"><a href="$link">$page</a></li>
  2752. </lr:OtherPages>
  2753. <lr:PreviousEnabled>
  2754. <li class="previous page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.previous %></a></li>
  2755. </lr:PreviousEnabled>
  2756. <lr:PreviousDisabled>
  2757. <li class="previous page-link disabled"><span><%= M.grid.pagination.previous %></span></li>
  2758. </lr:PreviousDisabled>
  2759. <lr:NextEnabled>
  2760. <li class="next page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.next %></a></li>
  2761. </lr:NextEnabled>
  2762. <lr:NextDisabled>
  2763. <li class="next page-link disabled"><span><%= M.grid.pagination.next %></span></li>
  2764. </lr:NextDisabled>
  2765. </lr:Pagination></ul>
  2766. </div><!-- pagination -->
  2767. <% end --[[ pagination ]] %>
  2768. <% if (not mobile and not single and model.grid.presentation.desktop == "photoswipe") or (mobile and model.grid.presentation.mobile == "photoswipe") then %><!-- Root element of PhotoSwipe. Must have class pswp. -->
  2769. <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
  2770. <!-- Background of PhotoSwipe.
  2771. It's a separate element, as animating opacity is faster than rgba(). -->
  2772. <div class="pswp__bg"></div>
  2773. <!-- Slides wrapper with overflow:hidden. -->
  2774. <div class="pswp__scroll-wrap">
  2775. <!-- Container that holds slides.
  2776. PhotoSwipe keeps only 3 slides in DOM to save memory. -->
  2777. <div class="pswp__container">
  2778. <!-- don't modify these 3 pswp__item elements, data is added later on -->
  2779. <div class="pswp__item"></div>
  2780. <div class="pswp__item"></div>
  2781. <div class="pswp__item"></div>
  2782. </div>
  2783. <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
  2784. <div class="pswp__ui pswp__ui--hidden">
  2785. <div class="pswp__top-bar">
  2786. <!-- Controls are self-explanatory. Order can be changed. -->
  2787. <div class="pswp__counter"></div>
  2788. <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
  2789. <button class="pswp__button pswp__button--share" title="Share"></button>
  2790. <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
  2791. <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
  2792. <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
  2793. <!-- element will get class pswp__preloader--active when preloader is running -->
  2794. <div class="pswp__preloader">
  2795. <div class="pswp__preloader__icn">
  2796. <div class="pswp__preloader__cut">
  2797. <div class="pswp__preloader__donut"></div>
  2798. </div>
  2799. </div>
  2800. </div>
  2801. </div>
  2802. <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
  2803. <div class="pswp__share-tooltip"></div>
  2804. </div>
  2805. <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>
  2806. <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>
  2807. <div class="pswp__caption">
  2808. <div class="pswp__caption__center"></div>
  2809. </div>
  2810. </div>
  2811. </div>
  2812. </div><!-- .pswp --><% end %>
  2813. <% elseif (not mobile and M.grid.type.desktop == 'ce4-standard') and publisher then %>
  2814. <% if M.cart.integration.enabled and M.cart.integration.packageButton then %>
  2815. <% write("<?php if (get_class($album) != 'SearchAlbumWrapper') { ".."?"..">")%>
  2816. <button class="add-package-to-cart add-package" data-price="<% write("<?php echo $album->getPricingScheme(); ".."?"..">")%>"><i class="fa fa-fw fa-shopping-cart"></i> <span><%= M.cart.integration.package_label %></span></button>
  2817. <% write("<?php } ".."?"..">") end %>
  2818. <% write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  2819. " echo $album->getPagination(array('position' => 'top', 'type' => 'index', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  2820. "} ".."?"..">")%>
  2821. <% if (not mobile and M.grid.presentation.desktop == "touch") or (mobile and M.grid.presentation.mobile == "touch") then %>
  2822. <div class="sliderHolder" data-elem="sliderHolder">
  2823. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  2824. <div class="sliderBg"></div>
  2825. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:<%= M.touchnswipe.maxzoom %>; playDuration:<%= M.touchnswipe.playduration %>; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  2826. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2827. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2828. <div class="captionHolder ui-off" data-elem="captionHolder">
  2829. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  2830. </div>
  2831. <div class="controlHolder ui-off"><ul>
  2832. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  2833. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  2834. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  2835. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  2836. <% if M.cart.integration.enabled and publisher then %>
  2837. <% write("<?php if ($album->cartEnabled()) { ".."?"..">")%>
  2838. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2839. <% write("<?php } ".."?"..">")%>
  2840. <% elseif M.cart.integration.enabled or M.fotomoto.integration.enabled then %>
  2841. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2842. <% else
  2843. if M.permalinks.on then %>
  2844. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  2845. <% else %>
  2846. <li> </li>
  2847. <% end end %>
  2848. <% if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then %>
  2849. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  2850. <% end %>
  2851. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  2852. <li class="touch-share-menu touch-facebook share-off"><a><i class="fa fa-fw fa-facebook"></i></a></li>
  2853. <li class="touch-share-menu touch-linkedin share-off"><a><i class="fa fa-fw fa-linkedin"></i></a></li>
  2854. <li class="touch-share-menu touch-twitter share-off"><a><i class="fa fa-fw fa-twitter"></i></a></li>
  2855. <li class="touch-share-menu touch-google-plus share-off"><a><i class="fa fa-fw fa-google-plus"></i></a></li>
  2856. <li class="touch-share-menu touch-pinterest share-off"><a><i class="fa fa-fw fa-pinterest"></i></a></li>
  2857. <li class="touch-share-menu touch-email share-off"><a><i class="fa fa-fw fa-envelope"></i></a></li>
  2858. <% end --[[ socialmedia ]] %>
  2859. <% if (M.cart.integration.enabled or M.fotomoto.integration.enabled) and M.permalinks.on then %>
  2860. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  2861. <% end %>
  2862. <% if M.googleMaps.enable then %>
  2863. <li class="touch-share-menu touch-maps share-off"><a><i class="fa fa-fw fa-map-marker"></i></a></li>
  2864. <% end %>
  2865. <% if M.imageDownload.enable then %>
  2866. <li class="touch-share-menu touch-download share-off"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>
  2867. <% end %>
  2868. </ul></div>
  2869. <% if not publisher then %>
  2870. <ul data-elem="items">
  2871. <%
  2872. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  2873. local firstId = page * imagesPerPage - imagesPerPage + 1
  2874. local lastId = imagesPerPage * page
  2875. if numImages <= lastId then
  2876. lastId = numImages
  2877. end
  2878. for index=firstId, lastId do
  2879. %>
  2880. <li><a href="$theRoot/photos/<%= getImage(index).exportFilename %>.jpg"><img src="$theRoot/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg" data-info="thumbId:<%= getImage(index).exportFilename %>;" title="<%= cleandata(getImage(index).metadata.imgTitle) %>" alt="<%= cleandata(getImage(index).metadata.imgAlt) %>" /></a>
  2881. <div class="imageCaption" data-elem="imgCaption">
  2882. <p>
  2883. <% if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then %>
  2884. <span class="color-label color<%= getImage(index).colorLabelNumber %>" title="<%= getImage(index).colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></span>
  2885. <% end %>
  2886. <% if M.highslide.display.headings then %><span class="caption-title"><%= cleandata(getImage(index).metadata.imgTitle) %></span><% end %><% if (getImage(index).metadata.imgTitle ~= '' and M.highslide.display.headings) and (getImage(index).metadata.imgAlt ~= '' and M.highslide.display.captions) then %><br /><% end %>
  2887. <% if M.highslide.display.captions then %><%= cleandata(getImage(index).metadata.imgAlt) %><% end %>
  2888. </p>
  2889. </div>
  2890. </li>
  2891. <% end --[[ loop ]] %>
  2892. </ul>
  2893. <% else --[[ if publisher ]] %>
  2894. <ul data-elem="items">
  2895. <% write("<?php foreach ($album->getPhotosForPage() as $photo) { ".."?"..">")%>
  2896. <li><a href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"><img src="<?php echo $photo->getURL('thumbnails-for-mobile');?>" data-info="thumbId:<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>; albumURL:<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php $altCopy = $photo->hasMetadata('image_caption') ? $photo->getMetadata('image_caption') : $photo->getItemNumber() . '.jpg'; echo $altcopy; ".."?"..">")%>" /></a>
  2897. <div class="imageCaption" data-elem="imgCaption">
  2898. <p>
  2899. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  2900. <span class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></span>
  2901. <% write("<?php } ".."?"..">")%><% end %>
  2902. <% if M.highslide.display.headings then %><span class="caption-title"><% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%></span><% end %><% if M.highslide.display.headings and M.highslide.display.captions then %><% write("<?php echo $photo->hasMetadata('image_title') && $photo->hasMetadata('image_caption') ? '<br />' : ''; ".."?"..">")%><% end %>
  2903. <% if M.highslide.display.captions then %><% write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">")%><% end %>
  2904. </p>
  2905. </div>
  2906. </li>
  2907. <% write("<?php } ".."?"..">")%>
  2908. </ul>
  2909. <% end --[[ is publisher or not? ]] %>
  2910. </div>
  2911. </div><!-- sliderHolder -->
  2912. <% end %>
  2913. <div class="clearfix">
  2914. <%
  2915. local border = 0
  2916. if M.grid_cell.image_border.enabled then border = 2 end
  2917. local thumbnailRendition = 'thumbnails-for-mobile'
  2918. if M.grid_cell.iconic.enabled then
  2919. thumbnailRendition = 'thumbnails'
  2920. end
  2921. write("<?php \n"..
  2922. " $cellnumber=1;\n"..
  2923. " $pin_url = CURRENTPAGELOCATION;\n"..
  2924. " $base_url ='./';\n"..
  2925. " $border = ".. border ..";\n"..
  2926. " $count = 0;\n"..
  2927. " $thumbnailsRendition = '".. thumbnailRendition .. "'; \n"..
  2928. "\n"..
  2929. " foreach ($album->getPhotosForPage() as $photo) {\n"..
  2930. " $item_number = $photo->getItemNumber();\n"..
  2931. " $width = $photo->getThumbnailWidth();\n"..
  2932. " $height = $photo->getThumbnailHeight();\n"..
  2933. "\n"..
  2934. " if ($width > $height) {\n"..
  2935. " $orientation = 'landscape';\n"..
  2936. " } else {\n"..
  2937. " $orientation = 'portrait';\n"..
  2938. " }\n"..
  2939. "\n"..
  2940. " $tnTop = ($album->getTemplateSetting('cellContentHeight') - $height - $border) / 2;\n"..
  2941. " $tnLeft = ($album->getTemplateSetting('cellContentWidth') - $width - $border) / 2;\n"..
  2942. "?"..">")
  2943. if M.imageDownload.enable then
  2944. if mobile then
  2945. write("<?php \n"..
  2946. "$downloadURL = method_exists($photo, 'getDirectDownloadLink') ? $photo->getDirectDownloadLink() : $photo->getAlbumURL().'photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  2947. "?"..">")
  2948. else
  2949. write("<?php \n"..
  2950. "$downloadURL = method_exists($photo, 'getDownloadURL') ? $photo->getDownloadURL() : $photo->getAlbumURL().'download.php?file=photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  2951. "?"..">")
  2952. end
  2953. end
  2954. %>
  2955. <div class="gridcell clearfix" id="cell-<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>">
  2956. <div class="griditem <% write("<?php echo $orientation; ".."?"..">")%> clearfix" style="background-image: url(<% write("<?php echo $photo->getURL($thumbnailsRendition); ".."?"..">")%>); background-size: <% write("<?php echo $photo->getRenditionWidth($thumbnailsRendition); ".."?"..">")%>px <% write("<?php echo $photo->getRenditionHeight($thumbnailsRendition); ".."?"..">")%>px;">
  2957. <% if M.grid_cell.numbers.enabled then %>
  2958. <div class="cellnumber"><% write("<?php echo $photo->getCellNumber(); ".."?"..">")%></div>
  2959. <% end %>
  2960. <% --[[ Extra code to handle Maps ]]
  2961. write("<?php\n"..
  2962. "$mapMarkup = '';\n"..
  2963. "if ($photo->hasLocation()) {\n"..
  2964. " if (get_class($photo) == 'PhotoSearchResult') {\n"..
  2965. " if (method_exists($photo, 'mapsEnabled') && $photo->mapsEnabled()) {\n"..
  2966. " $mapMarkup = ' data-gps=\"'.$photo->getSearchMapsURL().'\"';\n"..
  2967. " }\n"..
  2968. " } else if ($album->mapsEnabled()) {\n"..
  2969. " $mapMarkup = ' data-gps=\"'.$photo->getMapsURL($album->getTemplateSetting('mapZoomLevel', 18), $album->getTemplateSetting('mapType', 'm')).'\"';\n"..
  2970. " }\n"..
  2971. "}\n"..
  2972. "?"..">")%>
  2973. <a id="<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" class="image-link gridicon<% if M.grid_cell.image_shadows then %> drop-shadow<% end %>"
  2974. style="<% --[[
  2975. ]] %>top: <% write("<?php echo $tnTop; ".."?"..">")%>px; <% --[[
  2976. ]] %>left: <% write("<?php echo $tnLeft; ".."?"..">")%>px; <% --[[
  2977. ]] %>width: <% write("<?php echo $width; ".."?"..">")%>px; <% --[[
  2978. ]] %>height: <% write("<?php echo $height; ".."?"..">")%>px; <% --[[
  2979. ]] %>"
  2980. <% if M.grid.presentation.desktop == "HTML" then %>
  2981. href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"
  2982. <% elseif M.grid.presentation.desktop == "hs_slideshow" then %>
  2983. href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>" onclick="return hs.expand(this,{ slideshowGroup: 'images', maxWidth: <% write("<?php echo $photo->getPhotoWidth(); ".."?"..">")%>, captionId: 'caption_<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>', headingId: 'heading_<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>', autoplay: <%= M.highslide.autoplay %> })"<% if M.colorLabels.display then %> data-colorLabelNumber="color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" data-colorLabel="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"<% end %><% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %>
  2984. <% elseif M.grid.presentation.desktop == "magnific" then %>
  2985. href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"<% if M.colorLabels.display then %> data-colorLabelNumber="color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" data-colorLabel="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"<% end %><% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %> data-album-url="<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>"
  2986. <% elseif M.grid.presentation.desktop == "touch" then %>
  2987. data-link="slider:#thumbnail-gallery; index:<% write("<?php echo $count; ".."?"..">")%>"<% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %>
  2988. <% end %>
  2989. >
  2990. <img src="<% write("<?php echo $photo->getURL('thumbnails-for-mobile'); ".."?"..">")%>" id="img-<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php if ($photo->hasMetadata('image_caption')) { echo $photo->getMetadata('image_caption'); } else { echo $photo->getFilename(); } ".."?"..">")%>" height="<% write("<?php echo $height; ".."?"..">")%>" width="<% write("<?php echo $width; ".."?"..">")%>"
  2991. style="<% --[[
  2992. ]] %>height: <% write("<?php echo $height; ".."?"..">")%>px; <% --[[
  2993. ]] %>width: <% write("<?php echo $width; ".."?"..">")%>px;<% --[[
  2994. ]] %>"<% if M.fotomoto.integration.enabled then %> rel="ftmt_img:photos/<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>.jpg"<% end %> />
  2995. </a><!-- .gridicon -->
  2996. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  2997. <ul class="grid-icons grid-icons-tl">
  2998. <li class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></li>
  2999. </ul><!-- grid-icons-tl -->
  3000. <% write("<?php } ".."?"..">")%><% end %>
  3001. <% if M.cart.integration.enabled then %>
  3002. <% write("<?php if ($photo->forSale($album)) { ".."?"..">")%>
  3003. <ul class="grid-icons grid-icons-tr">
  3004. <li class="cart-button" title=""><a class="add-to-cart" data-item="<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" data-name="<% write("<?php echo $photo->getItemName(); ".."?"..">")%>" data-price="<% write("<?php echo $photo->getMetadata('itemPricing'); ".."?"..">")%>" data-thumbnail="<% write("<?php echo $photo->getURL('thumbnails-for-mobile'); ".."?"..">")%>"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3005. </ul><!-- grid-icons-tr -->
  3006. <% write("<?php } ".."?"..">")%><% end %>
  3007. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  3008. <ul class="grid-icons grid-icons-tr">
  3009. <li class="cart-button" title=""><a id="fm_purchase_<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" class="add-to-cart" onclick="showPrint('#<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%> img');"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3010. </ul><!-- grid-icons-tr -->
  3011. <% end %>
  3012. <ul class="grid-icons grid-icons-bl">
  3013. <li class="single-image-page-link-for-seo"><a href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"><% write("<?php echo $photo->getTitle(); ".."?"..">")%></a></li>
  3014. </ul><!-- grid-icons-bl -->
  3015. <ul class="grid-icons grid-icons-br">
  3016. <% if M.slideshowTracking.enable and M.grid.presentation.desktop == "HTML" then %>
  3017. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3018. <% elseif M.slideshowTracking.enable and (M.grid.presentation.desktop == "hs_slideshow" or M.grid.presentation.desktop == "magnific") then %>
  3019. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" onclick="$('a#<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3020. <% elseif M.slideshowTracking.enable and M.grid.presentation.desktop == "touch" then %>
  3021. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:<% write("<?php echo $count; ".."?"..">")%>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3022. <% end %>
  3023. <% if M.imageDownload.enable and M.imageDownload.grid.icon then %>
  3024. <% write("<?php if ($downloadURL) { ".."?"..">")%>
  3025. <li class="download-button" title="<%= M.imageDownload.title %>"><a href="<% write("<?php echo $downloadURL; ".."?"..">")%>"><i class="fa fa-cloud-download fa-fw"></i></a></li>
  3026. <% write("<?php } ".."?"..">") end %>
  3027. </ul><!-- grid-icons-br -->
  3028. </div><!-- .griditem -->
  3029. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  3030. <ul class="image-metadata clearfix">
  3031. <% if M.perImageSetting.metadata1.enabled then %>
  3032. <% write("<?php if ($photo->hasMetadata('metadata1')) { ".."?"..">")%>
  3033. <li class="metadata1"><% write("<?php echo $photo->getMetadata('metadata1'); ".."?"..">")%></li>
  3034. <% write("<?php } else { ".."?"..">")%>
  3035. <li class="metadata1"> </li>
  3036. <% write("<?php } ".."?"..">")%>
  3037. <% end %>
  3038. <% if M.perImageSetting.metadata2.enabled then %>
  3039. <% write("<?php if ($photo->hasMetadata('metadata2')) { ".."?"..">")%>
  3040. <li class="metadata2"><% write("<?php echo $photo->getMetadata('metadata2'); ".."?"..">")%></li>
  3041. <% write("<?php } else { ".."?"..">")%>
  3042. <li class="metadata2"> </li>
  3043. <% write("<?php } ".."?"..">")%>
  3044. <% end %>
  3045. </ul>
  3046. <% end %>
  3047. </div><!-- .gridcell -->
  3048. <% if M.grid.presentation.desktop == "hs_slideshow" and M.highslide.display.headings then %>
  3049. <% write("<?php if ($photo->hasMetadata('image_title')) { ".."?"..">")%>
  3050. <div class="highslide-heading highslide-text" id="heading_<% write("<?php echo $item_number; ".."?"..">")%>">
  3051. <p><% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%></p>
  3052. </div>
  3053. <% write("<?php } ".."?"..">")%>
  3054. <% end --[[ if highslide and headings ]] %>
  3055. <% if M.grid.presentation.desktop == "hs_slideshow" and M.highslide.display.captions then %>
  3056. <% write("<?php if ($photo->hasMetadata('image_caption')) { ".."?"..">")%>
  3057. <div class="highslide-caption highslide-text" id="caption_<% write("<?php echo $item_number; ".."?"..">")%>">
  3058. <p><% write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">")%></p>
  3059. </div>
  3060. <% write("<?php } ".."?"..">")%>
  3061. <% end --[[ if highslide and captions ]] %>
  3062. <% --[[ close foreach loop : ]]
  3063. write("<?php $count++;\n"..
  3064. "} ".."?"..">")%>
  3065. <% if M.grid_cell.empty then write("<?php \n"..
  3066. " $photosShown = count($album->getPhotosForPage());\n"..
  3067. " $columnsInGrid = $album->getTemplateSetting('columnsInGrid', 0);\n"..
  3068. " $modCells = $photosShown % $columnsInGrid;\n"..
  3069. " $extraCells = $modCells > 0 ? $columnsInGrid - $modCells : 0;\n"..
  3070. " for ($i = 0; $i < $extraCells; $i++) { ".."?"..">")%>
  3071. <div class="gridcell cell-empty clearfix">
  3072. <div class="griditem">
  3073. </div><!-- .griditem -->
  3074. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  3075. <ul class="image-metadata clearfix">
  3076. <% if M.perImageSetting.metadata1.enabled then %>
  3077. <li class="metadata1"> </li>
  3078. <% end %>
  3079. <% if M.perImageSetting.metadata2.enabled then %>
  3080. <li class="metadata2"> </li>
  3081. <% end %>
  3082. </ul>
  3083. <% end %>
  3084. </div><!-- .gridcell -->
  3085. <% write("<?php } ".."?"..">") end %>
  3086. </div>
  3087. <% write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  3088. " echo $album->getPagination(array('position' => 'bottom', 'type' => 'index', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  3089. "} ".."?"..">")%>
  3090. <% elseif (not mobile and M.grid.type.desktop == 'ce4-freewall') and not publisher then %>
  3091. <% if M.cart.integration.enabled and M.cart.integration.packageButton then %>
  3092. <button class="add-package-to-cart add-package" data-price="<%= M.cart.integration.package_pricing %>"><i class="fa fa-fw fa-shopping-cart"></i> <span><%= M.cart.integration.package_label %></span></button>
  3093. <% end %>
  3094. <% if numGridPages > 1 then %>
  3095. <div class="pagination <% if page >= 6 then %>page-6-or-greater<% else %>page-<%= page %><% end %> pagination-top clearfix">
  3096. <ul class="page-navigation clearfix"><lr:Pagination>
  3097. <lr:CurrentPage>
  3098. <li class="pagenumber current">$page</li>
  3099. </lr:CurrentPage>
  3100. <lr:OtherPages>
  3101. <li class="pagenumber page-link"><a href="$link">$page</a></li>
  3102. </lr:OtherPages>
  3103. <lr:PreviousEnabled>
  3104. <li class="previous page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.previous %></a></li>
  3105. </lr:PreviousEnabled>
  3106. <lr:PreviousDisabled>
  3107. <li class="previous page-link disabled"><span><%= M.grid.pagination.previous %></span></li>
  3108. </lr:PreviousDisabled>
  3109. <lr:NextEnabled>
  3110. <li class="next page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.next %></a></li>
  3111. </lr:NextEnabled>
  3112. <lr:NextDisabled>
  3113. <li class="next page-link disabled"><span><%= M.grid.pagination.next %></span></li>
  3114. </lr:NextDisabled>
  3115. </lr:Pagination></ul>
  3116. </div><!-- pagination -->
  3117. <% end --[[ pagination ]] %>
  3118. <% if (not mobile and M.grid.presentation.desktop == "touch") or (mobile and M.grid.presentation.mobile == "touch") then %>
  3119. <div class="sliderHolder" data-elem="sliderHolder">
  3120. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  3121. <div class="sliderBg"></div>
  3122. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:<%= M.touchnswipe.maxzoom %>; playDuration:<%= M.touchnswipe.playduration %>; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  3123. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3124. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3125. <div class="captionHolder ui-off" data-elem="captionHolder">
  3126. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  3127. </div>
  3128. <div class="controlHolder ui-off"><ul>
  3129. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  3130. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  3131. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  3132. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  3133. <% if M.cart.integration.enabled and publisher then %>
  3134. <% write("<?php if ($album->cartEnabled()) { ".."?"..">")%>
  3135. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  3136. <% write("<?php } ".."?"..">")%>
  3137. <% elseif M.cart.integration.enabled or M.fotomoto.integration.enabled then %>
  3138. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  3139. <% else
  3140. if M.permalinks.on then %>
  3141. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  3142. <% else %>
  3143. <li> </li>
  3144. <% end end %>
  3145. <% if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then %>
  3146. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  3147. <% end %>
  3148. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  3149. <li class="touch-share-menu touch-facebook share-off"><a><i class="fa fa-fw fa-facebook"></i></a></li>
  3150. <li class="touch-share-menu touch-linkedin share-off"><a><i class="fa fa-fw fa-linkedin"></i></a></li>
  3151. <li class="touch-share-menu touch-twitter share-off"><a><i class="fa fa-fw fa-twitter"></i></a></li>
  3152. <li class="touch-share-menu touch-google-plus share-off"><a><i class="fa fa-fw fa-google-plus"></i></a></li>
  3153. <li class="touch-share-menu touch-pinterest share-off"><a><i class="fa fa-fw fa-pinterest"></i></a></li>
  3154. <li class="touch-share-menu touch-email share-off"><a><i class="fa fa-fw fa-envelope"></i></a></li>
  3155. <% end --[[ socialmedia ]] %>
  3156. <% if (M.cart.integration.enabled or M.fotomoto.integration.enabled) and M.permalinks.on then %>
  3157. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  3158. <% end %>
  3159. <% if M.googleMaps.enable then %>
  3160. <li class="touch-share-menu touch-maps share-off"><a><i class="fa fa-fw fa-map-marker"></i></a></li>
  3161. <% end %>
  3162. <% if M.imageDownload.enable then %>
  3163. <li class="touch-share-menu touch-download share-off"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>
  3164. <% end %>
  3165. </ul></div>
  3166. <% if not publisher then %>
  3167. <ul data-elem="items">
  3168. <%
  3169. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  3170. local firstId = page * imagesPerPage - imagesPerPage + 1
  3171. local lastId = imagesPerPage * page
  3172. if numImages <= lastId then
  3173. lastId = numImages
  3174. end
  3175. for index=firstId, lastId do
  3176. %>
  3177. <li><a href="$theRoot/photos/<%= getImage(index).exportFilename %>.jpg"><img src="$theRoot/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg" data-info="thumbId:<%= getImage(index).exportFilename %>;" title="<%= cleandata(getImage(index).metadata.imgTitle) %>" alt="<%= cleandata(getImage(index).metadata.imgAlt) %>" /></a>
  3178. <div class="imageCaption" data-elem="imgCaption">
  3179. <p>
  3180. <% if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then %>
  3181. <span class="color-label color<%= getImage(index).colorLabelNumber %>" title="<%= getImage(index).colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></span>
  3182. <% end %>
  3183. <% if M.highslide.display.headings then %><span class="caption-title"><%= cleandata(getImage(index).metadata.imgTitle) %></span><% end %><% if (getImage(index).metadata.imgTitle ~= '' and M.highslide.display.headings) and (getImage(index).metadata.imgAlt ~= '' and M.highslide.display.captions) then %><br /><% end %>
  3184. <% if M.highslide.display.captions then %><%= cleandata(getImage(index).metadata.imgAlt) %><% end %>
  3185. </p>
  3186. </div>
  3187. </li>
  3188. <% end --[[ loop ]] %>
  3189. </ul>
  3190. <% else --[[ if publisher ]] %>
  3191. <ul data-elem="items">
  3192. <% write("<?php foreach ($album->getPhotosForPage() as $photo) { ".."?"..">")%>
  3193. <li><a href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"><img src="<?php echo $photo->getURL('thumbnails-for-mobile');?>" data-info="thumbId:<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>; albumURL:<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php $altCopy = $photo->hasMetadata('image_caption') ? $photo->getMetadata('image_caption') : $photo->getItemNumber() . '.jpg'; echo $altcopy; ".."?"..">")%>" /></a>
  3194. <div class="imageCaption" data-elem="imgCaption">
  3195. <p>
  3196. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  3197. <span class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></span>
  3198. <% write("<?php } ".."?"..">")%><% end %>
  3199. <% if M.highslide.display.headings then %><span class="caption-title"><% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%></span><% end %><% if M.highslide.display.headings and M.highslide.display.captions then %><% write("<?php echo $photo->hasMetadata('image_title') && $photo->hasMetadata('image_caption') ? '<br />' : ''; ".."?"..">")%><% end %>
  3200. <% if M.highslide.display.captions then %><% write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">")%><% end %>
  3201. </p>
  3202. </div>
  3203. </li>
  3204. <% write("<?php } ".."?"..">")%>
  3205. </ul>
  3206. <% end --[[ is publisher or not? ]] %>
  3207. </div>
  3208. </div><!-- sliderHolder -->
  3209. <% end %>
  3210. <div class="freewall-spinner clearfix"><i class="fa fa-spinner fa-spin"></i></div>
  3211. <div id="freewall" class="hidden-gallery clearfix">
  3212. <lr:ThumbnailGrid>
  3213. <%
  3214. local imagesPerPage = M.grid.pagination.imagesperpage
  3215. local border = 0
  3216. if M.grid_cell.image_border.enabled then border = 2 end
  3217. %>
  3218. <lr:GridPhotoCell>
  3219. <% local gpsData = image.metadata.gpsLocation %><%
  3220. --[[ Get GPS location data ]]
  3221. --[[ Rather than defining gpsData here, we are defining it separately for desktop and mobile in the respective page templates
  3222. local gpsData = image.metadata.gpsLocation ]]
  3223. --[[ Begin Google Maps ]]
  3224. if model.googleMaps.enable then
  3225. if gpsData == "" then
  3226. else
  3227. --[[ Round to idp decimal places ]]
  3228. function round(num, idp)
  3229. local mult = 10^(idp or 0)
  3230. return math.floor(num * mult + 0.5) / mult
  3231. end
  3232. --[[ Convert DMS to DD ]]
  3233. function latlongDMStoDD(brng)
  3234. local precision = 6
  3235. local dms = {}
  3236. for w in string.gfind(brng, "%d+") do
  3237. table.insert(dms, w)
  3238. end
  3239. local deg = dms[1]/1 + dms[2]/60 + dms[3]/3600
  3240. deg = round(deg, precision)
  3241. local dir = string.match(brng, "%u")
  3242. if dir == "S" then
  3243. deg = -deg
  3244. elseif dir == "W" then
  3245. deg = -deg
  3246. else
  3247. end
  3248. return deg
  3249. end
  3250. --[[ Find latitude and longitude strings ]]
  3251. local dms_pattern = "%d+%W+%d+%W+%d+%W+%u"
  3252. local latlongDMS = {}
  3253. for w in string.gfind(gpsData, dms_pattern) do
  3254. table.insert(latlongDMS, w)
  3255. end
  3256. --[[ Create latitude,longitude decimal degree string ]]
  3257. local latlongDD = latlongDMStoDD(latlongDMS[1]) .. "," .. latlongDMStoDD(latlongDMS[2])
  3258. --[[ Create Google Maps URL ]]
  3259. googleURL = "http://maps.google.com/maps/api/staticmap?center=" .. latlongDD
  3260. googleURL = googleURL .. "&markers=color:red|label:A|" .. latlongDD
  3261. googleURL = googleURL .. "&maptype=" .. model.googleMaps.mapType
  3262. googleURL = googleURL .. "&zoom=18"
  3263. googleURL = googleURL .. "&size=640x640"
  3264. googleURL = googleURL .. "&sensor=false"
  3265. googleMapsURL = "http://maps.google.com/maps?f=q&q=loc:" .. latlongDD --[[ marker location ]]
  3266. googleMapsURL = googleMapsURL .. "&ll=" .. latlongDD --[[ map center ]]
  3267. googleMapsURL = googleMapsURL .. "&t=" .. model.googleMaps.mapType
  3268. --[[ googleMapsURL = googleMapsURL .. "&iwloc=near" ]]
  3269. googleMapsURL = googleMapsURL .. "&z=18"
  3270. end
  3271. else end
  3272. --[[ End Google Maps ]]
  3273. %>
  3274. <div class="brick clearfix" style="height: <%= math.floor(M.photoSizes.thumbnails.height + (M.grid_cell.margin * 2) + (M.grid_cell.padding * 2) + M.grid_cell.bt + M.grid_cell.bb) %>px;">
  3275. <div class="gridcell" id="cell-<%= image.exportFilename %>">
  3276. <% if M.grid_cell.numbers.enabled then %>
  3277. <div class="cellnumber"><%= cellIndex %></div>
  3278. <% end %>
  3279. <a id="<%= image.exportFilename %>" class="image-link gridicon<% if M.grid_cell.image_shadows then %> drop-shadow<% end %>"
  3280. <% if M.grid.presentation.desktop == "HTML" then %>
  3281. href="<%= theRoot %>/<%= image.exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"
  3282. <% elseif M.grid.presentation.desktop == "hs_slideshow" then %>
  3283. href="<%= theRoot %>/photos/<%= image.exportFilename %>.jpg" onclick="return hs.expand(this,{ slideshowGroup: 'images', maxWidth: <%= image.renditions.photos.width %>, captionId: 'caption_<%= image.exportFilename %>', headingId: 'heading_<%= image.exportFilename %>', autoplay: <%= M.highslide.autoplay %> })"<% if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then %> data-colorLabelNumber="color<%= image.colorLabelNumber %>" data-colorLabel="<%= image.colorLabel %>"<% end %><% if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  3284. <% elseif M.grid.presentation.desktop == "magnific" then %>
  3285. href="<%= theRoot %>/photos/<%= image.exportFilename %>.jpg"<% if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then %> data-colorLabelNumber="color<%= image.colorLabelNumber %>" data-colorLabel="<%= image.colorLabel %>"<% end %><% if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  3286. <% elseif M.grid.presentation.desktop == "touch" then %>
  3287. data-link="slider:#thumbnail-gallery; index:<%= math.floor(cellIndex - (page * imagesPerPage - imagesPerPage + 1)) %>"<% if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  3288. <% end %>
  3289. >
  3290. <img src="$theRoot/thumbnails/<%= image.exportFilename %>.jpg" id="img<%= image.imageID %>" title="<%= cleandata(image.metadata.imgTitle) %>" alt="<% if image.metadata.imgAlt ~= '' then %><%= cleandata(image.metadata.imgAlt) %><% else %><%= image.exportFilename %>.jpg<% end %>" height="<%= image.renditions.thumbnails.height %>" width="<%= image.renditions.thumbnails.width %>"
  3291. <% if M.freewall.layout == 'rigid' then %>
  3292. style="<% --[[
  3293. ]] %>height: <%= image.renditions.thumbnails.height %>px; <% --[[
  3294. ]] %>width: <%= image.renditions.thumbnails.width %>px; <% --[[
  3295. ]] %>"<% end %><% if M.fotomoto.integration.enabled then %> rel="ftmt_img:photos/<%= image.exportFilename %>.jpg"<% end %> />
  3296. </a><!-- .gridicon -->
  3297. <% if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then %>
  3298. <ul class="grid-icons grid-icons-tl">
  3299. <li class="color-label color<%= image.colorLabelNumber %>" title="<%= image.colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></li>
  3300. </ul><!-- grid-icons-tl -->
  3301. <% end %>
  3302. <% if M.cart.integration.enabled then
  3303. if (not M.cart.integration.mixed_pricing and M.cart.integration.pricing ~= "not-for-sale") or (M.cart.integration.mixed_pricing and image.metadata.itemPricing ~= "not-for-sale") then %>
  3304. <ul class="grid-icons grid-icons-tr">
  3305. <li class="cart-button" title=""><a class="add-to-cart"<% if mode == 'publish' then %> data-item="<%= image.exportFilename %>" data-name="<% if image.metadata.itemName ~= '' then %><%= cleandata(image.metadata.itemName) %><% else %><%= image.exportFilename %><% end %>" data-price="<% if M.cart.integration.mixed_pricing and image.metadata.itemPricing ~= '' then %><%= image.metadata.itemPricing %><% else %><%= M.cart.integration.pricing %><% end %>" data-thumbnail="$theRoot/thumbnails-for-mobile/<%= image.exportFilename %>.jpg"<% end %>><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3306. </ul><!-- grid-icons-tr -->
  3307. <% end end %>
  3308. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  3309. <ul class="grid-icons grid-icons-tr">
  3310. <li class="cart-button" title=""><a id="fm_purchase_<%= image.exportFilename %>" class="add-to-cart" href="javascript:void(0);" onclick="showPrint('#<%= image.exportFilename %> img');"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3311. </ul><!-- grid-icons-tr -->
  3312. <% end %>
  3313. <ul class="grid-icons grid-icons-bl">
  3314. <li class="single-image-page-link-for-seo"><a href="<%= theRoot %>/<%= image.exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"><% if image.metadata.imgTitle ~= '' then %><%= cleandata(image.metadata.imgTitle) %><% else %><%= image.exportFilename %><% end %></a></li>
  3315. </ul><!-- grid-icons-bl -->
  3316. <ul class="grid-icons grid-icons-br">
  3317. <% if M.slideshowTracking.enable and M.grid.presentation.desktop == "HTML" then %>
  3318. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="<%= theRoot %>/<%= image.exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3319. <% elseif M.slideshowTracking.enable and (M.grid.presentation.desktop == "hs_slideshow" or M.grid.presentation.desktop == "magnific") then %>
  3320. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" onclick="$('a#<%= image.exportFilename %>').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3321. <% elseif M.slideshowTracking.enable and M.grid.presentation.desktop == "touch" then %>
  3322. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:<%= math.floor(cellIndex - (page * imagesPerPage - imagesPerPage + 1)) %>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3323. <% end %>
  3324. <% if M.imageDownload.enable and M.imageDownload.grid.icon then %>
  3325. <li class="download-button" title="<%= M.imageDownload.title %>"><a href="<% if mode == "publish" then %><% if M.imageDownload.method == "php" then %>download.php?file=<% else %><%= theRoot %>/<% end %><%= downloadFolder %>/<%= image.exportFilename %>.<%= downloadExtension %><% else %>#<% end %>"><i class="fa fa-cloud-download fa-fw"></i></a></li>
  3326. <% end %>
  3327. </ul><!-- grid-icons-br -->
  3328. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  3329. <ul class="image-metadata clearfix">
  3330. <% if M.perImageSetting.metadata1.enabled then %>
  3331. <li class="metadata1"><% if image.metadata.metadata1 ~= '' then %><%= cleandata(image.metadata.metadata1) %><% else %> <% end %></li>
  3332. <% end %>
  3333. <% if M.perImageSetting.metadata2.enabled then %>
  3334. <li class="metadata2"><% if image.metadata.metadata2 ~= '' then %><%= cleandata(image.metadata.metadata2) %><% else %> <% end %></li>
  3335. <% end %>
  3336. </ul>
  3337. <% end %>
  3338. </div><!-- gridcell -->
  3339. </div><!-- brick -->
  3340. <% if M.grid.presentation.desktop == "hs_slideshow" then %>
  3341. <% if image.metadata.imgTitle ~= '' and M.highslide.display.headings then %>
  3342. <div id="heading_<%= image.exportFilename %>" class="highslide-heading highslide-text">
  3343. <p><%= cleandata(image.metadata.imgTitle) %></p>
  3344. </div>
  3345. <% end %>
  3346. <% if image.metadata.imgAlt ~= '' and M.highslide.display.captions then %>
  3347. <div id="caption_<%= image.exportFilename %>" class="highslide-caption highslide-text">
  3348. <p><%= cleandata(image.metadata.imgAlt) %></p>
  3349. </div>
  3350. <% end %>
  3351. <% end --[[ if highslide ]] %>
  3352. </lr:GridPhotoCell>
  3353. </lr:ThumbnailGrid>
  3354. </div>
  3355. <% if numGridPages > 1 then %>
  3356. <div class="pagination <% if page >= 6 then %>page-6-or-greater<% else %>page-<%= page %><% end %> pagination-bottom clearfix">
  3357. <ul class="page-navigation clearfix"><lr:Pagination>
  3358. <lr:CurrentPage>
  3359. <li class="pagenumber current">$page</li>
  3360. </lr:CurrentPage>
  3361. <lr:OtherPages>
  3362. <li class="pagenumber page-link"><a href="$link">$page</a></li>
  3363. </lr:OtherPages>
  3364. <lr:PreviousEnabled>
  3365. <li class="previous page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.previous %></a></li>
  3366. </lr:PreviousEnabled>
  3367. <lr:PreviousDisabled>
  3368. <li class="previous page-link disabled"><span><%= M.grid.pagination.previous %></span></li>
  3369. </lr:PreviousDisabled>
  3370. <lr:NextEnabled>
  3371. <li class="next page-link"><a class="paginationLinks" href="$link"><%= M.grid.pagination.next %></a></li>
  3372. </lr:NextEnabled>
  3373. <lr:NextDisabled>
  3374. <li class="next page-link disabled"><span><%= M.grid.pagination.next %></span></li>
  3375. </lr:NextDisabled>
  3376. </lr:Pagination></ul>
  3377. </div><!-- pagination -->
  3378. <% end --[[ pagination ]] %>
  3379. <% elseif (not mobile and M.grid.type.desktop == 'ce4-freewall') and publisher then %>
  3380. <% if M.cart.integration.enabled and M.cart.integration.packageButton then %>
  3381. <% write("<?php if (get_class($album) != 'SearchAlbumWrapper') { ".."?"..">")%>
  3382. <button class="add-package-to-cart add-package" data-price="<% write("<?php echo $album->getPricingScheme(); ".."?"..">")%>"><i class="fa fa-fw fa-shopping-cart"></i> <span><%= M.cart.integration.package_label %></span></button>
  3383. <% write("<?php } ".."?"..">") end %>
  3384. <% write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  3385. " echo $album->getPagination(array('position' => 'top', 'type' => 'index', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  3386. "} ".."?"..">")%>
  3387. <% if (not mobile and M.grid.presentation.desktop == "touch") or (mobile and M.grid.presentation.mobile == "touch") then %>
  3388. <div class="sliderHolder" data-elem="sliderHolder">
  3389. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  3390. <div class="sliderBg"></div>
  3391. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:<%= M.touchnswipe.maxzoom %>; playDuration:<%= M.touchnswipe.playduration %>; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  3392. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3393. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3394. <div class="captionHolder ui-off" data-elem="captionHolder">
  3395. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  3396. </div>
  3397. <div class="controlHolder ui-off"><ul>
  3398. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  3399. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  3400. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  3401. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  3402. <% if M.cart.integration.enabled and publisher then %>
  3403. <% write("<?php if ($album->cartEnabled()) { ".."?"..">")%>
  3404. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  3405. <% write("<?php } ".."?"..">")%>
  3406. <% elseif M.cart.integration.enabled or M.fotomoto.integration.enabled then %>
  3407. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  3408. <% else
  3409. if M.permalinks.on then %>
  3410. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  3411. <% else %>
  3412. <li> </li>
  3413. <% end end %>
  3414. <% if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then %>
  3415. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  3416. <% end %>
  3417. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  3418. <li class="touch-share-menu touch-facebook share-off"><a><i class="fa fa-fw fa-facebook"></i></a></li>
  3419. <li class="touch-share-menu touch-linkedin share-off"><a><i class="fa fa-fw fa-linkedin"></i></a></li>
  3420. <li class="touch-share-menu touch-twitter share-off"><a><i class="fa fa-fw fa-twitter"></i></a></li>
  3421. <li class="touch-share-menu touch-google-plus share-off"><a><i class="fa fa-fw fa-google-plus"></i></a></li>
  3422. <li class="touch-share-menu touch-pinterest share-off"><a><i class="fa fa-fw fa-pinterest"></i></a></li>
  3423. <li class="touch-share-menu touch-email share-off"><a><i class="fa fa-fw fa-envelope"></i></a></li>
  3424. <% end --[[ socialmedia ]] %>
  3425. <% if (M.cart.integration.enabled or M.fotomoto.integration.enabled) and M.permalinks.on then %>
  3426. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  3427. <% end %>
  3428. <% if M.googleMaps.enable then %>
  3429. <li class="touch-share-menu touch-maps share-off"><a><i class="fa fa-fw fa-map-marker"></i></a></li>
  3430. <% end %>
  3431. <% if M.imageDownload.enable then %>
  3432. <li class="touch-share-menu touch-download share-off"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>
  3433. <% end %>
  3434. </ul></div>
  3435. <% if not publisher then %>
  3436. <ul data-elem="items">
  3437. <%
  3438. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  3439. local firstId = page * imagesPerPage - imagesPerPage + 1
  3440. local lastId = imagesPerPage * page
  3441. if numImages <= lastId then
  3442. lastId = numImages
  3443. end
  3444. for index=firstId, lastId do
  3445. %>
  3446. <li><a href="$theRoot/photos/<%= getImage(index).exportFilename %>.jpg"><img src="$theRoot/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg" data-info="thumbId:<%= getImage(index).exportFilename %>;" title="<%= cleandata(getImage(index).metadata.imgTitle) %>" alt="<%= cleandata(getImage(index).metadata.imgAlt) %>" /></a>
  3447. <div class="imageCaption" data-elem="imgCaption">
  3448. <p>
  3449. <% if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then %>
  3450. <span class="color-label color<%= getImage(index).colorLabelNumber %>" title="<%= getImage(index).colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></span>
  3451. <% end %>
  3452. <% if M.highslide.display.headings then %><span class="caption-title"><%= cleandata(getImage(index).metadata.imgTitle) %></span><% end %><% if (getImage(index).metadata.imgTitle ~= '' and M.highslide.display.headings) and (getImage(index).metadata.imgAlt ~= '' and M.highslide.display.captions) then %><br /><% end %>
  3453. <% if M.highslide.display.captions then %><%= cleandata(getImage(index).metadata.imgAlt) %><% end %>
  3454. </p>
  3455. </div>
  3456. </li>
  3457. <% end --[[ loop ]] %>
  3458. </ul>
  3459. <% else --[[ if publisher ]] %>
  3460. <ul data-elem="items">
  3461. <% write("<?php foreach ($album->getPhotosForPage() as $photo) { ".."?"..">")%>
  3462. <li><a href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"><img src="<?php echo $photo->getURL('thumbnails-for-mobile');?>" data-info="thumbId:<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>; albumURL:<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php $altCopy = $photo->hasMetadata('image_caption') ? $photo->getMetadata('image_caption') : $photo->getItemNumber() . '.jpg'; echo $altcopy; ".."?"..">")%>" /></a>
  3463. <div class="imageCaption" data-elem="imgCaption">
  3464. <p>
  3465. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  3466. <span class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></span>
  3467. <% write("<?php } ".."?"..">")%><% end %>
  3468. <% if M.highslide.display.headings then %><span class="caption-title"><% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%></span><% end %><% if M.highslide.display.headings and M.highslide.display.captions then %><% write("<?php echo $photo->hasMetadata('image_title') && $photo->hasMetadata('image_caption') ? '<br />' : ''; ".."?"..">")%><% end %>
  3469. <% if M.highslide.display.captions then %><% write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">")%><% end %>
  3470. </p>
  3471. </div>
  3472. </li>
  3473. <% write("<?php } ".."?"..">")%>
  3474. </ul>
  3475. <% end --[[ is publisher or not? ]] %>
  3476. </div>
  3477. </div><!-- sliderHolder -->
  3478. <% end %>
  3479. <div class="freewall-spinner clearfix"><i class="fa fa-spinner fa-spin"></i></div>
  3480. <div id="freewall" class="hidden-gallery clearfix">
  3481. <%
  3482. local border = 0
  3483. if M.grid_cell.image_border.enabled then border = 2 end
  3484. write("<?php \n"..
  3485. " $cellnumber=1;\n"..
  3486. " $pin_url = CURRENTPAGELOCATION;\n"..
  3487. " $base_url ='./';\n"..
  3488. " $border = ".. border ..";\n"..
  3489. " $count = 0;\n"..
  3490. "\n"..
  3491. " foreach ($album->getPhotosForPage() as $photo) {\n"..
  3492. " $item_number = $photo->getItemNumber();\n"..
  3493. " $width = $photo->getRenditionWidth('thumbnails');\n"..
  3494. " $height = $photo->getRenditionHeight('thumbnails');\n"..
  3495. "\n"..
  3496. " $brickHeight = $height + ".. math.floor((M.grid_cell.margin * 2) + (M.grid_cell.padding * 2) + M.grid_cell.bt + M.grid_cell.bb) ..";\n"..
  3497. "\n"..
  3498. " if ($width > $height) {\n"..
  3499. " $orientation = 'landscape';\n"..
  3500. " } else {\n"..
  3501. " $orientation = 'portrait';\n"..
  3502. " }\n"..
  3503. "?"..">")
  3504. if M.imageDownload.enable then
  3505. if mobile then
  3506. write("<?php \n"..
  3507. "$downloadURL = method_exists($photo, 'getDirectDownloadLink') ? $photo->getDirectDownloadLink() : $photo->getAlbumURL().'photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  3508. "?"..">")
  3509. else
  3510. write("<?php \n"..
  3511. "$downloadURL = method_exists($photo, 'getDownloadURL') ? $photo->getDownloadURL() : $photo->getAlbumURL().'download.php?file=photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  3512. "?"..">")
  3513. end
  3514. end
  3515. %>
  3516. <div class="brick clearfix" style="height: <% write("<?php echo $brickHeight; ".."?"..">")%>px;">
  3517. <div class="gridcell" id="cell-<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>">
  3518. <% if M.grid_cell.numbers.enabled then %>
  3519. <div class="cellnumber"><% write("<?php echo $photo->getCellNumber(); ".."?"..">")%></div>
  3520. <% end %>
  3521. <% --[[ Extra code to handle Maps ]]
  3522. write("<?php\n"..
  3523. "$mapMarkup = '';\n"..
  3524. "if ($photo->hasLocation()) {\n"..
  3525. " if (get_class($photo) == 'PhotoSearchResult') {\n"..
  3526. " if (method_exists($photo, 'mapsEnabled') && $photo->mapsEnabled()) {\n"..
  3527. " $mapMarkup = ' data-gps=\"'.$photo->getSearchMapsURL().'\"';\n"..
  3528. " }\n"..
  3529. " } else if ($album->mapsEnabled()) {\n"..
  3530. " $mapMarkup = ' data-gps=\"'.$photo->getMapsURL($album->getTemplateSetting('mapZoomLevel', 18), $album->getTemplateSetting('mapType', 'm')).'\"';\n"..
  3531. " }\n"..
  3532. "}\n"..
  3533. "?"..">")%>
  3534. <a id="<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" class="image-link gridicon<% if M.grid_cell.image_shadows then %> drop-shadow<% end %>"
  3535. <% if M.grid.presentation.desktop == "HTML" then %>
  3536. href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"
  3537. <% elseif M.grid.presentation.desktop == "hs_slideshow" then %>
  3538. href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>" onclick="return hs.expand(this,{ slideshowGroup: 'images', maxWidth: <% write("<?php echo $photo->getPhotoWidth(); ".."?"..">")%>, captionId: 'caption_<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>', headingId: 'heading_<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>', autoplay: <%= M.highslide.autoplay %> })"<% if M.colorLabels.display then %> data-colorLabelNumber="color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" data-colorLabel="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"<% end %><% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %>
  3539. <% elseif M.grid.presentation.desktop == "magnific" then %>
  3540. href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"<% if M.colorLabels.display then %> data-colorLabelNumber="color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" data-colorLabel="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"<% end %><% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %> data-album-url="<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>"
  3541. <% elseif M.grid.presentation.desktop == "touch" then %>
  3542. data-link="slider:#thumbnail-gallery; index:<% write("<?php echo $count; ".."?"..">")%>"<% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %>
  3543. <% end %>
  3544. >
  3545. <img src="<% write("<?php echo $photo->getURL('thumbnails'); ".."?"..">")%>" id="img-<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php if ($photo->hasMetadata('image_caption')) { echo $photo->getMetadata('image_caption'); } else { echo $photo->getFilename(); } ".."?"..">")%>" height="<% write("<?php echo $height; ".."?"..">")%>" width="<% write("<?php echo $width; ".."?"..">")%>"
  3546. <% if M.freewall.layout == 'rigid' then %>
  3547. style="<% --[[
  3548. ]] %>height: <% write("<?php echo $height; ".."?"..">")%>px; <% --[[
  3549. ]] %>width: <% write("<?php echo $width; ".."?"..">")%>px; <% --[[
  3550. ]] %>"<% end %><% if M.fotomoto.integration.enabled then %> rel="ftmt_img:photos/<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>.jpg"<% end %> />
  3551. </a><!-- .gridicon -->
  3552. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  3553. <ul class="grid-icons grid-icons-tl">
  3554. <li class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></li>
  3555. </ul><!-- grid-icons-tl -->
  3556. <% write("<?php } ".."?"..">")%><% end %>
  3557. <% if M.cart.integration.enabled then %>
  3558. <% write("<?php if ($photo->forSale($album)) { ".."?"..">")%>
  3559. <ul class="grid-icons grid-icons-tr">
  3560. <li class="cart-button" title=""><a class="add-to-cart" data-item="<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" data-name="<% write("<?php echo $photo->getItemName(); ".."?"..">")%>" data-price="<% write("<?php echo $photo->getMetadata('itemPricing'); ".."?"..">")%>" data-thumbnail="<% write("<?php echo $photo->getURL('thumbnails-for-mobile'); ".."?"..">")%>"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3561. </ul><!-- grid-icons-tr -->
  3562. <% write("<?php } ".."?"..">")%><% end %>
  3563. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  3564. <ul class="grid-icons grid-icons-tr">
  3565. <li class="cart-button" title=""><a id="fm_purchase_<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" class="add-to-cart" onclick="showPrint('#<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%> img');"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3566. </ul><!-- grid-icons-tr -->
  3567. <% end %>
  3568. <ul class="grid-icons grid-icons-bl">
  3569. <li class="single-image-page-link-for-seo"><a href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"><% write("<?php echo $photo->getTitle(); ".."?"..">")%></a></li>
  3570. </ul><!-- grid-icons-bl -->
  3571. <ul class="grid-icons grid-icons-br">
  3572. <% if M.slideshowTracking.enable and M.grid.presentation.desktop == "HTML" then %>
  3573. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3574. <% elseif M.slideshowTracking.enable and (M.grid.presentation.desktop == "hs_slideshow" or M.grid.presentation.desktop == "magnific") then %>
  3575. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" onclick="$('a#<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3576. <% elseif M.slideshowTracking.enable and M.grid.presentation.desktop == "touch" then %>
  3577. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:<% write("<?php echo $count; ".."?"..">")%>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3578. <% end %>
  3579. <% if M.imageDownload.enable and M.imageDownload.grid.icon then %>
  3580. <% write("<?php if ($downloadURL) { ".."?"..">")%>
  3581. <li class="download-button" title="<%= M.imageDownload.title %>"><a href="<% write("<?php echo $downloadURL; ".."?"..">")%>"><i class="fa fa-cloud-download fa-fw"></i></a></li>
  3582. <% write("<?php } ".."?"..">") end %>
  3583. </ul><!-- grid-icons-br -->
  3584. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  3585. <ul class="image-metadata clearfix">
  3586. <% if M.perImageSetting.metadata1.enabled then %>
  3587. <% write("<?php if ($photo->hasMetadata('metadata1')) { ".."?"..">")%>
  3588. <li class="metadata1"><% write("<?php echo $photo->getMetadata('metadata1'); ".."?"..">")%></li>
  3589. <% write("<?php } else { ".."?"..">")%>
  3590. <li class="metadata1"> </li>
  3591. <% write("<?php } ".."?"..">")%>
  3592. <% end %>
  3593. <% if M.perImageSetting.metadata2.enabled then %>
  3594. <% write("<?php if ($photo->hasMetadata('metadata2')) { ".."?"..">")%>
  3595. <li class="metadata2"><% write("<?php echo $photo->getMetadata('metadata2'); ".."?"..">")%></li>
  3596. <% write("<?php } else { ".."?"..">")%>
  3597. <li class="metadata2"> </li>
  3598. <% write("<?php } ".."?"..">")%>
  3599. <% end %>
  3600. </ul>
  3601. <% end %>
  3602. </div><!-- gridcell -->
  3603. </div><!-- brick -->
  3604. <% if M.grid.presentation.desktop == "hs_slideshow" and M.highslide.display.headings then %>
  3605. <% write("<?php if ($photo->hasMetadata('image_title')) { ".."?"..">")%>
  3606. <div class="highslide-heading highslide-text" id="heading_<% write("<?php echo $item_number; ".."?"..">")%>">
  3607. <p><% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%></p>
  3608. </div>
  3609. <% write("<?php } ".."?"..">")%>
  3610. <% end --[[ if highslide and headings ]] %>
  3611. <% if M.grid.presentation.desktop == "hs_slideshow" and M.highslide.display.captions then %>
  3612. <% write("<?php if ($photo->hasMetadata('image_caption')) { ".."?"..">")%>
  3613. <div class="highslide-caption highslide-text" id="caption_<% write("<?php echo $item_number; ".."?"..">")%>">
  3614. <p><% write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">")%></p>
  3615. </div>
  3616. <% write("<?php } ".."?"..">")%>
  3617. <% end --[[ if highslide and captions ]] %>
  3618. <% --[[ close foreach loop : ]]
  3619. write("<?php $count++;\n"..
  3620. "} ".."?"..">")%>
  3621. </div>
  3622. <% write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  3623. " echo $album->getPagination(array('position' => 'bottom', 'type' => 'index', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  3624. "} ".."?"..">")%>
  3625. <% elseif mobile and not publisher then %>
  3626. <% if M.cart.integration.enabled and M.cart.integration.packageButton then %>
  3627. <button class="add-package-to-cart add-package" data-price="<%= M.cart.integration.package_pricing %>"><i class="fa fa-fw fa-shopping-cart"></i> <span><%= M.cart.integration.package_label %></span></button>
  3628. <% end %>
  3629. <% if M.grid.presentation.mobile == "touch" then %>
  3630. <div class="sliderHolder" data-elem="sliderHolder">
  3631. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  3632. <div class="sliderBg"></div>
  3633. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:<%= M.touchnswipe.maxzoom %>; playDuration:<%= M.touchnswipe.playduration %>; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  3634. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3635. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3636. <div class="captionHolder ui-off" data-elem="captionHolder">
  3637. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  3638. </div>
  3639. <div class="controlHolder ui-off"><ul>
  3640. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  3641. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  3642. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  3643. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  3644. <% if M.cart.integration.enabled then %>
  3645. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  3646. <% else
  3647. if M.permalinks.on then %>
  3648. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  3649. <% else %>
  3650. <li> </li>
  3651. <% end end %>
  3652. <% if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then %>
  3653. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  3654. <% end %>
  3655. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  3656. <li class="touch-share-menu touch-facebook share-off"><a><i class="fa fa-fw fa-facebook"></i></a></li>
  3657. <li class="touch-share-menu touch-linkedin share-off"><a><i class="fa fa-fw fa-linkedin"></i></a></li>
  3658. <li class="touch-share-menu touch-twitter share-off"><a><i class="fa fa-fw fa-twitter"></i></a></li>
  3659. <li class="touch-share-menu touch-google-plus share-off"><a><i class="fa fa-fw fa-google-plus"></i></a></li>
  3660. <li class="touch-share-menu touch-pinterest share-off"><a><i class="fa fa-fw fa-pinterest"></i></a></li>
  3661. <li class="touch-share-menu touch-email share-off"><a><i class="fa fa-fw fa-envelope"></i></a></li>
  3662. <% end --[[ socialmedia ]] %>
  3663. <% if M.cart.integration.enabled and M.permalinks.on then %>
  3664. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  3665. <% end %>
  3666. <% if M.googleMaps.enable then %>
  3667. <li class="touch-share-menu touch-maps share-off"><a><i class="fa fa-fw fa-map-marker"></i></a></li>
  3668. <% end %>
  3669. <% if M.imageDownload.enable then %>
  3670. <li class="touch-share-menu touch-download share-off"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>
  3671. <% end %>
  3672. </ul></div>
  3673. <ul data-elem="items">
  3674. <% for index=1, numImages do %>
  3675. <li><a href="$theRoot/photos/<%= getImage(index).exportFilename %>.jpg"><img src="$theRoot/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg" data-info="thumbId:<%= getImage(index).exportFilename %>;" title="<%= cleandata(getImage(index).metadata.imgTitle) %>" alt="<%= cleandata(getImage(index).metadata.imgAlt) %>" /></a>
  3676. <div class="imageCaption" data-elem="imgCaption">
  3677. <p>
  3678. <% if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then %>
  3679. <span class="color-label color<%= getImage(index).colorLabelNumber %>" title="<%= getImage(index).colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></span>
  3680. <% end %>
  3681. <% if M.highslide.display.headings then %><span class="caption-title"><% end %><%= cleandata(getImage(index).metadata.imgTitle) %></span><% if (getImage(index).metadata.imgTitle ~= '' and M.highslide.display.headings) and (getImage(index).metadata.imgAlt ~= '' and M.highslide.display.captions) then %><br /><% end %>
  3682. <% if M.highslide.display.captions then %><%= cleandata(getImage(index).metadata.imgAlt) %><% end %>
  3683. </p>
  3684. </div>
  3685. </li>
  3686. <% end --[[ loop ]] %>
  3687. </ul>
  3688. </div>
  3689. </div><!-- sliderHolder -->
  3690. <% end --[[ grid.presentation.mobile == "touch" ]] %>
  3691. <div class="clearfix">
  3692. <%
  3693. local border = 0
  3694. if M.grid_cell.image_border.enabled then border = 2 end
  3695. for index=1, numImages do %>
  3696. <% local gpsData = getImage(index).metadata.gpsLocation %>
  3697. <%
  3698. --[[ Get GPS location data ]]
  3699. --[[ Rather than defining gpsData here, we are defining it separately for desktop and mobile in the respective page templates
  3700. local gpsData = image.metadata.gpsLocation ]]
  3701. --[[ Begin Google Maps ]]
  3702. if model.googleMaps.enable then
  3703. if gpsData == "" then
  3704. else
  3705. --[[ Round to idp decimal places ]]
  3706. function round(num, idp)
  3707. local mult = 10^(idp or 0)
  3708. return math.floor(num * mult + 0.5) / mult
  3709. end
  3710. --[[ Convert DMS to DD ]]
  3711. function latlongDMStoDD(brng)
  3712. local precision = 6
  3713. local dms = {}
  3714. for w in string.gfind(brng, "%d+") do
  3715. table.insert(dms, w)
  3716. end
  3717. local deg = dms[1]/1 + dms[2]/60 + dms[3]/3600
  3718. deg = round(deg, precision)
  3719. local dir = string.match(brng, "%u")
  3720. if dir == "S" then
  3721. deg = -deg
  3722. elseif dir == "W" then
  3723. deg = -deg
  3724. else
  3725. end
  3726. return deg
  3727. end
  3728. --[[ Find latitude and longitude strings ]]
  3729. local dms_pattern = "%d+%W+%d+%W+%d+%W+%u"
  3730. local latlongDMS = {}
  3731. for w in string.gfind(gpsData, dms_pattern) do
  3732. table.insert(latlongDMS, w)
  3733. end
  3734. --[[ Create latitude,longitude decimal degree string ]]
  3735. local latlongDD = latlongDMStoDD(latlongDMS[1]) .. "," .. latlongDMStoDD(latlongDMS[2])
  3736. --[[ Create Google Maps URL ]]
  3737. googleURL = "http://maps.google.com/maps/api/staticmap?center=" .. latlongDD
  3738. googleURL = googleURL .. "&markers=color:red|label:A|" .. latlongDD
  3739. googleURL = googleURL .. "&maptype=" .. model.googleMaps.mapType
  3740. googleURL = googleURL .. "&zoom=18"
  3741. googleURL = googleURL .. "&size=640x640"
  3742. googleURL = googleURL .. "&sensor=false"
  3743. googleMapsURL = "http://maps.google.com/maps?f=q&q=loc:" .. latlongDD --[[ marker location ]]
  3744. googleMapsURL = googleMapsURL .. "&ll=" .. latlongDD --[[ map center ]]
  3745. googleMapsURL = googleMapsURL .. "&t=" .. model.googleMaps.mapType
  3746. --[[ googleMapsURL = googleMapsURL .. "&iwloc=near" ]]
  3747. googleMapsURL = googleMapsURL .. "&z=18"
  3748. end
  3749. else end
  3750. --[[ End Google Maps ]]
  3751. %>
  3752. <div class="gridcell clearfix" id="cell-<%= getImage(index).exportFilename %>">
  3753. <div class="griditem <% if getImage(index).renditions.thumbnailsMobile.width > getImage(index).renditions.thumbnailsMobile.height then %>landscape<% else %>portrait<% end %> clearfix" style="background-image: url(<%= theRoot %>/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg);">
  3754. <% if M.grid_cell.numbers.enabled then %>
  3755. <div class="cellnumber"><%= index %></div>
  3756. <% end %>
  3757. <a id="<%= getImage(index).exportFilename %>" class="image-link gridicon<% if M.grid_cell.image_shadows then %> drop-shadow<% end %>"
  3758. style="<% --[[
  3759. ]] %>top: <%= math.floor((M.grid_cell.height - M.grid_cell.bt - M.grid_cell.bb - border - getImage(index).renditions.thumbnailsMobile.height)/2) %>px; <% --[[
  3760. ]] %>left: <%= math.floor((M.grid_cell.width - M.grid_cell.br - M.grid_cell.bl - border - getImage(index).renditions.thumbnailsMobile.width)/2) %>px; <% --[[
  3761. ]] %>width: <%= getImage(index).renditions.thumbnailsMobile.width %>px; <% --[[
  3762. ]] %>height: <%= getImage(index).renditions.thumbnailsMobile.height %>px; <% --[[
  3763. ]] %>"
  3764. <% if M.grid.presentation.mobile == "HTML" then %>
  3765. href="<%= theRoot %>/<%= getImage(index).exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"
  3766. <% elseif M.grid.presentation.mobile == "magnific" then %>
  3767. href="<%= theRoot %>/photos/<%= getImage(index).exportFilename %>.jpg"<% if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then %> data-colorLabelNumber="color<%= getImage(index).colorLabelNumber %>" data-colorLabel="<%= getImage(index).colorLabel %>"<% end %><% if M.googleMaps.enable and getImage(index).metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  3768. <% elseif M.grid.presentation.mobile == "touch" then %>
  3769. data-link="slider:#thumbnail-gallery; index:<%= math.floor(index - 1) %>"<% if M.googleMaps.enable and getImage(index).metadata.gpsLocation ~= "" then %> data-gps="<% if mode =='publish' then %><%= googleMapsURL %><% else %>#<% end %>"<% end %><% if M.imageDownload.enable then %> data-download="yes"<% end %>
  3770. <% end %>
  3771. >
  3772. <img src="$theRoot/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg" id="img<%= getImage(index).imageID %>" title="<%= cleandata(getImage(index).metadata.imgTitle) %>" alt="<%= cleandata(getImage(index).metadata.imgAlt) %>" height="<%= getImage(index).renditions.thumbnailsMobile.height %>" width="<%= getImage(index).renditions.thumbnailsMobile.width %>"
  3773. style="<% --[[
  3774. ]] %>height: <%= getImage(index).renditions.thumbnailsMobile.height %>px; <% --[[
  3775. ]] %>width: <%= getImage(index).renditions.thumbnailsMobile.width %>px; <% --[[
  3776. ]] %>" <% if M.fotomoto.integration.enabled then %> rel="ftmt_img:photos/<%= getImage(index).exportFilename %>.jpg"<% end %> />
  3777. </a><!-- .gridicon -->
  3778. <% if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then %>
  3779. <ul class="grid-icons grid-icons-tl">
  3780. <li class="color-label color<%= getImage(index).colorLabelNumber %>" title="<%= getImage(index).colorLabel %>"><i class="fa fa-fw fa-bookmark"></i></li>
  3781. </ul><!-- grid-icons-tl -->
  3782. <% end %>
  3783. <% if M.cart.integration.enabled then
  3784. if (not M.cart.integration.mixed_pricing and M.cart.integration.pricing ~= "not-for-sale") or (M.cart.integration.mixed_pricing and getImage(index).metadata.itemPricing ~= "not-for-sale") then %>
  3785. <ul class="grid-icons grid-icons-tr">
  3786. <li class="cart-button" title=""><a class="add-to-cart"<% if mode == 'publish' then %> data-item="<%= getImage(index).exportFilename %>" data-name="<% if getImage(index).metadata.imgTitle ~= '' then %><%= cleandata(getImage(index).metadata.imgTitle) %><% else %><%= getImage(index).exportFilename %><% end %>" data-price="<% if M.cart.integration.mixed_pricing and getImage(index).metadata.itemPricing ~= '' then %><%= getImage(index).metadata.itemPricing %><% else %><%= M.cart.integration.pricing %><% end %>" data-thumbnail="$theRoot/thumbnails-for-mobile/<%= getImage(index).exportFilename %>.jpg"<% end %>><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3787. </ul><!-- grid-icons-tr -->
  3788. <% end end %>
  3789. <ul class="grid-icons grid-icons-bl">
  3790. <li class="single-image-page-link-for-seo"><a href="<%= theRoot %>/<%= getImage(index).exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>"><% if getImage(index).metadata.imgTitle ~= '' then %><%= cleandata(getImage(index).metadata.imgTitle) %><% else %><%= getImage(index).exportFilename %><% end %></a></li>
  3791. </ul><!-- grid-icons-bl -->
  3792. <ul class="grid-icons grid-icons-br">
  3793. <% if M.slideshowTracking.enable and M.grid.presentation.mobile == "HTML" then %>
  3794. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="<%= theRoot %>/<%= getImage(index).exportFilename %>-single.<% if mode == 'publish' and M.is.php then %>php<% else %>html<% end %>?mobile=true"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3795. <% elseif M.slideshowTracking.enable and M.grid.presentation.mobile == "magnific" then %>
  3796. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" onclick="$('a#<%= getImage(index).exportFilename %>').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3797. <% elseif M.slideshowTracking.enable and M.grid.presentation.mobile == "touch" then %>
  3798. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:<%= math.floor(index - 1) %>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3799. <% end %>
  3800. </ul><!-- grid-icons-br -->
  3801. </div><!-- .griditem -->
  3802. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  3803. <ul class="image-metadata clearfix">
  3804. <% if M.perImageSetting.metadata1.enabled then %>
  3805. <li class="metadata1"><% if getImage(index).metadata.metadata1 ~= '' then %><%= getImage(index).metadata.metadata1 %><% else %> <% end %></li>
  3806. <% end %>
  3807. <% if M.perImageSetting.metadata2.enabled then %>
  3808. <li class="metadata2"><% if getImage(index).metadata.metadata2 ~= '' then %><%= getImage(index).metadata.metadata2 %><% else %> <% end %></li>
  3809. <% end %>
  3810. </ul>
  3811. <% end %>
  3812. </div><!-- .gridcell -->
  3813. <% end --[[ loop ]] %>
  3814. </div>
  3815. <% elseif mobile and publisher then %>
  3816. <% if M.cart.integration.enabled and M.cart.integration.packageButton then %>
  3817. <% write("<?php if (get_class($album) != 'SearchAlbumWrapper') { ".."?"..">")%>
  3818. <button class="add-package-to-cart add-package" data-price="<% write("<?php echo $album->getPricingScheme(); ".."?"..">")%>"><i class="fa fa-fw fa-shopping-cart"></i> <span><%= M.cart.integration.package_label %></span></button>
  3819. <% write("<?php } ".."?"..">") end %>
  3820. <% write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  3821. " echo $album->getPagination(array('position' => 'top', 'type' => 'mobile', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  3822. "} ".."?"..">")%>
  3823. <% if M.grid.presentation.mobile == "touch" then %>
  3824. <div class="sliderHolder" data-elem="sliderHolder">
  3825. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  3826. <div class="sliderBg"></div>
  3827. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:<%= M.touchnswipe.maxzoom %>; playDuration:<%= M.touchnswipe.playduration %>; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  3828. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3829. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  3830. <div class="captionHolder ui-off" data-elem="captionHolder">
  3831. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  3832. </div>
  3833. <div class="controlHolder ui-off"><ul>
  3834. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  3835. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  3836. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  3837. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  3838. <% if M.cart.integration.enabled and publisher then %>
  3839. <% write("<?php if ($album->cartEnabled()) { ".."?"..">")%>
  3840. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  3841. <% write("<?php } ".."?"..">")%>
  3842. <% elseif M.cart.integration.enabled then %>
  3843. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  3844. <% else
  3845. if M.permalinks.on then %>
  3846. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  3847. <% else %>
  3848. <li> </li>
  3849. <% end end %>
  3850. <% if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then %>
  3851. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  3852. <% end %>
  3853. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  3854. <li class="touch-share-menu touch-facebook share-off"><a href="#"><i class="fa fa-fw fa-facebook"></i></a></li>
  3855. <li class="touch-share-menu touch-linkedin share-off"><a href="#"><i class="fa fa-fw fa-linkedin"></i></a></li>
  3856. <li class="touch-share-menu touch-twitter share-off"><a href="#"><i class="fa fa-fw fa-twitter"></i></a></li>
  3857. <li class="touch-share-menu touch-google-plus share-off"><a href="#"><i class="fa fa-fw fa-google-plus"></i></a></li>
  3858. <li class="touch-share-menu touch-pinterest share-off"><a href="#"><i class="fa fa-fw fa-pinterest"></i></a></li>
  3859. <li class="touch-share-menu touch-email share-off"><a href="#"><i class="fa fa-fw fa-envelope"></i></a></li>
  3860. <% end --[[ socialmedia ]] %>
  3861. <% if M.cart.integration.enabled and M.permalinks.on then %>
  3862. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  3863. <% end %>
  3864. <% if M.googleMaps.enable then %>
  3865. <li class="touch-share-menu touch-maps share-off"><a href="#"><i class="fa fa-fw fa-map-marker"></i></a></li>
  3866. <% end %>
  3867. <% if M.imageDownload.enable then %>
  3868. <li class="touch-share-menu touch-download share-off"><a href="#"><i class="fa fa-fw fa-cloud-download"></i></a></li>
  3869. <% end %>
  3870. </ul></div>
  3871. <ul data-elem="items">
  3872. <% write("<?php foreach ($album->getPhotosForPage() as $photo) { ".."?"..">")%>
  3873. <li><a href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"><img src="<?php echo $photo->getURL('thumbnails-for-mobile');?>" data-info="thumbId:<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>; albumURL:<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php if ($photo->hasMetadata('image_caption')) { echo $photo->getMetadata('image_caption'); } else { echo $photo->getFilename(); } ".."?"..">")%>" /></a>
  3874. <div class="imageCaption" data-elem="imgCaption">
  3875. <p>
  3876. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  3877. <span class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></span>
  3878. <% write("<?php } ".."?"..">")%><% end %>
  3879. <% if M.highslide.display.headings then %><span class="caption-title"><% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%></span><% end %><% if M.highslide.display.headings and M.highslide.display.captions then %><% write("<?php echo $photo->hasMetadata('image_title') && $photo->hasMetadata('image_caption') ? '<br />' : ''; ".."?"..">")%><% end %>
  3880. <% if M.highslide.display.captions then %><% write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">")%><% end %>
  3881. </p>
  3882. </div>
  3883. </li>
  3884. <% write("<?php } ".."?"..">")%>
  3885. </ul>
  3886. </div>
  3887. </div><!-- sliderHolder -->
  3888. <% end --[[ grid.presentation.mobile == "touch" ]] %>
  3889. <div class="clearfix">
  3890. <%
  3891. local border = 0
  3892. if M.grid_cell.image_border.enabled then border = 2 end
  3893. write("<?php \n"..
  3894. " $cellnumber=1;\n"..
  3895. " $pin_url = CURRENTPAGELOCATION;\n"..
  3896. " $base_url ='./';\n"..
  3897. " $border = ".. border ..";\n"..
  3898. " $count = 0;\n"..
  3899. "\n"..
  3900. " foreach ($album->getPhotosForPage() as $photo) {\n"..
  3901. " $item_number = $photo->getItemNumber();\n"..
  3902. " $width = $photo->getThumbnailWidth();\n"..
  3903. " $height = $photo->getThumbnailHeight();\n"..
  3904. "\n"..
  3905. " if ($width > $height) {\n"..
  3906. " $orientation = 'landscape';\n"..
  3907. " } else {\n"..
  3908. " $orientation = 'portrait';\n"..
  3909. " }\n"..
  3910. "\n"..
  3911. " $tnTop = ($album->getTemplateSetting('cellContentHeight') - $height - $border) / 2;\n"..
  3912. " $tnLeft = ($album->getTemplateSetting('cellContentWidth') - $width - $border) / 2;\n"..
  3913. "?"..">")
  3914. if M.imageDownload.enable then
  3915. if mobile then
  3916. write("<?php \n"..
  3917. "$downloadURL = method_exists($photo, 'getDirectDownloadLink') ? $photo->getDirectDownloadLink() : $photo->getAlbumURL().'photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  3918. "?"..">")
  3919. else
  3920. write("<?php \n"..
  3921. "$downloadURL = method_exists($photo, 'getDownloadURL') ? $photo->getDownloadURL() : $photo->getAlbumURL().'download.php?file=photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  3922. "?"..">")
  3923. end
  3924. end
  3925. %>
  3926. <div class="gridcell clearfix" id="cell-<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>">
  3927. <div class="griditem <% write("<?php echo $orientation; ".."?"..">")%> clearfix" style="background-image: url(<% write("<?php echo $photo->getUrl('thumbnails-for-mobile'); ".."?"..">")%>); background-size: <% write("<?php echo $width; ".."?"..">")%>px <% write("<?php echo $height; ".."?"..">")%>px;">
  3928. <% if M.grid_cell.numbers.enabled then %>
  3929. <div class="cellnumber"><% write("<?php echo $photo->getCellNumber(); ".."?"..">")%></div>
  3930. <% end %>
  3931. <% --[[ Extra code to handle Maps ]]
  3932. write("<?php\n"..
  3933. "$mapMarkup = '';\n"..
  3934. "if ($photo->hasLocation()) {\n"..
  3935. " if (get_class($photo) == 'PhotoSearchResult') {\n"..
  3936. " if (method_exists($photo, 'mapsEnabled') && $photo->mapsEnabled()) {\n"..
  3937. " $mapMarkup = ' data-gps=\"'.$photo->getSearchMapsURL().'\"';\n"..
  3938. " }\n"..
  3939. " } else if ($album->mapsEnabled()) {\n"..
  3940. " $mapMarkup = ' data-gps=\"'.$photo->getMapsURL($album->getTemplateSetting('mapZoomLevel', 18), $album->getTemplateSetting('mapType', 'm')).'\"';\n"..
  3941. " }\n"..
  3942. "}\n"..
  3943. "?"..">")%>
  3944. <a id="<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" class="image-link gridicon<% if M.grid_cell.image_shadows then %> drop-shadow<% end %>"
  3945. style="<% --[[
  3946. ]] %>top: <% write("<?php echo $tnTop; ".."?"..">")%>px; <% --[[
  3947. ]] %>left: <% write("<?php echo $tnLeft; ".."?"..">")%>px; <% --[[
  3948. ]] %>width: <% write("<?php echo $width; ".."?"..">")%>px; <% --[[
  3949. ]] %>height: <% write("<?php echo $height; ".."?"..">")%>px; <% --[[
  3950. ]] %>"
  3951. <% if M.grid.presentation.mobile == "HTML" then %>
  3952. href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"
  3953. <% elseif M.grid.presentation.mobile == "magnific" then %>
  3954. href="<% write("<?php echo $photo->getUrl('photos'); ".."?"..">")%>"<% if M.colorLabels.display then %> data-colorLabelNumber="color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" data-colorLabel="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"<% end %><% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %> data-album-url="<% write("<?php echo $photo->getAlbumURL(); ".."?"..">")%>"
  3955. <% elseif M.grid.presentation.mobile == "touch" then %>
  3956. data-link="slider:#thumbnail-gallery; index:<% write("<?php echo $count; ".."?"..">")%>"<% if M.googleMaps.enable then %><% write("<?php echo $mapMarkup; ".."?"..">")%><% end %><% if M.imageDownload.enable then %><% write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">")%><% end %>
  3957. <% end %>
  3958. >
  3959. <img src="<% write("<?php echo $photo->getURL('thumbnails-for-mobile'); ".."?"..">")%>" id="img-<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('image_title'); ".."?"..">")%>" alt="<% write("<?php if ($photo->hasMetadata('image_caption')) { echo $photo->getMetadata('image_caption'); } else { echo $photo->getFilename(); } ".."?"..">")%>" height="<% write("<?php echo $height; ".."?"..">")%>" width="<% write("<?php echo $width; ".."?"..">")%>"
  3960. style="<% --[[
  3961. ]] %>height: <% write("<?php echo $height; ".."?"..">")%>px; <% --[[
  3962. ]] %>width: <% write("<?php echo $width; ".."?"..">")%>px;<% --[[
  3963. ]] %>"<% if M.fotomoto.integration.enabled then %> rel="ftmt_img:photos/<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>.jpg"<% end %> />
  3964. </a><!-- .gridicon -->
  3965. <% if M.colorLabels.display then %><% write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">")%>
  3966. <ul class="grid-icons grid-icons-tl">
  3967. <li class="color-label color<% write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">")%>" title="<% write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">")%>"><i class="fa fa-fw fa-bookmark"></i></li>
  3968. </ul><!-- grid-icons-tl -->
  3969. <% write("<?php } ".."?"..">")%><% end %>
  3970. <% if M.cart.integration.enabled then %>
  3971. <% write("<?php if ($photo->forSale($album)) { ".."?"..">")%>
  3972. <ul class="grid-icons grid-icons-tr">
  3973. <li class="cart-button" title=""><a class="add-to-cart" data-item="<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>" data-name="<% write("<?php echo $photo->getItemName(); ".."?"..">")%>" data-price="<% write("<?php echo $photo->getMetadata('itemPricing'); ".."?"..">")%>" data-thumbnail="<% write("<?php echo $photo->getURL('thumbnails-for-mobile'); ".."?"..">")%>"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3974. </ul><!-- grid-icons-tr -->
  3975. <% write("<?php } ".."?"..">")%><% end %>
  3976. <ul class="grid-icons grid-icons-bl">
  3977. <li class="single-image-page-link-for-seo"><a href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>"><% write("<?php echo $photo->getTitle(); ".."?"..">")%></a></li>
  3978. </ul><!-- grid-icons-bl -->
  3979. <ul class="grid-icons grid-icons-br">
  3980. <% if M.slideshowTracking.enable and M.grid.presentation.mobile == "HTML" then %>
  3981. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="<% write("<?php echo $photo->getSingleURL(); ".."?"..">")%>?mobile=true"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3982. <% elseif M.slideshowTracking.enable and M.grid.presentation.mobile == "magnific" then %>
  3983. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" onclick="$('a#<% write("<?php echo $photo->getItemNumber(); ".."?"..">")%>').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3984. <% elseif M.slideshowTracking.enable and M.grid.presentation.mobile == "touch" then %>
  3985. <li class="ss-tracking" title="<%= M.slideshowTracking.title %>"><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:<% write("<?php echo $count; ".."?"..">")%>"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3986. <% end %>
  3987. </ul><!-- grid-icons-br -->
  3988. </div><!-- .griditem -->
  3989. <% if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then %>
  3990. <ul class="image-metadata clearfix">
  3991. <% if M.perImageSetting.metadata1.enabled then %>
  3992. <% write("<?php if ($photo->hasMetadata('metadata1')) { ".."?"..">")%>
  3993. <li class="metadata1"><% write("<?php echo $photo->getMetadata('metadata1'); ".."?"..">")%></li>
  3994. <% write("<?php } else {".."?"..">")%>
  3995. <li class="metadata1"> </li>
  3996. <% write("<?php } ".."?"..">")%>
  3997. <% end %>
  3998. <% if M.perImageSetting.metadata2.enabled then %>
  3999. <% write("<?php if ($photo->hasMetadata('metadata2')) { ".."?"..">")%>
  4000. <li class="metadata2"><% write("<?php echo $photo->getMetadata('metadata2'); ".."?"..">")%></li>
  4001. <% write("<?php } else {".."?"..">")%>
  4002. <li class="metadata2"> </li>
  4003. <% write("<?php } ".."?"..">")%>
  4004. <% end %>
  4005. </ul>
  4006. <% end %>
  4007. </div><!-- .gridcell -->
  4008. <% --[[ close foreach loop : ]]
  4009. write("<?php $count++;\n"..
  4010. "} ".."?"..">")%>
  4011. </div>
  4012. <% write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  4013. " echo $album->getPagination(array('position' => 'bottom', 'type' => 'mobile', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  4014. "} ".."?"..">")%>
  4015. <% end --[[ grid.type ]] %>
  4016. <% if publish and M.phplugins.enable then write ("<?php\n" ..
  4017. "} // end ttg_grid_top\n"..
  4018. "if ( function_exists('ttg_grid_bottom') ) {\n" ..
  4019. " $void = ttg_grid_bottom( TTG_COMP, TTG_ROOT );\n" ..
  4020. "} ".."?"..">") end --[[ ttg_grid_bottom ]] %>
  4021. </div><!-- #the-gallery -->
  4022. </div>
  4023. </div>
  4024. </div> <!-- #the-grid -->
  4025. <% end --[[ the_grid.display ]] %>
  4026. <% end --[[ help ]] %>
  4027. <% end %>
  4028. <% if M.the_block.location == 'bottom' then %>
  4029. <% if (M.the_block.display and (page == 1 or M.the_block.display_all or mobile or publisher)) or cart then %>
  4030. <div id="the-block" class="block-id the-block clearfix">
  4031. <div class="mantle clearfix">
  4032. <div class="core clearfix">
  4033. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  4034. "$add_mode = true;\n"..
  4035. "if ( function_exists('ttg_block_top') ) {\n"..
  4036. " if ( !(ttg_block_top( TTG_COMP, TTG_ROOT )) ) {\n"..
  4037. " $add_mode = false;\n"..
  4038. " }\n"..
  4039. "}\n"..
  4040. "if ( $add_mode ) { ".."?"..">") end %>
  4041. <div class="container_12 collapse clearfix">
  4042. <% if cart then
  4043. write ("<?php\n"..
  4044. "$message = MessageHelper::flash();\n"..
  4045. "if ($message) {\n"..
  4046. "include(APP_DIR.'/views/message.php');\n"..
  4047. "}".."?"..">")
  4048. write ("<?php\n"..
  4049. "$viewFilePath = APP_DIR.'/views/';\n"..
  4050. "$fullFilePath = $viewFilePath.$file_name.'.php';\n"..
  4051. "if (!is_file($fullFilePath)) {\n"..
  4052. " echo '<div id=\"message\" class=\"error\"><h1>Error: The included page was not found on the server</h1>';\n"..
  4053. " echo '<p>Please upload <strong>'.TTG_BE_DIRECTORY.'/'.APP_SLUG.'/'.$fullFilePath.'</strong> from your downloaded '.APP_SHORT_NAME.' zip to <strong>'.TTG_BE_DIRECTORY.'/'.APP_SLUG.'/'.$viewFilePath.'admin/</strong> on your server</div>';\n"..
  4054. "} else {\n"..
  4055. " include($fullFilePath);\n"..
  4056. "}".."?"..">") else %>
  4057. <% if mode == 'preview' and M.the_block.now_showing == 'actual' then %>
  4058. <% if M.page_setup.site.root == '' then %>
  4059. <p class="alert">
  4060. The <strong>Site Root</strong> is empty! Please designate your site root in <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Website</strong>.<br />
  4061. The root address of your website should begin with "http://" and end with a trailing slash, "/". For example:<br />
  4062. <span style="letter-spacing:1px;"><strong style="color:#ff2c2c;">http://</strong>yourdomain.com<strong style="color:#ff2c2c;">/</strong></span>
  4063. </p>
  4064. <% elseif M.page_setup.site.root ~= '' and M.page_setup.site.root ~= '/' and M.page_setup.site.root ~= './' then
  4065. local website = M.page_setup.site.root
  4066. if (string.sub(website, 1,7) ~= 'http://' and string.sub(website, 1,8) ~= 'https://' and string.sub(website, 1,1) ~= '/' and string.sub(website, 1,2) ~= './') or string.sub(website, -1,-1) ~= '/' then
  4067. %>
  4068. <p class="alert alert-error">Your <strong>Site Root</strong> is wrong! <br />
  4069. Please ensure that your site root, entered in <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Website</strong>, begins with "<strong style="color:#369;">http://</strong>" and ends with a trailing slash "<strong style="color:#369;">/</strong>". <br />
  4070. For example: <span style="letter-spacing:1px;"><strong style="color:#369;">http://</strong>yourdomain.com<strong style="color:#369;">/</strong></span>
  4071. </p>
  4072. <% end end %>
  4073. <% if M.cart.integration.enabled and M.fotomoto.integration.enabled then %>
  4074. <p class="alert alert-error"><i class="fa fa-fw fa-exclamation-triangle"></i>
  4075. <strong>Shopping Cart Integration</strong> and <strong>Fotomoto Integration</strong> cannot be enabled simultaneously. Please enable one, and disable the other.
  4076. </p>
  4077. <% end %>
  4078. <% end %>
  4079. <% if mode == 'preview' and M.the_block.now_showing == 'help' then %>
  4080. <div class="grid_8 gutter_24px alpha collapse_top clearfix">
  4081. <hr />
  4082. <h2>Plugin Quick Reference</h2>
  4083. <hr />
  4084. <dl>
  4085. <dt><i class="fa fa-chevron-circle-left"></i> Template Browser</dt>
  4086. <dd style="font-size:smaller;margin-top: 4px;">
  4087. Don't lose your work! Use the Template Browser to save templates of your gallery configuration(s) for later use. You may also copy the settings from your saved template to use in other CE4 plugins. If the Template Browser is not visible, open the lefthand control panel to access it.
  4088. </dd>
  4089. </dl>
  4090. <hr />
  4091. <p><i class="fa fa-lightbulb-o fa-lg"></i> To dismiss this screen, go to <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Now Showing</strong> near the top, and select "<strong>Page Preview</strong>".
  4092. <hr />
  4093. <p>Use <strong>CE4 Gallery</strong> to customize and publish responsive image galleries to be viewed on any modern device, including desktop and laptop computers, tablets and mobile phones.</p>
  4094. <p>Create standalone image galleries, or combine with <strong>CE4 Auto Index</strong> and/or <strong>CE4 Publisher</strong> to easily organize and publish any number of galleries. Pair with <strong>CE4 Cart</strong> for self-managed image sales, or signup with Fotomoto.com to handle products and delivery.</p>
  4095. <hr />
  4096. <h3>Avoid Common Problems</h3>
  4097. <dl>
  4098. <dt><i class="fa fa-compass"></i> Trust the Defaults</dt>
  4099. <dd style="font-size:smaller;margin-top: 4px;">
  4100. If you don't understand an option and fail to observe its impact on the page, check the online documentation for help. If you're still in the dark, keep the default setting. Defaults are safe.
  4101. </dd>
  4102. <dt><i class="fa fa-folder-o"></i> Folders</dt>
  4103. <dd style="font-size:smaller;margin-top: 4px;">
  4104. When exporting, avoid spaces and non-alphanumeric characters in your folder names. Do not use commas, apostrophes, quotation marks, parentheses, etc. It's okay to use hyphens ( - ) or underscores ( _ ) to replace spaces.
  4105. </dd>
  4106. <dt><i class="fa fa-file-o"></i> Files</dt>
  4107. <dd style="font-size:smaller;margin-top: 4px;">
  4108. In the Library, avoid spaces and non-alphanumeric characters in your image file names. Do not use commas, apostrophes, quotation marks, parentheses, etc. It's okay to use hyphens ( - ) or underscores ( _ ) to replace spaces.
  4109. </dd>
  4110. </dl>
  4111. </div>
  4112. <div class="grid_4 gutter_24px omega collapse_top clearfix">
  4113. <hr />
  4114. <dl>
  4115. <dt>Site Info <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  4116. <dd style="font-size:smaller;margin-top: 4px;">
  4117. Set global parameters and common design elements for your website, including masthead, navigation, typography styling and the page footer, and under-the-hood items for SEO, Google Analytics, etc.
  4118. </dd>
  4119. <dt>Color Palette <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  4120. <dd style="font-size:smaller;margin-top: 4px;">
  4121. Setup "The Block", the exposition area.
  4122. </dd>
  4123. <dt>Appearance <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  4124. <dd style="font-size:smaller;margin-top: 4px;">
  4125. Setup "The Grid", the media area, and configure your gallery presentation.
  4126. </dd>
  4127. <dt>Image Info <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  4128. <dd style="font-size:smaller;margin-top: 4px;">
  4129. Assign metadata to appear with each image. Provide metadata to images in the Library module.
  4130. </dd>
  4131. <dt>Output Settings <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  4132. <dd style="font-size:smaller;margin-top: 4px;">
  4133. Set parameters for exported images, setup password protection, enable e-commerce support and other auxiliary settings.
  4134. </dd>
  4135. <dt>Upload Settings <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  4136. <dd style="font-size:smaller;margin-top: 4px;">
  4137. We advise against using the Web module's upload feature. Instead, you should Export to desktop and upload to your server using a proper FTP client, as this is the most reliable way to publish your content online.
  4138. </dd>
  4139. </dl>
  4140. <hr />
  4141. </div>
  4142. <% elseif mode == 'preview' and M.the_block.now_showing == 'typography' then %>
  4143. <h1>Heading 1 <span>(<%= M.typography_headings.h1_font_size %>px)</span></h1>
  4144. <h2>Heading 2 <span>(<%= M.typography_headings.h2_font_size %>px)</span></h2>
  4145. <h3>Heading 3 <span>(<%= M.typography_headings.h3_font_size %>px)</span></h3>
  4146. <h4>Heading 4 <span>(<%= M.typography_headings.h4_font_size %>px)</span></h4>
  4147. <h5>Heading 5 <span>(<%= M.typography_headings.h5_font_size %>px)</span></h5>
  4148. <h6>Heading 6 <span>(<%= M.typography_headings.h6_font_size %>px)</span></h6>
  4149. <h2 class="h3">Paragraphs</h2>
  4150. <p>Lorem ipsum dolor sit amet, <a href="#">consectetur adipisicing elit</a>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  4151. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  4152. <h2 class="h3">Blockquote</h2>
  4153. <blockquote>
  4154. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  4155. </blockquote>
  4156. <hr />
  4157. <h6>Horizontal Rule: <hr /></h6>
  4158. <hr />
  4159. <h2 class="h3">Form</h2>
  4160. <form class="form clearfix" style="margin: 0; max-width:480px;">
  4161. <fieldset>
  4162. <label for="input1">An Input</label>
  4163. <p><input id="input1" type="text" /></p>
  4164. <label for="input2">Another Input</label>
  4165. <p><input id="input2" type="text" /></p>
  4166. <p>
  4167. <input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" />
  4168. <label for="subscribe">Notify me of followup comments via e-mail</label>
  4169. </p>
  4170. <p>
  4171. <input id="male" type="radio" name="sex" value="male">
  4172. <label for="male">Male</label>
  4173. <input id="female" type="radio" name="sex" value="female">
  4174. <label for="female">Female</label>
  4175. </p>
  4176. </fieldset>
  4177. <p><input type="submit" value="Submit" /></p>
  4178. </form>
  4179. <h2 class="h3">Table</h2>
  4180. <table class="table table-bordered table-striped">
  4181. <thead>
  4182. <tr>
  4183. <th>Element</th>
  4184. <th>Use</th>
  4185. </tr>
  4186. </thead>
  4187. <tbody>
  4188. <tr>
  4189. <td><code><strong></code></td>
  4190. <td>Strong emphasis</td>
  4191. </tr>
  4192. <tr>
  4193. <td><code><b></code></td>
  4194. <td>Presentational bold</td>
  4195. </tr>
  4196. <tr>
  4197. <td><code><em></code></td>
  4198. <td>Emphasis</td>
  4199. </tr>
  4200. <tr>
  4201. <td><code><i></code></td>
  4202. <td>Presentational italics</td>
  4203. </tr>
  4204. <tr>
  4205. <td><code><abbr></code></td>
  4206. <td>Abbreviations and acronyms</td>
  4207. </tr>
  4208. <tr>
  4209. <td><code><address></code></td>
  4210. <td>Content contact information</td>
  4211. </tr>
  4212. </tbody>
  4213. </table>
  4214. <h2 class="h3">Unordered list</h2>
  4215. <ul>
  4216. <li>Unordered list item</li>
  4217. <li>Unordered list item</li>
  4218. <li>Unordered list item</li>
  4219. <li>Unordered list item</li>
  4220. <li>Unordered list item</li>
  4221. <li>Unordered list item</li>
  4222. </ul>
  4223. <h2 class="h3">Ordered list</h2>
  4224. <ol>
  4225. <li>Ordered list item</li>
  4226. <li>Ordered list item</li>
  4227. <li>Ordered list item</li>
  4228. <li>Ordered list item</li>
  4229. <li>Ordered list item</li>
  4230. <li>Ordered list item</li>
  4231. </ol>
  4232. <h2 class="h3">Unordered, Bordered list</h2>
  4233. <ul class="list-bordered">
  4234. <li>Bordered list item</li>
  4235. <li>Bordered list item</li>
  4236. <li>Bordered list item</li>
  4237. <li>Bordered list item</li>
  4238. <li>Bordered list item</li>
  4239. <li>Bordered list item</li>
  4240. </ul>
  4241. <h2 class="h3">Definition list</h2>
  4242. <dl>
  4243. <dt>Definition term</dt>
  4244. <dd>Definition description</dd>
  4245. <dt>Definition term</dt>
  4246. <dd>Definition description</dd>
  4247. </dl>
  4248. <mark>mark</mark><br />
  4249. <del>del</del><br />
  4250. <ins>ins</ins><br />
  4251. <abbr title="The Turning Gate">TTG</abbr>
  4252. <% else --[[ actual: ]] %>
  4253. <!-- primary content -->
  4254. <% if M.the_block.columns == '1col' then %>
  4255. <div id="primary-content" class="grid_12 collapse clearfix">
  4256. <% else %>
  4257. <div id="primary-content" class="grid_<%= M.the_block.content_width %><% if M.the_block.content_position == 'right' then %> push_<%= math.floor(12 - M.the_block.content_width) %><% end %><% if M.the_block.content_width ~= 12 then %> gutter_<%= M.the_block.content_gutters%><% if M.the_block.content_position == 'right' then %> omega<% else %> alpha<% end %><% end %> collapse shelf_line clearfix">
  4258. <% end %>
  4259. <% if mode == 'publish' and publisher then %>
  4260. <% write("<?php echo $album->hook_preContentBlock(); ".."?"..">")%>
  4261. <% end %>
  4262. <% if mode == 'publish' and publisher then %>
  4263. <% write("<?php if ($album->placePageCopyAbove()) {\n"..
  4264. " echo $album->getPageCopy();\n"..
  4265. "} ".."?"..">")%>
  4266. <% write("<?php if ($album->replacePageCopy()) {\n"..
  4267. " echo $album->getPageCopy();\n"..
  4268. "} else { ".."?"..">")%>
  4269. <% end %>
  4270. <% if M.the_block.image.location == "primary" then %>
  4271. <% if getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then %>
  4272. <img class="the-block-image align<%= M.the_block.image.float %>" src="photos/<%= getImage(M.the_block.image.id).exportFilename %>.jpg" alt="<%= getImage(M.the_block.image.id).metadata.imgAlt %>" width="<%= getImage(M.the_block.image.id).renditions.photos.width %>" height="<%= getImage(M.the_block.image.id).renditions.photos.height %>" />
  4273. <% else %>
  4274. <p class="alert"><strong>ERROR</strong> : The specified ID does not correspond to any image in your filmstrip.</p>
  4275. <% end %><% end %>
  4276. <% write (markdown ( M.the_block.content ) ) %>
  4277. <% if mode == 'publish' and publisher then %>
  4278. <% write("<?php } ".."?"..">")%>
  4279. <% write("<?php if ($album->placePageCopyBelow()) {\n"..
  4280. " echo $album->getPageCopy();\n"..
  4281. "} ".."?"..">")%>
  4282. <% end %>
  4283. <% if M.sharing.ogp and M.sharing.display and M.sharing.location == 'end-block' then %>
  4284. <div id="social-media-sharing" class="social-media-sharing clearfix">
  4285. <% if M.sharing.location == 'beneath-navigation' then %>
  4286. <div class="mantle clearfix">
  4287. <div class="core clearfix">
  4288. <% end %>
  4289. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  4290. "$add_mode = true;\n"..
  4291. "if ( function_exists('ttg_sharing') ) {\n"..
  4292. " if ( !(ttg_sharing( TTG_COMP, TTG_ROOT )) ) {\n"..
  4293. " $add_mode = false;\n"..
  4294. " }\n"..
  4295. "}\n"..
  4296. "if ( $add_mode ) { ".."?"..">") end %>
  4297. <% if M.sharing.float ~= 'none' then %>
  4298. <ul class="clearfix">
  4299. <li class="social-bg share-page facebook"><a href="<% if publish then %>https://www.facebook.com/sharer/sharer.php?u=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&title=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></li>
  4300. <li class="social-bg share-page linkedin"><a href="<% if publish then %>http://www.linkedin.com/shareArticle?mini=true&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></li>
  4301. <li class="social-bg share-page twitter"><a href="<% if publish then %>http://twitter.com/intent/tweet?text=<% if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then %><% write("<?php echo $short_url; ".."?"..">")%><% else %><% write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">")%><% end %><% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %><% end %>" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></li>
  4302. <li class="social-bg share-page google-plus"><a href="<% if publish then %>https://plus.google.com/share?url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></li>
  4303. <li class="social-bg share-page pinterest"><a href="<% if publish then %>http://pinterest.com/pin/create/bookmarklet/?media=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>/<% write("<?php echo urlencode(PAGEIMAGE)".."?"..">")%>&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&is_video=false&description=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></li>
  4304. <li class="social-bg email"><a href="<% if publish then %>mailto:?Subject=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>&Body=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>%0D%0A<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></li>
  4305. </ul>
  4306. <% else %>
  4307. <p class="clearfix">
  4308. <span class="social-bg share-page facebook"><a href="<% if publish then %>https://www.facebook.com/sharer/sharer.php?u=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&title=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></span>
  4309. <span class="social-bg share-page linkedin"><a href="<% if publish then %>http://www.linkedin.com/shareArticle?mini=true&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></span>
  4310. <span class="social-bg share-page twitter"><a href="<% if publish then %>http://twitter.com/intent/tweet?text=<% if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then %><% write("<?php echo $short_url; ".."?"..">")%><% else %><% write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">")%><% end %><% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %><% end %>" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></span>
  4311. <span class="social-bg share-page google-plus"><a href="<% if publish then %>https://plus.google.com/share?url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></span>
  4312. <span class="social-bg share-page pinterest"><a href="<% if publish then %>http://pinterest.com/pin/create/bookmarklet/?media=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>/<% write("<?php echo urlencode(PAGEIMAGE)".."?"..">")%>&url=<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%>&is_video=false&description=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%><% end %>" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></span>
  4313. <span class="social-bg email"><a href="<% if publish then %>mailto:?Subject=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>&Body=<% write("<?php echo urlencode(ALBUMTITLE)".."?"..">")%>%0D%0A<% write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">")%><% end %>" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></span>
  4314. </p>
  4315. <% end %>
  4316. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_sharing ]] %>
  4317. <% if M.sharing.location == 'beneath-navigation' then %>
  4318. </div>
  4319. </div>
  4320. <% end %>
  4321. </div> <!-- #social-media-sharing -->
  4322. <% end --[[ sharing.display ]] %>
  4323. </div>
  4324. <!-- /primary content -->
  4325. <% if M.the_block.columns ~= '1col' then %>
  4326. <!-- secondary content -->
  4327. <div id="secondary-content" class="grid_<%= math.floor(12 - M.the_block.content_width) %> collapse<% if M.the_block.content_position == 'right' then %> pull_<%= M.the_block.content_width %><% end %><% if M.the_block.content_width ~= 12 then %> gutter_<%= M.the_block.content_gutters%><% if M.the_block.content_position == 'right' then %> alpha<% else %> omega<% end %><% end %> clearfix">
  4328. <% if mode == 'publish' and publisher then %>
  4329. <% write("<?php if ($album->placeSidebarCopyAbove()) {\n"..
  4330. " echo $album->getSidebarCopy();\n"..
  4331. "} ".."?"..">")%>
  4332. <% write("<?php if ($album->replaceSidebarCopy()) {\n"..
  4333. " echo $album->getSidebarCopy();\n"..
  4334. "} else { ".."?"..">")%>
  4335. <% end %>
  4336. <% if M.the_block.image.location == "secondary" then %>
  4337. <% if getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then %>
  4338. <img class="the-block-image align<%= M.the_block.image.float %>" src="photos/<%= getImage(M.the_block.image.id).exportFilename %>.jpg" alt="<%= getImage(M.the_block.image.id).metadata.imgAlt %>" width="<%= getImage(M.the_block.image.id).renditions.photos.width %>" height="<%= getImage(M.the_block.image.id).renditions.photos.height %>" />
  4339. <% else %>
  4340. <p class="alert"><strong>ERROR</strong> : The specified ID does not correspond to any image in your filmstrip.</p>
  4341. <% end %><% end %>
  4342. <% write (markdown ( M.the_block.sidebar.content ) ) %>
  4343. <% if mode == 'publish' and publisher then %>
  4344. <% write("<?php } ".."?"..">")%>
  4345. <% write("<?php if ($album->placeSidebarCopyBelow()) {\n"..
  4346. " echo $album->getSidebarCopy();\n"..
  4347. "} ".."?"..">")%>
  4348. <% end %>
  4349. </div>
  4350. <!-- /secondary content -->
  4351. <% end --[[ the_block.columns ~= '1col' ]] %>
  4352. <% end --[[ now_showing ]] %>
  4353. <% end --[[ cart ]] %>
  4354. </div><!-- #container_12 -->
  4355. <% if publish and M.phplugins.enable then write ("<?php\n" ..
  4356. "} // end ttg_block_top\n"..
  4357. "if ( function_exists('ttg_block_bottom') ) {\n" ..
  4358. " $void = ttg_block_bottom( TTG_COMP, TTG_ROOT );\n" ..
  4359. "} ".."?"..">") end --[[ ttg_block_bottom ]] %>
  4360. </div>
  4361. </div>
  4362. </div> <!-- #the-block -->
  4363. <% end --[[ the_block.display ]] %>
  4364. <% end %>
  4365. <% if M.password.enable and mode == 'publish' and not cart then
  4366. write ("<?php " .. "} " .. "?" ..">")
  4367. end --[[ end password protection script ]] %>
  4368. <% if publish and M.phplugins.enable then write ("<?php\n"..
  4369. "if ( function_exists('ttg_canvas_bottom') ) {\n"..
  4370. " $void = ttg_canvas_bottom( TTG_COMP, TTG_ROOT );\n"..
  4371. "} ".."?"..">") end --[[ ttg_canvas_bottom ]] %>
  4372. </div> <!-- #page-content -->
  4373. </div> <!-- #page-body -->
  4374. </section>
  4375. <section>
  4376. <div id="page-foot" class="page-foot clearfix">
  4377. <% if M.social_media.profiles.location ~= 'above-the-block' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  4378. <% if M.social_media.display then %>
  4379. <div class="social-media-profiles social-media clearfix">
  4380. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  4381. <div class="mantle clearfix">
  4382. <div class="core clearfix">
  4383. <% end --[[ masthead ]] %>
  4384. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  4385. "$add_mode = true;\n"..
  4386. "if ( function_exists('ttg_social_media') ) {\n"..
  4387. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  4388. " $add_mode = false;\n"..
  4389. " }\n"..
  4390. "}\n"..
  4391. "if ( $add_mode ) { ".."?"..">") end %>
  4392. <ul class="clearfix">
  4393. <% if M.social_media.profiles.label ~= '' then %>
  4394. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  4395. <% end %>
  4396. <% if M.social_media.profiles.user ~= '' then %>
  4397. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  4398. <% end %>
  4399. <% if M.social_media.profiles.aboutme ~= '' then %>
  4400. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  4401. <% end %>
  4402. <% if M.social_media.profiles.pinterest ~= '' then %>
  4403. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  4404. <% end %>
  4405. <% if M.social_media.profiles.google_plus ~= '' then %>
  4406. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  4407. <% end %>
  4408. <% if M.social_media.profiles.twitter ~= '' then %>
  4409. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  4410. <% end %>
  4411. <% if M.social_media.profiles.linkedin ~= '' then %>
  4412. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  4413. <% end %>
  4414. <% if M.social_media.profiles.facebook ~= '' then %>
  4415. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  4416. <% end %>
  4417. <% if M.social_media.profiles.instagram ~= '' then %>
  4418. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  4419. <% end %>
  4420. <% if M.social_media.profiles.tumblr ~= '' then %>
  4421. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  4422. <% end %>
  4423. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  4424. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  4425. <% end %>
  4426. <% if M.social_media.profiles.flickr ~= '' then %>
  4427. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  4428. <% end %>
  4429. <% if M.social_media.profiles.behance ~= '' then %>
  4430. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  4431. <% end %>
  4432. <% if M.social_media.profiles.vimeo ~= '' then %>
  4433. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  4434. <% end %>
  4435. <% if M.social_media.profiles.youtube ~= '' then %>
  4436. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  4437. <% end %>
  4438. <% if M.social_media.profiles.rss ~= '' then %>
  4439. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  4440. <% end %>
  4441. </ul>
  4442. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  4443. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  4444. </div>
  4445. </div>
  4446. <% end --[[ masthead ]] %>
  4447. </div> <!-- #social-media-profiles -->
  4448. <% end --[[ social_media.display ]] %>
  4449. <% end %>
  4450. <% if mode == 'preview' and M.the_block.now_showing == 'help' then else %>
  4451. <% if M.footer.display then %>
  4452. <div id="footer" class="block-id footer clearfix">
  4453. <div class="mantle clearfix">
  4454. <div class="core clearfix">
  4455. <div class="container_12">
  4456. <% if M.social_media.profiles.location == 'in-the-footer' then %>
  4457. <% if M.social_media.display then %>
  4458. <div class="social-media-profiles social-media clearfix">
  4459. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  4460. <div class="mantle clearfix">
  4461. <div class="core clearfix">
  4462. <% end --[[ masthead ]] %>
  4463. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  4464. "$add_mode = true;\n"..
  4465. "if ( function_exists('ttg_social_media') ) {\n"..
  4466. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  4467. " $add_mode = false;\n"..
  4468. " }\n"..
  4469. "}\n"..
  4470. "if ( $add_mode ) { ".."?"..">") end %>
  4471. <ul class="clearfix">
  4472. <% if M.social_media.profiles.label ~= '' then %>
  4473. <li class="social-media-label"><span><%= M.social_media.profiles.label %></span></li>
  4474. <% end %>
  4475. <% if M.social_media.profiles.user ~= '' then %>
  4476. <li class="social-bg user"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.user %><% end %>"<%= newWindow %>><i class="fa fa-user"></i></a></li>
  4477. <% end %>
  4478. <% if M.social_media.profiles.aboutme ~= '' then %>
  4479. <li class="social-bg about-me"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.aboutme %><% end %>"<%= newWindow %> title="About.me"><span>me</span></a></li>
  4480. <% end %>
  4481. <% if M.social_media.profiles.pinterest ~= '' then %>
  4482. <li class="social-bg pinterest"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.pinterest %><% end %>"<%= newWindow %> title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  4483. <% end %>
  4484. <% if M.social_media.profiles.google_plus ~= '' then %>
  4485. <li class="social-bg google-plus"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.google_plus %>?rel=author<% end %>"<%= newWindow %> title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  4486. <% end %>
  4487. <% if M.social_media.profiles.twitter ~= '' then %>
  4488. <li class="social-bg twitter"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.twitter %><% end %>"<%= newWindow %> title="Twitter"><i class="fa fa-twitter"></i></a></li>
  4489. <% end %>
  4490. <% if M.social_media.profiles.linkedin ~= '' then %>
  4491. <li class="social-bg linkedin"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.linkedin %><% end %>"<%= newWindow %> title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  4492. <% end %>
  4493. <% if M.social_media.profiles.facebook ~= '' then %>
  4494. <li class="social-bg facebook"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.facebook %><% end %>"<%= newWindow %> title="Facebook"><i class="fa fa-facebook"></i></a></li>
  4495. <% end %>
  4496. <% if M.social_media.profiles.instagram ~= '' then %>
  4497. <li class="social-bg instagram"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.instagram %><% end %>"<%= newWindow %> title="Instagram"><i class="fa fa-instagram"></i></a></li>
  4498. <% end %>
  4499. <% if M.social_media.profiles.tumblr ~= '' then %>
  4500. <li class="social-bg tumblr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.tumblr %><% end %>"<%= newWindow %> title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  4501. <% end %>
  4502. <% if M.social_media.profiles.vsco_grid ~= '' then %>
  4503. <li class="social-bg vsco-grid"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vsco_grid %><% end %>"<%= newWindow %> title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  4504. <% end %>
  4505. <% if M.social_media.profiles.flickr ~= '' then %>
  4506. <li class="social-bg flickr"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.flickr %><% end %>"<%= newWindow %> title="Flickr"><i class="fa fa-flickr"></i></a></li>
  4507. <% end %>
  4508. <% if M.social_media.profiles.behance ~= '' then %>
  4509. <li class="social-bg behance"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.behance %><% end %>"<%= newWindow %> title="Behance"><i class="fa fa-behance"></i></a></li>
  4510. <% end %>
  4511. <% if M.social_media.profiles.vimeo ~= '' then %>
  4512. <li class="social-bg vimeo"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.vimeo %><% end %>"<%= newWindow %> title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  4513. <% end %>
  4514. <% if M.social_media.profiles.youtube ~= '' then %>
  4515. <li class="social-bg youtube"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.youtube %><% end %>"<%= newWindow %> title="YouTube"><i class="fa fa-youtube"></i></a></li>
  4516. <% end %>
  4517. <% if M.social_media.profiles.rss ~= '' then %>
  4518. <li class="social-bg rss"><a href="<% if mode == 'preview' then %>#<% else %><%= M.social_media.profiles.rss %><% end %>"<%= newWindow %> title="RSS"><i class="fa fa-rss"></i></a></li>
  4519. <% end %>
  4520. </ul>
  4521. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] %>
  4522. <% if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then %>
  4523. </div>
  4524. </div>
  4525. <% end --[[ masthead ]] %>
  4526. </div> <!-- #social-media-profiles -->
  4527. <% end --[[ social_media.display ]] %>
  4528. <% end %>
  4529. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  4530. "$add_mode = true;\n"..
  4531. "if ( function_exists('ttg_footer_top') ) {\n"..
  4532. " if ( !(ttg_footer_top( TTG_COMP, TTG_ROOT )) ) {\n"..
  4533. " $add_mode = false;\n"..
  4534. " }\n"..
  4535. "}\n"..
  4536. "if ( $add_mode ) { ".."?"..">") end %>
  4537. <div class="collapse clearfix">
  4538. <div id="attribution" class="collapse">
  4539. <% write (markdown ( M.footer.attribution ) ) %>
  4540. </div>
  4541. <% if M.footer.powered_by_ttg then %>
  4542. <p id="powered-by-ttg">Powered by <a href="<% if mode == 'publish' then %>http://theturninggate.net/<% else %>#<% end %>"<%= newWindow %>>The Turning Gate (TTG)</a>.</p>
  4543. <% end %>
  4544. <p id="back-to-top" class="back-to-top"><a href="#body-mantle"><%= M.footer.back_to_top %></a></p>
  4545. </div>
  4546. <% if publish and M.phplugins.enable then write ("<?php\n" ..
  4547. "} // end ttg_footer_top\n"..
  4548. "if ( function_exists('ttg_footer_bottom') ) {\n" ..
  4549. " $void = ttg_footer_bottom( TTG_COMP, TTG_ROOT );\n" ..
  4550. "} ".."?"..">") end --[[ ttg_footer_bottom ]] %>
  4551. </div>
  4552. </div>
  4553. </div>
  4554. </div> <!-- #footer -->
  4555. <% end --[[ footer.display ]] %>
  4556. <% end --[[ help ]] %>
  4557. </div> <!-- #page-foot -->
  4558. </section>
  4559. </div> <!-- #body-core-inner -->
  4560. </div> <!-- #body-core -->
  4561. </div> <!-- #body-mantle -->
  4562. <!-- Scripts **************************************** -->
  4563. <% if publish and model.phplugins.enable then write ("<?php\n" ..
  4564. "$add_mode = true;\n"..
  4565. "if ( function_exists('ttg_scripts_navigation') ) {\n"..
  4566. " if ( !(ttg_scripts_navigation( TTG_COMP, TTG_ROOT )) ) {\n"..
  4567. " $add_mode = false;\n"..
  4568. " }\n"..
  4569. "}\n"..
  4570. "if ( $add_mode ) { ".."?"..">") end %>
  4571. <% if M.navigation.display then %>
  4572. <script src="<%= sharedResources %>/js/jquery.r2d2menu.min.js"></script>
  4573. <script>
  4574. $(document).ready(function(){
  4575. // start R2-D2
  4576. if($("html").hasClass("js")){
  4577. $("#r2d2-menu").r2d2({
  4578. breakpoint: <%= M.navigation.mobile.breakpoint %>,
  4579. touch: <%= M.navigation.touch.force %>
  4580. });
  4581. }
  4582. });
  4583. </script>
  4584. <% end --[[ navigation.display ]] %>
  4585. <% if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_scripts_navigation ]] %>
  4586. <% if not cart and not single then %>
  4587. <script>
  4588. <% if (M.the_block.display and (page == 1 or mobile or publisher)) then
  4589. if (preview and M.the_block.now_showing ~= 'help' and M.the_block.now_showing ~= 'typography' and not single) or (publish and not single) then %>
  4590. $(document).ready(function(){
  4591. // hide .the-block if it has no content
  4592. function isEmpty(el){
  4593. return <% write("$")%>.trim($(el).html());
  4594. }
  4595. //$('.the-block .core div').html(isEmpty('#primary-content').length);
  4596. if(isEmpty('#primary-content').length <= 0 && isEmpty('#secondary-content').length <= 0){
  4597. $('#the-block').hide();
  4598. }
  4599. });
  4600. <% end end %>
  4601. <% if M.slideshowTracking.enable and not single then %>
  4602. if(window.location.hash){
  4603. var target = window.location.hash,
  4604. destination = $(target).offset().top;
  4605. jQuery("html,body").animate({ scrollTop: destination - 72}, 800 );
  4606. jQuery(target).addClass('tracked-item');
  4607. }
  4608. <% end %>
  4609. </script>
  4610. <% end --[[ not cart ]] %>
  4611. <% --[[ the thumbnail grid ]]
  4612. if not single then %>
  4613. <% if M.grid.type.desktop == 'ce4-freewall' and not mobile then %>
  4614. <script src="<%= sharedResources %>/js/freewall.min.js"></script>
  4615. <% end %>
  4616. <script>
  4617. <% if M.grid.type.desktop == 'ce4-standard' or (M.grid.type.desktop == 'ce4-freewall' and M.freewall.layout == 'rigid') or mobile then %>
  4618. $(document).ready(function(){
  4619. // center the thumbnail grid
  4620. function setGridWidth() {
  4621. $('.the-grid .the-gallery').removeAttr('style');
  4622. var cellWidth = $('.gridcell:first').outerWidth(true);
  4623. if($(cellWidth).length >= 0){
  4624. cellWidth = cellWidth
  4625. } else { cellWidth = 0 }
  4626. var galleryColCount = Math.floor(
  4627. ( $('.the-grid .the-gallery').innerWidth() / cellWidth )
  4628. );
  4629. var galleryWidth = Math.floor( cellWidth * galleryColCount );
  4630. $('.the-grid .the-gallery').css('width', galleryWidth + 'px');
  4631. }
  4632. setGridWidth();
  4633. $(function() {
  4634. setGridWidth();
  4635. $(window).resize( jQuery.debounce( 150, false, function(e){
  4636. setGridWidth();
  4637. }));
  4638. });
  4639. });
  4640. <% end %>
  4641. <% if M.grid.type.desktop == 'ce4-freewall' and not mobile then %>
  4642. jQuery(document).ready(function(){
  4643. <% if M.freewall.layout == 'rigid' then %>
  4644. var wall = new freewall("#freewall");
  4645. wall.reset({
  4646. selector: '.brick',
  4647. animate: true,
  4648. cellW: <%=
  4649. math.floor(M.photoSizes.thumbnails.width + (M.freewall.margin * 2) + (M.freewall.padding * 2) + M.grid_cell.bl + M.grid_cell.br)
  4650. %>,
  4651. cellH: 'auto',
  4652. gutterX: 0,
  4653. gutterY: 0
  4654. });
  4655. <% elseif M.freewall.layout == 'elastic' then %>
  4656. var wall = new freewall("#freewall");
  4657. wall.reset({
  4658. selector: '.brick',
  4659. animate: true,
  4660. cellW: <%= M.freewall.cell %>,
  4661. cellH: 'auto',
  4662. gutterX: <%= M.freewall.margin %>,
  4663. gutterY: <%= M.freewall.margin %>
  4664. });
  4665. <% end %>
  4666. $(function() {
  4667. wall.fitWidth();
  4668. jQuery('.freewall-spinner').fadeTo('slow', 0);
  4669. jQuery('#freewall').fadeTo('slow', 1).removeClass('hidden-gallery');
  4670. wall.container.find('.brick img').load(function() {
  4671. wall.fitWidth();
  4672. });
  4673. $(window).resize( jQuery.debounce( 150, false, function(e){
  4674. wall.fitWidth();
  4675. }));
  4676. });
  4677. });
  4678. <% end %>
  4679. </script>
  4680. <% end
  4681. --[[ the thumbnail grid ]] %>
  4682. <% if (not mobile and not single and not cart and model.grid.presentation.desktop == "hs_slideshow") then %>
  4683. <script src="<%= sharedResources %>/highslide/highslide.js"></script>
  4684. <% if M.cart.integration.enabled then %><% if publisher then %><% write("<?php if ($album->cartEnabled()) { ".."?"..">")%><% end %>
  4685. <script>
  4686. var cartEnabled = true;
  4687. </script>
  4688. <% if publisher then %><% write("<?php } ".."?"..">")%><% end end %>
  4689. <script>
  4690. //<![CDATA[
  4691. hs.dynamicallyUpdateAnchors = false;
  4692. hs.showCredits = false;
  4693. hs.expandCursor = null;
  4694. hs.outlineType = null;
  4695. hs.restoreCursor = null;
  4696. hs.align = 'center';
  4697. hs.dragByHeading = false;
  4698. hs.transitions = ['fade', 'crossfade'];
  4699. hs.fadeInOut = true;
  4700. hs.dimmingOpacity = <%= math.abs( M.lightbox.background_color.alpha / 100 ) %>;
  4701. hs.onDimmerClick = function() { return true; }
  4702. hs.Expander.prototype.onDrag = function() {
  4703. return false;
  4704. }
  4705. <% if M.highslide.onImageClick == 'next' then %>
  4706. hs.Expander.prototype.onImageClick = function() {
  4707. return hs.next();
  4708. }
  4709. <% end %>
  4710. hs.marginTop = 37;
  4711. hs.marginBottom = 37;
  4712. hs.marginLeft = 16;
  4713. hs.marginRight = 16;
  4714. <% if M.highslide.autoplay then %>
  4715. hs.addEventListener(window, "load", function() {
  4716. var autoplayid = $("a.gridicon:first").attr("id");
  4717. document.getElementById(autoplayid).onclick();
  4718. });
  4719. <% end --[[ highslide.autoplay ]] %>
  4720. <% if M.highslide.language == 'default' then %>
  4721. hs.lang = {
  4722. loadingText : '<i class="fa fa-fw fa-spinner fa-spin"></i>',
  4723. loadingTitle : '',
  4724. number: '',
  4725. restoreTitle: ''
  4726. };
  4727. <% else %>
  4728. <% if M.highslide.language == 'blank' then %>
  4729. hs.lang = {
  4730. cssDirection: 'ltr',
  4731. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4732. loadingTitle : '',
  4733. focusTitle : '',
  4734. fullExpandTitle : '',
  4735. fullExpandText : '',
  4736. creditsText : '',
  4737. creditsTitle : '',
  4738. previousText : '',
  4739. previousTitle : '',
  4740. nextText : '',
  4741. nextTitle : '',
  4742. moveTitle : '',
  4743. moveText : '',
  4744. closeText : '',
  4745. closeTitle : '',
  4746. resizeTitle : '',
  4747. playText : '',
  4748. playTitle : '',
  4749. pauseText : '',
  4750. pauseTitle : '',
  4751. number : '',
  4752. restoreTitle : ''
  4753. };
  4754. <% elseif M.highslide.language == 'english' then %>
  4755. hs.lang = {
  4756. cssDirection: 'ltr',
  4757. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4758. loadingTitle : '',
  4759. focusTitle : 'Click to bring to front',
  4760. fullExpandTitle : 'Expand to actual size (f)',
  4761. fullExpandText : 'Full size',
  4762. creditsText : 'Powered by <i>Highslide JS</i>',
  4763. creditsTitle : 'Go to the Highslide JS homepage',
  4764. previousText : 'Previous',
  4765. previousTitle : 'Previous (arrow left)',
  4766. nextText : 'Next',
  4767. nextTitle : 'Next (arrow right)',
  4768. moveTitle : 'Move',
  4769. moveText : 'Move',
  4770. closeText : 'Close',
  4771. closeTitle : 'Close (esc)',
  4772. resizeTitle : 'Resize',
  4773. playText : 'Play',
  4774. playTitle : 'Play slideshow (spacebar)',
  4775. pauseText : 'Pause',
  4776. pauseTitle : 'Pause slideshow (spacebar)',
  4777. number : '',
  4778. restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
  4779. };
  4780. <% elseif M.highslide.language == 'nynorsk' then %>
  4781. hs.lang = {
  4782. cssDirection: 'ltr',
  4783. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4784. loadingTitle : '',
  4785. focusTitle : 'Klikk for å flytte fram',
  4786. fullExpandText : 'Full storleik',
  4787. fullExpandTitle : 'Utvid til full storleik',
  4788. creditsText : 'Drive av <i>Highslide JS</i>',
  4789. creditsTitle : 'Gå til Highslide JS si heimeside',
  4790. previousText : 'Forrige',
  4791. previousTitle : 'Forrige (pil venstre)',
  4792. nextText : 'Neste',
  4793. nextTitle : 'Neste (pil høgre)',
  4794. moveText : 'Flytt',
  4795. moveTitle : 'Flytt',
  4796. closeText : 'Lukk',
  4797. closeTitle : 'Lukk (esc)',
  4798. resizeTitle : 'Endre storleik',
  4799. playText : 'Spel av',
  4800. playTitle : 'Vis biletserie (mellomrom)',
  4801. pauseText : 'Pause',
  4802. pauseTitle : 'Pause (mellomrom)',
  4803. number : '',
  4804. restoreTitle : 'Klikk for å lukke biletet, klikk og dra for å flytte. Bruk piltastane for forrige og neste.'
  4805. };
  4806. <% elseif M.highslide.language == 'bokmal' then %>
  4807. hs.lang = {
  4808. cssDirection: 'ltr',
  4809. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4810. loadingTitle : '',
  4811. focusTitle : 'Klikk for å flytte fram',
  4812. fullExpandText : 'Full størrelse',
  4813. fullExpandTitle : 'Utvid til full størrelse',
  4814. creditsText : 'Drevet av <i>Highslide JS</i>',
  4815. creditsTitle : 'Gå til hjemmesiden til Highslide JS',
  4816. previousText : 'Forrige',
  4817. previousTitle : 'Forrige (pil venstre)',
  4818. nextText : 'Neste',
  4819. nextTitle : 'Neste (pil høyre)',
  4820. moveText : 'Flytt',
  4821. moveTitle : 'Flytt',
  4822. closeText : 'Lukk',
  4823. closeTitle : 'Lukk (esc)',
  4824. resizeTitle : 'Endre størrelse',
  4825. playText : 'Spill av',
  4826. playTitle : 'Vis bildeserie (mellomrom)',
  4827. pauseText : 'Pause',
  4828. pauseTitle : 'Pause (mellomrom)',
  4829. number : '',
  4830. restoreTitle : 'Klikk for å lukke bildet, klikk og dra for å flytte. Bruk piltastene for forrige og neste.'
  4831. };
  4832. <% elseif M.highslide.language == 'french' then %>
  4833. hs.lang = {
  4834. cssDirection: 'ltr',
  4835. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4836. loadingTitle : '',
  4837. focusTitle : 'Cliquer pour amener au premier plan',
  4838. fullExpandTitle : 'Afficher à la taille réelle',
  4839. fullExpandText : 'Taille réelle',
  4840. creditsText : 'Développé sur <i>Highslide JS</i>',
  4841. creditsTitle : 'Site Web de Highslide JS',
  4842. previousText : 'Précédent',
  4843. previousTitle : 'Précédent (flèche gauche)',
  4844. nextText : 'Suivant',
  4845. nextTitle : 'Suivant (flèche droite)',
  4846. moveTitle : 'Déplacer',
  4847. moveText : 'Déplacer',
  4848. closeText : 'Fermer',
  4849. closeTitle : 'Fermer (esc ou Echap)',
  4850. resizeTitle : 'Redimensionner',
  4851. playText : 'Lancer',
  4852. playTitle : "Lancer le diaporama (barre d'espace)",
  4853. pauseText : 'Pause',
  4854. pauseTitle : "Suspendre le diaporama (barre d'espace)",
  4855. number : '',
  4856. restoreTitle : "Cliquer pour fermer l'image, cliquer et faire glisser pour déplacer, utiliser les touches flèches droite et gauche pour suivant et précédent."
  4857. };
  4858. <% elseif M.highslide.language == 'dutch' then %>
  4859. hs.lang = {
  4860. cssDirection: 'ltr',
  4861. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4862. loadingTitle : '',
  4863. focusTitle : 'Klik om naar voren te brengen',
  4864. fullExpandTitle : 'Vergroot naar origineel',
  4865. fullExpandText : 'Volledige grootte',
  4866. creditsText : 'Powered door <i>Highslide JS</i>',
  4867. creditsTitle : 'Ga naar de Highslide JS homepage',
  4868. previousText : 'Vorige',
  4869. previousTitle : 'Vorige (pijl naar links)',
  4870. nextText : 'Volgende',
  4871. nextTitle : 'Volgende (pijl naar rechts)',
  4872. moveTitle : 'Verplaats',
  4873. moveText : 'Verplaats',
  4874. closeText : 'Sluiten',
  4875. closeTitle : 'Sluiten (esc)',
  4876. resizeTitle : 'Afmeting wijzigen',
  4877. playText : 'Afspelen',
  4878. playTitle : 'Start diashow (spatiebalk)',
  4879. pauseText : 'Pauze',
  4880. pauseTitle : 'Diashow pauzeren (spatiebalk)',
  4881. number : '',
  4882. restoreTitle : 'Klik om te sluiten, klik en sleep om te verplaatsen. Gebruik pijltjes toetsen voor volgende en vorige.'
  4883. };
  4884. <% elseif M.highslide.language == 'spanish' then %>
  4885. hs.lang = {
  4886. cssDirection: 'ltr',
  4887. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4888. loadingTitle : '',
  4889. focusTitle : 'Click para traer al frente',
  4890. fullExpandTitle : 'Expandir al tamaño actual',
  4891. fullExpandText : 'Tamaño real',
  4892. creditsText : 'Potenciado por <i>Highslide JS</i>',
  4893. creditsTitle : 'Ir al home de Highslide JS',
  4894. previousText : 'Anterior',
  4895. previousTitle : 'Anterior (flecha izquierda)',
  4896. nextText : 'Siguiente',
  4897. nextTitle : 'Siguiente (flecha derecha)',
  4898. moveTitle : 'Mover',
  4899. moveText : 'Mover',
  4900. closeText : 'Cerrar',
  4901. closeTitle : 'Cerrar (esc)',
  4902. resizeTitle : 'Redimensionar',
  4903. playText : 'Iniciar',
  4904. playTitle : 'Iniciar slideshow (barra espacio)',
  4905. pauseText : 'Pausar',
  4906. pauseTitle : 'Pausar slideshow (barra espacio)',
  4907. number : '',
  4908. restoreTitle : 'Click para cerrar la imagen, click y arrastrar para mover. Usa las flechas del teclado para avanzar o retroceder.'
  4909. };
  4910. <% elseif M.highslide.language == 'portuguese' then %>
  4911. hs.lang = {
  4912. cssDirection: 'ltr',
  4913. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4914. loadingTitle : '',
  4915. focusTitle : 'Click para trazer para frente',
  4916. fullExpandTitle : 'Expandir ao tamanho atual',
  4917. fullExpandText : 'Tamanho real',
  4918. creditsText : 'Powered por <i>Highslide JS</i>',
  4919. creditsTitle : 'Ir a home de Highslide JS',
  4920. previousText : 'Anterior',
  4921. previousTitle : 'Anterior (flecha esquerda)',
  4922. nextText : 'Siguiente',
  4923. nextTitle : 'Siguiente (flecha direita)',
  4924. moveTitle : 'Mover',
  4925. moveText : 'Mover',
  4926. closeText : 'Fechar',
  4927. closeTitle : 'Fechar (esc)',
  4928. resizeTitle : 'Redimensionar',
  4929. playText : 'Iniciar',
  4930. playTitle : 'Iniciar slideshow (barra de espaço)',
  4931. pauseText : 'Pausar',
  4932. pauseTitle : 'Pausar slideshow (barra de espaço)',
  4933. number : '',
  4934. restoreTitle : 'Clique para fechar a imagen, clique e arraste para mover. Use as flechas do teclado para avançar ou retroceder.'
  4935. };
  4936. <% elseif M.highslide.language == 'polish' then %>
  4937. hs.lang = {
  4938. cssDirection: 'ltr',
  4939. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4940. loadingTitle : '',
  4941. focusTitle : 'Kliknij, aby przenieść na wierzch',
  4942. fullExpandTitle : 'Rozszerz do pełnego rozmiaru',
  4943. fullExpandText : 'Pełny rozmiar',
  4944. creditsText : 'Korzysta z <i>Highslide JS</i>',
  4945. creditsTitle : 'Przejdź do strony domowej Highslide JS',
  4946. previousText : 'Wstecz',
  4947. previousTitle : 'Wstecz (lewa strzałka)',
  4948. nextText : 'Dalej',
  4949. nextTitle : 'Dalej (prawa strzałka)',
  4950. moveTitle : 'Przesuń',
  4951. moveText : 'Przesuń',
  4952. closeText : 'Zamknij',
  4953. closeTitle : 'Zamknij (esc)',
  4954. resizeTitle : 'Zmień rozmiar',
  4955. playText : 'Uruchom',
  4956. playTitle : 'Uruchom pokaz slajdów (spacja)',
  4957. pauseText : 'Pauza',
  4958. pauseTitle : 'Wstrzymaj pokaz slajdów (spacja)',
  4959. number : '',
  4960. restoreTitle : 'Kliknij, aby zamknąć obrazek; kliknij i przeciąg, aby przesunąć. Użyj klawiszy strzałek, aby przejść dalej lub wstecz.'
  4961. };
  4962. <% elseif M.highslide.language == 'german' then %>
  4963. hs.lang = {
  4964. cssDirection: 'ltr',
  4965. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4966. loadingTitle : '',
  4967. focusTitle : 'Klick um nach vorn zu bringen',
  4968. fullExpandTitle : 'Zur Originalgröße erweitern',
  4969. fullExpandText : 'Vollbild',
  4970. creditsText : 'Powered by <i>Highslide JS</i>',
  4971. creditsTitle : 'Gehe zur Highslide JS Homepage',
  4972. previousText : 'Voriges',
  4973. previousTitle : 'Voriges (Pfeiltaste links)',
  4974. nextText : 'Nächstes',
  4975. nextTitle : 'Nächstes (Pfeiltaste rechts)',
  4976. moveTitle : 'Verschieben',
  4977. moveText : 'Verschieben',
  4978. closeText : 'Schließen',
  4979. closeTitle : 'Schließen (Esc)',
  4980. resizeTitle : 'Größe wiederherstellen',
  4981. playText : 'Abspielen',
  4982. playTitle : 'Slideshow abspielen (Leertaste)',
  4983. pauseText : 'Pause',
  4984. pauseTitle : 'Pausiere Slideshow (Leertaste)',
  4985. number : '',
  4986. restoreTitle : 'Klick um das Bild zu schließen, klick und ziehe um zu verschieben. Benutze Pfeiltasten für vor und zurück.'
  4987. };
  4988. <% elseif M.highslide.language == 'danish' then %>
  4989. hs.lang = {
  4990. cssDirection: 'ltr',
  4991. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  4992. loadingTitle : '',
  4993. focusTitle : 'Klik for at bringe først på skærm',
  4994. fullExpandTitle : 'Vis i original størrelse',
  4995. fullExpandText : 'Fuld størrelse',
  4996. creditsText : 'Vist med <i>Highslide JS</i>',
  4997. creditsTitle : "Gå til Highslide JS's hjemmeside",
  4998. previousText : 'Forrige',
  4999. previousTitle : 'forrige (arrow left)',
  5000. nextText : 'Næste',
  5001. nextTitle : 'Næste (arrow right)',
  5002. moveTitle : 'Flyt',
  5003. moveText : 'Flyt',
  5004. closeText : 'Luk',
  5005. closeTitle : 'Luk (esc)',
  5006. resizeTitle : 'Ændre størrelse',
  5007. playText : 'Start',
  5008. playTitle : 'Start slideshow (spacebar)',
  5009. pauseText : 'Pause',
  5010. pauseTitle : 'Pause slideshow (spacebar)',
  5011. number : '',
  5012. restoreTitle : 'Klik for at lukke billed, klik og træk for at flytte. Brug piletaster for at skifte forrige og næste billed.'
  5013. };
  5014. <% elseif M.highslide.language == 'italian' then %>
  5015. hs.lang = {
  5016. cssDirection: 'ltr',
  5017. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  5018. loadingTitle : '',
  5019. focusTitle : 'Fare clic per portare in avanti',
  5020. fullExpandTitle : 'Visualizza dimensioni originali',
  5021. fullExpandText : 'Dimensione massima',
  5022. creditsText : 'Powered by <i>Highslide JS</i>',
  5023. creditsTitle : 'Vai al sito Web di Highslide JS',
  5024. previousText : 'Precedente',
  5025. previousTitle : 'Precedente (freccia sinistra)',
  5026. nextText : 'Successiva',
  5027. nextTitle : 'Successiva (freccia destra)',
  5028. moveTitle : 'Sposta',
  5029. moveText : 'Sposta',
  5030. closeText : 'Chiudi',
  5031. closeTitle : 'Chiudi (Esc)',
  5032. resizeTitle : 'Ridimensiona',
  5033. playText : 'Avvia',
  5034. playTitle : 'Avvia slideshow (barra spaziatrice)',
  5035. pauseText : 'Pausa',
  5036. pauseTitle : 'Pausa slideshow (barra spaziatrice)',
  5037. number : '',
  5038. restoreTitle : "Fare clic per chiudere l'immagine, trascina per spostare. Frecce andare avanti e indietro."
  5039. };
  5040. <% elseif M.highslide.language == 'chinese-simple' then %>
  5041. hs.lang = {
  5042. cssDirection: 'ltr',
  5043. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  5044. loadingTitle : '',
  5045. focusTitle : '置于最前',
  5046. fullExpandTitle : '原始尺寸',
  5047. fullExpandText : '完整尺寸',
  5048. creditsText : '基于<i>Highslide JS</i>',
  5049. creditsTitle : '查看 Highslide JS 官方首页',
  5050. previousText : '上一张',
  5051. previousTitle : '上一张 (左方向键)',
  5052. nextText : '下一张',
  5053. nextTitle : '下一张 (右方向键)',
  5054. moveTitle : '移动',
  5055. moveText : '移动',
  5056. closeText : '关闭',
  5057. closeTitle : '关闭 (退出键)',
  5058. resizeTitle : '调整尺寸',
  5059. playText : '播放',
  5060. playTitle : '播放幻灯片 (空格键)',
  5061. pauseText : '暂停',
  5062. pauseTitle : '暂停幻灯片 (空格键)',
  5063. number : '',
  5064. restoreTitle : '单击关闭图片,单击不放拖动图片。使用方向键进行图片切换。'
  5065. };
  5066. <% elseif M.highslide.language == 'chinese-traditional' then %>
  5067. hs.lang = {
  5068. cssDirection: 'ltr',
  5069. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  5070. loadingTitle : '',
  5071. focusTitle : '置於最前',
  5072. fullExpandTitle : '原始尺寸',
  5073. fullExpandText : '完整尺寸',
  5074. creditsText : '基於<i>Highslide JS</i>',
  5075. creditsTitle : '查看 Highslide JS 官方首頁',
  5076. previousText : '上壹張',
  5077. previousTitle : '上壹張 (左方向鍵)',
  5078. nextText : '下壹張',
  5079. nextTitle : '下壹張 (右方向鍵)',
  5080. moveTitle : '移動',
  5081. moveText : '移動',
  5082. closeText : '關閉',
  5083. closeTitle : '關閉 (退出鍵)',
  5084. resizeTitle : '調整尺寸',
  5085. playText : '播放',
  5086. playTitle : '播放幻燈片 (空格鍵)',
  5087. pauseText : '暫停',
  5088. pauseTitle : '暫停幻燈片 (空格鍵)',
  5089. number : '',
  5090. restoreTitle : '單擊關閉圖片,單擊不放拖動圖片。使用方向鍵進行圖片切換。'
  5091. };
  5092. <% elseif M.highslide.language == 'swedish' then %>
  5093. hs.lang = {
  5094. cssDirection: 'ltr',
  5095. loadingText : '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  5096. loadingTitle : '',
  5097. focusTitle : 'Klicka för att visa främst',
  5098. fullExpandTitle : 'Visa i full storlek (f)',
  5099. fullExpandText : 'Full storlek',
  5100. creditsText : 'Drivs med hjälp av <i>Highslide JS</i>',
  5101. creditsTitle : 'Besök Highslide JS hemsida',
  5102. previousText : 'Föregående',
  5103. previousTitle : 'Föregående (pil vänster)',
  5104. nextText : 'Nästa',
  5105. nextTitle : 'Nästa (pil höger)',
  5106. moveTitle : 'Flytta',
  5107. moveText : 'Flytta',
  5108. closeText : 'Stäng',
  5109. closeTitle : 'Stäng (esc)',
  5110. resizeTitle : 'Ändra storlek',
  5111. playText : 'Uppspelning',
  5112. playTitle : 'Starta bildspel (mellanslag/spacebar)',
  5113. pauseText : 'Pausa',
  5114. pauseTitle : 'Pausa bildspel (mellanslag/spacebar)',
  5115. number : '',
  5116. restoreTitle : 'Klicka för att stänga bild, klicka och dra för att flytta. Använd piltangenterna för nästa och föregående.'
  5117. };
  5118. <% end %>
  5119. <% end %>
  5120. hs.addSlideshow({
  5121. slideshowGroup: 'images',
  5122. interval: <%= M.highslide.interval %>,
  5123. repeat: <%= M.highslide.loop %>,
  5124. useControls: true,
  5125. overlayOptions: {
  5126. position: 'top left',
  5127. relativeTo: 'viewport',
  5128. hideOnMouseOut: false,
  5129. offsetX: 0,
  5130. offsetY: 0,
  5131. width: '100%'
  5132. },
  5133. fixedControls: false
  5134. });
  5135. hs.skin.controls = '<div class="highslide-controls clearfix">'+
  5136. '<ul class="hs-controls-left">'+
  5137. '<li class="highslide-close">'+
  5138. '<a title="{hs.lang.closeTitle}">'+
  5139. '<i class="fa fa-times-circle fa-fw"></i>'+
  5140. '</a>'+
  5141. '</li>'+
  5142. '<li class="highslide-move">'+
  5143. '<a title="{hs.lang.moveTitle}">'+
  5144. '<span>{hs.lang.moveTitle}</span>'+
  5145. '</a>'+
  5146. '</li>'+
  5147. '<li class="highslide-full-expand">'+
  5148. '<a title="{hs.lang.resizeTitle}">'+
  5149. '<i class="fa fa-search-plus fa-fw"></i>'+
  5150. '</a>'+
  5151. '</li>'+
  5152. '</ul><ul class="hs-controls-right">'+
  5153. '<li class="highslide-previous">'+
  5154. '<a title="{hs.lang.previousTitle}">'+
  5155. '<i class="fa fa-chevron-left fa-fw"></i>'+
  5156. '</a>'+
  5157. '</li>'+
  5158. '<li class="highslide-play">'+
  5159. '<a title="{hs.lang.playTitle}">'+
  5160. '<i class="fa fa-play-circle-o fa-fw"></i>'+
  5161. '</a>'+
  5162. '</li>'+
  5163. '<li class="highslide-pause" style="display: none;">'+
  5164. '<a title="{hs.lang.pauseTitle}">'+
  5165. '<i class="fa fa-pause fa-fw"></i>'+
  5166. '</a>'+
  5167. '</li>'+
  5168. '<li class="highslide-next">'+
  5169. '<a title="{hs.lang.nextTitle}">'+
  5170. '<i class="fa fa-chevron-right fa-fw"></i>'+
  5171. '</a>'+
  5172. '</li>'+
  5173. '</ul>'+
  5174. '</div>';
  5175. hs.Expander.prototype.onBeforeExpand = function (sender, e) {
  5176. var l = sender.a.pathname,
  5177. l = l.substring(0,l.lastIndexOf("/")),
  5178. pageLocation = l.substring(0,l.lastIndexOf("/")),
  5179. pageURL = sender.a.protocol + '//'+ sender.a.hostname + l.substring(0,l.lastIndexOf("/")),
  5180. imageURL = pageURL + '/photos/' + sender.a.id + '.jpg';
  5181. <% if M.cart.integration.enabled then %>
  5182. // create cart data
  5183. var dataItem = $("#cell-"+sender.a.id).find(".add-to-cart").attr("data-item"),
  5184. dataName = $("#cell-"+sender.a.id).find(".add-to-cart").attr("data-name"),
  5185. dataPrice = $("#cell-"+sender.a.id).find(".add-to-cart").attr("data-price"),
  5186. dataThumbnail = $("#cell-"+sender.a.id).find(".add-to-cart").attr("data-thumbnail")
  5187. ;
  5188. <% end --[[ cart ]] %>
  5189. // create conditional innerHTML constructs
  5190. <% if M.googleMaps.enable then %>
  5191. if ( sender.a.getAttribute('data-gps') != null ) {
  5192. gpsData = '<li class="highslide-maps"><a title="<%= M.googleMaps.title %>" href="' + sender.a.getAttribute('data-gps') + '"<% if mode == 'publish' then %> onclick="window.open(this.href); return false;"<% end %>><i class="fa fa-map-marker fa-fw"></i></a></li>'
  5193. } else {
  5194. gpsData = '<li class="highslide-maps"><a class="disabled" onclick="return false;"><i class="fa fa-map-marker fa-fw"></i></a></li>'
  5195. }
  5196. <% else %>
  5197. gpsData = "";
  5198. <% end --[[ googleMaps ]] %>
  5199. <% if M.cart.integration.enabled then %>
  5200. <% if mode == "publish" then %>
  5201. var cartEnabled = ("cartEnabled" in window && window.cartEnabled) && dataPrice != undefined;
  5202. <% else %>
  5203. var cartEnabled = true;
  5204. <% end %>
  5205. var cartMarkup = cartEnabled ? '<li class="hs-cart-button"><a class="add-to-cart" data-item="'+dataItem+'" data-name="'+dataName+'" data-price="'+dataPrice+'" data-thumbnail="'+dataThumbnail+'">'+
  5206. '<i class="fa fa-shopping-cart fa-fw"></i><% if M.cart.hs.label ~= '' then %> <span><%= M.cart.hs.label %></span><% end %></a></li>' : '<li class="hs-cart-button"><a class="disabled" onclick="return false;"><i class="fa fa-shopping-cart fa-fw"></i></a></li>';
  5207. <% end %>
  5208. <% if M.imageDownload.enable and publisher then %>
  5209. var downloadMarkup = sender.a.getAttribute('data-download-url') ? '<li><a href="' + sender.a.getAttribute('data-download-url') + '" title="Save Image to Desktop"><i class="fa fa-cloud-download fa-fw"></i></a></li>' : '<li><a class="disabled" onclick="return false;"><i class="fa fa-cloud-download fa-fw"></i></a></li>';
  5210. <% elseif M.imageDownload.enable then %>
  5211. var downloadEnabled = sender.a.getAttribute('data-download') == 'yes';
  5212. var downloadMarkup = downloadEnabled ? '<li><a href="' + pageURL + '/<% if mode == "publish" and M.imageDownload.method == "php" then %>download.php?file=<% else %><%= theRoot %>/<% end %><%= downloadFolder %>/' + sender.a.id + '.<%= downloadExtension %>" title="<%= M.imageDownload.title %>"><i class="fa fa-cloud-download fa-fw"></i></a></li>' : '<li><a class="disabled" onclick="return false;"><i class="fa fa-cloud-download fa-fw"></i></a></li>';
  5213. <% end %>
  5214. var infoOverlay = document.createElement('div');
  5215. infoOverlay.className = 'hs-info-overlay clearfix';
  5216. infoOverlay.innerHTML = '<ul class="hs-controls-left">'+
  5217. <% if M.colorLabels.display then %>
  5218. '<li><span class="hs-color-label ' + sender.a.getAttribute('data-colorLabelNumber') + '" title="' + sender.a.getAttribute('data-colorLabel') + '"><i class="fa fa-bookmark fa-fw"></i></span></li>'+
  5219. <% end %>
  5220. '</ul><ul class="hs-controls-right">'+
  5221. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  5222. // Facebook Share
  5223. '<li class="share-page"><a href="<% if mode == "preview" then %>#<% else %>https://www.facebook.com/sharer/sharer.php?u=' + pageURL + '/' + sender.a.id + '-single.php" target="_blank<% end %>"><i class="fa fa-facebook fa-fw"></i></a></li>'+
  5224. // LinkedIn
  5225. '<li class="share-page"><a href="<% if mode == "preview" then %>#<% else %>http://www.linkedin.com/shareArticle?mini=true&url=' + pageURL + '/' + sender.a.id + '-single.php" target="_blank<% end %>"><i class="fa fa-fw fa-linkedin"></i></a></li>'+
  5226. // Tweet
  5227. '<li class="share-page"><a href="<% if mode == "preview" then %>#<% else %>http://twitter.com/intent/tweet?url=' + pageURL + '/' + sender.a.id + '-single.php<% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %>" target="_blank<% end %>"><i class="fa fa-twitter fa-fw"></i></a></li>'+
  5228. // Google+
  5229. '<li class="share-page"><a href="<% if mode == "preview" then %>#<% else %>https://plus.google.com/share?url=' + pageURL + '/' + sender.a.id + '-single.php" target="_blank<% end %>"><i class="fa fa-fw fa-google-plus"></i></a></li>'+
  5230. // Pinterest
  5231. '<li class="share-page"><a href="<% if mode == "preview" then %>#<% else %>http://pinterest.com/pin/create/bookmarklet/?media=' + imageURL + '&url=' + pageURL + '/' + sender.a.id + '-single.php&is_video=false&description=' + (sender.heading != undefined && sender.heading.textContent != undefined ? sender.heading.textContent : '') + (sender.heading != undefined && sender.heading.textContent != undefined && sender.caption != undefined && sender.caption.textContent != undefined ? ' / ' : '') + (sender.caption != undefined && sender.caption.textContent != undefined ? sender.caption.textContent : '') + '" target="_blank<% end %>"><i class="fa fa-fw fa-pinterest"></i></a></li>'+
  5232. // Email
  5233. '<li><a href="<% if mode == "preview" then %>#<% else %>mailto:?Subject=' + (sender.heading != undefined && sender.heading.textContent != undefined ? sender.heading.textContent : '') + '&Body=' + (sender.caption != undefined && sender.caption.textContent != undefined ? sender.caption.textContent + '%0D%0A' : '') + pageURL + '/' + sender.a.id + '-single.php" target="_blank<% end %>"><i class="fa fa-fw fa-envelope"></i></a></li>'+
  5234. <% if M.permalinks.on or M.imageDownload.enable or M.cart.integration.enabled or M.fotomoto.integration.enabled then %>
  5235. '<li><span class="divider">|</span></li>'+
  5236. <% end %>
  5237. <% end --[[ lightbox.socialmedia.sharing ]] %>
  5238. gpsData +
  5239. <% if M.permalinks.on then %>
  5240. '<li><a href="' + pageURL + '/' + sender.a.id + '-single.<% if (M.is.php and mode == 'publish') or publisher then %>php<% else %>html<% end %>" title="<%= M.permalinks.title %>"><i class="fa fa-link fa-fw"></i></a></li>'+
  5241. <% end %>
  5242. <% if M.imageDownload.enable then %>
  5243. downloadMarkup +
  5244. <% end %>
  5245. <% if M.cart.integration.enabled then %>
  5246. cartMarkup +
  5247. <% end --[[ cart ]] %>
  5248. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  5249. // create fotomoto button
  5250. '<li class="hs-cart-button"><a class="add-to-cart" onclick="showPrint(\'#' + sender.a.id + ' img\');">'+
  5251. '<i class="fa fa-shopping-cart fa-fw"></i><% if M.cart.hs.label ~= '' then %> <span><%= M.cart.hs.label %></span><% end %></a></li>'+
  5252. <% end --[[ fotomoto ]] %>
  5253. '</ul>'; // div.innerHTML
  5254. // attatch it to this hs.Expander instance and add some options
  5255. sender.createOverlay({overlayId:infoOverlay,position:'bottom left',relativeTo:'viewport',hideOnMouseOut:false,offsetX:0,offsetY:0,width:'100%'});
  5256. <% if M.slideshowTracking.enable then %>
  5257. // Scroll gallery on slideshow close
  5258. jQuery('.tracked-item').removeClass('tracked-item');
  5259. <% end --[[ slideshowTracking ]] %>
  5260. <% if M.cart.integration.enabled then %>
  5261. var cart_button = $('div.hs-info-overlay a.add-to-cart');
  5262. if (cart_button != undefined) {
  5263. $(cart_button).attr('data-item', dataItem);
  5264. $(cart_button).attr('data-name', dataName);
  5265. $(cart_button).attr('data-price', dataPrice);
  5266. $(cart_button).attr('data-thumbnail', dataThumbnail);
  5267. if ("ttgCart" in window) {
  5268. ttgCart.applyCartButtonEvents($('div.hs-info-overlay a.add-to-cart'), closeImage);
  5269. }
  5270. }
  5271. <% end --[[ cart ]] %>
  5272. } // onBeforeExpand
  5273. // Highslide fixed popup mod. Requires the "Events" component.
  5274. if (!hs.ie || hs.uaVersion > 6) hs.extend ( hs.Expander.prototype, {
  5275. fix: function(on) {
  5276. var sign = on ? -1 : 1,
  5277. stl = this.wrapper.style;
  5278. if (!on) hs.getPageSize(); // recalculate scroll positions
  5279. hs.setStyles (this.wrapper, {
  5280. position: on ? 'fixed' : 'absolute',
  5281. zoom: 1, // IE7 hasLayout bug,
  5282. left: (parseInt(stl.left) + sign * hs.page.scrollLeft) +'px',
  5283. top: (parseInt(stl.top) + sign * hs.page.scrollTop) +'px'
  5284. });
  5285. if (this.outline) {
  5286. stl = this.outline.table.style;
  5287. hs.setStyles (this.outline.table, {
  5288. position: on ? 'fixed' : 'absolute',
  5289. zoom: 1, // IE7 hasLayout bug,
  5290. left: (parseInt(stl.left) + sign * hs.page.scrollLeft) +'px',
  5291. top: (parseInt(stl.top) + sign * hs.page.scrollTop) +'px'
  5292. });
  5293. }
  5294. this.fixed = on; // flag for use on dragging
  5295. },
  5296. onAfterExpand: function() {
  5297. this.fix(true); // fix the popup to viewport coordinates
  5298. hs.Expander.prototype.onDrag = function() {
  5299. return false;
  5300. }
  5301. }, // onAfterExpand
  5302. onDoFullExpand: function() {
  5303. this.fix(false); // unfix when expanded
  5304. hs.Expander.prototype.onDrag = function() {
  5305. return true;
  5306. }
  5307. }, // onDoFullExpand
  5308. onBeforeClose: function() {
  5309. this.fix(false); // unfix to get the animation right
  5310. <% if M.slideshowTracking.enable then %>
  5311. var target = '#cell-' + hs.getExpander().a.id,
  5312. destination = $(target).offset().top;
  5313. jQuery("html,body").animate({ scrollTop: destination - 72}, 800 );
  5314. jQuery(target).addClass('tracked-item');
  5315. <% end --[[ slideshowTracking ]] %>
  5316. }, // onBeforeClose
  5317. });
  5318. //Disable Spacebar
  5319. //hs.onKeyDown = function(sender, e) { if (e.keyCode == 32) return false; };
  5320. function closeImage(){
  5321. return hs.close()
  5322. };
  5323. if (/(Android|BlackBerry|iPhone|iPad|iPod|Palm|Symbian)/.test(navigator.userAgent)) {
  5324. hs.addEventListener(document, 'ready', function() {
  5325. // Create custom previous and next overlays
  5326. hs.registerOverlay({
  5327. position:'middle left',
  5328. relativeTo:'expander',
  5329. hideOnMouseOut:false,
  5330. offsetX: 0,
  5331. offsetY:-3,
  5332. width:'102px',
  5333. html: '<p class="hs-mobile-nav" onclick="hs.previous()" title="'+ hs.lang.previousTitle +'"><i class="fa fa-angle-left"></i></p>'
  5334. });
  5335. hs.registerOverlay({
  5336. position:'middle right',
  5337. relativeTo:'expander',
  5338. hideOnMouseOut:false,
  5339. offsetX: 0,
  5340. offsetY:-3,
  5341. width:'102px',
  5342. html: '<p class="hs-mobile-nav" style="text-align: right" onclick="hs.next()" title="'+ hs.lang.nextTitle +'"><i class="fa fa-angle-right"></i></p>'
  5343. });
  5344. // Add CSS rules
  5345. var stylesheet = document.getElementsByTagName('style')[0];
  5346. stylesheet.appendChild(document.createTextNode(
  5347. '.highslide-image {'+
  5348. ' border: none; '+
  5349. '}'+
  5350. 'p.hs-mobile-nav {'+
  5351. ' color: #fff;'+
  5352. ' cursor: pointer;'+
  5353. ' font-size: 64px;'+
  5354. ' height: 110px;'+
  5355. ' line-height: 110px;'+
  5356. ' margin: 0;'+
  5357. ' padding: 0 8px;'+
  5358. ' opacity: 0.65;'+
  5359. ' -moz-text-shadow: 0 1px 2px rgba( 0, 0, 0, 0.5 );'+
  5360. ' -webkit-text-shadow: 0 1px 2px rgba( 0, 0, 0, 0.5 );'+
  5361. ' text-shadow: 0 1px 2px rgba( 0, 0, 0, 0.5 );'+
  5362. '}'+
  5363. '.highslide-full-expand {'+
  5364. ' display: none !important;'+
  5365. '}'+
  5366. '.highslide-caption, .highslide-controls, .highslide-heading p {'+
  5367. ' display: none !important;'+
  5368. '}'+
  5369. '.highslide-caption, .highslide-controls, .highslide-heading p {'+
  5370. ' display: none !important;'+
  5371. '}'+
  5372. '.highslide-heading {'+
  5373. ' padding: 0 !important;'+
  5374. '}'
  5375. ));
  5376. // add some options that make sense on a small touchscreen
  5377. hs.expandDuration = 0; // animation is too slow anyway
  5378. hs.restoreDuration = 0;
  5379. hs.transitionDuration = 0;
  5380. hs.marginTop = 8;
  5381. hs.marginBottom = 8;
  5382. hs.marginLeft = 0;
  5383. hs.marginRight = 0;
  5384. hs.captionOverlay.fade = false;
  5385. hs.allowHeightReduction = false;
  5386. // Remove any slideshows with too small controls
  5387. // hs.slideshows = [];
  5388. // override onBeforeExpand above
  5389. hs.Expander.prototype.onBeforeExpand = function (sender, e) {
  5390. <% if M.slideshowTracking.enable then %>
  5391. // Scroll gallery on slideshow close
  5392. jQuery('.tracked-item').removeClass('tracked-item');
  5393. <% end --[[ slideshowTracking ]] %>
  5394. } // onBeforeExpand
  5395. });
  5396. }//if mobile
  5397. //]]>
  5398. </script>
  5399. <% end --[[ hs_slideshow ]] %>
  5400. <% if (not mobile and not single and model.grid.presentation.desktop == "magnific") or (mobile and model.grid.presentation.mobile == "magnific") or cart then %>
  5401. <script src="<%= sharedResources %>/js/magnific.js"></script>
  5402. <script>
  5403. $(document).ready(function() {
  5404. <% if M.magnific.loop == 'jump' and mode == 'publish' and publisher and not mobile then %>
  5405. var previousPage = "<?php echo $album->getPreviousPage('index');?>";
  5406. var nextPage = "<?php echo $album->getNextPage('index');?>";
  5407. <% elseif M.magnific.loop == 'jump' and mode == 'publish' and publisher and mobile then %>
  5408. var previousPage = "<?php echo $album->getPreviousPage('mobile');?>";
  5409. var nextPage = "<?php echo $album->getNextPage('mobile');?>";
  5410. <% end %>
  5411. var mfp = jQuery.magnificPopup.instance,
  5412. proto = jQuery.magnificPopup.proto,
  5413. magnificLoop = "<% if cart then %>loop<% else %><%= M.magnific.loop %><% end %>",
  5414. slideshowTracking = <% if cart then %>false<% else %><%= M.slideshowTracking.enable %><% end %>,
  5415. currentImage;
  5416. <% if M.googleMaps.enable then %>
  5417. function updateMapMarker(currentImage){
  5418. if ($("#" + currentImage).attr("data-gps") == undefined) {
  5419. $('li.mfp-maps a').css({ opacity: 0.25 });
  5420. } else {
  5421. $('li.mfp-maps a').css({ opacity: 1 });
  5422. }
  5423. }
  5424. <% end --[[ googleMaps ]] %>
  5425. <% if M.imageDownload.enable and publisher then %>
  5426. function updateDownloadButton(currentImage){
  5427. if ($("#" + currentImage).attr("data-download-url")) {
  5428. $('li.mfp-download a').css({ opacity: 1 });
  5429. } else {
  5430. $('li.mfp-download a').css({ opacity: 0.25 });
  5431. }
  5432. }
  5433. <% elseif M.imageDownload.enable then %>
  5434. function updateDownloadButton(currentImage){
  5435. if ($("#" + currentImage).attr("data-download") != 'yes') {
  5436. $('li.mfp-download a').css({ opacity: 0.25 });
  5437. } else {
  5438. $('li.mfp-download a').css({ opacity: 1 });
  5439. }
  5440. }
  5441. <% end --[[ downloads ]] %>
  5442. <% if M.cart.integration.enabled and not cart then %>
  5443. function setupCart(currentImage){
  5444. var addToCartButton = $("#cell-"+currentImage).find(".add-to-cart");
  5445. if (addToCartButton != undefined && addToCartButton.length) {
  5446. var cart_button = $('li.mfp-shopping-cart a.add-to-cart');
  5447. if (cart_button != undefined && $(cart_button).length) {
  5448. $(cart_button).attr('data-item', $(addToCartButton).attr("data-item"));
  5449. $(cart_button).attr('data-name', $(addToCartButton).attr("data-name"));
  5450. $(cart_button).attr('data-price', $(addToCartButton).attr("data-price"));
  5451. $(cart_button).attr('data-thumbnail', $(addToCartButton).attr("data-thumbnail"));
  5452. $('li.mfp-shopping-cart a.add-to-cart').show();
  5453. if ("ttgCart" in window) {
  5454. $(cart_button).off('click');
  5455. ttgCart.applyCartButtonEvents($(cart_button), function() { mfp.close(); });
  5456. $('li.mfp-shopping-cart a').css({ opacity: 1 });
  5457. }
  5458. }
  5459. } else {
  5460. $('li.mfp-shopping-cart a.add-to-cart').off('click');
  5461. $('li.mfp-shopping-cart a').css({ opacity: 0.25 });
  5462. }
  5463. }
  5464. <% end --[[ cart ]] %>
  5465. // setup gallery UI for each image
  5466. function delegateUI(){
  5467. var currentTitle = $("#" + currentImage + " img").attr("title"),
  5468. currentTitle = (currentTitle != undefined && currentTitle.length != 0 ? currentTitle : ""),
  5469. currentCaption = $("#" + currentImage + " img").attr("alt"),
  5470. currentCaption = (currentCaption != undefined && currentCaption.length != 0 ? currentCaption : ""),
  5471. slash = (currentTitle != undefined && currentTitle.length != 0 && currentCaption != undefined && currentCaption.length != 0 ? " / " : ""),
  5472. currentDesc = currentTitle + slash + currentCaption;
  5473. var albumURL = $("#" + currentImage).attr("data-album-url");
  5474. if (albumURL == undefined) {
  5475. <% if M.is.php then %>
  5476. albumURL = "<?php echo CURRENTPAGELOCATION.'/'; ?>";
  5477. <% else %>
  5478. albumURL = "./";
  5479. <% end %>
  5480. }
  5481. <% if not cart then %>
  5482. $(".mfp-chrome")
  5483. <% if M.permalinks.on then %>
  5484. .delegate(".mfp-permalink a","click", function(e){
  5485. e.preventDefault();
  5486. window.location.href= albumURL + currentImage + "-single.<% if (mode == 'publish' and M.is.php) or publisher then %>php<% else %>html<% end %><% if mobile then %>?mobile=true<% end %>";
  5487. })
  5488. <% end %>
  5489. <% if M.googleMaps.enable then %>
  5490. .delegate(".mfp-maps a","click", function(e){
  5491. e.preventDefault();
  5492. <% if mode == 'preview' then %>
  5493. alert("Map : " + $("#" + currentImage).attr("data-gps"));
  5494. <% else %>
  5495. if ($("#" + currentImage).attr("data-gps") != undefined) {
  5496. window.open($("#" + currentImage).attr("data-gps"));
  5497. }
  5498. <% end %>
  5499. })
  5500. <% end --[[ googleMaps.enable ]] %>
  5501. <% if M.imageDownload.enable and publisher then %>
  5502. .delegate(".mfp-download a","click", function(e){
  5503. e.preventDefault();
  5504. <% if not mobile then %>
  5505. if ($("#" + currentImage).attr("data-download-url")) {
  5506. window.location.href = $("#" + currentImage).attr("data-download-url");
  5507. }
  5508. <% else %>
  5509. if ($("#" + currentImage).attr("data-download-url")) {
  5510. window.open($("#" + currentImage).attr("data-download-url"));
  5511. }
  5512. <% end %>
  5513. })
  5514. <% elseif M.imageDownload.enable then %>
  5515. .delegate(".mfp-download a","click", function(e){
  5516. e.preventDefault();
  5517. <% if mode == 'preview' then %>
  5518. alert("Download : " + currentImage);
  5519. <% else %>
  5520. <% if M.imageDownload.method == "php" and not mobile then %>
  5521. if ($("#" + currentImage).attr("data-download") != 'no') {
  5522. window.location.href = albumURL + "download.php?file=<%= downloadFolder %>/" + currentImage + ".<%= downloadExtension %>";
  5523. }
  5524. <% else %>
  5525. if ($("#" + currentImage).attr("data-download") != 'no') {
  5526. window.open(albumURL + "<%= downloadFolder %>/" + currentImage + ".<%= downloadExtension %>");
  5527. }
  5528. <% end %>
  5529. <% end %>
  5530. })
  5531. <% end --[[ imageDownload.enable ]] %>
  5532. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  5533. .delegate(".mfp-share-menu a","click", function(e){
  5534. e.preventDefault();
  5535. $(".mfp-ui").toggleClass("mfp-share-on mfp-share-off");
  5536. })
  5537. .delegate(".mfp-facebook a","click", function(e){
  5538. e.preventDefault();
  5539. <% if mode == 'preview' then %>
  5540. alert("Share Image to Facebook.");
  5541. <% else %>
  5542. window.open("https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(albumURL + currentImage + "-single.php"), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  5543. <% end %>
  5544. })
  5545. .delegate(".mfp-linkedin a","click", function(e){
  5546. e.preventDefault();
  5547. <% if mode == 'preview' then %>
  5548. alert("Share Image to LinkedIn.");
  5549. <% else %>
  5550. window.open("http://www.linkedin.com/shareArticle?mini=true&url=" + encodeURIComponent(albumURL + currentImage + "-single.php"), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  5551. <% end %>
  5552. })
  5553. .delegate(".mfp-twitter a","click", function(e){
  5554. e.preventDefault();
  5555. <% if mode == 'preview' then %>
  5556. alert("Share Image to Twitter.");
  5557. <% else %>
  5558. window.open("http://twitter.com/intent/tweet?url=" + encodeURIComponent(albumURL + currentImage + "-single.php") + "<% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %>", "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  5559. <% end %>
  5560. })
  5561. .delegate(".mfp-google-plus a","click", function(e){
  5562. e.preventDefault();
  5563. <% if mode == 'preview' then %>
  5564. alert("Share Image to Google Plus.");
  5565. <% else %>
  5566. window.open("https://plus.google.com/share?url=" + encodeURIComponent(albumURL + currentImage + "-single.php"), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  5567. <% end %>
  5568. })
  5569. .delegate(".mfp-pinterest a","click", function(e){
  5570. e.preventDefault();
  5571. <% if mode == 'preview' then %>
  5572. alert("Share Image to Pinterest.");
  5573. <% else %>
  5574. window.open("http://pinterest.com/pin/create/bookmarklet/?media=" + encodeURIComponent(albumURL + "photos/" + currentImage + ".jpg") + "&url=" + encodeURIComponent(albumURL + currentImage + "-single.php") + "&is_video=false&description=" + encodeURIComponent(currentDesc), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  5575. <% end %>
  5576. })
  5577. .delegate(".mfp-email a","click", function(e){
  5578. e.preventDefault();
  5579. <% if mode == 'preview' then %>
  5580. alert("Share Image via Email.");
  5581. <% elseif mobile then %>
  5582. window.location.href="mailto:?Subject=" + encodeURIComponent(currentTitle) + "&Body=" + encodeURIComponent(currentCaption) + "%0D%0A" + encodeURIComponent(albumURL + currentImage + "-single.php");
  5583. <% else %>
  5584. window.open("mailto:?Subject=" + encodeURIComponent(currentTitle) + "&Body=" + encodeURIComponent(currentCaption) + "%0D%0A" + encodeURIComponent(albumURL + currentImage + "-single.php"));
  5585. <% end %>
  5586. })
  5587. <% end --[[ socialmedia ]] %>
  5588. <% if M.cart.integration.enabled and mode == 'preview' then %>
  5589. .delegate(".mfp-shopping-cart a","click", function(e){
  5590. alert("Add-to-Cart: " + currentImage);
  5591. })
  5592. <% end --[[ cart ]] %>
  5593. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  5594. .delegate(".mfp-shopping-cart","click", function(e){
  5595. <% if mode == 'preview' then %>
  5596. alert("Fotomoto: " + currentImage);
  5597. <% else %>
  5598. showPrint("#" + currentImage + " img");
  5599. <% end %>
  5600. })
  5601. <% end --[[ fotomoto ]] %>
  5602. ;//delegate
  5603. <% end --[[ not cart ]] %>
  5604. }
  5605. $('.image-link').magnificPopup({
  5606. type: 'image',
  5607. fixedContentPos:true,
  5608. tLoading: '<i class="fa fa-spinner fa-spin fa-fw"></i>',
  5609. gallery: {
  5610. enabled: true,
  5611. navigateByImgClick: false,
  5612. arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
  5613. tPrev: 'Previous (Left arrow key)', // title for left button
  5614. tNext: 'Next (Right arrow key)', // title for right button
  5615. tCounter: '%curr% / %total%', // markup of counter
  5616. preload: [0,1], // Will preload 0 - before current, and 1 after the current image
  5617. },
  5618. image: {
  5619. markup: '<div class="mfp-figure">'+
  5620. '<div class="mfp-chrome mfp-ui mfp-share-off">'+
  5621. '<ul>'+
  5622. '<li><button class="img-close"><i class="fa fa-fw fa-times"></i></button></li>'+
  5623. <% if not cart then %>
  5624. <% if M.permalinks.on then %>
  5625. '<li class="mfp-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>'+
  5626. <% else %>
  5627. '<li></li>'+
  5628. <% end %>
  5629. <% if M.googleMaps.enable then %>
  5630. '<li class="mfp-maps"><a><i class="fa fa-fw fa-map-marker"></i></a></li>'+
  5631. <% else %>
  5632. '<li></li>'+
  5633. <% end %>
  5634. <% if M.imageDownload.enable then %>
  5635. '<li class="mfp-download"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>'+
  5636. <% else %>
  5637. '<li></li>'+
  5638. <% end %>
  5639. <% if M.cart.integration.enabled then %>
  5640. <% if mode == 'publish' and publisher then %><% write("<?php if ($album->cartEnabled()) { ".."?"..">")%><% end %>
  5641. '<li class="mfp-shopping-cart"><a class="add-to-cart"><i class="fa fa-fw fa-shopping-cart"></i></a></li>'+
  5642. <% if mode == 'publish' and publisher then %><% write("<?php } ".."?"..">")%><% end %>
  5643. <% elseif M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  5644. '<li class="mfp-shopping-cart"><a class="add-to-cart"><i class="fa fa-fw fa-shopping-cart"></i></a></li>'+
  5645. <% else %>
  5646. '<li></li>'+
  5647. <% end %>
  5648. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  5649. '<li class="mfp-share-menu"><a><i class="fa fa-fw fa-share-square-o"></i></a></li>'+
  5650. '<li class="mfp-share mfp-facebook"><a><i class="fa fa-fw fa-facebook"></i></a></li>'+
  5651. '<li class="mfp-share mfp-linkedin"><a><i class="fa fa-fw fa-linkedin"></i></a></li>'+
  5652. '<li class="mfp-share mfp-twitter"><a><i class="fa fa-fw fa-twitter"></i></a></li>'+
  5653. '<li class="mfp-share mfp-google-plus"><a><i class="fa fa-fw fa-google-plus"></i></a></li>'+
  5654. '<li class="mfp-share mfp-pinterest"><a><i class="fa fa-fw fa-pinterest"></i></a></li>'+
  5655. '<li class="mfp-share mfp-email"><a><i class="fa fa-fw fa-envelope"></i></a></li>'+
  5656. <% end --[[ not cart ]] %>
  5657. <% end --[[ socialmedia ]] %>
  5658. '</ul>'+
  5659. '</div>'+
  5660. '<div class="mfp-img"></div>'+
  5661. '<div class="mfp-chrome mfp-bottom-bar">'+
  5662. '<div class="mfp-title"></div>'+
  5663. <% if M.magnific.counter then %>
  5664. '<div class="mfp-counter"></div>'+
  5665. <% end %>
  5666. '</div>'+
  5667. '</div>',
  5668. tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
  5669. titleSrc: function(item) {
  5670. var colorLabelIcon = '',
  5671. <% if M.colorLabels.display then %>
  5672. colorLabelNumber = item.el.find('img').closest('a').attr('data-colorLabelNumber'),
  5673. colorLabel = item.el.find('img').closest('a').attr('data-colorLabel'),
  5674. colorLabelIcon = '<span class="color-label ' + colorLabelNumber + '" title="' + colorLabel + '"><i class="fa fa-fw fa-bookmark"></i></span>',
  5675. <% end %>
  5676. itemTitle = '<% if M.highslide.display.headings then %><span class="image-title">' + item.el.find('img').attr('title') + '</span><br /><% end %>',
  5677. itemCaption = '<% if M.highslide.display.captions then %><span class="image-caption">' + item.el.find('img').attr('alt') + '</span><% end %>';
  5678. if (item.el.find('img').attr('title').length > 0 && item.el.find('img').attr('alt').length > 0){
  5679. return colorLabelIcon + itemTitle + itemCaption;
  5680. } else if (item.el.find('img').attr('title').length > 0 && item.el.find('img').attr('alt').length == 0){
  5681. return colorLabelIcon + itemTitle;
  5682. } else if (item.el.find('img').attr('title').length == 0 && item.el.find('img').attr('alt').length > 0){
  5683. return colorLabelIcon + itemCaption;
  5684. } else if (item.el.find('img').attr('title').length == 0 && item.el.find('img').attr('alt').length == 0){
  5685. return colorLabelIcon + itemCaption;
  5686. }
  5687. }
  5688. },
  5689. callbacks: {
  5690. open: function(){
  5691. delegateUI(); // setup UI functions
  5692. <% if M.cart.integration.enabled and not cart then %>
  5693. setupCart(currentImage);
  5694. <% end %>
  5695. jQuery(".mfp-figure").off("click").on("click", ".mfp-img, .mfp-bottom-bar", function() {
  5696. $(".mfp-chrome").toggle();
  5697. $(".mfp-share-on").toggleClass("mfp-share-on mfp-share-off");
  5698. return false;
  5699. });
  5700. jQuery('.img-close').off("click").on("click", function() {
  5701. mfp.close();
  5702. $(".mfp-share-on").toggleClass("mfp-share-on mfp-share-off");
  5703. return false;
  5704. });
  5705. <% if M.googleMaps.enable then %>
  5706. updateMapMarker(currentImage);
  5707. <% end %>
  5708. <% if M.imageDownload.enable then %>
  5709. updateDownloadButton(currentImage);
  5710. <% end %>
  5711. if(slideshowTracking){
  5712. // Scroll gallery on slideshow close
  5713. jQuery('.tracked-item').removeClass('tracked-item');
  5714. }//slideshowTracking
  5715. if(magnificLoop == "close" || magnificLoop == "jump"){
  5716. // extend function that moves to next item
  5717. mfp.next = function() {
  5718. // if index is not last, call parent method
  5719. if(mfp.index < mfp.items.length - 1) {
  5720. proto.next.call(mfp);
  5721. } else {
  5722. <% if M.magnific.loop == 'close' then %>mfp.close();$(".mfp-share-on").toggleClass("mfp-share-on mfp-share-off");<% elseif M.magnific.loop == 'jump' and numGridPages > 1 and not publisher then %>window.location = '<lr:Pagination><lr:NextEnabled>$link</lr:NextEnabled><lr:NextDisabled>index.<% if (mode == 'publish' and M.is.php) or publisher then %>php<% else %>html<% end %></lr:NextDisabled></lr:Pagination>';<% elseif M.magnific.loop == 'jump' and publisher and not mobile then %>window.location = ("nextPage" in window) ? nextPage : 'index.php';<% elseif M.magnific.loop == 'jump' and publisher and mobile then %>window.location = ("nextPage" in window) ? nextPage : 'mobile.php';<% else %>mfp.close();$(".mfp-share-on").toggleClass("mfp-share-on mfp-share-off");<% end %>
  5723. }
  5724. };
  5725. // same with prev method
  5726. mfp.prev = function() {
  5727. if(mfp.index > 0) {
  5728. proto.prev.call(mfp);
  5729. } else {
  5730. <% if M.magnific.loop == 'close' then %>mfp.close();$(".mfp-share-on").toggleClass("mfp-share-on mfp-share-off");<% elseif M.magnific.loop == 'jump' and numGridPages > 1 and not publisher then %>window.location = '<lr:Pagination><lr:PreviousEnabled>$link</lr:PreviousEnabled><lr:PreviousDisabled><%= filenameOfGridPage( numGridPages ) %></lr:PreviousDisabled></lr:Pagination>';<% elseif M.magnific.loop == 'jump' and publisher and not mobile then %>window.location = ("previousPage" in window) ? previousPage : 'index.php';<% elseif M.magnific.loop == 'jump' and publisher and mobile then %>window.location = ("previousPage" in window) ? previousPage : 'mobile.php';<% else %>mfp.close();$(".mfp-share-on").toggleClass("mfp-share-on mfp-share-off");<% end %>
  5731. }
  5732. };
  5733. } else if(magnificLoop == "stop"){
  5734. // hide image nav when first/last
  5735. if(mfp.index >= mfp.items.length - 1) {
  5736. $(".mfp-container").addClass("mfp-last");
  5737. } else {;
  5738. $(".mfp-last").removeClass("mfp-last");
  5739. }
  5740. if(mfp.index == 0) {
  5741. $(".mfp-container").addClass("mfp-first");
  5742. } else {;
  5743. $(".mfp-first").removeClass("mfp-first");
  5744. }
  5745. }//magnificLoop
  5746. }, //open
  5747. change: function(item){
  5748. currentImage = item.el.context.id;
  5749. delegateUI(); // setup UI functions
  5750. if(magnificLoop == "stop"){
  5751. // hide image nav when first/last
  5752. if(mfp.index >= mfp.items.length - 1) {
  5753. $(".mfp-container").addClass("mfp-last");
  5754. } else {;
  5755. $(".mfp-last").removeClass("mfp-last");
  5756. }
  5757. if(mfp.index == 0) {
  5758. $(".mfp-container").addClass("mfp-first");
  5759. } else {;
  5760. $(".mfp-first").removeClass("mfp-first");
  5761. }
  5762. }//magnificLoop
  5763. }, //change
  5764. <% if M.googleMaps.enable or M.cart.integration.enabled then %>
  5765. afterChange: function(item){
  5766. <% if M.googleMaps.enable then %>
  5767. updateMapMarker(currentImage);
  5768. <% end %>
  5769. <% if M.cart.integration.enabled and not cart then %>
  5770. setupCart(currentImage);
  5771. <% end %>
  5772. }, //afterChange
  5773. <% end %>
  5774. close: function(item){
  5775. if(slideshowTracking){
  5776. var currentImageClosing = currentImage,
  5777. target = "#cell-" + currentImageClosing,
  5778. destination = $(target).offset().top;
  5779. jQuery("html,body").animate({ scrollTop: destination - 72}, 800 );
  5780. jQuery(target).addClass('tracked-item');
  5781. }//slideshowTracking
  5782. }, //close
  5783. } //callbacks
  5784. });
  5785. });
  5786. </script>
  5787. <% end --[[ magnific ]] %>
  5788. <% if (not mobile and not single and model.grid.presentation.desktop == "photoswipe") or
  5789. (mobile and model.grid.presentation.mobile == "photoswipe") then %>
  5790. <link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/photoswipe/photoswipe.css">
  5791. <!-- link rel="stylesheet" type="text/css" media="screen" href="<%= sharedResources %>/photoswipe/default-skin/default-skin.css" -->
  5792. <script src="<%= sharedResources %>/photoswipe/photoswipe.min.js"></script>
  5793. <script src="<%= sharedResources %>/photoswipe/photoswipe-ui-default.min.js"></script>
  5794. <script>
  5795. var galleryElement = $('.the-gallery'),
  5796. items,
  5797. // Get Photoswipe construct
  5798. pswpElement = $('.pswp')[0]
  5799. ;
  5800. var parseThumbs = function(el){
  5801. var thumbElements = galleryElement.find('a.image-link'),
  5802. numNodes = thumbElements.length,
  5803. el,
  5804. size,
  5805. item,
  5806. items = []
  5807. ;
  5808. // Build items array
  5809. for(var i = 0; i < numNodes; i++) {
  5810. el = thumbElements[i];
  5811. // include only element nodes
  5812. if(el.nodeType !== 1) {
  5813. continue;
  5814. }
  5815. size = el.getAttribute('data-size').split('x');
  5816. // create slide object
  5817. item = {
  5818. id: el.getAttribute('id'),
  5819. src: el.getAttribute('href'),
  5820. w: parseInt(size[0], 10),
  5821. h: parseInt(size[1], 10)
  5822. };
  5823. items.push(item);
  5824. };
  5825. return items;
  5826. };
  5827. $('a.image-link').on('click', function(e){
  5828. e.preventDefault();
  5829. var target = $(e.target).closest('a'),
  5830. thumbElements = galleryElement.find('a.image-link'),
  5831. numNodes = thumbElements.length,
  5832. nodeIndex = 0,
  5833. index
  5834. ;
  5835. for (var i = 0; i < numNodes; i++) {
  5836. if(thumbElements[i].nodeType !== 1) {
  5837. continue;
  5838. }
  5839. if(thumbElements[i].id === target.attr('id')) {
  5840. index = nodeIndex;
  5841. break;
  5842. }
  5843. nodeIndex++;
  5844. }
  5845. if(index >= 0) {
  5846. openPS(index);
  5847. }
  5848. return false;
  5849. });
  5850. var openPS = function(index){
  5851. if(!items) { // build slides array, only once
  5852. items = parseThumbs(galleryElement);
  5853. }
  5854. var options = {
  5855. index: index
  5856. };
  5857. // Initializes and opens PhotoSwipe
  5858. var gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options );
  5859. gallery.init();
  5860. };
  5861. </script>
  5862. <% end --[[ photoswipe ]] %>
  5863. <% if (not mobile and not single and not cart and model.grid.presentation.desktop == "touch") or (mobile and model.grid.presentation.mobile == "touch") then %>
  5864. <script src="<%= sharedResources %>/touchnswipe/jquery.hammer.min.js"></script>
  5865. <script src="<%= sharedResources %>/touchnswipe/jquery.mousewheel.min.js"></script>
  5866. <script src="<%= sharedResources %>/touchnswipe/TweenMax.min.js"></script>
  5867. <script src="<%= sharedResources %>/touchnswipe/ScrollToPlugin.min.js"></script>
  5868. <script src="<%= sharedResources %>/touchnswipe/TouchNSwipe.min.js"></script>
  5869. <script>
  5870. <%
  5871. local hyperlinkKludge = true
  5872. if hyperlinkKludge then %>
  5873. jQuery("html").delegate("body.deadPage a","click",function(e){
  5874. e.preventDefault();
  5875. });
  5876. <% end --[[ hyperlinkKludge ]] %>
  5877. $(function(){
  5878. var tns = TouchNSwipe.get("thumbnail-gallery"), //id of the slider
  5879. imageSlider = TouchNSwipe.getSlider("thumbnail-gallery");
  5880. <% if publisher and M.googleMaps.enable and M.imageDownload.enable then %>
  5881. imageSlider.on(ImageSlider.INDEX_CHANGE, updateButtonAvailability);
  5882. function updateButtonAvailability(){
  5883. var dataGPS = $("#" + getCurrentId()).attr("data-gps");
  5884. if(dataGPS != undefined){
  5885. $("li.touch-maps a").css({ opacity: 1 });
  5886. } else {
  5887. $("li.touch-maps a").css({ opacity: 0.25 });
  5888. }
  5889. var dataPhotosForDownload = $("#" + getCurrentId()).attr("data-download-url");
  5890. if(dataPhotosForDownload){
  5891. $("li.touch-download a").css({ opacity: 1});
  5892. } else {
  5893. $("li.touch-download a").css({ opacity: 0.25});
  5894. }
  5895. }
  5896. <% elseif publisher and M.googleMaps.enable and not M.imageDownload.enable then %>
  5897. imageSlider.on(ImageSlider.INDEX_CHANGE, updateButtonAvailability);
  5898. function updateButtonAvailability(){
  5899. var dataGPS = $("#" + getCurrentId()).attr("data-gps");
  5900. if(dataGPS != undefined){
  5901. $("li.touch-maps a").css({ opacity: 1 });
  5902. } else {
  5903. $("li.touch-maps a").css({ opacity: 0.25 });
  5904. }
  5905. }
  5906. <% elseif publisher and not M.googleMaps.enable and M.imageDownload.enable then %>
  5907. imageSlider.on(ImageSlider.INDEX_CHANGE, updateButtonAvailability);
  5908. function updateButtonAvailability(){
  5909. var dataPhotosForDownload = $("#" + getCurrentId()).attr("data-download-url");
  5910. if(dataPhotosForDownload){
  5911. $("li.touch-download a").css({ opacity: 1});
  5912. } else {
  5913. $("li.touch-download a").css({ opacity: 0.25});
  5914. }
  5915. }
  5916. <% elseif M.googleMaps.enable and M.imageDownload.enable then %>
  5917. imageSlider.on(ImageSlider.INDEX_CHANGE, updateButtonAvailability);
  5918. function updateButtonAvailability(){
  5919. var dataGPS = $("#" + getCurrentId()).attr("data-gps");
  5920. if(dataGPS != undefined){
  5921. $("li.touch-maps a").css({ opacity: 1 });
  5922. } else {
  5923. $("li.touch-maps a").css({ opacity: 0.25 });
  5924. }
  5925. var dataPhotosForDownload = $("#" + getCurrentId()).attr("data-download");
  5926. if(dataPhotosForDownload == 'yes'){
  5927. $("li.touch-download a").css({ opacity: 1});
  5928. } else {
  5929. $("li.touch-download a").css({ opacity: 0.25});
  5930. }
  5931. }
  5932. <% elseif M.googleMaps.enable and not M.imageDownload.enable then %>
  5933. imageSlider.on(ImageSlider.INDEX_CHANGE, updateButtonAvailability);
  5934. function updateButtonAvailability(){
  5935. var dataGPS = $("#" + getCurrentId()).attr("data-gps");
  5936. if(dataGPS != undefined){
  5937. $("li.touch-maps a").css({ opacity: 1 });
  5938. } else {
  5939. $("li.touch-maps a").css({ opacity: 0.25 });
  5940. }
  5941. }
  5942. <% elseif not M.googleMaps.enable and M.imageDownload.enable then %>
  5943. imageSlider.on(ImageSlider.INDEX_CHANGE, updateButtonAvailability);
  5944. function updateButtonAvailability(){
  5945. var dataPhotosForDownload = $("#" + getCurrentId()).attr("data-download");
  5946. if(dataPhotosForDownload == 'yes'){
  5947. $("li.touch-download a").css({ opacity: 1});
  5948. } else {
  5949. $("li.touch-download a").css({ opacity: 0.25});
  5950. }
  5951. }
  5952. <% end %>
  5953. <% if M.cart.integration.enabled then %>
  5954. imageSlider.on(ImageSlider.INDEX_CHANGE, imageForSale);
  5955. function imageForSale(){
  5956. var addToCartButton = $("#cell-"+getCurrentId() + " .add-to-cart");
  5957. if (addToCartButton != undefined && addToCartButton.length) {
  5958. $("li.touch-shopping-cart a").css({ opacity: 1 });
  5959. } else {
  5960. $("li.touch-shopping-cart a").css({ opacity: 0.25 });
  5961. }
  5962. }
  5963. <% end --[[ cart ]] %>
  5964. function getAlbumURL(){
  5965. var albumURL = imageSlider.slides[imageSlider.index()].albumURL;
  5966. return albumURL != undefined && albumURL.match(/^http:/)? albumURL : "<% if (mode == 'publish' and M.is.php) or publisher then %><% write("<?php echo CURRENTPAGELOCATION.'/'; ".."?"..">")%><% else %>./<% end %>";
  5967. }
  5968. function getSingleURL(){
  5969. return getAlbumURL() + getCurrentId() + "-single.<% if (mode == 'publish' and M.is.php) or publisher then %>php<% else %>html<% end %><% if mobile then %>?mobile=true<% end %>";
  5970. }
  5971. function getPhotoURL(){
  5972. return getAlbumURL() + "photos/" + getCurrentId() + ".jpg";
  5973. }
  5974. function getCurrentId(){
  5975. return imageSlider.slides[imageSlider.index()].thumbId;
  5976. }
  5977. function getCurrentTitle(){
  5978. var title = $("#" + getCurrentId() + " img").attr("title"),
  5979. title = (title != undefined && title.length != 0 ? title : "");
  5980. return title;
  5981. }
  5982. function getCurrentAlt(){
  5983. var alt = $("#" + getCurrentId() + " img").attr("alt"),
  5984. alt = (alt != undefined && alt.length != 0 ? alt : "");
  5985. return alt;
  5986. }
  5987. function getCurrentDesc(){
  5988. var title = getCurrentTitle(),
  5989. alt = getCurrentAlt(),
  5990. slash = (title != undefined && title.length != 0 && alt != undefined && alt.length != 0 ? " / " : "");
  5991. return title + slash + alt;
  5992. }
  5993. <% if mode == 'publish' then %>
  5994. <% if M.sharing.ogp and M.lightbox.socialmedia.sharing then %>
  5995. $(".touch-facebook a").off("click").on("click", function(event){
  5996. window.open("https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(getSingleURL()), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  5997. return false;
  5998. });
  5999. $(".touch-linkedin a").off("click").on("click", function(event){
  6000. window.open("http://www.linkedin.com/shareArticle?mini=true&url=" + encodeURIComponent(getSingleURL()), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  6001. return false;
  6002. });
  6003. $(".touch-twitter a").off("click").on("click", function(event){
  6004. window.open("http://twitter.com/intent/tweet?url=" + encodeURIComponent(getSingleURL()) + "<% if M.sharing.twitter.creator ~= '' then %>&via=<%= M.sharing.twitter.creator %><% end %>", "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  6005. return false;
  6006. });
  6007. $(".touch-google-plus a").off("click").on("click", function(event){
  6008. window.open("https://plus.google.com/share?url=" + encodeURIComponent(getSingleURL()), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  6009. return false;
  6010. });
  6011. $(".touch-pinterest a").off("click").on("click", function(event){
  6012. window.open("http://pinterest.com/pin/create/bookmarklet/?media=" + encodeURIComponent(getPhotoURL()) + "&url=" + encodeURIComponent(getSingleURL()) + "&is_video=false&description=" + getCurrentDesc(), "share", "height=640, width=520, resizable=0, status=1, top=24, left=24");
  6013. return false;
  6014. });
  6015. $(".touch-email a").off("click").on("click", function(event){
  6016. <% if mobile then %>
  6017. window.location.href="mailto:?Subject=" + encodeURIComponent(getCurrentTitle()) + "&Body=" + encodeURIComponent(getCurrentAlt()) + "%0D%0A" + encodeURIComponent(getSingleURL());
  6018. <% else %>
  6019. window.open("mailto:?Subject=" + encodeURIComponent(getCurrentTitle()) + "&Body=" + encodeURIComponent(getCurrentAlt()) + "%0D%0A" + encodeURIComponent(getSingleURL()));
  6020. <% end %>
  6021. return false;
  6022. });
  6023. <% end --[[ socialmedia ]] %>
  6024. <% if M.permalinks.on then %>
  6025. $(".touch-permalink a").off("click").on("click", function(event){
  6026. window.location.href=getSingleURL();
  6027. return false;
  6028. });
  6029. <% end %>
  6030. <% if M.googleMaps.enable then %>
  6031. $(".touch-maps a").off("click").on("click", function(event){
  6032. var dataGPS = $("#" + getCurrentId()).attr("data-gps");
  6033. if(dataGPS != undefined){
  6034. window.open($("#" + getCurrentId()).attr("data-gps"));
  6035. }
  6036. return false;
  6037. });
  6038. <% end %>
  6039. <% if M.imageDownload.enable and publisher then %>
  6040. $(".touch-download a").off("click").on("click", function(event){
  6041. var dataPhotosForDownload = $("#" + getCurrentId()).attr("data-download-url");
  6042. if(dataPhotosForDownload){
  6043. if (navigator.userAgent.match(/Android|Blackberry|SymbianOS|iPhone|iPod|iPad/i)){
  6044. window.open($("#" + getCurrentId()).attr("data-download-url"));
  6045. } else {
  6046. <% if not mobile then %>
  6047. window.location.href = $("#" + getCurrentId()).attr("data-download-url");
  6048. <% else %>
  6049. window.open($("#" + getCurrentId()).attr("data-download-url"));
  6050. <% end %>
  6051. };
  6052. }
  6053. return false;
  6054. });
  6055. <% elseif M.imageDownload.enable then %>
  6056. $(".touch-download a").off("click").on("click", function(event){
  6057. var dataPhotosForDownload = $("#" + getCurrentId()).attr("data-download");
  6058. if(dataPhotosForDownload == 'yes'){
  6059. if (navigator.userAgent.match(/Android|Blackberry|SymbianOS|iPhone|iPod|iPad/i)){
  6060. window.open( getAlbumURL() + "<%= downloadFolder %>/" + getCurrentId() + ".<%= downloadExtension %>");
  6061. } else {
  6062. <% if M.imageDownload.method == "php" and not mobile then %>
  6063. window.location.href = getAlbumURL() + "download.php?file=<%= downloadFolder %>/" + getCurrentId() + ".<%= downloadExtension %>";
  6064. <% else %>
  6065. window.open( getAlbumURL() + "<%= downloadFolder %>/" + getCurrentId() + ".<%= downloadExtension %>");
  6066. <% end %>
  6067. };
  6068. }
  6069. return false;
  6070. });
  6071. <% end --[[ imageDownload ]] %>
  6072. <% if M.cart.integration.enabled then %>
  6073. $(".touch-shopping-cart a").off("click").on("click", function(event){
  6074. var currentImage = getCurrentId();
  6075. var addToCartButton = $("#cell-"+currentImage).find(".add-to-cart");
  6076. if (addToCartButton != undefined && addToCartButton.length) {
  6077. var cart_button = $('.touch-shopping-cart a');
  6078. if (cart_button != undefined && $(cart_button).length) {
  6079. $(cart_button).attr('data-item', $(addToCartButton).attr("data-item"));
  6080. $(cart_button).attr('data-name', $(addToCartButton).attr("data-name"));
  6081. $(cart_button).attr('data-price', $(addToCartButton).attr("data-price"));
  6082. $(cart_button).attr('data-thumbnail', $(addToCartButton).attr("data-thumbnail"));
  6083. if ("ttgCart" in window) {
  6084. ttgCart.applyCartButtonEvents($(cart_button), function() { tns.show(false); }, true );
  6085. }
  6086. }
  6087. }
  6088. return false;
  6089. });
  6090. <% end --[[ cart ]] %>
  6091. <% if M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  6092. $(".touch-shopping-cart a").off("click").on("click", function(event){
  6093. var currentImage = getCurrentId();
  6094. showPrint("#" + currentImage + " img");
  6095. return false;
  6096. });
  6097. <% end --[[ fotomoto ]] %>
  6098. <% end --[[ publish ]] %>
  6099. //on function has parameters (event_type, handler, handler parameters)
  6100. tns.on(TouchNSwipe.TOGGLE, onTnsToggle, ["show"]);
  6101. function onTnsToggle(val){
  6102. // open
  6103. if (tns.show()){
  6104. <% if not M.lightbox.hide_ui then %>
  6105. $(".controlHolder, .captionHolder, .caption").toggleClass("ui-on ui-off");
  6106. <% end %>
  6107. $(".sliderHolder").hammer().off("tap").on("tap", ".slides", function(event) {
  6108. $(".controlHolder, .captionHolder, .caption").toggleClass("ui-on ui-off");
  6109. $(".share-on").toggleClass("share-on share-off");
  6110. return false;
  6111. });
  6112. $(".captionHolder").hammer().off("tap").on("tap", ".caption", function(event) {
  6113. $(".controlHolder, .captionHolder, .caption").toggleClass("ui-on ui-off");
  6114. $(".share-on").toggleClass("share-on share-off");
  6115. return false;
  6116. });
  6117. $(".shareMenuIcon").hammer().off("tap").on("tap", function(event){
  6118. $(".share-on,.share-off").toggleClass("share-on share-off");
  6119. return false;
  6120. });
  6121. }//open
  6122. <% if M.slideshowTracking.enable then %>
  6123. // open
  6124. if (tns.show()){
  6125. <% if hyperlinkKludge then %>
  6126. jQuery("body").addClass("deadPage");
  6127. <% end --[[ hyperlinkKludge ]] %>
  6128. jQuery(".tracked-item").removeClass("tracked-item");
  6129. }//open
  6130. // close
  6131. if (!tns.show()){
  6132. var target = "#cell-" + getCurrentId(),
  6133. destination = $(target).offset().top;
  6134. jQuery("html,body").animate({ scrollTop: destination - 72}, 800, function(){
  6135. jQuery(target).addClass("tracked-item");
  6136. <% if hyperlinkKludge then %>
  6137. jQuery("body").removeClass("deadPage");
  6138. <% end --[[ hyperlinkKludge ]] %>
  6139. });
  6140. }//close
  6141. <% elseif hyperlinkKludge then %>
  6142. // open
  6143. if (tns.show()){
  6144. jQuery("body").addClass("deadPage");
  6145. }//open
  6146. // close
  6147. if (!tns.show()){
  6148. setTimeout(function(){
  6149. jQuery("body").removeClass("deadPage");
  6150. }, 800);
  6151. }//close
  6152. <% end --[[ slideshowTracking / hyperlinkKludge ]] %>
  6153. // close
  6154. if (!tns.show()){
  6155. $(".controlHolder, .captionHolder, .caption").removeClass("ui-on").addClass("ui-off");
  6156. }//close
  6157. <% if mode == 'preview' then %>
  6158. // keep image in viewport during preview; kill scrollbar
  6159. if (tns.show()){
  6160. $('html').css({
  6161. position: "fixed",
  6162. height: "100%",
  6163. overflow: "hidden"
  6164. });
  6165. }
  6166. if (!tns.show()){
  6167. $('html').removeAttr('style')
  6168. }
  6169. <% end --[[ preview ]] %>
  6170. }//onTnsToggle
  6171. });
  6172. </script>
  6173. <% end --[[ touch ]] %>
  6174. <% if mode == 'publish' and M.fotomoto.integration.enabled and not M.cart.integration.enabled then %>
  6175. <script src="http://widget.fotomoto.com/stores/script/<%= M.fotomoto.storekey %>.js?api=true&aid=e6effb1269330677"></script>
  6176. <script src="<%= resources %>/js/fotomoto.js"></script>
  6177. <% if mode == 'publish' and M.fotomoto.checkin.enabled and not single then %>
  6178. <script>
  6179. window.onload = function(){
  6180. fotomoto_ready(function(){
  6181. <% if publisher then %>
  6182. <?php if ($album->needsFirstVisit()) { ?>
  6183. <% write("<?php \n"..
  6184. "if ($album->needsFirstVisit()) {\n"..
  6185. "foreach ($album->getPhotosForPage() as $photo) {\n"..
  6186. " $item_number = substr($photo->getItemNumber(), 0, strrpos($photo->getItemNumber(), '.'));\n"..
  6187. "?"..">")%>
  6188. FOTOMOTO.API.checkinImage('photos/<% write ("<?php echo $photo->getItemNumber(); ".."?"..">")%>');
  6189. <% write ("<?php }}} ".."?"..">")
  6190. --[[ end image loop ]] %>
  6191. <% else %>
  6192. <% for index=1, numImages do %> FOTOMOTO.API.checkinImage('photos/<%= getImage(index).exportFilename %>.jpg');
  6193. <% end end --[[ if publisher ]] %>
  6194. })
  6195. };
  6196. </script>
  6197. <% end end --[[ fotomoto ]] %>
  6198. <script src="<%= sharedResources %>/js/init.tail.min.js"></script>
  6199. <script type="text/javascript">
  6200. function downloadJSAtOnload() {
  6201. var element = document.createElement("script");
  6202. element.src = "<%= sharedResources %>/js/init.defer.min.js";
  6203. document.body.appendChild(element);
  6204. }
  6205. if (window.addEventListener)
  6206. window.addEventListener("load", downloadJSAtOnload, false);
  6207. else if (window.attachEvent)
  6208. window.attachEvent("onload", downloadJSAtOnload);
  6209. else window.onload = downloadJSAtOnload;
  6210. </script>
  6211. <!-- /Scripts **************************************** -->
  6212. <% --[[ Highslide JS Licensing ]] %>
  6213. <% if M.grid.presentation.desktop == "hs_slideshow" and ( mode == 'preview' and not M.highslide.license ) then %>
  6214. <div class="notice" style="position:fixed; bottom:31px; right:0;">
  6215. <p class="notice-content"><i class="fa fa-exclamation-triangle fa-fw"></i> You have not agreed to the <span>Highslide JS licensing</span> agreement.</p>
  6216. </div>
  6217. <% end %>
  6218. <% --[[ Refresh Notice ]] %>
  6219. <% if mode == 'preview' then %>
  6220. <div id="refresh" class="notice">
  6221. <p class="notice-content"><i class="fa fa-refresh"></i><span class="notice-hide"> <%= M.preview.reload.refresh01 %><span><%= operator %>-R</span><%= M.preview.reload.refresh02 %></span></p>
  6222. </div>
  6223. <script>
  6224. $('#refresh').on("click", function() {
  6225. location.reload();
  6226. });
  6227. </script>
  6228. <style>
  6229. /* Refresh Button
  6230. =================================================== */
  6231. .notice {
  6232. background-color: #191919;
  6233. border: 1px solid #000000;
  6234. cursor: default;
  6235. margin: 4px;
  6236. max-width: 85%;
  6237. padding: 5px 8px 4px;
  6238. position: fixed;
  6239. bottom: 0;
  6240. right: 0;
  6241. z-index: 4;
  6242. -moz-border-radius: 2px;
  6243. -webkit-border-radius: 2px;
  6244. border-radius: 2px;
  6245. -moz-box-shadow: 2px 2px 4px rgba( 0, 0, 0, 0.5 );
  6246. -webkit-box-shadow: 2px 2px 4px rgba( 0, 0, 0, 0.5 );
  6247. box-shadow: 2px 2px 4px rgba( 0, 0, 0, 0.5 );
  6248. -webkit-transition: 0.5s ease-in-out;
  6249. -moz-transition: 0.5s ease-in-out;
  6250. -o-transition: 0.5s ease-in-out;
  6251. transition: 0.5s ease-in-out;
  6252. }
  6253. .notice:focus, .notice:hover {
  6254. background-color: #2c2c2c;
  6255. }
  6256. .notice-content {
  6257. color: #a5a5a5;
  6258. font-size: 14px;
  6259. font-family: Arial, sans-serif;
  6260. line-height: 1em;
  6261. letter-spacing: 0.5px;
  6262. margin: 0;
  6263. padding: 0;
  6264. overflow: hidden;
  6265. text-transform: uppercase;
  6266. text-overflow: ellipsis;
  6267. white-space: nowrap;
  6268. }
  6269. .notice-content i,
  6270. .notice-content span {
  6271. color: #fff;
  6272. font-weight: bold;
  6273. }
  6274. .notice-content i {
  6275. font-size: 16px;
  6276. }
  6277. .notice-content span.notice-hide {
  6278. color: inherit;
  6279. font-weight: normal;
  6280. }
  6281. #refresh {
  6282. cursor: pointer;
  6283. }
  6284. <% if M.preview.reload.small then %>
  6285. .notice-content span.notice-hide {
  6286. display: none;
  6287. }
  6288. <% end %>
  6289. </style>
  6290. <% end --[[ Refresh Notice ]] %>
  6291. <% if publish and M.phplugins.enable then write ("<?php\n"..
  6292. "if ( function_exists('ttg_body_bottom') ) {\n"..
  6293. " $void = ttg_body_bottom( TTG_COMP, TTG_ROOT );\n"..
  6294. "} ".."?"..">") end --[[ ttg_body_bottom ]] %>
  6295. </body>
  6296. </html>
  1. --[[
  2. ********************************************************************************
  3. Begin Setup
  4. ******************************************************************************** ]]
  5. local LrApplication = import "LrApplication"
  6. local major = LrApplication.versionTable().major
  7. local lrwebengine = "CE4-Gallery.lrwebengine"
  8. local markdownloc = "lib/lua/"
  9. local M = _G.model
  10. function cleandata(metadata)
  11. metadata = string.gsub(metadata, "&", "&")
  12. metadata = string.gsub(metadata, "&", "&")
  13. metadata = string.gsub(metadata, "&amp;", "&")
  14. metadata = string.gsub(metadata, "\r\n", "<br />")
  15. metadata = string.gsub(metadata, "\n", "<br />")
  16. metadata = string.gsub(metadata, "\"", """)
  17. return metadata
  18. end
  19. local phplugins_gstyle
  20. if mobile then
  21. phplugins_gstyle = "Mobile"
  22. elseif cart then
  23. phplugins_gstyle = "Cart"
  24. else
  25. phplugins_gstyle = "Gallery"
  26. end
  27. local operator
  28. if MAC_ENV then
  29. operator = "CMD"
  30. else
  31. operator = "CTRL"
  32. end
  33. local preview = false
  34. if mode == 'preview' then
  35. preview = true
  36. end
  37. local publish = false
  38. if mode == 'publish' then
  39. publish = true
  40. end
  41. local theRoot
  42. theRoot = "."
  43. local siteRoot
  44. if preview then
  45. siteRoot = theRoot ..'/'
  46. elseif publish and M.phplugins.enable then
  47. siteRoot = "<?php echo TTG_SITE; ".."?"..">"
  48. elseif publish and not M.phplugins.enable then
  49. siteRoot = M.page_setup.site.root
  50. end
  51. local resources = theRoot ..'/lib'
  52. if publisher or cart then
  53. resources = "<?php echo $resources_url; ".."?"..">"
  54. end
  55. local sharedResources = resources
  56. if M.resources.share.enabled then
  57. sharedResources = siteRoot .. "lib"
  58. end
  59. local phplugins_path
  60. if model.phplugins.path == '' then
  61. phplugins_path = theRoot ..'/phplugins'
  62. else
  63. phplugins_path = model.phplugins.path
  64. end
  65. local albumTitle = M.album.title
  66. if publisher and not single then
  67. albumTitle = "<?php echo $album->getTitle(); ".."?"..">"
  68. elseif publisher and single then
  69. albumTitle = "<?php echo $photo->getTitle(); ".."?"..">"
  70. elseif not publisher and single and getImage(index).metadata.imgTitle ~= '' then
  71. albumTitle = getImage(index).metadata.imgTitle
  72. elseif not publisher and single and getImage(index).metadata.imgTitle == '' then
  73. albumTitle = getImage(index).exportFilename
  74. end
  75. local albumTitleVal
  76. if publisher and not single then
  77. albumTitleVal = '$album->getTitle()'
  78. elseif publisher and single then
  79. albumTitleVal = '$photo->getTitle()'
  80. else
  81. albumTitleVal = "'".. string.gsub(albumTitle, "'", "'") .."'"
  82. end
  83. local pageTitle = 'Page Title'
  84. if publisher and M.page_setup.html.title == '' then
  85. pageTitle = albumTitle
  86. elseif publisher then
  87. pageTitle = albumTitle .. " - " .. M.page_setup.html.title
  88. elseif cart then
  89. pageTitle = "<?php echo str_replace('[COMPANY_NAME]', __c('COMPANY_NAME'), __c('TITLE')); ".."?"..">"
  90. else
  91. if M.page_setup.html.title == '' and albumTitle == '' then
  92. pageTitle = ''
  93. elseif M.page_setup.html.title == '' then
  94. pageTitle = albumTitle
  95. elseif albumTitle == '' then
  96. pageTitle = M.page_setup.html.title
  97. else
  98. pageTitle = albumTitle .. " - " .. M.page_setup.html.title
  99. end
  100. end
  101. local socialTitle
  102. if publisher and not single then
  103. socialTitle = "<?php echo $album->getTitle(70); ".."?"..">"
  104. elseif publisher and single then
  105. socialTitle = "<?php echo $photo->getTitle(70); ".."?"..">"
  106. else
  107. socialTitle = "<?php echo truncate(\"".. albumTitle .."\", 70); ".."?"..">"
  108. end
  109. local pageDescription = M.album.description
  110. if publisher and not single then
  111. pageDescription = "<?php echo (!$album->getDescription() ? $album->getTitle() : $album->getDescription()); ".."?"..">"
  112. elseif publisher and single then
  113. pageDescription = "<?php echo $photo->getDescription(); ".."?"..">"
  114. elseif not publisher and single then
  115. pageDescription = getImage(index).metadata.imgAlt
  116. end
  117. local socialDescription = "<?php echo truncate(\"".. M.album.description .."\", 200); ".."?"..">"
  118. if publisher and not single then
  119. socialDescription = "<?php echo (!$album->getDescription() ? $album->getTitle(200) : $album->getDescription(200)); ".."?"..">"
  120. elseif publisher and single then
  121. socialDescription = "<?php echo (!$photo->getDescription() ? $photo->getTitle(200) : $photo->getDescription(200)); ".."?"..">"
  122. elseif not publisher and single then
  123. socialDescription = "<?php echo truncate(\"".. getImage(index).metadata.imgAlt .."\", 200); ".."?"..">"
  124. end
  125. local pageImage
  126. if publisher and single then
  127. pageImage = "\"photos/\".$singleFilename"
  128. elseif publisher then
  129. pageImage = "\"photos/\".basename($album->getCoverImage())"
  130. elseif single then
  131. pageImage = "\"photos/".. getImage(index).exportFilename ..".jpg\""
  132. elseif getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then
  133. pageImage = "\"photos/".. getImage(M.the_block.image.id).exportFilename ..".jpg\""
  134. else
  135. pageImage = "\"".. theRoot .."/lib/images/identityplate.png\""
  136. end
  137. local pageImageFile
  138. if publisher and single then
  139. pageImageFile = "<?php echo $singleFilename; ".."?"..">"
  140. elseif publisher then
  141. pageImageFile = "<?php echo basename($album->getCoverImage()); ".."?"..">"
  142. elseif single then
  143. pageImageFile = getImage(index).exportFilename ..".jpg"
  144. else
  145. pageImageFile = getImage(M.the_block.image.id).exportFilename ..".jpg"
  146. end
  147. local login_user
  148. if publisher then
  149. login_user = "defined('USERNAME')?USERNAME:'".. M.password.login.guest_username .. "';"
  150. else
  151. login_user = "'" .. M.password.login.guest_username .. "';"
  152. end
  153. local login_password
  154. if publisher then
  155. login_password = "defined('PASSWORD')?PASSWORD:'".. M.password.login.guest_password .. "';"
  156. else
  157. login_password = "'" .. M.password.login.guest_password .. "';"
  158. end
  159. local downloadFolder
  160. if mode == 'preview' then
  161. downloadFolder = "photos"
  162. elseif publisher and M.publisher.imageDownload.enable then
  163. downloadFolder = "<?php echo $downloadPath ".."?"..">"
  164. else
  165. downloadFolder = M.imageDownload.folder
  166. end
  167. local downloadExtension
  168. if mode == 'preview' then
  169. downloadExtension = "jpg"
  170. elseif publisher and M.publisher.imageDownload.enable then
  171. downloadExtension = "jpg"
  172. else
  173. downloadExtension = M.imageDownload.filetype
  174. end
  175. --[[
  176. ********************************************************************************
  177. Navigation Hyperlinks
  178. ******************************************************************************** ]]
  179. local newWindow
  180. if preview then
  181. newWindow = ''
  182. else
  183. newWindow = ' onclick="window.open(this.href); return false;"'
  184. end
  185. local tail
  186. if preview then
  187. tail = '.html'
  188. elseif publish then
  189. tail = '.php'
  190. end
  191. local menuTarget01 = M.nav_link.nav_01.target
  192. if menuTarget01 == ( 'index' ) then
  193. menuTarget01 = siteRoot .. menuTarget01 .. tail
  194. elseif menuTarget01 == ( 'blog/' ) then
  195. menuTarget01 = siteRoot .. menuTarget01
  196. elseif menuTarget01 == ( 'galleries' ) then
  197. menuTarget01 = siteRoot .. menuTarget01 .. tail
  198. elseif menuTarget01 == ( 'services' ) then
  199. menuTarget01 = siteRoot .. menuTarget01 .. tail
  200. elseif menuTarget01 == ( 'info' ) then
  201. menuTarget01 = siteRoot .. menuTarget01 .. tail
  202. elseif menuTarget01 == ( 'about' ) then
  203. menuTarget01 = siteRoot .. menuTarget01 .. tail
  204. elseif menuTarget01 == ( 'contact' ) then
  205. menuTarget01 = siteRoot .. menuTarget01 .. tail
  206. elseif menuTarget01 == ( 'search/' ) then
  207. menuTarget01 = siteRoot .. menuTarget01
  208. end
  209. local menuTarget02 = M.nav_link.nav_02.target
  210. if menuTarget02 == ( 'index' ) then
  211. menuTarget02 = siteRoot .. menuTarget02 .. tail
  212. elseif menuTarget02 == ( 'blog/' ) then
  213. menuTarget02 = siteRoot .. menuTarget02
  214. elseif menuTarget02 == ( 'galleries' ) then
  215. menuTarget02 = siteRoot .. menuTarget02 .. tail
  216. elseif menuTarget02 == ( 'services' ) then
  217. menuTarget02 = siteRoot .. menuTarget02 .. tail
  218. elseif menuTarget02 == ( 'info' ) then
  219. menuTarget02 = siteRoot .. menuTarget02 .. tail
  220. elseif menuTarget02 == ( 'about' ) then
  221. menuTarget02 = siteRoot .. menuTarget02 .. tail
  222. elseif menuTarget02 == ( 'contact' ) then
  223. menuTarget02 = siteRoot .. menuTarget02 .. tail
  224. elseif menuTarget02 == ( 'search/' ) then
  225. menuTarget02 = siteRoot .. menuTarget02
  226. end
  227. local menuTarget03 = M.nav_link.nav_03.target
  228. if menuTarget03 == ( 'index' ) then
  229. menuTarget03 = siteRoot .. menuTarget03 .. tail
  230. elseif menuTarget03 == ( 'blog/' ) then
  231. menuTarget03 = siteRoot .. menuTarget03
  232. elseif menuTarget03 == ( 'galleries' ) then
  233. menuTarget03 = siteRoot .. menuTarget03 .. tail
  234. elseif menuTarget03 == ( 'services' ) then
  235. menuTarget03 = siteRoot .. menuTarget03 .. tail
  236. elseif menuTarget03 == ( 'info' ) then
  237. menuTarget03 = siteRoot .. menuTarget03 .. tail
  238. elseif menuTarget03 == ( 'about' ) then
  239. menuTarget03 = siteRoot .. menuTarget03 .. tail
  240. elseif menuTarget03 == ( 'contact' ) then
  241. menuTarget03 = siteRoot .. menuTarget03 .. tail
  242. elseif menuTarget03 == ( 'search/' ) then
  243. menuTarget03 = siteRoot .. menuTarget03
  244. end
  245. local menuTarget04 = M.nav_link.nav_04.target
  246. if menuTarget04 == ( 'index' ) then
  247. menuTarget04 = siteRoot .. menuTarget04 .. tail
  248. elseif menuTarget04 == ( 'blog/' ) then
  249. menuTarget04 = siteRoot .. menuTarget04
  250. elseif menuTarget04 == ( 'galleries' ) then
  251. menuTarget04 = siteRoot .. menuTarget04 .. tail
  252. elseif menuTarget04 == ( 'services' ) then
  253. menuTarget04 = siteRoot .. menuTarget04 .. tail
  254. elseif menuTarget04 == ( 'info' ) then
  255. menuTarget04 = siteRoot .. menuTarget04 .. tail
  256. elseif menuTarget04 == ( 'about' ) then
  257. menuTarget04 = siteRoot .. menuTarget04 .. tail
  258. elseif menuTarget04 == ( 'contact' ) then
  259. menuTarget04 = siteRoot .. menuTarget04 .. tail
  260. elseif menuTarget04 == ( 'search/' ) then
  261. menuTarget04 = siteRoot .. menuTarget04
  262. end
  263. local menuTarget05 = M.nav_link.nav_05.target
  264. if menuTarget05 == ( 'index' ) then
  265. menuTarget05 = siteRoot .. menuTarget05 .. tail
  266. elseif menuTarget05 == ( 'blog/' ) then
  267. menuTarget05 = siteRoot .. menuTarget05
  268. elseif menuTarget05 == ( 'galleries' ) then
  269. menuTarget05 = siteRoot .. menuTarget05 .. tail
  270. elseif menuTarget05 == ( 'services' ) then
  271. menuTarget05 = siteRoot .. menuTarget05 .. tail
  272. elseif menuTarget05 == ( 'info' ) then
  273. menuTarget05 = siteRoot .. menuTarget05 .. tail
  274. elseif menuTarget05 == ( 'about' ) then
  275. menuTarget05 = siteRoot .. menuTarget05 .. tail
  276. elseif menuTarget05 == ( 'contact' ) then
  277. menuTarget05 = siteRoot .. menuTarget05 .. tail
  278. elseif menuTarget05 == ( 'search/' ) then
  279. menuTarget05 = siteRoot .. menuTarget05
  280. end
  281. local menuTarget06 = M.nav_link.nav_06.target
  282. if menuTarget06 == ( 'index' ) then
  283. menuTarget06 = siteRoot .. menuTarget06 .. tail
  284. elseif menuTarget06 == ( 'blog/' ) then
  285. menuTarget06 = siteRoot .. menuTarget06
  286. elseif menuTarget06 == ( 'galleries' ) then
  287. menuTarget06 = siteRoot .. menuTarget06 .. tail
  288. elseif menuTarget06 == ( 'services' ) then
  289. menuTarget06 = siteRoot .. menuTarget06 .. tail
  290. elseif menuTarget06 == ( 'info' ) then
  291. menuTarget06 = siteRoot .. menuTarget06 .. tail
  292. elseif menuTarget06 == ( 'about' ) then
  293. menuTarget06 = siteRoot .. menuTarget06 .. tail
  294. elseif menuTarget06 == ( 'contact' ) then
  295. menuTarget06 = siteRoot .. menuTarget06 .. tail
  296. elseif menuTarget06 == ( 'search/' ) then
  297. menuTarget06 = siteRoot .. menuTarget06
  298. end
  299. local menuTarget07 = M.nav_link.nav_07.target
  300. if menuTarget07 == ( 'index' ) then
  301. menuTarget07 = siteRoot .. menuTarget07 .. tail
  302. elseif menuTarget07 == ( 'blog/' ) then
  303. menuTarget07 = siteRoot .. menuTarget07
  304. elseif menuTarget07 == ( 'galleries' ) then
  305. menuTarget07 = siteRoot .. menuTarget07 .. tail
  306. elseif menuTarget07 == ( 'services' ) then
  307. menuTarget07 = siteRoot .. menuTarget07 .. tail
  308. elseif menuTarget07 == ( 'info' ) then
  309. menuTarget07 = siteRoot .. menuTarget07 .. tail
  310. elseif menuTarget07 == ( 'about' ) then
  311. menuTarget07 = siteRoot .. menuTarget07 .. tail
  312. elseif menuTarget07 == ( 'contact' ) then
  313. menuTarget07 = siteRoot .. menuTarget07 .. tail
  314. elseif menuTarget07 == ( 'search/' ) then
  315. menuTarget07 = siteRoot .. menuTarget07
  316. end
  317. local menuTarget08 = M.nav_link.nav_08.target
  318. if menuTarget08 == ( 'index' ) then
  319. menuTarget08 = siteRoot .. menuTarget08 .. tail
  320. elseif menuTarget08 == ( 'blog/' ) then
  321. menuTarget08 = siteRoot .. menuTarget08
  322. elseif menuTarget08 == ( 'galleries' ) then
  323. menuTarget08 = siteRoot .. menuTarget08 .. tail
  324. elseif menuTarget08 == ( 'services' ) then
  325. menuTarget08 = siteRoot .. menuTarget08 .. tail
  326. elseif menuTarget08 == ( 'info' ) then
  327. menuTarget08 = siteRoot .. menuTarget08 .. tail
  328. elseif menuTarget08 == ( 'about' ) then
  329. menuTarget08 = siteRoot .. menuTarget08 .. tail
  330. elseif menuTarget08 == ( 'contact' ) then
  331. menuTarget08 = siteRoot .. menuTarget08 .. tail
  332. elseif menuTarget08 == ( 'search/' ) then
  333. menuTarget08 = siteRoot .. menuTarget08
  334. end
  335. local menuTarget09 = M.nav_link.nav_09.target
  336. if menuTarget09 == ( 'index' ) then
  337. menuTarget09 = siteRoot .. menuTarget09 .. tail
  338. elseif menuTarget09 == ( 'blog/' ) then
  339. menuTarget09 = siteRoot .. menuTarget09
  340. elseif menuTarget09 == ( 'galleries' ) then
  341. menuTarget09 = siteRoot .. menuTarget09 .. tail
  342. elseif menuTarget09 == ( 'services' ) then
  343. menuTarget09 = siteRoot .. menuTarget09 .. tail
  344. elseif menuTarget09 == ( 'info' ) then
  345. menuTarget09 = siteRoot .. menuTarget09 .. tail
  346. elseif menuTarget09 == ( 'about' ) then
  347. menuTarget09 = siteRoot .. menuTarget09 .. tail
  348. elseif menuTarget09 == ( 'contact' ) then
  349. menuTarget09 = siteRoot .. menuTarget09 .. tail
  350. elseif menuTarget09 == ( 'search/' ) then
  351. menuTarget09 = siteRoot .. menuTarget09
  352. end
  353. local menuTarget10 = M.nav_link.nav_10.target
  354. if menuTarget10 == ( 'index' ) then
  355. menuTarget10 = siteRoot .. menuTarget10 .. tail
  356. elseif menuTarget10 == ( 'blog/' ) then
  357. menuTarget10 = siteRoot .. menuTarget10
  358. elseif menuTarget10 == ( 'galleries' ) then
  359. menuTarget10 = siteRoot .. menuTarget10 .. tail
  360. elseif menuTarget10 == ( 'services' ) then
  361. menuTarget10 = siteRoot .. menuTarget10 .. tail
  362. elseif menuTarget10 == ( 'info' ) then
  363. menuTarget10 = siteRoot .. menuTarget10 .. tail
  364. elseif menuTarget10 == ( 'about' ) then
  365. menuTarget10 = siteRoot .. menuTarget10 .. tail
  366. elseif menuTarget10 == ( 'contact' ) then
  367. menuTarget10 = siteRoot .. menuTarget10 .. tail
  368. elseif menuTarget10 == ( 'search/' ) then
  369. menuTarget10 = siteRoot .. menuTarget10
  370. end
  371. if preview then
  372. menuTarget01 = '#'
  373. menuTarget02 = '#'
  374. menuTarget03 = '#'
  375. menuTarget04 = '#'
  376. menuTarget05 = '#'
  377. menuTarget06 = '#'
  378. menuTarget07 = '#'
  379. menuTarget08 = '#'
  380. menuTarget09 = '#'
  381. menuTarget10 = '#'
  382. end
  383. --[[
  384. ********************************************************************************
  385. Markdown
  386. ******************************************************************************** ]]
  387. LrFileUtils = import 'LrFileUtils'
  388. LrFunctionContext = import 'LrFunctionContext'
  389. LrPathUtils = import 'LrPathUtils'
  390. if WIN_ENV then
  391. webGalleriesFolder = LrPathUtils.child(LrPathUtils.getStandardFilePath("appData"), "Web Galleries")
  392. else
  393. webGalleriesFolder = LrPathUtils.child(LrPathUtils.getStandardFilePath("home"), "Library/Application Support/Adobe/Lightroom/Web Galleries/")
  394. end
  395. local webenginePath = LrPathUtils.child(webGalleriesFolder, lrwebengine)
  396. if LrFileUtils.exists(webenginePath) == 'directory' then -- verify markdown is accessible
  397. local mdenvPath = LrPathUtils.child(webenginePath, markdownloc.."markdownenv.lua")
  398. local luaString = LrFileUtils.readFile(mdenvPath)
  399. local func, errorMsg = loadstring(luaString, 'markdownenv.lua' )
  400. local env = { assert = assert, ipairs = ipairs, dofile = dofile, error = error, getmetatable = getmetatable, ipairs = ipairs, load = load, loadfile = loadfile, loadstring = loadstring, next = next, pairs = pairs, pcall = pcall, print = print, rawequal = rawequal, rawget = rawget, rawset = rawset, require = require, select = select, setmetatable = function() end, tonumber = tonumber, tostring = tostring, type = type, unpack = unpack, setenv = function() end, import = import, io = io, os = os, file = file, table = table, math = math, string = string, WIN_ENV = WIN_ENV, webGalleriesFolder = webGalleriesFolder, lrwebengine = lrwebengine, markdownloc = markdownloc }
  401. LrFunctionContext.callWithEnvironment(func, env)
  402. markdown = env._G.markdown
  403. else -- markdown is broken
  404. function markdown(text)
  405. text = ""
  406. return text
  407. end
  408. LrDialogs = import 'LrDialogs'
  409. local mdError = "Plugin Installation Error."
  410. local mdInfo = "The plugin is badly named or in the wrong location. Please review our online installation guide :\nhttp://ce4.theturninggate.net/docs/"
  411. LrDialogs.message(mdError, mdInfo)
  412. end -- verify markdown is accessible
  413. --[[
  414. ********************************************************************************
  415. End Setup
  416. ******************************************************************************** ]] write( [[
  417. ]] )
  418. if cart and mode == 'publish' then
  419. write ("<?php\n"..
  420. "$resources_url = TTG_BE_DIR.'/'.TEMPLATE_DIR.'/gallery/'.__c('CART_TEMPLATE').'/lib';\n"..
  421. "if (isset($resources_url) && $resources_url)\n"..
  422. " define('RESOURCES_URL', $resources_url);\n"..
  423. "else\n"..
  424. " define('RESOURCES_URL', './lib');\n"..
  425. "?".. ">") end
  426. if publish and M.phplugins.enable then --[[ setup PHPlugins ]]
  427. write ("<?php\n"..
  428. "/*\n"..
  429. " *\n"..
  430. " * TTG Core Elements - \"PHPlugins\" User Hook interface\n"..
  431. " * designed by john bishop images (http://johnbishopimages.com)\n"..
  432. " * for Matthew Campagna of The Turning Gate (http://theturninggate.net)\n"..
  433. " *\n"..
  434. " */\n"..
  435. "\n"..
  436. "// Begin hook processing\n"..
  437. "\n"..
  438. "define( 'TTG_ROOT', __FILE__ );\n"..
  439. "\n"..
  440. "define( 'TTG_HOOK', '".. phplugins_path .. "' );\n"..
  441. "\n"..
  442. "define( 'TTG_COMP', 'TTG CE4-".. phplugins_gstyle .. " 4.0' );\n"..
  443. "\n"..
  444. "if (file_exists( TTG_HOOK . '/phplugins.php')) {\n"..
  445. " require_once TTG_HOOK . '/phplugins.php';\n"..
  446. "}\n"..
  447. "\n"..
  448. "if (function_exists('ttg_user_load')) {\n"..
  449. " $void = ttg_user_load( TTG_COMP, TTG_ROOT );\n"..
  450. "}\n"..
  451. "\n"..
  452. "?".. ">")
  453. end
  454. if publish and publisher and M.phplugins.enable then
  455. write ("<?php\n"..
  456. " define(\"G_SLUG\", $album->getSlug());\n"..
  457. " define(\"G_TEMPLATE\", $album->getTemplateName());\n"..
  458. "?".. ">")
  459. end
  460. if publish and (M.is.php or publisher) then --[[ setup PHP constants ]]
  461. write ("<?php\n"..
  462. " if (!function_exists('currentPageURL')) {\n"..
  463. " // Gets current page URL\n"..
  464. " function currentPageURL() {\n"..
  465. " $pageURL = 'http';\n"..
  466. "\n"..
  467. " if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {$pageURL .= \"s\";}\n"..
  468. " $pageURL .= \"://\";\n"..
  469. "\n"..
  470. " if ($_SERVER[\"SERVER_PORT\"] != \"80\" && strpos($host, ':') === false) {\n"..
  471. " $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n"..
  472. " } else {\n"..
  473. " $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n"..
  474. " }\n"..
  475. "\n"..
  476. " return $pageURL;\n"..
  477. " }\n"..
  478. " }\n"..
  479. "\n"..
  480. " if (!function_exists('currentPageLocation')) {\n"..
  481. " // Gets current page parent location\n"..
  482. " function currentPageLocation() {\n"..
  483. "\n"..
  484. " $currentPageURL = currentPageURL();\n"..
  485. " $returnURL = '';\n"..
  486. "\n"..
  487. " $finalSlash = strrpos(currentPageURL(), '/');\n"..
  488. " if (strrpos($currentPageURL, '.') > strrpos($currentPageURL, '/')) // has a file after the final slash, e.g. http://url/directory/index.php\n"..
  489. " $returnURL = substr($currentPageURL, 0, $finalSlash);\n"..
  490. " else if (strrpos($currentPageURL, '?') > strrpos($currentPageURL, '/')) // has a ? after the final slash, e.g. http://url/directory/index.php\n"..
  491. " $returnURL = substr($currentPageURL, 0, $finalSlash);\n"..
  492. " else if ($finalSlash == strlen($currentPageURL)-1) // final character is a slash, e.g. http://url/directory/\n"..
  493. " $returnURL = substr($currentPageURL, 0, $finalSlash);\n"..
  494. " else // final character is not a slash, e.g. http://url/directory\n"..
  495. " $returnURL = $currentPageURL;\n"..
  496. "\n"..
  497. " return $returnURL;\n"..
  498. " }\n"..
  499. " }\n"..
  500. "\n"..
  501. " if (!function_exists('currentPageName')) {\n"..
  502. " // Gets current page name.\n"..
  503. " function currentPageName() {\n"..
  504. " return substr($_SERVER[\"SCRIPT_NAME\"],strrpos($_SERVER[\"SCRIPT_NAME\"],\"/\")+1);\n"..
  505. " }\n"..
  506. " }\n"..
  507. "\n"..
  508. " if (!function_exists('truncate')) {\n"..
  509. " // Truncates string to length.\n"..
  510. " function truncate($str, $len=70) {\n"..
  511. " if (strlen($str) > $len) {\n"..
  512. " return substr($str, 0, $len-2) . '…';\n"..
  513. " } else {\n"..
  514. " return $str;\n"..
  515. " }\n"..
  516. " }\n"..
  517. " }\n"..
  518. "\n"..
  519. " // Set constants for use in PHPlugins\n"..
  520. " define(\"PAGEIMAGE\", ".. pageImage ..");\n"..
  521. " define(\"CURRENTPAGEURL\", currentPageURL());\n"..
  522. " define(\"CURRENTPAGELOCATION\", currentPageLocation());\n"..
  523. " define(\"CURRENTPAGENAME\", currentPageName());\n"..
  524. " define(\"ALBUMTITLE\", ".. albumTitleVal ..");\n"..
  525. " if (!defined('TTG_SITE')) {\n"..
  526. " define(\"TTG_SITE\", \"".. M.page_setup.site.root .."\");\n"..
  527. " }\n"..
  528. "?".. ">")
  529. end
  530. if publish and M.is.php and M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' and not cart then --[[ setup Bit.ly URL shortening ]]
  531. --[[ https://bitly.com/a/your_api_key ]]
  532. write ("<?php\n"..
  533. "/* returns the shortened url */\n"..
  534. "if (!function_exists('get_bitly_short_url')) {\n"..
  535. " function get_bitly_short_url($url,$login,$appkey,$format='txt') {\n"..
  536. " $connectURL = 'http://api.bit.ly/v3/shorten?login='.$login.'&apiKey='.$appkey.'&uri='.urlencode($url).'&format='.$format;\n"..
  537. " return curl_get_result($connectURL);\n"..
  538. " }\n"..
  539. "}\n"..
  540. "/* returns expanded url */\n"..
  541. "if (!function_exists('get_bitly_long_url')) {\n"..
  542. " function get_bitly_long_url($url,$login,$appkey,$format='txt') {\n"..
  543. " $connectURL = 'http://api.bit.ly/v3/expand?login='.$login.'&apiKey='.$appkey.'&shortUrl='.urlencode($url).'&format='.$format;\n"..
  544. " return curl_get_result($connectURL);\n"..
  545. " }\n"..
  546. "}\n"..
  547. "/* returns a result form url */\n"..
  548. "if (!function_exists('curl_get_result')) {\n"..
  549. " function curl_get_result($url) {\n"..
  550. " $ch = curl_init();\n"..
  551. " $timeout = 5;\n"..
  552. " curl_setopt($ch,CURLOPT_URL,$url);\n"..
  553. " curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\n"..
  554. " curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\n"..
  555. " $data = curl_exec($ch);\n"..
  556. " curl_close($ch);\n"..
  557. " return $data;\n"..
  558. " }\n"..
  559. "}\n"..
  560. "/* get the short url */\n"..
  561. "$short_url = get_bitly_short_url(currentPageLocation(),'".. M.sharing.bitly.username .."','".. M.sharing.bitly.apikey .."');\n"..
  562. "/* get the long url from the short one */\n"..
  563. "$long_url = get_bitly_long_url($short_url,'".. M.sharing.bitly.username .."','".. M.sharing.bitly.apikey .."');\n"..
  564. "?".. ">")
  565. end
  566. --[[ Insert just before DOCTYPE ]]
  567. if M.password.enable and mode == 'publish' and not publisher and not cart then
  568. write ("<?php\n" ..
  569. "// PHP Password Protection Script\n" ..
  570. "// developed by john bishop images (http://johnbishopimages.com)\n" ..
  571. "// for Matthew Campagna at http://theturninggate.net\n" ..
  572. "\n" ..
  573. "/* * * * * START OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * */\n" ..
  574. "// Ensure page and cookies are not cached by the browser or gateways, proxy servers, etc\n" ..
  575. "\n" ..
  576. "header('Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate');\n" ..
  577. "header('Cache-Control: no-cache=\"set-cookie\"', false);\n" ..
  578. "header('Cache-Control: post-check=0, pre-check=0', false);\n" ..
  579. "header('Pragma: no-cache');\n" ..
  580. "header('Expires: -1');\n" ..
  581. "\n" ..
  582. "/* * * * * END OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * * */\n" ..
  583. "\n" ..
  584. "$product = \"PHP Password Protection Script\"; // Set module name\n" ..
  585. "$file_ver = '2.1.0'; // Set plugin/module/file version\n" ..
  586. "\n" ..
  587. "$path_self = $_SERVER['PHP_SELF']; // Develop pathname\n" ..
  588. "$path_self = substr($path_self, 0, strripos($path_self, '/'));\n" ..
  589. "$path_lock = \"_ttg_lock_\" . md5($path_self); // lockname = hash(pathname))\n" ..
  590. "\n" ..
  591. "$master_lock = \"_ttg_lock_master_\"; // master lock\n" ..
  592. "\n" ..
  593. "// Define your username and password\n" ..
  594. "$username = " .. login_user .. "\n" ..
  595. "$password = " .. login_password .. "\n" ..
  596. "\n" ..
  597. "// Define master key in use or not and master username and password\n" ..
  598. "$master_used = true; // Set true to use master user and pswd; false otherwise\n" ..
  599. "$master_name = '" .. M.password.login.master_username .. "'; // Do not leave empty if\n" ..
  600. "$master_pswd = '" .. M.password.login.master_password .. "'; // $master_used == true.\n"..
  601. "\n" ..
  602. "// Set lock state to value returned by browser or ''\n" ..
  603. "$ttg_lockey = isset($_COOKIE[$path_lock]) ? $_COOKIE[$path_lock] : \"\";\n" ..
  604. "$master_key = isset($_COOKIE[$master_lock]) ? $_COOKIE[$master_lock] : \"\";\n" ..
  605. "\n" ..
  606. "// Pick up any username or password returned\n" ..
  607. "$ttg_username = isset($_POST[\"ttg_username\"]) ? $_POST[\"ttg_username\"] : \"\";\n" ..
  608. "$ttg_password = isset($_POST[\"ttg_password\"]) ? $_POST[\"ttg_password\"] : \"\";\n" ..
  609. "\n" ..
  610. "// Assume not logged in ...\n" ..
  611. "$logged_in = false;\n" ..
  612. "\n" ..
  613. "// We are already logged in ...\n" ..
  614. "if (($ttg_lockey == \"OPEN\") | ($master_key == \"OPEN\")) {\n" ..
  615. " $logged_in = true;\n" ..
  616. "}\n" ..
  617. "\n" ..
  618. "else {\n" ..
  619. " if (($ttg_username == $username) & ($ttg_password == $password)) {\n" ..
  620. " // username and password match - save a cookie for this path ...\n" ..
  621. " setcookie($path_lock, \"OPEN\", 0, \"/\");\n" ..
  622. " $logged_in = true;\n" ..
  623. " }\n" ..
  624. " else {\n" ..
  625. " // username and password dont match - clear cookie for this path ...\n" ..
  626. " setcookie($path_lock, false, time()-86400, \"/\");\n" ..
  627. " }\n" ..
  628. " if ($master_used & ($ttg_username == $master_name) & ($ttg_password == $master_pswd)) {\n" ..
  629. " // master passkey given - set master lock \n" ..
  630. " setcookie($master_lock, \"OPEN\", 0, \"/\");\n" ..
  631. " $logged_in = true;\n" ..
  632. " }\n" ..
  633. " else {\n" ..
  634. " // master passkey not given - clear master lock\n" ..
  635. " setcookie($master_lock, false, time()-86400, \"/\");\n" ..
  636. " }\n" ..
  637. "}\n" ..
  638. "\n" ..
  639. "$logout = trim($_SERVER[\"QUERY_STRING\"]);\n" ..
  640. "if ($logout == 'logout') {\n" ..
  641. " setcookie($path_lock, false, time()-86400, \"/\");\n" ..
  642. " setcookie($master_lock, false, time()-86400, \"/\");\n" ..
  643. " $logged_in = false;\n" ..
  644. "}\n" ..
  645. "\n" ..
  646. "// End PHP Password Protection Script" .. " ?" .. ">" )
  647. end
  648. if cart and mode == 'publish' then
  649. write ("<?php\n"..
  650. "/* * * * * START OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * */\n"..
  651. "// Ensure page and cookies are not cached by the browser or gateways, proxy servers, etc.\n"..
  652. "header('Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate');\n"..
  653. "header('Cache-Control: no-cache=\"set-cookie\"', false);\n"..
  654. "header('Cache-Control: post-check=0, pre-check=0', false);\n"..
  655. "header('Pragma: no-cache');\n"..
  656. "header('Expires: -1');\n"..
  657. "/* * * * * END OF HEADER PROCESSING * * * * * * * * * * * * * * * * * * * * * * * * * * */\n"..
  658. "?".. ">") end
  659. write( [[<!DOCTYPE html>
  660. <!--]] .. "[" .. [[if lt IE 7]] .. "]" .. [[><html class="ce4 no-js lt-ie9 lt-ie8 lt-ie7" dir="]] )write( M.page_setup.html.dir )write( [[" lang="]] )write( M.page_setup.html.lang )write( [[" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><!]] .. "[" .. [[endif]] .. "]" .. [[-->
  661. <!--]] .. "[" .. [[if IE 7]] .. "]" .. [[><html class="ce4 no-js lt-ie9 lt-ie8" dir="]] )write( M.page_setup.html.dir )write( [[" lang="]] )write( M.page_setup.html.lang )write( [[" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><!]] .. "[" .. [[endif]] .. "]" .. [[-->
  662. <!--]] .. "[" .. [[if IE 8]] .. "]" .. [[><html class="ce4 no-js lt-ie9" dir="]] )write( M.page_setup.html.dir )write( [[" lang="]] )write( M.page_setup.html.lang )write( [[" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><!]] .. "[" .. [[endif]] .. "]" .. [[-->
  663. <!--]] .. "[" .. [[if gt IE 8]] .. "]" .. [[><!--><html class="ce4 no-js ]] ) if M.nonCSS.like.ie8 then write( [[lt-ie9]] ) else write( [[gt-ie8]] ) end write( [[" dir="]] )write( M.page_setup.html.dir )write( [[" lang="]] )write( M.page_setup.html.lang )write( [[" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><!--<!]] .. "[" .. [[endif]] .. "]" .. [[-->
  664. <head>
  665. <meta charset="]] )write( M.page_setup.html.charset )write( [[" />
  666. <!--]] .. "[" .. [[if IE]] .. "]" .. [[><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><!]] .. "[" .. [[endif]] .. "]" .. [[-->
  667. ]] ) if M.page_setup.html.robots == 'disallow' or M.password.enable then write( [[
  668. <meta name="robots" content="noarchive, noindex, nofollow" />
  669. ]] ) end write( [[
  670. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  671. ]] ) if M.page_setup.meta.author ~= "" then write( [[
  672. <meta name="author" content="]] )write( M.page_setup.meta.author )write( [[" />
  673. ]] ) end write( [[
  674. <meta name="title" content="]] )write( pageTitle )write( [[" />
  675. ]] ) if publisher or M.album.description ~= "" then write( [[
  676. <meta name="description" content="]] )write( pageDescription )write( [[" />
  677. ]] ) end write( [[
  678. <meta name="generator" content="]] )write( M.engine.name )write( [[ ]] )write( M.engine.version )write( [[, ]] ) if publisher then write( [[via Publisher]] ) else write( numImages )write( [[ published image]] ) if numImages ~= 1 then write( [[s]] ) end end write( [[" />
  679. ]] ) if M.page_setup.meta.keywords ~= "" then write( [[
  680. <meta name="keywords" content="]] )write( M.page_setup.meta.keywords )write( [[" />
  681. ]] ) end write( [[
  682. <meta name="apple-mobile-web-app-capable" content="yes" />
  683. <meta name="HandheldFriendly" content="True" />
  684. <meta name="MobileOptimized" content="320" />
  685. <meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" />
  686. ]] ) if M.page_setup.googleWebmasterTools.id ~= '' then write( [[
  687. <meta name="google-site-verification" content="]] )write( M.page_setup.googleWebmasterTools.id )write( [[" />
  688. ]] ) end write( [[
  689. <title>]] )write( pageTitle )write( [[</title>
  690. ]] ) if publish and (M.sharing.ogp or M.sharing.display) and not cart then write( [[
  691. <!-- Open Graph Protocol (Facebook) and Twitter Information -->
  692. <!-- http://developers.facebook.com/tools/debug -->
  693. <link rel="image_src" href="]] ) write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">") write( [[photos/]] )write( pageImageFile )write( [[" />
  694. <meta property="og:description" content="]] )write( socialDescription )write( [[" />
  695. <meta property="og:image" content="]] ) write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">") write( [[photos/]] )write( pageImageFile )write( [[" />
  696. <meta property="og:site_name" content="]] )write( M.page_setup.html.title )write( [[" />
  697. <meta property="og:type" content="website" />
  698. <meta property="og:title" content="]] )write( socialTitle )write( [[" />
  699. ]] ) if single then write( [[
  700. <meta property="og:url" content="]] ) write("<?php echo currentPageURL(); ".."?"..">") write( [[" />
  701. ]] ) else write( [[
  702. <meta property="og:url" content="]] ) write("<?php echo currentPageLocation(); ".."?"..">") write( [[/" />
  703. ]] ) end write( [[
  704. <!-- https://dev.twitter.com/docs/cards/preview -->
  705. <meta name="twitter:card" value="]] ) if not publisher and pageImageFile == '????????.DNG' then write( [[summary]] ) else write( [[summary_large_image]] ) end write( [[" />
  706. ]] ) if M.sharing.twitter.creator ~= "" then write( [[
  707. <meta name="twitter:creator" value="@]] )write( M.sharing.twitter.creator )write( [[" />
  708. ]] ) end write( [[
  709. <meta name="twitter:description" value="]] )write( socialDescription )write( [[" />
  710. <meta name="twitter:image" value="]] ) write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">") write( [[photos/]] )write( pageImageFile )write( [[" />
  711. <meta name="twitter:image:src" value="]] ) write("<?php echo ($album ? $album->getURL() : currentPageLocation().'/'); ".."?"..">") write( [[photos/]] )write( pageImageFile )write( [[" />
  712. <meta name="twitter:site" value="@]] )write( M.sharing.twitter.creator )write( [[" />
  713. <meta name="twitter:title" value="]] )write( socialTitle )write( [[" />
  714. ]] ) if single then write( [[
  715. <meta name="twitter:url" value="]] ) write("<?php echo currentPageURL(); ".."?"..">") write( [[" />
  716. ]] ) else write( [[
  717. <meta name="twitter:url" value="]] ) write("<?php echo currentPageLocation(); ".."?"..">") write( [[/" />
  718. ]] ) end write( [[
  719. ]] ) if single then write( [[
  720. <link rel="canonical" href="]] ) write("<?php echo currentPageURL(); ".."?"..">") write( [[" />
  721. ]] ) else write( [[
  722. <link rel="canonical" href="]] ) write("<?php echo currentPageLocation(); ".."?"..">") write( [[/" />
  723. ]] ) end write( [[
  724. ]] ) end write( [[
  725. ]] ) if mode == 'publish' and M.page_setup.blog.feed ~= "" then write( [[
  726. <link rel="alternate" type="application/rss+xml" title="]] )write( M.page_setup.blog.title )write( [[" href="]] )write( M.page_setup.blog.feed )write( [[" />
  727. ]] ) end write( [[
  728. ]] ) if M.page_setup.appletouchicon.address ~= "" then write( [[
  729. <link rel="apple-touch-icon-precomposed" href="]] ) if M.page_setup.appletouchicon.address == '... apple-touch-icon.png' then write( sharedResources )write( [[/images/apple-touch-icon.png]] ) else write( M.page_setup.appletouchicon.address ) end write( [[" />
  730. ]] ) end write( [[
  731. ]] ) if M.page_setup.favicon.address ~= "" then write( [[
  732. <link rel="icon" type="image/x-icon" href="]] ) if M.page_setup.favicon.address == '... favicon.ico' then write( sharedResources )write( [[/images/favicon.ico]] ) else write( M.page_setup.favicon.address ) end write( [[" />
  733. ]] ) end write( [[
  734. ]] ) if mode == 'publish' and not cart and not mobile and not single then write( [[
  735. <script>
  736. if (screen.width < 768 || navigator.userAgent.match(/Android|Blackberry|SymbianOS|iPhone|iPod|iPad/i)){
  737. window.location.replace('mobile.]] ) if M.is.php or publisher then write( [[php]] ) else write( [[html]] ) end if publisher then write("<?php echo isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ? '?'.$_SERVER['QUERY_STRING'] : ''; ".."?"..">") end write( [['); }
  738. </script>
  739. ]] ) end write( [[
  740. <link rel="stylesheet" type="text/css" media="all" href="]] )write( sharedResources )write( [[/css/scaffolding.min.css" />
  741. <link rel="stylesheet" type="text/css" media="all" href="]] )write( sharedResources )write( [[/css/font-awesome.min.css" />
  742. ]] )
  743. if mode == 'preview' then write( [[
  744. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/01-typography.css" />
  745. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/02-page-structure.css" />
  746. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/03-masthead.css" />
  747. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/05-social-media-profiles.css" />
  748. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/05-social-media-sharing.css" />
  749. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/06-footer.css" />
  750. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/07-the-block.css" />
  751. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/08-the-grid.css" />
  752. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/09-grid-layout.css" />
  753. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/10-presentation.css" />
  754. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/20-pagination.css" />
  755. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/100-miscellaneous.css" />
  756. ]] ) if major <= 5 then write( [[
  757. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/101-gradients-for-LR-preview.css" />
  758. ]] ) end write( [[
  759. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/04-navigation-01.css" />
  760. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/04-navigation-02.css" />
  761. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/04-navigation-03.css" />
  762. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/04-navigation-04.css" />
  763. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/04-navigation-05.css" />
  764. ]] ) else write( [[
  765. <link rel="stylesheet" type="text/css" media="all" href="]] )write( sharedResources )write( [[/css/style-common.css" />
  766. <link rel="stylesheet" type="text/css" media="all" href="]] )write( resources )write( [[/css/style-component.css" />
  767. ]] ) if cart and publish then
  768. write(" <?php HTMLHelper::stylesheet('cart.css'); ".."?"..">")
  769. write(" <?php HTMLHelper::stylesheet('modal.css'); ".."?"..">")
  770. end write( [[
  771. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  772. "$add_mode = true;\n"..
  773. "if ( function_exists('ttg_style_navigation') ) {\n"..
  774. " if ( !(ttg_style_navigation( TTG_COMP, TTG_ROOT )) ) {\n"..
  775. " $add_mode = false;\n"..
  776. " }\n"..
  777. "}\n"..
  778. "if ( $add_mode ) { ".."?"..">") end write( [[
  779. ]] ) if M.navigation.display then write( [[
  780. <link rel="stylesheet" type="text/css" media="screen" href="]] )write( sharedResources )write( [[/css/navigation.css" />
  781. ]] ) end --[[ navigation.display ]] write( [[
  782. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_style_navigation ]] write( [[
  783. ]] ) end --[[ style ]] write( [[
  784. <link rel="stylesheet" type="text/css" media="print" href="]] )write( sharedResources )write( [[/css/print.css" />
  785. <script src="]] )write( sharedResources )write( [[/js/modernizr.custom.79601.js"></script>
  786. <script src="]] )write( sharedResources )write( [[/js/jquery-1.11.3.min.js"></script>
  787. <script src="]] )write( sharedResources )write( [[/js/jquery.ba-throttle-debounce.min.js"></script>
  788. <script src="]] )write( sharedResources )write( [[/js/init.head.min.js"></script>
  789. ]] ) if cart and publish then write( [[
  790. <script>
  791. var continueLocation = ']] )write( [[<?php echo isset($_SESSION]] .. "[" .. [['referer']] .. "]" .. [[)?$_SESSION]] .. "[" .. [['referer']] .. "]" .. [[:' / '; ?>]] )write( [[';
  792. </script>
  793. ]] ) write(" <?php HTMLHelper::script('cart.js'); ".."?"..">")
  794. end write( [[
  795. ]] ) if single then write( [[
  796. <script>
  797. // if referrer is mobile, return to mobile
  798. $(document).ready(function() {
  799. // var hash = window.location.hash;
  800. var vars = ]] .. "[]" .. [[, hash,
  801. q = document.URL.split('?')]] .. "[" .. [[1]] .. "]" .. [[;
  802. if(q != undefined){
  803. q = q.split('&');
  804. for(var i = 0; i < q.length; i++){
  805. hash = q]] .. "[" .. [[i]] .. "]" .. [[.split('=');
  806. vars.push(hash]] .. "[" .. [[1]] .. "]" .. [[);
  807. vars]] .. "[" .. [[hash]] .. "[" .. [[0]] .. "]]" .. [[ = hash]] .. "[" .. [[1]] .. "]" .. [[;
  808. }
  809. }
  810. $("#single-image-slide a").on("click", function(e){
  811. if(vars]] .. "[" .. [['mobile']] .. "]" .. [[){
  812. e.preventDefault();
  813. location.href=$("#single-image-slide a").attr("href") + "?mobile=true";
  814. }
  815. });
  816. $("li.index a").on("click", function(e){
  817. if(vars]] .. "[" .. [['mobile']] .. "]" .. [[){
  818. e.preventDefault();
  819. location.href="mobile.]] ) if M.is.php or publisher then write( [[php]] ) else write( [[html]] ) end write( [[#cell-" + $("#single-image-slide img").attr("id");
  820. }
  821. });
  822. $("li.next a").on("click", function(e){
  823. if(vars]] .. "[" .. [['mobile']] .. "]" .. [[){
  824. e.preventDefault();
  825. location.href=$("li.next a").attr("href") + "?mobile=true";
  826. }
  827. });
  828. $("li.previous a").on("click", function(e){
  829. if(vars]] .. "[" .. [['mobile']] .. "]" .. [[){
  830. e.preventDefault();
  831. location.href=$("li.previous a").attr("href") + "?mobile=true";
  832. }
  833. });
  834. ]] ) if M.imageDownload.enable then write( [[
  835. if(vars]] .. "[" .. [['mobile']] .. "]" .. [[){
  836. ]] ) if M.fotomoto.integration.enabled and not M.cart.integration.enabled then write( [[
  837. $(".single-image-download,.single-cart-button").hide();
  838. ]] ) else write( [[
  839. $(".single-image-download").hide();
  840. ]] ) end write( [[
  841. }
  842. ]] ) end write( [[
  843. });
  844. </script>
  845. ]] ) end write( [[
  846. ]] ) if mode == 'publish' and M.cart.integration.enabled and not cart then write( [[
  847. <script>
  848. var options = {
  849. magnific_exists: true,
  850. cart_url: ']] )write( M.cart.integration.path )write( [[',
  851. ]] ) if publisher then write( [[
  852. pricing_scheme: ']] ) write("<?php echo $album->getPricingScheme(); ".."?"..">") write( [[',
  853. ]] ) else write( [[
  854. pricing_scheme: ']] )write( M.cart.integration.pricing )write( [[',
  855. ]] ) end write( [[
  856. local_js_path: ']] )write( resources )write( [[/js/',
  857. button_html: '',
  858. gallery_selector: '#page-body',
  859. cart_button_selector: '.add-to-cart',
  860. };
  861. // Do not edit below this line
  862. options]] .. "[" .. [['cart_url']] .. "]" .. [[ += (options]] .. "[" .. [['cart_url']] .. "][" .. [[options]] .. "[" .. [['cart_url']] .. "]" .. [[.length-1]] .. "]" .. [[)!='/'?'/':'';
  863. $(function() {
  864. jQuery.getScript(options]] .. "[" .. [['cart_url']] .. "]" .. [[ + 'lib/js/jquery.ttgcart-ce4.js', function() {
  865. if (!("TTGCart" in window)) {
  866. return;
  867. }
  868. $('body').ttgcart(options);
  869. options]] .. "[" .. [['cart_button_selector']] .. "]" .. [[ = '.add-package-to-cart';
  870. $('body').ttgpackage(options);
  871. });
  872. });
  873. </script>
  874. ]] ) end write( [[
  875. ]] ) if mode == 'publish' and M.page_setup.googleAnalytics.id ~= '' then write( [[
  876. <!-- Google Analytics -->
  877. <script>
  878. (function(i,s,o,g,r,a,m){i]] .. "[" .. [['GoogleAnalyticsObject']] .. "]" .. [[=r;i]] .. "[" .. [[r]] .. "]" .. [[=i]] .. "[" .. [[r]] .. "]" .. [[||function(){
  879. (i]] .. "[" .. [[r]] .. "]" .. [[.q=i]] .. "[" .. [[r]] .. "]" .. [[.q||]] .. "[]" .. [[).push(arguments)},i]] .. "[" .. [[r]] .. "]" .. [[.l=1*new Date();a=s.createElement(o),
  880. m=s.getElementsByTagName(o)]] .. "[" .. [[0]] .. "]" .. [[;a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  881. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  882. ga('create', ']] )write( M.page_setup.googleAnalytics.id )write( [[');
  883. ga('send', 'pageview');
  884. </script>
  885. <!-- End Google Analytics -->
  886. ]] ) end write( [[
  887. <!--]] .. "[" .. [[if (gte IE 6)&(lte IE 8)]] .. "]" .. [[>
  888. <script src="]] )write( sharedResources )write( [[/js/respond.min.js"></script>
  889. <!]] .. "[" .. [[endif]] .. "]" .. [[-->
  890. <!--]] .. "[" .. [[if (lte IE 10)]] .. "]" .. [[>
  891. <!]] .. "[" .. [[endif]] .. "]" .. [[-->
  892. ]] ) if publish and M.phplugins.enable then write ("<?php\n" ..
  893. "if ( function_exists('ttg_head_end') ) {\n"..
  894. " $void = ttg_head_end( TTG_COMP, TTG_ROOT );\n"..
  895. "} ".."?"..">") end --[[ ttg_head_end ]] write( [[
  896. </head>
  897. <body class="]] ) if M.cart.integration.enabled and mode == 'publish' then write( [[cart-unready ]] ) end write( [[clearfix">
  898. ]] ) if publish and M.phplugins.enable then write ("<?php\n"..
  899. "if ( function_exists('ttg_body_top') ) {\n"..
  900. " $void = ttg_body_top( TTG_COMP, TTG_ROOT );\n"..
  901. "} ".."?"..">") end --[[ ttg_body_top ]] write( [[
  902. <div id="body-mantle" class="body-mantle clearfix">
  903. <div id="body-core" class="body-core clearfix">
  904. ]] ) if M.masthead.orphan or (M.navigation.orphan and M.navigation.type ~= "column") then write( [[
  905. <div id="body-core-outer" class="body-core-outer clearfix">
  906. ]] ) if M.masthead.orphan and not M.masthead.drop then write( [[
  907. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  908. "$add_mode = true;\n"..
  909. "if ( function_exists('ttg_header_masthead') ) {\n"..
  910. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  911. " $add_mode = false;\n"..
  912. " }\n"..
  913. "}\n"..
  914. "if ( $add_mode ) { ".."?"..">") end write( [[
  915. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else write( [[
  916. ]] ) if M.masthead.display and M.identityplate.role ~= "integrated" then write( [[
  917. <div id="masthead" class="block-id masthead clearfix">
  918. <div class="mantle clearfix">
  919. <div class="core clearfix">
  920. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  921. <div id="profile-image" class="profile-image clearfix">
  922. <div id="profile-icon" class="profile-icon clearfix">
  923. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a>
  924. </div>
  925. <div id="profile-labels" class="profile-labels clearfix">
  926. ]] ) end write( [[
  927. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then write( [[
  928. <h1><span><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [[">]] )write( M.masthead.h1.label )write( [[</a></span></h1>
  929. ]] ) elseif M.masthead.h1.label ~= '' then write( [[
  930. <h1><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[</span></a></h1>
  931. ]] ) end write( [[
  932. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then write( [[
  933. <h2><span>]] )write( M.masthead.h2.label )write( [[</span></h2>
  934. ]] ) elseif M.masthead.h2.label ~= '' then write( [[
  935. <h2><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a></h2>
  936. ]] ) end write( [[
  937. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  938. </div>
  939. </div><!-- #profile-image -->
  940. ]] ) end write( [[
  941. </div>
  942. </div>
  943. ]] ) if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then write( [[
  944. ]] ) if M.social_media.display then write( [[
  945. <div class="social-media-profiles social-media clearfix">
  946. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  947. <div class="mantle clearfix">
  948. <div class="core clearfix">
  949. ]] ) end --[[ masthead ]] write( [[
  950. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  951. "$add_mode = true;\n"..
  952. "if ( function_exists('ttg_social_media') ) {\n"..
  953. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  954. " $add_mode = false;\n"..
  955. " }\n"..
  956. "}\n"..
  957. "if ( $add_mode ) { ".."?"..">") end write( [[
  958. <ul class="clearfix">
  959. ]] ) if M.social_media.profiles.label ~= '' then write( [[
  960. <li class="social-media-label"><span>]] )write( M.social_media.profiles.label )write( [[</span></li>
  961. ]] ) end write( [[
  962. ]] ) if M.social_media.profiles.user ~= '' then write( [[
  963. <li class="social-bg user"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.user ) end write( [["]] )write( newWindow )write( [[><i class="fa fa-user"></i></a></li>
  964. ]] ) end write( [[
  965. ]] ) if M.social_media.profiles.aboutme ~= '' then write( [[
  966. <li class="social-bg about-me"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.aboutme ) end write( [["]] )write( newWindow )write( [[ title="About.me"><span>me</span></a></li>
  967. ]] ) end write( [[
  968. ]] ) if M.social_media.profiles.pinterest ~= '' then write( [[
  969. <li class="social-bg pinterest"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.pinterest ) end write( [["]] )write( newWindow )write( [[ title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  970. ]] ) end write( [[
  971. ]] ) if M.social_media.profiles.google_plus ~= '' then write( [[
  972. <li class="social-bg google-plus"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.google_plus )write( [[?rel=author]] ) end write( [["]] )write( newWindow )write( [[ title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  973. ]] ) end write( [[
  974. ]] ) if M.social_media.profiles.twitter ~= '' then write( [[
  975. <li class="social-bg twitter"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.twitter ) end write( [["]] )write( newWindow )write( [[ title="Twitter"><i class="fa fa-twitter"></i></a></li>
  976. ]] ) end write( [[
  977. ]] ) if M.social_media.profiles.linkedin ~= '' then write( [[
  978. <li class="social-bg linkedin"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.linkedin ) end write( [["]] )write( newWindow )write( [[ title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  979. ]] ) end write( [[
  980. ]] ) if M.social_media.profiles.facebook ~= '' then write( [[
  981. <li class="social-bg facebook"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.facebook ) end write( [["]] )write( newWindow )write( [[ title="Facebook"><i class="fa fa-facebook"></i></a></li>
  982. ]] ) end write( [[
  983. ]] ) if M.social_media.profiles.instagram ~= '' then write( [[
  984. <li class="social-bg instagram"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.instagram ) end write( [["]] )write( newWindow )write( [[ title="Instagram"><i class="fa fa-instagram"></i></a></li>
  985. ]] ) end write( [[
  986. ]] ) if M.social_media.profiles.tumblr ~= '' then write( [[
  987. <li class="social-bg tumblr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.tumblr ) end write( [["]] )write( newWindow )write( [[ title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  988. ]] ) end write( [[
  989. ]] ) if M.social_media.profiles.vsco_grid ~= '' then write( [[
  990. <li class="social-bg vsco-grid"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vsco_grid ) end write( [["]] )write( newWindow )write( [[ title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  991. ]] ) end write( [[
  992. ]] ) if M.social_media.profiles.flickr ~= '' then write( [[
  993. <li class="social-bg flickr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.flickr ) end write( [["]] )write( newWindow )write( [[ title="Flickr"><i class="fa fa-flickr"></i></a></li>
  994. ]] ) end write( [[
  995. ]] ) if M.social_media.profiles.behance ~= '' then write( [[
  996. <li class="social-bg behance"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.behance ) end write( [["]] )write( newWindow )write( [[ title="Behance"><i class="fa fa-behance"></i></a></li>
  997. ]] ) end write( [[
  998. ]] ) if M.social_media.profiles.vimeo ~= '' then write( [[
  999. <li class="social-bg vimeo"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vimeo ) end write( [["]] )write( newWindow )write( [[ title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1000. ]] ) end write( [[
  1001. ]] ) if M.social_media.profiles.youtube ~= '' then write( [[
  1002. <li class="social-bg youtube"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.youtube ) end write( [["]] )write( newWindow )write( [[ title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1003. ]] ) end write( [[
  1004. ]] ) if M.social_media.profiles.rss ~= '' then write( [[
  1005. <li class="social-bg rss"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.rss ) end write( [["]] )write( newWindow )write( [[ title="RSS"><i class="fa fa-rss"></i></a></li>
  1006. ]] ) end write( [[
  1007. </ul>
  1008. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] write( [[
  1009. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1010. </div>
  1011. </div>
  1012. ]] ) end --[[ masthead ]] write( [[
  1013. </div> <!-- #social-media-profiles -->
  1014. ]] ) end --[[ social_media.display ]] write( [[
  1015. ]] ) end write( [[
  1016. </div> <!-- #masthead -->
  1017. ]] ) end --[[ masthead.display ]] write( [[
  1018. ]] ) end --[[ help ]] write( [[
  1019. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] write( [[
  1020. ]] ) end --[[ masthead.orphan ]] write( [[
  1021. ]] ) if M.navigation.orphan then write( [[
  1022. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1023. "$add_mode = true;\n"..
  1024. "if ( function_exists('ttg_header_navigation') ) {\n"..
  1025. " if ( !(ttg_header_navigation( TTG_COMP, TTG_ROOT )) ) {\n"..
  1026. " $add_mode = false;\n"..
  1027. " }\n"..
  1028. "}\n"..
  1029. "if ( $add_mode ) { ".."?"..">") end write( [[
  1030. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then else write( [[
  1031. ]] ) if M.navigation.display then write( [[
  1032. <div id="navigation-container" class="navigation-container clearfix">
  1033. ]] ) if M.navigation.spurs.enable and not M.navigation.orphan then write( [[
  1034. <div class="navigation-left-spur"></div>
  1035. ]] ) if M.navigation.type ~= 'column' then write( [[
  1036. <div class="navigation-right-spur"></div>
  1037. ]] ) end end write( [[
  1038. <div id="navigation" class="block-id navigation clearfix">
  1039. <div class="mantle clearfix">
  1040. <div class="core clearfix">
  1041. <div id="navigation-background">
  1042. <div id="r2d2-menu" class="clearfix">
  1043. <ul id="pull">
  1044. ]] ) if M.identityplate.role == "integrated" then write( [[
  1045. <li id="integrated-mobile" class="ip-]] )write( M.identityplate.on )write( [[">
  1046. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1047. </li>
  1048. ]] ) end write( [[
  1049. <li><span> </span></li>
  1050. <li><span> </span></li>
  1051. <li><span> </span></li>
  1052. <li><span> </span></li>
  1053. <li id="open-nav"><a href="#r2d2-menu">]] ) if M.metadata.collapsed_label.navigation == "" then write( [[<i class="fa fa-reorder"></i>]] ) else write( [[<span style="display:block;font-size:14px;">]] )write( M.metadata.collapsed_label.navigation )write( [[</span>]] ) end write( [[</a></li>
  1054. <li id="close-nav"><a href="#">]] ) if M.metadata.collapsed_label.navigation == "" then write( [[<i class="fa fa-times"></i>]] ) else write( [[<span style="display:block;font-size:14px;">]] )write( M.metadata.collapsed_label.navigation )write( [[</span>]] ) end write( [[</a></li>
  1055. </ul><!-- #pull -->
  1056. ]] ) if M.navigation.type == 'single-level' then write( [[
  1057. <p id="nav">
  1058. ]] ) if M.identityplate.role == "integrated" then write( [[
  1059. <span id="integrated-identity" class="ip-]] )write( M.identityplate.on )write( [[">
  1060. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1061. </span>
  1062. ]] ) end write( [[
  1063. ]] ) if M.nav_link.nav_01.label ~= "" then write( [[ <span><a href="]] )write( menuTarget01 )write( [["]] ) if M.nav_link.nav_01.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_01.label )write( [[</a></span>
  1064. ]] ) end write( [[
  1065. ]] ) if M.nav_link.nav_02.label ~= "" then write( [[ <span><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a></span>
  1066. ]] ) end write( [[
  1067. ]] ) if M.nav_link.nav_03.label ~= "" then write( [[ <span><a href="]] )write( menuTarget03 )write( [["]] ) if M.nav_link.nav_03.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_03.label )write( [[</a></span>
  1068. ]] ) end write( [[
  1069. ]] ) if M.nav_link.nav_04.label ~= "" then write( [[ <span><a href="]] )write( menuTarget04 )write( [["]] ) if M.nav_link.nav_04.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_04.label )write( [[</a></span>
  1070. ]] ) end write( [[
  1071. ]] ) if M.nav_link.nav_05.label ~= "" then write( [[ <span><a href="]] )write( menuTarget05 )write( [["]] ) if M.nav_link.nav_05.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_05.label )write( [[</a></span>
  1072. ]] ) end write( [[
  1073. ]] ) if M.nav_link.nav_06.label ~= "" then write( [[ <span><a href="]] )write( menuTarget06 )write( [["]] ) if M.nav_link.nav_06.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_06.label )write( [[</a></span>
  1074. ]] ) end write( [[
  1075. ]] ) if M.nav_link.nav_07.label ~= "" then write( [[ <span><a href="]] )write( menuTarget07 )write( [["]] ) if M.nav_link.nav_07.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_07.label )write( [[</a></span>
  1076. ]] ) end write( [[
  1077. ]] ) if M.nav_link.nav_08.label ~= "" then write( [[ <span><a href="]] )write( menuTarget08 )write( [["]] ) if M.nav_link.nav_08.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_08.label )write( [[</a></span>
  1078. ]] ) end write( [[
  1079. ]] ) if M.nav_link.nav_09.label ~= "" then write( [[ <span><a href="]] )write( menuTarget09 )write( [["]] ) if M.nav_link.nav_09.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_09.label )write( [[</a></span>
  1080. ]] ) end write( [[
  1081. ]] ) if M.nav_link.nav_10.label ~= "" then write( [[ <span><a href="]] )write( menuTarget10 )write( [["]] ) if M.nav_link.nav_10.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_10.label )write( [[</a></span>
  1082. ]] ) end write( [[
  1083. </p><!-- #nav -->
  1084. ]] ) elseif M.navigation.type == 'multi-level' then write( [[
  1085. <ul id="nav">
  1086. ]] ) if M.identityplate.role == "integrated" then write( [[
  1087. <li id="integrated-identity" class="ip-]] )write( M.identityplate.on )write( [[">
  1088. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1089. </li>
  1090. ]] ) end write( [[
  1091. ]] ) if M.nav_link.nav_01.label ~= "" then write( [[ <li><a href="]] )write( menuTarget01 )write( [["]] ) if M.nav_link.nav_01.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_01.label )write( [[</a></li>
  1092. ]] ) end write( [[
  1093. ]] ) if M.nav_link.nav_02.label ~= "" and mode == 'publish' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a></li>
  1094. ]] ) elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a>
  1095. <ul>
  1096. <li><a href="#">Example Drop-down Menus :</a></li>
  1097. <li><a href="#">A Few Good Bands</a>
  1098. <ul>
  1099. <li><a href="#">Efterklang</a></li>
  1100. <li><a href="#">Émilie Simon</a></li>
  1101. <li><a href="#">Liam Finn</a></li>
  1102. <li><a href="#">Sigur Rós</a></li>
  1103. <li><a href="#">The Dø</a></li>
  1104. </ul>
  1105. </li>
  1106. <li><a href="#">A Few Good Movies</a>
  1107. <ul>
  1108. <li><a href="#">Blade Runner</a></li>
  1109. <li><a href="#">The Brothers Bloom</a></li>
  1110. <li><a href="#">The Darjeeling Limited</a></li>
  1111. <li><a href="#">The Life Aquatic w/ Steve Zissou</a></li>
  1112. <li><a href="#">Pacific Rim</a></li>
  1113. </ul>
  1114. </li>
  1115. <li><a href="#">A Few Good TV Shows</a>
  1116. <ul>
  1117. <li><a href="#">Battlestar Galactica</a></li>
  1118. <li><a href="#">Castle</a></li>
  1119. <li><a href="#">Doctor Who</a></li>
  1120. <li><a href="#">Eureka</a></li>
  1121. <li><a href="#">Farscape</a></li>
  1122. <li><a href="#">Firefly</a></li>
  1123. <li><a href="#">Legend of Korra</a></li>
  1124. <li><a href="#">Luther</a></li>
  1125. </ul>
  1126. </li>
  1127. </ul>
  1128. </li>
  1129. ]] ) end write( [[
  1130. ]] ) if M.nav_link.nav_03.label ~= "" then write( [[ <li><a href="]] )write( menuTarget03 )write( [["]] ) if M.nav_link.nav_03.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_03.label )write( [[</a></li>
  1131. ]] ) end write( [[
  1132. ]] ) if M.nav_link.nav_04.label ~= "" then write( [[ <li><a href="]] )write( menuTarget04 )write( [["]] ) if M.nav_link.nav_04.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_04.label )write( [[</a></li>
  1133. ]] ) end write( [[
  1134. ]] ) if M.nav_link.nav_05.label ~= "" then write( [[ <li><a href="]] )write( menuTarget05 )write( [["]] ) if M.nav_link.nav_05.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_05.label )write( [[</a></li>
  1135. ]] ) end write( [[
  1136. ]] ) if M.nav_link.nav_06.label ~= "" then write( [[ <li><a href="]] )write( menuTarget06 )write( [["]] ) if M.nav_link.nav_06.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_06.label )write( [[</a></li>
  1137. ]] ) end write( [[
  1138. ]] ) if M.nav_link.nav_07.label ~= "" then write( [[ <li><a href="]] )write( menuTarget07 )write( [["]] ) if M.nav_link.nav_07.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_07.label )write( [[</a></li>
  1139. ]] ) end write( [[
  1140. ]] ) if M.nav_link.nav_08.label ~= "" then write( [[ <li><a href="]] )write( menuTarget08 )write( [["]] ) if M.nav_link.nav_08.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_08.label )write( [[</a></li>
  1141. ]] ) end write( [[
  1142. ]] ) if M.nav_link.nav_09.label ~= "" then write( [[ <li><a href="]] )write( menuTarget09 )write( [["]] ) if M.nav_link.nav_09.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_09.label )write( [[</a></li>
  1143. ]] ) end write( [[
  1144. ]] ) if M.nav_link.nav_10.label ~= "" then write( [[ <li><a href="]] )write( menuTarget10 )write( [["]] ) if M.nav_link.nav_10.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_10.label )write( [[</a></li>
  1145. ]] ) end write( [[
  1146. </ul><!-- #nav -->
  1147. ]] ) elseif M.navigation.type == 'column' then write( [[
  1148. <ul id="nav">
  1149. ]] ) if M.identityplate.role == "integrated" then write( [[
  1150. <li id="integrated-identity" class="ip-]] )write( M.identityplate.on )write( [[">
  1151. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1152. </li>
  1153. ]] ) end write( [[
  1154. ]] ) if M.nav_link.nav_01.label ~= "" then write( [[ <li><a href="]] )write( menuTarget01 )write( [["]] ) if M.nav_link.nav_01.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_01.label )write( [[</a></li>
  1155. ]] ) end write( [[
  1156. ]] ) if M.nav_link.nav_02.label ~= "" and mode == 'publish' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a></li>
  1157. ]] ) elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a>
  1158. <ul>
  1159. <li><a href="#">Example Child Menus :</a></li>
  1160. <li><a href="#">A Few Good Bands</a>
  1161. <ul>
  1162. <li><a href="#">Efterklang</a></li>
  1163. <li><a href="#">Émilie Simon</a></li>
  1164. <li><a href="#">Liam Finn</a></li>
  1165. <li><a href="#">Sigur Rós</a></li>
  1166. <li><a href="#">The Dø</a></li>
  1167. </ul>
  1168. </li>
  1169. </ul>
  1170. </li>
  1171. ]] ) end write( [[
  1172. ]] ) if M.nav_link.nav_03.label ~= "" then write( [[ <li><a href="]] )write( menuTarget03 )write( [["]] ) if M.nav_link.nav_03.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_03.label )write( [[</a></li>
  1173. ]] ) end write( [[
  1174. ]] ) if M.nav_link.nav_04.label ~= "" then write( [[ <li><a href="]] )write( menuTarget04 )write( [["]] ) if M.nav_link.nav_04.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_04.label )write( [[</a></li>
  1175. ]] ) end write( [[
  1176. ]] ) if M.nav_link.nav_05.label ~= "" then write( [[ <li><a href="]] )write( menuTarget05 )write( [["]] ) if M.nav_link.nav_05.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_05.label )write( [[</a></li>
  1177. ]] ) end write( [[
  1178. ]] ) if M.nav_link.nav_06.label ~= "" then write( [[ <li><a href="]] )write( menuTarget06 )write( [["]] ) if M.nav_link.nav_06.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_06.label )write( [[</a></li>
  1179. ]] ) end write( [[
  1180. ]] ) if M.nav_link.nav_07.label ~= "" then write( [[ <li><a href="]] )write( menuTarget07 )write( [["]] ) if M.nav_link.nav_07.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_07.label )write( [[</a></li>
  1181. ]] ) end write( [[
  1182. ]] ) if M.nav_link.nav_08.label ~= "" then write( [[ <li><a href="]] )write( menuTarget08 )write( [["]] ) if M.nav_link.nav_08.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_08.label )write( [[</a></li>
  1183. ]] ) end write( [[
  1184. ]] ) if M.nav_link.nav_09.label ~= "" then write( [[ <li><a href="]] )write( menuTarget09 )write( [["]] ) if M.nav_link.nav_09.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_09.label )write( [[</a></li>
  1185. ]] ) end write( [[
  1186. ]] ) if M.nav_link.nav_10.label ~= "" then write( [[ <li><a href="]] )write( menuTarget10 )write( [["]] ) if M.nav_link.nav_10.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_10.label )write( [[</a></li>
  1187. ]] ) end write( [[
  1188. </ul><!-- #nav -->
  1189. ]] ) end --[[ navigation.type ]] write( [[
  1190. </div><!-- #r2d2-menu -->
  1191. </div><!-- #navigation-background -->
  1192. </div>
  1193. </div>
  1194. </div> <!-- #navigation -->
  1195. ]] ) if M.navigation.type == 'column' and M.social_media.profiles.location == 'navigation-column' then write( [[
  1196. ]] ) if M.social_media.display then write( [[
  1197. <div class="social-media-profiles social-media clearfix">
  1198. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1199. <div class="mantle clearfix">
  1200. <div class="core clearfix">
  1201. ]] ) end --[[ masthead ]] write( [[
  1202. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1203. "$add_mode = true;\n"..
  1204. "if ( function_exists('ttg_social_media') ) {\n"..
  1205. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1206. " $add_mode = false;\n"..
  1207. " }\n"..
  1208. "}\n"..
  1209. "if ( $add_mode ) { ".."?"..">") end write( [[
  1210. <ul class="clearfix">
  1211. ]] ) if M.social_media.profiles.label ~= '' then write( [[
  1212. <li class="social-media-label"><span>]] )write( M.social_media.profiles.label )write( [[</span></li>
  1213. ]] ) end write( [[
  1214. ]] ) if M.social_media.profiles.user ~= '' then write( [[
  1215. <li class="social-bg user"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.user ) end write( [["]] )write( newWindow )write( [[><i class="fa fa-user"></i></a></li>
  1216. ]] ) end write( [[
  1217. ]] ) if M.social_media.profiles.aboutme ~= '' then write( [[
  1218. <li class="social-bg about-me"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.aboutme ) end write( [["]] )write( newWindow )write( [[ title="About.me"><span>me</span></a></li>
  1219. ]] ) end write( [[
  1220. ]] ) if M.social_media.profiles.pinterest ~= '' then write( [[
  1221. <li class="social-bg pinterest"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.pinterest ) end write( [["]] )write( newWindow )write( [[ title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1222. ]] ) end write( [[
  1223. ]] ) if M.social_media.profiles.google_plus ~= '' then write( [[
  1224. <li class="social-bg google-plus"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.google_plus )write( [[?rel=author]] ) end write( [["]] )write( newWindow )write( [[ title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1225. ]] ) end write( [[
  1226. ]] ) if M.social_media.profiles.twitter ~= '' then write( [[
  1227. <li class="social-bg twitter"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.twitter ) end write( [["]] )write( newWindow )write( [[ title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1228. ]] ) end write( [[
  1229. ]] ) if M.social_media.profiles.linkedin ~= '' then write( [[
  1230. <li class="social-bg linkedin"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.linkedin ) end write( [["]] )write( newWindow )write( [[ title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1231. ]] ) end write( [[
  1232. ]] ) if M.social_media.profiles.facebook ~= '' then write( [[
  1233. <li class="social-bg facebook"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.facebook ) end write( [["]] )write( newWindow )write( [[ title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1234. ]] ) end write( [[
  1235. ]] ) if M.social_media.profiles.instagram ~= '' then write( [[
  1236. <li class="social-bg instagram"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.instagram ) end write( [["]] )write( newWindow )write( [[ title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1237. ]] ) end write( [[
  1238. ]] ) if M.social_media.profiles.tumblr ~= '' then write( [[
  1239. <li class="social-bg tumblr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.tumblr ) end write( [["]] )write( newWindow )write( [[ title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1240. ]] ) end write( [[
  1241. ]] ) if M.social_media.profiles.vsco_grid ~= '' then write( [[
  1242. <li class="social-bg vsco-grid"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vsco_grid ) end write( [["]] )write( newWindow )write( [[ title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1243. ]] ) end write( [[
  1244. ]] ) if M.social_media.profiles.flickr ~= '' then write( [[
  1245. <li class="social-bg flickr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.flickr ) end write( [["]] )write( newWindow )write( [[ title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1246. ]] ) end write( [[
  1247. ]] ) if M.social_media.profiles.behance ~= '' then write( [[
  1248. <li class="social-bg behance"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.behance ) end write( [["]] )write( newWindow )write( [[ title="Behance"><i class="fa fa-behance"></i></a></li>
  1249. ]] ) end write( [[
  1250. ]] ) if M.social_media.profiles.vimeo ~= '' then write( [[
  1251. <li class="social-bg vimeo"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vimeo ) end write( [["]] )write( newWindow )write( [[ title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1252. ]] ) end write( [[
  1253. ]] ) if M.social_media.profiles.youtube ~= '' then write( [[
  1254. <li class="social-bg youtube"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.youtube ) end write( [["]] )write( newWindow )write( [[ title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1255. ]] ) end write( [[
  1256. ]] ) if M.social_media.profiles.rss ~= '' then write( [[
  1257. <li class="social-bg rss"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.rss ) end write( [["]] )write( newWindow )write( [[ title="RSS"><i class="fa fa-rss"></i></a></li>
  1258. ]] ) end write( [[
  1259. </ul>
  1260. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] write( [[
  1261. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1262. </div>
  1263. </div>
  1264. ]] ) end --[[ masthead ]] write( [[
  1265. </div> <!-- #social-media-profiles -->
  1266. ]] ) end --[[ social_media.display ]] write( [[
  1267. ]] ) end write( [[
  1268. </div> <!-- #navigation-container -->
  1269. ]] ) end --[[ navigation.display ]] write( [[
  1270. ]] ) end --[[ help ]] write( [[
  1271. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_navigation ]] write( [[
  1272. ]] ) if M.cart.integration.enabled then write( [[
  1273. <div id="status-bar" class="block-id status-bar clearfix"]] ) if mode == 'publish' then write( [[ style="display:none;"]] ) end write( [[>
  1274. <div class="mantle clearfix">
  1275. <div class="core clearfix">
  1276. ]] ) if mode == 'publish' then write( [[
  1277. <ul id="cart-status" class="status-buttons clearfix"></ul>
  1278. ]] ) else write( [[
  1279. <ul id="cart-status" class="status-buttons clearfix">
  1280. <li><a href="javascript:void(0);"><i class="fa fa-shopping-cart fa-fw"></i> 2 : $50.00<span class="currency"> USD</span><span class="view-cart"> / View Cart</span></a></a></li>
  1281. </ul>
  1282. <script>
  1283. $(function(){
  1284. $('#body-mantle').css('margin-top', $('#status-bar').height());
  1285. });
  1286. </script>
  1287. ]] ) end write( [[
  1288. </div>
  1289. </div>
  1290. </div><!-- #status -->
  1291. ]] ) end --[[ cart.integration ]] write( [[
  1292. ]] ) end --[[ navigation.orphan ]] write( [[
  1293. ]] ) if M.masthead.orphan and M.masthead.drop then write( [[
  1294. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1295. "$add_mode = true;\n"..
  1296. "if ( function_exists('ttg_header_masthead') ) {\n"..
  1297. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  1298. " $add_mode = false;\n"..
  1299. " }\n"..
  1300. "}\n"..
  1301. "if ( $add_mode ) { ".."?"..">") end write( [[
  1302. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else write( [[
  1303. ]] ) if M.masthead.display and M.identityplate.role ~= "integrated" then write( [[
  1304. <div id="masthead" class="block-id masthead clearfix">
  1305. <div class="mantle clearfix">
  1306. <div class="core clearfix">
  1307. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  1308. <div id="profile-image" class="profile-image clearfix">
  1309. <div id="profile-icon" class="profile-icon clearfix">
  1310. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a>
  1311. </div>
  1312. <div id="profile-labels" class="profile-labels clearfix">
  1313. ]] ) end write( [[
  1314. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then write( [[
  1315. <h1><span><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [[">]] )write( M.masthead.h1.label )write( [[</a></span></h1>
  1316. ]] ) elseif M.masthead.h1.label ~= '' then write( [[
  1317. <h1><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[</span></a></h1>
  1318. ]] ) end write( [[
  1319. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then write( [[
  1320. <h2><span>]] )write( M.masthead.h2.label )write( [[</span></h2>
  1321. ]] ) elseif M.masthead.h2.label ~= '' then write( [[
  1322. <h2><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a></h2>
  1323. ]] ) end write( [[
  1324. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  1325. </div>
  1326. </div><!-- #profile-image -->
  1327. ]] ) end write( [[
  1328. </div>
  1329. </div>
  1330. ]] ) if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then write( [[
  1331. ]] ) if M.social_media.display then write( [[
  1332. <div class="social-media-profiles social-media clearfix">
  1333. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1334. <div class="mantle clearfix">
  1335. <div class="core clearfix">
  1336. ]] ) end --[[ masthead ]] write( [[
  1337. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1338. "$add_mode = true;\n"..
  1339. "if ( function_exists('ttg_social_media') ) {\n"..
  1340. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1341. " $add_mode = false;\n"..
  1342. " }\n"..
  1343. "}\n"..
  1344. "if ( $add_mode ) { ".."?"..">") end write( [[
  1345. <ul class="clearfix">
  1346. ]] ) if M.social_media.profiles.label ~= '' then write( [[
  1347. <li class="social-media-label"><span>]] )write( M.social_media.profiles.label )write( [[</span></li>
  1348. ]] ) end write( [[
  1349. ]] ) if M.social_media.profiles.user ~= '' then write( [[
  1350. <li class="social-bg user"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.user ) end write( [["]] )write( newWindow )write( [[><i class="fa fa-user"></i></a></li>
  1351. ]] ) end write( [[
  1352. ]] ) if M.social_media.profiles.aboutme ~= '' then write( [[
  1353. <li class="social-bg about-me"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.aboutme ) end write( [["]] )write( newWindow )write( [[ title="About.me"><span>me</span></a></li>
  1354. ]] ) end write( [[
  1355. ]] ) if M.social_media.profiles.pinterest ~= '' then write( [[
  1356. <li class="social-bg pinterest"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.pinterest ) end write( [["]] )write( newWindow )write( [[ title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1357. ]] ) end write( [[
  1358. ]] ) if M.social_media.profiles.google_plus ~= '' then write( [[
  1359. <li class="social-bg google-plus"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.google_plus )write( [[?rel=author]] ) end write( [["]] )write( newWindow )write( [[ title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1360. ]] ) end write( [[
  1361. ]] ) if M.social_media.profiles.twitter ~= '' then write( [[
  1362. <li class="social-bg twitter"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.twitter ) end write( [["]] )write( newWindow )write( [[ title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1363. ]] ) end write( [[
  1364. ]] ) if M.social_media.profiles.linkedin ~= '' then write( [[
  1365. <li class="social-bg linkedin"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.linkedin ) end write( [["]] )write( newWindow )write( [[ title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1366. ]] ) end write( [[
  1367. ]] ) if M.social_media.profiles.facebook ~= '' then write( [[
  1368. <li class="social-bg facebook"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.facebook ) end write( [["]] )write( newWindow )write( [[ title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1369. ]] ) end write( [[
  1370. ]] ) if M.social_media.profiles.instagram ~= '' then write( [[
  1371. <li class="social-bg instagram"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.instagram ) end write( [["]] )write( newWindow )write( [[ title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1372. ]] ) end write( [[
  1373. ]] ) if M.social_media.profiles.tumblr ~= '' then write( [[
  1374. <li class="social-bg tumblr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.tumblr ) end write( [["]] )write( newWindow )write( [[ title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1375. ]] ) end write( [[
  1376. ]] ) if M.social_media.profiles.vsco_grid ~= '' then write( [[
  1377. <li class="social-bg vsco-grid"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vsco_grid ) end write( [["]] )write( newWindow )write( [[ title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1378. ]] ) end write( [[
  1379. ]] ) if M.social_media.profiles.flickr ~= '' then write( [[
  1380. <li class="social-bg flickr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.flickr ) end write( [["]] )write( newWindow )write( [[ title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1381. ]] ) end write( [[
  1382. ]] ) if M.social_media.profiles.behance ~= '' then write( [[
  1383. <li class="social-bg behance"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.behance ) end write( [["]] )write( newWindow )write( [[ title="Behance"><i class="fa fa-behance"></i></a></li>
  1384. ]] ) end write( [[
  1385. ]] ) if M.social_media.profiles.vimeo ~= '' then write( [[
  1386. <li class="social-bg vimeo"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vimeo ) end write( [["]] )write( newWindow )write( [[ title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1387. ]] ) end write( [[
  1388. ]] ) if M.social_media.profiles.youtube ~= '' then write( [[
  1389. <li class="social-bg youtube"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.youtube ) end write( [["]] )write( newWindow )write( [[ title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1390. ]] ) end write( [[
  1391. ]] ) if M.social_media.profiles.rss ~= '' then write( [[
  1392. <li class="social-bg rss"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.rss ) end write( [["]] )write( newWindow )write( [[ title="RSS"><i class="fa fa-rss"></i></a></li>
  1393. ]] ) end write( [[
  1394. </ul>
  1395. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] write( [[
  1396. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1397. </div>
  1398. </div>
  1399. ]] ) end --[[ masthead ]] write( [[
  1400. </div> <!-- #social-media-profiles -->
  1401. ]] ) end --[[ social_media.display ]] write( [[
  1402. ]] ) end write( [[
  1403. </div> <!-- #masthead -->
  1404. ]] ) end --[[ masthead.display ]] write( [[
  1405. ]] ) end --[[ help ]] write( [[
  1406. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] write( [[
  1407. ]] ) end --[[ masthead.orphan ]] write( [[
  1408. </div> <!-- #body-core-outer -->
  1409. ]] ) end --[[ orphans ]] write( [[
  1410. <div id="body-core-inner" class="body-core-inner clearfix">
  1411. <section>
  1412. <div id="page-body" class="page-body]] ) if M.footer.concrete_shoes then write( [[ concrete-shoes]] ) end if M.cart.integration.enabled then write( [[ cart]] ) end write( [[ clearfix">
  1413. ]] ) if not M.masthead.orphan and not M.masthead.drop then write( [[
  1414. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1415. "$add_mode = true;\n"..
  1416. "if ( function_exists('ttg_header_masthead') ) {\n"..
  1417. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  1418. " $add_mode = false;\n"..
  1419. " }\n"..
  1420. "}\n"..
  1421. "if ( $add_mode ) { ".."?"..">") end write( [[
  1422. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else write( [[
  1423. ]] ) if M.masthead.display and M.identityplate.role ~= "integrated" then write( [[
  1424. <div id="masthead" class="block-id masthead clearfix">
  1425. <div class="mantle clearfix">
  1426. <div class="core clearfix">
  1427. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  1428. <div id="profile-image" class="profile-image clearfix">
  1429. <div id="profile-icon" class="profile-icon clearfix">
  1430. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a>
  1431. </div>
  1432. <div id="profile-labels" class="profile-labels clearfix">
  1433. ]] ) end write( [[
  1434. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then write( [[
  1435. <h1><span><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [[">]] )write( M.masthead.h1.label )write( [[</a></span></h1>
  1436. ]] ) elseif M.masthead.h1.label ~= '' then write( [[
  1437. <h1><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[</span></a></h1>
  1438. ]] ) end write( [[
  1439. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then write( [[
  1440. <h2><span>]] )write( M.masthead.h2.label )write( [[</span></h2>
  1441. ]] ) elseif M.masthead.h2.label ~= '' then write( [[
  1442. <h2><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a></h2>
  1443. ]] ) end write( [[
  1444. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  1445. </div>
  1446. </div><!-- #profile-image -->
  1447. ]] ) end write( [[
  1448. </div>
  1449. </div>
  1450. ]] ) if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then write( [[
  1451. ]] ) if M.social_media.display then write( [[
  1452. <div class="social-media-profiles social-media clearfix">
  1453. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1454. <div class="mantle clearfix">
  1455. <div class="core clearfix">
  1456. ]] ) end --[[ masthead ]] write( [[
  1457. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1458. "$add_mode = true;\n"..
  1459. "if ( function_exists('ttg_social_media') ) {\n"..
  1460. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1461. " $add_mode = false;\n"..
  1462. " }\n"..
  1463. "}\n"..
  1464. "if ( $add_mode ) { ".."?"..">") end write( [[
  1465. <ul class="clearfix">
  1466. ]] ) if M.social_media.profiles.label ~= '' then write( [[
  1467. <li class="social-media-label"><span>]] )write( M.social_media.profiles.label )write( [[</span></li>
  1468. ]] ) end write( [[
  1469. ]] ) if M.social_media.profiles.user ~= '' then write( [[
  1470. <li class="social-bg user"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.user ) end write( [["]] )write( newWindow )write( [[><i class="fa fa-user"></i></a></li>
  1471. ]] ) end write( [[
  1472. ]] ) if M.social_media.profiles.aboutme ~= '' then write( [[
  1473. <li class="social-bg about-me"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.aboutme ) end write( [["]] )write( newWindow )write( [[ title="About.me"><span>me</span></a></li>
  1474. ]] ) end write( [[
  1475. ]] ) if M.social_media.profiles.pinterest ~= '' then write( [[
  1476. <li class="social-bg pinterest"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.pinterest ) end write( [["]] )write( newWindow )write( [[ title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1477. ]] ) end write( [[
  1478. ]] ) if M.social_media.profiles.google_plus ~= '' then write( [[
  1479. <li class="social-bg google-plus"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.google_plus )write( [[?rel=author]] ) end write( [["]] )write( newWindow )write( [[ title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1480. ]] ) end write( [[
  1481. ]] ) if M.social_media.profiles.twitter ~= '' then write( [[
  1482. <li class="social-bg twitter"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.twitter ) end write( [["]] )write( newWindow )write( [[ title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1483. ]] ) end write( [[
  1484. ]] ) if M.social_media.profiles.linkedin ~= '' then write( [[
  1485. <li class="social-bg linkedin"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.linkedin ) end write( [["]] )write( newWindow )write( [[ title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1486. ]] ) end write( [[
  1487. ]] ) if M.social_media.profiles.facebook ~= '' then write( [[
  1488. <li class="social-bg facebook"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.facebook ) end write( [["]] )write( newWindow )write( [[ title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1489. ]] ) end write( [[
  1490. ]] ) if M.social_media.profiles.instagram ~= '' then write( [[
  1491. <li class="social-bg instagram"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.instagram ) end write( [["]] )write( newWindow )write( [[ title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1492. ]] ) end write( [[
  1493. ]] ) if M.social_media.profiles.tumblr ~= '' then write( [[
  1494. <li class="social-bg tumblr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.tumblr ) end write( [["]] )write( newWindow )write( [[ title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1495. ]] ) end write( [[
  1496. ]] ) if M.social_media.profiles.vsco_grid ~= '' then write( [[
  1497. <li class="social-bg vsco-grid"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vsco_grid ) end write( [["]] )write( newWindow )write( [[ title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1498. ]] ) end write( [[
  1499. ]] ) if M.social_media.profiles.flickr ~= '' then write( [[
  1500. <li class="social-bg flickr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.flickr ) end write( [["]] )write( newWindow )write( [[ title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1501. ]] ) end write( [[
  1502. ]] ) if M.social_media.profiles.behance ~= '' then write( [[
  1503. <li class="social-bg behance"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.behance ) end write( [["]] )write( newWindow )write( [[ title="Behance"><i class="fa fa-behance"></i></a></li>
  1504. ]] ) end write( [[
  1505. ]] ) if M.social_media.profiles.vimeo ~= '' then write( [[
  1506. <li class="social-bg vimeo"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vimeo ) end write( [["]] )write( newWindow )write( [[ title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1507. ]] ) end write( [[
  1508. ]] ) if M.social_media.profiles.youtube ~= '' then write( [[
  1509. <li class="social-bg youtube"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.youtube ) end write( [["]] )write( newWindow )write( [[ title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1510. ]] ) end write( [[
  1511. ]] ) if M.social_media.profiles.rss ~= '' then write( [[
  1512. <li class="social-bg rss"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.rss ) end write( [["]] )write( newWindow )write( [[ title="RSS"><i class="fa fa-rss"></i></a></li>
  1513. ]] ) end write( [[
  1514. </ul>
  1515. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] write( [[
  1516. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1517. </div>
  1518. </div>
  1519. ]] ) end --[[ masthead ]] write( [[
  1520. </div> <!-- #social-media-profiles -->
  1521. ]] ) end --[[ social_media.display ]] write( [[
  1522. ]] ) end write( [[
  1523. </div> <!-- #masthead -->
  1524. ]] ) end --[[ masthead.display ]] write( [[
  1525. ]] ) end --[[ help ]] write( [[
  1526. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] write( [[
  1527. ]] ) end --[[ masthead.orphan ]] write( [[
  1528. ]] ) if not M.navigation.orphan then write( [[
  1529. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1530. "$add_mode = true;\n"..
  1531. "if ( function_exists('ttg_header_navigation') ) {\n"..
  1532. " if ( !(ttg_header_navigation( TTG_COMP, TTG_ROOT )) ) {\n"..
  1533. " $add_mode = false;\n"..
  1534. " }\n"..
  1535. "}\n"..
  1536. "if ( $add_mode ) { ".."?"..">") end write( [[
  1537. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then else write( [[
  1538. ]] ) if M.navigation.display then write( [[
  1539. <div id="navigation-container" class="navigation-container clearfix">
  1540. ]] ) if M.navigation.spurs.enable and not M.navigation.orphan then write( [[
  1541. <div class="navigation-left-spur"></div>
  1542. ]] ) if M.navigation.type ~= 'column' then write( [[
  1543. <div class="navigation-right-spur"></div>
  1544. ]] ) end end write( [[
  1545. <div id="navigation" class="block-id navigation clearfix">
  1546. <div class="mantle clearfix">
  1547. <div class="core clearfix">
  1548. <div id="navigation-background">
  1549. <div id="r2d2-menu" class="clearfix">
  1550. <ul id="pull">
  1551. ]] ) if M.identityplate.role == "integrated" then write( [[
  1552. <li id="integrated-mobile" class="ip-]] )write( M.identityplate.on )write( [[">
  1553. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1554. </li>
  1555. ]] ) end write( [[
  1556. <li><span> </span></li>
  1557. <li><span> </span></li>
  1558. <li><span> </span></li>
  1559. <li><span> </span></li>
  1560. <li id="open-nav"><a href="#r2d2-menu">]] ) if M.metadata.collapsed_label.navigation == "" then write( [[<i class="fa fa-reorder"></i>]] ) else write( [[<span style="display:block;font-size:14px;">]] )write( M.metadata.collapsed_label.navigation )write( [[</span>]] ) end write( [[</a></li>
  1561. <li id="close-nav"><a href="#">]] ) if M.metadata.collapsed_label.navigation == "" then write( [[<i class="fa fa-times"></i>]] ) else write( [[<span style="display:block;font-size:14px;">]] )write( M.metadata.collapsed_label.navigation )write( [[</span>]] ) end write( [[</a></li>
  1562. </ul><!-- #pull -->
  1563. ]] ) if M.navigation.type == 'single-level' then write( [[
  1564. <p id="nav">
  1565. ]] ) if M.identityplate.role == "integrated" then write( [[
  1566. <span id="integrated-identity" class="ip-]] )write( M.identityplate.on )write( [[">
  1567. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1568. </span>
  1569. ]] ) end write( [[
  1570. ]] ) if M.nav_link.nav_01.label ~= "" then write( [[ <span><a href="]] )write( menuTarget01 )write( [["]] ) if M.nav_link.nav_01.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_01.label )write( [[</a></span>
  1571. ]] ) end write( [[
  1572. ]] ) if M.nav_link.nav_02.label ~= "" then write( [[ <span><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a></span>
  1573. ]] ) end write( [[
  1574. ]] ) if M.nav_link.nav_03.label ~= "" then write( [[ <span><a href="]] )write( menuTarget03 )write( [["]] ) if M.nav_link.nav_03.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_03.label )write( [[</a></span>
  1575. ]] ) end write( [[
  1576. ]] ) if M.nav_link.nav_04.label ~= "" then write( [[ <span><a href="]] )write( menuTarget04 )write( [["]] ) if M.nav_link.nav_04.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_04.label )write( [[</a></span>
  1577. ]] ) end write( [[
  1578. ]] ) if M.nav_link.nav_05.label ~= "" then write( [[ <span><a href="]] )write( menuTarget05 )write( [["]] ) if M.nav_link.nav_05.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_05.label )write( [[</a></span>
  1579. ]] ) end write( [[
  1580. ]] ) if M.nav_link.nav_06.label ~= "" then write( [[ <span><a href="]] )write( menuTarget06 )write( [["]] ) if M.nav_link.nav_06.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_06.label )write( [[</a></span>
  1581. ]] ) end write( [[
  1582. ]] ) if M.nav_link.nav_07.label ~= "" then write( [[ <span><a href="]] )write( menuTarget07 )write( [["]] ) if M.nav_link.nav_07.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_07.label )write( [[</a></span>
  1583. ]] ) end write( [[
  1584. ]] ) if M.nav_link.nav_08.label ~= "" then write( [[ <span><a href="]] )write( menuTarget08 )write( [["]] ) if M.nav_link.nav_08.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_08.label )write( [[</a></span>
  1585. ]] ) end write( [[
  1586. ]] ) if M.nav_link.nav_09.label ~= "" then write( [[ <span><a href="]] )write( menuTarget09 )write( [["]] ) if M.nav_link.nav_09.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_09.label )write( [[</a></span>
  1587. ]] ) end write( [[
  1588. ]] ) if M.nav_link.nav_10.label ~= "" then write( [[ <span><a href="]] )write( menuTarget10 )write( [["]] ) if M.nav_link.nav_10.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_10.label )write( [[</a></span>
  1589. ]] ) end write( [[
  1590. </p><!-- #nav -->
  1591. ]] ) elseif M.navigation.type == 'multi-level' then write( [[
  1592. <ul id="nav">
  1593. ]] ) if M.identityplate.role == "integrated" then write( [[
  1594. <li id="integrated-identity" class="ip-]] )write( M.identityplate.on )write( [[">
  1595. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1596. </li>
  1597. ]] ) end write( [[
  1598. ]] ) if M.nav_link.nav_01.label ~= "" then write( [[ <li><a href="]] )write( menuTarget01 )write( [["]] ) if M.nav_link.nav_01.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_01.label )write( [[</a></li>
  1599. ]] ) end write( [[
  1600. ]] ) if M.nav_link.nav_02.label ~= "" and mode == 'publish' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a></li>
  1601. ]] ) elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a>
  1602. <ul>
  1603. <li><a href="#">Example Drop-down Menus :</a></li>
  1604. <li><a href="#">A Few Good Bands</a>
  1605. <ul>
  1606. <li><a href="#">Efterklang</a></li>
  1607. <li><a href="#">Émilie Simon</a></li>
  1608. <li><a href="#">Liam Finn</a></li>
  1609. <li><a href="#">Sigur Rós</a></li>
  1610. <li><a href="#">The Dø</a></li>
  1611. </ul>
  1612. </li>
  1613. <li><a href="#">A Few Good Movies</a>
  1614. <ul>
  1615. <li><a href="#">Blade Runner</a></li>
  1616. <li><a href="#">The Brothers Bloom</a></li>
  1617. <li><a href="#">The Darjeeling Limited</a></li>
  1618. <li><a href="#">The Life Aquatic w/ Steve Zissou</a></li>
  1619. <li><a href="#">Pacific Rim</a></li>
  1620. </ul>
  1621. </li>
  1622. <li><a href="#">A Few Good TV Shows</a>
  1623. <ul>
  1624. <li><a href="#">Battlestar Galactica</a></li>
  1625. <li><a href="#">Castle</a></li>
  1626. <li><a href="#">Doctor Who</a></li>
  1627. <li><a href="#">Eureka</a></li>
  1628. <li><a href="#">Farscape</a></li>
  1629. <li><a href="#">Firefly</a></li>
  1630. <li><a href="#">Legend of Korra</a></li>
  1631. <li><a href="#">Luther</a></li>
  1632. </ul>
  1633. </li>
  1634. </ul>
  1635. </li>
  1636. ]] ) end write( [[
  1637. ]] ) if M.nav_link.nav_03.label ~= "" then write( [[ <li><a href="]] )write( menuTarget03 )write( [["]] ) if M.nav_link.nav_03.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_03.label )write( [[</a></li>
  1638. ]] ) end write( [[
  1639. ]] ) if M.nav_link.nav_04.label ~= "" then write( [[ <li><a href="]] )write( menuTarget04 )write( [["]] ) if M.nav_link.nav_04.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_04.label )write( [[</a></li>
  1640. ]] ) end write( [[
  1641. ]] ) if M.nav_link.nav_05.label ~= "" then write( [[ <li><a href="]] )write( menuTarget05 )write( [["]] ) if M.nav_link.nav_05.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_05.label )write( [[</a></li>
  1642. ]] ) end write( [[
  1643. ]] ) if M.nav_link.nav_06.label ~= "" then write( [[ <li><a href="]] )write( menuTarget06 )write( [["]] ) if M.nav_link.nav_06.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_06.label )write( [[</a></li>
  1644. ]] ) end write( [[
  1645. ]] ) if M.nav_link.nav_07.label ~= "" then write( [[ <li><a href="]] )write( menuTarget07 )write( [["]] ) if M.nav_link.nav_07.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_07.label )write( [[</a></li>
  1646. ]] ) end write( [[
  1647. ]] ) if M.nav_link.nav_08.label ~= "" then write( [[ <li><a href="]] )write( menuTarget08 )write( [["]] ) if M.nav_link.nav_08.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_08.label )write( [[</a></li>
  1648. ]] ) end write( [[
  1649. ]] ) if M.nav_link.nav_09.label ~= "" then write( [[ <li><a href="]] )write( menuTarget09 )write( [["]] ) if M.nav_link.nav_09.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_09.label )write( [[</a></li>
  1650. ]] ) end write( [[
  1651. ]] ) if M.nav_link.nav_10.label ~= "" then write( [[ <li><a href="]] )write( menuTarget10 )write( [["]] ) if M.nav_link.nav_10.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_10.label )write( [[</a></li>
  1652. ]] ) end write( [[
  1653. </ul><!-- #nav -->
  1654. ]] ) elseif M.navigation.type == 'column' then write( [[
  1655. <ul id="nav">
  1656. ]] ) if M.identityplate.role == "integrated" then write( [[
  1657. <li id="integrated-identity" class="ip-]] )write( M.identityplate.on )write( [[">
  1658. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.identityplate.on then write( [[<img alt="]] )write( M.masthead.h1.label )write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" />]] ) else write( M.masthead.h1.label ) end write( [[</span></a>
  1659. </li>
  1660. ]] ) end write( [[
  1661. ]] ) if M.nav_link.nav_01.label ~= "" then write( [[ <li><a href="]] )write( menuTarget01 )write( [["]] ) if M.nav_link.nav_01.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_01.label )write( [[</a></li>
  1662. ]] ) end write( [[
  1663. ]] ) if M.nav_link.nav_02.label ~= "" and mode == 'publish' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a></li>
  1664. ]] ) elseif M.nav_link.nav_02.label ~= "" and mode == 'preview' then write( [[ <li><a href="]] )write( menuTarget02 )write( [["]] ) if M.nav_link.nav_02.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_02.label )write( [[</a>
  1665. <ul>
  1666. <li><a href="#">Example Child Menus :</a></li>
  1667. <li><a href="#">A Few Good Bands</a>
  1668. <ul>
  1669. <li><a href="#">Efterklang</a></li>
  1670. <li><a href="#">Émilie Simon</a></li>
  1671. <li><a href="#">Liam Finn</a></li>
  1672. <li><a href="#">Sigur Rós</a></li>
  1673. <li><a href="#">The Dø</a></li>
  1674. </ul>
  1675. </li>
  1676. </ul>
  1677. </li>
  1678. ]] ) end write( [[
  1679. ]] ) if M.nav_link.nav_03.label ~= "" then write( [[ <li><a href="]] )write( menuTarget03 )write( [["]] ) if M.nav_link.nav_03.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_03.label )write( [[</a></li>
  1680. ]] ) end write( [[
  1681. ]] ) if M.nav_link.nav_04.label ~= "" then write( [[ <li><a href="]] )write( menuTarget04 )write( [["]] ) if M.nav_link.nav_04.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_04.label )write( [[</a></li>
  1682. ]] ) end write( [[
  1683. ]] ) if M.nav_link.nav_05.label ~= "" then write( [[ <li><a href="]] )write( menuTarget05 )write( [["]] ) if M.nav_link.nav_05.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_05.label )write( [[</a></li>
  1684. ]] ) end write( [[
  1685. ]] ) if M.nav_link.nav_06.label ~= "" then write( [[ <li><a href="]] )write( menuTarget06 )write( [["]] ) if M.nav_link.nav_06.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_06.label )write( [[</a></li>
  1686. ]] ) end write( [[
  1687. ]] ) if M.nav_link.nav_07.label ~= "" then write( [[ <li><a href="]] )write( menuTarget07 )write( [["]] ) if M.nav_link.nav_07.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_07.label )write( [[</a></li>
  1688. ]] ) end write( [[
  1689. ]] ) if M.nav_link.nav_08.label ~= "" then write( [[ <li><a href="]] )write( menuTarget08 )write( [["]] ) if M.nav_link.nav_08.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_08.label )write( [[</a></li>
  1690. ]] ) end write( [[
  1691. ]] ) if M.nav_link.nav_09.label ~= "" then write( [[ <li><a href="]] )write( menuTarget09 )write( [["]] ) if M.nav_link.nav_09.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_09.label )write( [[</a></li>
  1692. ]] ) end write( [[
  1693. ]] ) if M.nav_link.nav_10.label ~= "" then write( [[ <li><a href="]] )write( menuTarget10 )write( [["]] ) if M.nav_link.nav_10.open_new and mode == 'publish' then write( newWindow ) end write( [[>]] )write( M.nav_link.nav_10.label )write( [[</a></li>
  1694. ]] ) end write( [[
  1695. </ul><!-- #nav -->
  1696. ]] ) end --[[ navigation.type ]] write( [[
  1697. </div><!-- #r2d2-menu -->
  1698. </div><!-- #navigation-background -->
  1699. </div>
  1700. </div>
  1701. </div> <!-- #navigation -->
  1702. ]] ) if M.navigation.type == 'column' and M.social_media.profiles.location == 'navigation-column' then write( [[
  1703. ]] ) if M.social_media.display then write( [[
  1704. <div class="social-media-profiles social-media clearfix">
  1705. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1706. <div class="mantle clearfix">
  1707. <div class="core clearfix">
  1708. ]] ) end --[[ masthead ]] write( [[
  1709. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1710. "$add_mode = true;\n"..
  1711. "if ( function_exists('ttg_social_media') ) {\n"..
  1712. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1713. " $add_mode = false;\n"..
  1714. " }\n"..
  1715. "}\n"..
  1716. "if ( $add_mode ) { ".."?"..">") end write( [[
  1717. <ul class="clearfix">
  1718. ]] ) if M.social_media.profiles.label ~= '' then write( [[
  1719. <li class="social-media-label"><span>]] )write( M.social_media.profiles.label )write( [[</span></li>
  1720. ]] ) end write( [[
  1721. ]] ) if M.social_media.profiles.user ~= '' then write( [[
  1722. <li class="social-bg user"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.user ) end write( [["]] )write( newWindow )write( [[><i class="fa fa-user"></i></a></li>
  1723. ]] ) end write( [[
  1724. ]] ) if M.social_media.profiles.aboutme ~= '' then write( [[
  1725. <li class="social-bg about-me"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.aboutme ) end write( [["]] )write( newWindow )write( [[ title="About.me"><span>me</span></a></li>
  1726. ]] ) end write( [[
  1727. ]] ) if M.social_media.profiles.pinterest ~= '' then write( [[
  1728. <li class="social-bg pinterest"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.pinterest ) end write( [["]] )write( newWindow )write( [[ title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1729. ]] ) end write( [[
  1730. ]] ) if M.social_media.profiles.google_plus ~= '' then write( [[
  1731. <li class="social-bg google-plus"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.google_plus )write( [[?rel=author]] ) end write( [["]] )write( newWindow )write( [[ title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1732. ]] ) end write( [[
  1733. ]] ) if M.social_media.profiles.twitter ~= '' then write( [[
  1734. <li class="social-bg twitter"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.twitter ) end write( [["]] )write( newWindow )write( [[ title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1735. ]] ) end write( [[
  1736. ]] ) if M.social_media.profiles.linkedin ~= '' then write( [[
  1737. <li class="social-bg linkedin"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.linkedin ) end write( [["]] )write( newWindow )write( [[ title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1738. ]] ) end write( [[
  1739. ]] ) if M.social_media.profiles.facebook ~= '' then write( [[
  1740. <li class="social-bg facebook"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.facebook ) end write( [["]] )write( newWindow )write( [[ title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1741. ]] ) end write( [[
  1742. ]] ) if M.social_media.profiles.instagram ~= '' then write( [[
  1743. <li class="social-bg instagram"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.instagram ) end write( [["]] )write( newWindow )write( [[ title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1744. ]] ) end write( [[
  1745. ]] ) if M.social_media.profiles.tumblr ~= '' then write( [[
  1746. <li class="social-bg tumblr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.tumblr ) end write( [["]] )write( newWindow )write( [[ title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1747. ]] ) end write( [[
  1748. ]] ) if M.social_media.profiles.vsco_grid ~= '' then write( [[
  1749. <li class="social-bg vsco-grid"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vsco_grid ) end write( [["]] )write( newWindow )write( [[ title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1750. ]] ) end write( [[
  1751. ]] ) if M.social_media.profiles.flickr ~= '' then write( [[
  1752. <li class="social-bg flickr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.flickr ) end write( [["]] )write( newWindow )write( [[ title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1753. ]] ) end write( [[
  1754. ]] ) if M.social_media.profiles.behance ~= '' then write( [[
  1755. <li class="social-bg behance"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.behance ) end write( [["]] )write( newWindow )write( [[ title="Behance"><i class="fa fa-behance"></i></a></li>
  1756. ]] ) end write( [[
  1757. ]] ) if M.social_media.profiles.vimeo ~= '' then write( [[
  1758. <li class="social-bg vimeo"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vimeo ) end write( [["]] )write( newWindow )write( [[ title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1759. ]] ) end write( [[
  1760. ]] ) if M.social_media.profiles.youtube ~= '' then write( [[
  1761. <li class="social-bg youtube"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.youtube ) end write( [["]] )write( newWindow )write( [[ title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1762. ]] ) end write( [[
  1763. ]] ) if M.social_media.profiles.rss ~= '' then write( [[
  1764. <li class="social-bg rss"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.rss ) end write( [["]] )write( newWindow )write( [[ title="RSS"><i class="fa fa-rss"></i></a></li>
  1765. ]] ) end write( [[
  1766. </ul>
  1767. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] write( [[
  1768. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1769. </div>
  1770. </div>
  1771. ]] ) end --[[ masthead ]] write( [[
  1772. </div> <!-- #social-media-profiles -->
  1773. ]] ) end --[[ social_media.display ]] write( [[
  1774. ]] ) end write( [[
  1775. </div> <!-- #navigation-container -->
  1776. ]] ) end --[[ navigation.display ]] write( [[
  1777. ]] ) end --[[ help ]] write( [[
  1778. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_navigation ]] write( [[
  1779. ]] ) if M.cart.integration.enabled then write( [[
  1780. <div id="status-bar" class="block-id status-bar clearfix"]] ) if mode == 'publish' then write( [[ style="display:none;"]] ) end write( [[>
  1781. <div class="mantle clearfix">
  1782. <div class="core clearfix">
  1783. ]] ) if mode == 'publish' then write( [[
  1784. <ul id="cart-status" class="status-buttons clearfix"></ul>
  1785. ]] ) else write( [[
  1786. <ul id="cart-status" class="status-buttons clearfix">
  1787. <li><a href="javascript:void(0);"><i class="fa fa-shopping-cart fa-fw"></i> 2 : $50.00<span class="currency"> USD</span><span class="view-cart"> / View Cart</span></a></a></li>
  1788. </ul>
  1789. <script>
  1790. $(function(){
  1791. $('#body-mantle').css('margin-top', $('#status-bar').height());
  1792. });
  1793. </script>
  1794. ]] ) end write( [[
  1795. </div>
  1796. </div>
  1797. </div><!-- #status -->
  1798. ]] ) end --[[ cart.integration ]] write( [[
  1799. ]] ) end --[[ navigation.orphan ]] write( [[
  1800. ]] ) if not M.masthead.orphan and M.masthead.drop then write( [[
  1801. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1802. "$add_mode = true;\n"..
  1803. "if ( function_exists('ttg_header_masthead') ) {\n"..
  1804. " if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {\n"..
  1805. " $add_mode = false;\n"..
  1806. " }\n"..
  1807. "}\n"..
  1808. "if ( $add_mode ) { ".."?"..">") end write( [[
  1809. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then --[[ do nothing ]] else write( [[
  1810. ]] ) if M.masthead.display and M.identityplate.role ~= "integrated" then write( [[
  1811. <div id="masthead" class="block-id masthead clearfix">
  1812. <div class="mantle clearfix">
  1813. <div class="core clearfix">
  1814. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  1815. <div id="profile-image" class="profile-image clearfix">
  1816. <div id="profile-icon" class="profile-icon clearfix">
  1817. <a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a>
  1818. </div>
  1819. <div id="profile-labels" class="profile-labels clearfix">
  1820. ]] ) end write( [[
  1821. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h1.label ~= '' then write( [[
  1822. <h1><span><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [[">]] )write( M.masthead.h1.label )write( [[</a></span></h1>
  1823. ]] ) elseif M.masthead.h1.label ~= '' then write( [[
  1824. <h1><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><span>]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[</span></a></h1>
  1825. ]] ) end write( [[
  1826. ]] ) if (not M.identityplate.on or (M.identityplate.on and M.identityplate.role == 'profile')) and M.masthead.h2.label ~= '' then write( [[
  1827. <h2><span>]] )write( M.masthead.h2.label )write( [[</span></h2>
  1828. ]] ) elseif M.masthead.h2.label ~= '' then write( [[
  1829. <h2><a href="]] ) if mode == 'preview' then write( [[index.html]] ) else write( M.page_setup.site.root ) end write( [["><img alt="]] ) if M.masthead.h1.label ~= '' and M.masthead.h1.label ~= 'Site Heading' then write( M.masthead.h1.label ) else write( M.page_setup.html.title ) end write( [[" src="]] )write( sharedResources )write( [[/images/identityplate.png" width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" /></a></h2>
  1830. ]] ) end write( [[
  1831. ]] ) if M.identityplate.on and M.identityplate.role == 'profile' then write( [[
  1832. </div>
  1833. </div><!-- #profile-image -->
  1834. ]] ) end write( [[
  1835. </div>
  1836. </div>
  1837. ]] ) if M.social_media.profiles.location == 'masthead-top' or M.social_media.profiles.location == 'masthead-bottom' then write( [[
  1838. ]] ) if M.social_media.display then write( [[
  1839. <div class="social-media-profiles social-media clearfix">
  1840. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1841. <div class="mantle clearfix">
  1842. <div class="core clearfix">
  1843. ]] ) end --[[ masthead ]] write( [[
  1844. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1845. "$add_mode = true;\n"..
  1846. "if ( function_exists('ttg_social_media') ) {\n"..
  1847. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  1848. " $add_mode = false;\n"..
  1849. " }\n"..
  1850. "}\n"..
  1851. "if ( $add_mode ) { ".."?"..">") end write( [[
  1852. <ul class="clearfix">
  1853. ]] ) if M.social_media.profiles.label ~= '' then write( [[
  1854. <li class="social-media-label"><span>]] )write( M.social_media.profiles.label )write( [[</span></li>
  1855. ]] ) end write( [[
  1856. ]] ) if M.social_media.profiles.user ~= '' then write( [[
  1857. <li class="social-bg user"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.user ) end write( [["]] )write( newWindow )write( [[><i class="fa fa-user"></i></a></li>
  1858. ]] ) end write( [[
  1859. ]] ) if M.social_media.profiles.aboutme ~= '' then write( [[
  1860. <li class="social-bg about-me"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.aboutme ) end write( [["]] )write( newWindow )write( [[ title="About.me"><span>me</span></a></li>
  1861. ]] ) end write( [[
  1862. ]] ) if M.social_media.profiles.pinterest ~= '' then write( [[
  1863. <li class="social-bg pinterest"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.pinterest ) end write( [["]] )write( newWindow )write( [[ title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  1864. ]] ) end write( [[
  1865. ]] ) if M.social_media.profiles.google_plus ~= '' then write( [[
  1866. <li class="social-bg google-plus"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.google_plus )write( [[?rel=author]] ) end write( [["]] )write( newWindow )write( [[ title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  1867. ]] ) end write( [[
  1868. ]] ) if M.social_media.profiles.twitter ~= '' then write( [[
  1869. <li class="social-bg twitter"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.twitter ) end write( [["]] )write( newWindow )write( [[ title="Twitter"><i class="fa fa-twitter"></i></a></li>
  1870. ]] ) end write( [[
  1871. ]] ) if M.social_media.profiles.linkedin ~= '' then write( [[
  1872. <li class="social-bg linkedin"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.linkedin ) end write( [["]] )write( newWindow )write( [[ title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  1873. ]] ) end write( [[
  1874. ]] ) if M.social_media.profiles.facebook ~= '' then write( [[
  1875. <li class="social-bg facebook"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.facebook ) end write( [["]] )write( newWindow )write( [[ title="Facebook"><i class="fa fa-facebook"></i></a></li>
  1876. ]] ) end write( [[
  1877. ]] ) if M.social_media.profiles.instagram ~= '' then write( [[
  1878. <li class="social-bg instagram"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.instagram ) end write( [["]] )write( newWindow )write( [[ title="Instagram"><i class="fa fa-instagram"></i></a></li>
  1879. ]] ) end write( [[
  1880. ]] ) if M.social_media.profiles.tumblr ~= '' then write( [[
  1881. <li class="social-bg tumblr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.tumblr ) end write( [["]] )write( newWindow )write( [[ title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  1882. ]] ) end write( [[
  1883. ]] ) if M.social_media.profiles.vsco_grid ~= '' then write( [[
  1884. <li class="social-bg vsco-grid"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vsco_grid ) end write( [["]] )write( newWindow )write( [[ title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  1885. ]] ) end write( [[
  1886. ]] ) if M.social_media.profiles.flickr ~= '' then write( [[
  1887. <li class="social-bg flickr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.flickr ) end write( [["]] )write( newWindow )write( [[ title="Flickr"><i class="fa fa-flickr"></i></a></li>
  1888. ]] ) end write( [[
  1889. ]] ) if M.social_media.profiles.behance ~= '' then write( [[
  1890. <li class="social-bg behance"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.behance ) end write( [["]] )write( newWindow )write( [[ title="Behance"><i class="fa fa-behance"></i></a></li>
  1891. ]] ) end write( [[
  1892. ]] ) if M.social_media.profiles.vimeo ~= '' then write( [[
  1893. <li class="social-bg vimeo"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vimeo ) end write( [["]] )write( newWindow )write( [[ title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  1894. ]] ) end write( [[
  1895. ]] ) if M.social_media.profiles.youtube ~= '' then write( [[
  1896. <li class="social-bg youtube"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.youtube ) end write( [["]] )write( newWindow )write( [[ title="YouTube"><i class="fa fa-youtube"></i></a></li>
  1897. ]] ) end write( [[
  1898. ]] ) if M.social_media.profiles.rss ~= '' then write( [[
  1899. <li class="social-bg rss"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.rss ) end write( [["]] )write( newWindow )write( [[ title="RSS"><i class="fa fa-rss"></i></a></li>
  1900. ]] ) end write( [[
  1901. </ul>
  1902. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] write( [[
  1903. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  1904. </div>
  1905. </div>
  1906. ]] ) end --[[ masthead ]] write( [[
  1907. </div> <!-- #social-media-profiles -->
  1908. ]] ) end --[[ social_media.display ]] write( [[
  1909. ]] ) end write( [[
  1910. </div> <!-- #masthead -->
  1911. ]] ) end --[[ masthead.display ]] write( [[
  1912. ]] ) end --[[ help ]] write( [[
  1913. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_header_masthead ]] write( [[
  1914. ]] ) end --[[ masthead.orphan ]] write( [[
  1915. <div id="page-content" class="page-content clearfix">
  1916. ]] ) if M.sharing.ogp and M.sharing.display and M.sharing.location == 'beneath-navigation' and not cart then write( [[
  1917. <div id="social-media-sharing" class="social-media-sharing clearfix">
  1918. ]] ) if M.sharing.location == 'beneath-navigation' then write( [[
  1919. <div class="mantle clearfix">
  1920. <div class="core clearfix">
  1921. ]] ) end write( [[
  1922. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  1923. "$add_mode = true;\n"..
  1924. "if ( function_exists('ttg_sharing') ) {\n"..
  1925. " if ( !(ttg_sharing( TTG_COMP, TTG_ROOT )) ) {\n"..
  1926. " $add_mode = false;\n"..
  1927. " }\n"..
  1928. "}\n"..
  1929. "if ( $add_mode ) { ".."?"..">") end write( [[
  1930. ]] ) if M.sharing.float ~= 'none' then write( [[
  1931. <ul class="clearfix">
  1932. <li class="social-bg share-page facebook"><a href="]] ) if publish then write( [[https://www.facebook.com/sharer/sharer.php?u=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&title=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></li>
  1933. <li class="social-bg share-page linkedin"><a href="]] ) if publish then write( [[http://www.linkedin.com/shareArticle?mini=true&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></li>
  1934. <li class="social-bg share-page twitter"><a href="]] ) if publish then write( [[http://twitter.com/intent/tweet?text=]] ) if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then write("<?php echo $short_url; ".."?"..">") else write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">") end if M.sharing.twitter.creator ~= '' then write( [[&via=]] )write( M.sharing.twitter.creator ) end end write( [[" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></li>
  1935. <li class="social-bg share-page google-plus"><a href="]] ) if publish then write( [[https://plus.google.com/share?url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></li>
  1936. <li class="social-bg share-page pinterest"><a href="]] ) if publish then write( [[http://pinterest.com/pin/create/bookmarklet/?media=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[/]] ) write("<?php echo urlencode(PAGEIMAGE)".."?"..">") write( [[&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&is_video=false&description=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></li>
  1937. <li class="social-bg email"><a href="]] ) if publish then write( [[mailto:?Subject=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[&Body=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[%0D%0A]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></li>
  1938. </ul>
  1939. ]] ) else write( [[
  1940. <p class="clearfix">
  1941. <span class="social-bg share-page facebook"><a href="]] ) if publish then write( [[https://www.facebook.com/sharer/sharer.php?u=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&title=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></span>
  1942. <span class="social-bg share-page linkedin"><a href="]] ) if publish then write( [[http://www.linkedin.com/shareArticle?mini=true&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></span>
  1943. <span class="social-bg share-page twitter"><a href="]] ) if publish then write( [[http://twitter.com/intent/tweet?text=]] ) if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then write("<?php echo $short_url; ".."?"..">") else write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">") end if M.sharing.twitter.creator ~= '' then write( [[&via=]] )write( M.sharing.twitter.creator ) end end write( [[" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></span>
  1944. <span class="social-bg share-page google-plus"><a href="]] ) if publish then write( [[https://plus.google.com/share?url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></span>
  1945. <span class="social-bg share-page pinterest"><a href="]] ) if publish then write( [[http://pinterest.com/pin/create/bookmarklet/?media=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[/]] ) write("<?php echo urlencode(PAGEIMAGE)".."?"..">") write( [[&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&is_video=false&description=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></span>
  1946. <span class="social-bg email"><a href="]] ) if publish then write( [[mailto:?Subject=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[&Body=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[%0D%0A]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></span>
  1947. </p>
  1948. ]] ) end write( [[
  1949. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_sharing ]] write( [[
  1950. ]] ) if M.sharing.location == 'beneath-navigation' then write( [[
  1951. </div>
  1952. </div>
  1953. ]] ) end write( [[
  1954. </div> <!-- #social-media-sharing -->
  1955. ]] ) end write( [[
  1956. ]] ) if publish and M.phplugins.enable then write ("<?php\n"..
  1957. "if ( function_exists('ttg_canvas_top') ) {\n"..
  1958. " $void = ttg_canvas_top( TTG_COMP, TTG_ROOT );\n"..
  1959. "} ".."?"..">") end --[[ ttg_canvas_top ]] write( [[
  1960. ]] ) if M.password.enable and mode == 'publish' and not cart then
  1961. write ( "<?php if ((!isset($enablePassword) || $enablePassword) && !$logged_in) { " .. "?" .. ">" )
  1962. end write( [[
  1963. ]] ) if (( M.password.enable and mode == 'publish' ) or ( M.password.enable and M.password.preview )) and not cart then write( [[
  1964. <div id="login" class="login form clearfix">
  1965. <div class="mantle clearfix">
  1966. <div class="core clearfix">
  1967. <form id="password-protection" class="password-protection" name="form" method="post" action="]] ) if mode == 'publish' then write ( "<?php echo $_SERVER['PHP_SELF'].(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] && $_SERVER['QUERY_STRING'] != 'logout'?'?'.$_SERVER['QUERY_STRING']:''); " .. "?" .. ">" ) end write( [[">
  1968. ]] ) if M.password.label.message ~= '' then write( [[
  1969. <div id="login-message" class="login-message collapse">
  1970. ]] ) write(markdown( M.password.label.message )) write( [[
  1971. </div>
  1972. ]] ) end write( [[
  1973. <div id="login-form" class="login-form collapse">
  1974. <fieldset>
  1975. <p>
  1976. <label for="ttg_username">]] )write( M.password.label.username )write( [[</label>
  1977. <input id="login-username" class="" name="ttg_username" type="text" autocomplete="off" autocapitalize="off" placeholder="" required />
  1978. </p>
  1979. <p>
  1980. <label for="ttg_password">]] )write( M.password.label.password )write( [[</label>
  1981. <input id="login-password" class="" name="ttg_password" type="password" autocomplete="off" placeholder="" required />
  1982. </p>
  1983. <p><input type="submit" name="Submit" value="]] )write( M.password.label.login )write( [[" /></p>
  1984. </fieldset>
  1985. </div>
  1986. </form>
  1987. </div>
  1988. </div>
  1989. </div> <!-- #login -->
  1990. ]] ) if M.password.enable and M.password.preview then write( [[
  1991. <style> #the-block, #the-grid { display: none !important; } </style>
  1992. ]] ) end end write( [[
  1993. ]] ) if M.password.enable and mode == 'publish' and not cart then
  1994. write ( "<?php } else { " .. "?" .. ">" )
  1995. end write( [[
  1996. ]] ) if M.social_media.profiles.location == 'above-the-block' and not cart then write( [[
  1997. ]] ) if M.social_media.display then write( [[
  1998. <div class="social-media-profiles social-media clearfix">
  1999. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  2000. <div class="mantle clearfix">
  2001. <div class="core clearfix">
  2002. ]] ) end --[[ masthead ]] write( [[
  2003. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  2004. "$add_mode = true;\n"..
  2005. "if ( function_exists('ttg_social_media') ) {\n"..
  2006. " if ( !(ttg_social_media( TTG_COMP, TTG_ROOT )) ) {\n"..
  2007. " $add_mode = false;\n"..
  2008. " }\n"..
  2009. "}\n"..
  2010. "if ( $add_mode ) { ".."?"..">") end write( [[
  2011. <ul class="clearfix">
  2012. ]] ) if M.social_media.profiles.label ~= '' then write( [[
  2013. <li class="social-media-label"><span>]] )write( M.social_media.profiles.label )write( [[</span></li>
  2014. ]] ) end write( [[
  2015. ]] ) if M.social_media.profiles.user ~= '' then write( [[
  2016. <li class="social-bg user"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.user ) end write( [["]] )write( newWindow )write( [[><i class="fa fa-user"></i></a></li>
  2017. ]] ) end write( [[
  2018. ]] ) if M.social_media.profiles.aboutme ~= '' then write( [[
  2019. <li class="social-bg about-me"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.aboutme ) end write( [["]] )write( newWindow )write( [[ title="About.me"><span>me</span></a></li>
  2020. ]] ) end write( [[
  2021. ]] ) if M.social_media.profiles.pinterest ~= '' then write( [[
  2022. <li class="social-bg pinterest"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.pinterest ) end write( [["]] )write( newWindow )write( [[ title="Pinterest"><i class="fa fa-pinterest"></i></a></li>
  2023. ]] ) end write( [[
  2024. ]] ) if M.social_media.profiles.google_plus ~= '' then write( [[
  2025. <li class="social-bg google-plus"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.google_plus )write( [[?rel=author]] ) end write( [["]] )write( newWindow )write( [[ title="Google Plus" rel="publisher"><i class="fa fa-google-plus"></i></a></li>
  2026. ]] ) end write( [[
  2027. ]] ) if M.social_media.profiles.twitter ~= '' then write( [[
  2028. <li class="social-bg twitter"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.twitter ) end write( [["]] )write( newWindow )write( [[ title="Twitter"><i class="fa fa-twitter"></i></a></li>
  2029. ]] ) end write( [[
  2030. ]] ) if M.social_media.profiles.linkedin ~= '' then write( [[
  2031. <li class="social-bg linkedin"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.linkedin ) end write( [["]] )write( newWindow )write( [[ title="LinkedIn"><i class="fa fa-linkedin"></i></a></li>
  2032. ]] ) end write( [[
  2033. ]] ) if M.social_media.profiles.facebook ~= '' then write( [[
  2034. <li class="social-bg facebook"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.facebook ) end write( [["]] )write( newWindow )write( [[ title="Facebook"><i class="fa fa-facebook"></i></a></li>
  2035. ]] ) end write( [[
  2036. ]] ) if M.social_media.profiles.instagram ~= '' then write( [[
  2037. <li class="social-bg instagram"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.instagram ) end write( [["]] )write( newWindow )write( [[ title="Instagram"><i class="fa fa-instagram"></i></a></li>
  2038. ]] ) end write( [[
  2039. ]] ) if M.social_media.profiles.tumblr ~= '' then write( [[
  2040. <li class="social-bg tumblr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.tumblr ) end write( [["]] )write( newWindow )write( [[ title="Tumblr"><i class="fa fa-tumblr"></i></a></li>
  2041. ]] ) end write( [[
  2042. ]] ) if M.social_media.profiles.vsco_grid ~= '' then write( [[
  2043. <li class="social-bg vsco-grid"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vsco_grid ) end write( [["]] )write( newWindow )write( [[ title="VSCO Grid"><i class="fa fa-camera-retro"></i></a></li>
  2044. ]] ) end write( [[
  2045. ]] ) if M.social_media.profiles.flickr ~= '' then write( [[
  2046. <li class="social-bg flickr"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.flickr ) end write( [["]] )write( newWindow )write( [[ title="Flickr"><i class="fa fa-flickr"></i></a></li>
  2047. ]] ) end write( [[
  2048. ]] ) if M.social_media.profiles.behance ~= '' then write( [[
  2049. <li class="social-bg behance"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.behance ) end write( [["]] )write( newWindow )write( [[ title="Behance"><i class="fa fa-behance"></i></a></li>
  2050. ]] ) end write( [[
  2051. ]] ) if M.social_media.profiles.vimeo ~= '' then write( [[
  2052. <li class="social-bg vimeo"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.vimeo ) end write( [["]] )write( newWindow )write( [[ title="Vimeo"><i class="fa fa-vimeo-square"></i></a></li>
  2053. ]] ) end write( [[
  2054. ]] ) if M.social_media.profiles.youtube ~= '' then write( [[
  2055. <li class="social-bg youtube"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.youtube ) end write( [["]] )write( newWindow )write( [[ title="YouTube"><i class="fa fa-youtube"></i></a></li>
  2056. ]] ) end write( [[
  2057. ]] ) if M.social_media.profiles.rss ~= '' then write( [[
  2058. <li class="social-bg rss"><a href="]] ) if mode == 'preview' then write( [[#]] ) else write( M.social_media.profiles.rss ) end write( [["]] )write( newWindow )write( [[ title="RSS"><i class="fa fa-rss"></i></a></li>
  2059. ]] ) end write( [[
  2060. </ul>
  2061. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_social_media ]] write( [[
  2062. ]] ) if M.social_media.profiles.location ~= 'masthead-top' and M.social_media.profiles.location ~= 'masthead-bottom' and M.social_media.profiles.location ~= 'in-the-footer' then write( [[
  2063. </div>
  2064. </div>
  2065. ]] ) end --[[ masthead ]] write( [[
  2066. </div> <!-- #social-media-profiles -->
  2067. ]] ) end --[[ social_media.display ]] write( [[
  2068. ]] ) end write( [[
  2069. ]] ) if mode == 'publish' and publisher then write( [[
  2070. ]] ) write("<?php if ($album->showBreadcrumbs()) { ".."?"..">") write( [[
  2071. <div id="breadcrumb-container" class="block-id the-block clearfix">
  2072. <div class="mantle clearfix">
  2073. <div class="core clearfix">
  2074. ]] ) write("<?php echo $album->getBreadcrumbs(array('root_name' => __c('BREADCRUMB_HOME_NAME'), 'container' => 'ul.breadcrumbs', 'child_container' => 'li.crumb', 'separator' => ' '.__c('BREADCRUMB_SEPARATOR').' ')); ".."?"..">") write( [[
  2075. </div>
  2076. </div>
  2077. </div> <!-- #breadcrumb-container -->
  2078. ]] ) write("<?php } ".."?"..">") write( [[
  2079. ]] ) elseif mode == 'preview' and M.breadcrumbs.preview then write( [[
  2080. <div id="breadcrumb-container" class="block-id the-block clearfix">
  2081. <div class="mantle clearfix">
  2082. <div class="core clearfix"><ul class="breadcrumbs">
  2083. <li class="crumb"><a><span>Galleries</span></a></li><li class="crumb"> » </li><li class="crumb"><a><span>]] ) if M.album.title ~= '' then write( M.album.title ) else write( [[Album Title]] ) end write( [[</span></a></li>
  2084. </ul></div>
  2085. </div>
  2086. </div> <!-- #breadcrumb-container -->
  2087. ]] ) end write( [[
  2088. ]] ) if M.the_block.location == 'top' then write( [[
  2089. ]] ) if (M.the_block.display and (page == 1 or M.the_block.display_all or mobile or publisher)) or cart then write( [[
  2090. <div id="the-block" class="block-id the-block clearfix">
  2091. <div class="mantle clearfix">
  2092. <div class="core clearfix">
  2093. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  2094. "$add_mode = true;\n"..
  2095. "if ( function_exists('ttg_block_top') ) {\n"..
  2096. " if ( !(ttg_block_top( TTG_COMP, TTG_ROOT )) ) {\n"..
  2097. " $add_mode = false;\n"..
  2098. " }\n"..
  2099. "}\n"..
  2100. "if ( $add_mode ) { ".."?"..">") end write( [[
  2101. <div class="container_12 collapse clearfix">
  2102. ]] ) if cart then
  2103. write ("<?php\n"..
  2104. "$message = MessageHelper::flash();\n"..
  2105. "if ($message) {\n"..
  2106. "include(APP_DIR.'/views/message.php');\n"..
  2107. "}".."?"..">")
  2108. write ("<?php\n"..
  2109. "$viewFilePath = APP_DIR.'/views/';\n"..
  2110. "$fullFilePath = $viewFilePath.$file_name.'.php';\n"..
  2111. "if (!is_file($fullFilePath)) {\n"..
  2112. " echo '<div id=\"message\" class=\"error\"><h1>Error: The included page was not found on the server</h1>';\n"..
  2113. " echo '<p>Please upload <strong>'.TTG_BE_DIRECTORY.'/'.APP_SLUG.'/'.$fullFilePath.'</strong> from your downloaded '.APP_SHORT_NAME.' zip to <strong>'.TTG_BE_DIRECTORY.'/'.APP_SLUG.'/'.$viewFilePath.'admin/</strong> on your server</div>';\n"..
  2114. "} else {\n"..
  2115. " include($fullFilePath);\n"..
  2116. "}".."?"..">") else write( [[
  2117. ]] ) if mode == 'preview' and M.the_block.now_showing == 'actual' then write( [[
  2118. ]] ) if M.page_setup.site.root == '' then write( [[
  2119. <p class="alert">
  2120. The <strong>Site Root</strong> is empty! Please designate your site root in <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Website</strong>.<br />
  2121. The root address of your website should begin with "http://" and end with a trailing slash, "/". For example:<br />
  2122. <span style="letter-spacing:1px;"><strong style="color:#ff2c2c;">http://</strong>yourdomain.com<strong style="color:#ff2c2c;">/</strong></span>
  2123. </p>
  2124. ]] ) elseif M.page_setup.site.root ~= '' and M.page_setup.site.root ~= '/' and M.page_setup.site.root ~= './' then
  2125. local website = M.page_setup.site.root
  2126. if (string.sub(website, 1,7) ~= 'http://' and string.sub(website, 1,8) ~= 'https://' and string.sub(website, 1,1) ~= '/' and string.sub(website, 1,2) ~= './') or string.sub(website, -1,-1) ~= '/' then
  2127. write( [[
  2128. <p class="alert alert-error">Your <strong>Site Root</strong> is wrong! <br />
  2129. Please ensure that your site root, entered in <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Website</strong>, begins with "<strong style="color:#369;">http://</strong>" and ends with a trailing slash "<strong style="color:#369;">/</strong>". <br />
  2130. For example: <span style="letter-spacing:1px;"><strong style="color:#369;">http://</strong>yourdomain.com<strong style="color:#369;">/</strong></span>
  2131. </p>
  2132. ]] ) end end write( [[
  2133. ]] ) if M.cart.integration.enabled and M.fotomoto.integration.enabled then write( [[
  2134. <p class="alert alert-error"><i class="fa fa-fw fa-exclamation-triangle"></i>
  2135. <strong>Shopping Cart Integration</strong> and <strong>Fotomoto Integration</strong> cannot be enabled simultaneously. Please enable one, and disable the other.
  2136. </p>
  2137. ]] ) end write( [[
  2138. ]] ) end write( [[
  2139. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then write( [[
  2140. <div class="grid_8 gutter_24px alpha collapse_top clearfix">
  2141. <hr />
  2142. <h2>Plugin Quick Reference</h2>
  2143. <hr />
  2144. <dl>
  2145. <dt><i class="fa fa-chevron-circle-left"></i> Template Browser</dt>
  2146. <dd style="font-size:smaller;margin-top: 4px;">
  2147. Don't lose your work! Use the Template Browser to save templates of your gallery configuration(s) for later use. You may also copy the settings from your saved template to use in other CE4 plugins. If the Template Browser is not visible, open the lefthand control panel to access it.
  2148. </dd>
  2149. </dl>
  2150. <hr />
  2151. <p><i class="fa fa-lightbulb-o fa-lg"></i> To dismiss this screen, go to <strong>Site Info</strong> <i class="fa fa-caret-right"></i> <strong>Now Showing</strong> near the top, and select "<strong>Page Preview</strong>".
  2152. <hr />
  2153. <p>Use <strong>CE4 Gallery</strong> to customize and publish responsive image galleries to be viewed on any modern device, including desktop and laptop computers, tablets and mobile phones.</p>
  2154. <p>Create standalone image galleries, or combine with <strong>CE4 Auto Index</strong> and/or <strong>CE4 Publisher</strong> to easily organize and publish any number of galleries. Pair with <strong>CE4 Cart</strong> for self-managed image sales, or signup with Fotomoto.com to handle products and delivery.</p>
  2155. <hr />
  2156. <h3>Avoid Common Problems</h3>
  2157. <dl>
  2158. <dt><i class="fa fa-compass"></i> Trust the Defaults</dt>
  2159. <dd style="font-size:smaller;margin-top: 4px;">
  2160. If you don't understand an option and fail to observe its impact on the page, check the online documentation for help. If you're still in the dark, keep the default setting. Defaults are safe.
  2161. </dd>
  2162. <dt><i class="fa fa-folder-o"></i> Folders</dt>
  2163. <dd style="font-size:smaller;margin-top: 4px;">
  2164. When exporting, avoid spaces and non-alphanumeric characters in your folder names. Do not use commas, apostrophes, quotation marks, parentheses, etc. It's okay to use hyphens ( - ) or underscores ( _ ) to replace spaces.
  2165. </dd>
  2166. <dt><i class="fa fa-file-o"></i> Files</dt>
  2167. <dd style="font-size:smaller;margin-top: 4px;">
  2168. In the Library, avoid spaces and non-alphanumeric characters in your image file names. Do not use commas, apostrophes, quotation marks, parentheses, etc. It's okay to use hyphens ( - ) or underscores ( _ ) to replace spaces.
  2169. </dd>
  2170. </dl>
  2171. </div>
  2172. <div class="grid_4 gutter_24px omega collapse_top clearfix">
  2173. <hr />
  2174. <dl>
  2175. <dt>Site Info <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2176. <dd style="font-size:smaller;margin-top: 4px;">
  2177. Set global parameters and common design elements for your website, including masthead, navigation, typography styling and the page footer, and under-the-hood items for SEO, Google Analytics, etc.
  2178. </dd>
  2179. <dt>Color Palette <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2180. <dd style="font-size:smaller;margin-top: 4px;">
  2181. Setup "The Block", the exposition area.
  2182. </dd>
  2183. <dt>Appearance <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2184. <dd style="font-size:smaller;margin-top: 4px;">
  2185. Setup "The Grid", the media area, and configure your gallery presentation.
  2186. </dd>
  2187. <dt>Image Info <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2188. <dd style="font-size:smaller;margin-top: 4px;">
  2189. Assign metadata to appear with each image. Provide metadata to images in the Library module.
  2190. </dd>
  2191. <dt>Output Settings <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2192. <dd style="font-size:smaller;margin-top: 4px;">
  2193. Set parameters for exported images, setup password protection, enable e-commerce support and other auxiliary settings.
  2194. </dd>
  2195. <dt>Upload Settings <i class="fa fa-chevron-circle-right" style="float:right;"></i></dt>
  2196. <dd style="font-size:smaller;margin-top: 4px;">
  2197. We advise against using the Web module's upload feature. Instead, you should Export to desktop and upload to your server using a proper FTP client, as this is the most reliable way to publish your content online.
  2198. </dd>
  2199. </dl>
  2200. <hr />
  2201. </div>
  2202. ]] ) elseif mode == 'preview' and M.the_block.now_showing == 'typography' then write( [[
  2203. <h1>Heading 1 <span>(]] )write( M.typography_headings.h1_font_size )write( [[px)</span></h1>
  2204. <h2>Heading 2 <span>(]] )write( M.typography_headings.h2_font_size )write( [[px)</span></h2>
  2205. <h3>Heading 3 <span>(]] )write( M.typography_headings.h3_font_size )write( [[px)</span></h3>
  2206. <h4>Heading 4 <span>(]] )write( M.typography_headings.h4_font_size )write( [[px)</span></h4>
  2207. <h5>Heading 5 <span>(]] )write( M.typography_headings.h5_font_size )write( [[px)</span></h5>
  2208. <h6>Heading 6 <span>(]] )write( M.typography_headings.h6_font_size )write( [[px)</span></h6>
  2209. <h2 class="h3">Paragraphs</h2>
  2210. <p>Lorem ipsum dolor sit amet, <a href="#">consectetur adipisicing elit</a>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  2211. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
  2212. <h2 class="h3">Blockquote</h2>
  2213. <blockquote>
  2214. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  2215. </blockquote>
  2216. <hr />
  2217. <h6>Horizontal Rule: <hr /></h6>
  2218. <hr />
  2219. <h2 class="h3">Form</h2>
  2220. <form class="form clearfix" style="margin: 0; max-width:480px;">
  2221. <fieldset>
  2222. <label for="input1">An Input</label>
  2223. <p><input id="input1" type="text" /></p>
  2224. <label for="input2">Another Input</label>
  2225. <p><input id="input2" type="text" /></p>
  2226. <p>
  2227. <input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" />
  2228. <label for="subscribe">Notify me of followup comments via e-mail</label>
  2229. </p>
  2230. <p>
  2231. <input id="male" type="radio" name="sex" value="male">
  2232. <label for="male">Male</label>
  2233. <input id="female" type="radio" name="sex" value="female">
  2234. <label for="female">Female</label>
  2235. </p>
  2236. </fieldset>
  2237. <p><input type="submit" value="Submit" /></p>
  2238. </form>
  2239. <h2 class="h3">Table</h2>
  2240. <table class="table table-bordered table-striped">
  2241. <thead>
  2242. <tr>
  2243. <th>Element</th>
  2244. <th>Use</th>
  2245. </tr>
  2246. </thead>
  2247. <tbody>
  2248. <tr>
  2249. <td><code><strong></code></td>
  2250. <td>Strong emphasis</td>
  2251. </tr>
  2252. <tr>
  2253. <td><code><b></code></td>
  2254. <td>Presentational bold</td>
  2255. </tr>
  2256. <tr>
  2257. <td><code><em></code></td>
  2258. <td>Emphasis</td>
  2259. </tr>
  2260. <tr>
  2261. <td><code><i></code></td>
  2262. <td>Presentational italics</td>
  2263. </tr>
  2264. <tr>
  2265. <td><code><abbr></code></td>
  2266. <td>Abbreviations and acronyms</td>
  2267. </tr>
  2268. <tr>
  2269. <td><code><address></code></td>
  2270. <td>Content contact information</td>
  2271. </tr>
  2272. </tbody>
  2273. </table>
  2274. <h2 class="h3">Unordered list</h2>
  2275. <ul>
  2276. <li>Unordered list item</li>
  2277. <li>Unordered list item</li>
  2278. <li>Unordered list item</li>
  2279. <li>Unordered list item</li>
  2280. <li>Unordered list item</li>
  2281. <li>Unordered list item</li>
  2282. </ul>
  2283. <h2 class="h3">Ordered list</h2>
  2284. <ol>
  2285. <li>Ordered list item</li>
  2286. <li>Ordered list item</li>
  2287. <li>Ordered list item</li>
  2288. <li>Ordered list item</li>
  2289. <li>Ordered list item</li>
  2290. <li>Ordered list item</li>
  2291. </ol>
  2292. <h2 class="h3">Unordered, Bordered list</h2>
  2293. <ul class="list-bordered">
  2294. <li>Bordered list item</li>
  2295. <li>Bordered list item</li>
  2296. <li>Bordered list item</li>
  2297. <li>Bordered list item</li>
  2298. <li>Bordered list item</li>
  2299. <li>Bordered list item</li>
  2300. </ul>
  2301. <h2 class="h3">Definition list</h2>
  2302. <dl>
  2303. <dt>Definition term</dt>
  2304. <dd>Definition description</dd>
  2305. <dt>Definition term</dt>
  2306. <dd>Definition description</dd>
  2307. </dl>
  2308. <mark>mark</mark><br />
  2309. <del>del</del><br />
  2310. <ins>ins</ins><br />
  2311. <abbr title="The Turning Gate">TTG</abbr>
  2312. ]] ) else --[[ actual: ]] write( [[
  2313. <!-- primary content -->
  2314. ]] ) if M.the_block.columns == '1col' then write( [[
  2315. <div id="primary-content" class="grid_12 collapse clearfix">
  2316. ]] ) else write( [[
  2317. <div id="primary-content" class="grid_]] )write( M.the_block.content_width ) if M.the_block.content_position == 'right' then write( [[ push_]] )write( math.floor(12 - M.the_block.content_width) ) end if M.the_block.content_width ~= 12 then write( [[ gutter_]] )write( M.the_block.content_gutters ) if M.the_block.content_position == 'right' then write( [[ omega]] ) else write( [[ alpha]] ) end end write( [[ collapse shelf_line clearfix">
  2318. ]] ) end write( [[
  2319. ]] ) if mode == 'publish' and publisher then write( [[
  2320. ]] ) write("<?php echo $album->hook_preContentBlock(); ".."?"..">") write( [[
  2321. ]] ) end write( [[
  2322. ]] ) if mode == 'publish' and publisher then write( [[
  2323. ]] ) write("<?php if ($album->placePageCopyAbove()) {\n"..
  2324. " echo $album->getPageCopy();\n"..
  2325. "} ".."?"..">") write( [[
  2326. ]] ) write("<?php if ($album->replacePageCopy()) {\n"..
  2327. " echo $album->getPageCopy();\n"..
  2328. "} else { ".."?"..">") write( [[
  2329. ]] ) end write( [[
  2330. ]] ) if M.the_block.image.location == "primary" then write( [[
  2331. ]] ) if getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then write( [[
  2332. <img class="the-block-image align]] )write( M.the_block.image.float )write( [[" src="photos/]] )write( getImage(M.the_block.image.id).exportFilename )write( [[.jpg" alt="]] )write( getImage(M.the_block.image.id).metadata.imgAlt )write( [[" width="]] )write( getImage(M.the_block.image.id).renditions.photos.width )write( [[" height="]] )write( getImage(M.the_block.image.id).renditions.photos.height )write( [[" />
  2333. ]] ) else write( [[
  2334. <p class="alert"><strong>ERROR</strong> : The specified ID does not correspond to any image in your filmstrip.</p>
  2335. ]] ) end end write( [[
  2336. ]] ) write (markdown ( M.the_block.content ) ) write( [[
  2337. ]] ) if mode == 'publish' and publisher then write( [[
  2338. ]] ) write("<?php } ".."?"..">") write( [[
  2339. ]] ) write("<?php if ($album->placePageCopyBelow()) {\n"..
  2340. " echo $album->getPageCopy();\n"..
  2341. "} ".."?"..">") write( [[
  2342. ]] ) end write( [[
  2343. ]] ) if M.sharing.ogp and M.sharing.display and M.sharing.location == 'end-block' then write( [[
  2344. <div id="social-media-sharing" class="social-media-sharing clearfix">
  2345. ]] ) if M.sharing.location == 'beneath-navigation' then write( [[
  2346. <div class="mantle clearfix">
  2347. <div class="core clearfix">
  2348. ]] ) end write( [[
  2349. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  2350. "$add_mode = true;\n"..
  2351. "if ( function_exists('ttg_sharing') ) {\n"..
  2352. " if ( !(ttg_sharing( TTG_COMP, TTG_ROOT )) ) {\n"..
  2353. " $add_mode = false;\n"..
  2354. " }\n"..
  2355. "}\n"..
  2356. "if ( $add_mode ) { ".."?"..">") end write( [[
  2357. ]] ) if M.sharing.float ~= 'none' then write( [[
  2358. <ul class="clearfix">
  2359. <li class="social-bg share-page facebook"><a href="]] ) if publish then write( [[https://www.facebook.com/sharer/sharer.php?u=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&title=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></li>
  2360. <li class="social-bg share-page linkedin"><a href="]] ) if publish then write( [[http://www.linkedin.com/shareArticle?mini=true&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></li>
  2361. <li class="social-bg share-page twitter"><a href="]] ) if publish then write( [[http://twitter.com/intent/tweet?text=]] ) if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then write("<?php echo $short_url; ".."?"..">") else write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">") end if M.sharing.twitter.creator ~= '' then write( [[&via=]] )write( M.sharing.twitter.creator ) end end write( [[" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></li>
  2362. <li class="social-bg share-page google-plus"><a href="]] ) if publish then write( [[https://plus.google.com/share?url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></li>
  2363. <li class="social-bg share-page pinterest"><a href="]] ) if publish then write( [[http://pinterest.com/pin/create/bookmarklet/?media=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[/]] ) write("<?php echo urlencode(PAGEIMAGE)".."?"..">") write( [[&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&is_video=false&description=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></li>
  2364. <li class="social-bg email"><a href="]] ) if publish then write( [[mailto:?Subject=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[&Body=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[%0D%0A]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></li>
  2365. </ul>
  2366. ]] ) else write( [[
  2367. <p class="clearfix">
  2368. <span class="social-bg share-page facebook"><a href="]] ) if publish then write( [[https://www.facebook.com/sharer/sharer.php?u=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&title=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i><span>Share</span></a></span>
  2369. <span class="social-bg share-page linkedin"><a href="]] ) if publish then write( [[http://www.linkedin.com/shareArticle?mini=true&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="LinkedIn"><i class="fa fa-fw fa-linkedin"></i><span>Share</span></a></span>
  2370. <span class="social-bg share-page twitter"><a href="]] ) if publish then write( [[http://twitter.com/intent/tweet?text=]] ) if M.sharing.bitly.username ~= '' and M.sharing.bitly.apikey ~= '' then write("<?php echo $short_url; ".."?"..">") else write("<?php echo urlencode(CURRENTPAGELOCATION) ".."?"..">") end if M.sharing.twitter.creator ~= '' then write( [[&via=]] )write( M.sharing.twitter.creator ) end end write( [[" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i><span>Tweet</span></a></span>
  2371. <span class="social-bg share-page google-plus"><a href="]] ) if publish then write( [[https://plus.google.com/share?url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Google Plus"><i class="fa fa-fw fa-google-plus"></i><span>Share</span></a></span>
  2372. <span class="social-bg share-page pinterest"><a href="]] ) if publish then write( [[http://pinterest.com/pin/create/bookmarklet/?media=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[/]] ) write("<?php echo urlencode(PAGEIMAGE)".."?"..">") write( [[&url=]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") write( [[&is_video=false&description=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") end write( [[" target="_blank" title="Pinterest"><i class="fa fa-fw fa-pinterest"></i><span>Pin It</span></a></span>
  2373. <span class="social-bg email"><a href="]] ) if publish then write( [[mailto:?Subject=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[&Body=]] ) write("<?php echo urlencode(ALBUMTITLE)".."?"..">") write( [[%0D%0A]] ) write("<?php echo urlencode(CURRENTPAGELOCATION)".."?"..">") end write( [[" target="_blank" title="Email"><i class="fa fa-fw fa-envelope"></i><span>Email</span></a></span>
  2374. </p>
  2375. ]] ) end write( [[
  2376. ]] ) if publish and model.phplugins.enable then write ("<?php } ".."?"..">") end --[[ ttg_sharing ]] write( [[
  2377. ]] ) if M.sharing.location == 'beneath-navigation' then write( [[
  2378. </div>
  2379. </div>
  2380. ]] ) end write( [[
  2381. </div> <!-- #social-media-sharing -->
  2382. ]] ) end --[[ sharing.display ]] write( [[
  2383. </div>
  2384. <!-- /primary content -->
  2385. ]] ) if M.the_block.columns ~= '1col' then write( [[
  2386. <!-- secondary content -->
  2387. <div id="secondary-content" class="grid_]] )write( math.floor(12 - M.the_block.content_width) )write( [[ collapse]] ) if M.the_block.content_position == 'right' then write( [[ pull_]] )write( M.the_block.content_width ) end if M.the_block.content_width ~= 12 then write( [[ gutter_]] )write( M.the_block.content_gutters ) if M.the_block.content_position == 'right' then write( [[ alpha]] ) else write( [[ omega]] ) end end write( [[ clearfix">
  2388. ]] ) if mode == 'publish' and publisher then write( [[
  2389. ]] ) write("<?php if ($album->placeSidebarCopyAbove()) {\n"..
  2390. " echo $album->getSidebarCopy();\n"..
  2391. "} ".."?"..">") write( [[
  2392. ]] ) write("<?php if ($album->replaceSidebarCopy()) {\n"..
  2393. " echo $album->getSidebarCopy();\n"..
  2394. "} else { ".."?"..">") write( [[
  2395. ]] ) end write( [[
  2396. ]] ) if M.the_block.image.location == "secondary" then write( [[
  2397. ]] ) if getImage(M.the_block.image.id).exportFilename ~= "????????.DNG" then write( [[
  2398. <img class="the-block-image align]] )write( M.the_block.image.float )write( [[" src="photos/]] )write( getImage(M.the_block.image.id).exportFilename )write( [[.jpg" alt="]] )write( getImage(M.the_block.image.id).metadata.imgAlt )write( [[" width="]] )write( getImage(M.the_block.image.id).renditions.photos.width )write( [[" height="]] )write( getImage(M.the_block.image.id).renditions.photos.height )write( [[" />
  2399. ]] ) else write( [[
  2400. <p class="alert"><strong>ERROR</strong> : The specified ID does not correspond to any image in your filmstrip.</p>
  2401. ]] ) end end write( [[
  2402. ]] ) write (markdown ( M.the_block.sidebar.content ) ) write( [[
  2403. ]] ) if mode == 'publish' and publisher then write( [[
  2404. ]] ) write("<?php } ".."?"..">") write( [[
  2405. ]] ) write("<?php if ($album->placeSidebarCopyBelow()) {\n"..
  2406. " echo $album->getSidebarCopy();\n"..
  2407. "} ".."?"..">") write( [[
  2408. ]] ) end write( [[
  2409. </div>
  2410. <!-- /secondary content -->
  2411. ]] ) end --[[ the_block.columns ~= '1col' ]] write( [[
  2412. ]] ) end --[[ now_showing ]] write( [[
  2413. ]] ) end --[[ cart ]] write( [[
  2414. </div><!-- #container_12 -->
  2415. ]] ) if publish and M.phplugins.enable then write ("<?php\n" ..
  2416. "} // end ttg_block_top\n"..
  2417. "if ( function_exists('ttg_block_bottom') ) {\n" ..
  2418. " $void = ttg_block_bottom( TTG_COMP, TTG_ROOT );\n" ..
  2419. "} ".."?"..">") end --[[ ttg_block_bottom ]] write( [[
  2420. </div>
  2421. </div>
  2422. </div> <!-- #the-block -->
  2423. ]] ) end --[[ the_block.display ]] write( [[
  2424. ]] ) end write( [[
  2425. ]] ) if not cart then write( [[
  2426. ]] ) if mode == 'preview' and M.the_block.now_showing == 'help' then else write( [[
  2427. ]] ) if M.the_grid.display then write( [[
  2428. <div id="the-grid" class="]] ) if not mobile then write( M.grid.type.desktop ) if M.grid_cell.iconic.enabled then write( [[ iconic]] ) end else write( M.grid.type.mobile ) end write( [[ block-id the-grid clearfix">
  2429. <div class="mantle clearfix">
  2430. <div class="core clearfix">
  2431. <div id="the-gallery" class="the-gallery clearfix">
  2432. ]] ) if publish and model.phplugins.enable then write ("<?php\n" ..
  2433. "$add_mode = true;\n"..
  2434. "if ( function_exists('ttg_grid_top') ) {\n"..
  2435. " if ( !(ttg_grid_top( TTG_COMP, TTG_ROOT )) ) {\n"..
  2436. " $add_mode = false;\n"..
  2437. " }\n"..
  2438. "}\n"..
  2439. "if ( $add_mode ) { ".."?"..">") end write( [[
  2440. ]] ) if (not mobile and M.grid.type.desktop == 'ce4-standard') and not publisher then write( [[
  2441. ]] ) if M.cart.integration.enabled and M.cart.integration.packageButton then write( [[
  2442. <button class="add-package-to-cart add-package" data-price="]] )write( M.cart.integration.package_pricing )write( [["><i class="fa fa-fw fa-shopping-cart"></i> <span>]] )write( M.cart.integration.package_label )write( [[</span></button>
  2443. ]] ) end write( [[
  2444. ]] ) if numGridPages > 1 then write( [[
  2445. <div class="pagination ]] ) if page >= 6 then write( [[page-6-or-greater]] ) else write( [[page-]] )write( page ) end write( [[ pagination-top clearfix">
  2446. <ul class="page-navigation clearfix">]] ) do local LrPaginationEntries = {}
  2447. local oldWrite = write
  2448. write = function( w )
  2449. table.insert( LrPaginationEntries, function() oldWrite( w ) end )
  2450. end
  2451. write( [[
  2452. ]] )LrPaginationEntries.CurrentPage = function( page ) write( [[
  2453. <li class="pagenumber current">]] )write( page )write( [[</li>
  2454. ]] )end table.insert( LrPaginationEntries, 'PageNumbers' ) write( [[
  2455. ]] )LrPaginationEntries.OtherPages = function( page, link ) write( [[
  2456. <li class="pagenumber page-link"><a href="]] )write( link )write( [[">]] )write( page )write( [[</a></li>
  2457. ]] )end write( [[
  2458. ]] )LrPaginationEntries.PreviousEnabled = function( page, link ) write( [[
  2459. <li class="previous page-link"><a class="paginationLinks" href="]] )write( link )write( [[">]] )write( M.grid.pagination.previous )write( [[</a></li>
  2460. ]] )end table.insert( LrPaginationEntries, 'Previous' ) write( [[
  2461. ]] )LrPaginationEntries.PreviousDisabled = function( ) write( [[
  2462. <li class="previous page-link disabled"><span>]] )write( M.grid.pagination.previous )write( [[</span></li>
  2463. ]] )end write( [[
  2464. ]] )LrPaginationEntries.NextEnabled = function( page, link ) write( [[
  2465. <li class="next page-link"><a class="paginationLinks" href="]] )write( link )write( [[">]] )write( M.grid.pagination.next )write( [[</a></li>
  2466. ]] )end table.insert( LrPaginationEntries, 'Next' ) write( [[
  2467. ]] )LrPaginationEntries.NextDisabled = function( ) write( [[
  2468. <li class="next page-link disabled"><span>]] )write( M.grid.pagination.next )write( [[</span></li>
  2469. ]] )end write( [[
  2470. ]] )write = oldWrite LrTagFuncs.PaginationFunc( _G, LrPaginationEntries ) end write( [[</ul>
  2471. </div><!-- pagination -->
  2472. ]] ) end --[[ pagination ]] write( [[
  2473. ]] ) if (not mobile and M.grid.presentation.desktop == "touch") or (mobile and M.grid.presentation.mobile == "touch") then write( [[
  2474. <div class="sliderHolder" data-elem="sliderHolder">
  2475. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  2476. <div class="sliderBg"></div>
  2477. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:]] )write( M.touchnswipe.maxzoom )write( [[; playDuration:]] )write( M.touchnswipe.playduration )write( [[; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  2478. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2479. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2480. <div class="captionHolder ui-off" data-elem="captionHolder">
  2481. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  2482. </div>
  2483. <div class="controlHolder ui-off"><ul>
  2484. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  2485. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  2486. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  2487. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  2488. ]] ) if M.cart.integration.enabled and publisher then write( [[
  2489. ]] ) write("<?php if ($album->cartEnabled()) { ".."?"..">") write( [[
  2490. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2491. ]] ) write("<?php } ".."?"..">") write( [[
  2492. ]] ) elseif M.cart.integration.enabled or M.fotomoto.integration.enabled then write( [[
  2493. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2494. ]] ) else
  2495. if M.permalinks.on then write( [[
  2496. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  2497. ]] ) else write( [[
  2498. <li> </li>
  2499. ]] ) end end write( [[
  2500. ]] ) if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then write( [[
  2501. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  2502. ]] ) end write( [[
  2503. ]] ) if M.sharing.ogp and M.lightbox.socialmedia.sharing then write( [[
  2504. <li class="touch-share-menu touch-facebook share-off"><a><i class="fa fa-fw fa-facebook"></i></a></li>
  2505. <li class="touch-share-menu touch-linkedin share-off"><a><i class="fa fa-fw fa-linkedin"></i></a></li>
  2506. <li class="touch-share-menu touch-twitter share-off"><a><i class="fa fa-fw fa-twitter"></i></a></li>
  2507. <li class="touch-share-menu touch-google-plus share-off"><a><i class="fa fa-fw fa-google-plus"></i></a></li>
  2508. <li class="touch-share-menu touch-pinterest share-off"><a><i class="fa fa-fw fa-pinterest"></i></a></li>
  2509. <li class="touch-share-menu touch-email share-off"><a><i class="fa fa-fw fa-envelope"></i></a></li>
  2510. ]] ) end --[[ socialmedia ]] write( [[
  2511. ]] ) if (M.cart.integration.enabled or M.fotomoto.integration.enabled) and M.permalinks.on then write( [[
  2512. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  2513. ]] ) end write( [[
  2514. ]] ) if M.googleMaps.enable then write( [[
  2515. <li class="touch-share-menu touch-maps share-off"><a><i class="fa fa-fw fa-map-marker"></i></a></li>
  2516. ]] ) end write( [[
  2517. ]] ) if M.imageDownload.enable then write( [[
  2518. <li class="touch-share-menu touch-download share-off"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>
  2519. ]] ) end write( [[
  2520. </ul></div>
  2521. ]] ) if not publisher then write( [[
  2522. <ul data-elem="items">
  2523. ]] )
  2524. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  2525. local firstId = page * imagesPerPage - imagesPerPage + 1
  2526. local lastId = imagesPerPage * page
  2527. if numImages <= lastId then
  2528. lastId = numImages
  2529. end
  2530. for index=firstId, lastId do
  2531. write( [[
  2532. <li><a href="]] )write( theRoot )write( [[/photos/]] )write( getImage(index).exportFilename )write( [[.jpg"><img src="]] )write( theRoot )write( [[/thumbnails-for-mobile/]] )write( getImage(index).exportFilename )write( [[.jpg" data-info="thumbId:]] )write( getImage(index).exportFilename )write( [[;" title="]] )write( cleandata(getImage(index).metadata.imgTitle) )write( [[" alt="]] )write( cleandata(getImage(index).metadata.imgAlt) )write( [[" /></a>
  2533. <div class="imageCaption" data-elem="imgCaption">
  2534. <p>
  2535. ]] ) if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then write( [[
  2536. <span class="color-label color]] )write( getImage(index).colorLabelNumber )write( [[" title="]] )write( getImage(index).colorLabel )write( [["><i class="fa fa-fw fa-bookmark"></i></span>
  2537. ]] ) end write( [[
  2538. ]] ) if M.highslide.display.headings then write( [[<span class="caption-title">]] )write( cleandata(getImage(index).metadata.imgTitle) )write( [[</span>]] ) end if (getImage(index).metadata.imgTitle ~= '' and M.highslide.display.headings) and (getImage(index).metadata.imgAlt ~= '' and M.highslide.display.captions) then write( [[<br />]] ) end write( [[
  2539. ]] ) if M.highslide.display.captions then write( cleandata(getImage(index).metadata.imgAlt) ) end write( [[
  2540. </p>
  2541. </div>
  2542. </li>
  2543. ]] ) end --[[ loop ]] write( [[
  2544. </ul>
  2545. ]] ) else --[[ if publisher ]] write( [[
  2546. <ul data-elem="items">
  2547. ]] ) write("<?php foreach ($album->getPhotosForPage() as $photo) { ".."?"..">") write( [[
  2548. <li><a href="]] ) write("<?php echo $photo->getUrl('photos'); ".."?"..">") write( [["><img src="]] )write( [[<?php echo $photo->getURL('thumbnails-for-mobile');?>]] )write( [[" data-info="thumbId:]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[; albumURL:]] ) write("<?php echo $photo->getAlbumURL(); ".."?"..">") write( [[" title="]] ) write("<?php echo $photo->getMetadata('image_title'); ".."?"..">") write( [[" alt="]] ) write("<?php $altCopy = $photo->hasMetadata('image_caption') ? $photo->getMetadata('image_caption') : $photo->getItemNumber() . '.jpg'; echo $altcopy; ".."?"..">") write( [[" /></a>
  2549. <div class="imageCaption" data-elem="imgCaption">
  2550. <p>
  2551. ]] ) if M.colorLabels.display then write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">") write( [[
  2552. <span class="color-label color]] ) write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">") write( [[" title="]] ) write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">") write( [["><i class="fa fa-fw fa-bookmark"></i></span>
  2553. ]] ) write("<?php } ".."?"..">") end write( [[
  2554. ]] ) if M.highslide.display.headings then write( [[<span class="caption-title">]] ) write("<?php echo $photo->getMetadata('image_title'); ".."?"..">") write( [[</span>]] ) end if M.highslide.display.headings and M.highslide.display.captions then write("<?php echo $photo->hasMetadata('image_title') && $photo->hasMetadata('image_caption') ? '<br />' : ''; ".."?"..">") end write( [[
  2555. ]] ) if M.highslide.display.captions then write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">") end write( [[
  2556. </p>
  2557. </div>
  2558. </li>
  2559. ]] ) write("<?php } ".."?"..">") write( [[
  2560. </ul>
  2561. ]] ) end --[[ is publisher or not? ]] write( [[
  2562. </div>
  2563. </div><!-- sliderHolder -->
  2564. ]] ) end write( [[
  2565. <div class="clearfix">
  2566. ]] )do write( [[
  2567. ]] )
  2568. -- determine number of cells necessary to fill the last row,
  2569. -- later apply the "cell-excess" class to hide excessive cells
  2570. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  2571. local lastPageImages = numImages - math.floor(imagesPerPage * (numGridPages - 1))
  2572. local lastPageRows = math.ceil(lastPageImages / M.grid_cell.columns)
  2573. local desiredCells = numImages - lastPageImages + (lastPageRows * M.grid_cell.columns)
  2574. local border = 0
  2575. if M.grid_cell.image_border.enabled then border = 2 end
  2576. local thumbnailsFolder = "thumbnails-for-mobile"
  2577. if M.grid_cell.iconic.enabled then
  2578. thumbnailsFolder = "thumbnails"
  2579. end
  2580. write( [[
  2581. ]] )local GridPhotoCellFunc = function( cellIndex, row, column, image ) write( [[
  2582. ]] )
  2583. local gpsData = image.metadata.gpsLocation
  2584. local thumbnailRendition = image.renditions.thumbnailsMobile
  2585. if M.grid_cell.iconic.enabled then
  2586. thumbnailRendition = image.renditions.thumbnails
  2587. end
  2588. --[[ Get GPS location data ]]
  2589. --[[ Rather than defining gpsData here, we are defining it separately for desktop and mobile in the respective page templates
  2590. local gpsData = image.metadata.gpsLocation ]]
  2591. --[[ Begin Google Maps ]]
  2592. if model.googleMaps.enable then
  2593. if gpsData == "" then
  2594. else
  2595. --[[ Round to idp decimal places ]]
  2596. function round(num, idp)
  2597. local mult = 10^(idp or 0)
  2598. return math.floor(num * mult + 0.5) / mult
  2599. end
  2600. --[[ Convert DMS to DD ]]
  2601. function latlongDMStoDD(brng)
  2602. local precision = 6
  2603. local dms = {}
  2604. for w in string.gfind(brng, "%d+") do
  2605. table.insert(dms, w)
  2606. end
  2607. local deg = dms[1]/1 + dms[2]/60 + dms[3]/3600
  2608. deg = round(deg, precision)
  2609. local dir = string.match(brng, "%u")
  2610. if dir == "S" then
  2611. deg = -deg
  2612. elseif dir == "W" then
  2613. deg = -deg
  2614. else
  2615. end
  2616. return deg
  2617. end
  2618. --[[ Find latitude and longitude strings ]]
  2619. local dms_pattern = "%d+%W+%d+%W+%d+%W+%u"
  2620. local latlongDMS = {}
  2621. for w in string.gfind(gpsData, dms_pattern) do
  2622. table.insert(latlongDMS, w)
  2623. end
  2624. --[[ Create latitude,longitude decimal degree string ]]
  2625. local latlongDD = latlongDMStoDD(latlongDMS[1]) .. "," .. latlongDMStoDD(latlongDMS[2])
  2626. --[[ Create Google Maps URL ]]
  2627. googleURL = "http://maps.google.com/maps/api/staticmap?center=" .. latlongDD
  2628. googleURL = googleURL .. "&markers=color:red|label:A|" .. latlongDD
  2629. googleURL = googleURL .. "&maptype=" .. model.googleMaps.mapType
  2630. googleURL = googleURL .. "&zoom=18"
  2631. googleURL = googleURL .. "&size=640x640"
  2632. googleURL = googleURL .. "&sensor=false"
  2633. googleMapsURL = "http://maps.google.com/maps?f=q&q=loc:" .. latlongDD --[[ marker location ]]
  2634. googleMapsURL = googleMapsURL .. "&ll=" .. latlongDD --[[ map center ]]
  2635. googleMapsURL = googleMapsURL .. "&t=" .. model.googleMaps.mapType
  2636. --[[ googleMapsURL = googleMapsURL .. "&iwloc=near" ]]
  2637. googleMapsURL = googleMapsURL .. "&z=18"
  2638. end
  2639. else end
  2640. --[[ End Google Maps ]]
  2641. write( [[
  2642. <div class="gridcell clearfix" id="cell-]] )write( image.exportFilename )write( [[">
  2643. <div class="griditem ]] ) if image.renditions.thumbnailsMobile.width > image.renditions.thumbnailsMobile.height then write( [[landscape]] ) else write( [[portrait]] ) end write( [[ clearfix" style="background-image: url(]] )write( theRoot )write( [[/]] )write( thumbnailsFolder )write( [[/]] )write( image.exportFilename )write( [[.jpg);">
  2644. ]] ) if M.grid_cell.numbers.enabled then write( [[
  2645. <div class="cellnumber">]] )write( cellIndex )write( [[</div>
  2646. ]] ) end write( [[
  2647. <a id="]] )write( image.exportFilename )write( [[" class="image-link gridicon]] ) if M.grid_cell.image_shadows then write( [[ drop-shadow]] ) end write( [["
  2648. style="]] ) --[[
  2649. ]] write( [[top: ]] )write( math.floor((M.grid_cell.height - M.grid_cell.bt - M.grid_cell.bb - border - image.renditions.thumbnailsMobile.height)/2) )write( [[px; ]] ) --[[
  2650. ]] write( [[left: ]] )write( math.floor((M.grid_cell.width - M.grid_cell.br - M.grid_cell.bl - border - image.renditions.thumbnailsMobile.width)/2) )write( [[px; ]] ) --[[
  2651. ]] write( [[width: ]] )write( image.renditions.thumbnailsMobile.width )write( [[px; ]] ) --[[
  2652. ]] write( [[height: ]] )write( image.renditions.thumbnailsMobile.height )write( [[px; ]] ) --[[
  2653. ]] write( [["
  2654. ]] ) if M.grid.presentation.desktop == "HTML" then write( [[
  2655. href="]] )write( theRoot )write( [[/]] )write( image.exportFilename )write( [[-single.]] ) if mode == 'publish' and M.is.php then write( [[php]] ) else write( [[html]] ) end write( [["
  2656. ]] ) elseif M.grid.presentation.desktop == "hs_slideshow" then write( [[
  2657. href="]] )write( theRoot )write( [[/photos/]] )write( image.exportFilename )write( [[.jpg" onclick="return hs.expand(this,{ slideshowGroup: 'images', maxWidth: ]] )write( image.renditions.photos.width )write( [[, captionId: 'caption_]] )write( image.exportFilename )write( [[', headingId: 'heading_]] )write( image.exportFilename )write( [[', autoplay: ]] )write( M.highslide.autoplay )write( [[ })"]] ) if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then write( [[ data-colorLabelNumber="color]] )write( image.colorLabelNumber )write( [[" data-colorLabel="]] )write( image.colorLabel )write( [["]] ) end if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then write( [[ data-gps="]] ) if mode =='publish' then write( googleMapsURL ) else write( [[#]] ) end write( [["]] ) end if M.imageDownload.enable then write( [[ data-download="yes"]] ) end write( [[
  2658. ]] ) elseif M.grid.presentation.desktop == "magnific" then write( [[
  2659. href="]] )write( theRoot )write( [[/photos/]] )write( image.exportFilename )write( [[.jpg"]] ) if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then write( [[ data-colorLabelNumber="color]] )write( image.colorLabelNumber )write( [[" data-colorLabel="]] )write( image.colorLabel )write( [["]] ) end if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then write( [[ data-gps="]] ) if mode =='publish' then write( googleMapsURL ) else write( [[#]] ) end write( [["]] ) end if M.imageDownload.enable then write( [[ data-download="yes"]] ) end write( [[
  2660. ]] ) elseif M.grid.presentation.desktop == "photoswipe" then write( [[
  2661. href="]] )write( theRoot )write( [[/photos/]] )write( image.exportFilename )write( [[.jpg" data-size="]] )write( image.renditions.photos.width )write( [[x]] )write( image.renditions.photos.height )write( [["]] ) if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then write( [[ data-colorLabelNumber="color]] )write( image.colorLabelNumber )write( [[" data-colorLabel="]] )write( image.colorLabel )write( [["]] ) end if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then write( [[ data-gps="]] ) if mode =='publish' then write( googleMapsURL ) else write( [[#]] ) end write( [["]] ) end if M.imageDownload.enable then write( [[ data-download="yes"]] ) end write( [[
  2662. ]] ) elseif M.grid.presentation.desktop == "touch" then write( [[
  2663. data-link="slider:#thumbnail-gallery; index:]] )write( math.floor(cellIndex - (page * imagesPerPage - imagesPerPage + 1)) )write( [["]] ) if M.googleMaps.enable and image.metadata.gpsLocation ~= "" then write( [[ data-gps="]] ) if mode =='publish' then write( googleMapsURL ) else write( [[#]] ) end write( [["]] ) end if M.imageDownload.enable then write( [[ data-download="yes"]] ) end write( [[
  2664. ]] ) end write( [[
  2665. >
  2666. <img src="]] )write( theRoot )write( [[/thumbnails-for-mobile/]] )write( image.exportFilename )write( [[.jpg" id="img]] )write( image.imageID )write( [[" title="]] )write( cleandata(image.metadata.imgTitle) )write( [[" alt="]] ) if image.metadata.imgAlt ~= '' then write( cleandata(image.metadata.imgAlt) ) else write( image.exportFilename )write( [[.jpg]] ) end write( [[" height="]] )write( image.renditions.thumbnailsMobile.height )write( [[" width="]] )write( image.renditions.thumbnailsMobile.width )write( [["
  2667. style="]] ) --[[
  2668. ]] write( [[height: ]] )write( image.renditions.thumbnailsMobile.height )write( [[px; ]] ) --[[
  2669. ]] write( [[width: ]] )write( image.renditions.thumbnailsMobile.width )write( [[px; ]] ) --[[
  2670. ]] write( [[" ]] ) if M.fotomoto.integration.enabled then write( [[ rel="ftmt_img:photos/]] )write( image.exportFilename )write( [[.jpg"]] ) end write( [[ />
  2671. </a><!-- .gridicon -->
  2672. ]] ) if M.colorLabels.display and image.colorLabelNumber ~= 'nil' then write( [[
  2673. <ul class="grid-icons grid-icons-tl">
  2674. <li class="color-label color]] )write( image.colorLabelNumber )write( [[" title="]] )write( image.colorLabel )write( [["><i class="fa fa-fw fa-bookmark"></i></li>
  2675. </ul><!-- grid-icons-tl -->
  2676. ]] ) end write( [[
  2677. ]] ) if M.cart.integration.enabled then
  2678. if (not M.cart.integration.mixed_pricing and M.cart.integration.pricing ~= "not-for-sale") or (M.cart.integration.mixed_pricing and image.metadata.itemPricing ~= "not-for-sale") then write( [[
  2679. <ul class="grid-icons grid-icons-tr">
  2680. <li class="cart-button" title=""><a class="add-to-cart"]] ) if mode == 'publish' then write( [[ data-item="]] )write( image.exportFilename )write( [[" data-name="]] ) if image.metadata.itemName ~= '' then write( cleandata(image.metadata.itemName) ) else write( image.exportFilename ) end write( [[" data-price="]] ) if M.cart.integration.mixed_pricing and image.metadata.itemPricing ~= '' then write( image.metadata.itemPricing ) else write( M.cart.integration.pricing ) end write( [[" data-thumbnail="]] )write( theRoot )write( [[/thumbnails-for-mobile/]] )write( image.exportFilename )write( [[.jpg"]] ) end write( [[><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  2681. </ul><!-- grid-icons-tr -->
  2682. ]] ) end end write( [[
  2683. ]] ) if M.fotomoto.integration.enabled and not M.cart.integration.enabled then write( [[
  2684. <ul class="grid-icons grid-icons-tr">
  2685. <li class="cart-button" title=""><a id="fm_purchase_]] )write( image.exportFilename )write( [[" class="add-to-cart" href="javascript:void(0);" onclick="showPrint('#]] )write( image.exportFilename )write( [[ img');"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  2686. </ul><!-- grid-icons-tr -->
  2687. ]] ) end write( [[
  2688. <ul class="grid-icons grid-icons-bl">
  2689. <li class="single-image-page-link-for-seo"><a href="]] )write( theRoot )write( [[/]] )write( image.exportFilename )write( [[-single.]] ) if mode == 'publish' and M.is.php then write( [[php]] ) else write( [[html]] ) end write( [[">]] ) if image.metadata.imgTitle ~= '' then write( cleandata(image.metadata.imgTitle) ) else write( image.exportFilename ) end write( [[</a></li>
  2690. </ul><!-- grid-icons-bl -->
  2691. <ul class="grid-icons grid-icons-br">
  2692. ]] ) if M.slideshowTracking.enable and M.grid.presentation.desktop == "HTML" then write( [[
  2693. <li class="ss-tracking" title="]] )write( M.slideshowTracking.title )write( [["><a href="]] )write( theRoot )write( [[/]] )write( image.exportFilename )write( [[-single.]] ) if mode == 'publish' and M.is.php then write( [[php]] ) else write( [[html]] ) end write( [["><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  2694. ]] ) elseif M.slideshowTracking.enable and (M.grid.presentation.desktop == "hs_slideshow" or M.grid.presentation.desktop == "magnific") then write( [[
  2695. <li class="ss-tracking" title="]] )write( M.slideshowTracking.title )write( [["><a href="javascript:void(0);" onclick="$('a#]] )write( image.exportFilename )write( [[').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  2696. ]] ) elseif M.slideshowTracking.enable and M.grid.presentation.desktop == "touch" then write( [[
  2697. <li class="ss-tracking" title="]] )write( M.slideshowTracking.title )write( [["><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:]] )write( math.floor(cellIndex - (page * imagesPerPage - imagesPerPage + 1)) )write( [["><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  2698. ]] ) end write( [[
  2699. ]] ) if M.imageDownload.enable and M.imageDownload.grid.icon then write( [[
  2700. <li class="download-button" title="]] )write( M.imageDownload.title )write( [["><a href="]] ) if mode == "publish" then if M.imageDownload.method == "php" then write( [[download.php?file=]] ) else write( theRoot )write( [[/]] ) end write( downloadFolder )write( [[/]] )write( image.exportFilename )write( [[.]] )write( downloadExtension ) else write( [[#]] ) end write( [["><i class="fa fa-cloud-download fa-fw"></i></a></li>
  2701. ]] ) end write( [[
  2702. </ul><!-- grid-icons-br -->
  2703. </div><!-- .griditem -->
  2704. ]] ) if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then write( [[
  2705. <ul class="image-metadata clearfix">
  2706. ]] ) if M.perImageSetting.metadata1.enabled then write( [[
  2707. <li class="metadata1">]] ) if image.metadata.metadata1 ~= '' then write( cleandata(image.metadata.metadata1) ) else write( [[ ]] ) end write( [[</li>
  2708. ]] ) end write( [[
  2709. ]] ) if M.perImageSetting.metadata2.enabled then write( [[
  2710. <li class="metadata2">]] ) if image.metadata.metadata2 ~= '' then write( cleandata(image.metadata.metadata2) ) else write( [[ ]] ) end write( [[</li>
  2711. ]] ) end write( [[
  2712. </ul>
  2713. ]] ) end write( [[
  2714. </div><!-- .gridcell -->
  2715. ]] ) if M.grid.presentation.desktop == "hs_slideshow" then write( [[
  2716. ]] ) if image.metadata.imgTitle ~= '' and M.highslide.display.headings then write( [[
  2717. <div id="heading_]] )write( image.exportFilename )write( [[" class="highslide-heading highslide-text">
  2718. <p>]] )write( cleandata(image.metadata.imgTitle) )write( [[</p>
  2719. </div>
  2720. ]] ) end write( [[
  2721. ]] ) if image.metadata.imgAlt ~= '' and M.highslide.display.captions then write( [[
  2722. <div id="caption_]] )write( image.exportFilename )write( [[" class="highslide-caption highslide-text">
  2723. <p>]] )write( cleandata(image.metadata.imgAlt) )write( [[</p>
  2724. </div>
  2725. ]] ) end write( [[
  2726. ]] ) end --[[ if highslide ]] write( [[
  2727. ]] )end write( [[
  2728. ]] )local GridEmptyCellFunc = function( cellIndex, row, column ) write( [[
  2729. ]] ) if cellIndex <= desiredCells and M.grid_cell.empty then write( [[
  2730. <div class="gridcell cell-empty clearfix">
  2731. <div class="griditem">
  2732. </div><!-- .griditem -->
  2733. ]] ) if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then write( [[
  2734. <ul class="image-metadata clearfix">
  2735. ]] ) if M.perImageSetting.metadata1.enabled then write( [[
  2736. <li class="metadata1"> </li>
  2737. ]] ) end write( [[
  2738. ]] ) if M.perImageSetting.metadata2.enabled then write( [[
  2739. <li class="metadata2"> </li>
  2740. ]] ) end write( [[
  2741. </ul>
  2742. ]] ) end write( [[
  2743. </div><!-- .gridcell -->
  2744. ]] ) end write( [[
  2745. ]] )end write( [[
  2746. ]] )LrTagFuncs.ThumbnailGridFunc( _G, GridPhotoCellFunc, GridEmptyCellFunc, GridRowStartFunc, GridRowEndFunc ) end write( [[
  2747. </div>
  2748. ]] ) if numGridPages > 1 then write( [[
  2749. <div class="pagination ]] ) if page >= 6 then write( [[page-6-or-greater]] ) else write( [[page-]] )write( page ) end write( [[ pagination-bottom clearfix">
  2750. <ul class="page-navigation clearfix">]] ) do local LrPaginationEntries = {}
  2751. local oldWrite = write
  2752. write = function( w )
  2753. table.insert( LrPaginationEntries, function() oldWrite( w ) end )
  2754. end
  2755. write( [[
  2756. ]] )LrPaginationEntries.CurrentPage = function( page ) write( [[
  2757. <li class="pagenumber current">]] )write( page )write( [[</li>
  2758. ]] )end table.insert( LrPaginationEntries, 'PageNumbers' ) write( [[
  2759. ]] )LrPaginationEntries.OtherPages = function( page, link ) write( [[
  2760. <li class="pagenumber page-link"><a href="]] )write( link )write( [[">]] )write( page )write( [[</a></li>
  2761. ]] )end write( [[
  2762. ]] )LrPaginationEntries.PreviousEnabled = function( page, link ) write( [[
  2763. <li class="previous page-link"><a class="paginationLinks" href="]] )write( link )write( [[">]] )write( M.grid.pagination.previous )write( [[</a></li>
  2764. ]] )end table.insert( LrPaginationEntries, 'Previous' ) write( [[
  2765. ]] )LrPaginationEntries.PreviousDisabled = function( ) write( [[
  2766. <li class="previous page-link disabled"><span>]] )write( M.grid.pagination.previous )write( [[</span></li>
  2767. ]] )end write( [[
  2768. ]] )LrPaginationEntries.NextEnabled = function( page, link ) write( [[
  2769. <li class="next page-link"><a class="paginationLinks" href="]] )write( link )write( [[">]] )write( M.grid.pagination.next )write( [[</a></li>
  2770. ]] )end table.insert( LrPaginationEntries, 'Next' ) write( [[
  2771. ]] )LrPaginationEntries.NextDisabled = function( ) write( [[
  2772. <li class="next page-link disabled"><span>]] )write( M.grid.pagination.next )write( [[</span></li>
  2773. ]] )end write( [[
  2774. ]] )write = oldWrite LrTagFuncs.PaginationFunc( _G, LrPaginationEntries ) end write( [[</ul>
  2775. </div><!-- pagination -->
  2776. ]] ) end --[[ pagination ]] write( [[
  2777. ]] ) if (not mobile and not single and model.grid.presentation.desktop == "photoswipe") or (mobile and model.grid.presentation.mobile == "photoswipe") then write( [[<!-- Root element of PhotoSwipe. Must have class pswp. -->
  2778. <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
  2779. <!-- Background of PhotoSwipe.
  2780. It's a separate element, as animating opacity is faster than rgba(). -->
  2781. <div class="pswp__bg"></div>
  2782. <!-- Slides wrapper with overflow:hidden. -->
  2783. <div class="pswp__scroll-wrap">
  2784. <!-- Container that holds slides.
  2785. PhotoSwipe keeps only 3 slides in DOM to save memory. -->
  2786. <div class="pswp__container">
  2787. <!-- don't modify these 3 pswp__item elements, data is added later on -->
  2788. <div class="pswp__item"></div>
  2789. <div class="pswp__item"></div>
  2790. <div class="pswp__item"></div>
  2791. </div>
  2792. <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
  2793. <div class="pswp__ui pswp__ui--hidden">
  2794. <div class="pswp__top-bar">
  2795. <!-- Controls are self-explanatory. Order can be changed. -->
  2796. <div class="pswp__counter"></div>
  2797. <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
  2798. <button class="pswp__button pswp__button--share" title="Share"></button>
  2799. <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
  2800. <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
  2801. <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
  2802. <!-- element will get class pswp__preloader--active when preloader is running -->
  2803. <div class="pswp__preloader">
  2804. <div class="pswp__preloader__icn">
  2805. <div class="pswp__preloader__cut">
  2806. <div class="pswp__preloader__donut"></div>
  2807. </div>
  2808. </div>
  2809. </div>
  2810. </div>
  2811. <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
  2812. <div class="pswp__share-tooltip"></div>
  2813. </div>
  2814. <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>
  2815. <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>
  2816. <div class="pswp__caption">
  2817. <div class="pswp__caption__center"></div>
  2818. </div>
  2819. </div>
  2820. </div>
  2821. </div><!-- .pswp -->]] ) end write( [[
  2822. ]] ) elseif (not mobile and M.grid.type.desktop == 'ce4-standard') and publisher then write( [[
  2823. ]] ) if M.cart.integration.enabled and M.cart.integration.packageButton then write( [[
  2824. ]] ) write("<?php if (get_class($album) != 'SearchAlbumWrapper') { ".."?"..">") write( [[
  2825. <button class="add-package-to-cart add-package" data-price="]] ) write("<?php echo $album->getPricingScheme(); ".."?"..">") write( [["><i class="fa fa-fw fa-shopping-cart"></i> <span>]] )write( M.cart.integration.package_label )write( [[</span></button>
  2826. ]] ) write("<?php } ".."?"..">") end write( [[
  2827. ]] ) write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  2828. " echo $album->getPagination(array('position' => 'top', 'type' => 'index', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  2829. "} ".."?"..">") write( [[
  2830. ]] ) if (not mobile and M.grid.presentation.desktop == "touch") or (mobile and M.grid.presentation.mobile == "touch") then write( [[
  2831. <div class="sliderHolder" data-elem="sliderHolder">
  2832. <div id="thumbnail-gallery" class="slider" data-elem="slider" data-options="initShow:false;" data-show="" data-hide="">
  2833. <div class="sliderBg"></div>
  2834. <div class="slides" data-elem="slides" data-options="loadIndexOnly:false; scaleMode:none; maxZoom:]] )write( M.touchnswipe.maxzoom )write( [[; playDuration:]] )write( M.touchnswipe.playduration )write( [[; resetScrollDuration:1; preloaderUrl:;" data-show="autoAlpha:1; display:block" data-hide="autoAlpha:0; display:none"></div>
  2835. <div class="gsPrev midLeft" data-elem="prev" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2836. <div class="gsNext midRight" data-elem="next" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"> </div>
  2837. <div class="captionHolder ui-off" data-elem="captionHolder">
  2838. <div class="caption ui-off" data-elem="caption" data-options="initShow:true; animDuration:0; resizeDuration:0;" data-show="bottom:0; display:block; autoAlpha:1;" data-hide="bottom:0; display:none; autoAlpha:0;"> </div>
  2839. </div>
  2840. <div class="controlHolder ui-off"><ul>
  2841. <li class="closeIcon" data-elem="close"><i class="fa fa-times fa-fw"></i></li>
  2842. <li class="autoPlayIcon" data-elem="autoPlay" data-on="autoAlpha:1;" data-off="autoAlpha:0.5;"><i class="fa fa-play-circle-o fa-fw"></i></li>
  2843. <li class="zoomOutIcon" data-elem="zoomOut" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-minus fa-fw"></i></li>
  2844. <li class="zoomInIcon" data-elem="zoomIn" data-on="autoAlpha:1; cursor: pointer;" data-off="autoAlpha:0.5; cursor:default"><i class="fa fa-search-plus fa-fw"></i></li>
  2845. ]] ) if M.cart.integration.enabled and publisher then write( [[
  2846. ]] ) write("<?php if ($album->cartEnabled()) { ".."?"..">") write( [[
  2847. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2848. ]] ) write("<?php } ".."?"..">") write( [[
  2849. ]] ) elseif M.cart.integration.enabled or M.fotomoto.integration.enabled then write( [[
  2850. <li class="touch-shopping-cart"><span><a><i class="fa fa-fw fa-shopping-cart"></i></a></span></li>
  2851. ]] ) else
  2852. if M.permalinks.on then write( [[
  2853. <li class="touch-permalink"><a><i class="fa fa-fw fa-link"></i></a></li>
  2854. ]] ) else write( [[
  2855. <li> </li>
  2856. ]] ) end end write( [[
  2857. ]] ) if (M.sharing.ogp and M.lightbox.socialmedia.sharing) or M.cart.integration.enabled or M.googleMaps.enable or M.imageDownload.enable then write( [[
  2858. <li class="shareMenuIcon"><i class="fa fa-share-square-o fa-fw"></i></li>
  2859. ]] ) end write( [[
  2860. ]] ) if M.sharing.ogp and M.lightbox.socialmedia.sharing then write( [[
  2861. <li class="touch-share-menu touch-facebook share-off"><a><i class="fa fa-fw fa-facebook"></i></a></li>
  2862. <li class="touch-share-menu touch-linkedin share-off"><a><i class="fa fa-fw fa-linkedin"></i></a></li>
  2863. <li class="touch-share-menu touch-twitter share-off"><a><i class="fa fa-fw fa-twitter"></i></a></li>
  2864. <li class="touch-share-menu touch-google-plus share-off"><a><i class="fa fa-fw fa-google-plus"></i></a></li>
  2865. <li class="touch-share-menu touch-pinterest share-off"><a><i class="fa fa-fw fa-pinterest"></i></a></li>
  2866. <li class="touch-share-menu touch-email share-off"><a><i class="fa fa-fw fa-envelope"></i></a></li>
  2867. ]] ) end --[[ socialmedia ]] write( [[
  2868. ]] ) if (M.cart.integration.enabled or M.fotomoto.integration.enabled) and M.permalinks.on then write( [[
  2869. <li class="touch-share-menu touch-permalink share-off"><a><i class="fa fa-fw fa-link"></i></a></li>
  2870. ]] ) end write( [[
  2871. ]] ) if M.googleMaps.enable then write( [[
  2872. <li class="touch-share-menu touch-maps share-off"><a><i class="fa fa-fw fa-map-marker"></i></a></li>
  2873. ]] ) end write( [[
  2874. ]] ) if M.imageDownload.enable then write( [[
  2875. <li class="touch-share-menu touch-download share-off"><a><i class="fa fa-fw fa-cloud-download"></i></a></li>
  2876. ]] ) end write( [[
  2877. </ul></div>
  2878. ]] ) if not publisher then write( [[
  2879. <ul data-elem="items">
  2880. ]] )
  2881. local imagesPerPage = math.ceil(M.grid.pagination.imagesperpage / M.grid_cell.columns) * M.grid_cell.columns
  2882. local firstId = page * imagesPerPage - imagesPerPage + 1
  2883. local lastId = imagesPerPage * page
  2884. if numImages <= lastId then
  2885. lastId = numImages
  2886. end
  2887. for index=firstId, lastId do
  2888. write( [[
  2889. <li><a href="]] )write( theRoot )write( [[/photos/]] )write( getImage(index).exportFilename )write( [[.jpg"><img src="]] )write( theRoot )write( [[/thumbnails-for-mobile/]] )write( getImage(index).exportFilename )write( [[.jpg" data-info="thumbId:]] )write( getImage(index).exportFilename )write( [[;" title="]] )write( cleandata(getImage(index).metadata.imgTitle) )write( [[" alt="]] )write( cleandata(getImage(index).metadata.imgAlt) )write( [[" /></a>
  2890. <div class="imageCaption" data-elem="imgCaption">
  2891. <p>
  2892. ]] ) if M.colorLabels.display and getImage(index).colorLabelNumber ~= 'nil' then write( [[
  2893. <span class="color-label color]] )write( getImage(index).colorLabelNumber )write( [[" title="]] )write( getImage(index).colorLabel )write( [["><i class="fa fa-fw fa-bookmark"></i></span>
  2894. ]] ) end write( [[
  2895. ]] ) if M.highslide.display.headings then write( [[<span class="caption-title">]] )write( cleandata(getImage(index).metadata.imgTitle) )write( [[</span>]] ) end if (getImage(index).metadata.imgTitle ~= '' and M.highslide.display.headings) and (getImage(index).metadata.imgAlt ~= '' and M.highslide.display.captions) then write( [[<br />]] ) end write( [[
  2896. ]] ) if M.highslide.display.captions then write( cleandata(getImage(index).metadata.imgAlt) ) end write( [[
  2897. </p>
  2898. </div>
  2899. </li>
  2900. ]] ) end --[[ loop ]] write( [[
  2901. </ul>
  2902. ]] ) else --[[ if publisher ]] write( [[
  2903. <ul data-elem="items">
  2904. ]] ) write("<?php foreach ($album->getPhotosForPage() as $photo) { ".."?"..">") write( [[
  2905. <li><a href="]] ) write("<?php echo $photo->getUrl('photos'); ".."?"..">") write( [["><img src="]] )write( [[<?php echo $photo->getURL('thumbnails-for-mobile');?>]] )write( [[" data-info="thumbId:]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[; albumURL:]] ) write("<?php echo $photo->getAlbumURL(); ".."?"..">") write( [[" title="]] ) write("<?php echo $photo->getMetadata('image_title'); ".."?"..">") write( [[" alt="]] ) write("<?php $altCopy = $photo->hasMetadata('image_caption') ? $photo->getMetadata('image_caption') : $photo->getItemNumber() . '.jpg'; echo $altcopy; ".."?"..">") write( [[" /></a>
  2906. <div class="imageCaption" data-elem="imgCaption">
  2907. <p>
  2908. ]] ) if M.colorLabels.display then write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">") write( [[
  2909. <span class="color-label color]] ) write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">") write( [[" title="]] ) write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">") write( [["><i class="fa fa-fw fa-bookmark"></i></span>
  2910. ]] ) write("<?php } ".."?"..">") end write( [[
  2911. ]] ) if M.highslide.display.headings then write( [[<span class="caption-title">]] ) write("<?php echo $photo->getMetadata('image_title'); ".."?"..">") write( [[</span>]] ) end if M.highslide.display.headings and M.highslide.display.captions then write("<?php echo $photo->hasMetadata('image_title') && $photo->hasMetadata('image_caption') ? '<br />' : ''; ".."?"..">") end write( [[
  2912. ]] ) if M.highslide.display.captions then write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">") end write( [[
  2913. </p>
  2914. </div>
  2915. </li>
  2916. ]] ) write("<?php } ".."?"..">") write( [[
  2917. </ul>
  2918. ]] ) end --[[ is publisher or not? ]] write( [[
  2919. </div>
  2920. </div><!-- sliderHolder -->
  2921. ]] ) end write( [[
  2922. <div class="clearfix">
  2923. ]] )
  2924. local border = 0
  2925. if M.grid_cell.image_border.enabled then border = 2 end
  2926. local thumbnailRendition = 'thumbnails-for-mobile'
  2927. if M.grid_cell.iconic.enabled then
  2928. thumbnailRendition = 'thumbnails'
  2929. end
  2930. write("<?php \n"..
  2931. " $cellnumber=1;\n"..
  2932. " $pin_url = CURRENTPAGELOCATION;\n"..
  2933. " $base_url ='./';\n"..
  2934. " $border = ".. border ..";\n"..
  2935. " $count = 0;\n"..
  2936. " $thumbnailsRendition = '".. thumbnailRendition .. "'; \n"..
  2937. "\n"..
  2938. " foreach ($album->getPhotosForPage() as $photo) {\n"..
  2939. " $item_number = $photo->getItemNumber();\n"..
  2940. " $width = $photo->getThumbnailWidth();\n"..
  2941. " $height = $photo->getThumbnailHeight();\n"..
  2942. "\n"..
  2943. " if ($width > $height) {\n"..
  2944. " $orientation = 'landscape';\n"..
  2945. " } else {\n"..
  2946. " $orientation = 'portrait';\n"..
  2947. " }\n"..
  2948. "\n"..
  2949. " $tnTop = ($album->getTemplateSetting('cellContentHeight') - $height - $border) / 2;\n"..
  2950. " $tnLeft = ($album->getTemplateSetting('cellContentWidth') - $width - $border) / 2;\n"..
  2951. "?"..">")
  2952. if M.imageDownload.enable then
  2953. if mobile then
  2954. write("<?php \n"..
  2955. "$downloadURL = method_exists($photo, 'getDirectDownloadLink') ? $photo->getDirectDownloadLink() : $photo->getAlbumURL().'photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  2956. "?"..">")
  2957. else
  2958. write("<?php \n"..
  2959. "$downloadURL = method_exists($photo, 'getDownloadURL') ? $photo->getDownloadURL() : $photo->getAlbumURL().'download.php?file=photos-for-download/'.$photo->getItemNumber().'.jpg';\n"..
  2960. "?"..">")
  2961. end
  2962. end
  2963. write( [[
  2964. <div class="gridcell clearfix" id="cell-]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[">
  2965. <div class="griditem ]] ) write("<?php echo $orientation; ".."?"..">") write( [[ clearfix" style="background-image: url(]] ) write("<?php echo $photo->getURL($thumbnailsRendition); ".."?"..">") write( [[); background-size: ]] ) write("<?php echo $photo->getRenditionWidth($thumbnailsRendition); ".."?"..">") write( [[px ]] ) write("<?php echo $photo->getRenditionHeight($thumbnailsRendition); ".."?"..">") write( [[px;">
  2966. ]] ) if M.grid_cell.numbers.enabled then write( [[
  2967. <div class="cellnumber">]] ) write("<?php echo $photo->getCellNumber(); ".."?"..">") write( [[</div>
  2968. ]] ) end write( [[
  2969. ]] ) --[[ Extra code to handle Maps ]]
  2970. write("<?php\n"..
  2971. "$mapMarkup = '';\n"..
  2972. "if ($photo->hasLocation()) {\n"..
  2973. " if (get_class($photo) == 'PhotoSearchResult') {\n"..
  2974. " if (method_exists($photo, 'mapsEnabled') && $photo->mapsEnabled()) {\n"..
  2975. " $mapMarkup = ' data-gps=\"'.$photo->getSearchMapsURL().'\"';\n"..
  2976. " }\n"..
  2977. " } else if ($album->mapsEnabled()) {\n"..
  2978. " $mapMarkup = ' data-gps=\"'.$photo->getMapsURL($album->getTemplateSetting('mapZoomLevel', 18), $album->getTemplateSetting('mapType', 'm')).'\"';\n"..
  2979. " }\n"..
  2980. "}\n"..
  2981. "?"..">") write( [[
  2982. <a id="]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[" class="image-link gridicon]] ) if M.grid_cell.image_shadows then write( [[ drop-shadow]] ) end write( [["
  2983. style="]] ) --[[
  2984. ]] write( [[top: ]] ) write("<?php echo $tnTop; ".."?"..">") write( [[px; ]] ) --[[
  2985. ]] write( [[left: ]] ) write("<?php echo $tnLeft; ".."?"..">") write( [[px; ]] ) --[[
  2986. ]] write( [[width: ]] ) write("<?php echo $width; ".."?"..">") write( [[px; ]] ) --[[
  2987. ]] write( [[height: ]] ) write("<?php echo $height; ".."?"..">") write( [[px; ]] ) --[[
  2988. ]] write( [["
  2989. ]] ) if M.grid.presentation.desktop == "HTML" then write( [[
  2990. href="]] ) write("<?php echo $photo->getSingleURL(); ".."?"..">") write( [["
  2991. ]] ) elseif M.grid.presentation.desktop == "hs_slideshow" then write( [[
  2992. href="]] ) write("<?php echo $photo->getUrl('photos'); ".."?"..">") write( [[" onclick="return hs.expand(this,{ slideshowGroup: 'images', maxWidth: ]] ) write("<?php echo $photo->getPhotoWidth(); ".."?"..">") write( [[, captionId: 'caption_]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[', headingId: 'heading_]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[', autoplay: ]] )write( M.highslide.autoplay )write( [[ })"]] ) if M.colorLabels.display then write( [[ data-colorLabelNumber="color]] ) write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">") write( [[" data-colorLabel="]] ) write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">") write( [["]] ) end if M.googleMaps.enable then write("<?php echo $mapMarkup; ".."?"..">") end if M.imageDownload.enable then write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">") end write( [[
  2993. ]] ) elseif M.grid.presentation.desktop == "magnific" then write( [[
  2994. href="]] ) write("<?php echo $photo->getUrl('photos'); ".."?"..">") write( [["]] ) if M.colorLabels.display then write( [[ data-colorLabelNumber="color]] ) write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">") write( [[" data-colorLabel="]] ) write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">") write( [["]] ) end if M.googleMaps.enable then write("<?php echo $mapMarkup; ".."?"..">") end if M.imageDownload.enable then write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">") end write( [[ data-album-url="]] ) write("<?php echo $photo->getAlbumURL(); ".."?"..">") write( [["
  2995. ]] ) elseif M.grid.presentation.desktop == "touch" then write( [[
  2996. data-link="slider:#thumbnail-gallery; index:]] ) write("<?php echo $count; ".."?"..">") write( [["]] ) if M.googleMaps.enable then write("<?php echo $mapMarkup; ".."?"..">") end if M.imageDownload.enable then write("<?php echo $downloadURL ? ' data-download-url=\"'.$downloadURL.'\"' : ''; ".."?"..">") end write( [[
  2997. ]] ) end write( [[
  2998. >
  2999. <img src="]] ) write("<?php echo $photo->getURL('thumbnails-for-mobile'); ".."?"..">") write( [[" id="img-]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[" title="]] ) write("<?php echo $photo->getMetadata('image_title'); ".."?"..">") write( [[" alt="]] ) write("<?php if ($photo->hasMetadata('image_caption')) { echo $photo->getMetadata('image_caption'); } else { echo $photo->getFilename(); } ".."?"..">") write( [[" height="]] ) write("<?php echo $height; ".."?"..">") write( [[" width="]] ) write("<?php echo $width; ".."?"..">") write( [["
  3000. style="]] ) --[[
  3001. ]] write( [[height: ]] ) write("<?php echo $height; ".."?"..">") write( [[px; ]] ) --[[
  3002. ]] write( [[width: ]] ) write("<?php echo $width; ".."?"..">") write( [[px;]] ) --[[
  3003. ]] write( [["]] ) if M.fotomoto.integration.enabled then write( [[ rel="ftmt_img:photos/]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[.jpg"]] ) end write( [[ />
  3004. </a><!-- .gridicon -->
  3005. ]] ) if M.colorLabels.display then write("<?php if ($photo->hasMetadata('color-number')) { ".."?"..">") write( [[
  3006. <ul class="grid-icons grid-icons-tl">
  3007. <li class="color-label color]] ) write("<?php echo $photo->getMetadata('color-number', 'nil'); ".."?"..">") write( [[" title="]] ) write("<?php echo $photo->getMetadata('color-name', ''); ".."?"..">") write( [["><i class="fa fa-fw fa-bookmark"></i></li>
  3008. </ul><!-- grid-icons-tl -->
  3009. ]] ) write("<?php } ".."?"..">") end write( [[
  3010. ]] ) if M.cart.integration.enabled then write( [[
  3011. ]] ) write("<?php if ($photo->forSale($album)) { ".."?"..">") write( [[
  3012. <ul class="grid-icons grid-icons-tr">
  3013. <li class="cart-button" title=""><a class="add-to-cart" data-item="]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[" data-name="]] ) write("<?php echo $photo->getItemName(); ".."?"..">") write( [[" data-price="]] ) write("<?php echo $photo->getMetadata('itemPricing'); ".."?"..">") write( [[" data-thumbnail="]] ) write("<?php echo $photo->getURL('thumbnails-for-mobile'); ".."?"..">") write( [["><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3014. </ul><!-- grid-icons-tr -->
  3015. ]] ) write("<?php } ".."?"..">") end write( [[
  3016. ]] ) if M.fotomoto.integration.enabled and not M.cart.integration.enabled then write( [[
  3017. <ul class="grid-icons grid-icons-tr">
  3018. <li class="cart-button" title=""><a id="fm_purchase_]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[" class="add-to-cart" onclick="showPrint('#]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[ img');"><i class="fa fa-fw fa-shopping-cart"></i></a></li>
  3019. </ul><!-- grid-icons-tr -->
  3020. ]] ) end write( [[
  3021. <ul class="grid-icons grid-icons-bl">
  3022. <li class="single-image-page-link-for-seo"><a href="]] ) write("<?php echo $photo->getSingleURL(); ".."?"..">") write( [[">]] ) write("<?php echo $photo->getTitle(); ".."?"..">") write( [[</a></li>
  3023. </ul><!-- grid-icons-bl -->
  3024. <ul class="grid-icons grid-icons-br">
  3025. ]] ) if M.slideshowTracking.enable and M.grid.presentation.desktop == "HTML" then write( [[
  3026. <li class="ss-tracking" title="]] )write( M.slideshowTracking.title )write( [["><a href="]] ) write("<?php echo $photo->getSingleURL(); ".."?"..">") write( [["><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3027. ]] ) elseif M.slideshowTracking.enable and (M.grid.presentation.desktop == "hs_slideshow" or M.grid.presentation.desktop == "magnific") then write( [[
  3028. <li class="ss-tracking" title="]] )write( M.slideshowTracking.title )write( [["><a href="javascript:void(0);" onclick="$('a#]] ) write("<?php echo $photo->getItemNumber(); ".."?"..">") write( [[').click();"><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3029. ]] ) elseif M.slideshowTracking.enable and M.grid.presentation.desktop == "touch" then write( [[
  3030. <li class="ss-tracking" title="]] )write( M.slideshowTracking.title )write( [["><a href="javascript:void(0);" data-link="slider:#thumbnail-gallery; index:]] ) write("<?php echo $count; ".."?"..">") write( [["><i class="fa fa-play-circle-o fa-fw"></i></a></li>
  3031. ]] ) end write( [[
  3032. ]] ) if M.imageDownload.enable and M.imageDownload.grid.icon then write( [[
  3033. ]] ) write("<?php if ($downloadURL) { ".."?"..">") write( [[
  3034. <li class="download-button" title="]] )write( M.imageDownload.title )write( [["><a href="]] ) write("<?php echo $downloadURL; ".."?"..">") write( [["><i class="fa fa-cloud-download fa-fw"></i></a></li>
  3035. ]] ) write("<?php } ".."?"..">") end write( [[
  3036. </ul><!-- grid-icons-br -->
  3037. </div><!-- .griditem -->
  3038. ]] ) if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then write( [[
  3039. <ul class="image-metadata clearfix">
  3040. ]] ) if M.perImageSetting.metadata1.enabled then write( [[
  3041. ]] ) write("<?php if ($photo->hasMetadata('metadata1')) { ".."?"..">") write( [[
  3042. <li class="metadata1">]] ) write("<?php echo $photo->getMetadata('metadata1'); ".."?"..">") write( [[</li>
  3043. ]] ) write("<?php } else { ".."?"..">") write( [[
  3044. <li class="metadata1"> </li>
  3045. ]] ) write("<?php } ".."?"..">") write( [[
  3046. ]] ) end write( [[
  3047. ]] ) if M.perImageSetting.metadata2.enabled then write( [[
  3048. ]] ) write("<?php if ($photo->hasMetadata('metadata2')) { ".."?"..">") write( [[
  3049. <li class="metadata2">]] ) write("<?php echo $photo->getMetadata('metadata2'); ".."?"..">") write( [[</li>
  3050. ]] ) write("<?php } else { ".."?"..">") write( [[
  3051. <li class="metadata2"> </li>
  3052. ]] ) write("<?php } ".."?"..">") write( [[
  3053. ]] ) end write( [[
  3054. </ul>
  3055. ]] ) end write( [[
  3056. </div><!-- .gridcell -->
  3057. ]] ) if M.grid.presentation.desktop == "hs_slideshow" and M.highslide.display.headings then write( [[
  3058. ]] ) write("<?php if ($photo->hasMetadata('image_title')) { ".."?"..">") write( [[
  3059. <div class="highslide-heading highslide-text" id="heading_]] ) write("<?php echo $item_number; ".."?"..">") write( [[">
  3060. <p>]] ) write("<?php echo $photo->getMetadata('image_title'); ".."?"..">") write( [[</p>
  3061. </div>
  3062. ]] ) write("<?php } ".."?"..">") write( [[
  3063. ]] ) end --[[ if highslide and headings ]] write( [[
  3064. ]] ) if M.grid.presentation.desktop == "hs_slideshow" and M.highslide.display.captions then write( [[
  3065. ]] ) write("<?php if ($photo->hasMetadata('image_caption')) { ".."?"..">") write( [[
  3066. <div class="highslide-caption highslide-text" id="caption_]] ) write("<?php echo $item_number; ".."?"..">") write( [[">
  3067. <p>]] ) write("<?php echo $photo->getMetadata('image_caption'); ".."?"..">") write( [[</p>
  3068. </div>
  3069. ]] ) write("<?php } ".."?"..">") write( [[
  3070. ]] ) end --[[ if highslide and captions ]] write( [[
  3071. ]] ) --[[ close foreach loop : ]]
  3072. write("<?php $count++;\n"..
  3073. "} ".."?"..">") write( [[
  3074. ]] ) if M.grid_cell.empty then write("<?php \n"..
  3075. " $photosShown = count($album->getPhotosForPage());\n"..
  3076. " $columnsInGrid = $album->getTemplateSetting('columnsInGrid', 0);\n"..
  3077. " $modCells = $photosShown % $columnsInGrid;\n"..
  3078. " $extraCells = $modCells > 0 ? $columnsInGrid - $modCells : 0;\n"..
  3079. " for ($i = 0; $i < $extraCells; $i++) { ".."?"..">") write( [[
  3080. <div class="gridcell cell-empty clearfix">
  3081. <div class="griditem">
  3082. </div><!-- .griditem -->
  3083. ]] ) if M.perImageSetting.metadata1.enabled or M.perImageSetting.metadata2.enabled then write( [[
  3084. <ul class="image-metadata clearfix">
  3085. ]] ) if M.perImageSetting.metadata1.enabled then write( [[
  3086. <li class="metadata1"> </li>
  3087. ]] ) end write( [[
  3088. ]] ) if M.perImageSetting.metadata2.enabled then write( [[
  3089. <li class="metadata2"> </li>
  3090. ]] ) end write( [[
  3091. </ul>
  3092. ]] ) end write( [[
  3093. </div><!-- .gridcell -->
  3094. ]] ) write("<?php } ".."?"..">") end write( [[
  3095. </div>
  3096. ]] ) write("<?php if ($album->getNumberOfPages() > 1) {\n"..
  3097. " echo $album->getPagination(array('position' => 'bottom', 'type' => 'index', 'max_to_side' => 5, 'prev_text' => '".. M.grid.pagination.previous .."', 'next_text' => '".. M.grid.pagination.next .."'));\n"..
  3098. "} ".."?"..">") write( [[
  3099. ]] ) elseif (not mobile and M.grid.type.desktop == 'ce4-freewall') and not publisher then write( [[
  3100. ]] ) if M.cart.integration.enabled and M.cart.integration.packageButton then write( [[
  3101. <button class="add-package-to-cart add-package" data-price="]] )write( M.cart.integration.package_pricing )write( [["><i class="fa fa-fw fa-shopping-cart"></i> <span>]] )write( M.cart.integration.package_label )write( [[</span></button>
  3102. ]] ) end write( [[
  3103. ]] ) if numGridPages > 1 then write( [[
  3104. <div class="pagination ]] ) if page >= 6 then write( [[page-6-or-greater]] ) else write( [[page-]] )write( page ) end write( [[ pagination-top clearfix">
  3105. <ul class="page-navigation clearfix">]] ) do local LrPaginationEntries = {}
  3106. local oldWrite = write