Skip to content

Commit

Permalink
Merge pull request #47 from software-students-spring2024/decks-update
Browse files Browse the repository at this point in the history
Update rendering of decks
  • Loading branch information
iltenahmet authored Feb 26, 2024
2 parents d90f0ae + 50816ad commit 5183ed6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def signup():
def allDecks(username):
# would need to first find user in db, but not set up yet
# would redirect to template for Decks
return render_template('decks.html')
return render_template('decks.html', mainDecks=db.decks.find())

@app.route("/<username>/create", methods=["POST"])
def createDeck(username):
Expand Down
11 changes: 11 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ h3 {

}

.vertical-alig {
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
margin: auto;
width: 90%;
aspect-ratio: 9 / 5;

}

.button {
width: 100%;
height: 25%;
Expand Down
27 changes: 7 additions & 20 deletions templates/decks.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,13 @@

{% block container %}

<!--
<div class="main-deck">
<h3> Test 1</h3>
<!--IN WORKS: need to change the temps-->
<div class="temp">
<form class="vertical-alig" method="post">
{% for deck in mainDecks %}
<button class="main-deck" type="submit" name="temp"><h3>{{deck.title}}</h3></button>
{% endfor %}
</form>
</div>

<div class="personal-deck">
<h3> Test 2</h3>
</div>
-->

{% for deck in mainDecks %}
<div class="main-deck">
<h3> {{deck.name}}</h3>
</div>
{% endfor %}

{% for deck in personalDecks %}
<div class="personal-deck">
<h3> {{deck.name}}</h3>
</div>
{% endfor %}

{% endblock %}

0 comments on commit 5183ed6

Please sign in to comment.