450
edits
NeilThomas (talk | contribs) m (→Download) |
NeilThomas (talk | contribs) m (→Configuration) |
||
|
=== Configuration ===
This version of the Alternative Public Website comes with a remodelled version of cmxConfig. This is
==== Heading text ====
{| style="margin-right: 50px;"
|-
| style="width:
<nowiki>cmxConfig = {
Charts: {▼
// Edit this to set your required configuration
"StandardMenu": false, // Set to true or false
"Dropdown": true, // set to true or false
"Theme": "", // Set to the name of an existing theme WITHOUT 'css'
"Logo": "", // Set to the absolute or relative path and name of the image to use OR 'None'
"BannerImage": "", // As above or leave blank
"BannerPosition":"center center", // Use allowable css values including units
},
"DataPath": "", // Set to the absolute or relative path of your data
Custom: {▼
"StaticFoot": true, // true or false accepted▼
"PaddingTop": 2, // Numeric value only (real numbers accepted but ignored if using px as unit)
"PaddingBottom": 1, // Numeric value only ( ditto )
"Units": "em", // Accepts any valid css unit
▲ StaticFoot: true,
},
"Animation": "", // Blank, Expand, 'Enter left', 'Enter right' or Drop only
"Speed": 5, // Positive numeric values only (can be real)
"OnTop": true, // true or false
},
"Shadows": "", // Blank, Basic or Enhanced only
"VariableHeights": false,// true or false
"Menu": "json/ows-menu.js", // Relative path and name of menu script.
"NOAAPath": "Reports", // Absolute or relative path to your NOAA Reports
}
// You are advised to leave these blank.
cmxSession = {
"Monthly": "", // Numeric integer representing to month to show - zero based
"All": "" // As above and 'ThisYear', 'ThisMonth' or 'Alltime'
},
"Charts": { // ONLY CHOOSE CHARTS FOR WHICH YOU HAVE DATA OR LEAVE BLANK.
"Trends": "", // One of: temp, press, wind, windDir, rain, dailyrain, humidity, solar, sunhours, and sensor dependant
"Historic":"" // One of: Temp. Press, Wind, WindDir, Rain, Humidity, Solar, DegDays, TempSum, ChillHrs, Snow
}
}</nowiki>
▲ };
|style="padding-left: 1em;"|
===== Explanation =====
The object is organised alphabetically as this is how it is stored. There are
The root level entries are:- '''DataPath''', '''Menu''' and '''NOAAPath'''.
Of these you will need to check, and probably edit, '''Data''' and '''NOAAReportPath''' as these two provide the path to your data, wherever you have uploaded it.▼
▲Of these you will need to check, and probably edit
* '''Data''': This must be set to point to the folder to which you upload your data. By default CumulusMX uploads its data to the same location as the html pages but you may have changed this.▼
▲* '''
** If you upload
** If you upload your data to another location, then this entry can be an absolute or relative path to that location. Absolute paths always start with a '/' character; any other character implies relative path.
* '''
** The same formats are accepted; relative or absolute paths.
===== The Menu entry =====
Please refer to [https://www.oaktreewebs.co.uk/wiki/doku.php?id=start my Wiki] for a detailed explanation and details on how to create your own menu.
The other entries in the cmxConfig structure allow you to customise the various options available in this template
This section focuses on colours, the logo and banner images and the menu.
===== Geometry =====
Allows you to adjust the spacing around the page content and whether or not the banner and/or footer are fixed in position. The Gull now positions correctly based on the fixed status of the footer.
===== Gull =====
Primarily concerned with the animation of the gull at the bottom of the page and whether or not it is above or below page content.
===== Panels =====
A new feature that allows you to add one of two variations of shadow to the panels displayed on each page. Some panels will not display shadows regardless of these settings.
==== the cmxSession Object ====
This is used dynamically by visitors to your site. It records the last chart / record set viewed so that when re-visiting the page (in the correct session), the same chart/record set is displayed.
|}
==== Change Log ====
'''Version 5.01''' ''dated: 16/02/2026''
This is a complete re-write of the '''Alternative Public Website''' BUT that re-write only affects the header and footer areas and the top and tail of the main content area.
It should be possible to copy any personal additional page content into the template.htm file provided.
==== To do this ====
* Locate the '''<nowiki><div id="siteContent_Inner"></nowiki>''' in the current version of your page.
* Select ALL code '''inside''' this div and copy it to your clipboard.
* Locate the '''<nowiki><div id="subContent"></nowiki>''' in the template file provided with this update.
* Paste your old code inside this area, overwriting anything that is in the template down to its corresponding '''<nowiki></div></nowiki>'''
* Do make sure that you don't add any extra '''<nowiki><div></nowiki>'''s or remove any that close of the '''<nowiki><div id="subContent></nowiki>''' area
* Rename the template.html page appropriately.
'''Update: 11/10/2025 Version 5.0.1'''
| |||
edits