Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

C1 and CuMX "legacy" nav bars

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

C1 and CuMX "legacy" nav bars

Post by beteljuice »

C1.9.4 OR new CuMX "Legacy" nav bars

You like / use the original Cumulus 'style', but you wish it had the site wide menu 'definitions' and dropbox capability like CuMx 3.10 default

So be it ...

I've tried to make it as easy as possible, you will need to add one or perhaps two lines to your pages.

The code(s) are only very slightly modified sections of the current distro default.

The zip contains:

js/menu.js - the menu definitions file which you can duplicate / edit in the same manner as CuMx 3.10 default
js/legacymenu.js - the actual menu creation code to be included in your pages.
css/legacy.css - style sheet to duplicate the 'legacy' look / feel (You can edit this if you are insane)

betel_legacy.zip

Overview:
Simplified Chinese - On turning enjoy will be yours.

Realworld - Original C1.9.4 and CuMx 'legacy' both have the nav-bar contained in a <div class= "td_navigation_bar"> ... </div>
On page load, the new js/legacymenu.js adds the new css/legacy.css to the page,
creates the menu content from the definitions file js/menu.js
REPLACES the content of ANY <div class= "td_navigation_bar"> with the new menu.
i.e. You can have more than one menu on a page (say top and bottom)

HOW TO:

Put the files in the obvious places on your WEBSITE (NOT a CuMx 3.10+ 'default' site unless you are careful with the menu name !!)
You can change the menu used in js/legacymenu.js

In your pages ensure you are loading jQuery - In the case of CuMX 'legacy' this is being done at the bottom of the page(s)
Somewhere AFTER the jQuery 'call' add:

Code: Select all

  <script src="js/legacymenu.js"></script>
... and you should get something looking like this.
You do not have the required permissions to view the files attached to this post.
Image
......................Imagine, what you will KNOW tomorrow !
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: C1 and CuMX "legacy" nav bars

Post by Phil23 »

I must be missing something.

Trying it as a replacement for the TOP menu on http://weather.inverellit.com/index1.htm

Dev tools is showing a 404 error in reference to setpagedata.js, which I know will not be present as I'm still on 3107.
But at the same time I know that file would not exist on C1 sites.

Have put the js's in the JS dir & the CSS in the root.

Relevant parts of the page look like this.

Code: Select all

<!-- Start of navigation menus at the top -->

<div class="td_navigation_bar">
 <script src="js/legacymenu.js"></script>
</div> 

<!-- End of navigation menus at the top -->

Last few line of the file.

Code: Select all

  <!-- Google CDN hosted JQuery library -->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  <!-- or... -->
  <!-- Local JQuery library, do not use if your containing page already pulls in a copy of JQuery -->
  <!-- <script src="scripts/jquery-1.8.2.min.js"></script> -->
  <script src="js/setpagedata.js"></script>
  <script src="js/legacymenu.js"></script>

</body>

</html>

:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: C1 and CuMX "legacy" nav bars

Post by beteljuice »

1/
Dev tools is showing a 404 error in reference to setpagedata.js, which I know will not be present as I'm still on 3107.
So stop the page trying to call it . (Why is it there ?)

2/

Code: Select all

<!-- Start of navigation menus at the top -->

<div class="td_navigation_bar">

</div> 

<!-- End of navigation menus at the top -->
Edit:
It is trying to 'fire' before jQuery has loaded, because of the 'extra' code call you have in the (top) div.

BTW. Remember BOTH menus will be modified, not just the top one ;)

Try the changes above and <CNTL><F5> and see what happens ...
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: C1 and CuMX "legacy" nav bars

Post by beteljuice »

@Phil ...

Getting there, but your css/legacy.css is missing (404)
Image
......................Imagine, what you will KNOW tomorrow !
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: C1 and CuMX "legacy" nav bars

Post by Phil23 »

.Yeah I had it in /

Haven't checked where it's referenced.

Edit:-

So event though I've only replaced it in the top menu, both top & bottom are replaced....
Not sure I quite have my head around that bit.
Assume though it means if I want different Top & Bottom menu's I'll need an extra pair of differently named JS's.

Also as is seen in my existing menu's, I've broken them into 2 & 3 lines respectivly for Top & Bottom.
(Gauges page is the best example, http://weather.inverellit.com/gauges.htm )

Is a line break possible?

Thanks

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Post Reply