{% import "strconv" %} {% import "fmt" %} {% import "github.com/bakape/meguca/common" %} {% import "github.com/bakape/meguca/assets" %} {% import "github.com/bakape/meguca/lang" %} Renders the tab selection butts in tabbed windows {% func tabButts(names []string) %}{% stripspace %}
{% for i, n := range names %} {%s= n %} {% endfor %}

{% endstripspace %}{% endfunc %} Render a link to another post. Can optionally be cross-thread. {% func postLink(link common.Link, cross, boardPage bool) %}{% stripspace %} {% code idBuf := strconv.AppendUint(make([]byte, 0, 16), link.ID, 10) %} {% code url := make([]byte, 0, 64) %} {% if cross %} {% code url = append(url, '/') %} {% code url = append(url, link.Board...) %} {% code url = append(url, '/') %} {% code url = strconv.AppendUint(url, link.OP, 10) %} {% endif %} {% code url = append(url, "#p"...) %} {% code url = append(url, idBuf...) %} >> {%z= idBuf %} {% if cross && !boardPage %} {% space %}➡ {% endif %} # {% endstripspace %}{% endfunc %} {% func expandLink(board, id string) %}{% stripspace %} {%s= lang.Get().Common.Posts["expand"] %} {% endstripspace %}{% endfunc %} {% func last100Link(board, id string) %}{% stripspace %} {%s= lang.Get().Common.UI["last"] %}{%space %}100 {% endstripspace %}{% endfunc %} Render the class attribute of a post {% func postClass(p common.Post, op uint64) %}{% stripspace %} class="glass {% if p.Editing %} {% space %}editing {% endif %} {% if p.IsDeleted() %} {% space %}deleted {% endif %} {% if p.Image != nil %} {% space %}media {% endif %} {% if p.ID == op %} {% space %}op {% endif %} " {% endstripspace %}{% endfunc %} Renders a stylized deleted post display toggle {% func deletedToggle() %}{% stripspace %} {% endstripspace %}{% endfunc %} Notice widget, that reveals text on hover {% func hoverReveal(tag, text, label string) %}{% stripspace %} {% if text == "" %} {% return %} {% endif %} <{%s= tag %}{% space %}class="hover-reveal{% if tag == "aside" %}{% space %}glass{% endif %}"> {%s= label %} {%s text %} {% endstripspace %}{% endfunc %} Render pin signifying a thread is sticky {% func renderSticky(sticky bool) %}{% stripspace %} {% if !sticky %} {% return %} {% endif %} {% endstripspace %}{% endfunc %} Render lock signifying a thread has posting disabled {% func renderLocked(locked bool) %}{% stripspace %} {% if !locked %} {% return %} {% endif %} {% endstripspace %}{% endfunc %} Render an image or video asset {% func asset(url, mime string) %}{% stripspace %} {% if mime == "video/webm" %}