|
|
@@ -1,16 +1,16 @@
|
|
1
|
1
|
{% extends 'public_frontend/base.html' %}
|
|
2
|
|
-{% load static %}
|
|
3
|
|
-{% block title %}Home{% endblock %}
|
|
|
2
|
+{% load static i18n %}
|
|
|
3
|
+{% block title %}{% trans "Home" %}{% endblock %}
|
|
4
|
4
|
|
|
5
|
5
|
{% block content %}
|
|
6
|
6
|
<div class="grid gap-12 md:gap-16">
|
|
7
|
7
|
{# Hero Section #}
|
|
8
|
8
|
<section id="hero" class="bg-white rounded-lg shadow-md p-6 md:p-8 text-center">
|
|
9
|
|
- <h1 class="text-3xl md:text-4xl font-bold mb-2">Streamline Your Factory's Recycling</h1>
|
|
10
|
|
- <p class="text-gray-600 max-w-2xl mx-auto mb-6">We partner with businesses like yours to manage scrap materials efficiently. Browse listings, request a pickup, and turn your waste into a resource.</p>
|
|
|
9
|
+ <h1 class="text-3xl md:text-4xl font-bold mb-2">{% trans "Streamline Your Factory's Recycling" %}</h1>
|
|
|
10
|
+ <p class="text-gray-600 max-w-2xl mx-auto mb-6">{% trans "We partner with businesses like yours to manage scrap materials efficiently. Browse listings, request a pickup, and turn your waste into a resource." %}</p>
|
|
11
|
11
|
<div class="flex gap-3 justify-center">
|
|
12
|
|
- <a href="{% url 'public_frontend:pickup_request' %}" class="btn-primary">Request a Pickup</a>
|
|
13
|
|
- <a href="#listings" class="btn-outline">Browse Listings</a>
|
|
|
12
|
+ <a href="{% url 'public_frontend:pickup_request' %}" class="btn-primary">{% trans "Request a Pickup" %}</a>
|
|
|
13
|
+ <a href="#listings" class="btn-outline">{% trans "Browse Listings" %}</a>
|
|
14
|
14
|
</div>
|
|
15
|
15
|
</section>
|
|
16
|
16
|
|
|
|
@@ -18,14 +18,14 @@
|
|
18
|
18
|
{% if services %}
|
|
19
|
19
|
<section id="services">
|
|
20
|
20
|
<div class="flex items-center justify-between mb-3">
|
|
21
|
|
- <h2 class="text-2xl font-semibold">Our Services</h2>
|
|
|
21
|
+ <h2 class="text-2xl font-semibold">{% trans "Our Services" %}</h2>
|
|
22
|
22
|
</div>
|
|
23
|
23
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
|
24
|
24
|
{% for s in services %}
|
|
25
|
25
|
<a href="{% url 'public_frontend:service_detail' s.pk %}" class="block p-4 bg-white rounded-lg shadow-md hover:bg-gray-50 transition flex items-start gap-4">
|
|
26
|
26
|
<img src="{% static 'service_icons/' %}{{ s.image_name }}" alt="{{ s.title }} icon" class="w-12 h-12 object-contain"/>
|
|
27
|
27
|
<div>
|
|
28
|
|
- <div class="font-medium">{{ s.title }}</div>
|
|
|
28
|
+ <div class="font-medium">{{ s.get_title_display }}</div>
|
|
29
|
29
|
<div class="text-sm text-gray-600">{{ s.description }}</div>
|
|
30
|
30
|
</div>
|
|
31
|
31
|
</a>
|
|
|
@@ -37,8 +37,8 @@
|
|
37
|
37
|
{# Materials Section #}
|
|
38
|
38
|
<section id="materials">
|
|
39
|
39
|
<div class="flex items-center justify-between mb-3">
|
|
40
|
|
- <h2 class="text-2xl font-semibold">Materials We Accept</h2>
|
|
41
|
|
- <a href="{% url 'public_frontend:materials_list' %}" class="text-blue-700 hover:underline">View all</a>
|
|
|
40
|
+ <h2 class="text-2xl font-semibold">{% trans "Materials We Accept" %}</h2>
|
|
|
41
|
+ <a href="{% url 'public_frontend:materials_list' %}" class="text-blue-700 hover:underline">{% trans "View all" %}</a>
|
|
42
|
42
|
</div>
|
|
43
|
43
|
<div class="bg-white rounded-lg shadow-md p-4">
|
|
44
|
44
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
|
@@ -48,7 +48,7 @@
|
|
48
|
48
|
<p class="text-sm text-gray-500">{{ m.category.name }}</p>
|
|
49
|
49
|
</div>
|
|
50
|
50
|
{% empty %}
|
|
51
|
|
- <p class="text-gray-500 col-span-full">No materials published.</p>
|
|
|
51
|
+ <p class="text-gray-500 col-span-full">{% trans "No materials published." %}</p>
|
|
52
|
52
|
{% endfor %}
|
|
53
|
53
|
</div>
|
|
54
|
54
|
</div>
|
|
|
@@ -57,18 +57,18 @@
|
|
57
|
57
|
{# Open Listings Section #}
|
|
58
|
58
|
<section id="listings">
|
|
59
|
59
|
<div class="flex items-center justify-between mb-3">
|
|
60
|
|
- <h2 class="text-2xl font-semibold">Open Listings</h2>
|
|
61
|
|
- <a href="{% url 'public_frontend:listings_list' %}" class="text-blue-700 hover:underline">Browse all</a>
|
|
|
60
|
+ <h2 class="text-2xl font-semibold">{% trans "Open Listings" %}</h2>
|
|
|
61
|
+ <a href="{% url 'public_frontend:listings_list' %}" class="text-blue-700 hover:underline">{% trans "Browse all" %}</a>
|
|
62
|
62
|
</div>
|
|
63
|
63
|
<div class="grid md:grid-cols-3 gap-4">
|
|
64
|
64
|
{% for l in listings %}
|
|
65
|
65
|
<a href="{% url 'public_frontend:listing_detail' l.id %}" class="block p-4 border rounded bg-white hover:bg-gray-50 transition">
|
|
66
|
|
- <div class="text-sm text-gray-500">Ends {{ l.ends_at|default:'—' }}</div>
|
|
|
66
|
+ <div class="text-sm text-gray-500">{% trans "Ends" %} {{ l.ends_at|default:'—' }}</div>
|
|
67
|
67
|
<div class="font-medium">{{ l.title }}</div>
|
|
68
|
68
|
<div class="text-sm text-gray-600 line-clamp-2">{{ l.description|truncatechars:120 }}</div>
|
|
69
|
69
|
</a>
|
|
70
|
70
|
{% empty %}
|
|
71
|
|
- <div class="text-gray-500 p-4 bg-white rounded-lg shadow-md col-span-full">No public listings at the moment.</div>
|
|
|
71
|
+ <div class="text-gray-500 p-4 bg-white rounded-lg shadow-md col-span-full">{% trans "No public listings at the moment." %}</div>
|
|
72
|
72
|
{% endfor %}
|
|
73
|
73
|
</div>
|
|
74
|
74
|
</section>
|
|
|
@@ -78,8 +78,8 @@
|
|
78
|
78
|
{# Blog Section #}
|
|
79
|
79
|
<section id="blog">
|
|
80
|
80
|
<div class="flex items-center justify-between mb-3">
|
|
81
|
|
- <h2 class="text-2xl font-semibold">Industry Insights</h2>
|
|
82
|
|
- <a href="{% url 'public_frontend:blog_list' %}" class="text-blue-700 hover:underline">View all</a>
|
|
|
81
|
+ <h2 class="text-2xl font-semibold">{% trans "Industry Insights" %}</h2>
|
|
|
82
|
+ <a href="{% url 'public_frontend:blog_list' %}" class="text-blue-700 hover:underline">{% trans "View all" %}</a>
|
|
83
|
83
|
</div>
|
|
84
|
84
|
<div class="grid md:grid-cols-3 gap-4">
|
|
85
|
85
|
{% for p in posts %}
|
|
|
@@ -89,36 +89,36 @@
|
|
89
|
89
|
<div class="text-sm text-gray-600 line-clamp-2">{{ p.excerpt|default:p.content|striptags|truncatechars:120 }}</div>
|
|
90
|
90
|
</a>
|
|
91
|
91
|
{% empty %}
|
|
92
|
|
- <div class="text-gray-500 p-4 bg-white rounded-lg shadow-md col-span-full">No posts yet.</div>
|
|
|
92
|
+ <div class="text-gray-500 p-4 bg-white rounded-lg shadow-md col-span-full">{% trans "No posts yet." %}</div>
|
|
93
|
93
|
{% endfor %}
|
|
94
|
94
|
</div>
|
|
95
|
95
|
</section>
|
|
96
|
96
|
|
|
97
|
97
|
{# Contact Section #}
|
|
98
|
98
|
<section id="contact">
|
|
99
|
|
- <h2 class="text-2xl font-semibold mb-3">Contact Us</h2>
|
|
|
99
|
+ <h2 class="text-2xl font-semibold mb-3">{% trans "Contact Us" %}</h2>
|
|
100
|
100
|
<form method="post" action="{% url 'public_frontend:contact' %}" class="bg-white rounded-lg shadow-md p-4 grid gap-4">
|
|
101
|
101
|
{% csrf_token %}
|
|
102
|
102
|
<div class="grid md:grid-cols-2 gap-4">
|
|
103
|
103
|
<div>
|
|
104
|
|
- <label class="block text-sm font-medium mb-1">Name</label>
|
|
|
104
|
+ <label class="block text-sm font-medium mb-1">{% trans "Name" %}</label>
|
|
105
|
105
|
<input type="text" name="name" value="{{ contact_form.name.value|default:'' }}" required class="w-full border rounded px-3 py-2">
|
|
106
|
106
|
</div>
|
|
107
|
107
|
<div>
|
|
108
|
|
- <label class="block text-sm font-medium mb-1">Email</label>
|
|
|
108
|
+ <label class="block text-sm font-medium mb-1">{% trans "Email" %}</label>
|
|
109
|
109
|
<input type="email" name="email" value="{{ contact_form.email.value|default:'' }}" required class="w-full border rounded px-3 py-2">
|
|
110
|
110
|
</div>
|
|
111
|
111
|
</div>
|
|
112
|
112
|
<div>
|
|
113
|
|
- <label class="block text-sm font-medium mb-1">Subject</label>
|
|
|
113
|
+ <label class="block text-sm font-medium mb-1">{% trans "Subject" %}</label>
|
|
114
|
114
|
<input type="text" name="subject" value="{{ contact_form.subject.value|default:'' }}" class="w-full border rounded px-3 py-2">
|
|
115
|
115
|
</div>
|
|
116
|
116
|
<div>
|
|
117
|
|
- <label class="block text-sm font-medium mb-1">Message</label>
|
|
|
117
|
+ <label class="block text-sm font-medium mb-1">{% trans "Message" %}</label>
|
|
118
|
118
|
<textarea name="message" rows="5" class="w-full border rounded px-3 py-2">{{ contact_form.message.value|default:'' }}</textarea>
|
|
119
|
119
|
</div>
|
|
120
|
120
|
<div>
|
|
121
|
|
- <button class="btn-primary" type="submit">Send Message</button>
|
|
|
121
|
+ <button class="btn-primary" type="submit">{% trans "Send Message" %}</button>
|
|
122
|
122
|
</div>
|
|
123
|
123
|
</form>
|
|
124
|
124
|
</section>
|