Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified neo_dolfin/ai/chatbot/__pycache__/chatbot_logic.cpython-311.pyc
Binary file not shown.
Binary file modified neo_dolfin/ai/chatbot/__pycache__/query_bankdata.cpython-311.pyc
Binary file not shown.
29 changes: 23 additions & 6 deletions neo_dolfin/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,16 +770,33 @@ def auth_survey():
@app.route('/terms-of-use/')
def open_terms_of_use():
return render_template("TermsofUse.html")



# APPLICATION TERMS OF USE-AI PAGE
@app.route('/terms-of-use-ai/')
def open_terms_of_use_AI():
return render_template("TermsofUse-AI.html")

# APPLICATION Article Template PAGE
@app.route('/articleTemplate/')
def open_article_template():
return render_template("articleTemplate.html")


# APPLICATION NEWS TEMPLATE PAGE
@app.route('/news')
def news_list():
return render_template("news.html")

# APPLICATION ARTICLE TEMPLATE PAGE
@app.route('/articles/<int:article_id>')
def article_detail(article_id):
with open('./static/json/article.json') as file:
articles = json.load(file)
article = next((a for a in articles if a["id"] == article_id), None)
my_array = []
my_array.append(article)
if article:
return render_template("articleTemplate.html", articles=my_array)
else:
return "Article not found", 404



@app.route('/feedback', methods=['GET', 'POST'])
def feedback():
Expand Down
9 changes: 5 additions & 4 deletions neo_dolfin/templates/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ <h5 id="articleTitle" class="card-title card-title-text-custom-truncate">Top 5 c
<div class="container">
<div class="row mb-2">
<div class="col-6 ps-0">
<a id="readButton" href="/articleTemplate/1" class="btn btn-primary">Read more</a>
<a id="readButton" href="{{ url_for('article_detail', article_id=1) }}" class="btn btn-primary">Read more</a>

</div>
<div class="col-6 pt-2 text-end pe-3">
<p class="h5">10/06/23</p>
Expand Down Expand Up @@ -113,7 +114,7 @@ <h5 id="articleTitle" class="card-title card-title-text-custom-truncate">Is savi
<div class="container">
<div class="row mb-2">
<div class="col-6 ps-0">
<a id="readButton" href="/articleTemplate/2" class="btn btn-primary">Read more</a>
<a id="readButton" href="{{ url_for('article_detail', article_id=2) }}" class="btn btn-primary">Read more</a>
</div>
<div class="col-6 pt-2 text-end pe-3">
<p class="h5">01/12/23</p>
Expand Down Expand Up @@ -149,7 +150,7 @@ <h5 id="articleTitle" class="card-title card-title-text-custom-truncate">Learn w
<div class="container">
<div class="row mb-2">
<div class="col-6 ps-0">
<a id="readButton" href="/articleTemplate/3" class="btn btn-primary">Read more</a>
<a id="readButton" href="{{ url_for('article_detail', article_id=3) }}" class="btn btn-primary">Read more</a>
</div>
<div class="col-6 pt-2 text-end pe-3">
<p class="h5">08/06/23</p>
Expand Down Expand Up @@ -182,7 +183,7 @@ <h5 id="articleTitle" class="card-title card-title-text-custom-truncate">What is
<div class="container">
<div class="row mb-2">
<div class="col-6 ps-0">
<a id="readButton" href="/articleTemplate/4" class="btn btn-primary">Read more</a>
<a id="readButton" href="{{ url_for('article_detail', article_id=4) }}" class="btn btn-primary">Read more</a>
</div>
<div class="col-6 pt-2 text-end pe-3">
<p class="h5">25/07/23</p>
Expand Down