Internals renamed to Console

This commit is contained in:
shortcutme 2019-07-17 16:30:17 +02:00
parent 866346b059
commit c502688ce3
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 0 additions and 77 deletions

View file

@ -1,60 +0,0 @@
class Internals extends Class
constructor: (@sidebar) ->
@tag = null
@opened = false
if window.top.location.hash == "#internals"
setTimeout (=> @open()), 10
createHtmltag: ->
@when_loaded = $.Deferred()
if not @container
@container = $("""
<div class="internals-container">
<div class="internals"><div class="internals-middle">
<div class="mynode"></div>
<div class="peers">
<div class="peer"><div class="line"></div><a href="#" class="icon">\u25BD</div></div>
</div>
</div></div>
</div>
""")
@container.appendTo(document.body)
@tag = @container.find(".internals")
open: =>
@createHtmltag()
@sidebar.fixbutton_targety = @sidebar.page_height
@stopDragY()
onOpened: =>
@sidebar.onClosed()
@log "onOpened"
onClosed: =>
$(document.body).removeClass("body-internals")
stopDragY: =>
# Animate sidebar and iframe
if @sidebar.fixbutton_targety == @sidebar.fixbutton_inity
# Closed
targety = 0
@opened = false
else
# Opened
targety = @sidebar.fixbutton_targety - @sidebar.fixbutton_inity
@onOpened()
@opened = true
# Revent sidebar transitions
if @tag
@tag.css("transition", "0.5s ease-out")
@tag.css("transform", "translateY(#{targety}px)").one transitionEnd, =>
@tag.css("transition", "")
if not @opened
@log "cleanup"
# Revert body transformations
@log "stopdrag", "opened:", @opened, targety
if not @opened
@onClosed()
window.Internals = Internals

View file

@ -1,17 +0,0 @@
.internals-container { width: 100%; z-index: 998; position: absolute; top: -100vh; }
.internals { background-color: #EEE; height: 100vh; transform: translateY(0px); }
.internals-middle {height: 0px; top: 50%; position: absolute; width: 100%; left: 50%; }
.internals .mynode {
border: 0.5px solid #aaa; width: 50px; height: 50px; transform: rotateZ(45deg); margin-top: -25px; margin-left: -25px;
opacity: 1; display: inline-block; background-color: #EEE; z-index: 9; position: absolute; outline: 5px solid #EEE;
}
.internals .peers { width: 0px; height: 0px; position: absolute; left: -20px; top: -20px; text-align: center; }
.internals .peer { left: 0px; top: 0px; position: absolute; }
.internals .peer .icon { width: 20px; height: 20px; padding: 10px; display: inline-block; text-decoration: none; left: 200px; position: absolute; color: #666; }
.internals .peer .icon:before { content: "\25BC"; position: absolute; margin-top: 3px; margin-left: -1px; opacity: 0; transition: all 0.3s }
.internals .peer .icon:hover:before { opacity: 1; transition: none }
.internals .peer .line {
width: 187px; border-top: 1px solid #CCC; position: absolute; top: 20px; left: 20px;
transform: rotateZ(334deg); transform-origin: bottom left;
}