gosora/templates/topic.html

107 lines
8.5 KiB
HTML
Raw Normal View History

2016-12-02 07:38:54 +00:00
{{template "header.html" . }}
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
Added support for HTTP/2 Push. The themes are still going to be a little broken for a while, but here's the progress I've made. Renamed the topics_trow_assign hook to topics_topic_row_assign. Added more debug code to the generated router. Added a robots.txt file. Gosora now responds to favicon.ico requests with a 404 rather than the topic list. Fixed the tests and some of the benchmarks. Changed the default UserCacheCapacity from 100 to 120. Changed the default TopicCacheCapacity from 100 to 200. Added the last replyer to the topics list and the forum pages. Added the BulkCascadeGetMap method to the UserStore. Refactored the topics list and forum page to load the users with a call to the UserStore rather than via a join. WebSockets now work on SSL. Fixed a race condition when the user permissions are initialised at the start of a request. Fixed a race condition when the user permissions for the OP of a topic are initialised. The rows.Close() calls are deferred once more, so that we can catch problems with recover() Improved support for struct pointers in the template compiler. Added a pin emoji to pinned topics to make them stand-out on the Shadow theme, we have some other ideas in mind for this, but I'd like to get Shadow fully functional for this commit. Fixed a bug an issue with Chrome not detecting XHTML style closes on <form>s. Fixed a visual issue with `color` not being set for textarea elements for the Shadow theme. Fixed a function which wasn't getting renamed for PGSQL. Added seven new UserStore tests.
2017-08-06 15:22:18 +00:00
<form id="edit_topic_form" action='/topic/edit/submit/{{.Topic.ID}}' method="post"></form>
{{if gt .Page 1}}<link rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}" />
<div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="Go to the previous page" rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}">&lt;</a></div>{{end}}
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
{{if ne .LastPage .Page}}<link rel="prerender next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}" />
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
<div id="nextFloat" class="next_button">
<a class="next_link" aria-label="Go to the next page" rel="next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}">&gt;</a>
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
</div>{{end}}
<main>
<div class="rowblock rowhead topic_block" aria-label="The opening post of this topic">
<div class="rowitem topic_item{{if .Topic.Sticky}} topic_sticky_head{{else if .Topic.IsClosed}} topic_closed_head{{end}}">
<h1 class='topic_name hide_on_edit'>{{.Topic.Title}}</h1>
{{if .Topic.IsClosed}}<span class='username hide_on_micro topic_status_e topic_status_closed hide_on_edit' title='Status: Closed'>&#x1F512;&#xFE0E</span>{{end}}
{{if .CurrentUser.Perms.EditTopic}}
<input form='edit_topic_form' class='show_on_edit topic_name_input' name="topic_name" value='{{.Topic.Title}}' type="text" />
<button form='edit_topic_form' name="topic-button" class="formbutton show_on_edit submit_edit">Update</button>
{{end}}
</div>
2016-12-02 07:38:54 +00:00
</div>
<article itemscope itemtype="http://schema.org/CreativeWork" class="rowblock post_container top_post" aria-label="The opening post for this topic">
<div class="rowitem passive editable_parent post_item {{.Topic.ClassName}}" style="background-image: url({{.Topic.Avatar}}), url(/static/{{.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .Topic.ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;">
<p class="hide_on_edit topic_content user_content" itemprop="text" style="margin:0;padding:0;">{{.Topic.ContentHTML}}</p>
<textarea name="topic_content" class="show_on_edit topic_content_input">{{.Topic.Content}}</textarea>
<span class="controls" aria-label="Controls and Author Information">
<a href="{{.Topic.UserLink}}" class="username real_username" rel="author">{{.Topic.CreatedByName}}</a>&nbsp;&nbsp;
{{if .CurrentUser.Perms.LikeItem}}<a href="/topic/like/submit/{{.Topic.ID}}" class="mod_button" title="Love it" {{if .Topic.Liked}}aria-label="Unlike this topic"{{else}}aria-label="Like this topic"{{end}} style="color:#202020;">
<button class="username like_label"{{if .Topic.Liked}} style="background-color:#D6FFD6;"{{end}}></button></a>{{end}}
{{if .CurrentUser.Perms.EditTopic}}<a href='/topic/edit/{{.Topic.ID}}' class="mod_button open_edit" style="font-weight:normal;" title="Edit Topic" aria-label="Edit this topic"><button class="username edit_label"></button></a>{{end}}
{{if .CurrentUser.Perms.DeleteTopic}}<a href='/topic/delete/submit/{{.Topic.ID}}' class="mod_button" style="font-weight:normal;" title="Delete Topic" aria-label="Delete this topic"><button class="username trash_label"></button></a>{{end}}
{{if .CurrentUser.Perms.CloseTopic}}{{if .Topic.IsClosed}}<a class="mod_button" href='/topic/unlock/submit/{{.Topic.ID}}' style="font-weight:normal;" title="Unlock Topic" aria-label="Unlock this topic"><button class="username unlock_label"></button></a>{{else}}<a href='/topic/lock/submit/{{.Topic.ID}}' class="mod_button" style="font-weight:normal;" title="Lock Topic" aria-label="Lock this topic"><button class="username lock_label"></button></a>{{end}}{{end}}
{{if .CurrentUser.Perms.PinTopic}}{{if .Topic.Sticky}}<a class="mod_button" href='/topic/unstick/submit/{{.Topic.ID}}' style="font-weight:normal;" title="Unpin Topic" aria-label="Unpin this topic"><button class="username unpin_label"></button></a>{{else}}<a href='/topic/stick/submit/{{.Topic.ID}}' class="mod_button" style="font-weight:normal;" title="Pin Topic" aria-label="Pin this topic"><button class="username pin_label"></button></a>{{end}}{{end}}
{{if .CurrentUser.Perms.ViewIPs}}<a class="mod_button" href='/users/ips/?ip={{.Topic.IPAddress}}' style="font-weight:normal;" title="View IP" aria-label="The poster's IP is {{.Topic.IPAddress}}"><button class="username ip_label"></button></a>{{end}}
<a href="/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class="mod_button report_item" style="font-weight:normal;" title="Flag this topic" aria-label="Flag this topic" rel="nofollow"><button class="username flag_label"></button></a>
{{if .Topic.LikeCount}}<a class="username hide_on_micro like_count" aria-label="The number of likes on this topic">{{.Topic.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>{{end}}
{{if .Topic.Tag}}<a class="username hide_on_micro user_tag">{{.Topic.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="The poster's level">{{.Topic.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="Level"></a>{{end}}
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
</span>
2016-12-02 07:38:54 +00:00
</div>
</article>
<div class="rowblock post_container" aria-label="The current page for this topic" style="overflow: hidden;">{{range .ItemList}}{{if .ActionType}}
<article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item action_item">
<span class="action_icon" style="font-size: 18px;padding-right: 5px;">{{.ActionIcon}}</span>
<span itemprop="text">{{.ActionType}}</span>
</article>
{{else}}
<article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item {{.ClassName}}" style="background-image: url({{.Avatar}}), url(/static/{{$.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;">
{{/** TODO: We might end up with <br>s in the inline editor, fix this **/}}
<p class="editable_block user_content" itemprop="text" style="margin:0;padding:0;">{{.ContentHtml}}</p>
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
<span class="controls">
<a href="{{.UserLink}}" class="username real_username" rel="author">{{.CreatedByName}}</a>&nbsp;&nbsp;
{{if $.CurrentUser.Perms.LikeItem}}<a href="/reply/like/submit/{{.ID}}" class="mod_button" title="Love it" style="color:#202020;"><button class="username like_label"{{if .Liked}} style="background-color:#D6FFD6;"{{end}}></button></a>{{end}}
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
{{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}" class="mod_button" title="Edit Reply"><button class="username edit_item edit_label"></button></a>{{end}}
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
{{if $.CurrentUser.Perms.DeleteReply}}<a href="/reply/delete/submit/{{.ID}}" class="mod_button" title="Delete Reply"><button class="username delete_item trash_label"></button></a>{{end}}
{{if $.CurrentUser.Perms.ViewIPs}}<a class="mod_button" href='/users/ips/?ip={{.IPAddress}}' style="font-weight:normal;" title="View IP"><button class="username ip_label"></button></a>{{end}}
<a href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=reply" class="mod_button report_item" title="Flag this reply" aria-label="Flag this reply" rel="nofollow"><button class="username report_item flag_label"></button></a>
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
{{if .LikeCount}}<a class="username hide_on_micro like_count">{{.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>{{end}}
{{if .Tag}}<a class="username hide_on_micro user_tag">{{.Tag}}</a>{{else}}<a class="username hide_on_micro level">{{.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="Level"></a>{{end}}
Happy 100th commit! For the 100th commit, I've revamped a good portion of the user interface, and we don't plan on stopping! There's more to come! Each theme has more of a distinct feel in the control panel now. I moved a large portion of the inline CSS into global.css, tweaked some core code which didn't line up, and added CSS text insertions to make things more flexible. Revamped the alerts interface. We have more changes coming up! Added screenshots for Tempra Cursive and Tempra Conflux Mobile to the README. Added a .htaccess file, just in case someone plops Gosora in Apache's /www/ folder to stop the contents of config.go from becoming publically visible. Never put Gosora in your /www/ folder, Gosora is a standalone program which does NOT use Apache or any other webserver. Fixed a bug in the inline forum editor. Added a hand-written Markdown parser which is much faster than the previous Regex based one. This is still a work in progress. Added support for strikethrough and underline elements to the Markdown parser. Fixed the missing semicolons in global.js Revamped the form CSS. Author bits on the theme manager now link to the author's website. Improved the profiles a little. The code in the stylesheets now have a more consistent style. Fixed a bug in the Cosmo theme relating to the fact that Gosora doesn't have sidebars yet. There are many more changes which aren't listed here. If weirdness regarding lines or spacing occurs, I'm experimenting with a new text editor. I hope to have this fixed by the next commit.
2017-05-29 14:52:37 +00:00
</span>
</article>
{{end}}{{end}}</div>
{{if .CurrentUser.Perms.CreateReply}}
<div class="rowblock topic_reply_form quick_create_form">
<form id="reply_form" enctype="multipart/form-data" action="/reply/create/" method="post"></form>
<input form="reply_form" name="tid" value='{{.Topic.ID}}' type="hidden" />
<div class="formrow real_first_child">
<div class="formitem">
<textarea id="input_content" form="reply_form" name="reply-content" placeholder="Insert reply here" required></textarea>
2016-12-02 07:38:54 +00:00
</div>
</div>
<div class="formrow quick_button_row">
<div class="formitem">
<button form="reply_form" name="reply-button" class="formbutton">Create Reply</button>
{{if .CurrentUser.Perms.UploadFiles}}
<input name="upload_files" form="reply_form" id="upload_files" multiple type="file" style="display: none;" />
<label for="upload_files" class="formbutton add_file_button">Add File</label>
<div id="upload_file_dock"></div>{{end}}
2016-12-02 07:38:54 +00:00
</div>
</div>
2016-12-02 07:38:54 +00:00
</div>
{{end}}
</main>
{{template "footer.html" . }}