Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Satya Deep Maheshwari committed Dec 8, 2024
1 parent 03a3674 commit d45b267
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
50 changes: 50 additions & 0 deletions tools/sidekick/library.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
/>
<meta name="Description" content="AEM Sidekick Library" />
<meta name="robots" content="noindex" />
<base href="/" />

<style>
html,
body {
margin: 0;
padding: 0;
font-family: sans-serif;
background-color: #ededed;
height: 100%;
}

helix-sidekick {
display: none;
}
</style>
<title>Sidekick Library</title>
</head>

<body>
<script
type="module"
src="https://www.aem.live/tools/sidekick/library/index.js"
></script>
<script>
const library = document.createElement("sidekick-library");
library.config = {
base: "/tools/sidekick/library.json",
plugins: {
tags: {
src: "/tools/sidekick/plugins/assets-library/assets-library.js",
foo: "bar",
},
},
};

document.body.prepend(library);
</script>
</body>
</html>
14 changes: 14 additions & 0 deletions tools/sidekick/plugins/assets-library/assets-library.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Called when a user tries to load the plugin
* @param {HTMLElement} container The container to render the plugin in
* @param {Object} data The data contained in the plugin sheet
* @param {String} query If search is active, the current search query
* @param {Object} context contains any properties set when the plugin was registered
*/
export async function decorate(container, data, query, context) {

Check failure on line 8 in tools/sidekick/plugins/assets-library/assets-library.js

View workflow job for this annotation

GitHub Actions / build

'container' is defined but never used

Check failure on line 8 in tools/sidekick/plugins/assets-library/assets-library.js

View workflow job for this annotation

GitHub Actions / build

'data' is defined but never used

Check failure on line 8 in tools/sidekick/plugins/assets-library/assets-library.js

View workflow job for this annotation

GitHub Actions / build

'query' is defined but never used

Check failure on line 8 in tools/sidekick/plugins/assets-library/assets-library.js

View workflow job for this annotation

GitHub Actions / build

'context' is defined but never used
// Render your plugin

Check failure on line 9 in tools/sidekick/plugins/assets-library/assets-library.js

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 2 spaces but found 4
}

export default {
title: 'Assets Library',

Check failure on line 13 in tools/sidekick/plugins/assets-library/assets-library.js

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 2 spaces but found 4
};

Check failure on line 14 in tools/sidekick/plugins/assets-library/assets-library.js

View workflow job for this annotation

GitHub Actions / build

Newline required at end of file but not found

0 comments on commit d45b267

Please sign in to comment.