Skip to content

Commit

Permalink
[untested] change html blocks position HelloZeroNet#131
Browse files Browse the repository at this point in the history
  • Loading branch information
d47081 committed Jul 17, 2022
1 parent 99fd2ab commit d17225f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions js/PostCreate.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ class PostCreate extends Class
# Registered user
h("div.post-create.post", {classes: {editing: @is_editing}},
h("div.user", user.renderAvatar()),
h("a.icon-image.link", {href: "#", onclick: @handleUploadClick}),
@field_post.render(),
if @image.base64uri
h("div.image", {style: "background-image: url(#{@image.base64uri}); height: #{@image.getSize(530, 600)[1]}px", classes: {empty: false}}, [
h("a.close", {href: "#", onclick: @handleImageClose}, "×")
])
else
h("div.image", {style: "height: 0px", classes: {empty: true}})
h("div.postbuttons",
h("a.icon-image.link", {href: "#", onclick: @handleUploadClick}),
@field_post.render(),
if @image.base64uri
h("div.image", {style: "background-image: url(#{@image.base64uri}); height: #{@image.getSize(530, 600)[1]}px", classes: {empty: false}}, [
h("a.close", {href: "#", onclick: @handleImageClose}, "×")
])
else
h("div.image", {style: "height: 0px", classes: {empty: true}})
h("a.button.button-submit", {href: "#Submit", onclick: @handlePostSubmit}, "Submit new post"),
),
h("div", {style: "clear: both"})
Expand Down
22 changes: 11 additions & 11 deletions js/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,17 @@
s = Date.now()
log = (text) ->
console.log Date.now()-s, Array.prototype.slice.call(arguments).join(", ")
log "Started"
cmd = (query) ->
p = new Promise()
setTimeout ( ->
p.resolve query+" Result"
), 100
return p
back = cmd("SELECT * FROM message").then (res) ->
log res
p = new Promise()
Expand All @@ -185,13 +185,13 @@
return cmd("SELECT * FROM users")
.then (res) ->
log "End result", res
log "Query started", back
q1 = cmd("SELECT * FROM anything")
q2 = cmd("SELECT * FROM something")
Promise.join(q1, q2).then (res1, res2) ->
log res1, res2
*/
Expand Down Expand Up @@ -304,7 +304,7 @@
window.load = (done, num) ->
console.log "Loading #{num}...", Date.now()-window.s
setTimeout (-> done()), 1000
RateLimit 500, window.load, [0] # Called instantly
RateLimit 500, window.load, [1]
setTimeout (-> RateLimit 500, window.load, [300]), 300
Expand Down Expand Up @@ -4955,7 +4955,7 @@ function clone(obj) {
classes: {
editing: this.is_editing
}
}, h("div.user", user.renderAvatar()), h("a.icon-image.link", {
}, h("div.user", user.renderAvatar()), h("div.postbuttons", h("a.icon-image.link", {
href: "#",
onclick: this.handleUploadClick
}), this.field_post.render(), this.image.base64uri ? h("div.image", {
Expand All @@ -4973,7 +4973,7 @@ function clone(obj) {
classes: {
empty: true
}
}), h("div.postbuttons", h("a.button.button-submit", {
}), h("a.button.button-submit", {
href: "#Submit",
onclick: this.handlePostSubmit
}, "Submit new post")), h("div", {
Expand Down

0 comments on commit d17225f

Please sign in to comment.