Skip to content

Commit

Permalink
Fix save-button position (#391)
Browse files Browse the repository at this point in the history
* group buttons in section - add css

* move flex-wrap to breakpoint at 1200px for control-bar-section

* align-items controlbar end (bottom)
  • Loading branch information
tilen1976 authored Aug 13, 2024
1 parent 58187f1 commit cbda9ea
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
17 changes: 13 additions & 4 deletions src/datadoc/assets/controlbar_style.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
.control-bar-section{
display: flex;
flex-wrap: wrap;
gap: 1rem;
gap: 0.5rem;
padding: 1rem 0;
align-items: center;
align-items: end;
margin-top: 1rem;
}

.ssb-input.file-path-input{
max-width: 1100px;
width: 100%;
}

.ssb-btn.secondary-btn.file-open-button,.ssb-btn.secondary-btn.file-save-button{
Expand Down Expand Up @@ -107,3 +105,14 @@
margin: 0;
margin-top: 1rem;
}

.button-section{
display: flex;
gap: 0.5rem;
}

@media only screen and (max-width: 1200px) {
.control-bar-section{
flex-wrap: wrap;
}
}
23 changes: 14 additions & 9 deletions src/datadoc/frontend/components/control_bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,20 @@ def build_controls_bar() -> html.Section:
className="file-path-input",
id="dataset-path-input",
),
ssb.Button(
children=["Åpne fil"],
id="open-button",
className="file-open-button",
),
ssb.Button(
children=["Lagre metadata"],
id="save-button",
className="file-save-button",
html.Section(
[
ssb.Button(
children=["Åpne fil"],
id="open-button",
className="file-open-button",
),
ssb.Button(
children=["Lagre metadata"],
id="save-button",
className="file-save-button",
),
],
className="button-section",
),
],
className="control-bar-section",
Expand Down

0 comments on commit cbda9ea

Please sign in to comment.