diff --git a/pkg/random/random.go b/pkg/random/random.go index aead9330..00efd726 100644 --- a/pkg/random/random.go +++ b/pkg/random/random.go @@ -71,8 +71,16 @@ func MotDebileQuiSeMange() string { func MotCool() string { mots := []string{ - "cool", "sympa", "gentil", "genial", "excellent", "superbe", "super", - "vraiment tres bien", "bien", "qui en a dans le pantalon", "top", + "cool", "sympa", "gentil", "génial", "excellent", "superbe", "super", + "vraiment très bien", "bien", "qui en a dans le pantalon", "top", + } + return mots[rand.Intn(len(mots))] +} + +func MotCoolPluriel() string { + mots := []string{ + "cools", "sympas", "gentils", "géniaux", "excellents", "superbes", "supers", + "vraiment très biens", "biens", "qui en ont dans le pantalon", "tops", } return mots[rand.Intn(len(mots))] } diff --git a/pkg/soundcloud/entities.go b/pkg/soundcloud/entities.go index d43fea7d..98ccf3e4 100644 --- a/pkg/soundcloud/entities.go +++ b/pkg/soundcloud/entities.go @@ -1,6 +1,9 @@ package soundcloud -import "fmt" +import ( + "fmt" + "strings" +) func (p *Playlist) IsMain() bool { switch p.PlaylistType { @@ -47,3 +50,7 @@ func (t *Track) URL() string { func (t *Track) IsExternal() bool { return false } func (t *Track) ImageURL() string { return t.ArtworkUrl } + +func (t *Track) Tags() []string { + return strings.Split(t.TagList, " ") // FIXME: use shell lexer +} diff --git a/templates/hackz.tmpl b/templates/hackz.tmpl index 5fbd345d..4825069e 100644 --- a/templates/hackz.tmpl +++ b/templates/hackz.tmpl @@ -1,9 +1,6 @@ {{define "title"}}Hackz{{end}} - -{{/* -{% block title %}Des hackz{% endblock %} -{% block subtitle %}à l'unité{% endblock %} -*/}} +{{define "h1"}}Des hackz{{end}} +{{define "h1small"}}à l'unité{{end}} {{define "content"}} {{ $columns := 3 }} @@ -14,7 +11,7 @@
{{ range $entry := .hackz.Entries }} -
+ {{ end }} -
-

Et plein d'autres..

+ + +{{end}} + + +{{define "secondary_column"}} +

Hackzers les plus {{ mot_cool_pluriel }} (pour l'instant !)

+ Les scores sont cassés et reviendront bientôt {{end}} {{/* {% block secondary_column %} -

Hackzers les plus {{ mot_cool() }} (pour l'instant !)

diff --git a/templates/muzik.tmpl b/templates/muzik.tmpl index 42a583c1..7b0b4569 100644 --- a/templates/muzik.tmpl +++ b/templates/muzik.tmpl @@ -1,9 +1,7 @@ {{define "title"}}Muzik{{end}} +{{define "h1"}}Des albums {{mot_cool_pluriel}}{{end}} +{{define "h1small"}}pas au hasard{{end}} -{{/* -{% block title %}Des albums{% endblock %} -{% block subtitle %}pas au hasard{% endblock %} -*/}} {{define "content"}} {{ $columns := 2 }} diff --git a/templates/track.tmpl b/templates/track.tmpl index 9b243bc1..26acd1b4 100644 --- a/templates/track.tmpl +++ b/templates/track.tmpl @@ -2,8 +2,8 @@ {{define "h1"}}Du son {{ mot_cool }}{{end}} {{define "h1small"}}{{.track.Title}}{{end}} -{{define "content"}} +{{define "content"}}