Skip to content

Commit 6e35e24

Browse files
committed
Unified pills and headers
1 parent d94a48e commit 6e35e24

15 files changed

+168
-52
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ __pycache__/*
55
**/.idea/
66
/node_modules/
77
yarn.lock
8+
**.css.map

docs/ai_actions/ai_actions.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: Learn about generative AI and its capabilities.
3+
edition: lts-update
34
---
45

56
# AI Actions

docs/ai_actions/work_with_ai_actions.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: Create new AI actions or modify existing ones to work faster and increase creativity.
3+
edition: lts-update
34
---
45

56
# Work with AI actions

docs/css/custom.css

+15-35
Original file line numberDiff line numberDiff line change
@@ -152,32 +152,41 @@ body {
152152
.md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4, .md-typeset h5, .md-typeset h6 {
153153
color: var(--ibexa-dusk-black);
154154
line-height: 1;
155+
display: flex;
156+
align-items: center;
157+
text-align: center;
155158
}
156159

157160
.md-typeset h1 {
158161
margin: 0 0 1rem;
159-
font-size: 34px;
162+
font-size: 24px;
163+
line-height: 34px;
160164
}
161165

162166
.md-typeset h2 {
163-
font-size: 28px;
167+
font-size: 20px;
168+
line-height: 27px;
164169
}
165170

166171
.md-typeset h3 {
167-
font-size: 24px;
172+
font-size: 18px;
173+
line-height: 22px;
168174
}
169175

170176
.md-typeset h4 {
171-
font-size: 22px;
177+
font-size: 16;
178+
line-height: 19px;
172179
}
173180

174181
.md-typeset h5 {
175-
font-size: 18px;
182+
font-size: 14px;
183+
line-height: 18px;
176184
text-transform: none;
177185
}
178186

179187
.md-typeset h6 {
180-
font-size: 16px;
188+
font-size: 12px;
189+
line-height: 18px;
181190
}
182191

183192
.md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4, .md-typeset h5, .md-typeset h6 {
@@ -546,35 +555,6 @@ a.external:not(.card):not(.notification__cta a):after {
546555
padding: 0;
547556
}
548557

549-
div.pills {
550-
float: right;
551-
}
552-
553-
.pill {
554-
background-color: var(--ibexa-jazzberry);
555-
border-radius: 2.18px;
556-
padding: 3px 8px;
557-
color: var(--white);
558-
font-size: 10px;
559-
font-weight: 500;
560-
}
561-
562-
.experience-pill::after {
563-
content: "Experience";
564-
}
565-
566-
.experience-pill {
567-
background-color: var(--ibexa-orange);
568-
}
569-
570-
.commerce-pill::after {
571-
content: "Commerce";
572-
}
573-
574-
.commerce-pill {
575-
background-color: var(--ibexa-jazzberry);
576-
}
577-
578558
.md-clipboard:focus, .md-clipboard:hover {
579559
color: var(--ibexa-jazzberry);
580560
}

docs/css/navigation.css

+2-7
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,6 @@
142142
padding-bottom: 0.5rem;
143143
}
144144

145-
.md-nav__link .pill.new {
146-
margin-right: 15px;
147-
background-color: #d9e8ff;
148-
color: #3562a0;
149-
text-transform: lowercase;
150-
}
151-
152145
.md-nav__link::after {
153146
font-weight: 700;
154147
}
@@ -302,6 +295,8 @@
302295
padding: 1rem 0.8rem;
303296
border-bottom: 1px solid var(--mid-grey);
304297
background: white;
298+
display: flex;
299+
align-items: center;
305300
}
306301

307302
.push {

docs/css/pills.css

+60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/custom.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $(document).ready(function() {
2424
}
2525

2626
// Add version pill to top of navigation
27-
$('#site-name').append('<span class="pill">' + branchName + '</span>');
27+
$('#site-name').append('<span class="pill pill--inline">' + branchName + '</span>');
2828

2929
$('.rst-current-version.switcher__label').html(branchName);
3030

@@ -197,5 +197,5 @@ $(document).ready(function() {
197197
});
198198

199199
// Mark higher-level nodes with "New" pill, not only the actual item
200-
$('.pill.new:not([hidden])').parents('.md-nav__item').children('label').children('.pill.new[hidden]').removeAttr('hidden');
200+
$('.pill--new:not([hidden])').parents('.md-nav__item').children('label').children('.pill--new[hidden]').removeAttr('hidden');
201201
});

docs/snippets/commerce_badge.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<span class="pill commerce-pill"></span>
1+
<span class="pill pill--inline pill--commerce"></span>

docs/snippets/experience_badge.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<span class="pill experience-pill"></span>
1+
<span class="pill pill--inline pill--experience"></span>

