mirror of https://github.com/velour/catbase.git
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
package emojy
|
|
|
|
import "fmt"
|
|
|
|
templ (p *EmojyPlugin) emojyNav() {
|
|
<ul class="menu">
|
|
<li>
|
|
<a href="/emojy/stats">Stats</a>
|
|
</li>
|
|
<li>
|
|
<a href="/emojy/list">List</a>
|
|
</li>
|
|
<li>
|
|
<a href="/emojy/new">Upload</a>
|
|
</li>
|
|
</ul>
|
|
}
|
|
|
|
templ (p *EmojyPlugin) statsIndex(emojy emojyMap) {
|
|
<div class="grid-container">
|
|
<div class="grid-x">
|
|
<div class="cell">
|
|
<h2>Emojy</h2>
|
|
</div>
|
|
</div>
|
|
<div class="grid-x">
|
|
<div class="cell">
|
|
@p.emojyNav()
|
|
</div>
|
|
</div>
|
|
<div class="cell">
|
|
for categoryName, v := range emojy {
|
|
<ul class="no-bullet">
|
|
for _, c := range v {
|
|
<li class="">
|
|
{ fmt.Sprintf("%d", c.Count) } -
|
|
if categoryName != "emoji" && c.OnServer {
|
|
<span>✅</span>
|
|
} else if categoryName != "emoji" {
|
|
<span>✅</span>
|
|
}
|
|
if c.URL != "" {
|
|
<img src={ c.URL } alt={ c.Emojy } />
|
|
} else {
|
|
{ c.Emojy }
|
|
}
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|