diff --git a/js/expand.js b/js/expand.js index 0fa8de05..65bcd755 100644 --- a/js/expand.js +++ b/js/expand.js @@ -13,37 +13,38 @@ * */ -$(document).ready(function(){ - if($('span.omitted').length == 0) - return; // nothing to expand +$(document).ready(function() { + if ($('span.omitted').length === 0) { + // Nothing to expand. + return; + } - var do_expand = function() { + let doExpand = function() { $(this) - .html($(this).text().replace(_("Click reply to view."), ''+_("Click to expand")+'.')) - .find('a').click(window.expand_fun = function() { - var thread = $(this).parents('[id^="thread_"]'); - var id = thread.attr('id').replace(/^thread_/, ''); + .html($(this).text().concat(' ' + _("Click to expand") + '.')) + .find('a').click(window.expandFun = function() { + let thread = $(this).parents('[id^="thread_"]'); $.ajax({ url: thread.find('p.intro a.post_no:first').attr('href'), context: document.body, success: function(data) { - var last_expanded = false; + let lastExpanded = false; $(data).find('div.post.reply').each(function() { thread.find('div.hidden').remove(); - var post_in_doc = thread.find('#' + $(this).attr('id')); - if(post_in_doc.length == 0) { - if(last_expanded) { - $(this).addClass('expanded').insertAfter(last_expanded).before('
'); + let postInDoc = thread.find('#' + $(this).attr('id')); + if (postInDoc.length === 0) { + if (lastExpanded) { + $(this).addClass('expanded').insertAfter(lastExpanded).before('
'); } else { $(this).addClass('expanded').insertAfter(thread.find('div.post:first')).after('
'); } - last_expanded = $(this); + lastExpanded = $(this); $(document).trigger('new_post', this); } else { - last_expanded = post_in_doc; + lastExpanded = postInDoc; } }); - + thread.find("span.omitted").css('display', 'none'); @@ -51,19 +52,20 @@ $(document).ready(function(){ .insertAfter(thread.find('.op div.body, .op span.omitted').last()) .click(function() { thread.find('.expanded').remove(); - $(this).parent().find(".omitted:not(.hide-expanded)").css('display', ''); - $(this).parent().find(".hide-expanded").remove(); + let parent = $(this).parent(); + parent.find(".omitted:not(.hide-expanded)").css('display', ''); + parent.find(".hide-expanded").remove(); }); } }); }); } - $('div.post.op span.omitted').each(do_expand); + $('div.post.op span.omitted').each(doExpand); $(document).on("new_post", function(e, post) { if (!$(post).hasClass("reply")) { - $(post).find('div.post.op span.omitted').each(do_expand); + $(post).find('div.post.op span.omitted').each(doExpand); } }); }); diff --git a/js/live-index.js b/js/live-index.js index 017d0c1f..3a1611d3 100644 --- a/js/live-index.js +++ b/js/live-index.js @@ -1,16 +1,16 @@ -/* +/* * live-index.js * https://github.com/vichan-devel/Tinyboard/blob/master/js/live-index.js - * + * * Released under the MIT license * Copyright (c) 2014 Marcin Ɓabanowski - * + * * Usage: * $config['api']['enabled'] = true; * $config['additional_javascript'][] = 'js/jquery.min.js'; * $config['additional_javascript'][] = 'js/expand.js'; * $config['additional_javascript'][] = 'js/live-index.js'; - * + * */ if (active_page == 'index' && (""+document.location).match(/\/(index\.html)?(\?|$|#)/)) @@ -85,7 +85,7 @@ if (active_page == 'index' && (""+document.location).match(/\/(index\.html)?(\?| if ($(th).find(".new-posts").html() != msg) { $(th).find(".new-posts").html(msg); - $(th).find(".new-posts a").click(window.expand_fun); + $(th).find(".new-posts a").click(window.expandFun); } }; diff --git a/js/show-backlinks.js b/js/show-backlinks.js index 8fdb7ae9..b52ef801 100644 --- a/js/show-backlinks.js +++ b/js/show-backlinks.js @@ -29,9 +29,9 @@ $(document).ready(function() { if(post.length == 0) return; - let mentioned = post.find('.head span.mentioned'); + let mentioned = post.find('.head div.mentioned'); if (mentioned.length === 0) { - mentioned = $('').prependTo(post.find('.head')); + mentioned = $('
').prependTo(post.find('.head')); } if (mentioned.find('a.mentioned-' + replyId).length !== 0) { diff --git a/stylesheets/8ch.cyber.css b/stylesheets/8ch.cyber.css index 579c9cb5..c94c50e8 100644 --- a/stylesheets/8ch.cyber.css +++ b/stylesheets/8ch.cyber.css @@ -18,7 +18,7 @@ form table tr td { display: table; position: fixed; width: 100%; - left: 0px; + left: 0px; z-index: 3; background-color: #35363b; border-color: #39d958; @@ -175,7 +175,7 @@ background-color: #2b2b2b; form table { max-width: 500px; min-width: 100% - + display: inline-block; margin: 5px auto; background-color: #2b2b2b; @@ -293,7 +293,7 @@ background-color: #1A1A1A; border-bottom: double 3px #989898 !important; position:fixed; } - + /*favorites in a new line*/ div.boardlist span.favorite-boards { display: ; @@ -386,7 +386,7 @@ max-width: 50%; } span.subject:after { content: '\A'; white-space:pre; } -SPAN.controls.op:before { content: '\A'; white-space:pre; } +div.controls.op:before { content: '\A'; white-space:pre; } a:visited {color: #97094b} @@ -411,7 +411,7 @@ max-width: 50%; } span.subject:after { content: '\A'; white-space:pre; } -SPAN.controls.op:before { content: '\A'; white-space:pre; } +div.controls.op:before { content: '\A'; white-space:pre; } a:visited {color: #97094b} diff --git a/stylesheets/dark_roach.css b/stylesheets/dark_roach.css index 89e050d4..65938f76 100644 --- a/stylesheets/dark_roach.css +++ b/stylesheets/dark_roach.css @@ -235,17 +235,17 @@ br.clear { clear: left; display: block; } -span.controls { +div.controls { float: right; margin: 0; padding: 0; font-size: 80%; } -span.controls.op { +div.controls.op { float: none; margin-left: 10px; } -span.controls a { +div.controls a { margin: 0; } div#wrap { @@ -465,7 +465,7 @@ background: #333333; border: 1px solid #666666; color: #999999; } -input[type="submit"]:hover +input[type="submit"]:hover { color: #9999CC; } diff --git a/stylesheets/lainchanjp.css b/stylesheets/lainchanjp.css index 461f9de6..0c63cb44 100644 --- a/stylesheets/lainchanjp.css +++ b/stylesheets/lainchanjp.css @@ -1,4 +1,4 @@ -/* +/* Thank you very much the wonderful CSS lainchan.jp Developers , whose CSS theme was the orginal inspiration for this file . It is was removed from CSS theme list at their request, and is included here as a derivative work licensed under fair use, with at least 40% of the file being different so that lainons can use it as user CSS if they like. @@ -346,18 +346,18 @@ br.clear { clear: left; display: block; } -span.controls { +div.controls { float: right !important; clear: none !important; margin: 0; padding: 0; font-size: 80%; } -span.controls.op { +div.controls.op { float: none; margin-left: 10px; } -span.controls a { +div.controls a { margin: 0; } div#wrap { diff --git a/stylesheets/luna.css b/stylesheets/luna.css index e2fd6528..8e019fd6 100644 --- a/stylesheets/luna.css +++ b/stylesheets/luna.css @@ -238,17 +238,17 @@ br.clear { clear: left; display: block; } -span.controls { +div.controls { float: right; margin: 0; padding: 0; font-size: 80%; } -span.controls.op { +div.controls.op { float: none; margin-left: 10px; } -span.controls a { +div.controls a { margin: 0; } div#wrap { diff --git a/stylesheets/mono.e.lain.css b/stylesheets/mono.e.lain.css index b65c79e6..f09e93b9 100644 --- a/stylesheets/mono.e.lain.css +++ b/stylesheets/mono.e.lain.css @@ -1,38 +1,38 @@ /*monoelains ez css for VIP quality imageboards. steal this .css and edit it to your liking. */ - + /* OPTION HIDING */ - + /*lainchan bottom bar fix*/ .bar{ background-color: #CDCDCD!important; } - + /*removes footer (STI pls dont sue) footer { display:none; color: #ffffff; } - + /* hides AA in catalog */ .theme-catalog span.aa { display: none !important; } - + /* hides expand all images */ #expand-all-images { display: none; } - + /* hides hints*/ .hint { } - + /* hides horizontal bar */ hr { display: none; } - + /*banner stuff*/ img.banner, img.board_image { border: 8px ridge #B18108; @@ -42,23 +42,23 @@ box-shadow: 7px 7px rgba(0, 0, 0, 0.5); margin: 30px auto 0px; } - + /* hides delete options (obsolete) */ div.delete { display: none; } - + /*makes files align vertically (hw pls fix this shit)*/ .file { display: block; margin-right: 11px; } } - + div.boardlist a { color: rgb(187, 51, 0); } - + /*expanded image border/shadow*/ .full-image { border-top-right-radius: 0; @@ -81,7 +81,7 @@ float: none; background-color: rgb(194, 194, 194); } - + /*gives quick reply its border/shadow*/ #quick-reply table { background: none repeat scroll 0 0 #CBCBCB; @@ -93,14 +93,14 @@ box-shadow: 7px 7px rgba(0, 0, 0, 0.5); width: auto !important; } - + /*makes posting form maroon*/ form table tr th { background-color: rgb(187, 51, 0); color: #FFFFFF; font-family: Palatino Linotype, Book Antiqua, Palatino, serif; } - + /*gives images border/shadow*/ div.files img.post-image { -webkit-box-shadow: 7px 7px 0px 0px #000; @@ -117,7 +117,7 @@ border-radius: 0; margin-bottom: 5px; } - + /* makes Youtube thumbs not obscenely big */ div.video-container { width: auto !important; @@ -125,7 +125,7 @@ max-height: 20% !important; max-width: 20% !important; } - + /* Image thumbs size limit (make as big as you want)*/ .post-image { border: double black; @@ -137,7 +137,7 @@ padding: 5px; background-color: #cdcdcd; } - + /* Keep small thumbnails in replies */ .post.reply a:not([data-expanded="true"]) .post-image { width: auto !important; @@ -145,13 +145,13 @@ background-color: #cdcdcd; max-height: 60%; max-width: 60%; } - + /* reply box size */ .input[type="text"], textarea { min-height: 117px; min-width: 240px; } - + /*boardwide font stuff goes here also background image*/ body { padding: 0; @@ -168,7 +168,7 @@ margin-left: 10px; header { margin-bottom: 0px; } - + /*gives posting table its border/shadow*/ form table { width: 100%; @@ -182,7 +182,7 @@ margin-left: 10px; -webkit-box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.5); box-shadow: 7px 5px rgba(0, 0, 0, 0.5); } - + /*gives threads its border/shadow*/ div[id^="thread_"] { -webkit-box-shadow: 11px 11px 0px 0px #000; @@ -195,7 +195,7 @@ margin-left: 10px; -webkit-box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.5); box-shadow: 7px 7px rgba(0, 0, 0, 0.5); } - + /*adds horizontal bar below subject*/ p.intro { background-image: url('https://www.lainchan.org/static/UebGaj5.png'); @@ -203,7 +203,7 @@ margin-left: 10px; background-position: bottom; min-height: 25px; } - + /*gives replies border/shadow*/ div.post.reply { max-width: 95% !important; @@ -216,19 +216,19 @@ margin-left: 10px; border: double 3px #000; background-color: rgb(194, 194, 194); } - + /*unfucks highlighting replies and gives border/shadow*/ div.post.reply.highlighted { background-color: #D6BDB0; } - + /*dont touch this*/ div.body { display: block; clear: both; padding-top: 10px; } - + /*makes page bar have border/shadow*/ div.pages { -webkit-box-shadow: 7px 7px 0px 0px #000; @@ -241,12 +241,12 @@ margin-left: 10px; border: double black; background-color: rgb(221, 221, 221); } - + /*hovered links have underline*/ a:hover { text-decoration: underline; } - + /*stops textbox resizing shenanigans*/ .input[type="text"], textarea { font-size: 14px; @@ -254,26 +254,26 @@ margin-left: 10px; min-height: 115px; min-width: 270px; } - + /*boardname nice font. replace with something classy someday*/ header div.subtitle, h1 { font-family: Palatino Linotype, Book Antiqua, Palatino, serif; color: rgb(187, 51, 0); } - + /*announcement font and color*/ div.blotter { padding: 15px; color: #000000; font-family: Palatino Linotype, Book Antiqua, Palatino, serif; } - + /*makes links red*/ a { color: rgb(187, 51, 0) !important; text-decoration: none; } - + /*top boardlist stuff. change position to "fixed" to make it behave like normal 8chan*/ div.boardlist:not(.bottom) { background-color: rgba(221, 221, 221, 1) !important; @@ -293,47 +293,47 @@ div.boardlist { } } - + /*favorites in a new line*/ div.boardlist span.favorite-boards { display: block; } - + /*subject color*/ p.intro span.subject { color: rgb(117, 8, 8); } - + /*bottom boardlist centered*/ - + div.boardlist.bottom { text-align: center; background-color: rgba(228,228,228,1); border: double #000000; width: 101%; } - + /*colors name*/ p.intro span.name { color: rgb(122, 77, 77); font-family: ; } - + /*catalog stuff*/ .theme-catalog div.thread { background-color: rgb(221, 221, 221); border: double; } - + .theme-catalog div.thread:hover { background-color: #D6BDB0; border: double; } - + span.trip { color: rgb(34, 136, 84); } - + #updater, #thread-links { background-color: rgba(228,228,228,1); border:double; @@ -365,7 +365,7 @@ max-width: 50%; } span.subject:after { content: '\A'; white-space:pre; } -SPAN.controls.op:before { content: '\A'; white-space:pre; } +div.controls.op:before { content: '\A'; white-space:pre; } div.post-menu { @@ -373,7 +373,7 @@ color: #ffffff;} #options_div { background-color: #dddddd; } - + .options_tab_icon.active { color: #bb3300; } diff --git a/stylesheets/sharp.css b/stylesheets/sharp.css index f41082bc..d61c7518 100644 --- a/stylesheets/sharp.css +++ b/stylesheets/sharp.css @@ -232,17 +232,17 @@ span.omitted { br.clear { clear: left; } -span.controls { +div.controls { float: right; margin: 0; padding: 0; font-size: 80%; } -span.controls.op { +div.controls.op { float: none; margin-left: 10px; } -span.controls a { +div.controls a { margin: 0; } div#wrap { diff --git a/stylesheets/style.css b/stylesheets/style.css index 27d8a747..67afb897 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -471,6 +471,12 @@ input.delete { font-weight: bold; } +@media (max-width: 48em) { + .user-controls { + display: none; + } +} + span.capcode, p.intro a.capcode, p.intro a.nametag { color: #F00000; margin-left: 0; @@ -521,6 +527,11 @@ div.post > p { } } +div.post.op > p { + clear: both; + padding-top: 1em; +} + div.post div.body { margin-top: 0.8em; padding-right: 3em; @@ -613,12 +624,12 @@ br.clear { display: block; } -span.controls { +div.controls { margin: 0; padding: 0; } -span.controls a { +div.controls a { margin: 0; text-wrap: nowrap; display: inline-block; diff --git a/stylesheets/tsuki.css b/stylesheets/tsuki.css index df9ffcfa..bffa78c3 100644 --- a/stylesheets/tsuki.css +++ b/stylesheets/tsuki.css @@ -354,19 +354,19 @@ br.clear { display: block; } -span.controls { +div.controls { float: right; margin: 0; padding: 0; font-size: 80%; } -span.controls.op { +div.controls.op { float: none; margin-left: 10px; } -span.controls a { +div.controls a { margin: 0; } diff --git a/stylesheets/wasabi.css b/stylesheets/wasabi.css index 0ad3d7f0..bd6d70b3 100644 --- a/stylesheets/wasabi.css +++ b/stylesheets/wasabi.css @@ -231,17 +231,17 @@ span.omitted { br.clear { clear: left; } -span.controls { +div.controls { float: right; margin: 0; padding: 0; font-size: 80%; } -span.controls.op { +div.controls.op { float: none; margin-left: 10px; } -span.controls a { +div.controls a { margin: 0; } div#wrap { diff --git a/templates/post_thread.html b/templates/post_thread.html index 38e343c6..61245a2c 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -4,6 +4,9 @@
{% if not index %}{% endif %}
1%}style='clear:both'{%endif%}> +
+ {% include 'post/fileinfo.html' %} +

-

-
{% if post.sticky %} {% if config.font_awesome %} - {# Keep this space #} + {# Keep this space #} {% else %} - Sticky {# Keep this space #} + {# Keep this space #} Sticky {% endif %} {% endif %} {% if post.locked %} {% if config.font_awesome %} - {# Keep this space #} + {# Keep this space #} {% else %} - Locked {# Keep this space #} + {# Keep this space #} Locked {% endif %} {% endif %} {% if post.sage and (config.mod.view_bumplock < 0 or (post.mod and post.mod|hasPermission(config.mod.view_bumplock, board.uri))) %} {% if config.font_awesome %} - {# Keep this space #} + {# Keep this space #} {% else %} - Bumplocked {# Keep this space #} + {# Keep this space #} Bumplocked {% endif %} {% endif %} {% if post.cycle %} {% if config.font_awesome %} - {# Keep this space #} + {# Keep this space #} {% else %} - Cyclical {# Keep this space #} + {# Keep this space #} Cyclical {% endif %} {% endif %} - {% if index %} - [{% trans %}Reply{% endtrans %}] {# Keep this space #} - {% endif %} - {% if isnoko50 %} - [{% trans %}View All{% endtrans %}] {# Keep this space #} - {% endif %} - {% if hasnoko50 and not isnoko50 %} - {% set lastcount = config.noko50_count %} - [{% trans %}Last 1 Post{% plural lastcount %}Last {{ count }} Posts{% endtrans %}] {# Keep this space #} - {% endif %} + +

+
{% include 'post/post_controls.html' %} - {% include 'post/fileinfo.html' %}
{% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %} @@ -88,7 +92,7 @@ {% plural post.omitted_images %} {{ count }} image replies {% endtrans %} - {% endif %} {% trans %}omitted. Click reply to view.{% endtrans %} + {% endif %} {% trans %}omitted.{% endtrans %} {% endif %} {% if not index %}