Commit b2afdd5f authored by prakruthy's avatar prakruthy
Browse files

base code for home and events screen

parents
from . import models
# -*- coding: utf-8 -*-
{
'name': 'Website Breitsch',
'category': 'Website',
'summary': 'Odoo Website for Breitsch',
'version': '15.0.1.0.0',
'description': """
Breitsch
""",
'depends': ['theme_default',
'website', 'website_sale', 'website_event'],
'data': [
'views/home.xml',
'views/header.xml',
'views/footer.xml',
'views/event_page_inherit.xml',
],
'installable': True,
'application': True,
'assets': {
'web.assets_frontend': [
'website_breitsch/static/src/css/home_style.css',
]}
}
# from . import home_page
import base64
from odoo import _, api, fields, models, modules, tools
from odoo.modules.module import get_module_resource
from odoo.addons.website.tools import get_video_embed_code
from odoo.exceptions import ValidationError
class HomePage(models.Model):
_inherit = 'home.page'
_description = 'Home Page'
_order = 'sequence'
name = fields.Char(default='Home Page Content')
sequence = fields.Integer(default=1)
active_website = fields.Many2one('website', string='Website', required=1)
_sql_constraints = [('sequence', 'unique(sequence)',
'You can not create two records please update existing one or delete the record first record')]
class NewsImage(models.Model):
_name = 'news.image'
_inherit = ['image.mixin']
_order = 'sequence, id'
/*backgroung colour on header*/
#top > .navbar {
background-color: #EB4B4C;
}
#top_menu_container {
font-family: Redressed-Regular !important;
}
/*hide contact us button on header*/
.s_text_block > .container a {
display: none;
}
@font-face{
font-family: 'Redressed-Regular';
src: url(../fonts/Redressed-Regular.ttf);
}
.navbar-brand, .navbar-text, .navbar .nav-link,
.navbar a.js_change_lang span, .navbar a.o_add_language {
font-family: Redressed-Regular;
}
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="index_topbar_custom" inherit_id="website_event.index_topbar" name="Event index topbar"
customize_show="True" active="True">
<xpath expr="//div[@id='oe_structure_we_index_1']" position="inside">
</xpath>
</template>
<template id="add_event_banner" inherit_id="website_event.index" name="Event top banner" customize_show="True" active="True">
<xpath expr="//div[@id='oe_structure_we_index_1']" position="inside">
<section class="s_banner parallax s_parallax_is_fixed o_colored_level pb256 pt256" data-scroll-background-ratio="1" data-snippet="s_banner" data-name="Banner">
<span class="s_parallax_bg oe_img_bg"
style="background-image: url('/website_breitsch/static/description/event_banner.jpeg'); background-position: 50% 0;"/>
</section>
</xpath>
</template>
</odoo>
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="footer_breitsch_custom" inherit_id="website.layout" name="Default">
<xpath expr="//div[hasclass('o_footer_copyright')]" position="replace"></xpath>
<xpath expr="//div[@id='footer']" position="replace">
<div id="footer" class="oe_structure oe_structure_solo" t-ignore="true" t-if="not no_footer" style="background-color:#EB4B4C;">
<section class="s_text_block pt40 pb16" data-snippet="s_text_block" data-name="Text">
<div class="container">
<div class="row custom_footer">
<t t-foreach="request.env['res.company'].sudo().search([])" t-as="doc">
<div class="col-lg-6 pb16" style="max-height:200px; min-height:200px; text-align: left; ">
<b style="font-size:16px; color:black;">Locate Us</b>
<br/><br/>
<ul class="list-unstyled" style="font-family: Redressed-Regular !important;">
<li class="list-item py-1">
<t t-if="doc.street"><span t-esc="doc.street"/></t>
</li>
<li class="list-item py-1">
<t t-if="doc.city"><span t-esc="doc.city"/></t>
</li>
<li class="list-item py-1">
<t t-if="doc.state_id.name"><span t-esc="doc.state_id.name"/></t>
</li>
</ul>
</div><br/>
<div class="col-lg-6 pb16" style="max-height:200px; min-height:200px; text-align: left;">
<b style="font-size:16px; color:black;">Contact Us</b>
<br/><br/>
<ul class="list-unstyled" style=" font-family: Redressed-Regular !important;">
<li>
<t t-if="doc.phone"><span t-esc="doc.phone"/></t>
</li>
<li>
<t t-if="doc.email"><span t-esc="doc.email"/></t>
</li>
</ul>
</div>
</t>
</div>
</div>
</section>
</div>
<div class="o_footer_copyright o_colored_level o_cc" style="background-color:#ebddde; font-size:10px;">
<div class="container">
<div class="column text-center col-lg-6 pb16 text-muted" style="float: left;">
<p style="color:black;">Copyrights</p>
</div>
<div class="column col-lg-6 pb16" style="float: left;">
<p style="color:black;">Powered By &#160;&#160; Redodoo.ch</p>
</div>
</div>
</div>
</xpath>
</template>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="breitsch_header" inherit_id="website.layout" name="Breitsch Header" active="True">
<xpath expr="//div[@id='top_menu_container']" position="inside">
<div class="text-center header-left-icons d-none d-lg-block">
<div class="col-2 js_language_selector mb0 list-inline text-center"
t-if="(request and request.is_frontend_multilang and len(languages) &gt; 1) or (website and (editable or translatable))"
style="background-color: transparent; ">
<div class="dropdown">
<button class="btn btn-sm btn-secondary dropdown-toggle" type="button"
style="background-color: transparent; border: transparent; color: black; font-size: 15px;"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="lang_local_code text-uppercase" style="font-family: Redressed-Regular !important;"
t-esc="list(filter(lambda lg : lg[0] == lang, languages))[0][1]"/>
<span class="caret ml4"/>
</button>
<div class="dropdown-menu" role="menu">
<t t-foreach="languages" t-as="lg">
<a t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang_code=lg[0])"
class="dropdown-item js_change_lang"
t-att-data-url_code="lg[1]">
<t t-esc="lg[2].split('/').pop()"/>
</a>
</t>
</div>
</div>
</div>
</div>
</xpath>
</template>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- <<<<<<<<<<<<<<<<<<< HOME PAGE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-->
<template id="homepage_inherit" inherit_id="website.homepage">
<xpath expr="//div[@id='wrap']" position="replace">
<div id="wrap" class="oe_structure oe_empty">
<!-- >>>>>>>>>>>>>>>>>> COVER PIC AND HOME PAGE DETAILS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-->
<section class="s_banner parallax o_colored_level pb256 pt256 o_full_screen_height" data-scroll-background-ratio="-1.5" data-snippet="s_banner" data-name="Banner" style="">
<span class="s_parallax_bg oe_img_bg"
style="background-position: 50% 0px; top: -100.35px; bottom: -100.35px; transform: translateY(15px);
background-image: url(/website_breitsch/static/description/bg.jpeg);" data-original-id="1487"
data-original-src="/web/image/1487-38bd97fc/bg.jpeg" data-mimetype="image/jpeg" data-resize-width="1600"/>
</section>
<br/><br/>
<!-- >>>>>>>>>>>>>>>>>>>>>>>> About US >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-->
<div class="container" style="width:50%; font-family: ReemKufi-VariableFont_wght !important;">
<p style="font-size=12px; font-weight:bolder;">
About Breitsch<br/>
<p style="font-size=10px;">The "Breitschträff" has been the epicenter of the Breitenrain district for 40 years.
This is where people from Bern meet in a direct exchange for culture and coffee.
It is the opposite pole of digitization.
Local residents explain why the “Träff” is so important and why it is just as
popular today as it was 40 years ago.</p>
</p>
<p style="font-size=12px; font-weight:bolder;">News</p>
<!-- <img src="/website_breitsch/static/description/bg.jpeg" alt="/" loading="lazy"-->
<!-- style="width:100%;"/>-->
<video width="100%" controls="controls">
<source src="/website_breitsch/static/description/a.mp4" type="video/mp4"/>
</video>
</div>
<br></br>
</div>
</xpath>
</template>
</data>
</odoo>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment