Comments (17)
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.
I second this request... in addition to lightning and airquality data, weather cams, timelaspe video come to mind...
from weewx-belchertown.
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.
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.
@sgrayban How does that apply to this issue?
from weewx-belchertown.
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.
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.
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.
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.
@41south Works for me if you want! Close this issue if/when you're happy. Thanks!
from weewx-belchertown.
Closing this issue
from weewx-belchertown.
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.
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.
Acknowledged. I tweaked a little, and think starting to figure out. Thanks.
from weewx-belchertown.
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.
@ZXant, thanks for detailing that. it works a treat.
from weewx-belchertown.
@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)
- errors after upgrading from 1.3beta1 to 1.3 final HOT 10
- Skin broken after Highcharts update HOT 42
- Missing Charts HOT 11
- Upgrading to 1.3 from 1.2 HOT 2
- "drizzle" icon is missing during install and will show as broken in forecasts HOT 2
- Can't find locale HOT 1
- If Aeris throws an exception Belchertown doesn't update HOT 7
- Forecast finds the database locked, exception issue HOT 1
- Change in default charts on home page HOT 2
- Wind Rose does not seem accurate on the longer time lines HOT 1
- Kiosk.html not updating HOT 12
- Pi page showing "undefined" and unformatted values after access/refresh HOT 2
- Belchertown taking forever on some weewx v5 systems HOT 22
- 29th February HOT 1
- Graphs appear with delay on refresh
- In js/belchertown.js.tmpl function get_outTemp_color returns incorrect color when outTemp <= 0 and unit is "degree_C"
- Data is being rounded to 0
- View from Reports / NOAA
- display miles instead of kilometer HOT 2
- I am getting errors after upgrading to weewx v5.0.1 and belchertown 1.3.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weewx-belchertown.