Skip to content
Open
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
7 changes: 7 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"permissions": {
"allow": [
"Bash(rtk gh *)"
]
}
}
30 changes: 25 additions & 5 deletions src/main/resources/jnt_customCodeBlock/html/customCodeBlock.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,36 @@ ${css}
</style>
</template:addResources>
</c:if>
${currentNode.properties.html.string}
${html}
<c:if test="${! empty js}">
<template:addResources targetTag="body">
<script>
${js}
</script>
</template:addResources>
</c:if>
<c:if test="${renderContext.editMode}">
<c:if test="${empty functions:removeHtmlTags(html)}">
${currentNode.name}
</c:if>
<c:if test="${renderContext.editMode && (empty html || empty functions:removeHtmlTags(html))}">
<template:addResources>
<style>
.jnt-custom-code-block__empty-notice {
border: 2px dashed #f90;
padding: 1rem;
color: #595959;
font-style: italic;
background: #fff8e1;
}
</style>
</template:addResources>
<c:choose>
<c:when test="${empty css && empty js}">
<p class="jnt-custom-code-block__empty-notice">
[Empty custom code block: <c:out value="${currentNode.name}"/>]
</p>
</c:when>
<c:otherwise>
<p class="jnt-custom-code-block__empty-notice">
[Custom code block — CSS/JS only: <c:out value="${currentNode.name}"/>]
</p>
</c:otherwise>
</c:choose>
</c:if>
2 changes: 1 addition & 1 deletion src/main/resources/resources/CustomCodeBlock.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jnt_customCodeBlock=Custom Code Block
jnt_customCodeBlock.html=HTML
jnt_customCodeBlock.html.ui.tooltip=This content will be directly injected on the page (HTML, script tags, embeds...)
jnt_customCodeBlock.css=CSS
jnt_customCodeBlock.css.ui.tooltip=Will be added in the HEAD via a style tag
jnt_customCodeBlock.css.ui.tooltip=CSS injected globally in HEAD. Scope all rules to a specific class — unscoped selectors affect the entire page.
jnt_customCodeBlock.js=Inline JavaScript
jnt_customCodeBlock.js.ui.tooltip=Write JS code only (no script tags) \u2014 it will automatically be wrapped in script tags and added before the end of body

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/resources/CustomCodeBlock_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jnt_customCodeBlock=Bloc de code personnalis\u00E9
jnt_customCodeBlock.html=HTML
jnt_customCodeBlock.html.ui.tooltip=Ce contenu sera inject\u00E9 directement dans la page (HTML, balises script, embeds...)
jnt_customCodeBlock.css=CSS
jnt_customCodeBlock.css.ui.tooltip=Sera ajout\u00E9 dans le HEAD via une balise style
jnt_customCodeBlock.css.ui.tooltip=CSS inject\u00E9 globalement dans le HEAD. Restreignez toutes les r\u00E8gles \u00E0 une classe sp\u00E9cifique \u2014 les s\u00E9lecteurs non restreints s\u2019appliquent \u00E0 toute la page.
jnt_customCodeBlock.js=JavaScript inline
jnt_customCodeBlock.js.ui.tooltip=\u00C9crivez uniquement du code JS (sans balises script) \u2014 il sera automatiquement encadr\u00E9 de balises script et ajout\u00E9 avant la fin du body

Expand Down