Polish corporate website branding
This commit is contained in:
parent
cdf7dbe86e
commit
d1b464f4bb
@ -1,2 +1,3 @@
|
||||
from . import controllers
|
||||
from . import hooks
|
||||
from . import models
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
"security/security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"data/sequence_data.xml",
|
||||
"data/website_data.xml",
|
||||
"views/support_ticket_views.xml",
|
||||
"views/website_templates.xml",
|
||||
"views/website_menus.xml",
|
||||
@ -28,6 +29,7 @@
|
||||
"mcs_corporate_website/static/src/scss/corporate_website.scss",
|
||||
],
|
||||
},
|
||||
"post_init_hook": "post_init_hook",
|
||||
"installable": True,
|
||||
"application": False,
|
||||
}
|
||||
|
||||
6
addons/mcs_corporate_website/data/website_data.xml
Normal file
6
addons/mcs_corporate_website/data/website_data.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<odoo>
|
||||
<record id="website.default_website" model="website">
|
||||
<field name="name">Metatroncube Workplace</field>
|
||||
<field name="logo" type="base64" file="mcs_corporate_website/static/src/img/metatroncube-logo.png"/>
|
||||
</record>
|
||||
</odoo>
|
||||
38
addons/mcs_corporate_website/hooks.py
Normal file
38
addons/mcs_corporate_website/hooks.py
Normal file
@ -0,0 +1,38 @@
|
||||
import base64
|
||||
from pathlib import Path
|
||||
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
|
||||
def post_init_hook(env_or_cr, registry=None):
|
||||
if registry is not None:
|
||||
env = api.Environment(env_or_cr, SUPERUSER_ID, {})
|
||||
else:
|
||||
env = env_or_cr
|
||||
CorporateWebsiteSetup(env).run()
|
||||
|
||||
|
||||
class CorporateWebsiteSetup:
|
||||
def __init__(self, env):
|
||||
self.env = env
|
||||
|
||||
def run(self):
|
||||
self._brand_website()
|
||||
self._hide_duplicate_home_menu()
|
||||
|
||||
def _brand_website(self):
|
||||
website = self.env["website"].sudo().search([], limit=1)
|
||||
if not website:
|
||||
return
|
||||
logo_path = Path(__file__).parent / "static" / "src" / "img" / "metatroncube-logo.png"
|
||||
values = {
|
||||
"name": "Metatroncube Workplace",
|
||||
}
|
||||
if logo_path.exists():
|
||||
values["logo"] = base64.b64encode(logo_path.read_bytes())
|
||||
website.write(values)
|
||||
|
||||
def _hide_duplicate_home_menu(self):
|
||||
menu = self.env.ref("mcs_corporate_website.menu_home", raise_if_not_found=False)
|
||||
if menu:
|
||||
menu.sudo().write({"is_visible": False})
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@ -1,10 +1,13 @@
|
||||
.mcs-site {
|
||||
--mcs-ink: #101828;
|
||||
--mcs-muted: #5b6474;
|
||||
--mcs-line: #d8dee8;
|
||||
--mcs-blue: #155eef;
|
||||
--mcs-blue-dark: #0f2f6f;
|
||||
--mcs-surface: #f5f8fc;
|
||||
--mcs-muted: #596579;
|
||||
--mcs-line: #d7dfe9;
|
||||
--mcs-blue: #1c4ed8;
|
||||
--mcs-navy: #071426;
|
||||
--mcs-teal: #0f766e;
|
||||
--mcs-gold: #d9931e;
|
||||
--mcs-surface: #f6f8fb;
|
||||
--mcs-panel: #ffffff;
|
||||
|
||||
color: var(--mcs-ink);
|
||||
background: #ffffff;
|
||||
@ -20,9 +23,9 @@
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2.4rem, 4rem, 4rem);
|
||||
font-size: 4rem;
|
||||
line-height: 1.02;
|
||||
font-weight: 750;
|
||||
font-weight: 780;
|
||||
}
|
||||
|
||||
h2 {
|
||||
@ -47,22 +50,79 @@
|
||||
font-weight: 700;
|
||||
padding: 0.75rem 1.05rem;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--mcs-blue);
|
||||
border-color: var(--mcs-blue);
|
||||
box-shadow: 0 8px 18px rgba(28, 78, 216, 0.18);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
color: #ffffff;
|
||||
background: var(--mcs-teal);
|
||||
border-color: var(--mcs-teal);
|
||||
}
|
||||
}
|
||||
|
||||
#wrapwrap > header {
|
||||
.navbar {
|
||||
min-height: 76px;
|
||||
background: #071426 !important;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 12px 30px rgba(7, 20, 38, 0.16) !important;
|
||||
}
|
||||
|
||||
.navbar-brand.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 180px;
|
||||
margin-right: 28px !important;
|
||||
|
||||
img {
|
||||
width: auto !important;
|
||||
height: 44px !important;
|
||||
max-width: 190px;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
.top_menu .nav-link {
|
||||
color: rgba(255, 255, 255, 0.76) !important;
|
||||
font-weight: 700;
|
||||
padding-inline: 0.8rem !important;
|
||||
}
|
||||
|
||||
.top_menu .nav-link.active,
|
||||
.top_menu .nav-link:hover {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.top_menu .nav-link.active span {
|
||||
border-bottom: 2px solid #d9931e;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.o_header_hide_on_scroll {
|
||||
background: #071426 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mcs-hero {
|
||||
position: relative;
|
||||
min-height: 680px;
|
||||
min-height: 640px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
background: #07111f;
|
||||
background: #071426;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(90deg, rgba(7, 17, 31, 0.94), rgba(7, 17, 31, 0.72), rgba(7, 17, 31, 0.18));
|
||||
background:
|
||||
linear-gradient(90deg, rgba(7, 20, 38, 0.96), rgba(7, 20, 38, 0.78), rgba(7, 20, 38, 0.28)),
|
||||
linear-gradient(180deg, rgba(7, 20, 38, 0), rgba(7, 20, 38, 0.38));
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
@ -89,14 +149,14 @@
|
||||
.mcs-lead {
|
||||
max-width: 650px;
|
||||
margin: 24px 0 0;
|
||||
color: rgba(255, 255, 255, 0.82);
|
||||
color: rgba(255, 255, 255, 0.84);
|
||||
font-size: 1.18rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mcs-eyebrow {
|
||||
margin: 0 0 12px;
|
||||
color: var(--mcs-blue);
|
||||
color: var(--mcs-gold);
|
||||
font-size: 0.78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.12em;
|
||||
@ -111,7 +171,7 @@
|
||||
}
|
||||
|
||||
.mcs-band {
|
||||
padding: 76px 0;
|
||||
padding: 80px 0;
|
||||
}
|
||||
|
||||
.mcs-band--quiet {
|
||||
@ -148,11 +208,19 @@
|
||||
.mcs-metrics div {
|
||||
border: 1px solid var(--mcs-line);
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
background: var(--mcs-panel);
|
||||
box-shadow: 0 18px 45px rgba(16, 24, 40, 0.07);
|
||||
}
|
||||
|
||||
.mcs-service-card {
|
||||
overflow: hidden;
|
||||
transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
|
||||
|
||||
&:hover {
|
||||
border-color: rgba(28, 78, 216, 0.24);
|
||||
box-shadow: 0 24px 60px rgba(16, 24, 40, 0.12);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
@ -172,6 +240,7 @@
|
||||
a {
|
||||
display: inline-flex;
|
||||
margin-top: 12px;
|
||||
color: var(--mcs-blue);
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
@ -190,6 +259,7 @@
|
||||
|
||||
div {
|
||||
padding: 20px;
|
||||
border-left: 4px solid var(--mcs-gold);
|
||||
}
|
||||
|
||||
strong {
|
||||
@ -211,7 +281,7 @@
|
||||
}
|
||||
|
||||
.mcs-cta {
|
||||
background: #101828;
|
||||
background: var(--mcs-navy);
|
||||
color: #ffffff;
|
||||
|
||||
h2 {
|
||||
@ -221,8 +291,10 @@
|
||||
}
|
||||
|
||||
.mcs-page-head {
|
||||
padding: 96px 0 56px;
|
||||
background: #101828;
|
||||
padding: 104px 0 64px;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(7, 20, 38, 0.96), rgba(7, 20, 38, 0.86)),
|
||||
url("https://metatroncubesolutions.com/assets/images/home/bg-without.webp") center / cover;
|
||||
color: #ffffff;
|
||||
|
||||
p:not(.mcs-eyebrow) {
|
||||
@ -239,6 +311,7 @@
|
||||
|
||||
article {
|
||||
padding: 26px;
|
||||
border-top: 4px solid var(--mcs-blue);
|
||||
}
|
||||
}
|
||||
|
||||
@ -283,7 +356,7 @@
|
||||
}
|
||||
|
||||
.mcs-hero {
|
||||
min-height: 620px;
|
||||
min-height: 560px;
|
||||
}
|
||||
|
||||
.mcs-service-grid,
|
||||
@ -303,3 +376,18 @@
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
#wrapwrap > header .navbar-brand.logo img {
|
||||
height: 36px !important;
|
||||
max-width: 158px;
|
||||
}
|
||||
|
||||
.mcs-site h1 {
|
||||
font-size: 2.1rem;
|
||||
}
|
||||
|
||||
.mcs-band {
|
||||
padding: 56px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<field name="url">/</field>
|
||||
<field name="parent_id" ref="website.main_menu"/>
|
||||
<field name="sequence" type="int">5</field>
|
||||
<field name="is_visible" eval="False"/>
|
||||
</record>
|
||||
<record id="menu_services" model="website.menu">
|
||||
<field name="name">Services</field>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user