-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement] use go-elem for HTML pages #2115
Comments
Hello @kradalby , I really would like to take this and work on it. |
@amha-mersha sounds good, I think we will not merge anything until after 0.23.0 goes in, but I think a good approach would be to make a PR converting something small, like https://github.com/juanfont/headscale/blob/main/hscontrol/handlers.go#L141-L168 would be a good start! |
Sure @kradalby , do you need to assign it to me or do I just do it and make a PR |
I assigned it so people know, but other than that you can make a PR. |
Thank you @kradalby for assigning me my first open-source contribution, I have finished it and made a PR. Are there other things I can work on. |
You can also start on https://github.com/juanfont/headscale/blob/main/hscontrol/templates/windows.html, and where it is called in the code. the more you can make functions to reuse the better |
There is also styles and templates for OIDC here that needs to be rewritten: Lines 161 to 166 in 10a72e8
This contains other styling than the current one, we should unify this so it all looks the same and can have the style reused. |
I would greatly appreciate it if these were simple HTML templates that can be read from the filesystem so admins can easily customize them to their organization’s visual style, add additional information etc. |
Use case
We currently have a couple of HTML files/template strings in the code using gotemplate and handcrafted HTML, its not a lot, and its fine, but a nice QoL improvement would be to make them nice, typed and generated.
Description
I have had quite a good experience with go-elem for this for some other projects, ergonomics are pretty good for writing HTML as functions, at least if we consider that it is Go and not something like Elm, Roc or Scala which might allow a bit nicer funcs.
Contribution
How can it be implemented?
I will eventually do this, but if someone is up for converting the HTML to go-elem, that would be a great PR/starter issue, make things neat and reusable.
The text was updated successfully, but these errors were encountered: