%@ include file="noexport.html" %> <% LrFunctionContext = import 'LrFunctionContext' LrPathUtils = import 'LrPathUtils' LrFileUtils = import 'LrFileUtils' if WIN_ENV then webGalleriesFolder = LrPathUtils.child(LrPathUtils.getStandardFilePath("appData"), "Web Galleries") else webGalleriesFolder = LrPathUtils.child(LrPathUtils.getStandardFilePath("home"), "Library/Application Support/Adobe/Lightroom/Web Galleries/") end local mdenvPath = LrPathUtils.child(LrPathUtils.child(webGalleriesFolder, "ImpactWSPP.lrwebengine"), "mdenv.lua") local luaString = LrFileUtils.readFile(mdenvPath) local func, errorMsg = loadstring(luaString, 'mdenv.lua' ) 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 } LrFunctionContext.callWithEnvironment(func, env) markdown = env._G.markdown %> <%<%@ include file="setup.lua" %>%> <% local mySize = "large" local resolution = ""; if (model.nonCSS.images_large.export) then resolution = "max" end if (model.nonCSS.images_medium.export and resolution == "") then resolution = "medium" end if (model.nonCSS.images_small and resolution == "") then resolution = "small" end local folder = "photos_" .. resolution -- Replace fixed tokens in the click URL path = "/" .. galleryURLPrefix:gsub("^%./", "") clickURL = model.nonCSS.clickURL:gsub("{path}", path) -- Remove the background image if needed if styles.body and model.nonCSS.backgroundImage.notOnGalleries then styles.body["background-image"] = "none" end -- Redirect the write command for a little while... local extra = "" local oldWrite = write local write = function(t) extra = extra .. tostring(t) end -- The following will be appended to "extra" %> <% write = oldWrite -- Write out the header -- -- We grab the gallery details from the publishing service if we have them... if not galleryDetails then galleryDetails = {} end options = { title = galleryDetails.title or "Example gallery", description = galleryDetails.description or "Example description", keywords = galleryDetails.keywords or "Example keywords", extra = extra, styles = styles } function encode_alt(s) if not s then return s end s = s:gsub('&', '&') s = s:gsub('"', '"') s = s:gsub('<', '<') s = s:gsub('>', '>') return s end %> <%@ include file="header.html" %> <% if model.nonCSS.brandingImage.onGallery and (model.nonCSS.brandingImage.position == "pageleft" or model.nonCSS.brandingImage.position == "pagecenter" or model.nonCSS.brandingImage.position == "pageright") then %> <%@ include file="branding.html" %> <% end %> <% local loadingdots='
') end %> | ">▲ |