No description
  • JavaScript 47.5%
  • CSS 39.7%
  • Less 8.5%
  • Go 2.9%
  • HTML 1.4%
Find a file
2020-02-29 23:45:00 +03:00
data Initial commit 2020-02-29 23:45:00 +03:00
modules Initial commit 2020-02-29 23:45:00 +03:00
routers Initial commit 2020-02-29 23:45:00 +03:00
scripts Initial commit 2020-02-29 23:45:00 +03:00
semantic Initial commit 2020-02-29 23:45:00 +03:00
services Initial commit 2020-02-29 23:45:00 +03:00
static Initial commit 2020-02-29 23:45:00 +03:00
templates Initial commit 2020-02-29 23:45:00 +03:00
vendor Initial commit 2020-02-29 23:45:00 +03:00
.drone.yml Initial commit 2020-02-29 23:45:00 +03:00
.editorconfig Initial commit 2020-02-29 23:45:00 +03:00
.eslintrc Initial commit 2020-02-29 23:45:00 +03:00
.gitignore Initial commit 2020-02-29 23:45:00 +03:00
.gitmodules Initial commit 2020-02-29 23:45:00 +03:00
2fa.go Initial commit 2020-02-29 23:45:00 +03:00
avatar.go Initial commit 2020-02-29 23:45:00 +03:00
beatmap.go Initial commit 2020-02-29 23:45:00 +03:00
context.go Initial commit 2020-02-29 23:45:00 +03:00
dev.go Initial commit 2020-02-29 23:45:00 +03:00
doc.go Initial commit 2020-02-29 23:45:00 +03:00
errors.go Initial commit 2020-02-29 23:45:00 +03:00
funcmap.go Initial commit 2020-02-29 23:45:00 +03:00
Gopkg.lock Initial commit 2020-02-29 23:45:00 +03:00
Gopkg.toml Initial commit 2020-02-29 23:45:00 +03:00
gulpfile.js Initial commit 2020-02-29 23:45:00 +03:00
helpers.go Initial commit 2020-02-29 23:45:00 +03:00
irc.go Initial commit 2020-02-29 23:45:00 +03:00
LICENSE Initial commit 2020-02-29 23:45:00 +03:00
loadchangelog.go Initial commit 2020-02-29 23:45:00 +03:00
localisation.go Initial commit 2020-02-29 23:45:00 +03:00
login.go Initial commit 2020-02-29 23:45:00 +03:00
main.go Initial commit 2020-02-29 23:45:00 +03:00
messages.go Initial commit 2020-02-29 23:45:00 +03:00
oauth.go Initial commit 2020-02-29 23:45:00 +03:00
package.json Initial commit 2020-02-29 23:45:00 +03:00
profbackground.go Initial commit 2020-02-29 23:45:00 +03:00
profile.go Initial commit 2020-02-29 23:45:00 +03:00
pw.go Initial commit 2020-02-29 23:45:00 +03:00
rate_limiter.go Initial commit 2020-02-29 23:45:00 +03:00
README.md Initial commit 2020-02-29 23:45:00 +03:00
recovery.go Initial commit 2020-02-29 23:45:00 +03:00
register.go Initial commit 2020-02-29 23:45:00 +03:00
semantic.json Initial commit 2020-02-29 23:45:00 +03:00
sessions.go Initial commit 2020-02-29 23:45:00 +03:00
simple.go Initial commit 2020-02-29 23:45:00 +03:00
startuato_linux.go Initial commit 2020-02-29 23:45:00 +03:00
startuato_windows.go Initial commit 2020-02-29 23:45:00 +03:00
templates.go Initial commit 2020-02-29 23:45:00 +03:00
tracking.go Initial commit 2020-02-29 23:45:00 +03:00
yarn.lock Initial commit 2020-02-29 23:45:00 +03:00

Hanayo build status

This repository has a mirror here. The original repo is still here.

To fellow developers: this is not how you do it!

The biggest flaw of hanayo are that when I set out to create it, I wanted to create a template system that:

  • Created a handler by simply having the file "be there"
  • Could fetch the data it needed on its own, often from the Ripple API
  • Had the actual Go code be as little as possible

This was not immediately evident to me, a Go beginner, but what I did there was basically make Go be PHP.

The biggest lesson I learned on how to properly do templates, was learning to use Vue. Yes, Vue can be used for the frontend and not really for server-rendered stuff, but even just learning how to do stuff with it can help you understand what a template is actually supposed to be in order to be maintainable.

The key concepts and insights for me where:

  • Separating clearly code and markup, making the template declarative and keeping as little code in the template
  • A template should be purely functional. Its mere creation should not generate side effects, nor should it be dependent on things that are not its precise inputs: for a given input there is a specific output.
  • The concept of component as a single self-contained entity which is the same wherever you use it is very powerful.
  • Once a template/component starts becoming too big, split it into more components.

But don't stop here. Actually making a project using Vue helps you to understand this much more easily than using mere words. Go ahead and build something, even if just to play around!