reduce boilerplate in the client template builder

save a few more bytes in client templates
shave down img tags and global.js mini parse
remove comment in topic alt userinfo
This commit is contained in:
Azareal 2020-03-22 12:37:32 +10:00
parent f074b5578c
commit f86346ba22
27 changed files with 111 additions and 105 deletions

View File

@ -63,15 +63,18 @@ func (list SFileList) JSTmplInit() error {
replace := func(data []byte, replaceThis, withThis string) []byte { replace := func(data []byte, replaceThis, withThis string) []byte {
return bytes.Replace(data, []byte(replaceThis), []byte(withThis), -1) return bytes.Replace(data, []byte(replaceThis), []byte(withThis), -1)
} }
rep := func(replaceThis, withThis string) {
data = replace(data, replaceThis, withThis)
}
startIndex, hasFunc := skipAllUntilCharsExist(data, 0, []byte("if(tmplInits===undefined)")) startIndex, hasFunc := skipAllUntilCharsExist(data, 0, []byte("if(tmplInits===undefined)"))
if !hasFunc { if !hasFunc {
return errors.New("no init map found") return errors.New("no init map found")
} }
data = data[startIndex-len([]byte("if(tmplInits===undefined)")):] data = data[startIndex-len([]byte("if(tmplInits===undefined)")):]
data = replace(data, "// nolint", "") rep("// nolint", "")
data = replace(data, "func ", "function ") rep("func ", "function ")
data = replace(data, " error {\n", " {\nlet o = \"\"\n") rep(" error {\n", " {\nlet o = \"\"\n")
funcIndex, hasFunc := skipAllUntilCharsExist(data, 0, []byte("function Template_")) funcIndex, hasFunc := skipAllUntilCharsExist(data, 0, []byte("function Template_"))
if !hasFunc { if !hasFunc {
return errors.New("no template function found") return errors.New("no template function found")
@ -89,8 +92,8 @@ func (list SFileList) JSTmplInit() error {
fmt.Println("string(data[spaceIndex:endBrace]): ", string(data[spaceIndex:endBrace])) fmt.Println("string(data[spaceIndex:endBrace]): ", string(data[spaceIndex:endBrace]))
preLen := len(data) preLen := len(data)
data = replace(data, string(data[spaceIndex:endBrace]), "") rep(string(data[spaceIndex:endBrace]), "")
data = replace(data, "))\n", " \n") rep("))\n", " \n")
endBrace -= preLen - len(data) // Offset it as we've deleted portions endBrace -= preLen - len(data) // Offset it as we've deleted portions
fmt.Println("new endBrace: ", endBrace) fmt.Println("new endBrace: ", endBrace)
fmt.Println("data: ", string(data)) fmt.Println("data: ", string(data))
@ -175,51 +178,52 @@ func (list SFileList) JSTmplInit() error {
data[braceAt-1] = ')' // Drop a brace here to satisfy JS data[braceAt-1] = ')' // Drop a brace here to satisfy JS
} }
}) })
data = replace(data, "for _, item := range ", "for(item of ") rep("for _, item := range ", "for(item of ")
data = replace(data, "w.Write([]byte(", "o += ") rep("w.Write([]byte(", "o += ")
data = replace(data, "w.Write(StringToBytes(", "o += ") rep("w.Write(StringToBytes(", "o += ")
data = replace(data, "w.Write(", "o += ") rep("w.Write(", "o += ")
data = replace(data, "+= c.", "+= ") rep("+= c.", "+= ")
data = replace(data, "strconv.Itoa(", "") rep("strconv.Itoa(", "")
data = replace(data, "strconv.FormatInt(", "") rep("strconv.FormatInt(", "")
data = replace(data, " c.", "") rep(" c.", "")
data = replace(data, "phrases.", "") rep("phrases.", "")
data = replace(data, ", 10;", "") rep(", 10;", "")
//data = replace(data, "var plist = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "const plist = tmplPhrases[\""+tmplName+"\"];") //rep("var plist = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "const plist = tmplPhrases[\""+tmplName+"\"];")
//data = replace(data, "//var plist = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "const "+shortName+"_phrase_arr = tmplPhrases[\""+tmplName+"\"];") //rep("//var plist = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "const "+shortName+"_phrase_arr = tmplPhrases[\""+tmplName+"\"];")
data = replace(data, "//var plist = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "const pl=tmplPhrases[\""+tmplName+"\"];") rep("//var plist = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "const pl=tmplPhrases[\""+tmplName+"\"];")
data = replace(data, shortName+"_phrase_arr", "pl") rep(shortName+"_phrase_arr", "pl")
data = replace(data, "tmpl_"+shortName+"_vars", "t_vars") rep("tmpl_"+shortName+"_vars", "t_vars")
data = replace(data, "var c_var_", "let c_var_") rep("var c_v_", "let c_v_")
data = replace(data, `t_vars, ok := tmpl_i.`, `/*`) rep(`t_vars, ok := tmpl_i.`, `/*`)
data = replace(data, "[]byte(", "") rep("[]byte(", "")
data = replace(data, "StringToBytes(", "") rep("StringToBytes(", "")
data = replace(data, "RelativeTime(t_vars.", "t_vars.Relative") rep("RelativeTime(t_vars.", "t_vars.Relative")
// TODO: Format dates properly on the client side // TODO: Format dates properly on the client side
data = replace(data, ".Format(\"2006-01-02 15:04:05\"", "") rep(".Format(\"2006-01-02 15:04:05\"", "")
data = replace(data, ", 10", "") rep(", 10", "")
data = replace(data, "if ", "if(") rep("if ", "if(")
data = replace(data, "return nil", "return o") rep("return nil", "return o")
data = replace(data, " )", ")") rep(" )", ")")
data = replace(data, " \n", "\n") rep(" \n", "\n")
data = replace(data, "\n", ";\n") rep("\n", ";\n")
data = replace(data, "{;", "{") rep("{;", "{")
data = replace(data, "};", "}") rep("};", "}")
data = replace(data, "[;", "[") rep("[;", "[")
data = replace(data, ";;", ";") rep(";;", ";")
data = replace(data, ",;", ",") rep(",;", ",")
data = replace(data, "=;", "=") rep("=;", "=")
data = replace(data, `, rep(`,
}); });
}`, "\n\t];") }`, "\n\t];")
data = replace(data, `= rep(`=
}`, "=[]") }`, "=[]")
rep("o += ", "o+=")
fragset := tmpl.GetFrag(shortName) fragset := tmpl.GetFrag(shortName)
if fragset != nil { if fragset != nil {
sfrags := []byte("let " + shortName + "_frags = [\n") sfrags := []byte("let " + shortName + "_frags=[\n")
for _, frags := range fragset { for _, frags := range fragset {
//sfrags = append(sfrags, []byte(shortName+"_frags.push(`"+string(frags)+"`);\n")...) //sfrags = append(sfrags, []byte(shortName+"_frags.push(`"+string(frags)+"`);\n")...)
sfrags = append(sfrags, []byte("`"+string(frags)+"`,\n")...) sfrags = append(sfrags, []byte("`"+string(frags)+"`,\n")...)
@ -227,11 +231,11 @@ func (list SFileList) JSTmplInit() error {
sfrags = append(sfrags, []byte("];\n")...) sfrags = append(sfrags, []byte("];\n")...)
data = append(sfrags, data...) data = append(sfrags, data...)
} }
data = replace(data, "\n;", "\n") rep("\n;", "\n")
for name, _ := range Themes { for name, _ := range Themes {
if strings.HasSuffix(shortName, "_"+name) { if strings.HasSuffix(shortName, "_"+name) {
data = append(data, "\nvar Template_"+strings.TrimSuffix(shortName, "_"+name)+" = Template_"+shortName+";"...) data = append(data, "\nvar Template_"+strings.TrimSuffix(shortName, "_"+name)+"=Template_"+shortName+";"...)
break break
} }
} }

View File

@ -1959,7 +1959,7 @@ func (c *CTemplateSet) afterTemplate(con CContext, startIndex int) {
varmap := make(map[string]int) varmap := make(map[string]int)
for name, count := range varcounts { for name, count := range varcounts {
if count > 1 { if count > 1 {
varstr += "var c_var_" + strconv.Itoa(i) + "=" + name + "\n" varstr += "var c_v_" + strconv.Itoa(i) + "=" + name + "\n"
varmap[name] = i varmap[name] = i
i++ i++
} }
@ -1979,7 +1979,7 @@ func (c *CTemplateSet) afterTemplate(con CContext, startIndex int) {
} else if item.Type == "varsub" && loopDepth == 0 { } else if item.Type == "varsub" && loopDepth == 0 {
index, ok := varmap[item.Body] index, ok := varmap[item.Body]
if ok { if ok {
item.Body = "c_var_" + strconv.Itoa(index) item.Body = "c_v_" + strconv.Itoa(index)
item.Type = "cvarsub" item.Type = "cvarsub"
outBuf[i] = item outBuf[i] = item
} }

View File

@ -946,15 +946,18 @@ function bindTopic() {
// Miniature implementation of the parser to avoid sending as much data back and forth // Miniature implementation of the parser to avoid sending as much data back and forth
function quickParse(m) { function quickParse(m) {
m = m.replace(":)", "😀") const r = (o,n) => {
m = m.replace(":(", "😞") m = m.replace(o,n)
m = m.replace(":D", "😃") }
m = m.replace(":P", "😛") r(":)", "😀")
m = m.replace(":O", "😲") r(":(", "😞")
m = m.replace(":p", "😛") r(":D", "😃")
m = m.replace(":o", "😲") r(":P", "😛")
m = m.replace(";)", "😉") r(":O", "😲")
m = m.replace("\n","<br>") r(":p", "😛")
r(":o", "😲")
r(";)", "😉")
r("\n","<br>")
return m return m
} }

View File

@ -8,7 +8,7 @@
<input form="dash_username_form" name="account-new-username" value="{{.CurrentUser.Name}}"/> <input form="dash_username_form" name="account-new-username" value="{{.CurrentUser.Name}}"/>
<button form="dash_username_form" class="formbutton">{{lang "account_username_save"}}</button> <button form="dash_username_form" class="formbutton">{{lang "account_username_save"}}</button>
</span> </span>
<img src="{{.CurrentUser.Avatar}}" height="128px" /> <img src="{{.CurrentUser.Avatar}}" height="128px">
<span id="dash_avatar_buttons"> <span id="dash_avatar_buttons">
{{if .CurrentUser.Perms.UploadAvatars}} {{if .CurrentUser.Perms.UploadAvatars}}
<input form="avatar_form" id="select_avatar" name="account-avatar" type="file" required class="auto_hide"/> <input form="avatar_form" id="select_avatar" name="account-avatar" type="file" required class="auto_hide"/>

View File

@ -1,2 +1,2 @@
{{if .Avatar}}<div class='alertItem withAvatar' style='background-image:url("{{.Avatar}}");'><img src='{{.Avatar}}' class='bgsub' /><a class='text' data-asid='{{.ASID}}' href="{{.Path}}">{{.Message}}</a></div>{{else}} {{if .Avatar}}<div class='alertItem withAvatar'style='background-image:url("{{.Avatar}}");'><img src='{{.Avatar}}'class='bgsub'><a class='text'data-asid='{{.ASID}}'href="{{.Path}}">{{.Message}}</a></div>{{else}}
<div class='alertItem'><a href="{{.Path}}" class='text'>{{.Message}}</a></div>{{end}} <div class='alertItem'><a href="{{.Path}}"class='text'>{{.Message}}</a></div>{{end}}

View File

@ -2,7 +2,7 @@
<div id="post-{{.ID}}" class="rowitem passive deletable_block editable_parent comment {{.ClassName}}"> <div id="post-{{.ID}}" class="rowitem passive deletable_block editable_parent comment {{.ClassName}}">
<div class="topRow"> <div class="topRow">
<div class="userbit"> <div class="userbit">
<img src="{{.User.MicroAvatar}}" alt="Avatar" title="{{.User.Name}}'s Avatar" aria-hidden="true" /> <img src="{{.User.MicroAvatar}}" alt="Avatar" title="{{.User.Name}}'s Avatar" aria-hidden="true">
<span class="nameAndTitle"> <span class="nameAndTitle">
<a href="{{.User.Link}}" class="real_username username">{{.User.Name}}</a> <a href="{{.User.Link}}" class="real_username username">{{.User.Name}}</a>
{{if .User.Tag}}<a class="username hide_on_mobile user_tag" style="float:right;">{{.User.Tag}}</a>{{end}} {{if .User.Tag}}<a class="username hide_on_mobile user_tag" style="float:right;">{{.User.Tag}}</a>{{end}}

View File

@ -27,7 +27,7 @@
{{range .Convos}} {{range .Convos}}
<div class="rowitem"> <div class="rowitem">
<span class="to_left"> <span class="to_left">
{{if .OneOnOne}}{{range .ShortUsers}}<img class="bgsub" src="{{.MicroAvatar}}" height=48 width=48/>{{end}}{{end}} {{if .OneOnOne}}{{range .ShortUsers}}<img class="bgsub" src="{{.MicroAvatar}}" height=48 width=48>{{end}}{{end}}
<a href="/user/convo/{{.ID}}">{{range .ShortUsers}}<span class="convos_item_user">{{.Name}}</span>&nbsp;{{end}}</a></span></a> <a href="/user/convo/{{.ID}}">{{range .ShortUsers}}<span class="convos_item_user">{{.Name}}</span>&nbsp;{{end}}</a></span></a>
</span> </span>
<span title="{{abstime .LastReplyAt}}" class="to_right">{{reltime .LastReplyAt}}</span> <span title="{{abstime .LastReplyAt}}" class="to_right">{{reltime .LastReplyAt}}</span>

View File

@ -5,9 +5,9 @@
<div class="footLeft"></div> <div class="footLeft"></div>
<div class="footer"> <div class="footer">
{{dock "footer" .Header}} {{dock "footer" .Header}}
<div id="poweredByHolder" class="footerBit"> <div id="poweredByHolder"class="footerBit">
<div id="poweredBy"> <div id="poweredBy">
<a id="poweredByName" href="https://github.com/Azareal/Gosora">{{lang "footer_powered_by"}}</a><span id="poweredByDash"> - </span><span id="poweredByMaker">{{lang "footer_made_with_love"}}</span> <a id="poweredByName"href="https://github.com/Azareal/Gosora">{{lang "footer_powered_by"}}</a><span id="poweredByDash"> - </span><span id="poweredByMaker">{{lang "footer_made_with_love"}}</span>
</div> </div>
{{if .CurrentUser.IsAdmin}}<div title="start to before tmpl"class="elapsed">{{.Header.Elapsed1}}</div><div title="start to footer"class="elapsed">{{elapsed .Header.StartedAt}}</div>{{end}} {{if .CurrentUser.IsAdmin}}<div title="start to before tmpl"class="elapsed">{{.Header.Elapsed1}}</div><div title="start to footer"class="elapsed">{{elapsed .Header.StartedAt}}</div>{{end}}
<form action="/theme/" method="post"> <form action="/theme/" method="post">

View File

@ -31,7 +31,7 @@
{{if .CurrentUser.Perms.CreateTopic}} {{if .CurrentUser.Perms.CreateTopic}}
<div id="forum_topic_create_form" class="rowblock topic_create_form quick_create_form auto_hide" aria-label="{{lang "quick_topic.aria"}}"> <div id="forum_topic_create_form" class="rowblock topic_create_form quick_create_form auto_hide" aria-label="{{lang "quick_topic.aria"}}">
<form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?s={{.CurrentUser.Session}}" method="post"></form> <form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?s={{.CurrentUser.Session}}" method="post"></form>
<img class="little_row_avatar" src="{{.CurrentUser.MicroAvatar}}" height=64 alt="{{lang "quick_topic.avatar_alt"}}" title="{{lang "quick_topic.avatar_tooltip"}}"/> <img class="little_row_avatar" src="{{.CurrentUser.MicroAvatar}}" height=64 alt="{{lang "quick_topic.avatar_alt"}}" title="{{lang "quick_topic.avatar_tooltip"}}">
<input form="quick_post_form" id="topic_board_input" name="board" value="{{.Forum.ID}}" type="hidden"> <input form="quick_post_form" id="topic_board_input" name="board" value="{{.Forum.ID}}" type="hidden">
<div class="main_form"> <div class="main_form">
<div class="topic_meta"> <div class="topic_meta">
@ -50,9 +50,9 @@
{{range .ItemList}}<div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}" data-tid="{{.ID}}"> {{range .ItemList}}<div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}" data-tid="{{.ID}}">
<div class="rowitem topic_left passive datarow"> <div class="rowitem topic_left passive datarow">
<span class="selector"></span> <span class="selector"></span>
<a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"/></a> <a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"></a>
<span class="topic_inner_left"> <span class="topic_inner_left">
<a class="rowtopic" href="{{.Link}}" itemprop="itemListElement" title="{{.Title}}"><span>{{.Title}}</span></a> <a class="rowtopic"href="{{.Link}}"itemprop="itemListElement" title="{{.Title}}"><span>{{.Title}}</span></a>
<br><a class="rowsmall starter" href="{{.Creator.Link}}" title="{{.Creator.Name}}">{{.Creator.Name}}</a> <br><a class="rowsmall starter" href="{{.Creator.Link}}" title="{{.Creator.Name}}">{{.Creator.Name}}</a>
{{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}} {{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}}
{{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed" title="{{lang "status.closed_tooltip"}}"> | &#x1F512;&#xFE0E</span>{{end}} {{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed" title="{{lang "status.closed_tooltip"}}"> | &#x1F512;&#xFE0E</span>{{end}}
@ -73,7 +73,7 @@
</div> </div>
<div class="rowitem topic_right passive datarow"> <div class="rowitem topic_right passive datarow">
<div class="topic_right_inside"> <div class="topic_right_inside">
<a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}" height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar"aria-hidden="true"/></a> <a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}"height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar"aria-hidden="true"></a>
<span> <span>
<a href="{{.LastUser.Link}}" class="lastName" title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br> <a href="{{.LastUser.Link}}" class="lastName" title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br>
<a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}" class="rowsmall lastReplyAt" title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a> <a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}" class="rowsmall lastReplyAt" title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a>

View File

@ -26,7 +26,7 @@
{{if .CurrentUser.Perms.CreateTopic}} {{if .CurrentUser.Perms.CreateTopic}}
<div id="forum_topic_create_form" class="rowblock topic_create_form quick_create_form auto_hide" aria-label="{{lang "quick_topic.aria"}}"> <div id="forum_topic_create_form" class="rowblock topic_create_form quick_create_form auto_hide" aria-label="{{lang "quick_topic.aria"}}">
<form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?s={{.CurrentUser.Session}}" method="post"></form> <form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?s={{.CurrentUser.Session}}" method="post"></form>
<img class="little_row_avatar" src="{{.CurrentUser.MicroAvatar}}" height=64 alt="{{lang "quick_topic.avatar_alt"}}" title="{{lang "quick_topic.avatar_tooltip"}}"/> <img class="little_row_avatar" src="{{.CurrentUser.MicroAvatar}}" height=64 alt="{{lang "quick_topic.avatar_alt"}}" title="{{lang "quick_topic.avatar_tooltip"}}">
<input form="quick_post_form" id="topic_board_input" name="board" value="{{.Forum.ID}}" type="hidden"> <input form="quick_post_form" id="topic_board_input" name="board" value="{{.Forum.ID}}" type="hidden">
<div class="main_form"> <div class="main_form">
<div class="topic_meta"> <div class="topic_meta">
@ -44,11 +44,11 @@
<div id="forum_topic_list" class="rowblock micro_grid" aria-label="{{lang "forum_list_aria"}}" style="grid-template-columns:repeat(auto-fit,minmax(130px,1fr));"> <div id="forum_topic_list" class="rowblock micro_grid" aria-label="{{lang "forum_list_aria"}}" style="grid-template-columns:repeat(auto-fit,minmax(130px,1fr));">
{{range .ItemList}}<div class="rowitem" data-tid="{{.ID}}"> {{range .ItemList}}<div class="rowitem" data-tid="{{.ID}}">
<div> <div>
<a class="rowtopic" href="{{.Link}}" itemprop="itemListElement"><img src="{{.Content}}" style="width:100%;height:160px;"/></a> <a class="rowtopic" href="{{.Link}}" itemprop="itemListElement"><img src="{{.Content}}" style="width:100%;height:160px;"></a>
<br><a class="rowsmall starter" href="{{.Link}}">{{.Title}}</a> <br><a class="rowsmall starter" href="{{.Link}}">{{.Title}}</a>
</div> </div>
<!--<div class="topic_left passive datarow"> <!--<div class="topic_left passive datarow">
<a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar" title="{{.Creator.Name}}'s Avatar" aria-hidden="true"/></a> <a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar" title="{{.Creator.Name}}'s Avatar" aria-hidden="true"></a>
<span class="topic_inner_left"> <span class="topic_inner_left">
<a class="rowtopic" href="{{.Link}}" itemprop="itemListElement" title="{{.Title}}"><span>{{.Title}}</span></a> <a class="rowtopic" href="{{.Link}}" itemprop="itemListElement" title="{{.Title}}"><span>{{.Title}}</span></a>
<br><a class="rowsmall starter" href="{{.Creator.Link}}" title="{{.Creator.Name}}">{{.Creator.Name}}</a> <br><a class="rowsmall starter" href="{{.Creator.Link}}" title="{{.Creator.Name}}">{{.Creator.Name}}</a>
@ -63,7 +63,7 @@
</div> </div>
<div class="topic_right passive datarow"> <div class="topic_right passive datarow">
<div class="topic_right_inside"> <div class="topic_right_inside">
<a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}" height=64 alt="Avatar" title="{{.LastUser.Name}}'s Avatar" aria-hidden="true"/></a> <a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}" height=64 alt="Avatar" title="{{.LastUser.Name}}'s Avatar" aria-hidden="true"></a>
<span> <span>
<a href="{{.LastUser.Link}}" class="lastName" style="font-size: 14px;" title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br> <a href="{{.LastUser.Link}}" class="lastName" style="font-size: 14px;" title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br>
<a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}" class="rowsmall lastReplyAt" title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a> <a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}" class="rowsmall lastReplyAt" title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a>

View File

@ -16,7 +16,7 @@
{{end}} {{end}}
</span> </span>
<span class="forum_right shift_right"> <span class="forum_right shift_right">
{{if .LastReplyer.MicroAvatar}}<img class="extra_little_row_avatar" src="{{.LastReplyer.MicroAvatar}}" height=64 width=64 alt="Avatar" title="{{.LastReplyer.Name}}'s Avatar" aria-hidden="true"/>{{end}} {{if .LastReplyer.MicroAvatar}}<img class="extra_little_row_avatar"src="{{.LastReplyer.MicroAvatar}}" height=64 width=64 alt="Avatar"title="{{.LastReplyer.Name}}'s Avatar"aria-hidden="true">{{end}}
<span> <span>
<a {{if .LastTopic.Link}}href="{{.LastTopic.Link}}"{{else}}class="forum_no_poster"{{end}}>{{if .LastTopic.Title}}{{.LastTopic.Title}}{{else}}{{lang "forums_none"}}{{end}}</a> <a {{if .LastTopic.Link}}href="{{.LastTopic.Link}}"{{else}}class="forum_no_poster"{{end}}>{{if .LastTopic.Title}}{{.LastTopic.Title}}{{else}}{{lang "forums_none"}}{{end}}</a>
{{if .LastTopicTime}}<br><span class="rowsmall" title="{{abstime .LastTopic.LastReplyAt}}">{{.LastTopicTime}}</span>{{end}} {{if .LastTopicTime}}<br><span class="rowsmall" title="{{abstime .LastTopic.LastReplyAt}}">{{.LastTopicTime}}</span>{{end}}

View File

@ -45,7 +45,7 @@
{{/** TODO: Make this a separate template and load it via the theme docks, here for now so we can rapidly prototype the Nox theme **/}} {{/** TODO: Make this a separate template and load it via the theme docks, here for now so we can rapidly prototype the Nox theme **/}}
{{if eq .Header.Theme.Name "nox"}} {{if eq .Header.Theme.Name "nox"}}
<div class="user_box"> <div class="user_box">
<img src="{{.CurrentUser.MicroAvatar}}"/> <img src="{{.CurrentUser.MicroAvatar}}">
<div class="option_box"> <div class="option_box">
<a href="{{.CurrentUser.Link}}"class="username">{{.CurrentUser.Name}}</a> <a href="{{.CurrentUser.Link}}"class="username">{{.CurrentUser.Name}}</a>
<span class="alerts">{{lang "alerts.no_alerts_short"}}</span> <span class="alerts">{{lang "alerts.no_alerts_short"}}</span>

View File

@ -14,7 +14,7 @@
</div> </div>
{{if .IP}}<div class="rowblock rowlist bgavatars micro_grid{{if .ItemList}} has_items{{end}}"> {{if .IP}}<div class="rowblock rowlist bgavatars micro_grid{{if .ItemList}} has_items{{end}}">
{{range .ItemList}}<div class="rowitem" style="background-image:url('{{.Avatar}}');"> {{range .ItemList}}<div class="rowitem" style="background-image:url('{{.Avatar}}');">
<img src="{{.Avatar}}" class="bgsub" alt="Avatar" aria-hidden="true"/> <img src="{{.Avatar}}"class="bgsub"alt="Avatar"aria-hidden="true">
<a class="rowTitle" href="{{.Link}}">{{.Name}}</a> <a class="rowTitle" href="{{.Link}}">{{.Name}}</a>
</div> </div>
{{else}}<div class="rowitem rowmsg">{{lang "ip_search_no_users"}}</div>{{end}} {{else}}<div class="rowitem rowmsg">{{lang "ip_search_no_users"}}</div>{{end}}

View File

@ -8,9 +8,9 @@
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_user_avatar"}}</a></div> <div class="formitem formlabel"><a>{{lang "panel_user_avatar"}}</a></div>
<div class="formitem avataritem"> <div class="formitem avataritem">
{{if .User.RawAvatar}}<img src="{{.User.Avatar}}" height=56 width=56 />{{end}} {{if .User.RawAvatar}}<img src="{{.User.Avatar}}" height=56 width=56>{{end}}
<div class="avatarbuttons"> <div class="avatarbuttons">
<input form="avatar_form" id="select_avatar" name="avatar_file" type="file" required class="auto_hide" /> <input form="avatar_form" id="select_avatar" name="avatar_file" type="file" required class="auto_hide"/>
<label for="select_avatar" class="formbutton">{{lang "panel_user_avatar_select"}}</label> <label for="select_avatar" class="formbutton">{{lang "panel_user_avatar_select"}}</label>
<button form="avatar_form" name="avatar_action" value=0>{{lang "panel_user_avatar_upload"}}</button> <button form="avatar_form" name="avatar_action" value=0>{{lang "panel_user_avatar_upload"}}</button>
{{if .User.RawAvatar}}<button form="remove_avatar_form" name="avatar_action" value=1>{{lang "panel_user_avatar_remove"}}</button>{{end}} {{if .User.RawAvatar}}<button form="remove_avatar_form" name="avatar_action" value=1>{{lang "panel_user_avatar_remove"}}</button>{{end}}
@ -19,11 +19,11 @@
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_user_name"}}</a></div> <div class="formitem formlabel"><a>{{lang "panel_user_name"}}</a></div>
<div class="formitem"><input form="user_form" name="name" type="text" value="{{.User.Name}}" placeholder="{{lang "panel_user_name_placeholder"}}" autocomplete="off" /></div> <div class="formitem"><input form="user_form" name="name" type="text" value="{{.User.Name}}" placeholder="{{lang "panel_user_name_placeholder"}}" autocomplete="off"/></div>
</div> </div>
{{if .CurrentUser.Perms.EditUserPassword}}<div class="formrow"> {{if .CurrentUser.Perms.EditUserPassword}}<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_user_password"}}</a></div> <div class="formitem formlabel"><a>{{lang "panel_user_password"}}</a></div>
<div class="formitem"><input form="user_form" name="password" type="password" placeholder="*****" autocomplete="off" /></div> <div class="formitem"><input form="user_form" name="password" type="password" placeholder="*****" autocomplete="off"/></div>
</div>{{end}} </div>{{end}}
{{if .CurrentUser.Perms.EditUserEmail}}<div class="formrow"> {{if .CurrentUser.Perms.EditUserEmail}}<div class="formrow">
<div class="formitem formlabel"><a>{{lang "panel_user_email"}}</a></div> <div class="formitem formlabel"><a>{{lang "panel_user_email"}}</a></div>

View File

@ -5,7 +5,7 @@
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem" style="background-image:url('{{.Avatar}}');"> <div class="rowitem" style="background-image:url('{{.Avatar}}');">
<a class="rowAvatar"{{if $.CurrentUser.Perms.EditUser}} href="/panel/users/edit/{{.ID}}"{{end}}> <a class="rowAvatar"{{if $.CurrentUser.Perms.EditUser}} href="/panel/users/edit/{{.ID}}"{{end}}>
<img class="bgsub" src="{{.Avatar}}" alt="Avatar" aria-hidden="true" /> <img class="bgsub"src="{{.Avatar}}"alt="Avatar"aria-hidden="true">
</a> </a>
<a class="rowTitle"{{if $.CurrentUser.Perms.EditUser}} href="/panel/users/edit/{{.ID}}"{{end}}>{{.Name}}</a> <a class="rowTitle"{{if $.CurrentUser.Perms.EditUser}} href="/panel/users/edit/{{.ID}}"{{end}}>{{.Name}}</a>
<span class="panel_floater"> <span class="panel_floater">

View File

@ -5,7 +5,7 @@
<div id="profile_left_pane" class="rowmenu"> <div id="profile_left_pane" class="rowmenu">
<div class="topBlock"> <div class="topBlock">
<div class="rowitem avatarRow"> <div class="rowitem avatarRow">
<a href="{{.ProfileOwner.Avatar}}"><img src="{{.ProfileOwner.Avatar}}" class="avatar" alt="Avatar" title="{{.ProfileOwner.Name}}'s Avatar" aria-hidden="true"/></a> <a href="{{.ProfileOwner.Avatar}}"><img src="{{.ProfileOwner.Avatar}}"class="avatar"alt="Avatar"title="{{.ProfileOwner.Name}}'s Avatar"aria-hidden="true"></a>
</div> </div>
<div class="rowitem nameRow"> <div class="rowitem nameRow">
<span class="profileName" title="{{.ProfileOwner.Name}}">{{.ProfileOwner.Name}}</span>{{if .ProfileOwner.Tag}}<span class="username" title="{{.ProfileOwner.Tag}}">{{.ProfileOwner.Tag}}</span>{{end}} <span class="profileName" title="{{.ProfileOwner.Name}}">{{.ProfileOwner.Name}}</span>{{if .ProfileOwner.Tag}}<span class="username" title="{{.ProfileOwner.Tag}}">{{.ProfileOwner.Tag}}</span>{{end}}

View File

@ -2,7 +2,7 @@
<div id="post-{{.ID}}" class="rowitem passive deletable_block editable_parent comment {{.ClassName}}"> <div id="post-{{.ID}}" class="rowitem passive deletable_block editable_parent comment {{.ClassName}}">
<div class="topRow"> <div class="topRow">
<div class="userbit"> <div class="userbit">
<img src="{{.MicroAvatar}}" alt="Avatar" title="{{.CreatedByName}}'s Avatar" aria-hidden="true" /> <img src="{{.MicroAvatar}}"alt="Avatar"title="{{.CreatedByName}}'s Avatar"aria-hidden="true">
<span class="nameAndTitle"> <span class="nameAndTitle">
<a href="{{.UserLink}}" class="real_username username">{{.CreatedByName}}</a> <a href="{{.UserLink}}" class="real_username username">{{.CreatedByName}}</a>
{{if .Tag}}<a class="username hide_on_mobile user_tag" style="float:right;">{{.Tag}}</a>{{end}} {{if .Tag}}<a class="username hide_on_mobile user_tag" style="float:right;">{{.Tag}}</a>{{end}}

View File

@ -62,7 +62,7 @@
<div class="show_on_edit attach_edit_bay" type="topic" id="{{.Topic.ID}}"> <div class="show_on_edit attach_edit_bay" type="topic" id="{{.Topic.ID}}">
{{range .Topic.Attachments}} {{range .Topic.Attachments}}
<div class="attach_item attach_item_item{{if .Image}} attach_image_holder{{end}}"> <div class="attach_item attach_item_item{{if .Image}} attach_image_holder{{end}}">
{{if .Image}}<img src="//{{$.Header.Site.URL}}/attachs/{{.Path}}?sid={{.SectionID}}&amp;stype=forums" height=24 width=24/>{{end}} {{if .Image}}<img src="//{{$.Header.Site.URL}}/attachs/{{.Path}}?sid={{.SectionID}}&amp;stype=forums" height=24 width=24>{{end}}
<span class="attach_item_path" aid="{{.ID}}" fullPath="//{{$.Header.Site.URL}}/attachs/{{.Path}}">{{.Path}}</span> <span class="attach_item_path" aid="{{.ID}}" fullPath="//{{$.Header.Site.URL}}/attachs/{{.Path}}">{{.Path}}</span>
<button class="attach_item_select">{{lang "topic.select_button_text"}}</button> <button class="attach_item_select">{{lang "topic.select_button_text"}}</button>
<button class="attach_item_copy">{{lang "topic.copy_button_text"}}</button> <button class="attach_item_copy">{{lang "topic.copy_button_text"}}</button>
@ -70,7 +70,7 @@
{{end}} {{end}}
<div class="attach_item attach_item_buttons"> <div class="attach_item attach_item_buttons">
{{if .CurrentUser.Perms.UploadFiles}} {{if .CurrentUser.Perms.UploadFiles}}
<input name="upload_files" id="upload_files_op" multiple type="file" class="auto_hide" /> <input name="upload_files" id="upload_files_op" multiple type="file" class="auto_hide"/>
<label for="upload_files_op" class="formbutton add_file_button">{{lang "topic.upload_button_text"}}</label>{{end}} <label for="upload_files_op" class="formbutton add_file_button">{{lang "topic.upload_button_text"}}</label>{{end}}
<button class="attach_item_delete formbutton">{{lang "topic.delete_button_text"}}</button> <button class="attach_item_delete formbutton">{{lang "topic.delete_button_text"}}</button>
</div> </div>

View File

@ -9,10 +9,10 @@
<div class="edit_source auto_hide">{{.Content}}</div> <div class="edit_source auto_hide">{{.Content}}</div>
{{if $.CurrentUser.Perms.EditReply}} {{if $.CurrentUser.Perms.EditReply}}
<div class="show_on_block_edit attach_edit_bay" type="reply" id="{{.ID}}"> <div class="show_on_block_edit attach_edit_bay"type="reply"id="{{.ID}}">
{{range .Attachments}} {{range .Attachments}}
<div class="attach_item attach_item_item{{if .Image}} attach_image_holder{{end}}"> <div class="attach_item attach_item_item{{if .Image}} attach_image_holder{{end}}">
{{if .Image}}<img src="//{{$.Header.Site.URL}}/attachs/{{.Path}}?sid={{.SectionID}}&amp;stype=forums" height=24 width=24 />{{end}} {{if .Image}}<img src="//{{$.Header.Site.URL}}/attachs/{{.Path}}?sid={{.SectionID}}&amp;stype=forums"height=24 width=24>{{end}}
<span class="attach_item_path" aid={{.ID}} fullPath="//{{$.Header.Site.URL}}/attachs/{{.Path}}">{{.Path}}</span> <span class="attach_item_path" aid={{.ID}} fullPath="//{{$.Header.Site.URL}}/attachs/{{.Path}}">{{.Path}}</span>
<button class="attach_item_select">{{lang "topic.select_button_text"}}</button> <button class="attach_item_select">{{lang "topic.select_button_text"}}</button>
<button class="attach_item_copy">{{lang "topic.copy_button_text"}}</button> <button class="attach_item_copy">{{lang "topic.copy_button_text"}}</button>

View File

@ -1,6 +1,6 @@
<div class="rowblock topic_reply_container"> <div class="rowblock topic_reply_container">
<div class="userinfo" aria-label="{{lang "topic.your_information"}}"> <div class="userinfo" aria-label="{{lang "topic.your_information"}}">
<img class="aitem" src="{{.CurrentUser.Avatar}}" alt="Avatar"> <img class="aitem"src="{{.CurrentUser.Avatar}}"alt="Avatar">
<div class="user_meta"> <div class="user_meta">
<a href="{{.CurrentUser.Link}}" class="the_name" rel="author">{{.CurrentUser.Name}}</a> <a href="{{.CurrentUser.Link}}" class="the_name" rel="author">{{.CurrentUser.Name}}</a>
<div class="tag_block"> <div class="tag_block">
@ -12,8 +12,8 @@
</div> </div>
<div class="rowblock topic_reply_form quick_create_form" aria-label="{{lang "topic.reply_aria"}}"> <div class="rowblock topic_reply_form quick_create_form" aria-label="{{lang "topic.reply_aria"}}">
<form id="quick_post_form" enctype="multipart/form-data" action="/reply/create/?s={{.CurrentUser.Session}}" method="post"></form> <form id="quick_post_form" enctype="multipart/form-data" action="/reply/create/?s={{.CurrentUser.Session}}" method="post"></form>
<input form="quick_post_form" name="tid" value='{{.Topic.ID}}' type="hidden" /> <input form="quick_post_form" name="tid" value='{{.Topic.ID}}' type="hidden"/>
<input form="quick_post_form" id="has_poll_input" name="has_poll" value=0 type="hidden" /> <input form="quick_post_form" id="has_poll_input" name="has_poll" value=0 type="hidden"/>
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem"> <div class="formitem">
<textarea id="input_content" form="quick_post_form" name="content" placeholder="{{lang "topic.reply_content_alt"}}" required></textarea> <textarea id="input_content" form="quick_post_form" name="content" placeholder="{{lang "topic.reply_content_alt"}}" required></textarea>
@ -22,9 +22,9 @@
<div class="formrow poll_content_row auto_hide"> <div class="formrow poll_content_row auto_hide">
<div class="formitem"> <div class="formitem">
<div class="pollinput" data-pollinput=0> <div class="pollinput" data-pollinput=0>
<input type="checkbox" disabled /> <input type="checkbox" disabled/>
<label class="pollinputlabel"></label> <label class="pollinputlabel"></label>
<input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="{{lang "topic.reply_add_poll_option_first"}}" /> <input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="{{lang "topic.reply_add_poll_option_first"}}"/>
</div> </div>
</div> </div>
</div> </div>
@ -33,7 +33,7 @@
<button form="quick_post_form" name="reply-button" class="formbutton">{{lang "topic.reply_button"}}</button> <button form="quick_post_form" name="reply-button" class="formbutton">{{lang "topic.reply_button"}}</button>
<button form="quick_post_form" class="formbutton" id="add_poll_button">{{lang "topic.reply_add_poll_button"}}</button> <button form="quick_post_form" class="formbutton" id="add_poll_button">{{lang "topic.reply_add_poll_button"}}</button>
{{if .CurrentUser.Perms.UploadFiles}} {{if .CurrentUser.Perms.UploadFiles}}
<input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" class="auto_hide" /> <input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" class="auto_hide"/>
<label for="upload_files" class="formbutton add_file_button">{{lang "topic.reply_add_file_button"}}</label> <label for="upload_files" class="formbutton add_file_button">{{lang "topic.reply_add_file_button"}}</label>
<div id="upload_file_dock"></div>{{end}} <div id="upload_file_dock"></div>{{end}}
</div> </div>

View File

@ -1,8 +1,7 @@
<div class="userinfo" aria-label="{{lang "topic.userinfo_aria"}}"> <div class="userinfo"aria-label="{{lang "topic.userinfo_aria"}}">
<!--<div class="avatar_item" style="background-image:url({{.Avatar}}),url(/s/white-dot.jpg);">&nbsp;</div>-->
<img class="aitem"src="{{.Avatar}}"alt="Avatar"> <img class="aitem"src="{{.Avatar}}"alt="Avatar">
<div class="user_meta"> <div class="user_meta">
<a href="{{.UserLink}}" class="the_name" rel="author">{{.CreatedByName}}</a> <a href="{{.UserLink}}"class="the_name"rel="author">{{.CreatedByName}}</a>
<div class="tag_block"> <div class="tag_block">
<div class="tag_pre"></div> <div class="tag_pre"></div>
{{if .Tag}}<div class="post_tag">{{.Tag}}</div>{{else}}<div class="post_tag post_level">{{level .Level}}</div>{{end}} {{if .Tag}}<div class="post_tag">{{.Tag}}</div>{{else}}<div class="post_tag post_level">{{level .Level}}</div>{{end}}

View File

@ -1,4 +1,4 @@
{{if .ImgSrc}}<img src='{{.ImgSrc}}' height=24 width=24/>{{end}} {{if .ImgSrc}}<img src='{{.ImgSrc}}'height=24 width=24>{{end}}
<span class='attach_item_path' aid='{{.ID}}' fullpath='{{.FullPath}}'>{{.Path}}</span> <span class='attach_item_path'aid='{{.ID}}'fullpath='{{.FullPath}}'>{{.Path}}</span>
<button class='attach_item_select'>{{lang "topic.select_button_text"}}</button> <button class='attach_item_select'>{{lang "topic.select_button_text"}}</button>
<button class='attach_item_copy'>{{lang "topic.copy_button_text"}}</button> <button class='attach_item_copy'>{{lang "topic.copy_button_text"}}</button>

View File

@ -44,7 +44,7 @@
</div> </div>
<div class="pane_body"> <div class="pane_body">
<div class="pane_table"> <div class="pane_table">
{{range .ForumList}}<div id="mover_fid_{{.ID}}" data-fid="{{.ID}}" class="pane_row">{{.Name}}</div>{{end}} {{range .ForumList}}<div id="mover_fid_{{.ID}}"data-fid="{{.ID}}"class="pane_row">{{.Name}}</div>{{end}}
</div> </div>
</div> </div>
<div class="pane_buttons"> <div class="pane_buttons">
@ -54,7 +54,7 @@
</div> </div>
<div class="rowblock topic_create_form quick_create_form auto_hide" aria-label="{{lang "quick_topic.aria"}}"> <div class="rowblock topic_create_form quick_create_form auto_hide" aria-label="{{lang "quick_topic.aria"}}">
<form name="topic_create_form_form"id="quick_post_form" enctype="multipart/form-data"action="/topic/create/submit/?s={{.CurrentUser.Session}}" method="post"></form> <form name="topic_create_form_form"id="quick_post_form" enctype="multipart/form-data"action="/topic/create/submit/?s={{.CurrentUser.Session}}" method="post"></form>
<img class="little_row_avatar" src="{{.CurrentUser.MicroAvatar}}" height=64 alt="{{lang "quick_topic.avatar_alt"}}" title="{{lang "quick_topic.avatar_tooltip"}}"/> <img class="little_row_avatar"src="{{.CurrentUser.MicroAvatar}}" height=64 alt="{{lang "quick_topic.avatar_alt"}}" title="{{lang "quick_topic.avatar_tooltip"}}">
<div class="main_form"> <div class="main_form">
<div class="topic_meta"> <div class="topic_meta">
<div class="formrow topic_board_row real_first_child"> <div class="formrow topic_board_row real_first_child">
@ -74,7 +74,7 @@
{{end}} {{end}}
{{end}} {{end}}
<div class="rowblock more_topic_block more_topic_block_initial"> <div class="rowblock more_topic_block more_topic_block_initial">
<div class="rowitem rowmsg"><a href="" class="more_topics"></a></div> <div class="rowitem rowmsg"><a href=""class="more_topics"></a></div>
</div> </div>
<div id="topic_list" class="rowblock topic_list topic_list_{{.Sort.SortBy}}" aria-label="{{lang "topics_list_aria"}}"> <div id="topic_list" class="rowblock topic_list topic_list_{{.Sort.SortBy}}" aria-label="{{lang "topics_list_aria"}}">
{{range .TopicList}}{{template "topics_topic.html" . }}{{else}}<div class="rowitem passive rowmsg">{{lang "topics_no_topics"}}{{if .CurrentUser.Loggedin}}{{if .CurrentUser.Perms.CreateTopic}}&nbsp;<a href="/topics/create/">{{lang "topics_start_one"}}</a>{{end}}{{end}}</div>{{end}} {{range .TopicList}}{{template "topics_topic.html" . }}{{else}}<div class="rowitem passive rowmsg">{{lang "topics_no_topics"}}{{if .CurrentUser.Loggedin}}{{if .CurrentUser.Perms.CreateTopic}}&nbsp;<a href="/topics/create/">{{lang "topics_start_one"}}</a>{{end}}{{end}}</div>{{end}}

View File

@ -1,7 +1,7 @@
<div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}" data-tid="{{.ID}}"> <div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}" data-tid="{{.ID}}">
<div class="rowitem topic_left passive datarow"> <div class="rowitem topic_left passive datarow">
<span class="selector"></span> <span class="selector"></span>
<a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"/></a> <a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"></a>
<span class="topic_inner_left"> <span class="topic_inner_left">
<a class="rowtopic"href="{{.Link}}"itemprop="itemListElement" title="{{.Title}}"><span>{{.Title}}</span></a> {{if .ForumName}}<a class="rowsmall parent_forum"href="{{.ForumLink}}"title="{{.ForumName}}">{{.ForumName}}</a>{{end}} <a class="rowtopic"href="{{.Link}}"itemprop="itemListElement" title="{{.Title}}"><span>{{.Title}}</span></a> {{if .ForumName}}<a class="rowsmall parent_forum"href="{{.ForumLink}}"title="{{.ForumName}}">{{.ForumName}}</a>{{end}}
<br><a class="rowsmall starter"href="{{.Creator.Link}}"title="{{.Creator.Name}}">{{.Creator.Name}}</a> <br><a class="rowsmall starter"href="{{.Creator.Link}}"title="{{.Creator.Name}}">{{.Creator.Name}}</a>
@ -24,7 +24,7 @@
</div> </div>
<div class="rowitem topic_right passive datarow"> <div class="rowitem topic_right passive datarow">
<div class="topic_right_inside"> <div class="topic_right_inside">
<a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}" height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar" aria-hidden="true"/></a> <a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}" height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar" aria-hidden="true"></a>
<span> <span>
<a href="{{.LastUser.Link}}" class="lastName" title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br> <a href="{{.LastUser.Link}}" class="lastName" title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br>
<a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}" class="rowsmall lastReplyAt" title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a> <a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}" class="rowsmall lastReplyAt" title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a>

