fleet/website/assets/styles/pages/articles/basic-article.less
Eric 59d956df3a
Website: Update hover state on articles sidebar CTA, fix alignment of newsletter banner (#23638)
Changes:
- Added a hover state to the swag request CTA on the device-management
page
- Made the entire sidebar cta on article pages clickable.
- Updated the alignment of the newsletter banner on the homepage.
2024-11-08 09:03:12 +09:00

800 lines
17 KiB
Text
Vendored

#basic-article {
h1 {
font-size: 36px;
}
hr {
margin-top: 40px;
margin-bottom: 40px;
border-top: 2px solid @core-vibrant-blue-15;
width: 100%;
}
[purpose='page-container'] {
max-width: 1200px;
padding: 64px;
}
[purpose='breadcrumbs-and-search'] {
// padding-top: 64px;
max-width: 1072px;
margin: auto;
font-size: 14px;
[purpose='breadcrumbs'] {
margin-right: 24px;
}
[purpose='search'] {
// Note: We're using classes here to override the default Docsearch styles;
button {
width: 100%;
cursor: text;
margin: 0;
}
.DocSearch-Button {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
border: 1px solid @core-fleet-black-25;
background-color: #FFF;
padding: 6px;
height: 36px;
margin: 0;
width: 256px;
}
.DocSearch-Button:hover {
box-shadow: none;
border: 1px solid @core-fleet-black-25;
color: @core-fleet-black-50;
}
.DocSearch-Search-Icon {
margin-left: 10px;
height: 16px;
width: 16px;
color: @core-fleet-black-50;
stroke-width: 3px;
}
.DocSearch-Button-Keys {
display: none;
}
.input-group:focus-within {
border: 1px solid @core-vibrant-blue;
}
.DocSearch-Button-Placeholder {
font-size: 16px;
font-weight: 400;
padding-left: 12px;
}
[purpose='disabled-search'] {
input {
padding-top: 6px;
padding-bottom: 6px;
border: none;
} &::placeholder {
font-size: 16px;
line-height: 24px;
color: #8B8FA2;
}
.input-group {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
border: 1px solid @core-fleet-black-25;
background: #FFF;
}
.input-group:focus-within {
border: 1px solid @core-vibrant-blue;
}
.form-control {
border-radius: 6px;
padding: 6px;
height: 36px;
margin: 0;
width: 212px;
}
.docsearch-input:focus-visible {
outline: none;
}
.ds-input:focus {
outline: rgba(0, 0, 0, 0);
}
.input-group-text {
color: @core-fleet-black-50;
}
.form-control {
height: 36px;
padding: 0px;
font-size: 16px;
} &:focus {
border: none;
}
}
}
[purpose='breadcrumbs-category'] {
color: #8B8FA2;
text-transform: capitalize;
margin-right: 8px;
&:hover {
color: #192147;
text-decoration: none;
}
}
[purpose='breadcrumbs-title'] {
margin-left: 8px;
}
}
[purpose='right-sidebar'] {
position: sticky;
margin-top: 64px;
top: 144px;
width: 256px;
font-size: 14px;
transition-property: transform;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 500ms;
}
[purpose='sidebar-link'] {
margin-bottom: 12px;
display: flex;
flex-direction: row;
align-items: center;
color: #515774;
img {
height: 16px;
width: 16px;
display: inline;
margin-right: 12px;
}
&:hover {
text-decoration: none;
color: @core-fleet-black;
img {
filter: brightness(0.5);
}
}
}
[purpose='edit-link'] {
padding-top: 24px;
padding-bottom: 16px;
margin-top: 24px;
border-top: 1px solid #E2E4EA;
a {
margin-bottom: 0px;
}
}
// [purpose='docs-links'] {
// a {
// display: block;
// }
// }
[purpose='social-share-buttons'] {
padding-top: 16px;
padding-bottom: 16px;
margin-bottom: 24px;
a {
margin-right: 16px;
}
img {
height: 20px;
width: 20px;
}
}
[purpose='subtopics'] {
margin-bottom: 24px;
a {
margin-bottom: 8px;
&:last-of-type {
margin-bottom: 0px;
}
}
}
.header-hidden { // For scrolling the sidebar with the sticky header
transform: translateY(-120px);
}
[purpose='article-container'] {
max-width: 800px;
padding-right: 64px;
display: flex;
flex-direction: column;
}
[purpose='article-title'] {
padding-top: 64px;
margin-bottom: 28px;
h1 {
margin-bottom: 4px;
line-height: 38px;
}
h2 {
font-size: 24px;
font-weight: 400;
line-height: 32px;
}
}
[purpose='rss-button'] {
padding: 4px 8px;
display: inline;
max-width: min-content;
cursor: pointer;
color: @core-fleet-black-75;
text-decoration: none;
font-size: 14px;
border-radius: 6px;
span::before {
vertical-align: baseline;
font-family: 'FontAwesome';
content: '\f09e';
padding-right: 8px;
font-size: 16px;
}
&:hover {
background-color: rgba(25, 33, 71, 0.05);
}
&:active {
background-color: rgba(25, 33, 71, 0.1);
}
}
[purpose='rss-button'].copied::after {
content: 'Link copied';
display: flex;
font-weight: 400;
position: relative;
top: 0px;
height: 0px;
font-size: 14px;
color: @core-vibrant-blue;
animation-name: copiedText;
animation-duration: 4s;
animation-fill-mode: forwards;
}
@keyframes copiedText {
0% {opacity: 0;}
20% {opacity: 100;}
30% {opacity: 80;}
50% {opacity: 60;}
70% {opacity: 40;}
80% {opacity: 20;}
100% {opacity: 0;}
}
[purpose='edit-button'] {
margin-top: 16px;
img {
width: 16px;
height: 16px;
display: inline;
margin-right: 8px;
}
padding: 6px 8px;
display: block;
color: @core-fleet-black-75;
text-decoration: none;
font-size: 14px;
line-height: 21px;
border-radius: 6px;
width: 102px;
background: rgba(25, 33, 71, 0.05);
&:hover {
background-color: rgba(25, 33, 71, 0.1);
}
&:active {
background-color: rgba(25, 33, 71, 0.1);
}
}
[purpose='sidebar-cta'] {
padding: 0px;
border-radius: 12px;
border: 1px solid #E2E4EA;
background: #FFF;
min-height: 290px;
text-align: center;
cursor: pointer;
margin-top: 24px;
margin-bottom: 8px;
max-width: 256px;
a {
text-decoration: none;
}
&:hover {
box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.03);
}
[purpose='cta-image'] {
height: 145px;
background-image: url('/images/cloud-city-cta-256x145@2x.png');
border-top-left-radius: 12px;
border-top-right-radius: 12px;
background-size: 100% 145px;
background-position: center bottom;
}
[purpose='cta-text'] {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0px 24px 24px 24px;
h4 {
color: #192147;
text-align: center;
font-size: 20px;
font-weight: 800;
line-height: 120%;
margin-bottom: 0px;
}
p {
color: #515774;
text-align: center;
font-size: 14px;
font-weight: 400;
line-height: 150%;
margin-bottom: 8px;
}
}
[purpose='cta-button'] {
display: flex;
width: 140px;
height: 36px;
padding: 16px 32px;
justify-content: center;
align-items: center;
color: #FFF;
text-align: center;
font-size: 14px;
font-weight: 700;
line-height: 150%;
margin-bottom: 16px;
}
[purpose='cta-platform-icons'] {
img {
height: 16px;
&:not(:last-of-type) {
margin-right: 16px;
}
}
}
}
[purpose='sidebar-contact-cta'] {
display: flex;
padding: 16px;
align-items: center;
border-radius: 8px;
border: 1px solid #E2E4EA;
background: #FFF;
font-size: 14px;
line-height: 150%;
color: @core-fleet-black;
p {
line-height: 120%;
margin-bottom: 0px;
font-weight: 800;
}
[parasails-component='animated-arrow-button'] {
line-height: 150%;
}
img {
width: 20px;
height: 18.947px;
margin-right: 10px;
}
&:hover {
box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.03);
text-decoration: none;
}
}
[purpose='article-details'] {
font-size: 14px;
line-height: 20px;
span {
color: @core-fleet-black-50;
}
p {
margin-block-end: 0px;
}
img {
height: 28px;
}
}
[purpose='article-content'] {
padding-top: 40px;
padding-bottom: 40px;
word-wrap: break-word;
h1:first-of-type {
display: none;
}
h1:first-of-type + h2:first-of-type {
display: none;
}
img {
max-width: 100%;
width: auto;
height: auto;
max-height: 100%;
margin-left: auto;
margin-right: auto;
padding: 24px 0px 16px 0px;
}
a {
color: @core-fleet-black-75;
word-break: break-word;
text-decoration: underline;
text-underline-offset: 2px;
&:hover {
color: @core-fleet-black-75;
}
}
h2 {
font-size: 24px;
margin-top: 40px;
margin-bottom: 24px;
}
h3 {
font-size: 20px;
margin-top: 16px;
margin-bottom: 16px;
}
h4 {
font-size: 16px;
margin-top: 24px;
margin-bottom: 24px;
}
h2 > code:not(.bash):not(.nohighlight):not(.mermaid) {
padding: 0px 4px;
font-weight: 400;
font-size: 22px;
line-height: inherit;
}
h3 > code:not(.bash):not(.nohighlight):not(.mermaid) {
padding: 0px 4px;
font-weight: 400;
font-size: 18px;
line-height: inherit;
}
p {
font-size: 16px;
line-height: 28px;
margin-bottom: 24px;
}
img + em { // Image captions
position: relative;
top: -12px;
display: flex;
align-items: center;
flex-direction: column;
margin-bottom: 16px;
}
ul, ol {
padding-left: 16px;
}
li {
padding-bottom: 16px;
}
li::marker {
color: @core-vibrant-blue;
}
.markdown-heading {
scroll-margin-top: 140px;
}
[purpose='checklist-item'] {
display: flex;
input[type='checkbox'] {
margin-left: -18px;
min-width: 16px;
min-height: 16px;
align-self: center;
}
input:checked, input:active {
accent-color: @core-vibrant-blue;
}
[purpose='task'] {
margin-left: 16px;
input {
display: none;
}
p {
margin-bottom: 0px;
}
}
}
[purpose='checklist-item']::marker {
display: none;
}
ul {
list-style-type: disc;
padding-left: 16px;
}
li {
line-height: 24px;
padding-bottom: 16px;
p { // Making sure our list items stay a consistent size if the contents get wrapped in a <p> tag coverted from Markdown.
margin-bottom: 0;
}
ol, ul { // adding padding to nested lists
padding-top: 16px;
li:last-child { // removing the padding from the last item of nested lists
padding-bottom: 0px;
}
}
}
ol {
counter-reset: custom-counter;
list-style-type: none;
padding-inline-start: 0px;
padding: 0;
margin-top: 16px;
margin-bottom: 20px;
ul > li {
text-indent: 0px;
margin-left: 0px;
}
> li {
counter-increment: custom-counter;
margin-left: 36px;
text-indent: -36px;
padding-left: 0px;
margin-bottom: 16px;
code:not(.nohighlight):not(.mermaid) {
display: inline;
}
p {
display: inline;
margin-bottom: 0px;
}
blockquote {
text-indent: 0px;
}
}
> li::before {
content: counter(custom-counter);
background-color: #E2E4EA;
width: 24px;
font-size: 13px;
display: inline-block;
border-radius: 50%;
margin-right: 10px;
padding: 2px 4px;
text-align: center;
line-height: 20px;
text-indent: 0px;
}
}
a > code:not(.hljs):not(.nohighlight):not(.mermaid) {
color: inherit;
text-decoration: inherit;
}
code:not(.bash):not(.hljs):not(.nohighlight):not(.mermaid) {
background: #F1F0FF;
padding: 4px 8px;
font-family: @code-font;
font-size: 13px;
line-height: 16px;
color: @core-fleet-black;
}
pre {
code {
background: none;
padding: 0px;
font-family: @code-font;
font-size: 13px;
line-height: 16px;
color: @core-fleet-black;
}
padding: 24px;
border: 1px solid #E2E4EA;
border-radius: 6px;
margin: 0px 0px 40px;
font-family: @code-font;
background: #F9FAFC;
white-space: break-spaces;
}
code.mermaid:not([data-processed='true']) {
opacity: 0;
}
code.mermaid {
color: @core-fleet-black-75;
margin-bottom: 16px 0px 32px;
font-family: @code-font;
display: inline-block;
margin-left: auto;
margin-right: auto;
background: #fff;
svg {
max-height: 600px;
}
}
blockquote {
margin: 24px 0 32px 40px;
display: block;
position: relative;
}
[purpose='quote'] {
font-style: italic;
line-height: 36px;
font-size: 24px;
max-width: 640px;
p {
margin-top: 8px;
}
}
[purpose='large-quote'] {
font-style: italic;
line-height: 24px;
font-size: 16px;
}
[purpose='large-quote']::before, [purpose='quote']::before {
content: ' ';
background-image: url('/images/icon-quote-mark-22x18@2x.png');
background-size: 22px 18px;
display: block;
position: relative;
top: 24px;
left: -40px;
width: 22px;
height: 18px;
}
[purpose='tip'] {
margin: 16px 0 32px;
background: #F7F7FC;
border: 1px solid @core-vibrant-blue-50;
padding: 16px;
border-radius: 8px;
display: flex;
img {
display: flex;
margin: 4px 12px 0 0;
height: 16px;
width: 16px;
padding: 0px;
}
p {
display: block;
margin-bottom: 16px;
line-height: 24px;
font-size: 16px;
}
p:only-child, p:last-child {
margin-bottom: 0px;
}
ul:last-child {
margin-bottom: 0px;
}
li:last-child {
padding-bottom: 0px;
}
}
[purpose='embedded-content'] {
position: relative;
margin-bottom: 40px;
width: 100%;
padding-bottom: 57%;
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
table {
table-layout: auto;
border: 1px solid @border-lt-gray;
border-collapse: collapse;
font-size: 16px;
line-height: 28px;
margin-bottom: 16px;
max-width: 100%;
th {
font-weight: @bold;
border: 1px solid @border-lt-gray;
padding: 8px 7px 7px 8px;
}
td {
border: 1px solid @border-lt-gray;
padding: 8px 7px 7px 8px;
}
}
}
[purpose='bottom-cta'] {
padding-bottom: 40px;
h3 {
margin-bottom: 24px;
}
[purpose='next-steps-button'] {
padding: 16px 32px;
line-height: 21px;
font-size: 16px;
img {
height: 24px;
}
a {
color: unset;
}
}
}
[purpose='large-button-text'] {
display: block;
}
@media (max-width: 991px) {
[purpose='page-container'] {
max-width: 1200px;
padding: 64px 32px;
}
[purpose='right-sidebar'] {
margin-top: 48px;
width: 100%;
}
.header-hidden {
transform: translateY(0);
}
[purpose='article-container'] {
max-width: 100%;
padding-right: 0px;
display: flex;
flex-direction: column;
}
[purpose='article-title'] {
padding-top: 60px;
}
[purpose='article-content'] {
padding-bottom: 0px;
}
[purpose='breadcrumbs-and-search'] {
[purpose='breadcrumbs'] {
margin-bottom: 24px;
margin-right: auto;
}
[purpose='search'] {
width: 100%;
.DocSearch-Button {
width: 100%;
}
}
}
}
@media (max-width: 769px) {
[purpose='article-title'] {
padding-top: 40px;
margin-bottom: 8px;
h1 {
font-size: 28px;
line-height: 38px;
}
}
[purpose='right-sidebar'] {
margin-top: 40px;
}
[purpose='article-content'] {
img {
padding-bottom: 0px;
}
img + em { // Image captions
top: 4px;
margin-bottom: 16px;
}
}
}
@media (max-width: 575px) {
[purpose='page-container'] {
padding: 32px 24px;
}
[purpose='bottom-cta'] {
[purpose='next-steps-button'] {
width: 100%;
margin-bottom: 32px;
}
}
}
@media (max-width: 375px) {
[purpose='large-button-text'] { // Changes the Slack call to action (Join the Fleet community on Slack -> Join Fleet on Slack)
display: none;
}
}
}