mirror of
				https://github.com/StefBuwalda/cal_counter.git
				synced 2025-11-03 21:29:59 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			67 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% extends 'base.html' %}
 | 
						||
 | 
						||
{% block title %}Daily Calorie Dashboard{% endblock %}
 | 
						||
 | 
						||
{% block content %}
 | 
						||
<link rel="stylesheet" href="{{ url_for('static', filename='css/macros.css') }}">
 | 
						||
 | 
						||
<div class="container my-4">
 | 
						||
    <h2 class="mb-3">Daily Calorie Dashboard</h2>
 | 
						||
 | 
						||
    <!-- Macro Summary -->
 | 
						||
    <div class="card p-3 mb-3">
 | 
						||
        <h5>Macros</h5>
 | 
						||
        {% for macro in macros %}
 | 
						||
        <div class="mb-2">
 | 
						||
            <span class="macro-text">{{ macro.name }}: {{ macro.current }} / {{ macro.target }}</span>
 | 
						||
            <div class="progress rounded" style="height: 24px;">
 | 
						||
                <div class="progress-bar bg-danger macro-bar" role="progressbar"
 | 
						||
                    style="width: {{ macro.bar_width_overflow }}%">
 | 
						||
                    {{ macro.current - macro.target }}{{ macro.unit }}
 | 
						||
                </div>
 | 
						||
                <div class="progress-bar bg-success macro-bar" role="progressbar" style="width: {{ macro.bar_width }}%">
 | 
						||
                    {{ macro.current }}{{ macro.unit }}
 | 
						||
                </div>
 | 
						||
            </div>
 | 
						||
        </div>
 | 
						||
        {% endfor %}
 | 
						||
    </div>
 | 
						||
 | 
						||
    <!-- Items List -->
 | 
						||
    <div class="card p-3">
 | 
						||
        <h5>Items Eaten Today</h5>
 | 
						||
        <div class="list-group list-group-flush">
 | 
						||
            {% for log in logs %}
 | 
						||
            <div class="list-group-item item-row d-flex justify-content-between align-items-center bg-dark text-light">
 | 
						||
                <span>({{ log.amount }}g) {{ log.food_item.name }}</span>
 | 
						||
                <span>{{ log.food_item.energy_100 }} kcal</span>
 | 
						||
            </div>
 | 
						||
            {% endfor %}
 | 
						||
        </div>
 | 
						||
    </div>
 | 
						||
 | 
						||
 | 
						||
</div>
 | 
						||
 | 
						||
<!-- Bottom Navigation Buttons -->
 | 
						||
<div class="container-fluid fixed-bottom py-2">
 | 
						||
    <div class="d-flex p-3">
 | 
						||
        <!-- Left Button -->
 | 
						||
        <a href="" class="btn btn-outline-light flex-fill me-2 rounded-pill">
 | 
						||
            ‹ Previous
 | 
						||
        </a>
 | 
						||
 | 
						||
        <!-- Center Button (highlighted) -->
 | 
						||
        <a href="{{ url_for('add_meal.step1', meal_type=0) }}"
 | 
						||
            class="btn btn-success flex-fill mx-2 fw-bold rounded-pill">
 | 
						||
            + Add Item
 | 
						||
        </a>
 | 
						||
 | 
						||
        <!-- Right Button -->
 | 
						||
        <a href="" class="btn btn-outline-light flex-fill ms-2 rounded-pill">
 | 
						||
            Next ›
 | 
						||
        </a>
 | 
						||
    </div>
 | 
						||
</div>
 | 
						||
 | 
						||
{% endblock %} |