-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Annotated
main.py
, begin developing cword_webapp
`main.py` is now completely type annotated and intrinsically documented. The `HorizontalScrollFrame` class was removed and its functionality was replaced with a ctk.CTkScrollableFrame. Added `requirements.txt`. Began working on the interactive crossword webapp (using Flask and Jinja2) that will allow the user to fill in a generated crossword. Currently, only the html and css for viewing a grid of a variable side length has been written.
- Loading branch information
1 parent
a1f0853
commit ef4288f
Showing
11 changed files
with
322 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Babel==2.14.0 | ||
customtkinter==5.2.2 | ||
darkdetect==0.8.0 | ||
Flask==3.0.1 | ||
googletrans==3.0.0 | ||
Pillow==10.0.0 | ||
Pillow==10.2.0 | ||
regex==2023.6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[m] | ||
scale = 1.0 | ||
appearance = dark | ||
appearance = light | ||
theme = dark-blue | ||
language = en | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from flask import Flask, render_template | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route("/") | ||
def index(): | ||
return render_template("index.html", dimensions=dimensions) | ||
|
||
if __name__ == "__main__": | ||
dimensions = 10 | ||
app.run(debug=True) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Crossword Puzzle - Game</title> | ||
<style> | ||
:root { | ||
--dimensions: {{ dimensions }}; | ||
--dynamic_font_size: calc(120vmin / calc(var(--dimensions) * 1.65)); | ||
} | ||
|
||
html { | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
|
||
.title { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.container { | ||
width: 120vmin; /* Square dimensions - 1.2x larger than minimum viewport dimension */ | ||
height: 120vmin; | ||
} | ||
|
||
table { | ||
margin: 1em; | ||
table-layout: fixed; | ||
height: 100%; | ||
width: 100%; | ||
border-collapse: separate; | ||
border-spacing: 1px; | ||
background-color: black; | ||
} | ||
|
||
table td { | ||
position: relative; | ||
background: whitesmoke; | ||
text-align: center; | ||
text-transform: uppercase; | ||
vertical-align: bottom; | ||
font-size: var(--dynamic_font_size) | ||
} | ||
|
||
.num_label { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
font-size: calc(var(--dynamic_font_size) / 2); /* I LOVE CALC FUNCTION!! THANKS CSS! */ | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<h1 class="title">Crossword Puzzle - Game</h1> | ||
<hr> | ||
<div class="container"> | ||
<table class="table"> | ||
{% for row in range(dimensions) %} | ||
<tr> | ||
{% for column in range(dimensions) %} | ||
<td data-row="{{ row }}" data-column="{{ column }}">T | ||
<div class="num_label">1</div> | ||
</td> | ||
{% endfor %} | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.