1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Files
docs/includes/code-example-card.html
Jason Etcovitch 9e38a854b9 Filterable code examples on Actions landing page (#16276)
* Add custom hover shadows

* Support avatars

* Add guide-card include

* Use it in product-landing

* Add gradient styles

* Add guides frontmatter

* Use guideArticles instead of full objects

* Add support for authors

* Add support for category header

* Just pass the whole page

* Use it

* guide.url => guide.href

* Use `*.githubusercontent.com`

* Fix mobile card width

* Remove showDescription check

* Use featureLinks.guideCards

* Forgot an if

* Add contextualizers/actions-code-examples

* Use code-example-card include

* Tweak sizing/shadows

* Add a basic filterer

* Some visual tweaks

* labels => tags

* Cleanup some code

* Improve spacing on mobile

* Add "No results!" blurb

* Fix a boog

* Tweak spacing

* Remove support banner

* Improve "No results" state

* Just use login instead of name/avatarUrl

* Change card spacing

* Use circular avatars

* Add "Show more" button

* Add margin beneath "Guides"

* Use smaller font

* Assume github.com for code examples

* Show two columns at small screen

* Make "Show more" a btn

* Use the "repo" octicon

* Link to contributing guide

* Use a YAML file instead of a middleware

* Link straight to the file

* Fix some wonky markuip

* Fix a broken link

* Fix the borked test

* Allow variables that aren't strings

* Fix remaining tests
2020-11-12 11:35:43 -05:00

21 lines
984 B
HTML

<div class="col-12 col-xl-4 col-lg-6 mb-4 js-code-example-card {% if forloop.index0 > 5 %}d-none{% endif %}" data-tags="{{ example.tags | join: ', ' }}" data-title="{{ example.title }}" data-description="{{ example.description }}">
<a
class="Box d-flex flex-column flex-justify-between height-full box-shadow-medium hover-shadow-large no-underline text-gray-dark"
href="https://github.com/{{ example.href }}"
>
<div class="p-4">
<h4>{{ example.title }}</h4>
<p class="mt-2 mb-4 text-gray-light">{{ example.description }}</p>
<div class="d-flex flex-wrap">
{% for tag in example.tags %}
<span class="IssueLabel text-white bg-blue mr-2 mb-1">{{ tag }}</span>
{% endfor %}
</div>
</div>
<footer class="border-top p-4 text-gray d-flex flex-items-center">
{% octicon "repo" class="flex-shrink-0" %}
<span class="ml-2 text-mono text-small text-blue">{{ example.href }}</span>
</footer>
</a>
</div>