freifunk-darmstadt / gluon-firmware-selector

Firmware selector for gluon router images
https://firmware.darmstadt.freifunk.net/
GNU Affero General Public License v3.0
23 stars 49 forks source link

Feature: Add Custom Texts and Logo #115

Open herbetom opened 4 years ago

herbetom commented 4 years ago

It would be nice to have some sort of customization options. For example for a welcome Text in which a Community could link their preferred communication channel, their Gluon Site Repo and thinks like that. Also i could imagine that a table with Hardware recommendations could be a nice feature.

Probably this could be achieved by providing a option to define some custom html sections and importing them with JS on page load. How that looks (especially on slow connections) would need to be tested.

herbetom commented 4 years ago

For eample i wanted to have a little more explanation to the Veraltete Geräte anzeigen Block. So i had to create a fork and add that:

https://github.com/Freifunk-Rhein-Neckar/gluon-firmware-selector/commit/af93211a89d35465c2d863d5962678e4c0b5f189

Shure, in this case i could have used the link feature, but i wanted the text on the download page and not on another page. Also the need for this text should disappear in the nearer future, but the possibilty for some custom html above Schritt 1: Wähle Dein Routermodell would be nice.

citronalco commented 1 year ago

Falls hier jemand drüberstoplert:

Um die Texte zu ändern braucht's keinen Fork. Man kann die Texte auch ändern, indem man an's Ende der config.js ein bisschen Javascript schreibt.

Beispiel:

[...]

 // füge Hinweis unter "Erst mit der Freifunk-Firmware...."-Text hinzu
var xpath = "//p[contains(text(),'Erst mit der Freifunk-Firmware')]";
var e = document.evaluate(xpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
e.innerHTML = e.innerHTML + " \
<p> \
Um einen zukunftssicheren und problemlosen Betrieb sicherzustellen \
und Fehlkäufe zu vermeiden, stellen wir hier keine Firmware mehr \
bereit für Geräte mit nur 4 MByte Flash und/oder nur 32 MByte RAM. \
</p>";