rwhs / templates /schemes.html
pranit144's picture
Upload 4 files
6d210e2 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rainwater Harvesting Schemes for {{ state_name.title() }}</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: #f4f4f4;
color: #333;
}
.container {
max-width: 900px;
margin: auto;
background: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
h1, h2 {
color: #2c3e50;
text-align: center;
}
.llm-summary-section {
background-color: #e8f5e9; /* Light green background */
border: 1px solid #c8e6c9;
border-radius: 6px;
padding: 20px;
margin-bottom: 30px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.llm-summary-section h3 {
color: #388e3c; /* Darker green for headings */
margin-top: 0;
border-bottom: 2px solid #a5d6a7;
padding-bottom: 10px;
margin-bottom: 15px;
}
.llm-summary-section p {
margin: 10px 0;
line-height: 1.6;
}
.llm-summary-section strong {
color: #2e7d32;
}
.scheme-card {
background-color: #ecf0f1;
border: 1px solid #dcdcdc;
border-radius: 6px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.scheme-card h3 {
color: #3498db;
margin-top: 0;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
margin-bottom: 15px;
}
.scheme-short-summary {
background-color: #d6eaf8; /* Light blue for short summary */
border-left: 5px solid #3498db;
padding: 10px 15px;
margin: 15px 0 10px 0; /* Adjusted margin */
border-radius: 4px;
font-style: italic;
color: #2c3e50;
}
.scheme-user-benefit {
background-color: #fcf8e3; /* Light yellow for user benefit */
border-left: 5px solid #8a6d3b;
padding: 10px 15px;
margin: 10px 0 20px 0; /* Adjusted margin */
border-radius: 4px;
color: #6a4f2f;
}
.scheme-card p {
margin: 8px 0;
line-height: 1.5;
}
.scheme-card strong {
color: #555;
}
.scheme-card a {
color: #3498db;
text-decoration: none;
}
.scheme-card a:hover {
text-decoration: underline;
}
.no-schemes {
text-align: center;
color: #e74c3c;
font-size: 1.2em;
padding: 20px;
background-color: #ffe8e8;
border: 1px solid #e74c3c;
border-radius: 6px;
}
.back-button {
display: block;
width: fit-content;
margin: 20px auto;
padding: 10px 20px;
background-color: #5cb85c;
color: white;
text-decoration: none;
border-radius: 4px;
text-align: center;
transition: background-color 0.3s ease;
}
.back-button:hover {
background-color: #4cae4c;
}
</style>
</head>
<body>
<div class="container">
<h1>Rainwater Harvesting Schemes</h1>
<h2>for {{ state_name.title() }}</h2>
<div class="llm-summary-section">
<h3>LLM-Based Overview</h3>
<p>{{ llm_content.llm_summary | safe }}</p>
<h3>Gemini 2.0 Based Enhanced Analysis</h3>
<p>{{ llm_content.gemini_summary | safe }}</p>
<h3>Personalized Financial Advice</h3>
<p>{{ llm_content.financial_advice | safe }}</p>
<div style="margin-top: 20px; border-top: 1px dashed #a5d6a7; padding-top: 15px;">
<h4>Financial Advice Result:</h4>
<p>{{ llm_content.financial_result | safe }}</p>
</div>
</div>
{% if schemes %}
{% for scheme in schemes %}
<div class="scheme-card">
<h3>{{ scheme.scheme_name }} ({{ scheme.scheme_id }})</h3>
{# Gemini-generated short summary #}
{% if scheme.short_summary_gemini %}
<div class="scheme-short-summary">
<strong>What's this scheme about?</strong> {{ scheme.short_summary_gemini | safe }}
</div>
{% endif %}
{# Gemini-generated user benefit summary #}
{% if scheme.user_benefit_summary_gemini %}
<div class="scheme-user-benefit">
<strong>How it benefits you:</strong> {{ scheme.user_benefit_summary_gemini | safe }}
</div>
{% endif %}
<p><strong>Level:</strong> {{ scheme.scheme_level.title() }}</p>
<p><strong>Status:</strong> {{ scheme.status.title() }}</p>
<p><strong>Objective (from Data):</strong> {{ scheme.objective }}</p> {# Keeping original objective for comparison/reference #}
<p><strong>Implementing Agency:</strong> {{ scheme.implementing_agency }}</p>
<p><strong>Funding Agency:</strong> {{ scheme.funding_agency }}</p>
<p><strong>Launched On:</strong> {{ scheme.date_of_launch if scheme.date_of_launch else 'N/A' }}</p>
<p><strong>Last Updated:</strong> {{ scheme.last_updated if scheme.last_updated else 'N/A' }}</p>
<p><strong>Geographical Scope:</strong> State: {{ scheme.geographical_scope_state_ut.title() }}{% if scheme.geographical_scope_districts %}, Districts: {{ scheme.geographical_scope_districts.title() }}{% endif %}{% if scheme.geographical_scope_cities %}, Cities: {{ scheme.geographical_scope_cities.title() }}{% endif %}</p>
{% if scheme.subsidy_types_general %}
<p><strong>Subsidy Types:</strong> {{ scheme.subsidy_types_general.title() }}</p>
{% endif %}
{% if scheme.financial_assistance_type %}
<p><strong>Financial Assistance Type:</strong> {{ scheme.financial_assistance_type.title() }}</p>
{% if scheme.financial_assistance_value %}
<p><strong>Value:</strong> {{ scheme.financial_assistance_value }} {% if scheme.financial_assistance_unit %}{{ scheme.financial_assistance_unit }}{% endif %}</p>
{% endif %}
{% if scheme.financial_assistance_max_ceiling_INR is number %}
<p><strong>Max Ceiling (INR):</strong> {{ "{:,.2f}".format(scheme.financial_assistance_max_ceiling_INR) }}</p>
{% elif scheme.financial_assistance_max_ceiling_INR %}
<p><strong>Max Ceiling (INR):</strong> {{ scheme.financial_assistance_max_ceiling_INR }}</p>
{% endif %}
{% if scheme.financial_assistance_description %}
<p><strong>Financial Assistance Description:</strong> {{ scheme.financial_assistance_description }}</p>
{% endif %}
{% endif %}
<p><strong>Mandatory for New Construction:</strong> {{ 'Yes' if scheme.eligibility_is_mandatory_for_new_construction else 'No' }}</p>
{% if scheme.eligibility_beneficiary_types %}
<p><strong>Eligible Beneficiary Types:</strong> {{ scheme.eligibility_beneficiary_types.title() }}</p>
{% endif %}
{% if scheme.eligibility_conditions %}
<p><strong>Eligibility Conditions:</strong> {{ scheme.eligibility_conditions.title() }}</p>
{% endif %}
{% if scheme.eligibility_parameter %}
<p><strong>Eligibility Parameter:</strong> {{ scheme.eligibility_parameter.title() }} {{ scheme.eligibility_operator }} {{ scheme.eligibility_value_param }} {{ scheme.eligibility_unit_param }}</p>
{% endif %}
{% if scheme.benefits_persuasive_summary %}
<p><strong>Summary (from Data):</strong> {{ scheme.benefits_persuasive_summary }}</p>
{% endif %}
{% if scheme.benefits_long_term_savings_estimate %}
<p><strong>Long Term Savings Estimate:</strong> {{ scheme.benefits_long_term_savings_estimate }}</p>
{% endif %}
{% if scheme.benefits_non_financial_benefits %}
<p><strong>Non-Financial Benefits (from Data):</strong> {{ scheme.benefits_non_financial_benefits.title() }}</p>
{% endif %}
{% if scheme.application_process_summary %}
<p><strong>Application Process:</strong> {{ scheme.application_process_summary }}</p>
{% endif %}
{% if scheme.documents_required %}
<p><strong>Documents Required:</strong> {{ scheme.documents_required }}</p>
{% endif %}
<p><strong>Source Link:</strong> <a href="{{ scheme.source_link }}" target="_blank">{{ scheme.source_link }}</a></p>
<p><strong>Notes:</strong> {{ scheme.notes }}</p>
{% if scheme.NGO_Name %}
<h4>Associated NGOs:</h4>
<p><strong>Name:</strong> {{ scheme.NGO_Name }}</p>
{% if scheme.NGO_Phone %}<p><strong>Phone:</strong> {{ scheme.NGO_Phone }}</p>{% endif %}
{% if scheme.NGO_Email %}<p><strong>Email:</strong> {{ scheme.NGO_Email }}</p>{% endif %}
{% if scheme.NGO_Address %}<p><strong>Address:</strong> {{ scheme.NGO_Address.title() }}</p>{% endif %}
{% if scheme.NGO_Alternate_Number %}<p><strong>Alternate Phone:</strong> {{ scheme.NGO_Alternate_Number }}</p>{% endif %}
{% endif %}
</div>
{% endfor %}
{% else %}
<div class="no-schemes">
<p>{{ message }}</p>
</div>
{% endif %}
<a href="/" class="back-button">Go Back to Select Another State</a>
</div>
</body>
</html>