docs/snippets/lts-update_badge.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<span class="pill pill--inline pill--lts-update"></span>

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ extra_css:
199199
- css/custom.css
200200
- css/page-not-found.css
201201
- css/navigation.css
202+
- css/pills.css
202203
- css/search.css
203204
- css/docs.switcher.css
204205
- css/jquery-ui.min.css

scss/_variables.scss

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
2+
$transition-duration: 0.4s;
3+
4+
$color-primary-main: #A32768;
5+
6+
$color-dark-85-white: #DCDDDE;
7+
$color-dark-100-white: #FFFFFF;
8+
9+
$color-info-main: #5DA7C0;
10+
11+
$color-success-main: #2C9445;
12+
13+
$color-error-main: #C4234A;
14+
15+
$color-warning-dark-01: #D3822B;
16+
17+
$color-primary: #AE1164;
18+
19+
$color-light: #E0E0E8;
20+
$color-light-400: #ECECF1;
21+
22+
$color-dark: #131C26;
23+
$color-dark-400: #71767C;

scss/pills.scss

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@use 'variables';
2+
@use 'sass:list';
3+
4+
.pill {
5+
font-size: 12px;
6+
font-weight: initial;
7+
line-height: 18px;
8+
padding: 1px 8px;
9+
border: 1px solid;
10+
margin-right: 8px;
11+
color: variables.$color-primary-main;
12+
13+
$types: (
14+
"headless": (variables.$color-error-main, "Headless"),
15+
"experience": (variables.$color-warning-dark-01, "Experience"),
16+
"commerce": (variables.$color-primary-main, "Commerce"),
17+
"lts-update": (variables.$color-info-main, "LTS Update"),
18+
"new-feature": (variables.$color-success-main, "New feature")
19+
);
20+
21+
@each $name, $values in $types {
22+
$color: list.nth($values, 1);
23+
$label: list.nth($values, 2);
24+
25+
&--#{$name} {
26+
color: $color;
27+
border-color: $color;
28+
29+
&::after {
30+
content: "#{$label}";
31+
}
32+
}
33+
}
34+
35+
&--inline {
36+
&:first-of-type {
37+
margin-left: 8px;
38+
}
39+
}
40+
41+
&--new {
42+
margin-right: 15px;
43+
align-self: center;
44+
color: #d9e8ff;
45+
color: #3562a0;
46+
text-transform: lowercase;
47+
}
48+
}
49+
50+
div.pills {
51+
float: right;
52+
}

theme/main.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@
5656
{% if page.meta.edition %}
5757
<div class="pills">
5858
{% if page.meta.edition == 'commerce' %}
59-
<span class="pill commerce-pill"></span>
59+
<span class="pill pill--commerce"></span>
6060
{% elif page.meta.edition == 'experience' %}
61-
<span class="pill experience-pill"></span>
62-
<span class="pill commerce-pill"></span>
61+
<span class="pill pill--experience"></span><span class="pill pill--commerce"></span>
62+
{% elif page.meta.edition == 'lts-update' %}
63+
<span class="pill pill--lts-update"></span>
6364
{% endif %}
6465
</div>
6566
{% endif %}

theme/partials/nav-item.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% set checked = "checked" if nav_item.active %}
88
<input class="md-nav__toggle md-toggle" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}" {{ checked }}>
99
<label class="md-nav__link level-{{ level }}" for="{{ path }}">
10-
{{ nav_item.title }} <span class="pill new" hidden>New</span>
10+
{{ nav_item.title }} <span class="pill pill--new" hidden>New</span>
1111
</label>
1212
<nav class="md-nav" aria-label="{{ nav_item.title }}" data-md-level="{{ level }}">
1313
<label class="md-nav__link-title md-nav__link level-{{ level }}" for="{{ path }}">
@@ -37,7 +37,7 @@
3737
{% endif %}
3838
<a href="{{ nav_item.url | url }}" class="md-nav__link level-{{ level }} md-nav__link--active">
3939
{{ nav_item.title }}
40-
{% if nav_item.meta.month_change %}<span class="pill new">New</span>{% endif %}
40+
{% if nav_item.meta.month_change %}<span class="pill pill--new">New</span>{% endif %}
4141
</a>
4242
{% if toc | first is defined %}
4343
{% include "partials/toc.html" %}
@@ -47,7 +47,7 @@
4747
<li class="{{ class }}">
4848
<a href="{{ nav_item.url | url }}" class="md-nav__link level-{{ level }}">
4949
{{ nav_item.title }}
50-
{% if nav_item.meta.month_change %}<span class="pill new">New</span>{% endif %}
50+
{% if nav_item.meta.month_change %}<span class="pill pill--new">New</span>{% endif %}
5151
</a>
5252
</li>
5353
{% endif %}

0 commit comments

Comments
 (0)