From b1e263ef74a46061f1b80fd8a697ff6d50ae018c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Thu, 10 Apr 2025 15:44:22 +0200 Subject: [PATCH 01/10] Adjusted header size everywhere --- .../php_api/php_api_reference/css/base.css | 11 ++++++--- scss/_variables.scss | 7 ------ scss/release-notes.scss | 24 ------------------- 3 files changed, 8 insertions(+), 34 deletions(-) diff --git a/docs/api/php_api/php_api_reference/css/base.css b/docs/api/php_api/php_api_reference/css/base.css index f0ffe3fbf0..5e60f43c21 100644 --- a/docs/api/php_api/php_api_reference/css/base.css +++ b/docs/api/php_api/php_api_reference/css/base.css @@ -1605,7 +1605,7 @@ ul.breadcrumbs li.breadcrumb-item-current span { } .md-typeset h1 { - font-size: 28px; + font-size: 24px; line-height: 34px; margin-bottom: 0; } @@ -1702,7 +1702,7 @@ ul.breadcrumbs li.breadcrumb-item-current span { } .md-typeset h2 { - font-size: 22px; + font-size: 20px; line-height: 27px; margin: 24px 0 0; } @@ -1720,11 +1720,16 @@ ul.breadcrumbs li.breadcrumb-item-current span { } .md-typeset h5 { - font-size: 15px; + font-size: 14px; line-height: 18px; margin: 24px 0 0; } +.md-typeset h6 { + font-size: 12px; + line-height: 18px; + margin: 24px 0 0; +} .md-typeset .highlighttable, .md-typeset .highlight pre, diff --git a/scss/_variables.scss b/scss/_variables.scss index 2e9f49de32..b10c339621 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -21,10 +21,3 @@ $color-light-400: #ECECF1; $color-dark: #131C26; $color-dark-400: #71767C; - -$h1-font-size: 24px; -$h2-font-size: 20px; -$h3-font-size: 18px; -$h4-font-size: 16px; -$h5-font-size: 14px; -$h6-font-size: 12px; \ No newline at end of file diff --git a/scss/release-notes.scss b/scss/release-notes.scss index 569a68d776..971714e302 100644 --- a/scss/release-notes.scss +++ b/scss/release-notes.scss @@ -1,29 +1,5 @@ @use 'variables'; -// TODO: remove after changing header font sizes globally -.release-notes-header, -.release-notes { - h1 { - font-size: variables.$h1-font-size; - } - h2 { - font-size: variables.$h2-font-size; - } - h3 { - font-size: variables.$h3-font-size; - } - h4 { - font-size: variables.$h4-font-size; - } - h5 { - font-size: variables.$h5-font-size; - } - h6 { - font-size: variables.$h6-font-size; - } -} -// END - .release-notes-header { display: flex; justify-content: space-between; From b4d43018a3f5d286de45e98b454eb38cfbdf220b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 15 Apr 2025 14:21:00 +0200 Subject: [PATCH 02/10] Extracted pill styling --- .../php_api/php_api_reference/css/base.css | 29 +----------- docs/css/custom.css | 26 +--------- docs/css/pills.css | 47 +++++++++++++++++++ docs/css/release-notes.css | 25 ---------- docs/snippets/commerce_badge.md | 2 +- docs/snippets/experience_badge.md | 2 +- mkdocs.yml | 1 + scss/pills.scss | 36 ++++++++++++++ scss/release-notes.scss | 1 - theme/main.html | 6 +-- .../.phpdoc/template/css/custom.css.twig | 33 ------------- 11 files changed, 93 insertions(+), 115 deletions(-) create mode 100644 docs/css/pills.css create mode 100644 scss/pills.scss diff --git a/docs/api/php_api/php_api_reference/css/base.css b/docs/api/php_api/php_api_reference/css/base.css index 5e60f43c21..4623ba6781 100644 --- a/docs/api/php_api/php_api_reference/css/base.css +++ b/docs/api/php_api/php_api_reference/css/base.css @@ -699,31 +699,6 @@ div.pills { float: right; } -.pill { - background-color: var(--ibexa-jazzberry); - border-radius: 2.18px; - padding: 3px 8px; - color: var(--white); - font-size: 10px; - font-weight: 500; -} - -.experience-pill::after { - content: "Experience"; -} - -.experience-pill { - background-color: var(--ibexa-orange); -} - -.commerce-pill::after { - content: "Commerce"; -} - -.commerce-pill { - background-color: var(--ibexa-jazzberry); -} - .optional-pill::after { content: "Optional"; } @@ -1595,13 +1570,13 @@ ul.breadcrumbs li.breadcrumb-item-current span { color: var(--ibexa-dusk-black); } - - .md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4 { font-family: "Work Sans"; + display: flex; + align-items: center } .md-typeset h1 { diff --git a/docs/css/custom.css b/docs/css/custom.css index c065d35f71..b289d03241 100644 --- a/docs/css/custom.css +++ b/docs/css/custom.css @@ -152,6 +152,8 @@ body { .md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4, .md-typeset h5, .md-typeset h6 { color: var(--ibexa-dusk-black); line-height: 1; + display: flex; + align-items: center; } .md-typeset h1 { @@ -550,30 +552,6 @@ div.pills { float: right; } -.pill { - background-color: var(--ibexa-jazzberry); - border-radius: 2.18px; - padding: 3px 8px; - color: var(--white); - font-size: 10px; - font-weight: 500; -} - -.experience-pill::after { - content: "Experience"; -} - -.experience-pill { - background-color: var(--ibexa-orange); -} - -.commerce-pill::after { - content: "Commerce"; -} - -.commerce-pill { - background-color: var(--ibexa-jazzberry); -} .md-clipboard:focus, .md-clipboard:hover { color: var(--ibexa-jazzberry); diff --git a/docs/css/pills.css b/docs/css/pills.css new file mode 100644 index 0000000000..69a3d157c0 --- /dev/null +++ b/docs/css/pills.css @@ -0,0 +1,47 @@ +.pill { + font-size: 12px; + padding: 1px 8px; + border: 1px solid; + margin-right: 8px; +} +.pill--headless { + color: #C4234A; + border-color: #C4234A; +} +.pill--headless::after { + content: "Headless"; +} +.pill--experience { + color: #D3822B; + border-color: #D3822B; +} +.pill--experience::after { + content: "Experience"; +} +.pill--commerce { + color: #A32768; + border-color: #A32768; +} +.pill--commerce::after { + content: "Commerce"; +} +.pill--lts-update { + color: #5DA7C0; + border-color: #5DA7C0; +} +.pill--lts-update::after { + content: "LTS Update"; +} +.pill--new-feature { + color: #2C9445; + border-color: #2C9445; +} +.pill--new-feature::after { + content: "New feature"; +} +.pill--inline { + margin-left: 10px; + height: 19 px; +} + +/*# sourceMappingURL=pills.css.map */ diff --git a/docs/css/release-notes.css b/docs/css/release-notes.css index 476dc3b908..c9f56389fb 100644 --- a/docs/css/release-notes.css +++ b/docs/css/release-notes.css @@ -1,28 +1,3 @@ -.release-notes-header h1, -.release-notes h1 { - font-size: 24px; -} -.release-notes-header h2, -.release-notes h2 { - font-size: 20px; -} -.release-notes-header h3, -.release-notes h3 { - font-size: 18px; -} -.release-notes-header h4, -.release-notes h4 { - font-size: 16px; -} -.release-notes-header h5, -.release-notes h5 { - font-size: 14px; -} -.release-notes-header h6, -.release-notes h6 { - font-size: 12px; -} - .release-notes-header { display: flex; justify-content: space-between; diff --git a/docs/snippets/commerce_badge.md b/docs/snippets/commerce_badge.md index 0aa977a29b..94a50a63cc 100644 --- a/docs/snippets/commerce_badge.md +++ b/docs/snippets/commerce_badge.md @@ -1 +1 @@ - + diff --git a/docs/snippets/experience_badge.md b/docs/snippets/experience_badge.md index df97d86805..642de51538 100644 --- a/docs/snippets/experience_badge.md +++ b/docs/snippets/experience_badge.md @@ -1 +1 @@ - + diff --git a/mkdocs.yml b/mkdocs.yml index 82b95b202e..369e0d5740 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -952,6 +952,7 @@ extra_css: - css/codehilite.css - css/switcher.css - css/custom.css + - css/pills.css - css/page-not-found.css - css/navigation.css - css/search.css diff --git a/scss/pills.scss b/scss/pills.scss new file mode 100644 index 0000000000..e1310556fe --- /dev/null +++ b/scss/pills.scss @@ -0,0 +1,36 @@ +@use 'variables'; +@use 'sass:list'; + +.pill { + font-size: 12px; + padding: 1px 8px; + border: 1px solid; + margin-right: 8px; + + $types: ( + "headless": (variables.$color-error-main, "Headless"), + "experience": (variables.$color-warning-dark-01, "Experience"), + "commerce": (variables.$color-primary-main, "Commerce"), + "lts-update": (variables.$color-info-main, "LTS Update"), + "new-feature": (variables.$color-success-main, "New feature") + ); + + @each $name, $values in $types { + $color: list.nth($values, 1); + $label: list.nth($values, 2); + + &--#{$name} { + color: $color; + border-color: $color; + + &::after { + content: "#{$label}"; + } + } + } + + &--inline { + margin-left: 10px; + height:19 px; + } +} diff --git a/scss/release-notes.scss b/scss/release-notes.scss index 971714e302..b54ce18d39 100644 --- a/scss/release-notes.scss +++ b/scss/release-notes.scss @@ -234,7 +234,6 @@ 'lts-update' variables.$color-info-main, 'new-feature' variables.$color-success-main; - @each $name, $color in $types { &--#{$name} { color: $color; diff --git a/theme/main.html b/theme/main.html index f4daa26b2c..e7cedd3d4d 100644 --- a/theme/main.html +++ b/theme/main.html @@ -65,10 +65,10 @@ {% if page.meta.edition %}
{% if page.meta.edition == 'commerce' %} - + {% elif page.meta.edition == 'experience' %} - - + + {% endif %}
{% endif %} diff --git a/tools/php_api_ref/.phpdoc/template/css/custom.css.twig b/tools/php_api_ref/.phpdoc/template/css/custom.css.twig index 4f110a93c4..12b5c3cc77 100644 --- a/tools/php_api_ref/.phpdoc/template/css/custom.css.twig +++ b/tools/php_api_ref/.phpdoc/template/css/custom.css.twig @@ -515,39 +515,6 @@ div.pills { float: right; } -.pill { - background-color: var(--ibexa-jazzberry); - border-radius: 2.18px; - padding: 3px 8px; - color: var(--white); - font-size: 10px; - font-weight: 500; -} - -.experience-pill::after { - content: "Experience"; -} - -.experience-pill { - background-color: var(--ibexa-orange); -} - -.commerce-pill::after { - content: "Commerce"; -} - -.commerce-pill { - background-color: var(--ibexa-jazzberry); -} - -.optional-pill::after { - content: "Optional"; -} - -.optional-pill { - background-color: var(--sherpa-blue); -} - .md-clipboard:focus, .md-clipboard:hover { color: var(--ibexa-jazzberry); } From 3cea82fa947c909a4be8e193b38b945018a0b2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 15 Apr 2025 15:29:03 +0200 Subject: [PATCH 03/10] Unified header with release notes --- .gitignore | 1 + docs/css/navigation.css | 2 ++ docs/css/release-notes.css | 26 -------------------------- docs/js/custom.js | 2 +- docs/js/release-notes.js | 2 +- main.py | 2 +- scss/release-notes.scss | 21 --------------------- 7 files changed, 6 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index ab03be3cad..2a37a404eb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ tools/php-cs-fixer/vendor node_modules/ .yarn yarn.lock +docs/css/*.map diff --git a/docs/css/navigation.css b/docs/css/navigation.css index a079aa2634..ee083b8bd2 100644 --- a/docs/css/navigation.css +++ b/docs/css/navigation.css @@ -302,6 +302,8 @@ padding: 1rem 0.8rem; border-bottom: 1px solid var(--mid-grey); background: white; + display: flex; + align-items: center; } .push { diff --git a/docs/css/release-notes.css b/docs/css/release-notes.css index c9f56389fb..8663f96563 100644 --- a/docs/css/release-notes.css +++ b/docs/css/release-notes.css @@ -181,32 +181,6 @@ display: flex; padding: 4px 0 8px; } -.release-note__tag { - font-size: 12px; - padding: 1px 8px; - border: 1px solid; - margin-right: 8px; -} -.release-note__tag--headless { - color: #C4234A; - border-color: #C4234A; -} -.release-note__tag--experience { - color: #D3822B; - border-color: #D3822B; -} -.release-note__tag--commerce { - color: #A32768; - border-color: #A32768; -} -.release-note__tag--lts-update { - color: #5DA7C0; - border-color: #5DA7C0; -} -.release-note__tag--new-feature { - color: #2C9445; - border-color: #2C9445; -} .release-note__date { color: #71767C; margin-bottom: 24px; diff --git a/docs/js/custom.js b/docs/js/custom.js index 12a5eceb77..2c0481a3d0 100644 --- a/docs/js/custom.js +++ b/docs/js/custom.js @@ -33,7 +33,7 @@ $(document).ready(function() { }); // Add version pill to top of navigation - $('#site-name').append('' + branchName + ''); + $('#site-name').append('' + branchName + ''); $('.rst-current-version.switcher__label').html(branchName); diff --git a/docs/js/release-notes.js b/docs/js/release-notes.js index 4fd8675cf0..75a39870dd 100644 --- a/docs/js/release-notes.js +++ b/docs/js/release-notes.js @@ -14,7 +14,7 @@ const visibleItems = visibleItemsContainer.querySelectorAll('.release-notes-filters__visible-item'); const releaseNotesNodes = doc.querySelectorAll('.release-note'); const releaseNotesItems = [...releaseNotesNodes].map((releaseNotesNode) => { - const tagsNodes = releaseNotesNode.querySelectorAll('.release-note__tag'); + const tagsNodes = releaseNotesNode.querySelectorAll('.release-note__tags .pill'); const tagsItems = [...tagsNodes].map((tagNode) => `filter-${tagNode.dataset.filter}`); return { diff --git a/main.py b/main.py index 0ee534c714..e9042f6265 100644 --- a/main.py +++ b/main.py @@ -172,7 +172,7 @@ def release_note_entry_begin(header : str, date: str, categories : List[str]) -> category_badges = "".join( [ """ -
{category}
+
""".format(category_slug=slugify(category), category=category) for category in categories ] diff --git a/scss/release-notes.scss b/scss/release-notes.scss index b54ce18d39..c9dd31091a 100644 --- a/scss/release-notes.scss +++ b/scss/release-notes.scss @@ -221,27 +221,6 @@ padding: 4px 0 8px; } - &__tag { - font-size: 12px; - padding: 1px 8px; - border: 1px solid; - margin-right: 8px; - - $types: - 'headless' variables.$color-error-main, - 'experience' variables.$color-warning-dark-01, - 'commerce' variables.$color-primary-main, - 'lts-update' variables.$color-info-main, - 'new-feature' variables.$color-success-main; - - @each $name, $color in $types { - &--#{$name} { - color: $color; - border-color: $color; - } - } - } - &__date { color: variables.$color-dark-400; margin-bottom: 24px; From f399266bc40f068f1b8d91c90ccf8ea3a4cd4d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 15 Apr 2025 15:40:36 +0200 Subject: [PATCH 04/10] Added LTS update badhe --- docs/ai_actions/ai_actions.md | 1 + docs/ai_actions/ai_actions_guide.md | 1 + docs/ai_actions/extend_ai_actions.md | 1 + docs/ai_actions/install_ai_actions.md | 1 + docs/api/event_reference/ai_action_events.md | 1 + docs/content_management/data_migration/importing_data.md | 4 ++-- docs/css/pills.css | 2 +- docs/pim/attributes/date_and_time.md | 1 + .../action_configuration_criteria.md | 1 + .../action_configuration_sort_clauses.md | 1 + docs/search/criteria_reference/datetimeattribute_criterion.md | 1 + .../criteria_reference/datetimeattributerange_criterion.md | 1 + docs/snippets/lts-update_badge.md | 1 + scss/pills.scss | 2 +- theme/main.html | 2 ++ 15 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 docs/snippets/lts-update_badge.md diff --git a/docs/ai_actions/ai_actions.md b/docs/ai_actions/ai_actions.md index 3009b638f8..957a2ea0fc 100644 --- a/docs/ai_actions/ai_actions.md +++ b/docs/ai_actions/ai_actions.md @@ -1,6 +1,7 @@ --- description: AI Actions help editors by automating repetitive tasks. page_type: landing_page +edition: lts-update month_change: false --- diff --git a/docs/ai_actions/ai_actions_guide.md b/docs/ai_actions/ai_actions_guide.md index 493e9c7634..efaf7cda18 100644 --- a/docs/ai_actions/ai_actions_guide.md +++ b/docs/ai_actions/ai_actions_guide.md @@ -1,5 +1,6 @@ --- description: AI Actions LTS update helps editors by automating repetitive tasks. +edition: lts-update month_change: true --- diff --git a/docs/ai_actions/extend_ai_actions.md b/docs/ai_actions/extend_ai_actions.md index f3d87e2e44..d1ecfe397c 100644 --- a/docs/ai_actions/extend_ai_actions.md +++ b/docs/ai_actions/extend_ai_actions.md @@ -1,5 +1,6 @@ --- description: Extend AI Actions by connecting to other services and adding new capabilities. +edition: lts-update month_change: false --- diff --git a/docs/ai_actions/install_ai_actions.md b/docs/ai_actions/install_ai_actions.md index b93be2c94e..cf6729d889 100644 --- a/docs/ai_actions/install_ai_actions.md +++ b/docs/ai_actions/install_ai_actions.md @@ -1,5 +1,6 @@ --- description: Install the AI Actions LTS update. +edition: lts-update month_change: true --- diff --git a/docs/api/event_reference/ai_action_events.md b/docs/api/event_reference/ai_action_events.md index 97a520aab8..f8e0d9857d 100644 --- a/docs/api/event_reference/ai_action_events.md +++ b/docs/api/event_reference/ai_action_events.md @@ -1,6 +1,7 @@ --- description: Events that are triggered when working with AI actions. page_type: reference +edition: lts-update month_change: false --- diff --git a/docs/content_management/data_migration/importing_data.md b/docs/content_management/data_migration/importing_data.md index 55dc32a435..312b888838 100644 --- a/docs/content_management/data_migration/importing_data.md +++ b/docs/content_management/data_migration/importing_data.md @@ -346,7 +346,7 @@ You can also update attributes, including changing which attribute group they be You can't change the attribute type of an existing attribute. -##### Date and time attributes +##### Date and time attributes [[% include 'snippets/lts-update_badge.md' %]] If you're using attributes of the [date and time type](date_and_time.md), you can manage it through the migrations as well, for example: @@ -487,7 +487,7 @@ When updating a content type, use: [[= include_file('code_samples/data_migration/examples/update_tag.yaml') =]] ``` -### AI action configurations +### AI action configurations [[% include 'snippets/lts-update_badge.md' %]] - The following example shows how you can create a new action configuration in your system: diff --git a/docs/css/pills.css b/docs/css/pills.css index 69a3d157c0..1fce00fe83 100644 --- a/docs/css/pills.css +++ b/docs/css/pills.css @@ -41,7 +41,7 @@ } .pill--inline { margin-left: 10px; - height: 19 px; + height: 20px; } /*# sourceMappingURL=pills.css.map */ diff --git a/docs/pim/attributes/date_and_time.md b/docs/pim/attributes/date_and_time.md index 30d0e8cfb9..413671c5dc 100644 --- a/docs/pim/attributes/date_and_time.md +++ b/docs/pim/attributes/date_and_time.md @@ -1,5 +1,6 @@ --- description: Date and time attribute type allows you to store product information related to time, like an expiration date or date of manufacturing. +edition: lts-update --- # Date and time attributes diff --git a/docs/search/ai_actions_search_reference/action_configuration_criteria.md b/docs/search/ai_actions_search_reference/action_configuration_criteria.md index e8e83bd9f5..a5046e9ea2 100644 --- a/docs/search/ai_actions_search_reference/action_configuration_criteria.md +++ b/docs/search/ai_actions_search_reference/action_configuration_criteria.md @@ -1,5 +1,6 @@ --- month_change: false +edition: lts-update --- # Action Configuration Search Criterion reference diff --git a/docs/search/ai_actions_search_reference/action_configuration_sort_clauses.md b/docs/search/ai_actions_search_reference/action_configuration_sort_clauses.md index e058a766bb..d83cde7113 100644 --- a/docs/search/ai_actions_search_reference/action_configuration_sort_clauses.md +++ b/docs/search/ai_actions_search_reference/action_configuration_sort_clauses.md @@ -1,5 +1,6 @@ --- month_change: false +edition: lts-update --- # Action Configuration Search Sort Clauses reference diff --git a/docs/search/criteria_reference/datetimeattribute_criterion.md b/docs/search/criteria_reference/datetimeattribute_criterion.md index 15c581cfe4..14abe150cd 100644 --- a/docs/search/criteria_reference/datetimeattribute_criterion.md +++ b/docs/search/criteria_reference/datetimeattribute_criterion.md @@ -1,5 +1,6 @@ --- description: DateTimeAttribute Criterion +edition: lts-update --- # DateTimeAttribute criterion diff --git a/docs/search/criteria_reference/datetimeattributerange_criterion.md b/docs/search/criteria_reference/datetimeattributerange_criterion.md index fd0d628527..72df235edb 100644 --- a/docs/search/criteria_reference/datetimeattributerange_criterion.md +++ b/docs/search/criteria_reference/datetimeattributerange_criterion.md @@ -1,5 +1,6 @@ --- description: DateTimeAttributeRange Criterion +edition: lts-update --- # DateTimeAttributeRange criterion diff --git a/docs/snippets/lts-update_badge.md b/docs/snippets/lts-update_badge.md new file mode 100644 index 0000000000..3a63215a49 --- /dev/null +++ b/docs/snippets/lts-update_badge.md @@ -0,0 +1 @@ + diff --git a/scss/pills.scss b/scss/pills.scss index e1310556fe..aa414ce3c8 100644 --- a/scss/pills.scss +++ b/scss/pills.scss @@ -31,6 +31,6 @@ &--inline { margin-left: 10px; - height:19 px; + height: 20px; } } diff --git a/theme/main.html b/theme/main.html index e7cedd3d4d..da364c208e 100644 --- a/theme/main.html +++ b/theme/main.html @@ -69,6 +69,8 @@ {% elif page.meta.edition == 'experience' %} + {% elif page.meta.edition == 'lts-update' %} + {% endif %} {% endif %} From 66db5a042c50ae505a9991809b62cde83ff80466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 15 Apr 2025 15:45:21 +0200 Subject: [PATCH 05/10] Added default color for pill - latest pill on homepage --- docs/css/pills.css | 1 + scss/pills.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/css/pills.css b/docs/css/pills.css index 1fce00fe83..72521e66d3 100644 --- a/docs/css/pills.css +++ b/docs/css/pills.css @@ -3,6 +3,7 @@ padding: 1px 8px; border: 1px solid; margin-right: 8px; + color: #A32768; } .pill--headless { color: #C4234A; diff --git a/scss/pills.scss b/scss/pills.scss index aa414ce3c8..2da9610b0d 100644 --- a/scss/pills.scss +++ b/scss/pills.scss @@ -6,6 +6,7 @@ padding: 1px 8px; border: 1px solid; margin-right: 8px; + color: variables.$color-primary-main; $types: ( "headless": (variables.$color-error-main, "Headless"), From 403d42321d60c0f91dc60eb36bccd8b076f910c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 15 Apr 2025 16:50:00 +0200 Subject: [PATCH 06/10] New pill changes --- .../php_api/php_api_reference/css/base.css | 14 --------- docs/css/custom.css | 5 ---- docs/css/navigation.css | 7 ----- docs/css/pills.css | 13 ++++++++- docs/js/custom.js | 2 +- scss/pills.scss | 29 ++++++++++++++++++- theme/partials/nav-item.html | 6 ++-- 7 files changed, 44 insertions(+), 32 deletions(-) diff --git a/docs/api/php_api/php_api_reference/css/base.css b/docs/api/php_api/php_api_reference/css/base.css index 4623ba6781..4b2ce2c8fd 100644 --- a/docs/api/php_api/php_api_reference/css/base.css +++ b/docs/api/php_api/php_api_reference/css/base.css @@ -1592,20 +1592,6 @@ ul.breadcrumbs li.breadcrumb-item-current span { align-items: flex-end; } -.md-typeset .content-header .pills { - float: none; - width: 100%; -} - -.md-typeset .content-header .pill { - display: inline-block; - margin-bottom: 12px; - font-size: 12px; - line-height: 18px; - padding: 0 8px; - background-color: transparent; -} - .md-typeset .content-header .experience-pill { color: var(--ibexa-orange); border: 1px solid var(--ibexa-orange); diff --git a/docs/css/custom.css b/docs/css/custom.css index b289d03241..83177f29b7 100644 --- a/docs/css/custom.css +++ b/docs/css/custom.css @@ -548,11 +548,6 @@ a.external:not(.card):after { padding: 0; } -div.pills { - float: right; -} - - .md-clipboard:focus, .md-clipboard:hover { color: var(--ibexa-jazzberry); } diff --git a/docs/css/navigation.css b/docs/css/navigation.css index ee083b8bd2..a62f53f0b4 100644 --- a/docs/css/navigation.css +++ b/docs/css/navigation.css @@ -142,13 +142,6 @@ padding-bottom: 0.5rem; } -.md-nav__link .pill.new { - margin-right: 15px; - background-color: #d9e8ff; - color: #3562a0; - text-transform: lowercase; -} - .md-nav__link::after { font-weight: 700; } diff --git a/docs/css/pills.css b/docs/css/pills.css index 72521e66d3..3c1487203c 100644 --- a/docs/css/pills.css +++ b/docs/css/pills.css @@ -42,7 +42,18 @@ } .pill--inline { margin-left: 10px; - height: 20px; + padding-top: 4px; + padding-bottom: 4px; +} +.pill--new { + margin-right: 15px; + color: #d9e8ff; + color: #3562a0; + text-transform: lowercase; +} + +div.pills { + float: right; } /*# sourceMappingURL=pills.css.map */ diff --git a/docs/js/custom.js b/docs/js/custom.js index 2c0481a3d0..f3d1816b41 100644 --- a/docs/js/custom.js +++ b/docs/js/custom.js @@ -236,5 +236,5 @@ $(document).ready(function() { }); // Mark higher-level nodes with "New" pill, not only the actual item - $('.pill.new:not([hidden])').parents('.md-nav__item').children('label').children('.pill.new[hidden]').removeAttr('hidden'); + $('.pill--new:not([hidden])').parents('.md-nav__item').children('label').children('.pill--new[hidden]').removeAttr('hidden'); }); diff --git a/scss/pills.scss b/scss/pills.scss index 2da9610b0d..1370fbb57c 100644 --- a/scss/pills.scss +++ b/scss/pills.scss @@ -32,6 +32,33 @@ &--inline { margin-left: 10px; - height: 20px; + padding-top: 4px; + padding-bottom: 4px; } + + &--new { + margin-right: 15px; + color: #d9e8ff; + color: #3562a0; + text-transform: lowercase; + } +} + +div.pills { + float: right; } + +// Used in reference only? +// .md-typeset .content-header .pills { +// float: none; +// width: 100%; +// } + +// .md-typeset .content-header .pill { +// display: inline-block; +// margin-bottom: 12px; +// font-size: 12px; +// line-height: 18px; +// padding: 0 8px; +// background-color: transparent; +// } diff --git a/theme/partials/nav-item.html b/theme/partials/nav-item.html index c6c67deec5..006289eabd 100644 --- a/theme/partials/nav-item.html +++ b/theme/partials/nav-item.html @@ -7,7 +7,7 @@ {% set checked = "checked" if nav_item.active %}