diff --git a/addons/dine360_dashboard/static/src/css/login_style.css b/addons/dine360_dashboard/static/src/css/login_style.css index b374b63..1670d2e 100644 --- a/addons/dine360_dashboard/static/src/css/login_style.css +++ b/addons/dine360_dashboard/static/src/css/login_style.css @@ -94,17 +94,22 @@ /* Form Inputs */ .form-control:focus { - border-color: #d6111e !important; - box-shadow: 0 0 0 3px rgba(214, 17, 30, 0.2) !important; - background: rgba(255, 255, 255, 0.1) !important; + border-color: #FECD4F !important; + box-shadow: 0 0 0 3px rgba(254, 205, 79, 0.2) !important; + background: #ffffff !important; } .o_login_form_container label { - color: rgba(255, 255, 255, 0.8) !important; + color: #ffffff !important; margin-bottom: 8px; font-weight: 500; } +.o_login_form_container a, +.o_login_form_container .btn-link { + color: #ffffff !important; +} + .form-control { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; @@ -251,4 +256,8 @@ body.o_custom_login_body .o_login_main_wrapper { border: 1px solid rgba(255, 255, 255, 0.1) !important; z-index: 2; max-width: 400px; -} \ No newline at end of file +} +.oe_website_login_container label, +.oe_website_login_container a { + color: #ffffff !important; +} diff --git a/addons/dine360_theme_chennora/__manifest__.py b/addons/dine360_theme_chennora/__manifest__.py index f63fd21..060a129 100644 --- a/addons/dine360_theme_chennora/__manifest__.py +++ b/addons/dine360_theme_chennora/__manifest__.py @@ -11,6 +11,8 @@ 'views/about_page.xml', # About Page 'views/contact_page.xml',# Contact Page 'views/faq_page.xml', # FAQ Page + 'views/blog_page.xml', # Blog Page + 'views/blog_detail_page.xml', # Blog Detail Page 'views/shop_page.xml', # Shop Page 'views/product_details_page.xml', # Customized Product Details Page 'views/product_views.xml', # Product Form custom fields diff --git a/addons/dine360_theme_chennora/controllers/main.py b/addons/dine360_theme_chennora/controllers/main.py index 176afc9..2867f94 100644 --- a/addons/dine360_theme_chennora/controllers/main.py +++ b/addons/dine360_theme_chennora/controllers/main.py @@ -56,3 +56,37 @@ class ContactController(http.Controller): pass return request.render('dine360_theme_chennora.contact_thank_you') + +class BlogController(http.Controller): + @http.route(['/blog'], type='http', auth='public', website=True) + def blog_list(self, **post): + blog_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True)]) + return request.render('dine360_theme_chennora.blog_page', { + 'blog_posts': blog_posts, + }) + + @http.route(['/blog/'], type='http', auth='public', website=True) + def blog_detail(self, slug, **post): + blog_post = request.env['chennora.blog.post'].sudo().search([('slug', '=', slug), ('active', '=', True)], limit=1) + if not blog_post: + return request.not_found() + + recent_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True), ('id', '!=', blog_post.id)], limit=3) + + # Get dynamic categories and counts + all_posts = request.env['chennora.blog.post'].sudo().search([('active', '=', True)]) + categories = {} + for p in all_posts: + if p.category: + categories[p.category] = categories.get(p.category, 0) + 1 + + return request.render('dine360_theme_chennora.blog_detail_layout', { + 'blog_title': blog_post.title, + 'blog_img': blog_post.image, + 'blog_date': blog_post.date.strftime('%B %d, %Y') if blog_post.date else '', + 'blog_category': blog_post.category, + 'blog_content': blog_post.content, + 'recent_posts': recent_posts, + 'categories': categories, + }) + diff --git a/addons/dine360_theme_chennora/data/website_data.xml b/addons/dine360_theme_chennora/data/website_data.xml index 99d1c04..de43b34 100644 --- a/addons/dine360_theme_chennora/data/website_data.xml +++ b/addons/dine360_theme_chennora/data/website_data.xml @@ -18,5 +18,13 @@ FAQ + + + /blog + True + + Blog + + diff --git a/addons/dine360_theme_chennora/models/__init__.py b/addons/dine360_theme_chennora/models/__init__.py index 2757b3a..d759253 100644 --- a/addons/dine360_theme_chennora/models/__init__.py +++ b/addons/dine360_theme_chennora/models/__init__.py @@ -1,2 +1,3 @@ # -*- coding: utf-8 -*- from . import product_template +from . import blog_post diff --git a/addons/dine360_theme_chennora/models/blog_post.py b/addons/dine360_theme_chennora/models/blog_post.py new file mode 100644 index 0000000..c128554 --- /dev/null +++ b/addons/dine360_theme_chennora/models/blog_post.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields, api +from datetime import datetime + +class ChennoraBlogPost(models.Model): + _name = 'chennora.blog.post' + _description = 'Chennora Blog Post' + _order = 'date desc, id desc' + + title = fields.Char(string='Title', required=True) + slug = fields.Char(string='URL Slug', required=True, help="Used in the URL e.g. 'my-first-post'") + category = fields.Char(string='Category', default='Restaurant Spotlight') + excerpt = fields.Text(string='Excerpt', help="Short summary for the blog card") + content = fields.Html(string='Content', sanitize=True) + image = fields.Char(string='Image URL', default='/dine360_theme_chennora/static/src/img/blog-1.png') + date = fields.Date(string='Publish Date', default=fields.Date.context_today) + active = fields.Boolean(default=True) + + # Computed fields for the blog card date badge + day = fields.Char(compute='_compute_date_parts', store=True) + month = fields.Char(compute='_compute_date_parts', store=True) + + _sql_constraints = [ + ('slug_unique', 'unique(slug)', 'The slug must be unique!') + ] + + @api.depends('date') + def _compute_date_parts(self): + for record in self: + if record.date: + dt = fields.Date.from_string(record.date) + record.day = dt.strftime('%d') + record.month = dt.strftime('%b').upper() + else: + record.day = '' + record.month = '' diff --git a/addons/dine360_theme_chennora/static/src/scss/theme.scss b/addons/dine360_theme_chennora/static/src/scss/theme.scss index f5ddfd7..8def81a 100644 --- a/addons/dine360_theme_chennora/static/src/scss/theme.scss +++ b/addons/dine360_theme_chennora/static/src/scss/theme.scss @@ -1031,8 +1031,6 @@ section h2.display-4 { &:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); - background-color: #04121D; - color: white; .blog-img-wrapper { img { @@ -1040,31 +1038,13 @@ section h2.display-4 { } .date-badge { - border: 2px dashed #FECD4F; - background: #2BB1A5 !important; - - span:first-child { - color: white !important; - } - - span:last-child { - color: #04121D !important; - } + border: 2px dashed #2BB1A5; } } .blog-body { h4 { - color: white; - } - - .blog-excerpt { - color: rgba(255, 255, 255, 0.7); - } - - .category-line { - background: white; - color: #04121D; + color: #2BB1A5; } } } diff --git a/addons/dine360_theme_chennora/views/blog_detail_page.xml b/addons/dine360_theme_chennora/views/blog_detail_page.xml new file mode 100644 index 0000000..51e7939 --- /dev/null +++ b/addons/dine360_theme_chennora/views/blog_detail_page.xml @@ -0,0 +1,118 @@ + + + + + + + diff --git a/addons/dine360_theme_chennora/views/blog_page.xml b/addons/dine360_theme_chennora/views/blog_page.xml new file mode 100644 index 0000000..c3f3c75 --- /dev/null +++ b/addons/dine360_theme_chennora/views/blog_page.xml @@ -0,0 +1,65 @@ + + + + + + diff --git a/addons/dine360_theme_chennora/views/pages.xml b/addons/dine360_theme_chennora/views/pages.xml index 2b051fb..aeb9a3d 100644 --- a/addons/dine360_theme_chennora/views/pages.xml +++ b/addons/dine360_theme_chennora/views/pages.xml @@ -538,6 +538,7 @@
+ @@ -555,59 +556,25 @@
- -
-
-
- Blog 1 -
- 29 - JAN + +
+
+
+ +
+ + +
+
+
-
- Category: Restaurant Spotlight -

Looking For Indian Food Near Castlemore? Here's Wh...

-

Searching for Indian food near Castlemore? Discover why Chennora Brampton is a top choice for flavour, comfort, and conv...

-
-
- - -
-
-
- Blog 2 -
- 28 - JAN -
-
-
- Category: Restaurant Spotlight -

Chennora Brampton: A Modern Indian Kitchen Bar Red...

-

Explore how Chennora Brampton blends traditional Indian flavours with a modern kitchen bar experience near McVean Dr, Br...

-
-
-
- - -
-
-
- Blog 3 -
- 24 - JAN -
-
-
- Category: Family Dining -

Chennora Brampton is perfect for family dinners

-

Discover why Chennora Brampton is perfect for family dinners and group outings with family-friendly atmosphere, shareabl...

-
-
-
+
diff --git a/blog_posts_sample.json b/blog_posts_sample.json new file mode 100644 index 0000000..dacf073 --- /dev/null +++ b/blog_posts_sample.json @@ -0,0 +1,20 @@ +[ + { + "title": "Looking For Indian Food Near Castlemore?", + "slug": "indian-food-castlemore", + "category": "Restaurant Spotlight", + "excerpt": "Searching for Indian food near Castlemore? Discover why Chennora is the best.", + "image": "/dine360_theme_chennora/static/src/img/blog-1.png", + "date": "2026-02-29", + "content": "Searching for Indian food near Castlemore? Whether you're a local resident or just passing through the area, finding a restaurant that perfectly balances traditional flavors with a welcoming atmosphere can be a challenge. That's where Chennora Brampton comes in. At Chennora, we don't believe in cutting corners. Our chefs use traditional recipes and the finest spices imported directly from India to ensure every bite takes you back to the streets of Chennai." + }, + { + "title": "Modern Indian Kitchen Bar", + "slug": "modern-indian-kitchen-bar", + "category": "Restaurant Spotlight", + "excerpt": "Explore the vibrant Kitchen Bar experience at Chennora Brampton.", + "image": "/dine360_theme_chennora/static/src/img/blog-2.png", + "date": "2026-02-28", + "content": "

Authentic Flavors

The culinary landscape of Brampton is changing, and Chennora is at the forefront of this revolution. We've combined the soulful flavors of a traditional Indian kitchen with the vibrant energy of a modern bar to create a unique Kitchen Bar concept.

" + } +]