Skip to content

Commit

Permalink
refactor: css: query: move width consts to css variables (#424)
Browse files Browse the repository at this point in the history
* Move const panel width from code to css variables

* Update css/query.css

* Update css/query.css

---------

Co-authored-by: coderaiser <[email protected]>
  • Loading branch information
hagaygo and coderaiser authored Nov 1, 2024
1 parent 62af673 commit 59024ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ function CloudCmdProto(DOM) {
this.prefixSocket = '';
this.prefixURL = '';

this.MIN_ONE_PANEL_WIDTH = 1155;
this.MOBILE_ONE_PANEL_WIDTH = 600;
var bodyStyle = getComputedStyle(document.body);
this.MIN_ONE_PANEL_WIDTH = bodyStyle.getPropertyValue("--min-one-panel-width");
this.MOBILE_ONE_PANEL_WIDTH = bodyStyle.getPropertyValue('--mobile-max-width')

this.HOST = location.origin || location.protocol + '//' + location.host;

this.TITLE = 'Cloud Commander';
Expand Down
5 changes: 4 additions & 1 deletion css/query.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
width: 15%;
}
}

:root {
--mobile-max-width: 600px;
--min-one-panel-width: 1155px;
}
@media only screen and (height <= 900px) and (width <= 600px) {
.fm {
height: 85%;
Expand Down

0 comments on commit 59024ee

Please sign in to comment.