Adobe 65007312 Programming Guide - Page 130
AddCustomCSS, Example, Inputs
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 130 highlights
CHAPTER 6: Writing a Web-engine Plug-in Web SDK manifest API 130 In addition, if you use AddGridPages() to add any page, all of the LuaPages in your gallery can use these environment variables: numGridPages The number of grid pages in the gallery filenameOfGridPage( pageNumber ) A function that takes a grid page number and returns the file name string for that page. gridPageForPhotoAtIndex( photoIndex ) A function that take a photo index position and returns the file name for the grid page containing the photo. rows The number of rows on the grid pages. columns The number of columns on the grid pages. Example AddGridPages { destination='content', template='grid.html', rows=model.nonDynamic.numRows, columns=model.nonDynamic.numCols, } AddCustomCSS Generates a CSS file using the appearance properties defined in your data model. When you declare your data model in the galleryInfo.lrweb file, this command exports to CSS all entries that begin with "appearance.". Inputs filename (string) The path and name of the output file. Example To specify the background color of the body using CSS, you need a declaration like this: /* Desired CSS output */ body { background-color: #ff0000, } To make your web engine generate this: 1. Declare the intention to emit CSS in the manifest file, manifest.lrweb: AddCustomCSS { filename='content/custom.css', } 2. Define the required data model entries in the information file (galleryInfo.lrweb): return { ...