This file contains hidden or 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
| // es6 map test | |
| // Double array numbers | |
| const numbers = [1, 5, 10, 15]; | |
| const doubled = numbers.map(x => { | |
| return x * 2; | |
| }); | |
| console.log(doubled); |
This file contains hidden or 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
| int a = 100; | |
| int b = 200; | |
| if (int == 100){ | |
| if (int == 200) { | |
| // do something | |
| } else { | |
| // do something else | |
| } | |
| // do something in the end |
This file contains hidden or 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
| # In structured article nested fields are something like this: | |
| # | |
| # Parent input field: <parentInputValue> | |
| # -- Child input field: <childInputValue> | |
| # Loop through the values and set values as a link where childInputValue is url and parentInputValue as label | |
| <#if parentInputValue.getSiblings()?has_content> | |
| <#list parentInputValue.getSiblings() as current_parentInputValue> |
This file contains hidden or 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
| <#assign parentLayout = layoutService.getLayout(layout.getParentPlid()) /> | |
| <#assign parentURL = parentLayout.getFriendlyURL(theme_display.getLocale()) /> | |
| <#if validator.isNotNull(parentURL)> | |
| <a href="/web/site${parentURL}">Go to parent page</a> | |
| </#if> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <meta charset="utf-8"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/> | |
This file contains hidden or 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
| <style> | |
| img.scalable-image { | |
| width: 100%; | |
| height: auto; | |
| } | |
| </style> | |
| <img src="..." class="scalable-image"> |
This file contains hidden or 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
| <#-- | |
| * | |
| * Useful snippets using init_custom.ftl | |
| * | |
| --> | |
| <#-- Get Liferay site description --> | |
| <#assign site_description = htmlUtil.escape(page_group.getDescription()) /> | |
| <#-- Get Liferay journal article using custom field with expando bridge --> |
This file contains hidden or 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
| ${nav_item.getLayout().getTypeSettingsProperty("lfr-theme:regular:custom-setting")} |
This file contains hidden or 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
| # Editors and runners | |
| .idea/ | |
| bin/ | |
| tmp/ | |
| node_modules/ | |
| bower_components/ | |
| .settings/ | |
| .sass-cache/ | |
| resources/ |