Skip to content

Commit

Permalink
html clean up, more bootstrap, main page is now create reference
Browse files Browse the repository at this point in the history
  • Loading branch information
doomwall committed Dec 11, 2024
1 parent 35d2851 commit f55c235
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def link_is_valid_form(link):

@app.route("/")
def index():
return render_template("index.html")
return render_template("/new_reference.html")

@app.route("/new_reference")
def new_reference():
Expand Down
4 changes: 2 additions & 2 deletions src/story_tests/reference_creation_ACM.robot
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Test Setup Reset Database
When article form is selected article form is shown
Go To New Reference Page
Select Radio Button refTypeCheckbox acm
Page Should Contain Creating ACM type reference
Page Should Contain Get reference from ACM link

When ACM Is Submitted Page Should Redirect To Main
Go To New Reference Page
Select Radio Button refTypeCheckbox acm
Page Should Contain Creating ACM type reference
Page Should Contain Get reference from ACM link
Set Name ACMTest1
Set Link https://dl.acm.org/doi/10.1145/3695770
Scroll Element Into View acm_submit
Expand Down
2 changes: 1 addition & 1 deletion src/story_tests/resource.robot
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Reset Database


Main Page Should Be Open
Title Should Be Main
Title Should Be Create a reference

References Page Should Be Open
Title Should Be References
Expand Down
4 changes: 2 additions & 2 deletions src/story_tests/tree.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Test Setup Reset Database
*** Test Cases ***
References Site Is Open
Go To ${HOME_URL}
Click Link references
Click Element references
Title Should Be References

New Reference Site Is Open
Go To ${HOME_URL}
Click Link new_reference
Click Element new_reference
Title Should Be Create a reference


Expand Down
6 changes: 3 additions & 3 deletions src/templates/edit_reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h3>Creating article type reference</h3>
<br>
<br>
<div class="col-sm-10">
<button type="submit" name="article_update" id="article_update">submit</button>
<button class="btn btn-secondary" type="submit" name="article_update" id="article_update">Submit</button>
</div>
</div>
</form>
Expand Down Expand Up @@ -193,7 +193,7 @@ <h2>Creating book type reference</h2>
<br>
<br>
<div class="col-sm-10">
<button type="submit" name="book_update" id="book_update">submit</button>
<button class="btn btn-secondary" type="submit" name="book_update" id="book_update">Submit</button>
</div>
</div>
</form>
Expand Down Expand Up @@ -269,7 +269,7 @@ <h2>Creating misc type reference</h2>
<br>
<br>
<div class="col-sm-10">
<button type="submit" name="misc_submit" id="misc_submit">submit</button>
<button class="btn btn-secondary" type="submit" name="misc_submit" id="misc_submit">Submit</button>
</div>
</div>
</form>
Expand Down
9 changes: 3 additions & 6 deletions src/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@
<body>
<div class="container text-center">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="/" style="padding-left: 20px;">Main Menu</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" style="padding-left: 20px;">BibTex Generator</a>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="/new_reference">New Reference</a>
<a class="nav-item nav-link" href="/references">All References</a>
<a class="nav-item nav-link" href="/new_reference" id="new_reference">New Reference</a>
<a class="nav-item nav-link" href="/references" id="references">All References</a>

</div>
</div>
Expand Down
11 changes: 6 additions & 5 deletions src/templates/new_reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<div class="row">
<div class="col-8">
<h2>Create a reference</h2>
<p>Choose reference type</p>
<input class="form-check-input" id="result" type="radio" name="refTypeCheckbox" value="article" onclick="openForm()">
<label class="form-check-label" for="exampleRadios1" style="padding-right: 5px;">
Article
Expand Down Expand Up @@ -127,7 +128,7 @@ <h3>Creating article type reference</h3>
<br>
<br>
<div class="col-sm-10">
<button type="submit" name="article_submit" id="article_submit">submit</button>
<button class="btn btn-secondary" type="submit" name="article_submit" id="article_submit">Submit</button>
</div>
</div>
</form>
Expand Down Expand Up @@ -223,7 +224,7 @@ <h2>Creating book type reference</h2>
<br>
<br>
<div class="col-sm-10">
<button type="submit" name="book_submit" id="book_submit">submit</button>
<button class="btn btn-secondary" type="submit" name="book_submit" id="book_submit">Submit</button>
</div>
</div>
</form>
Expand Down Expand Up @@ -295,7 +296,7 @@ <h2>Creating misc type reference</h2>
<br>
<br>
<div class="col-sm-10">
<button type="submit" name="misc_submit" id="misc_submit">submit</button>
<button class="btn btn-secondary" type="submit" name="misc_submit" id="misc_submit">Submit</button>
</div>
</div>
</form>
Expand All @@ -307,7 +308,7 @@ <h2>Creating misc type reference</h2>
<div class="col-8">
<form action="/references" method="post" class="form-acm" {% if request.form.get('type', '')!="acm" %}style="display: none"{% endif %} id="acm">
<div class="form-group row">
<h3>Creating ACM type reference</h3>
<h3 style="padding-bottom: 20px;">Get reference from ACM link</h3>
<input type="hidden" name="type" value="acm">
<label class="col-sm-2 col-form-label col-form-label-sm" for="name">Keyword:</label>
<div class="col-sm-10">
Expand All @@ -320,7 +321,7 @@ <h3>Creating ACM type reference</h3>
</div>
<br><br>
<div class="col-sm-10">
<button type="submit" name="acm_submit" id="acm_submit">submit</button>
<button class="btn btn-secondary" type="submit" name="acm_submit" id="acm_submit">Submit</button>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/reference_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="container">
<div class="row">
<div class="col-8">
<h2>References</h2>
<h2 style="padding-top: 30px;">References</h2>

{% if references %}
<div>
Expand Down

0 comments on commit f55c235

Please sign in to comment.