Skip to content

Commit 04376a1

Browse files
authored
"new" pill in the ToC (#2394)
1 parent 8cfa6fb commit 04376a1

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

docs/administration/recent_activity/recent_activity.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: Log and monitor activity through UI, PHP API and REST API.
3+
month_change: true
34
---
45

56
# Recent activity [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]]

docs/api/php_api/php_api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
description: Public PHP API exposes the Repository in a number of services and allows creating, reading, updating, managing, and deleting objects.
33
page_type: reference
4+
month_change: true
45
---
56

67
# PHP API
78

8-
The public PHP API enables you to interact with [[= product_name =]]'s Repository and content model from your PHP code.
9+
The [public PHP API](../php_api_reference/) enables you to interact with [[= product_name =]]'s Repository and content model from your PHP code.
910

1011
You can use it to create, read, update, manage, and delete all objects available in [[= product_name =]], namely
1112
content and related objects such as Sections, Locations, content types, languages, etc.

docs/css/navigation.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@
133133
padding-bottom: 0.5rem;
134134
}
135135

136+
.md-nav__link .pill.new {
137+
margin-right: 15px;
138+
background-color: #d9e8ff;
139+
color: #3562a0;
140+
text-transform: lowercase;
141+
}
142+
136143
.md-nav__link::after {
137144
font-weight: 700;
138145
}

theme/partials/nav-item.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ul class="md-nav__list" data-md-scrollfix>
1717
{% set base = path %}
1818
{% for nav_item in nav_item.children %}
19-
{% set path = base ~ "-" ~ loop.index %}
19+
{% set path = base ~ "-" ~ loop.index %}
2020
{% set level = level + 1 %}
2121
{% include "partials/nav-item.html" %}
2222
{% endfor %}
@@ -37,6 +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 %}
4041
</a>
4142
{% if toc | first is defined %}
4243
{% include "partials/toc.html" %}
@@ -46,6 +47,7 @@
4647
<li class="{{ class }}">
4748
<a href="{{ nav_item.url | url }}" class="md-nav__link level-{{ level }}">
4849
{{ nav_item.title }}
50+
{% if nav_item.meta.month_change %}<span class="pill new">New</span>{% endif %}
4951
</a>
5052
</li>
5153
{% endif %}

0 commit comments

Comments
 (0)