From 8816fe221e4bdda6294956c3f854a47ee07db956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Tue, 8 Jul 2014 09:51:17 +0100 Subject: [PATCH] Animate sidebar with CSS transitions --- css/glowingbear.css | 26 ++++++++++++++++++++------ index.html | 10 +++++----- js/glowingbear.js | 35 +++++++++++++++++++++++++---------- 3 files changed, 50 insertions(+), 21 deletions(-) diff --git a/css/glowingbear.css b/css/glowingbear.css index ed761eb..f4bde80 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -171,10 +171,14 @@ input[type=text], input[type=password], #sendMessage, .badge { padding-top: 35px; /* topbar */ padding-bottom: 1px; /* need to force a padding here */ font-size: smaller; - -webkit-transition:0.35s ease all; - transition:0.35s ease all; + transition:0.2s ease-in-out; z-index: 2; } + +#sidebar[data-state=visible] { + left: 0px; +} + #sidebar form { } #sidebar.ng-hide-add, #sidebar.ng-hide-remove { @@ -274,7 +278,7 @@ input[type=text], input[type=password], #sendMessage, .badge { .withnicklist { margin-right: 100px !important; /* nicklist */ } -.withsidebar { +.content[sidebar-state=visible] #bufferlines { margin-left: 145px; /* sidebar */ } #bufferlines .btn { @@ -290,7 +294,7 @@ input[type=text], input[type=password], #sendMessage, .badge { transition:0.35s ease all; z-index: 1; } -.footer.withsidebar { +.content[sidebar-state=visible] .footer { margin-left: 0; padding-left: 145px; } @@ -403,8 +407,6 @@ h2 span, h2 small { #sidebar { font-size: normal; bottom: 0px; - width: auto; - max-width: 60%; top: 0px; padding-bottom: 35px; } @@ -415,6 +417,18 @@ h2 span, h2 small { bottom: 0px; } + #sidebar[data-state=visible] { + width: 200px; + } + + #sidebar[data-state=hidden] { + left: -200px; + } + + .content[sidebar-state=visible] #bufferlines, .content[sidebar-state=visible] .footer { + margin-left: 0px; + } + #topbar .title { left: 40px; } diff --git a/index.html b/index.html index 7cfc74d..19d3117 100644 --- a/index.html +++ b/index.html @@ -187,10 +187,10 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel -
+
- + brand @@ -207,7 +207,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
-