diff --git a/packages/stacks-classic/lib/components/post-summary/post-summary.less b/packages/stacks-classic/lib/components/post-summary/post-summary.less index c52328047f..d992f2176d 100644 --- a/packages/stacks-classic/lib/components/post-summary/post-summary.less +++ b/packages/stacks-classic/lib/components/post-summary/post-summary.less @@ -1,458 +1,278 @@ .s-post-summary { - // --_ps-state-* are custom properties to broadly override colors for a given post summary state - --_ps-bb: var(--su1) solid var(--bc-light); - --_ps-bg: unset; - --_ps-o: unset; - // Child components - --_ps-content-excerpt-fc: var(--_ps-state-fc, var(--fc-medium)); - --_ps-content-title-a-fc: var(--_ps-state-fc, var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary)))); - --_ps-content-title-a-fc-hover: var(--_ps-state-fc, var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500)))); - --_ps-content-title-a-fc-visited: var(--_ps-state-fc, var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--purple-500)))); - --_ps-content-title-a-fc-hover-visited: var(--_ps-state-fc, var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--purple-600)))); - --_ps-stats-ai: flex-end; - --_ps-stats-fc: var(--_ps-state-fc, var(--fc-light)); - --_ps-stats-fd: column; - --_ps-stats-w: calc(var(--su96) + var(--su12)); - // Stats item modifiers - --_ps-has-answers-bc: var(--green-400); - --_ps-has-answers-bg: unset; - --_ps-has-answers-fc: var(--green-400); - --_ps-has-accepted-answers-bc: var(--green-400); - --_ps-has-accepted-answers-bg: var(--green-400); - --_ps-has-accepted-answers-fc: var(--white); - --_ps-stats-item-emphasized-fc: var(--_ps-state-fc, var(--fc-dark)); - - // CONTEXTUAL STYLES - #stacks-internals #screen-md({ - --_ps-stats-ai: center; - --_ps-stats-fd: row; - --_ps-stats-w: auto; - - flex-direction: column; - }); - - // MODIFIERS - &&__minimal, - & &--answer { - --_ps-stats-ai: center; - --_ps-stats-fd: row; - --_ps-stats-w: auto; - } - - &&__minimal { - .s-post-summary--content { - width: 100%; - } - - flex-direction: column; - } - - // VARIANTS - &&__deleted, - &&__ignored { - --_ps-o: 0.75; - --_ps-has-answers-bc: var(--black-350); - --_ps-has-answers-bg: transparent; - --_ps-has-answers-fc: var(--_ps-state-fc); - --_ps-has-accepted-answers-bc: transparent; - --_ps-has-accepted-answers-bg: var(--black-150); - --_ps-has-accepted-answers-fc: var(--_ps-state-fc); - --_ps-meta-tags-tag-bg: var(--black-150); - --_ps-meta-tags-tag-fc: var(--_ps-state-fc); - --_ps-state-fc: var(--black-400); - - .s-post-summary--meta-tags { - a, // TODO: remove rule for `a` once Core replaces `.post-tag` with `.s-tag` - .post-tag, - .s-tag { - &, - &:active, - &:hover, - &:focus, - .focus-bordered { - .highcontrast-mode({ - border-color: currentColor; - }); - - background-color: var(--_ps-meta-tags-tag-bg); - color: var(--black-500); - border-color: var(--black-300); - } - } + @psx-container-sm: 28rem; + --_ps-answer-icon-fc: unset; + --_ps-content-type-bc: var(--black-200); + --_ps-content-type-bg: var(--black-050); + --_ps-content-type-fc: var(--black-600); + --_ps-stats-answers-bg: unset; + --_ps-stats-answers-fc: unset; + --_ps-stats-answers-fw: unset; + --_ps-stats-answers-icon-fc: unset; + --_ps-title-link-fc: var(--theme-secondary-600); + + // Conditional styles + // Note: we cannot use CSS custom properties for container query values + @container post-summary (width <= @psx-container-sm) { + .s-post-summary--sm-hide { + display: none !important; } - - .s-user-card { - a, - .s-user-card--link, - .s-user-card--rep, - .s-user-card--time { - color: var(--_ps-state-fc); - } - - .s-badge { - filter: grayscale(100%); - } + .s-post-summary--sm-show { + display: flex !important; } } - &&__deleted, - &&__watched { - background-color: var(--_ps-bg); - } - - &&__deleted { - --_ps-bg: var(--red-100); - --_ps-has-accepted-answers-bg: var(--black-200); - --_ps-has-accepted-answers-fc: var(--black-500); - --_ps-meta-tags-tag-bg: var(--black-200); - - .is-deleted, - .s-badge__danger.s-badge__filled { - .dark-mode({ - background-color: var(--red-600); - color: var(--white); - }); - background-color: var(--red-500); + @container post-summary (width > @psx-container-sm) { + .s-post-summary--sm-hide { + display: flex !important; } - } - - &&__watched { - &:not(.s-post-summary__deleted):not(.s-post-summary__ignored) { - --_ps-bg: var(--yellow-100); - --_ps-stats-fc: var(--black-400); - --_ps-content-title-a-fc: var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary))); - --_ps-content-title-a-fc-hover: var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500))); - --_ps-content-title-a-fc-visited: var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--purple-500))); - --_ps-content-title-a-fc-hover-visited: var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--purple-600))); - - .s-user-card { - a { - &:active, - &:hover { - color: var(--_ps-content-title-a-fc-hover); - } - - &:visited { - &:hover { - color: var(--_ps-content-title-a-fc-hover-visited); - } - - color: var(--_ps-content-title-a-fc-visited); - } - - color: var(--_ps-content-title-a-fc); - } - - .s-user-card--rep, - .s-user-card--time { - color: var(--black-500); - } - } + .s-post-summary--sm-show { + display: none !important; } } - &:last-child { - --_ps-bb: none; + // MODIFIERS + &&__answered { + --_ps-stats-answers-bg: var(--green-400); + --_ps-stats-answers-fc: var(--white); + --_ps-stats-answers-fw: 600; + --_ps-stats-answers-icon-fc: var(--green-400); } - // Child Elements - & & { - &--answer { - & + & { - margin-top: var(--su16); - } - - &:before { - .highcontrast-mode({ - background: var(--black-500); - }); - - background: var(--black-250); - border-radius: var(--su8); - bottom: 0; - content: ""; - display: block; - left: 0; - position: absolute; - top: 0; - width: var(--su4); - } + &&__deleted, + &:has(.s-tag.s-tag__ignored) { + --_ps-ignored-bg: var(--black-100); + --_ps-ignored-fc: var(--black-400); + + &.s-post-summary__answered { + --_ps-stats-answers-bg: var(--_ps-ignored-bg); + --_ps-stats-answers-fc: var(--_ps-ignored-fc); + --_ps-stats-answers-icon-fc: var(--black-350); + } - margin: var(--su16) 1em 0 1em; - padding: 0.5em 0 0.5em calc(1em + var(--su4)); - position: relative; + * { + color: var(--_ps-ignored-fc) !important; } - &--answer-excerpt { - .v-truncate4; - color: var(--black-500); - margin-bottom: var(--su8); + .s-avatar { + opacity: 0.5; } - &--content { - > *:not(.s-post-summary--content-menu-button):not(.s-post-summary--meta):not(.s-popover) { - opacity: var(--_ps-o); - } + .s-user-card--rep .s-bling:before { + background-color: var(--_ps-ignored-fc) !important; + } - flex-grow: 1; - max-width: 100%; + .s-badge, + .s-tag, + .s-post-summary--stats-bounty { + background-color: var(--_ps-ignored-bg) !important; + border-color: var(--_ps-ignored-bg) !important; + color: var(--_ps-ignored-fc) !important; } + } - &--content-excerpt { - &.s-post-summary--content-excerpt { - &__sm { - .v-truncate1; - } + &&__deleted { + background-color: var(--red-100); + border: var(--su8) solid var(--red-100); + } - &__md { - .v-truncate3; - } + // Child components + .s-tag.s-tag__watched { + --_ta-bc: var(--yellow-200); + --_ta-bg: var(--yellow-200); + --_ta-fc: var(--yellow-600); + --_ta-bc-hover: var(--yellow-200); + --_ta-bg-hover: var(--yellow-200); + } - &__lg { - .v-truncate4; - } - } + // TODO SHINE complete answers styling + & &--answers { + display: flex; + flex-direction: column; + gap: var(--su16); + padding-top: calc(var(--su8) + var(--su2)); // 10px + } - .break-word; - .v-truncate2; - color: var( --_ps-content-excerpt-fc); - font-family: var(--theme-post-body-font-family, var(--theme-body-font-family)); - margin-top: var(--sun2); - margin-bottom: var(--su8); + & &--answer { + &__accepted { + --_ps-answer-icon-fc: var(--green-400); } - &--content-menu-button { - .svg-icon { - margin: 0 !important; - } - - &, - &.s-btn { // To override .s-btn class attributes - padding: var(--su8); - position: absolute; - } - - right: var(--su8); - top: var(--su8); + .s-post-summary--stats-answers--icon { + color: var(--_ps-answer-icon-fc); } - &--content-title { - a { - &:active, - &:hover { - color: var(--_ps-content-title-a-fc-hover); - } - &:visited { - &:hover { - color: var(--_ps-content-title-a-fc-hover-visited); - } - - color: var(--_ps-content-title-a-fc-visited); - } - - .break-word; - color: var(--_ps-content-title-a-fc); - font-family: var(--theme-post-title-font-family, var(--theme-body-font-family)); - } + border-left: var(--su4) solid var(--black-150); + display: flex; + flex-direction: column; + gap: var(--su6); + padding-left: var(--su8); + } - .iconShield { - color: var(--fc-light); - } + & &--content { + display: flex; + flex-direction: column; + gap: var(--su6); + width: 100%; + } - .svg-icon { - position: relative; - top: var(--sun1); - vertical-align: text-bottom; // Optical alignment - } + & &--content-meta { + align-items: center; + color: var(--black-400); + display: flex; + flex-wrap: wrap; + font-size: var(--fs-caption); + gap: var(--su6); + } - .break-word; + & &--stats-item { + &:before { + aspect-ratio: 1/1; + background-color: var(--black-300); + content: ""; display: block; - font-size: var(--fs-body3); - font-weight: normal; - line-height: var(--lh-md); - margin-bottom: 0.3365rem; - margin-top: -0.125rem; // Optical alignment to compensate for title's containing block - padding-right: var(--su24); + height: var(--su4); } - &--content-type { - .svg-icon { - color: var(--fc-light); - margin-left: var(--sun2); - } + align-items: center; + display: flex; + gap: var(--su6); + } - color: var(--fc-medium); - margin-bottom: var(--su4); + & &--content-type { + &:focus-visible { + .focus-styles(); } - &--meta { - > *:not(.s-post-summary--meta-tags):not(.s-user-card) > * { - opacity: var(--_ps-o); - } - - .s-user-card { - > *:not(.magic-popup) { - opacity: var(--_ps-o); - } - - flex-wrap: wrap; - justify-content: flex-end; - margin-left: auto; - } - - align-items: center; - column-gap: var(--su6); - display: flex; - flex-wrap: wrap; - justify-content: space-between; - row-gap: var(--su8); + &:hover { + --_ps-content-type-bc: var(--black-150); + --_ps-content-type-bg: var(--black-100); + --_ps-content-type-fc: var(--black-600); } - &--meta-tags { - > ul > li > a, - > a, - .post-tag, - .s-tag { - opacity: var(--_ps-o); - } + border: var(--su-static1) solid var(--_ps-content-type-bc); + background-color: var(--_ps-content-type-bg); + color: var(--_ps-content-type-fc); - display: flex; - flex-wrap: wrap; - gap: var(--su4); - } - - &--stats { - > *:not(.s-badge__danger) { - opacity: var(--_ps-o); - } - - align-items: var(--_ps-stats-ai); - color: var(--_ps-stats-fc); - flex-direction: var(--_ps-stats-fd); - width: var(--_ps-stats-w); + display: flex; + align-items: center; + gap: var(--su4); + padding: 0 var(--su4); + font-size: var(--fs-caption); + } - display: flex; - flex-shrink: 0; - flex-wrap: wrap; - font-size: var(--fs-body1); - gap: var(--su6); - margin-bottom: var(--su4); - margin-right: var(--su16); - } + & &--excerpt { + margin-bottom: 0; + } - &--stats-item { - &:not(.s-badge) { - &.is-deleted { - color: var(--white); - } + & &--stats { + &.s-post-summary--sm-hide { + .s-post-summary--stats-answers { + background-color: var(--_ps-stats-answers-bg); + color: var(--_ps-stats-answers-fc); + font-weight: var(--_ps-stats-answers-fw); align-items: center; - border: var(--su1) solid transparent; - display: inline-flex; - gap: 0.3em; + display: flex; + gap: var(--su4); justify-content: center; - white-space: nowrap; + padding: var(--su4); } - &.s-badge { - font-size: var(--fs-body1); - line-height: var(--lh-md); - padding: var(--su2) var(--su4); - } - - &.has-answers, - &.has-bounty, // TODO DEPRECATED: Remove .has-bounty styling - &.is-archived, - &.is-closed, - &.is-deleted, - &.is-draft, - &.is-pinned, - &.is-published, - &.is-review { - border-radius: var(--br-md); - padding: var(--su2) var(--su4); - } - - &.has-answers { - &.has-accepted-answer { - background-color: var(--_ps-has-accepted-answers-bg); - border-color: var(--_ps-has-accepted-answers-bc); - color: var(--_ps-has-accepted-answers-fc); - } - - background-color: var(--_ps-has-answers-bg); - border: var(--su1) solid var(--_ps-has-answers-bc); - color: var(--_ps-has-answers-fc); - } - - &.has-bounty { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__bounty` - background-color: var(--blue-500); + .s-post-summary--stats-bounty { + align-items: center; + background-color: var(--blue-400); color: var(--white); + display: flex; + gap: var(--su2); + font-weight: 600; + justify-content: center; + padding: var(--su4); } - // Hotness - &.is-warm { - color: var(--_ps-state-fc, var(--yellow-500)); + .s-post-summary--stats-votes { + align-items: center; + aspect-ratio: 1/1; + border: var(--su1) solid var(--black-200); + display: flex; + justify-content: center; + font-size: var(--fs-body2); + font-weight: 600; + padding: var(--su4); + width: calc(var(--su48) + var(--su8)); // 3.5rem } - &.is-hot { - color: var(--_ps-state-fc, var(--orange-500)); - } + flex-direction: column; + } - &.is-supernova { - color: var(--_ps-state-fc, var(--red-500)); + &.s-post-summary--sm-show { + .s-post-summary--stats-answers--icon { + color: var(--_ps-stats-answers-icon-fc); } - // Status - &.is-archived { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__muted s-badge__icon` - background-color: var(--black-225); - border-color: var(--black-500); - color: var(--black-600); - } + align-items: center; + justify-content: center; + padding: var(--su4); + } - &.is-closed { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__danger s-badge__icon` - background-color: var(--red-300); - border-color: var(--red-500); - color: var(--red-600); - } + .s-post-summary--stats-bounty { + align-items: center; + justify-content: center; + background-color: var(--blue-400); + color: var(--white); + display: flex; + gap: var(--su1); + padding: 0 calc(var(--su4) - var(--su1)); + } - &.is-draft { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__info s-badge__icon` - background-color: var(--blue-300); - border-color: var(--blue-500); - color: var(--blue-600); - } + display: flex; + gap: var(--su6); + font-size: var(--fs-caption); + } - &.is-pinned { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__muted s-badge__filled s-badge__icon` - background-color: var(--black-500); - color: var(--white); - } + & &--tags { + display: flex; + flex-wrap: wrap; + gap: var(--su4); + margin-top: var(--su2); + } - &.is-published { - background-color: var(--black-150); - color: var(--black-600); - } + & &--title { + display: flex; + gap: var(--su6); + } - &.is-review { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__warning s-badge__icon` - background-color: var(--yellow-300); - border-color: var(--yellow-500); - color: var(--yellow-600); - } + & &--title-link { + &:hover { + --_ps-title-link-fc: var(--theme-secondary-500); - &__emphasized { - color: var(--_ps-stats-item-emphasized-fc); + &:visited { + color: var(--theme-secondary-600); } } - &--stats-item-number { - font-weight: 500; + // TODO: Since custom property is not being applied for some reason, we're changing the color directly. Remove this once the custom property is fixed. + // I suspect this is because of restrictions on the `:visited` pseudo-class. + // See https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:visited#privacy_restrictions + &:visited { + color: var(--theme-secondary-400); } + color: var(--_ps-title-link-fc); + display: flex; + font-size: var(--fs-body3); + font-weight: 600; + gap: var(--su16); + line-height: var(--lh-sm); + margin-top: var(--su2); } - background-color: var(--_ps-bg); - border-bottom: var(--_ps-bb); + // Container query setup + container-type: inline-size; + container-name: post-summary; + color: var(--black-500); display: flex; - padding: var(--su16); + gap: var(--su16); position: relative; + width: 100%; } diff --git a/packages/stacks-docs/_data/post-summary.json b/packages/stacks-docs/_data/post-summary.json index 80f0c84491..b12b678d40 100644 --- a/packages/stacks-docs/_data/post-summary.json +++ b/packages/stacks-docs/_data/post-summary.json @@ -6,109 +6,233 @@ "description": "Base parent container for a post summary" }, { - "class": ".s-post-summary--stats", + "class": ".s-post-summary__answered", "applies": ".s-post-summary", - "description": "Container for the post summary stats" + "description": "Adds the styling necessary for a question with accepted answers" }, { - "class": ".s-post-summary--stats-item", - "applies": ".s-post-summary--stats", - "description": "Individual stat item within the stats container" + "class": ".s-post-summary__deleted", + "applies": ".s-post-summary", + "description": "Adds the styling necessary for a deleted post" }, { - "class": ".s-post-summary--stats-item-number", - "applies": ".s-post-summary--stats-item", - "description": "Container for applying styling to the number of a stat item" + "class": ".s-post-summary--sm-hide", + "applies": ".s-post-summary", + "description": "Hides the stats container on small screens" }, { - "class": ".s-post-summary--stats-item-unit", - "applies": ".s-post-summary--stats-item", - "description": "Container for applying styling to the unit of a stat item" + "class": ".s-post-summary--sm-show", + "applies": ".s-post-summary", + "description": "Shows the stats container on small screens" }, { - "class": ".has-answers", - "applies": ".s-post-summary--stats-item", - "description": "Adds the styling necessary for a question with answers" + "class": ".s-post-summary--answers", + "applies": ".s-post-summary", + "description": "Container for the post summary answers" }, { - "class": ".has-accepted-answer", - "applies": ".s-post-summary--stats-item", - "description": "Adds the styling necessary for a question with accepted answers" + "class": ".s-post-summary--answer", + "applies": ".s-post-summary--answers", + "description": "Container for the post summary answer" }, { - "class": ".has-bounty", - "applies": ".s-post-summary--stats-item", - "description": "Styles the stats item appropriately to display a bounty" + "class": ".s-post-summary--answer__accepted", + "applies": ".s-post-summary--answer", + "description": "Adds the styling necessary for an accepted answer" }, { - "class": ".is-warm", - "applies": ".s-post-summary--stats-item", - "description": "Styles post stats with a warm color" + "class": ".s-post-summary--content", + "applies": ".s-post-summary", + "description": "Container for the post summary content" }, { - "class": ".is-hot", - "applies": ".s-post-summary--stats-item", - "description": "Warmer still, for more popular posts" + "class": ".s-post-summary--content-meta", + "applies": ".s-post-summary--content", + "description": "A container for post meta data, things like tags and user cards." }, { - "class": ".is-supernova", - "applies": ".s-post-summary--stats-item", - "description": "Paired with a fire icon, these are the most popular stats" + "class": ".s-post-summary--content-type", + "applies": ".s-post-summary--content", + "description": "Container for the post summary content type" }, { - "class": ".s-post-summary--content", + "class": ".s-post-summary--excerpt", + "applies": ".s-post-summary--content", + "description": "Container for the post summary excerpt" + }, + { + "class": ".s-post-summary--stats", "applies": ".s-post-summary", - "description": "Container for the post summary content" + "description": "Container for the post summary stats" }, { - "class": ".s-post-summary--content-type", - "applies": ".s-post-summary--content", - "description": "A container for various content types, eg. How-to guide on Articles" + "class": ".s-post-summary--stats-answers", + "applies": ".s-post-summary--stats", + "description": "Container for the post summary answers" }, { - "class": ".s-post-summary--content-title", - "applies": ".s-post-summary--content", - "description": "Post title styling" + "class": ".s-post-summary--stats-bounty", + "applies": ".s-post-summary--stats", + "description": "Container for the post summary bounty" }, { - "class": ".s-post-summary--content-excerpt", - "applies": ".s-post-summary--content", - "description": "An optional content excerpt truncated at 2 lines." + "class": ".s-post-summary--stats-item", + "applies": ".s-post-summary--stats", + "description": "A genericcontainer for views, comments, read time, and other meta data which prepends a separator icon." }, { - "class": ".s-post-summary--content-excerpt__sm", - "applies": ".s-post-summary--content-excerpt", - "description": "An optional content excerpt truncated at 1 line." + "class": ".s-post-summary--stats-votes", + "applies": ".s-post-summary--stats", + "description": "Container for the post summary votes" }, { - "class": ".s-post-summary--content-excerpt__md", - "applies": ".s-post-summary--content-excerpt", - "description": "An optional content excerpt truncated at 3 lines." + "class": ".s-post-summary--tags", + "applies": ".s-post-summary", + "description": "Container for the post summary tags" }, { - "class": ".s-post-summary--answer", - "applies": ".s-post-summary--content", - "description": "Adds blockquote styling and spacing for answer previews" + "class": ".s-post-summary--title", + "applies": ".s-post-summary", + "description": "Container for the post summary title" }, { - "class": ".s-post-summary--answer-excerpt", - "applies": ".s-post-summary--content", - "description": "Provides padding, and truncation to 4 lines." + "class": ".s-post-summary--title-link", + "applies": ".s-post-summary--title", + "description": "Link styling for the post summary title" }, { - "class": ".s-post-summary--content-menu-button", - "applies": ".s-post-summary--content", - "description": "An optional button for displaying a post-specific menu." + "class": ".s-post-summary--title-icon", + "applies": ".s-post-summary--title", + "description": "Icon styling for the post summary title" + } + ], + "base": [ + {}, + { + "answered": true }, { - "class": ".s-post-summary--meta", - "applies": ".s-post-summary--content", - "description": "A container for post meta data, things like tags and user cards." + "bounty": 50 + } + ], + "small": [ + { + "excerptLines": 2 }, { - "class": ".s-post-summary--meta-tags", - "applies": ".s-post-summary--meta", - "description": "A container for tags and other taxonomy." + "answered": true, + "excerptLines": 2 + }, + { + "bounty": 50, + "excerptLines": 2 + } + ], + "ignored": { + "tags": [ + { + "text": "retrieval-augmented-generation", + "ignored": true + }, + "langchain", + "llm", + "vector-database", + "ai" + ], + "answered": true, + "bounty": 50 + }, + "watched": { + "tags": [ + { + "text": "retrieval-augmented-generation", + "watched": true + }, + "langchain", + "llm", + "vector-database", + "ai" + ], + "answered": true + }, + "deleted": { + "answered": true, + "modifier": "s-post-summary__deleted" + }, + "states": [ + { + "badge": { + "class": "s-badge__info", + "text": "Draft", + "icon": "Compose" + } + }, + { + "badge": { + "class": "s-badge__warning", + "text": "Review", + "icon": "Eye" + } + }, + { + "badge": { + "class": "s-badge__danger", + "text": "Closed", + "icon": "Flag" + } + }, + { + "badge": { + "text": "Archived", + "icon": "Document" + } + }, + { + "badge": { + "class": "s-badge__tonal", + "text": "Pinned", + "icon": "Key" + } + } + ], + "contentTypes": [ + { + "type": "Announcement" + }, + { + "type": "How to guide" + }, + { + "type": "Knowledge article" + }, + { + "type": "Policy" + } + ], + "excerptSizes": [ + { + "excerptLines": 0 + }, + { + "excerptLines": 1 + }, + { + "excerptLines": 2 + }, + { + "excerptLines": 3 + } + ], + "answered": [ + { + "answered": true, + "answerCount": 2, + "answers": [ + { + "accepted": true + }, + {} + ] } ] -} \ No newline at end of file +} diff --git a/packages/stacks-docs/_data/site-navigation.json b/packages/stacks-docs/_data/site-navigation.json index 6746192f9b..2ffca1833d 100644 --- a/packages/stacks-docs/_data/site-navigation.json +++ b/packages/stacks-docs/_data/site-navigation.json @@ -321,7 +321,8 @@ }, { "title": "Post summary", - "url": "/product/components/post-summary/" + "url": "/product/components/post-summary/", + "new": true }, { "title": "Progress bars", diff --git a/packages/stacks-docs/_includes/layouts/page.html b/packages/stacks-docs/_includes/layouts/page.html index 1d33e36487..5d6dde584e 100644 --- a/packages/stacks-docs/_includes/layouts/page.html +++ b/packages/stacks-docs/_includes/layouts/page.html @@ -208,7 +208,7 @@

{{ title }}

{% if hide-menu != true %}