Hello Everyone,
I would appreciate some help on my widget design.
I’ve searched all this morning looking at different openhab widget, and on the forum, but don’t find a way to achieve what I want.
I’ve got the following very simple widget base on a f7-card.
uid: testLayout
tags: []
props:
parameters: []
parameterGroups: []
timestamp: Jan 19, 2024, 12:20:28 PM
component: f7-card
config:
style:
background-image: ='url(https://openhab.clae.net/static/bureaub.jpg)'
background-position: center
background-size: cover
border-radius: var(--f7-card-expandable-border-radius)
box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
height: 200px
margin-left: 25px
margin-right: 25px
slots:
default:
- component: f7-card-content
config:
style:
slots:
default:
- component: Label
config:
text: test
style:
color: white
font-size: 20pt
This is integrated in this page
config:
label: Test Layout
sidebar: true
blocks:
- component: oh-block
config: {}
slots:
default:
- component: oh-grid-cells
config: {}
slots:
default:
- component: widget:testLayout
config: {}
- component: widget:testLayout
config: {}
- component: widget:testLayout
config: {}
- component: widget:testLayout
config: {}
- component: widget:testLayout
config: {}
masonry: null
grid: []
canvas: []
By default, the result is great. Widget are displayed correctly.
When i downsizing the page width, the widget is shriking, and when there is no more place on the page for all widget, the widget in dispatch on 2 or more lines.
What I want is to give minimum width on the widget to display the image correctly.
But if I put a width or min-width on the f7-card, it just broke the responsive design.
Let’s say for exemple, I put someting like
uid: testLayout
tags: []
props:
parameters: []
parameterGroups: []
timestamp: Jan 19, 2024, 12:20:28 PM
component: f7-card
config:
style:
background-image: ='url(https://openhab.clae.net/static/bureaub.jpg)'
background-position: center
background-size: cover
min-width: 500px
The different widget start overlapping like in the exemple bellow.
Is someone know a good way to achieve correct result for this ?
It seems that there is the same problems with different stock openhab widget like the Widget Heating or Roomcard widget.
Thanks,
Laurent.