View File

@ -3,8 +3,8 @@
</div> </div>
<div class="rowblock rowlist bgavatars not_grid widget_online"> <div class="rowblock rowlist bgavatars not_grid widget_online">
{{if lt .UserCount 30}} {{if lt .UserCount 30}}
{{range .Users}}<div class="rowitem" style="background-image:url('{{.Avatar}}');"> {{range .Users}}<div class="rowitem"style="background-image:url('{{.Avatar}}');">
<img src="{{.Avatar}}" class="bgsub" alt="Avatar" aria-hidden="true" /> <img src="{{.Avatar}}"class="bgsub"alt="Avatar"aria-hidden="true">
<a class="rowTitle" href="{{.Link}}">{{.Name}}</a> <a class="rowTitle" href="{{.Link}}">{{.Name}}</a>
</div> </div>
{{else}}<div class="rowitem rowmsg">{{lang "widget.online_none_online"}}</div>{{end}} {{else}}<div class="rowitem rowmsg">{{lang "widget.online_none_online"}}</div>{{end}}

View File

@ -1,6 +1,6 @@
<div class="above_right"> <div class="above_right">
<div class="left_bit"><a href="/">{{lang "panel_back_to_site"}}</a></div> <div class="left_bit"><a href="/">{{lang "panel_back_to_site"}}</a></div>
<div class="right_bit"> <div class="right_bit">
<img src="{{.CurrentUser.MicroAvatar}}" height=32 width=32 /> <img src="{{.CurrentUser.MicroAvatar}}" height=32 width=32>
<span>{{lang "panel_welcome"}}{{.CurrentUser.Name}}</span></div> <span>{{lang "panel_welcome"}}{{.CurrentUser.Name}}</span></div>
</div> </div>

