Skip to content

Commit 65d3f40

Browse files
josuebranKenniMYosoyfreric-schneider
authored
Leftnav fixes, dark mode improvements, hero banner (#71)
* Left Nav Improvements This should fix a visual issue when using some new types of nav elements * Dark mode cards improvements Also, this includes styles for the new Hero blocks * Added identation to a specific type of link * Hero block background updates The hero backgrounds has been replaced with SVG files. Also, the params has been changed, instead of using numbers, you can now use: * default * alternative * astra * dse * luna * Fix cards (box shadow) * Add Hero block instructions * Fix card shadow * Fix card text color * Remove toolbar and title when heroBlock * Fix heroBlock error in firefox * clean up repo --------- Co-authored-by: Kenni Martínez <57879404+KenniM@users.noreply.github.com> Co-authored-by: Francisco Suarez <3216883330506@ingenieria.usac.edu.gt> Co-authored-by: Eric Schneider <37347760+eric-schneider@users.noreply.github.com>
1 parent e645270 commit 65d3f40

14 files changed

+248
-8
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build/
2+
gcx/build/
23
node_modules/
34
public/
4-
5+
.DS_store

README.adoc

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,65 @@ CAUTION: If you do not check this box, then the release is immediately promoted
400400

401401
. Update the `:current-release:` attribute in the header of this README to reference the tag of the latest bundle (if it is not pre-release), then commit that update to the repository.
402402

403+
== Hero block
404+
There are two files that need to be updated in order to include the hero block in a page
405+
406+
* helios-gcs-heroBlock.css
407+
* The .adoc file you want to add the hero block
408+
409+
=== Define Background css
410+
411+
. To define the hero block background, it needs to be done in the `helios-gcs-heroBlock.css` file located under /gcx/styles/src/css/ path
412+
. It requires to set the class identifier name/value and the path to the background image which can be an svg file.
413+
. The class identifier name/value would be any meaningful value you would like to use to identify the background image.
414+
.. The identifier name will be used to reference the background image in the .adoc where the hero will be setup.
415+
.. If the identifier name is not defined, it will use the default setup image.
416+
417+
For the below code portion .dsHeroBlock, .dsHeroBlock[data-banner="default"] would be the default image to set in case no identifier or "default" identifier is set
418+
-----
419+
.dsHeroBlock,
420+
.dsHeroBlock[data-banner="default"] {
421+
background-image: url('../img/hero-banner-1.svg');
422+
background-size: cover;
423+
color: white;
424+
font-family: 'Roboto', sans-serif;
425+
}
426+
-----
427+
428+
To set a specific background image, it will be done by setting the identifier value and the image path
429+
----
430+
.dsHeroBlock[data-banner="alternative"]{
431+
background-image: url('../img/hero-banner-2.svg');
432+
}
433+
----
434+
435+
=== Define the hero block in a .adoc file
436+
The structure to set a hero block in an `.adoc` file is as shown in the code block below. This will add the hero block to the top of the page which will have a background, title, content.
437+
438+
. Hero Block background (class="dsHeroBlock")
439+
.. This is set by adding `<div class="dsHeroBlock" data-banner="alternative">` where the "data-banner identifier will be the name especified for the image in the `helios-gcs-heroBlock.css` file.
440+
. [.hero.title]
441+
.. This tag is used to set the hero banner title
442+
. [.hero.content]
443+
.. This tag is used to set the hero banner content under the title.
444+
445+
----
446+
++++
447+
<div class="dsHeroBlock" data-banner="alternative">
448+
++++
449+
450+
[.hero.title]
451+
Documentation Home
452+
453+
[.hero.content]
454+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor.
455+
456+
++++
457+
</div>
458+
++++
459+
----
460+
461+
403462
== Copyright and license
404463

405464
=== Antora Default UI

gcx/build/ui-bundle.zip

-2.84 MB
Binary file not shown.

gcx/styles/src/css/helios-gcx-body.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545

4646
.dark-mode .landing-card .content {
47-
color: var(--color-black)
47+
color: var(--color-white)
4848
}
4949

5050
.full-articles {
@@ -141,6 +141,10 @@
141141
width: 100%;
142142
}
143143

144+
.dark-mode .doc .sidebarblock {
145+
background: var(--color-purple-700);
146+
}
147+
144148
.doc {
145149
color: var(--color-black);
146150
}
@@ -226,7 +230,7 @@ main > .content {
226230
max-width: 43%!important;
227231
}
228232
}
229-
233+
230234
@media screen and (max-width: 767px) {
231235
article.doc .center{
232236
max-width: 100%!important;
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.dsHeroBlock,
2+
.dsHeroBlock[data-banner="default"] {
3+
background-image: url('../img/hero-banner-1.svg');
4+
background-size: cover;
5+
color: white;
6+
font-family: 'Roboto', sans-serif;
7+
}
8+
9+
.dsHeroBlock[data-banner="alternative"]{
10+
background-image: url('../img/hero-banner-2.svg');
11+
}
12+
13+
.dsHeroBlock[data-banner="astra"]{
14+
background-image: url('../img/hero-banner-3-Astra.svg');
15+
}
16+
17+
.dsHeroBlock[data-banner="dse"]{
18+
background-image: url('../img/hero-banner-4-DSE.svg');
19+
}
20+
21+
.dsHeroBlock[data-banner="luna"]{
22+
background-image: url('../img/hero-banner-5-Luna.svg');
23+
}
24+
25+
26+
.toolbar:has(~ .content .dsHeroBlock),
27+
h1.page:has(~ #preamble .dsHeroBlock) {
28+
visibility: hidden;
29+
}
30+
31+
.toolbar:has(~ .dsHeroBlock),
32+
.dsHeroBlock + .content h1.page {
33+
display: none;
34+
}
35+
36+
.dsHeroContent {
37+
padding: 72px 60px;
38+
width: 50%;
39+
}
40+
41+
.dsHeroTitle h1 {
42+
font-weight: 400;
43+
}
44+
45+
@media screen and (max-width: 820px) {
46+
.dsHeroContent {
47+
width: 100%;
48+
}
49+
}

gcx/styles/src/css/helios-gcx-links.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
}
4141

4242
.dark-mode .sidebarblock a.xref.page{
43-
color: var(--black);
43+
color: var(--color-white);
4444
}
4545

4646
.dark-mode .sidebarblock a{
47-
color: var(--black)!important;
47+
color: var(--color-white)!important;
4848
}
4949

5050
.doc .admonitionblock.caution a {

gcx/styles/src/css/helios-gcx-sidebar.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@ label.collapse_label:after {
446446
color: #fff;
447447
}
448448

449+
li.nav-item.toggler.is-active[data-depth="1"] .nav-text{
450+
padding: 8px 0px 8px 90px;
451+
}
449452

450453
.dark-mode li.nav-item.toggler.is-active[data-depth="1"] .nav-text {
451454
color: var(--white);
@@ -495,7 +498,7 @@ label.collapse_label:after {
495498

496499

497500
.dark-mode li.nav-item.toggler.is-active[data-depth="2"] .nav-text {
498-
color: #fff;
501+
color: #fff;
499502
}
500503

501504

gcx/styles/src/css/helios-gcx-titles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
}
6060

6161
.dark-mode .doc .sidebarblock>.content>.title{
62-
color: var(--black);
62+
color: var(--white);
6363
}
6464

6565

gcx/styles/src/img/hero-banner-1.svg

Lines changed: 21 additions & 0 deletions
Loading

gcx/styles/src/img/hero-banner-2.svg

Lines changed: 21 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)