Skip to content

Commit

Permalink
Fix touch button response and set button aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
cochaviz committed Aug 12, 2024
1 parent fd89431 commit 4b09a8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/dear_diary/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ form {

#button-stack {
position: absolute;
height: 5%;
height: auto;
width: 60%;
aspect-ratio: 5/1;

right: calc(2 * var(--space-between));
bottom: calc(2 * var(--space-between));
Expand Down
10 changes: 5 additions & 5 deletions src/dear_diary/static/js/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
window.onload = function () {

let form = document.getElementById("entry-form");
let response_field = document.getElementById("response-field");
// let response_field = document.getElementById("response-field");
let input_field = document.getElementById("input-field");

let back_button = document.getElementById("back");
let question_button = document.getElementById("question");
let search_button = document.getElementById("search");
let submit_button = document.getElementById("submit");
// let submit_button = document.getElementById("submit");

back_button.addEventListener("click", change_to_tab("entry", entry_tab_settings, post_entry));
question_button.addEventListener("click", change_to_tab("question", question_tab_settings, post_question));
search_button.addEventListener("click", change_to_tab("search", search_tab_settings, post_search));
back_button.addEventListener("pointerup", change_to_tab("entry", entry_tab_settings, post_entry));
question_button.addEventListener("pointerup", change_to_tab("question", question_tab_settings, post_question));
search_button.addEventListener("pointerup", change_to_tab("search", search_tab_settings, post_search));

// make sure content is saved when switching tabs
let content = {}
Expand Down

0 comments on commit 4b09a8d

Please sign in to comment.