зеркало из https://github.com/mozilla/bedrock.git
review fixes
This commit is contained in:
Родитель
8f4899d9f7
Коммит
939f35e334
|
@ -52,45 +52,42 @@
|
|||
Springboard Item
|
||||
HTML Import: {% from "macros-m24.html" import springboard_item with context %}
|
||||
CSS Import: @import '[path to]/m24/foo';
|
||||
Description: The springboard component links off to media (i.e. articles, podcasts, and videos) on other sites. Each item is a row.
|
||||
Macro Parameters:
|
||||
link_url (Required):
|
||||
class: String providing modifier class(es) to the tile component.
|
||||
|
||||
author: Author of the media.
|
||||
class: String providing modifier class(es) to the item.
|
||||
image: Thumbnail image. Can pass an <img> element, resp_img or picture Python helpers.
|
||||
link_attributes: A generic parameter to add any extra attributes to the CTA link, such as target, rel, or data attributes for GA tracking. Note that the quotes will pass through unescaped.
|
||||
link_url (Required): String or url helper function provides href value for item.
|
||||
preview: Blurb / summary of the media.
|
||||
topic: One or two word topic of the item. Perhaps one of the things the item is "tagged" with if it's a blog post.
|
||||
type: (Should be translated) Type of media the item links to. Probably one of podcast, article, video.
|
||||
type_icon: (Do not translate) Last word of the icon class. Must be configured in the CSS. Currently supports: podcast, article, video.
|
||||
#}
|
||||
{% macro springboard_item(
|
||||
author=None,
|
||||
category=None,
|
||||
class=None,
|
||||
date=None,
|
||||
image=None,
|
||||
link_attributes=None,
|
||||
link_url=None,
|
||||
preview=None,
|
||||
topic=None,
|
||||
type=None,
|
||||
icon=''
|
||||
type_icon=''
|
||||
) -%}
|
||||
|
||||
<li class="m24-c-springboard-item {{ class }}">
|
||||
{% if link_url %}
|
||||
<a href="{{ link_url }}" class="m24-c-springboard-link" {{ link_attributes }}>
|
||||
{% else %}
|
||||
<div class="m24-c-springboard-link">
|
||||
{% endif %}
|
||||
<a href="{{ link_url }}" class="m24-c-springboard-link" {{ link_attributes }}>
|
||||
<div class="m24-c-springboard-thumb">
|
||||
{{ image }}
|
||||
</div>
|
||||
<div class="m24-c-springboard-type">
|
||||
{% if icon %}<span class="m24-c-springboard-icon m24-c-springboard-icon-{{ icon|lower }}"></span>{% endif %}
|
||||
{% if type_icon %}<span class="m24-c-springboard-icon m24-c-springboard-icon-{{ type_icon|lower }}"></span>{% endif %}
|
||||
{{ type }}
|
||||
</div>
|
||||
<!-- <div class="m24-c-springboard-date">{{ date }}</div> -->
|
||||
<div class="m24-c-springboard-author">{{ author }}</div>
|
||||
<div class="m24-c-springboard-cat">{{ category }}</div>
|
||||
<div class="m24-c-springboard-topic">{{ topic }}</div>
|
||||
<div class="m24-c-springboard-preview">{{ preview }}</div>
|
||||
{% if link_url %}
|
||||
</a>
|
||||
{% else %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{%- endmacro %}
|
||||
|
|
|
@ -8,20 +8,22 @@
|
|||
|
||||
<section class="m24-c-content m24-t-transition-01 m24-t-transition-next" id="media">
|
||||
<h3 class="m24-c-intro-title m24-t-lg">You, AI and the internet — what’s really going on?</h3>
|
||||
|
||||
<ul class="m24-c-springboard" id="ai-media">
|
||||
{{ springboard_item(
|
||||
class='m24-c-springboard-headings',
|
||||
type='Type',
|
||||
category='Topic',
|
||||
author='Author(s)',
|
||||
preview='Intro'
|
||||
) }}
|
||||
<li class="m24-c-springboard-item m24-c-springboard-headings">
|
||||
<div class="m24-c-springboard-link">
|
||||
<div class="m24-c-springboard-thumb">
|
||||
</div>
|
||||
<div class="m24-c-springboard-type">Type</div>
|
||||
<div class="m24-c-springboard-author">Author</div>
|
||||
<div class="m24-c-springboard-topic">Topic</div>
|
||||
<div class="m24-c-springboard-preview">Intro</div>
|
||||
</a>
|
||||
</li>
|
||||
{{ springboard_item(
|
||||
link_url='https://blog.mozilla.org/en/mozilla/mozilla-anonym-raising-the-bar-for-privacy-preserving-digital-advertising/',
|
||||
type='Article',
|
||||
icon='article',
|
||||
category='Artificial Intelligence',
|
||||
type_icon='article',
|
||||
topic='Artificial Intelligence',
|
||||
author='Laura Chambers',
|
||||
preview='Introducing Anonym: Raising the bar for privacy-preserving digital advertising.',
|
||||
image=resp_img(
|
||||
|
@ -35,8 +37,8 @@
|
|||
{{ springboard_item(
|
||||
link_url='https://blog.mozilla.org/en/mozilla/keeping-genai-technologies-secure-is-a-shared-responsibility/',
|
||||
type='Article',
|
||||
icon='article',
|
||||
category='Privacy & Security',
|
||||
type_icon='article',
|
||||
topic='Privacy & Security',
|
||||
author='Saoud Khalifah',
|
||||
preview='Keeping GenAI technologies secure is a shared responsibility.',
|
||||
image=resp_img(
|
||||
|
@ -50,8 +52,8 @@
|
|||
{{ springboard_item(
|
||||
link_url="https://irlpodcast.org/season7/episode5/",
|
||||
type='Podcast',
|
||||
icon='podcast',
|
||||
category='Artificial Intelligence',
|
||||
type_icon='podcast',
|
||||
topic='Artificial Intelligence',
|
||||
author='IRL Podcast',
|
||||
preview='From Hollywood to Hip Hop, artists are negotiating consent for use of AI in the creative industries. Bridget Todd speaks to artists who are pushing the boundaries.',
|
||||
image=resp_img(
|
||||
|
@ -65,8 +67,8 @@
|
|||
{{ springboard_item(
|
||||
link_url="https://blog.mozilla.org/en/products/firefox/new-mozilla-docuseries-firefox-presents-launch/",
|
||||
type='Video',
|
||||
icon='video',
|
||||
category='News',
|
||||
type_icon='video',
|
||||
topic='News',
|
||||
author='Rebecca Smith',
|
||||
preview='Mozilla celebrates groundbreaking creators in new docuseries ‘Firefox Presents’.',
|
||||
image=resp_img(
|
||||
|
@ -80,8 +82,8 @@
|
|||
{{ springboard_item(
|
||||
link_url="https://irlpodcast.org/season7/episode4/",
|
||||
type='Podcast',
|
||||
icon='podcast',
|
||||
category='Artificial Intelligence',
|
||||
type_icon='podcast',
|
||||
topic='Artificial Intelligence',
|
||||
author='IRL Podcast',
|
||||
preview='Big tech’s power over language, means power over people. Bridget Todd talks to language community leaders paving the way for voice AI in their own languages and dialects.',
|
||||
image=resp_img(
|
||||
|
@ -95,8 +97,8 @@
|
|||
{{ springboard_item(
|
||||
link_url="https://irlpodcast.org/season7/episode3/",
|
||||
type='Podcast',
|
||||
icon='podcast',
|
||||
category='Artificial Intelligence',
|
||||
type_icon='podcast',
|
||||
topic='Artificial Intelligence',
|
||||
author='IRL Podcast',
|
||||
preview='Why does it so often feel like we’re part of a mass AI experiment? What is the responsible way to test new technologies? Bridget Todd explores what it means to live with unproven AI systems that impact millions of people as they roll out across public life.',
|
||||
image=resp_img(
|
||||
|
@ -110,8 +112,8 @@
|
|||
{{ springboard_item(
|
||||
link_url="https://blog.mozilla.org/en/internet-culture/kids-mental-health-screen-time-technology/",
|
||||
type='Article',
|
||||
icon='article',
|
||||
category='Privacy & Security',
|
||||
type_icon='article',
|
||||
topic='Privacy & Security',
|
||||
author='Kristina Bravo',
|
||||
preview='Kids are growing up in a very online world. What’s a concerned parent to do?',
|
||||
image=resp_img(
|
||||
|
|
|
@ -75,7 +75,7 @@ $springboard-thumb-width: 32px;
|
|||
width: 24px;
|
||||
}
|
||||
|
||||
.m24-c-springboard-cat {
|
||||
.m24-c-springboard-topic {
|
||||
font-weight: bold;
|
||||
grid-area: cat;
|
||||
text-align: end;
|
||||
|
@ -158,7 +158,7 @@ $springboard-thumb-width: 32px;
|
|||
}
|
||||
|
||||
.m24-c-springboard-author,
|
||||
.m24-c-springboard-cat {
|
||||
.m24-c-springboard-topic {
|
||||
text-align: start;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче