<% -- header -- -- Options include: -- -- theRoot -- title -- description -- keywords -- styles -- extra %> <% if options.title then write(""..options.title.."\n") end %> <% if options.description then write('\n') end %> <% if options.keywords then write('\n') end %> <% local width local function iff(t, a, b) if t then return a else return b end end if model.nonCSS.page.restrictWidth then -- Use the width that the user's chosen width = model.nonCSS.page.width else -- Make sure that the index fits width = (((model.nonCSS.indexBoxWidth + model.nonCSS.indexBoxSpacing + model.nonCSS.indexBoxPadding * 2 + iff(model.nonCSS.indexBoxBorder, model.nonCSS.indexBoxBorderWidth * 2, 0)) * model.nonCSS.indexColumns) - model.nonCSS.indexBoxSpacing) -- Give the content a minimum width if width < 300 then width = 200 end end -- Add the padding local width = width + model.nonCSS.page.paddingLeft + model.nonCSS.page.paddingRight -- Add the menu if model.nonCSS.menubar.position == "left" then width = width + model.nonCSS.leftmenubar.width + model.nonCSS.leftmenubar.xinset + model.nonCSS.menubar.leftpadding + model.nonCSS.menubar.leftpadding if model.nonCSS.menubar.borders then width = width + model.nonCSS.menubar.borderThickness * 2 end end -- If the resulting width is smaller that the view port and and the width isn't restricted, -- then we just let the device render it normally and have the content expand to fill page. -- Otherwise we give it the page width that we've jsut calculated %> <% if options.styles then write('\n") end %> <% local LrApplication = import 'LrApplication' if ( LrApplication.versionTable().major >= 4 ) then %> <% else %> <% end %> <% if mode == "preview" and typeOfPageBeingEdited then %> <% end %> <% if options.extra then %> <%= options.extra %> <% end %> <% if model.nonCSS.googleAnalytics and mode ~= 'preview' then %> <% end %>
">