diff --git a/components/breadcrumbs/breadcrumbs.component.yml b/components/breadcrumbs/breadcrumbs.component.yml index 26ff95534586232ff84df9c28e12a7d4346ee5c2..c2eb07b0311889724617f06cb36fec6aabcbd1ac 100644 --- a/components/breadcrumbs/breadcrumbs.component.yml +++ b/components/breadcrumbs/breadcrumbs.component.yml @@ -12,9 +12,9 @@ props: items: type: object properties: - title: + text: type: string - title: Title + title: Text examples: - "Home" url: diff --git a/components/breadcrumbs/breadcrumbs.stories.yml b/components/breadcrumbs/breadcrumbs.stories.yml index 0e7d2533b01491d269d465878caba4a6499c1927..43b823c6be67e57795b5fedb5e4a1ad0340f5305 100644 --- a/components/breadcrumbs/breadcrumbs.stories.yml +++ b/components/breadcrumbs/breadcrumbs.stories.yml @@ -1,14 +1,14 @@ title: Breadcrumb args: items: - - title: "Home" - url: "/" + - text: 'Home' + url: '/' current: false - - title: "Events" - url: "/events" + - text: 'Events' + url: '/events' current: false - - title: "Event example title" - url: "/event/test" + - text: 'Event example title' + url: '/event/test' current: true stories: - name: Default diff --git a/components/breadcrumbs/breadcrumbs.twig b/components/breadcrumbs/breadcrumbs.twig index bfb2ad94609a4756fa6d9eb731de3bb10ebaacdf..b7a69dcff7256896049f7b4ca9169face4c5d907 100644 --- a/components/breadcrumbs/breadcrumbs.twig +++ b/components/breadcrumbs/breadcrumbs.twig @@ -1,17 +1,17 @@ -<nav aria-label="Breadcrumb" {{ attributes.addClass('c-breadcrumb') }}> +<nav role='navigation' aria-label='Breadcrumb' {{ attributes.addClass('c-breadcrumb') }}> {% block breadcrumbs_block %} - <ol class="c-breadcrumb__list"> - {% for item in items %} - {% if item.is_current_page == true %} - <li class="c-breadcrumb__item"> - <a href="{{item.url}}" aria-current="page">{{item.title}}</a> - </li> - {% else %} - <li class="c-breadcrumb__item"> - <a href="{{item.url}}">{{item.title}}</a> - </li> - {% endif %} - {% endfor %} - </ol> + <ol class='c-breadcrumb__list'> + {% for item in items %} + {% if item.is_current_page == true %} + <li class='c-breadcrumb__item'> + <a href="{{item.url}}" aria-current='page'>{{item.text}}</a> + </li> + {% else %} + <li class='c-breadcrumb__item'> + <a href="{{item.url}}">{{item.text}}</a> + </li> + {% endif %} + {% endfor %} + </ol> {% endblock %} </nav> diff --git a/components/button/button.scss b/components/button/src/button.scss similarity index 100% rename from components/button/button.scss rename to components/button/src/button.scss diff --git a/components/teaser/teaser.component.yml b/components/teaser/teaser.component.yml index 48140958b4923e24a486149998fc645f6b5dcf84..09fab2a8b6f92ff598e2ee0049d1a28d13f2516d 100644 --- a/components/teaser/teaser.component.yml +++ b/components/teaser/teaser.component.yml @@ -1,6 +1,6 @@ $schema: https://git.drupalcode.org/project/sdc/-/raw/1.x/src/metadata.schema.json name: Teaser -status: "experimental" +status: 'experimental' description: A Teaser component props: type: object @@ -18,37 +18,35 @@ props: - list-stack - super alt: - type: "string" - title: "Image Alt Text" - description: "The alt text for the image." + type: 'string' + title: 'Image Alt Text' + description: 'The alt text for the image.' examples: - - "Ea irure adipisicing" + - 'Ea irure adipisicing' image: - type: "string" - title: "image URL" - description: "The url for the image" - examples: - - "" + type: 'string' + title: 'image URL' + description: 'The url for the image' title: - type: "string" - title: "Title" + type: 'string' + title: 'Title' examples: - - "A new exhibit opens at the Student Visitor Center" + - 'A new exhibit opens at the Student Visitor Center' url: - type: "string" - title: "Teaser URL" + type: 'string' + title: 'Teaser URL' examples: - - "https://github.com" + - 'https://github.com' category: - type: "string" - title: "Category" + type: 'string' + title: 'Category' examples: - - "Article" + - 'Article' category_url: - type: "string" - title: "Category URL" + type: 'string' + title: 'Category URL' examples: - - "https://github.com" + - 'https://github.com' category_color: type: string title: Category Color @@ -58,20 +56,20 @@ props: - kelly - gold teaser_date: - type: "string" - title: "Date" + type: 'string' + title: 'Date' examples: - - "August 18, 2024" + - 'August 18, 2024' teaser_time: - type: "string" - title: "Time" + type: 'string' + title: 'Time' examples: - - "4:00pm - 6:00pm" + - '4:00pm - 6:00pm' body: title: Body type: string examples: - - "<p>The human body is a marvel and does so amazing things for us everyday.</p>" + - '<p>The human body is a marvel and does so amazing things for us everyday.</p>' icon: type: string title: Category icon @@ -80,18 +78,18 @@ props: tags: type: array title: Tags - tags: + items: type: object properties: - title: - type: string - title: Title - examples: - - "Tag one" - - "Tag two" url: type: string title: Tag URL examples: - https://github.com - https://github.com + title: + type: string + title: Title + examples: + - 'Tag one' + - 'Tag two' diff --git a/components/teaser/teaser.twig b/components/teaser/teaser.twig index a6d92b80b5523822dc60ceb3b4318492d7e4c8ae..d8b69bef050bc97a74604043728d378b2b572c2b 100644 --- a/components/teaser/teaser.twig +++ b/components/teaser/teaser.twig @@ -108,7 +108,7 @@ {% block tags_block %} {% for key, tag in tags %} <li class="c-teaser__tag"> - <a href="{{tag.title}}">{{tag.title}}</a> + <a href="{{tag.url}}">{{tag.title}}</a> </li> {% endfor %} {% endblock %} diff --git a/templates/navigation/breadcrumb.html.twig b/templates/navigation/breadcrumb.html.twig index 034898e36a86a4b81927024b282f3d0caa914e2c..b4d05ec5aa27442b4500e4c01e59366ee7ff901a 100755 --- a/templates/navigation/breadcrumb.html.twig +++ b/templates/navigation/breadcrumb.html.twig @@ -1,6 +1,5 @@ {{ include('prototype:breadcrumbs', { - breadcrumbs: breadcrumbs, - separator: '|', + items: breadcrumb, }) }} diff --git a/templates/page/page.html.twig b/templates/page/page.html.twig index 7290acaff635b979a3344db2ed60983b28c53068..226ce63b59d12809304f349dc8ef143c9bd0d82a 100755 --- a/templates/page/page.html.twig +++ b/templates/page/page.html.twig @@ -17,9 +17,11 @@ {# /header #} {% if breadcrumb %} - {{ include('prototype:breadcrumbs', { - breadcrumbs: page.breadcrumb, - }) }} + {{ + include('prototype:breadcrumbs', { + items: breadcrumbs, + }) + }} {% endif %} {# /breadcrumb #}