Sarat Chandra
intial commit
48eb4b5
raw
history blame
2.18 kB
<!DOCTYPE html>
<html>
<head>
<title>Stock Information App</title>
</head>
<body>
<h1>Stock Information App</h1>
<style>
/* Styling for the news table */
#newsTable {
border-collapse: collapse;
width: 100%;
font-family: Arial, sans-serif;
margin-top: 20px;
}
#newsTable th, #newsTable td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
#newsTable th {
background-color: #f2f2f2;
color: #333;
}
#newsTable tr:nth-child(even) {
background-color: #f2f2f2;
}
#newsTable tr:hover {
background-color: #ddd;
}
/* Styling for the "Read full article" link */
#newsTable a {
text-decoration: none;
color: #007bff;
}
#newsTable a:hover {
text-decoration: underline;
}
</style>
<form method="post">
<label for="ticker">Enter Ticker:</label>
<input type="text" id="ticker" name="ticker" required>
<button type="submit">Get Information</button>
</form>
{% if news_data %}
<table id="newsTable">
<thead>
<tr>
<th>Title</th>
<th>Sentiment</th>
<th>Summary</th>
<th>Full Article</th>
</tr>
</thead>
<tbody>
{% for article in news_data %}
<tr>
<td>{{ article.title }}</td>
<td>{{ article.sentiment }} (Score: {{ article.sentiment_score }})</td>
<td>{{ article.summary }}</td>
<td><a href="{{ article.link }}" target="_blank">Read full article</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if candlestick_graph %}
<h2>Stock Opening and Closing Data</h2>
{{ candlestick_graph | safe }}
{% endif %}
</body>
</html>