Код: Выделить всё
'assets': {
'web.assets_backend': [
'mydashboard/static/src/css/dashboard.css',
'mydashboard/static/src/js/dashboard.js',
],
},
CSS работает, если он включен в блок стилей внутри самого шаблона, например (усеченная версия):
Код: Выделить всё
@font-face {
font-family: LCD;
src: url("/my_dashboard/static/src/fonts/lcd-regular-webfont.ttf");
}
html {
font-family: LCD, Times, serif;
}
.kanban-card {
border: 1px solid #ddd;
border-radius: 8px;
overflow: hidden;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin-bottom: 30px;
}
.kanban-card img {
width: 200px;
height: 150px;
object-fit: cover;
flex-shrink: 0;
}
@media (max-width: 1200px) {
html {
overflow-y: scroll;
}
}
@media (max-width: 600px) {
html {
overflow-y: scroll;
}
.kanban-card img {
width: 240px;
height: 180px;
}
}
[img]/my_dashboard/static/src/images/sales_icon.png[/img]
alt="Incoming Inventory" />
Pending Sales
Подробнее здесь: https://stackoverflow.com/questions/798 ... rom-assets
Мобильная версия