Skip to content

Commit

Permalink
feat(ODX-1): update snippets theme for guided tutorial (#750)
Browse files Browse the repository at this point in the history
* feat(ODX-1): update snippets theme

* feat(ODX-1): fix integration + js

* feat(ODX-1): fix

* feat(ODX-1): fix

* feat(ODX-1): fix

* feat(ODX-1): fix

* Update src/partials/guided-tutorials.handlebars

Co-authored-by: Thomas Galvaing <thomas.galvaing@akeneo.com>

Co-authored-by: Samuel Gomis <samuel.gomis@getakeneo.com>
Co-authored-by: Thomas Galvaing <thomas.galvaing@akeneo.com>
  • Loading branch information
3 people authored Jan 24, 2023
1 parent 0e44753 commit 8ce9b86
Show file tree
Hide file tree
Showing 9 changed files with 10,991 additions and 1,574 deletions.
2 changes: 1 addition & 1 deletion content/swagger/akeneo-web-api.json

Large diffs are not rendered by default.

9,160 changes: 9,149 additions & 11 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"dependencies": {
"bootstrap": "3.4.1",
"font-awesome": "4.7.0",
"isotope-layout": "3.0.6",
"jquery": "3.5.1",
"lato-font": "3.0.0",
"isotope-layout": "3.0.6"
"prismjs": "^1.29.0"
},
"devDependencies": {
"del": "2.2.2",
Expand Down
23 changes: 23 additions & 0 deletions src/partials/guided-tutorials.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,27 @@
{{{mainContent}}}
</div>
</div>
<script type="text/javascript">
$( document ).ready(function() {
$('.code-tabs li:first-child').addClass('active');
});
function copySnippetContent(event){
const copyToClipboard = $(this);
copyToClipboard.text("Copied!");
copyToClipboard.addClass("copied");
setTimeout(function() {
copyToClipboard.removeClass('copied');
copyToClipboard.text("Copy");
}, 3000);
const parentTextContent = event.target.parentElement.firstChild.innerText;
navigator.clipboard.writeText(parentTextContent);
}
$( "pre" ).append( `<span class="copy-to-clipboard-button">Copy</span>`);
$('.copy-to-clipboard-button').click(copySnippetContent);
$('.code-tabs li').click(function(){
$(this).parent().children().removeClass('active');
$(this).addClass('active');
});
</script>
{{/layout}}
1 change: 1 addition & 0 deletions src/partials/layout.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<script src='/js/bootstrap.min.js'></script>
<script src="/js/isotope.pkgd.min.js"></script>
<link rel="icon" type="image/png" href="/img/akene36.png">
<link rel="stylesheet" href="/css/prism-okaidia.css">
<link rel="stylesheet" href="/css/variables.css">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css">
Expand Down
Loading

0 comments on commit 8ce9b86

Please sign in to comment.