-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from orionrobots/fix-amazon-links-inside-the-rcx
fix amazon links for rcx inside and out
- Loading branch information
Showing
10 changed files
with
64 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This folder is for Amazon Product images only. | ||
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. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
function amazon_media(content, img_src, title, link) { | ||
if (img_src.startsWith("content/")) { | ||
img_src = img_src.replace("content/", "/"); | ||
} | ||
return ` | ||
<div class="d-flex"> | ||
<div class="flex-shrink-0"> | ||
<a href="${link}" target="_blank"> | ||
<img src="${img_src}" class="index_post_thumb" alt="${title}"> | ||
</div> | ||
<div class="flex-grow-1 ms-3"> | ||
<a href="${link}" target="_blank"><h5 class="mt-0">${title}</h5></a> | ||
${content} | ||
</div> | ||
</div> | ||
` | ||
} | ||
|
||
module.exports = function install_media_objects(eleventyConfig) { | ||
console.log("Installing media objects"); | ||
eleventyConfig.addPairedShortcode("amazon_media", amazon_media); | ||
}; |