1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/layout/page-layout.scss
Alex Andreev 0899ace037
Restyling extensions page with tailwindcss (#2796)
* Setting up tailwind and css modules env

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Using tailwind with scss files also

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Introducing react-table

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Spread extensions to smaller components

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Add table sorting

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing inputs line-height

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fine-tuning page view

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Align table rows

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding extension notice

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fine-tuning overall styling

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding a extensions placeholder

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Updating MaterialIcons font

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Aligning not found state

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Making extension components observable

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing search input cross icon

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix drag-n-drop indication

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing extension name sorting

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix linter

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Ignoring ts files to tailwind purge

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Cleaning up

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Renaming Table -> ReactTable

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing integration tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Moving tailwind imports into app.scss

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Moving userExtensionList() out from extension-loader

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Transform extension list to array

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Expand install input placeholder a bit

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2021-05-23 15:15:42 +03:00

244 lines
5.1 KiB
SCSS

/**
* Copyright (c) 2021 OpenLens Authors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
.PageLayout {
--width: 75%;
--nav-width: 180px;
--nav-column-width: 30vw;
position: relative;
width: 100%;
height: 100%;
display: grid !important;
color: var(--settingsColor);
@include media("<1000px") {
--width: 85%;
}
&.showNavigation {
grid-template-columns: var(--nav-column-width) 1fr;
> .contentRegion {
justify-content: flex-start;
}
}
// covers whole app view area
&.showOnTop {
position: fixed !important; // allow to cover ClustersMenu
z-index: 13;
left: 0;
top: 0;
right: 0;
bottom: 0;
height: unset;
background-color: var(--settingsBackground);
}
> .sidebarRegion {
display: flex;
justify-content: flex-end;
overflow-y: auto;
background-color: var(--secondaryBackground);
.sidebar {
width: 218px;
padding: 60px 0 60px 20px;
h2 {
margin-bottom: 10px;
font-size: 18px;
padding: 6px 10px;
overflow-wrap: anywhere;
color: var(--textColorAccent);
font-weight: 600;
}
.Tabs {
.header {
padding: 6px 10px;
font-size: 13px;
font-weight: 800;
line-height: 16px;
text-transform: uppercase;
&:first-child {
padding-top: 0;
}
}
.Tab {
padding: 6px 10px;
margin-bottom: 2px;
border-radius: 4px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size: 15px;
line-height: 20px;
cursor: pointer;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
&::after {
content: none;
}
&:hover {
background-color: var(--navSelectedBackground);
color: var(--navHoverColor);
}
&.active {
background-color: var(--navSelectedBackground);
}
> .label {
width: 100%;
}
}
}
}
}
> .contentRegion {
display: flex;
overflow: auto;
justify-content: center;
> .content {
width: var(--width);
padding: 60px 40px 80px;
> section {
&:last-of-type {
margin-bottom: 80px;
}
}
}
> .toolsRegion {
.fixedTools {
position: fixed;
top: 60px;
.closeBtn {
width: 35px;
height: 35px;
display: grid;
place-items: center;
border: 2px solid var(--textColorDimmed);
border-radius: 50%;
cursor: pointer;
&:hover {
background-color: #72767d4d;
}
&:active {
transform: translateY(1px);
}
.Icon {
color: var(--textColorSecondary);
}
}
.esc {
text-align: center;
margin-top: 4px;
font-weight: 600;
font-size: 14px;
color: var(--textColorDimmed);
pointer-events: none;
}
}
}
}
section {
display: flex;
flex-direction: column;
&:not(:first-of-type) {
margin-top: 40px;
&.small {
margin-top: 20px;
}
}
h1, h2 {
color: var(--textColorAccent);
}
h1 {
color: var(--textColorAccent);
font-size: 22px;
font-weight: bold;
margin-bottom: 10px;
}
h2 {
font-size: 18px;
line-height: 20px;
font-weight: 600;
margin-bottom: 20px;
}
a {
color: var(--colorInfo);
}
.hint {
margin-top: 8px;
font-size: 14px;
}
.SubTitle {
margin-top: 0;
margin-bottom: 8px;
padding-bottom: 0;
font-size: 12px;
line-height: 1;
}
hr {
margin-top: 40px;
height: 1px;
border-top: thin solid var(--hrColor);
&.small {
margin-top: 20px;
}
&:last-child {
display: none;
}
}
.Checkbox .label {
color: var(--textColorTertiary);
}
}
}