View File

@ -1,8 +1,8 @@
<div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}"data-tid={{.ID}}> <div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}"data-tid={{.ID}}>
<div class="rowitem topic_left passive datarow"> <div class="rowitem topic_left passive datarow">
<a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"/></a> <a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}" height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"></a>
<span class="topic_inner_left"> <span class="topic_inner_left">
<span class="rowtopic"itemprop="itemListElement"title="{{.Title}}"><a href="{{.Link}}">{{.Title}}</a>{{if .ForumName}}<a class="parent_forum_sep">-</a><a href="{{.ForumLink}}" title="{{.ForumName}}" class="rowsmall parent_forum">{{.ForumName}}</a>{{end}}</span> <span class="rowtopic"itemprop="itemListElement"title="{{.Title}}"><a href="{{.Link}}">{{.Title}}</a>{{if .ForumName}}<a class="parent_forum_sep">-</a><a href="{{.ForumLink}}"title="{{.ForumName}}"class="rowsmall parent_forum">{{.ForumName}}</a>{{end}}</span>
<br><a class="rowsmall starter"href="{{.Creator.Link}}"title="{{.Creator.Name}}">{{.Creator.Name}}</a> <br><a class="rowsmall starter"href="{{.Creator.Link}}"title="{{.Creator.Name}}">{{.Creator.Name}}</a>
</span> </span>
</div> </div>
@ -15,7 +15,7 @@
</div> </div>
<div class="rowitem topic_right passive datarow"> <div class="rowitem topic_right passive datarow">
<div class="topic_right_inside"> <div class="topic_right_inside">
<a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}" height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar"aria-hidden="true"/></a> <a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}" height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar"aria-hidden="true"></a>
<span> <span>
<a href="{{.LastUser.Link}}"class="lastName"title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br> <a href="{{.LastUser.Link}}"class="lastName"title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br>
<a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}"class="rowsmall lastReplyAt"title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a> <a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}"class="rowsmall lastReplyAt"title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a>