Skip to content

Commit

Permalink
Refactor header layout and update checkbox styling and structure
Browse files Browse the repository at this point in the history
- Modified the HTML structure to wrap the checkbox in a container for better alignment.
- Changed the checkbox label to "Pin Preview" for clarity.
- Updated CSS to use flexbox for the header layout and improve spacing for the checkbox.
- Prevent large images from disrupting the layout by setting max-width and max-height.
  • Loading branch information
mhersson committed Feb 1, 2025
1 parent 3b78676 commit aab27e7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
8 changes: 5 additions & 3 deletions internal/previewserver/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
<summary id="header-summary"></summary>
<div id="header">
<div id="header-meta"></div>
<label id="header-label">
<input type="checkbox" id="pin" /> Pin
</label>
<div id="checkbox-container">
<label id="pin-checkbox-label">
<input type="checkbox" id="pin" /> Pin Preview
</label>
</div>
</div>
</details>
</div>
Expand Down
21 changes: 14 additions & 7 deletions internal/previewserver/web/styles-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,23 @@ body {
display: table-cell;
vertical-align: middle;
}

#header {
position: relative;
padding: 10px;
display: flex;
align-items: flex-start;
}

#checkbox-container {
margin-left: auto;
display: flex;
flex-direction: column;
}

#checkbox-container label {
margin-bottom: 5px;
}

#header-label {
position: absolute;
top: 10px;
right: 10px;
img {
max-width: 100%;
}

pre {
Expand Down
20 changes: 14 additions & 6 deletions internal/previewserver/web/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,22 @@ body {
}

#header {
position: relative;
padding: 10px;
display: flex;
align-items: flex-start;
}

#checkbox-container {
margin-left: auto;
display: flex;
flex-direction: column;
}

#checkbox-container label {
margin-bottom: 5px;
}

#header-label {
position: absolute;
top: 10px;
right: 10px;
img {
max-width: 100%;
}

pre {
Expand Down

0 comments on commit aab27e7

Please sign in to comment.