diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 66681c7..1a6790b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,8 +1,14 @@ - + + + + + + + - - + + - + + \ No newline at end of file diff --git a/image.py b/image.py index f8bbd59..eb819dd 100644 --- a/image.py +++ b/image.py @@ -27,7 +27,7 @@ def image_data(path=Path("static/assets/"), img_list=None): # path of static im {'source': "iconsdb.com", 'label': "Green square", 'file': "green-square-16.png", filter: "nothing"}, {'source': "iconsdb.com", 'label': "Blue square", 'file': "blue-square-16.png", filter: "nothing"}, {'source': "iconsdb.com", 'label': "White square", 'file': "white-square-16.png", filter: "nothing"}, - {'source': "iconsdb.com", 'label': "Blue square", 'file': "blue-square-16.jpg", filter: "nothing"} + {'source': "iconsdb.com", 'label': "Blue square", 'file': "blue-square-16.jpg", filter: "gaussian"} ] for img_dict in img_list: diff --git a/main.py b/main.py index eac9d1c..1d03a36 100644 --- a/main.py +++ b/main.py @@ -138,6 +138,9 @@ def binary(): def tclicker(): return render_template("turtleclicker.html") +@app.route('/unsignedaddition/') +def unsignedaddition(): + return render_template("/labs/unsignedaddition.html") @app.route('/rgb/') def rgb(): diff --git a/static/assets/blue-square-16.jpg b/static/assets/blue-square-16.jpg index 1095f9f..893384a 100644 Binary files a/static/assets/blue-square-16.jpg and b/static/assets/blue-square-16.jpg differ diff --git a/static/assets/lassen-volcano-256.jpg b/static/assets/lassen-volcano-256.jpg index 38064e1..29dc479 100644 Binary files a/static/assets/lassen-volcano-256.jpg and b/static/assets/lassen-volcano-256.jpg differ diff --git a/templates/labs/unsignedaddition.html b/templates/labs/unsignedaddition.html new file mode 100644 index 0000000..9183938 --- /dev/null +++ b/templates/labs/unsignedaddition.html @@ -0,0 +1,412 @@ + +{% extends "layouts/base.html" %} +{% block background %} +{% endblock %} + +{% set project = "Signed and Unsigned Turtle Addition" %} +{% set subheading = "Signed and Unsigned Turtle Addition" %} + +{% set BITS = 24 %} +{% set MAX = ((2 ** BITS) - 1) %} + +{% set imageurl = "/static/assets/backgrounds/patrick-schneider-mountains-unsplash.jpg" %} + + + + +{% set imgBulbOn = "/static/turtleyes.png" %} +{% set imgBulbOff = "/static/turtledefault.png" %} +{% set msgTurnOn = "Turn On" %} +{% set msgTurnOff = "Turn Off" %} + +{% block body %} + + + + + + + +
+
+
+
+

Signed and Unsigned Turtle Addition

+
+
+
+
+
Switch between - and + with toggle button
+
+
+ +
+ + +
+ + + + +
+
+
+
+ + + + + + {% for i in range(0, 8) %} + + {% endfor %} + + + + + {% for i in range(0, 8) %} + + {% endfor %} + +
First Number + + +
+ +
000
+
+
+
+
+ +
+
+
+
+ + + + + + {% for i in range(8, 16) %} + + {% endfor %} + + + + + {% for i in range(8,16) %} + + {% endfor %} + +
Second Number + + +
+ +
000
+
+
+
+
+ +
+
+
+
+ + + + + {% for i in range(16, 25) %} + + {% endfor %} + + + + {% for i in range(16, 25) %} + + {% endfor %} + +
Output + +
Dec: 0
+
+
+ +
Bin: 000000000
+
+
+
+
+
+ + + +
+
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/templates/layouts/navbar.html b/templates/layouts/navbar.html index b963bec..937d352 100644 --- a/templates/layouts/navbar.html +++ b/templates/layouts/navbar.html @@ -105,6 +105,7 @@ Mini-Labs