Skip to content

Commit e03a81a

Browse files
authored
Merge branch 'master' into dependabot/npm_and_yarn/sass-1.83.0
2 parents d196c39 + b1bbef9 commit e03a81a

File tree

10 files changed

+64
-33
lines changed

10 files changed

+64
-33
lines changed

.eleventy.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const groupByYear = require("./src/filters/group_by_year.js");
1111
const thumbnails = require("./src/thumbnails.js");
1212
const tab_gallery = require("./src/shortcodes/make_tab_gallery.js");
1313
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
14-
14+
const install_media_objects = require("./src/media_object.js");
1515
const {
1616
fortawesomeBrandsPlugin,
1717
} = require('@vidhill/fortawesome-brands-11ty-shortcode');
@@ -22,10 +22,13 @@ module.exports = function(eleventyConfig) {
2222
const markdownLib = markdownIt({html: true, typographer: true});
2323
markdownLib.use(markdownItAnchor);
2424
markdownLib.use(markdownItAttrs);
25+
2526
eleventyConfig.setLibrary("md", markdownLib);
2627
eleventyConfig.addPlugin(fortawesomeBrandsPlugin);
2728
eleventyConfig.addPlugin(syntaxHighlight);
2829

30+
install_media_objects(eleventyConfig);
31+
2932
//copy through assets
3033
eleventyConfig.addPassthroughCopy("admin");
3134
eleventyConfig.addPassthroughCopy("assets");

content/2010/01/2010-01-19-the-lego-rcx-inside-and-out.md

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,19 @@ The Lego RCX is no longer available, but there are many books on the subject wor
4646

4747
(paid links)
4848

49-
<div class="media">
50-
<div class="media-left">
51-
<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=GB&source=ss&ref=as_ss_li_til&ad_type=product_link&tracking_id=orionrobots-21&marketplace=amazon&region=GB&placement=159749089X&asins=159749089X&linkId=2f96480b45a8b0c87b5bdaf794f1177f&show_border=true&link_opens_in_new_window=true"></iframe>
52-
</div><div class="media-body"><h3>Classic Lego Mindstorms Projects and Software Tools: Award-Winning Designs from Master Builders</h3>
49+
{% amazon_media "/amazon_product_images/51WPUFfE3BL.jpg", "Classic Lego Mindstorms Projects and Software Tools: Award-Winning Designs from Master Builders", "https://amzn.to/3VQk0rG" %}
50+
Stacked with ideas to get more from an RCX kit with concepts that translate to later revisions and other Lego kits.
51+
{% endamazon_media %}
5352

54-
Stacked with ideas to get more from an RCX kit with concepts that translate to later revisions and other Lego kits.
55-
</div></div>
53+
{% amazon_media "content/amazon_product_images/71O7fqvyWML._AC_SL1024_.jpg", "LEGO 51515 MINDSTORMS Robot Inventor Robotics Kit, Coding Set for Kids, 5in1 App Remote Control Programmable Interactive Toy", "https://amzn.to/41FUj0J" %}
54+
This is the current generation in awesome Lego robot and contraption building kits.
55+
This toy comes with 4 smart motors, an LED screen, speaker for sounds, a distance sensor,
56+
colour sensor, 6 axis gyroscope (orientation sensor).
57+
Your imagination is the only limit. Build a robot with Lego, and program it with blocks or MicroPython.
58+
As it's Lego, you can extend it with any other bricks from the Lego system.
59+
{% endamazon_media %}
5660

57-
(paid links)
58-
59-
<div class="media">
60-
<div class="media-left">
61-
<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=GB&source=ss&ref=as_ss_li_til&ad_type=product_link&tracking_id=orionrobots-21&marketplace=amazon&region=GB&placement=B00BMKLVJ6&asins=B00BMKLVJ6&linkId=150dcd300a737e91832bad75c7cd1d82&show_border=true&link_opens_in_new_window=true"></iframe>
62-
</div><div class="media-body"><h3>The Lego mindstorms Ev3</h3>
63-
64-
This is the current generation in awesome Lego robot and contraption building kits.
65-
</div></div>
66-
67-
[NQC](/wiki/nqc)
61+
[NQC](/wiki/nqc) - Not Quite C - is a C-like language for programming the RCX. It is a great way to get started with the RCX, and is a good way to learn C programming. NQC is a free download, and is available for Windows, Linux and Mac OS X.
6862

6963
## LeJOS - A Java based Lego RCX System
7064

@@ -201,20 +195,31 @@ These items will help you to open up and look inside an RCX. Make sure you don't
201195

202196
(paid links)
203197

204-
<table class="prodtable">
205-
<tr><td><a href="https://www.amazon.co.uk/gp/product/B002V4ULHU/ref=as_li_ss_il?ie=UTF8&linkCode=li2&tag=orionrobots-21&linkId=d95a3225cc85d7064814dd2291723546&language=en_GB" target="_blank"><img border="0" src="//ws-eu.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B002V4ULHU&Format=_SL160_&ID=AsinImage&MarketPlace=GB&ServiceVersion=20070822&WS=1&tag=orionrobots-21&language=en_GB" ></a><img src="https://ir-uk.amazon-adsystem.com/e/ir?t=orionrobots-21&language=en_GB&l=li2&o=2&a=B002V4ULHU" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></td><td><h3> A flat-head jewellers screwdriver. </h3>
206-
here are some very fiddly screws when opening devices like this, once you've levered off the case. These Jewellers sets are just the trick to do so.
207-
</td></tr>
208-
<tr><td><a href="https://www.amazon.co.uk/gp/product/B006RAW942/ref=as_li_ss_il?ie=UTF8&linkCode=li1&tag=orionrobots-21&linkId=e37cbd49f7ad89cf25a29ec5f0bc9633&language=en_GB" target="_blank"><img border="0" src="//ws-eu.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B006RAW942&Format=_SL110_&ID=AsinImage&MarketPlace=GB&ServiceVersion=20070822&WS=1&tag=orionrobots-21&language=en_GB" ></a><img src="https://ir-uk.amazon-adsystem.com/e/ir?t=orionrobots-21&language=en_GB&l=li1&o=2&a=B006RAW942" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></td><td><h3>Safety Goggles</h3>
198+
{% amazon_media "content/amazon_product_images/81c9LK5TiWL._AC_SX679_.jpg", "iFixit Essential Electronics Toolkit, Basic tool-set with 16 precision bits (4 mm), magnetic screwdriver & opening tools for electronic devices", "https://amzn.to/3P6OguA" %}
199+
This kit contains a lot of the tools you'll need to get the RCX open.
200+
201+
The spudger and flat blade are perfect for levering the case open to get to screws inside.
202+
203+
There are some very fiddly screws when opening devices like this, nice you've levered off the case. So a small set of screwdriver heads for these is also useful.
204+
205+
The tweezers are helpful for getting screws back in later too. We like the iFixit tool quality, and their mission in helping people fix and maintain their own devices.
206+
{% endamazon_media %}
207+
208+
{% amazon_media "content/amazon_product_images/71dkYvW25kL._SX522_.jpg", "DeWALT Safety Goggles DPG82-11D", "https://amzn.to/4gGtX3v" %}
209209
As you pull things like this apart, tiny plastic bits can sometimes ping off, and if you are unlucky, you may get one in the eye - ouch! A reasonable pair of goggles is highly recommended when getting into the innards of any gadgets- because for the extra time, money and inconvenience, none of them outweigh the value of your eyes.
210-
</td></tr>
211-
<tr><td><a href="https://www.amazon.co.uk/dp/B01CUOCRM2/ref=as_li_ss_il?ie=UTF8&linkCode=li2&tag=orionrobots-21&linkId=0d1b55d7f0df1c3ab42eed2f52acae62&language=en_GB" target="_blank"><img border="0" src="//ws-eu.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B01CUOCRM2&Format=_SL160_&ID=AsinImage&MarketPlace=GB&ServiceVersion=20070822&WS=1&tag=orionrobots-21&language=en_GB" ></a><img src="https://ir-uk.amazon-adsystem.com/e/ir?t=orionrobots-21&language=en_GB&l=li2&o=2&a=B01CUOCRM2" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></td>
212-
<td><h3>A positionable lamp</h3>
210+
211+
These DeWalt goggles come from a well known brand, and are designed to keep your view clear, because foggy goggles end up over you head and not over your eyes! They are scratch resistant and designed for comfort.
212+
{% endamazon_media %}
213+
214+
{% amazon_media "content/amazon_product_images/61+M7Z-G-HS._AC_SX679_.jpg", "A positionable desk lamp", "https://amzn.to/3P9iJs8" %}
213215
A good lamp makes working with these things far easier - otherwise you find yourself holding it closely to your eyes and angling it to the light just to find something. With a good light - you just wont need that. A good thing too - as poor lighting may lead to you taking of goggles as you pry at the fiddly parts. Get a good desk lamp!
214-
</td></tr>
215-
<tr><td><a href="https://www.amazon.co.uk/Anti-Static-Wristband-Discharge-Prevents-Electricity/dp/B004TQRFPE/ref=as_li_ss_il?ie=UTF8&qid=1519600714&sr=8-1&keywords=anti+static+wrist+straps&linkCode=li2&tag=orionrobots-21&linkId=b8adaec80bad68bab324309da5ab45f6&language=en_GB" target="_blank"><img border="0" src="//ws-eu.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B004TQRFPE&Format=_SL160_&ID=AsinImage&MarketPlace=GB&ServiceVersion=20070822&WS=1&tag=orionrobots-21&language=en_GB" ></a><img src="https://ir-uk.amazon-adsystem.com/e/ir?t=orionrobots-21&language=en_GB&l=li2&o=2&a=B004TQRFPE" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></td>
216-
<td><h3>An Antistatic Wrist Strap</h3>
217-
While some recommend this, as your contact may cause some devices to malfunction, I rarely, if ever use a wrist strap. You may be carrying a charge - especially if you are wearing woolly jumpers or other static build clothes. However, instead of a strap, tapping on an earthed device may be just as useful.</td></tr></table>
216+
{% endamazon_media %}
217+
218+
{% amazon_media "content/amazon_product_images/71vFRH2IrrL._AC_SX679_.jpg", "An Antistatic Wrist Strap", "https://amzn.to/3BBYUGF" %}
219+
220+
While some recommend this, as your contact may cause some devices to malfunction, I rarely, if ever use a wrist strap. You may be carrying a charge - especially if you are wearing woolly jumpers or other static build clothes. However, instead of a strap, tapping on an earthed device may be just as useful.
221+
222+
{% endamazon_media %}
218223

219224
### Steps
220225

@@ -325,13 +330,11 @@ You may get somewhere in using an older version of Quicktime to prevent errors i
325330

326331
Virtual Box is freely downloadable at [Virtualbox.org](http://www.virtualbox.org/). You will just need a version of Windows – I recommend 98 (which dates the RCX!) as there are no patches needed for the Mindstorms software. Just make sure you use the Windows 98 VM only for Mindstorms and do not go on the net with Windows 98.
327332

328-
329333
In Windows 7, with the more expensive editions (which you can purchase through an Anytime upgrade), you get a version of Virtual PC, with an older version of Windows running in it, for just this kind of compatibility problem. However that is XP, and the compatibility patches that Lego were hosting have long since been removed.
330334

331335
Unfortunately, Lego do not support the consumer RCX so much any more, and the downloads have now also gone from their education site.
332336

333-
For a simpler route in terms of drivers and so on, you may find [NQC](http://bricxcc.sourceforge.net/nqc/) and [Brickx Command Centre](http://bricxcc.sourceforge.net/) easier, although programming them takes more work and patience
334-
.
337+
For a simpler route in terms of drivers and so on, you may find [NQC](http://bricxcc.sourceforge.net/nqc/) and [Brickx Command Centre](http://bricxcc.sourceforge.net/) easier, although programming them takes more work and patience.
335338

336339
## More RCX, Mindstorms and Lego Information
337340

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This folder is for Amazon Product images only.
2+
All items in this folder belong to Amazon and its program, and not covered by the general license for the site. The licenses and copyrights of Amazon and it's marketplace users apply here.
52.4 KB
Loading
29.3 KB
Loading
152 KB
Loading
24.9 KB
Loading
46.9 KB
Loading
65.7 KB
Loading

src/media_object.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
function amazon_media(content, img_src, title, link) {
3+
if (img_src.startsWith("content/")) {
4+
img_src = img_src.replace("content/", "/");
5+
}
6+
return `
7+
<div class="d-flex">
8+
<div class="flex-shrink-0">
9+
<a href="${link}" target="_blank">
10+
<img src="${img_src}" class="index_post_thumb" alt="${title}">
11+
</div>
12+
<div class="flex-grow-1 ms-3">
13+
<a href="${link}" target="_blank"><h5 class="mt-0">${title}</h5></a>
14+
${content}
15+
</div>
16+
</div>
17+
`
18+
}
19+
20+
module.exports = function install_media_objects(eleventyConfig) {
21+
console.log("Installing media objects");
22+
eleventyConfig.addPairedShortcode("amazon_media", amazon_media);
23+
};

0 commit comments

Comments
 (0)