GithubHelp home page GithubHelp logo

Comments (17)

poblabs avatar poblabs commented on August 16, 2024

I saw your comment flash by in the barrage of other comments from that thread and have been thinking about it on and off the last few days.

The install.py file shouldn't touch anything it's not aware of. So if you made a folder called lightning and inside added an index.html.tmpl, you could copy everything from the About page's tmpl file, and copy it there. Upon upgrades the files should remain untouched since the installer isn't aware of them.

This is good and bad.

Good because your custom page won't be touched.

Bad because the lightning's index.html.tmpl file needs to be in skin.conf (mirrored after the about page), and the nav menu is in header.html.tmpl, so if you add the page to these 2 files, they'll get overwritten on upgrades.

I'm sure that there are ways to expand the template generator to be more dynamic, but I'm not familiar with them.

from weewx-belchertown.

mash55 avatar mash55 commented on August 16, 2024

I second this request... in addition to lightning and airquality data, weather cams, timelaspe video come to mind...

from weewx-belchertown.

poblabs avatar poblabs commented on August 16, 2024

Have a user add a custom page themselves can totally be done. Either by hand in the /var/www/html dir or as part of the /etc/weewx/skin method. The problem you run into is the page being deleted potentially on upgrades.

This is slightly out of my scope right now (so many emails to respond to with users having other issues :) but maybe a write up on the readme could be a good starting point?

from weewx-belchertown.

sgrayban avatar sgrayban commented on August 16, 2024

This is doable unless you have done this step to reduce r/w on the sdcard
https://github.com/weewx/weewx/wiki/Minimize-writes-on-SD-cards

Which I did.

from weewx-belchertown.

poblabs avatar poblabs commented on August 16, 2024

@sgrayban How does that apply to this issue?

from weewx-belchertown.

poblabs avatar poblabs commented on August 16, 2024

To everyone else, I'm not sure I can programatically implement something like this. The user would have to customize it to their own site that they want. Maybe a wiki outlining the steps it would take to add new pages and their content would solve this issue?

from weewx-belchertown.

sgrayban avatar sgrayban commented on August 16, 2024

It applies because the html reports are written to a tmpfs. If the user uses this and stores static pages it will be delete when the pi is rebooted.

weewx_html /home/weewx/public_html tmpfs size=20M,noexec,nosuid,nodev 0 0

from weewx-belchertown.

41south avatar 41south commented on August 16, 2024

Yeah I was going to close this given what you've added for the extra sections. The instructions you gave me a while back work perfectly, it just needs to be redone after after an update but I don't think it's too onerous a job, I'd be happy to do a how-to if you like, seeing as how I've had it working

from weewx-belchertown.

poblabs avatar poblabs commented on August 16, 2024

Ok, that's probably more a general tip than this issue which is related to having the ability to customize and add new pages.

from weewx-belchertown.

poblabs avatar poblabs commented on August 16, 2024

@41south Works for me if you want! Close this issue if/when you're happy. Thanks!

from weewx-belchertown.

poblabs avatar poblabs commented on August 16, 2024

Closing this issue

from weewx-belchertown.

ZXant avatar ZXant commented on August 16, 2024

Pat

I was thinking of an extra page as well. I truly appreciate the capability of "page inserts (xxx.inc)" on Homepage, and played a bit with radar maps and external widgets. It works great, but also in respect to Belchertown modern elegance and cleanness, don't want to overload.

That said, I've been considering a "Forecast" page on Menu, leaving homepage mainly for PWS measurements, while still providing further forecast graphs and widgets in separate page.

Its mentioned on this forum, that some instructions to manually patch for an extra Menu page was previously provided (but could not locate). Can please point-out.

Obviously, this is not a major issue, and pending your time availability and priorities.

Thanks,
Xant

from weewx-belchertown.

poblabs avatar poblabs commented on August 16, 2024

This is a very much requested feature and the reason it hasn't been included as part of the base code is because of the way weewx works with the Cheetah HTML generator. Right now it has to be a 100% custom solution that cannot be supported by the skin.

Custom meaning, add the new folder, add your new files, add it to the nav menu, then add to skin.conf.

Right now there's no skin option that can automate any part of that - especially automatically editing and adding to skin.conf.

If anything, it's worth documenting how it's done, but that's about it.

from weewx-belchertown.

ZXant avatar ZXant commented on August 16, 2024

Acknowledged. I tweaked a little, and think starting to figure out. Thanks.

from weewx-belchertown.

ZXant avatar ZXant commented on August 16, 2024

My notes, to manually adding new page to Belchertown skin Menu:


1) Skin.conf
- # Navigation Menu, add:
nav_'newPage' = 'newPage'
- # Default page headers, add:
'newPage'_page_header = " 'newPage header' "
- CheetahGenerator section, add:
[CheetahGenerator]
   [[ToDate]]
     [[['newPage']]]
        template = 'newPageFolder'/index.html.tmpl

2) header.html.tmpl
Under <section id="nav_menu">, add new <li class="menu-item menu-item-#'>, 
reordering menu-items in desired order; 
for example, 'newPage' as 2nd menu-item after Home, add:

<li class="menu-item menu-item-1">
<a href="$relative_url/'newPageFolder'" itemprop="url">
<span itemprop="name">$obs.label.nav_'newPage'</span></a></li>

reordering following menu-items: 2,3,4,5

3) page-header.inc
Add after #if $page == "graphs" <h1>...</h1>:

#else if $page == "'newPage'"
   <h1>$obs.label.'newPage'_page_header</h1>

4) New Folder
Create folder 'newPageFolder'
Copy 'about.inc.example' into 'newPageFolder', and edit accordingly

from weewx-belchertown.

greenembrace avatar greenembrace commented on August 16, 2024

@ZXant, thanks for detailing that. it works a treat.

from weewx-belchertown.

ZXant avatar ZXant commented on August 16, 2024

@greenembrace, thank you for note, and glad you found (it has been a while...)

Here is my PSW-site with 2 extra pages on Belchertown skin (Forecast, Grafana): http://appnea.net/

Xant

from weewx-belchertown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.