From 6bf687b40c0150436f9db24ed6b3d4e94f4ebce4 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 25 Nov 2018 20:04:48 -0700 Subject: [PATCH] Make UI a bit nicer --- langs/en/notes.json | 3 ++- pages/home.php | 37 ++++++++++++++++++++++++------------- static/css/home.css | 9 +++++++++ static/js/home.js | 7 +++++++ 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/langs/en/notes.json b/langs/en/notes.json index c72dec4..305141d 100644 --- a/langs/en/notes.json +++ b/langs/en/notes.json @@ -11,5 +11,6 @@ "Note color": "Note color", "Cancel": "Cancel", "Save": "Save", - "Close": "Close" + "Close": "Close", + "Refresh": "Refresh" } diff --git a/pages/home.php b/pages/home.php index 91518c7..fc14b87 100644 --- a/pages/home.php +++ b/pages/home.php @@ -68,6 +68,7 @@ foreach ($colors as $c) {
get("New note"); ?> + get("Refresh"); ?>
@@ -77,14 +78,11 @@ foreach ($colors as $c) { ?>
- diff --git a/static/css/home.css b/static/css/home.css index ed1d47c..f0eeec4 100644 --- a/static/css/home.css +++ b/static/css/home.css @@ -7,4 +7,13 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. .sizer-element { z-index: -100; pointer-events: none; +} + +.notecard-click2open { + cursor: default; +} + +.grid__brick { + margin-top: 5px; + margin-bottom: 15px; } \ No newline at end of file diff --git a/static/js/home.js b/static/js/home.js index 6aa3a46..b192795 100644 --- a/static/js/home.js +++ b/static/js/home.js @@ -39,9 +39,16 @@ $(".color-btn").click(function () { $("#colormodal").modal(); }); +$(".notecard").on("click", ".notecard-click2open", function () { + document.location.href = "./app.php?page=editnote¬e=" + $(this).parent().data("note"); +}); + $('[data-toggle="tooltip"]').tooltip(); window.shuffleInstance = new window.Shuffle(document.getElementById('grid'), { itemSelector: '.grid__brick', sizer: '.sizer-element', }); + +// Do the opposite of