AlternativePublicWebsite: Difference between revisions

m
 
(16 intermediate revisions by the same user not shown)
Although it should function at the date of release, no guarantees are given that it will continue to do so with subsequent releases of CumulusMX. Users should take time to investigate how it reacts and uses the library and data files uploaded by CumulusMX so that you are able to do some troubleshooting for yourself.
 
[[File:Screenshot 2026-02-16 at 10.56.03.png|500px|thumb|center|alt=Alternative Public Website|The latest Alternative Public Website as on ai2weather.uk]]
=== Download ===
 
You can download the file from [[Filehttps:PublicWebsiteV2//wiki.zip|thumb|alt=Versionai2weather.uk 5my NEW b005|here]Wiki] Version. 5.1 b:005 2524/1004/20252026 1017:0037
 
It extracts to its own folder - apw, so you can extract to wherever without overwriting other content.
 
It comes with twoone template filesfile for those of you that will need to generate your own pages to fit in with the theme / styles.
 
I have now fully updated [https://wwwwiki.oaktreewebs.coai2weather.uk/wiki/doku.php?id=wiki:aw:start my NEW Wiki] to provide an alternative upload option and provide more detailed information about using this version of the Alternative Public Website.
 
=== Configuration ===
 
This version of the Alternative Public Website comes with a remodelled version of cmxConfig. Thiswhich is currentlyheld in theits own file page-control config.js file. You will need to edit this file to make it point to your data.
 
==== Heading text ====
{| style="margin-right: 50px;"
|-
| style="width: 20em60em;"|
 
cmxConfig = {
<nowiki>let cmxConfig = {
Charts: {
// Edit this to set your required configuration
Trends: "",
Historic"Custom": "",{
"SideMenu": true, // Set to true to use a sidebar menu
"BannerStyle": "thin", // Accepts 'thin' to reduce the height of the banner; only on sidebar navigation
"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 leave blank
"BannerImage": "", // As above or leave blank
"BannerPosition":"center bottom 40%", // Use allowable css values including units
},
"DataPath": "", // Set to the absolute or relative path of your data
Custom: {
StandardMenu"Geometry": false,{
Dropdown "StaticHead": true, // true or false accepted
"StaticFoot": true, // true or false accepted
Theme: "",
"PaddingTop": 2, // Numeric value only (real numbers accepted but ignored if using px as unit)
Logo: "",
"PaddingBottom": 1, // Numeric value only ( ditto )
BannerImage: "",
"Units": "em", // Accepts any valid css unit
StaticHead: true,
StaticFoot: true,
PaddingTop: '2',
PaddingBottom: '1',
PaddingUnits: 'em',
},
"Gull": { // Affects the standing gull only
Data: "",
"Animation": "", // Values: Blank, 'Expand', 'Enter left', 'Enter right' or 'Drop' only
Menu: 'js/ows-menu.js',
"Speed": 5, // Positive numeric values only (can be real)
NOAAReportPath: 'Reports/',
"OnTop": false, // true or false
Gull: {
Animation: "",
Speed: 5,
OnTop: false,
},
Records"Panels": {
"Shadows": "", // Blank, Basic or Enhanced only
All: "",
"VariableHeight": true, // true or false
Monthly: "",
},
"Menu": "js/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.
let cmxSession = {
"Records": {
"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 nowboth 4root level entries and sections, The sections are:- '''ChartsCustom''', '''CustomGeometry''', '''Gull''' and '''RecordsPanels'''. as well as three primary settings:- '''Data''', '''Menu''' and '''NOAAReportPath'''.
 
The root level entries are:- '''DataPath''', '''Menu''' and '''NOAAPath'''.
 
Of these you will need to check, and probably edit, just the root level entries - '''DataDataPath''' and '''NOAAReportPathNOAAPath''' as these two provide the path to your data, wherever you have uploaded it.
 
* '''DataDataPath''': 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 your data to the same folder as the pages, '''this option should be empty'''.
** If you upload your data to aanother folder below the pages folder, i.e., to a folder inside the folder containing your pages e.g., '''data'''location, then this entry can containbe aan absolute or '''relative''' path; i.e.to 'data/',that './data/'location. ItAbsolute couldpaths alsoalways bestart anwith absolute path from the root of your website; i.e.a '/<pages>/data/' wherecharacter; <pages>any isother thecharacter folderimplies namerelative containing your websitepath.
* '''NOAAPath''': This must point to your NOAA Reports. The default installation of CumulusMX places these in a sub-folder of the html pages location. If you have changed this then you will also need to edit this entry.
** If you upload to a folder, for example called '''data''', above the pages folder, then this entry can be a relative path such as '../data/'. You can also use an absolute path if you prefer.
* '''NOAAReportPath''': This must point to your NOAA Reports. The default installation of CumulusMX places these in a sub-folder of the html pages location. If you have changed this then you will also need to edit this entry.
** 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.
 
===== Other entries =====
The other entries in the cmxConfig structure allow you to customise the various options available in this template with the '''Custom''' section being the primary area for such customisation. '''''Charts and Records''''' These two option areas are probably best left as is. They record the last chart (Trends and Summary) and records sets (Monthly and All), viewed in the current browsing session and are changed dynamically.
===== Custom =====
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.
 
|}
'''''Note'''''
This Wiki is increadable difficult to format as I want. This is why I putwill mostnow only be putting full information inand the download link on [https://www.oaktreewebs.co.uk/wiki/doku.php?id=start my Wiki]
 
==== Change Log ====
'''Version 5.1''' ''Dated:124/04/2026''
 
Yet another re-write to remove w3v5.css which is based on the w3Schools w3.css stylesheet. Most of the styles provided by this were simply not used; those that were have been ported into the main.css stylesheet.
 
The Menu has been simplified and there are now two variations: a traditional bar menu at the top of the screen which reduces to a standard mobile menu on small devices, and a modern 'sidebar' menu which opens at the side of your browser. You can choose which to use. Various other improvements have been made particularly in consolidating stylesheets and loading only those styles which are needed on each page. There are more options available to you for configuration.
 
'''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'''
* Corrected the build number to b:005. This is the latest release. The only page that has changed is '''page-control.js'''.
 
'''Update 04/11/2025 - Version 4 build:006'''
=== Download ===
 
'''Changes'''
You can download the file [[File:PublicWebsiteV2.zip|thumb|alt=Version 5 b005|here]] Version. 5 b:005 25/10/2025 10:00
* Added 'menu' to the hamburger menu on the template1.html page only for those that want this feature. You will need to copy it to other pages as required.
 
* Verified that the historic charts work as required.
It extracts to its own folder - apw, so you can extract to wherever without overwriting other content.
 
It comes with two template files for those of you that will need to generate your own pages to fit in with the theme / styles.
 
I have now fully updated [https://www.oaktreewebs.co.uk/wiki/doku.php?id=wiki:aw:start my Wiki] to provide an alternative upload option and provide more detailed information about using this version of the Alternative Public Website.
455

edits