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
203 changes: 178 additions & 25 deletions static/style.css
Original file line number Diff line number Diff line change
@@ -1,47 +1,200 @@
:root {
--primary-color: #4a90e2;
--secondary-color: #f5f7fa;
--accent-color: #50e3c2;
--text-color: #333;
--light-text: #777;
--white: #ffffff;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--border-radius: 8px;
}

body {
font-family: sans-serif;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-color: var(--secondary-color);
color: var(--text-color);
line-height: 1.6;
}

header {
background-color: #f0f0f0;
padding: 1em;
text-align: center;
background-color: var(--white);
padding: 1rem 2rem;
box-shadow: var(--shadow);
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
z-index: 1000;
}

@media screen and (max-width: 600px) {
nav, .add-post form {
flex-direction: column;
}
nav a, nav form {
margin-bottom: 0.5em;
}
header h1 a {
text-decoration: none;
color: var(--primary-color);
font-weight: bold;
font-size: 1.5rem;
}

main {
padding: 1em;
nav {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}

nav a {
text-decoration: none;
color: var(--text-color);
font-weight: 500;
transition: color 0.3s;
}

nav a:hover {
color: var(--primary-color);
}

.add-post form {
nav form {
display: flex;
flex-direction: column;
align-items: center;
}

nav input[type="text"] {
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: var(--border-radius) 0 0 var(--border-radius);
outline: none;
}

.add-post input,
.add-post textarea {
margin-bottom: 1em;
padding: 0.5em;
nav input[type="submit"] {
padding: 0.5rem 1rem;
border: none;
background-color: var(--primary-color);
color: var(--white);
border-radius: 0 var(--border-radius) var(--border-radius) 0;
cursor: pointer;
}

.posts article {
border-bottom: 1px solid #ccc;
margin-bottom: 1em;
padding-bottom: 1em;
main {
max-width: 1000px;
margin: 2rem auto;
padding: 0 1rem;
}

.card {
background: var(--white);
padding: 1.5rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
margin-bottom: 2rem;
}

article {
background: var(--white);
padding: 1.5rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
margin-bottom: 1.5rem;
}

article h2 a {
color: var(--primary-color);
text-decoration: none;
}

.btn {
display: inline-block;
padding: 0.6rem 1.2rem;
background-color: var(--primary-color);
color: var(--white);
text-decoration: none;
border-radius: var(--border-radius);
transition: background 0.3s;
border: none;
cursor: pointer;
font-size: 1rem;
}

.btn:hover {
background-color: #357abd;
}

.btn-secondary {
background-color: #6c757d;
}

.btn-secondary:hover {
background-color: #5a6268;
}

footer {
background-color: #f0f0f0;
padding: 1em;
text-align: center;
padding: 2rem;
color: var(--light-text);
background-color: var(--white);
margin-top: 2rem;
}

/* Chat/Messages Styles */
.message-bubble {
padding: 0.8rem 1rem;
border-radius: 15px;
margin-bottom: 0.5rem;
max-width: 70%;
}

.message-received {
background-color: #e9ecef;
align-self: flex-start;
}

.message-sent {
background-color: var(--primary-color);
color: var(--white);
align-self: flex-end;
margin-left: auto;
}

.messages-container {
display: flex;
flex-direction: column;
}

/* Podcast Styles */
.video-container {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
height: 0;
overflow: hidden;
margin-top: 1rem;
}

.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

/* Form Styles */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
width: 100%;
padding: 0.8rem;
margin: 0.5rem 0 1rem 0;
border: 1px solid #ddd;
border-radius: var(--border-radius);
box-sizing: border-box;
}

@media screen and (max-width: 768px) {
header {
flex-direction: column;
gap: 1rem;
}
}
102 changes: 84 additions & 18 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,47 @@ <h1><a href="{{ url_for('index') }}">{{ _('CARE') }}</a></h1>
<a href="{{ url_for('login') }}">{{ _('Login') }}</a>
<a href="{{ url_for('register') }}">{{ _('Register') }}</a>
{% else %}
<a href="{{ url_for('user', username=current_user.username) }}">{{ _('Profile') }}</a>
<a href="{{ url_for('messages') }}">{{ _('Messages') }}</a>
<a href="{{ url_for('qa_sessions') }}">{{ _('Q&A Sessions') }}</a>
<a href="{{ url_for('qa_sessions') }}">{{ _('Q&A') }}</a>
<a href="{{ url_for('resources') }}">{{ _('Resources') }}</a>
<a href="{{ url_for('podcasts') }}">{{ _('Podcasts') }}</a>
<a href="{{ url_for('visualizations') }}">{{ _('Visualizations') }}</a>
<a href="{{ url_for('who_indicators') }}">{{ _('WHO Data') }}</a>
<a href="{{ url_for('unesco_data') }}">{{ _('UNESCO Data') }}</a>
<a href="{{ url_for('chatbot') }}">{{ _('Chatbot') }}</a>
<a href="{{ url_for('games') }}">{{ _('Games') }}</a>
<a href="{{ url_for('fitness_game') }}">{{ _('Fitness Game') }}</a>
<div class="dropdown">
<a href="#" class="dropbtn">{{ _('Tools') }}</a>
<div class="dropdown-content">
<a href="{{ url_for('visualizations') }}">{{ _('Visualizations') }}</a>
<a href="{{ url_for('who_indicators') }}">{{ _('WHO Data') }}</a>
<a href="{{ url_for('unesco_data') }}">{{ _('UNESCO Data') }}</a>
<a href="{{ url_for('chatbot') }}">{{ _('Chatbot') }}</a>
<a href="{{ url_for('games') }}">{{ _('Games') }}</a>
<a href="{{ url_for('fitness_game') }}">{{ _('Fitness Game') }}</a>
</div>
</div>
<a href="{{ url_for('user', username=current_user.username) }}">{{ current_user.username }}</a>
<a href="{{ url_for('logout') }}">{{ _('Logout') }}</a>
<span id="comment_count" style="visibility: hidden;"></span>
<span id="comment_count" class="badge" style="display: none;"></span>
{% endif %}
<form action="{{ url_for('search') }}" method="get">
{{ g.search_form.q(size=20, placeholder=_('Search')) }}
<input type="submit" value="{{ _('Go') }}">
</form>
<a href="{{ url_for('set_language', language='en') }}">English</a>
<a href="{{ url_for('set_language', language='es') }}">Español</a>
<div class="lang-switch">
<a href="{{ url_for('set_language', language='en') }}">EN</a> |
<a href="{{ url_for('set_language', language='es') }}">ES</a>
</div>
</nav>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</header>
<hr>

{% with messages = get_flashed_messages() %}
{% if messages %}
<ul>
<div class="flash-messages">
{% for message in messages %}
<li>{{ message }}</li>
<div class="flash-message">{{ message }}</div>
{% endfor %}
</ul>
</div>
{% endif %}
{% endwith %}

<main>
{% if current_user.is_authenticated %}
<script>
Expand All @@ -64,16 +72,74 @@ <h1><a href="{{ url_for('index') }}">{{ _('CARE') }}</a></h1>
);
}, 10000);
function set_comment_count(n) {
$('#comment_count').text(n);
$('#comment_count').css('visibility', n ? 'visible' : 'hidden');
var countEl = $('#comment_count');
countEl.text(n);
if (n > 0) {
countEl.show();
} else {
countEl.hide();
}
}
</script>
{% endif %}
{% block content %}{% endblock %}
</main>

<footer>
<p>&copy; 2025 CARE</p>
<p>&copy; 2025 CARE - Global Well-being & Education</p>
</footer>

<style>
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
border-radius: 4px;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown:hover .dropdown-content {display: block;}

.badge {
background-color: red;
color: white;
padding: 2px 6px;
border-radius: 50%;
font-size: 0.75rem;
vertical-align: top;
margin-left: -5px;
}

.flash-messages {
max-width: 1000px;
margin: 1rem auto;
padding: 0 1rem;
}
.flash-message {
background-color: #d4edda;
color: #155724;
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid #c3e6cb;
border-radius: 4px;
}
.lang-switch {
font-size: 0.8rem;
margin-left: 1rem;
}
</style>
{% block scripts %}{% endblock %}
</body>
</html>
Loading