-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature front article content creation (#91)
* Branching for Articles Branching off develop to create article content * Delete articleTemplate_Savings.html deleted a file i accidentally created * article html reset my duplcation of the article html * Dynamically generated articles I created a json document to store different articles so I can iterate through them for the different article links. Altered the articleTemplate.html to dynamically insert various paragraphs and quotes. The news.html href's was changed to link to the article sites id's. Finally in app.py I imported the json module. changed the Article template route to accept article id's. It gets the current directory and constructs the path than reads the JSON data than finds a particular id. Than renders the article template * Update article.json Added the content for 5 money savings tips * Delete transactions_ut.db --------- Co-authored-by: ShaneD <[email protected]>
- Loading branch information
Showing
5 changed files
with
102 additions
and
74 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
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,35 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"title": "Unravelling Common Bad Saving Habits", | ||
"date": "25/09/2023", | ||
"content1": " When it comes to financial stability, the road is often obstructed by common bad saving habits that many individuals unknowingly develop. One pervasive issue is the absence of a well-structured budget. Without a clear understanding of income, expenses, and financial goals, people risk spending impulsively and struggling to allocate funds for savings. As financial guru Dave Ramsey wisely notes, 'A budget is telling your money where to go instead of wondering where it went.' Establishing and adhering to a budget is foundational to fostering successful saving habits, helping individuals take control of their financial destinies.", | ||
"content2": " Procrastination emerges as another significant hurdle on the path to financial security. Delaying the initiation of a savings plan deprives individuals of the compounding power that accelerates wealth accumulation. Embracing the proverbial wisdom that 'The best time to plant a tree was 20 years ago. The second-best time is now,' is crucial. Overcoming the bad habit of procrastination requires a proactive approach, urging individuals to start saving immediately to maximise the benefits of compound interest over time.", | ||
"content3": " A detrimental habit that can lead to financial turmoil is reliance on credit to sustain a lifestyle beyond one's means. Excessive use of credit cards and the accumulation of high-interest debt create a cycle that is challenging to break. Financial expert Suze Orman offers valuable advice, stating, 'A big part of financial freedom is having your heart and mind free from worry about the what-ifs of life.' Escaping the clutches of credit dependency involves developing a realistic budget, cutting unnecessary expenses, and diligently working to pay down outstanding debts.", | ||
"content4": " Finally, failing to establish an emergency fund is a common pitfall that leaves individuals vulnerable to unforeseen financial challenges. Without a financial safety net, unexpected expenses can lead to debt and disrupt long-term savings goals. As Warren Buffett wisely notes, 'The most important investment you can make is in yourself.' Creating an emergency fund provides a cushion, allowing individuals to navigate financial uncertainties without compromising their overall stability. In unravelling these common bad saving habits, individuals can pave the way for a more secure and prosperous financial future.", | ||
"quote1": "The most important investment ", | ||
"quote2": "you can make is in yourself." | ||
}, | ||
{ | ||
"id": 2, | ||
"title": "Article 2", | ||
"date": "02/15/2023", | ||
"content1": "Another article...", | ||
"content2": "More content...", | ||
"content3": "Even more content...", | ||
"content4": "Final content...", | ||
"quote1": "Quote-first half", | ||
"quote2": "Quote-second half.." | ||
}, | ||
{ | ||
"id": 3, | ||
"title": "Article 3", | ||
"date": "09/15/2024", | ||
"content1": "Another article...", | ||
"content2": "More content...", | ||
"content3": "Even more content...", | ||
"content4": "Final content...", | ||
"quote1": "Quote-first half", | ||
"quote2": "Quote-second half.." | ||
} | ||
] |
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 |
---|---|---|
|
@@ -2,75 +2,61 @@ | |
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta content="width=device-width, initial-scale=1" name="viewport"> | ||
<title>DolFin - Article</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="{{url_for('static', filename='css/main.css')}}" rel="stylesheet" type="text/css"> | ||
<link href="{{url_for('static', filename='css/articles.css')}}" rel="stylesheet" type="text/css"> | ||
<meta charset="utf-8"> | ||
<meta content="width=device-width, initial-scale=1" name="viewport"> | ||
<title>DolFin - Article</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="{{url_for('static', filename='css/main.css')}}" rel="stylesheet" type="text/css"> | ||
<link href="{{url_for('static', filename='css/articles.css')}}" rel="stylesheet" type="text/css"> | ||
</head> | ||
|
||
<body> | ||
|
||
{% include 'components/navbar.html' %} | ||
{% include 'components/navbar.html' %} | ||
|
||
{% for article in articles %} | ||
<div class="container" id="mainTitleArea"> | ||
<div class="row"> | ||
<div class="col"> | ||
<h1 id="articleTitle">{{ article.title }}</h1> | ||
</div> | ||
<div class="col-sm-6 text-sm-start text-md-end"> | ||
<h2 id="articleDate">{{ article.date }}</h2> | ||
</div> | ||
</div> | ||
<svg height="12" id="articleBreak" width="100%" xmlns="http://www.w3.org/2000/svg"> | ||
<rect fill="#343A40" height="12" width="100%"></rect> | ||
</svg> | ||
</div> | ||
<div class="container" id="firstSection"> | ||
<div class="row"> | ||
<div class="col"> | ||
|
||
<p id="p1">{{ article.content1 }}</p> | ||
</div> | ||
<div class="col-md-6"> | ||
<p id="p2">{{ article.content2 }}</p> | ||
</div> | ||
</div> | ||
<div class="container" id="secondSection"> | ||
<div class="row"> | ||
<div class="col-md-6 text-sm-start" id="quoteBackground"> | ||
|
||
<h3 id="quoteText">"{{ article.quote1 }},</h3> | ||
<h3 id="quoteText2">{{ article.quote2 }}..."</h3> | ||
</div> | ||
<div class="col"> | ||
<p id="p3">{{ article.content3 }}</p> | ||
</div> | ||
</div> | ||
<p id="p4">{{ article.content4 }}</p> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
|
||
<div> | ||
<div class="container" id="mainTitleArea"> | ||
<div class="row"> | ||
<div class="col"> | ||
<h1 id="articleTitle">Article Title</h1> | ||
</div> | ||
<div class="col-sm-6 text-sm-start text-md-end"> | ||
<h2 id="articleDate">01/09/2023</h2> | ||
</div> | ||
</div> | ||
<svg height="12" id="articleBreak" width="100%" xmlns="http://www.w3.org/2000/svg"> | ||
<rect fill="#343A40" height="12" width="100%"></rect> | ||
</svg> | ||
</div> | ||
<div class="container" id="firstSection"> | ||
<div class="row"> | ||
<div class="col"> | ||
<p id="p1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur purus velit, mattis | ||
faucibus risus at, porta aliquet elit. Suspendisse mollis nulla dolor, nec eleifend urna | ||
malesuada sit amet. Sed vel elit dui. Curabitur fermentum, mi id porta rutrum, justo leo gravida | ||
ipsum, at maximus elit ante nec tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Curabitur purus velit.</p> | ||
</div> | ||
<div class="col-md-6"><img alt="Placeholder Image" id="articleImg" src="/static/img/fillerSquare.jpg"> | ||
</div> | ||
</div> | ||
<div> | ||
<p id="p2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur purus velit, mattis | ||
faucibus risus at, porta aliquet elit. Suspendisse mollis nulla dolor, nec eleifend urna malesuada | ||
sit amet. Sed vel elit dui. Curabitur fermentum, mi id porta rutrum, justo leo gravida ipsum, at | ||
maximus elit ante nec tortor.</p> | ||
<div class="container" id="secondSection"> | ||
<div class="row"> | ||
<div class="col-md-6 text-sm-start" id="quoteBackground"> | ||
<h3 id="quoteText">"Lorem ipsim dolor sit amet,</h3> | ||
<h3 id="quoteText2">consectetur adipiscing elit..."</h3> | ||
</div> | ||
<div class="col"> | ||
<p id="p3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur purus velit, | ||
mattis faucibus risus at, porta aliquet elit. Suspendisse mollis nulla dolor, nec | ||
eleifend urna malesuada sit amet. Sed vel elit dui. Curabitur fermentum, mi id porta | ||
rutrum, justo leo gravida ipsum, at maximus elit ante nec tortor. Lorem ipsum dolor sit | ||
amet, consectetur adipiscing elit. Curabitur purus velit , mattis faucibus risus at, | ||
porta aliquet elit.</p> | ||
</div> | ||
</div> | ||
<p id="p4">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur purus velit, mattis | ||
faucibus risus at, porta aliquet elit. Suspendisse mollis nulla dolor, nec eleifend urna | ||
malesuada sit amet. Sed vel elit dui. Curabitur fermentum, mi id porta rutrum, justo leo gravida | ||
ipsum, at maximus elit ante nec tortor.</p> | ||
</div> | ||
</div> | ||
</div>{% include 'components/footer.html' %} | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
{% include 'components/footer.html' %} | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
|
||
</div> | ||
</body> | ||
|
||
</html> | ||
</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
Binary file not shown.