Skip to content

Commit

Permalink
Minor update to source code
Browse files Browse the repository at this point in the history
Removed unused import in `constants.py`

Greatly shortened the render_template parameters in `app.py` by utilising the **dict (function) syntax.

Added `cursor: pointer` to the `.toggle` selector in `styles.css` to ensure the user knows that the smart skip toggle is clickable.
  • Loading branch information
tomasvana10 committed Mar 7, 2024
1 parent ba0a93d commit 2fc5bee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from pathlib import Path

import regex
from customtkinter import CTkFont


class Paths:
Expand Down
22 changes: 1 addition & 21 deletions src/cword_webapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,7 @@ def _run(*args, **kwargs):

@app.route("/")
def main():
return render_template(
"index.html",
colour_palette=kwargs["colour_palette"],
json_colour_palette=kwargs["json_colour_palette"],
cword_data=kwargs["cword_data"],
empty=kwargs["empty"],
directions=kwargs["directions"],
name=kwargs["name"],
category=kwargs["category"],
difficulty=kwargs["difficulty"],
intersections=kwargs["intersections"],
word_count=kwargs["word_count"],
failed_insertions=kwargs["failed_insertions"],
dimensions=kwargs["dimensions"],
starting_word_positions=kwargs["starting_word_positions"],
starting_word_matrix=kwargs["starting_word_matrix"],
grid=kwargs["grid"],
definitions_a=kwargs["definitions_a"],
definitions_d=kwargs["definitions_d"],
js_err_msgs=kwargs["js_err_msgs"]
)
return render_template("index.html", **kwargs)

app.run(debug=False, port=int(kwargs["port"]))

Expand Down
1 change: 1 addition & 0 deletions src/cword_webapp/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ li { /* Each definition/clue */
display: flex;
position: absolute;
top: 2.75vmin;
cursor: pointer;
}

.toggle_switch {
Expand Down

0 comments on commit 2fc5bee

Please sign in to comment.