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;
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);
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(){
diff --git a/js/multi-image.js b/js/multi-image.js
index 32d1f256..db4c6bd2 100644
--- a/js/multi-image.js
+++ b/js/multi-image.js
@@ -18,7 +18,12 @@ 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);
+ if ($("#quick-reply").length) {
+ $('form:not(#quick-reply) [type=file]:last').after(new_file);
+ }
if (typeof setup_form !== 'undefined') setup_form($('form[name="post"]'));
}
})
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);
}
}
}
diff --git a/stylesheets/style.css b/stylesheets/style.css
index 2f14f187..ecbcd58a 100644
--- a/stylesheets/style.css
+++ b/stylesheets/style.css
@@ -1,7 +1,11 @@
body {
background: #EEF2FF url('img/fade-blue.png') repeat-x 50% 0%;
color: black;
+<<<<<<< HEAD
font-family: arial,helvetica,sans-serif;
+=======
+ font-family: arial, helvetica, sans-serif;
+>>>>>>> 197e4d4bfcb5a312a699e1f6d012da03ee36fbe2
font-size: 10pt;
margin: 0 4px;
padding-left: 4px;
@@ -100,7 +104,11 @@ input[type="text"],input[type="password"],textarea {
max-width: 75%;
}
+<<<<<<< HEAD
#quick-reply input[type="text"],input[type="password"],#quick-reply textarea {
+=======
+#quick-reply input[type="text"], input[type="password"], #quick-reply textarea {
+>>>>>>> 197e4d4bfcb5a312a699e1f6d012da03ee36fbe2
max-width: 100%;
}
@@ -917,4 +925,4 @@ code>pre>span.pln {
div.post div.body {
clear: none;
}
-}
\ No newline at end of file
+}
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. */
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 %}
-