Skip to content

Commit

Permalink
Edit open animation, close settings on left linkblocks click
Browse files Browse the repository at this point in the history
  • Loading branch information
victrme committed Nov 27, 2019
1 parent fe4d411 commit 4ddfa3e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ <h5 class="trn">Weather</h5>
<h5 class="trn">Search bar</h5>
<div class="param">
<div class="activate_searchbar wrapper">
<span class="trn">Activate</span>
<span class="trn">Enable</span>
<div>
<label class="switch">
<input id="i_sb" type="checkbox">
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function askfordict() {
de: "Suchmaschine",
it: "Motore di ricerca"
},
"Activate": {
"Enable": {
fr: "Activer",
sv: "Aktivera",
nl: "Activeren", // unsure
Expand Down
7 changes: 5 additions & 2 deletions src/scripts/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,15 @@ function showSettings(e, that) {
}

function showInterface(e) {

//cherche le parent du click jusqu'a trouver linkblocks
var parent = e.target;
//seulement si click droit, quitter la fct
let parent = e.target;

while (parent !== null) {

parent = parent.parentElement;
if (parent && parent.id === "linkblocks") return false;
if (parent && parent.id === "linkblocks" && e.which === 3) return false;
}

//close edit container on interface click
Expand Down
32 changes: 29 additions & 3 deletions src/styles/events.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,19 @@

@keyframes sbfade {
from {
opacity: 0; }
opacity: 0;}
to {
opacity: .8; } }
opacity: .8;}
}

@keyframes editfade {
from {
opacity: 0;}
to {
opacity: 1;
display: flex;
}
}

#interface #sb_container.shown #searchbar {
animation: sbfade .08s ease-in .0s 1 normal;
Expand All @@ -36,12 +46,28 @@
}


#interface.pushed {
#interface.pushed,
#edit_linkContainer.pushed {
-webkit-transform: translateX(-10em);
transform: translateX(-10em);
}

#settings.shown {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}


#edit_linkContainer {
position: fixed;
height: auto;
width: auto;
margin: auto;
top: 35%;
left: calc(50% - 150px);
z-index: 1;
}

#edit_linkContainer.shown {
animation: editfade .1s forwards;
}

0 comments on commit 4ddfa3e

Please sign in to comment.