Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _board/raspberry_pi_pico_w.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ board_url: "https://www.adafruit.com/product/5526"
board_image: "raspberry_pi_pico_w.jpg"
date_added: 2022-10-2
family: raspberrypi
tags:
- picow
- 🥧🐮
features:
- Breadboard-Friendly
---
Expand Down
13 changes: 11 additions & 2 deletions assets/javascript/downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,17 @@ function shouldDisplayDownload(download, displayedManufacturers, displayedMcufam

if (downloadsSearch.searchTerm && downloadsSearch.searchTerm.length > 0 && shouldDisplay) {
var regex = new RegExp(downloadsSearch.searchTerm, "gi");
var haystack = download.dataset.name + " " + download.dataset.id + " " + download.dataset.manufacturer + " " + download.dataset.mcufamily + " " + download.dataset.features;

var dataFields = [
download.dataset.name,
download.dataset.id,
download.dataset.manufacturer,
download.dataset.mcufamily,
download.dataset.features,
download.dataset.tags,
download.dataset.modules,
];

var haystack = dataFields.join(" ");
shouldDisplay = haystack.match(regex);
}

Expand Down
14 changes: 14 additions & 0 deletions downloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ <h1>Downloads</h1>

{% assign info = info[0] %}

{% assign stable = board.versions | where: "stable", true | sort: "version" %}
{% assign unstable = board.versions | where: "stable", false | sort: "version" %}
{% if stable[0].modules and unstable[0].modules %}
{% assign modules = stable[0].modules | concat: unstable[0].modules | uniq %}
{% elsif stable[0].modules %}
{% assign modules = stable[0].modules %}
{% elsif unstable[0].modules %}
{% assign modules = unstable[0].modules %}
{% else %}
{% assign modules = '' | split: '' %}
{% endif %}
{% if info.downloads_display == false %}
{% continue %}
{% endif %}
Expand All @@ -120,6 +131,8 @@ <h1>Downloads</h1>
data-manufacturer="{{ info.manufacturer }}"
data-mcufamily="{{ info.family }}"
data-features="{{ info.features | join: ','}}"
data-tags="{{ info.tags | join: ','}}"
data-modules="{{ modules | join: ', ' }}"
data-date="{{ info.date_added }}">
<a href="{{ download_url | relative_url }}">
<div>
Expand Down Expand Up @@ -151,6 +164,7 @@ <h3>{{ info_name | default: board.id }}</h3>
data-manufacturer="{{ board.manufacturer }}"
data-mcufamily="{{ board.family }}"
data-features="{{ board.features | join: ','}}"
data-tags="{{ info.tags | join: ','}}"
data-date="{{ board.date_added }}">
<a href="{{ board.url | relative_url }}">
<div>
Expand Down