From b705ad3c97f63e419c42d2c0481f0cca7e721278 Mon Sep 17 00:00:00 2001 From: gillespi314 <73313222+gillespi314@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:15:53 -0500 Subject: [PATCH] Fleetdm.com: Add back button and update page styles for query library detail pages (#1398) * Refactor query-details page * Simplify query-detail page html and css * Add alt text for image --- website/assets/styles/pages/query-detail.less | 88 +++++------ website/views/pages/query-detail.ejs | 142 +++++++----------- 2 files changed, 87 insertions(+), 143 deletions(-) diff --git a/website/assets/styles/pages/query-detail.less b/website/assets/styles/pages/query-detail.less index d1ad337d29..51a3cf0892 100644 --- a/website/assets/styles/pages/query-detail.less +++ b/website/assets/styles/pages/query-detail.less @@ -1,8 +1,9 @@ #query-detail { h5 { - font-size: 18px; font-weight: bold; + font-size: 16px; + line-height: 25px; } h6 { @@ -12,41 +13,30 @@ } p { - &.platform, &.purpose { - margin-bottom: 8px; - } + line-height: 25px; } a { - font-size: 18px; + font-size: 16px; + line-height: 25px; color: @core-vibrant-blue; } - img { - &.logo { - height: 24px; - width: 24px; - } - } - - .query-tip { - background-color: @ui-off-white; - - .lightbulb { - height: 24px; - width: auto; - margin-left: 4px; - margin-right: 20px; - } - - } - - .query-sidebar { + .border-top { border-color: #E2E4EA; - } - .avatar-frame { + [purpose='remediation'] { + overflow-wrap: break-word; + word-wrap: break-word; + word-break: break-word; + p { + font-size: 16px; + line-height: 24px; + } + } + + [purpose='avatar-frame'] { width: 24px; height: 24px; position: relative; @@ -62,46 +52,36 @@ height: 100%; width: auto; } + } - .divider { - border-bottom: 1px solid; - border-color: #E2E4EA; - } - - .platforms, .purpose, .contributors, .contribute { - min-height: 36px; - line-height: 24px; - p, a { - font-family: 'Nunito'; - font-size: 16px; + [purpose='platforms'] { + img { + height: 18px; + width: 18px; } } - .remediation { - overflow-wrap: break-word; - word-wrap: break-word; - word-break: break-word; - p { - font-family: 'Nunito'; - font-size: 16px; - line-height: 24px; + @media (min-width: 768px) { + + h5, p, a { + font-size: 18px; } - } - @media (max-width: 700px) { + [purpose='avatar-frame'] { + width: 32px; + height: 32px; + } - .contribute { - flex-wrap: wrap; - min-height: 24px; - h5 { - padding: 6px 0px 6px 0px; + [purpose='platforms'] { + img { + height: 24px; + width: 24px; } } } - @media (max-width: 575px) { h2 { diff --git a/website/views/pages/query-detail.ejs b/website/views/pages/query-detail.ejs index 9c1e077328..be7d5b3751 100644 --- a/website/views/pages/query-detail.ejs +++ b/website/views/pages/query-detail.ejs @@ -1,109 +1,73 @@
-
-
-
-
-

{{query.name}}

-
{{query.description ? query.description : '--'}}
-
-
- lightbulb

{{query.tip}}

-
+
+
+ + back arrow + Back to queries + +
+

{{query.name}}

+
{{query.description ? query.description : '--'}}
+
+
+
+
+
+

{{query.name}}

+
{{query.description ? query.description : '--'}}
+
+
+
+

Query

+ {{query.query ? query.query : '--'}}
-

Query

- {{query.query ? query.query : '--'}} -
+

Remediation

-

{{query.remediation ? query.remediation : 'N/A'}}

+

{{query.remediation ? query.remediation : 'N/A'}}

+
+
+
+
+
+
+
Platforms
+

--

+
+ macOS + Windows + Linux + FreeBSD +
- -
-
-
Platforms
-

--

-
- - - - -
+
+
+
Purpose
+

{{query.purpose ? query.purpose : '--'}}

- -
-
Purpose
-

{{query.purpose ? query.purpose : '--'}}

-
- -
-
Contributors
-
+
+
+
+
Contributors
+
-- -
-
+
+
a GitHub user avatar
-
Contribute to this page
- View source
-
-
-
- -
-

{{query.name}}

-
{{query.description ? query.description : '--'}}
-
-
-
-
-
-
Platforms
-

--

-
- - - - +
+
+
+
Contribute to this page
+

View source

-
-
-
Purpose
-

{{query.purpose ? query.purpose : '--'}}

-
-
-
-
-
Contributors
-
- -- -
-
- a GitHub user avatar -
-
-
-
-
-
-
Contribute to this page
-

View source

-
-
-
-
-
-

Query

- {{query.query ? query.query : '--'}} -
-

Remediation

-

{{query.remediation ? query.remediation : 'N/A'}}