From d98eb528a56fef737b40c6435af36416c732eec4 Mon Sep 17 00:00:00 2001 From: adonisk Date: Fri, 26 Sep 2014 19:08:46 +0200 Subject: [PATCH 01/10] v8ch.css --- stylesheets/v8ch.css | 191 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 stylesheets/v8ch.css diff --git a/stylesheets/v8ch.css b/stylesheets/v8ch.css new file mode 100644 index 00000000..bd8e68ab --- /dev/null +++ b/stylesheets/v8ch.css @@ -0,0 +1,191 @@ +@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro); + +body{ + background: #eee !important; + font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif !important; +} + +a{ + text-decoration: none; +} + +.boardlist{ + width: 100% !important; + position: fixed !important; + z-index: 99999 !important; + top: 0 !important; + left: 0 !important; + color: #222 !important; + background: #fff !important; + padding: 1em !important; + box-sizing: border-box !important; + margin-top: 0 !important; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important; +} + +img.banner, +img.board_image{ + border: none !important; +} + +.board_image, +.board_image + header{ + margin-top: 3.75em !important; + margin-bottom: 1em !important; + float: left !important; +} + +.board_image + header{ + margin-left: 1em !important; +} + +header, +header h1, +header .subtitle{ + text-align: left !important; +} + +.board_image + header + .banner{ + width: 100% !important; + float: left !important; + margin-top: 0 !important; + margin-left: 0 !important; + padding: 0.5em 0 !important; + background-color: #666 !important; +} + +form[name=post]{ + box-sizing: border-box !important; + position: fixed !important; + bottom: 0 !important; + right: 0 !important; + background: #fff !important; + margin-bottom: 0 !important; + padding: 1em !important; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3) !important; +} + +form[name=post] input[type="text"], +form[name=post] textarea{ + width: 100% !important; + padding: 0.5em !important; + box-sizing: border-box !important; +} + +form table tr th{ + color: #fff !important; + background: #222 !important; +} + +#expand-all-images, +#shrink-all-images, +#treeview{ + right: 1em !important; + position: absolute !important; +} + +#expand-all-images{ + margin-top: 4em !important; +} + +#treeview{ + margin-top: 5em !important; +} + +#shrink-all-images{ + margin-top: 6em !important; +} + +#expand-all-images + hr, +#shrink-all-images + hr{ + opacity: 0 !important; + margin: 0 !important; +} + +#treeview + hr{ + opacity: 0 !important; + clear: both !important; +} + +#options_handler{ + margin-top: 3em !important; +} + +[id^=thread]{ + background: #f8f8f8 !important; + margin-bottom: 1em !important; + padding: 1em 1em 0 1em !important; + border: none !important; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important; +} + +[id^=thread] hr{ + display: none !important; +} + +[id^=thread] div.post.reply { + margin: 0.5em 1em !important; + padding: 0.5em !important; + color: #222 !important; + background: #fff !important; + border: none !important; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important; +} + +[id^=thread] div.post.reply.highlighted { + background: #fec !important; +} + +p.intro.thread-hidden{ + padding-bottom: 1em !important; +} + +#vechan-reply, +#update_thread{ + float: right; + margin-right: 0.25em !important; + cursor: pointer !important; +} + +#update_thread{ + padding-left: 0 !important; +} + +#update_secs{ + color: #900 !important; +} + +.theme-catalog header{ + margin-top: 4em !important; +} + +.theme-catalog div.threads{ + text-align: left !important; +} + +.theme-catalog div.thread{ + color: #222 !important; + word-break: break-all !important; + background: #fff !important; + border: none !important; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important; +} + +.boardlist.bottom, +.sub[data-description='1'], +.sub[data-description='2'], +.sub[data-description='3'], +#quick-reply{ + display: none !important; +} + +#favorite-star{ + text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important; +} + +pre.prettyprint.prettyprinted{ + display: block !important; + overflow-x: scroll !important; +} + +/* If you want to make a redistributable style, be sure to have a Yotsuba B theme selected. */ From d9f20c290db89b17640228df6c405925e9ead587 Mon Sep 17 00:00:00 2001 From: anonfagola Date: Fri, 26 Sep 2014 16:55:16 -0700 Subject: [PATCH 02/10] Updated threadscroll.js with bettter compatibility --- js/threadscroll.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/threadscroll.js b/js/threadscroll.js index c3c6deef..0a233f58 100644 --- a/js/threadscroll.js +++ b/js/threadscroll.js @@ -16,7 +16,7 @@ if(active_page == "index" || active_page == "ukko"){ if(par.length == 1){ if(par.prev().attr("id") != null){ if(par.prev().attr("id").match("^thread")){ - window.location.href = window.location.protocol+"//"+window.location.host+window.location.pathname+"#"+par.prev().attr("id"); + par.prev()[0].scrollIntoView(true); } } } @@ -28,7 +28,7 @@ if(active_page == "index" || active_page == "ukko"){ if(par.length == 1){ if(par.next().attr("id") != null){ if(par.next().attr("id").match("^thread")){ - window.location.href = window.location.protocol+"//"+window.location.host+window.location.pathname+"#"+par.next().attr("id"); + par.next()[0].scrollIntoView(true); } } } From 56f3d89774654f2cfa747e9fd9881fb9efb92223 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 27 Sep 2014 00:44:41 +0000 Subject: [PATCH 03/10] Fix multi image from quick reply Conflicts: js/multi-image.js --- js/multi-image.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/multi-image.js b/js/multi-image.js index 32d1f256..77c3f766 100644 --- a/js/multi-image.js +++ b/js/multi-image.js @@ -18,7 +18,10 @@ function multi_image() { var images_len = $('form:not([id="quick-reply"]) [type=file]').length; if (!(images_len >= max_images)) { - $('.add_image').after('
'); + var new_file = '
'; + + $('[type=file]:last').after(new_file); + $('form:not([id="quick-reply"]) [type=file]:last').after(new_file); if (typeof setup_form !== 'undefined') setup_form($('form[name="post"]')); } }) From 6fd3b64c679d0640796b3fb3d5972fc465bfa954 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 27 Sep 2014 00:44:55 +0000 Subject: [PATCH 04/10] Disallow multiple Shrink all images appearing fixes vichan-devel#91 --- js/expand-all-images.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/expand-all-images.js b/js/expand-all-images.js index fc273e5e..5545045c 100644 --- a/js/expand-all-images.js +++ b/js/expand-all-images.js @@ -27,7 +27,10 @@ onready(function(){ $(this).parent().click(); }); - $('hr:first').before('
'); + if (!$('#shrink-all-images').length) { + $('hr:first').before('
'); + } + $('div#shrink-all-images a') .text(_('Shrink all images')) .click(function(){ From dda746201396977321b5c639a2fc8cf0575588a0 Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 27 Sep 2014 11:13:04 +0200 Subject: [PATCH 05/10] catalog link not always working; fix ctrlcctrlv#88 --- js/catalog-link.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/js/catalog-link.js b/js/catalog-link.js index 5c5d9b13..05ee9efb 100644 --- a/js/catalog-link.js +++ b/js/catalog-link.js @@ -15,13 +15,8 @@ function catalog() { var board = $("input[name='board']"); -if (board.length>0) { -if (window.location.pathname.indexOf("/res/")>0){ //if we are inside a thread -var catalog_url = '../catalog.html'; -} -else { -var catalog_url = 'catalog.html'; -} +var catalog_url = configRoot + board.first().val() + "/catalog.html"; + var pages = document.getElementsByClassName('pages')[0]; var bottom = document.getElementsByClassName('boardlist bottom')[0] var subtitle = document.getElementsByClassName('subtitle')[0]; @@ -57,7 +52,6 @@ if (subtitle) { subtitle.appendChild(link2); } } -} if (active_page == 'thread' || active_page == 'index') { $(document).ready(catalog); From 6c139caf3cd2ba34e03844a88f27038320c77dc9 Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 27 Sep 2014 11:16:16 +0200 Subject: [PATCH 06/10] style.css: setting default font size is imo a bit invasive --- stylesheets/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stylesheets/style.css b/stylesheets/style.css index a3eea7f9..5c24679c 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -2,7 +2,7 @@ body { background: #EEF2FF url('img/fade-blue.png') repeat-x 50% 0%; color: black; font-family: arial, helvetica, sans-serif; - font-size: 11pt; + font-size: 10pt; margin: 0 4px; padding-left: 4px; padding-right: 4px; @@ -909,4 +909,4 @@ code > pre > span.pln { div.post div.body { clear: none; } -} \ No newline at end of file +} From f2e101f30d2abf17c481fb59ff1a9394cc9e43d5 Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 27 Sep 2014 11:22:28 +0200 Subject: [PATCH 07/10] fix multi-image.js when quick-reply isn`t loaded --- js/multi-image.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/multi-image.js b/js/multi-image.js index 77c3f766..db4c6bd2 100644 --- a/js/multi-image.js +++ b/js/multi-image.js @@ -21,7 +21,9 @@ function multi_image() { var new_file = '
'; $('[type=file]:last').after(new_file); - $('form:not([id="quick-reply"]) [type=file]:last').after(new_file); + if ($("#quick-reply").length) { + $('form:not(#quick-reply) [type=file]:last').after(new_file); + } if (typeof setup_form !== 'undefined') setup_form($('form[name="post"]')); } }) From 629b1c92a6cb6971da36bcc84e38d9e6600e7124 Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 27 Sep 2014 11:26:30 +0200 Subject: [PATCH 08/10] fix a recently introduced quick-reply max-width issue --- stylesheets/style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stylesheets/style.css b/stylesheets/style.css index 5c24679c..5be0ce0f 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -102,6 +102,10 @@ input[type="text"], input[type="password"], textarea { max-width: 75%; } +#quick-reply input[type="text"], input[type="password"], #quick-reply textarea { + max-width: 100%; +} + form table tr td { text-align: left; margin: 0; From ef53af04ec42359d66489b10dee0f4f1778c3b0a Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 27 Sep 2014 11:31:30 +0200 Subject: [PATCH 09/10] fix a recently added md5 api field --- inc/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/api.php b/inc/api.php index 3769a9c9..31cf2293 100644 --- a/inc/api.php +++ b/inc/api.php @@ -113,7 +113,7 @@ class Api { $apiPost['ext'] = substr($file->file, $dotPos); $dotPos = strrpos($file->file, '.'); $apiPost['tim'] = substr($file->file, 0, $dotPos); - $apiPost['md5'] = base64_encode(md5_file($file->file_path, true)); + $apiPost['md5'] = base64_encode(hex2bin($post->filehash)); } return $apiPost; From cb7b7d070cad4286c998579d4cd263b9979535ef Mon Sep 17 00:00:00 2001 From: 8chan Date: Fri, 26 Sep 2014 23:53:52 +0000 Subject: [PATCH 10/10] threadscroll was in template for no reason --- templates/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 105d1584..8c4c278d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -87,6 +87,5 @@ ready(); {% endraw %} -