Code
5 points small. 8 points medium. 13 points max.
Setup HubL Local Server
Setup SR App Locally
1. Start from LaunchPad Starter
2. Create a New Module Branch (e.g. sr-module-name-01) in launchpad-modules
3. Build the Module (html / css / js)
4. Create JSON
{
"custom_module": {
"author": "YOUR_EMAIL@lean-labs.com",
"name": "MODULE NAME",
"css_assets": [],
"editable_contexts": [],
"external_js": [],
"icon" : "https://www.lean-labs.com/hubfs/srco-assets/sr-logo-icon.svg",
"purchased": true,
"hostTemplateTypes": ["PAGE", "BLOG_POST", "BLOG_LISTING"],
"js_assets": [],
"other_assets": [],
"fields": [{
"default": true,
"label": "Enabled",
"name": "enabled",
"type": "boolean"
},
{
"type": "group",
"name": "design_settings",
"label": "Design Settings",
"children": [
{
"default": null,
"label": "ID",
"name": "sr_module_id",
"type": "text"
},
{
"default": null,
"label": "Class",
"name": "class",
"type": "text"
},
{
"choices": [
[
"container", "Page"
],
[
"container-fluid", "Full Width"
]
],
"default": "container",
"display": "select",
"label": "Layout",
"name": "layout",
"type": "choice",
"required": true
},
{
"choices": [
[
"min", "Minimum"
],
[
"narrow", "Narrow"
],
[
"wide", "Wide"
],
[
"max", "Maximum"
]
],
"default": "max",
"display": "select",
"label": "Container Width",
"name": "container_width",
"type": "choice",
"required": true
},
{
"choices": [
[
"auto", "Use default values"
],
[
"zero", "No Padding"
],
[
"half", "Small padding"
],
[
"full", "Large padding"
],
[
"custom", "Custom padding"
]
],
"id": "top_bottom_padding",
"default": "full",
"display": "select",
"label": "Top Bottom Padding",
"name": "top_bottom_padding",
"type": "choice",
"required": true
},
{
"name": "custom_padding",
"type": "text",
"label": "Custom Padding",
"help_text": "Top, Right, Bottom, Left",
"visibility": {
"controlling_field": "top_bottom_padding",
"controlling_value_regex": "custom",
"operator": "EQUAL",
"access": null
},
"default": "1rem 0rem 1rem 0rem"
},
{
"default": false,
"label": "Border Top",
"name": "border_top",
"type": "boolean"
},
{
"default": false,
"label": "Border Bottom",
"name": "border_bottom",
"type": "boolean"
},
{
"choices": [
[
"image", "Image"
],
[
"color", "Color"
],
[
"custom", "Custom"
]
],
"id": "background_option",
"default": "color",
"display": "select",
"label": "Background Option",
"name": "background_option",
"type": "choice",
"required": true
},
{
"default": {
"src": "",
"alt": ""
},
"label": "Background Image",
"name": "background_image",
"visibility": {
"controlling_field": "background_option",
"controlling_value_regex": "image",
"operator": "EQUAL"
},
"type": "image"
},
{
"default": {
"color": "#343a40",
"opacity": 30
},
"label": "Background Overlay Color",
"name": "background_overlay_color",
"visibility": {
"controlling_field": "background_option",
"controlling_value_regex": "image",
"operator": "EQUAL"
},
"help_text": "Recommended Width: 2880x1920px",
"type": "color"
},
{
"choices": [
[
"primary", "Primary"
],
[
"secondary", "Secondary"
],
[
"tertiary", "Tertiary"
],
[
"white", "White"
],
[
"black", "Black"
],
[
"dark", "Dark"
],
[
"light", "Light"
],
[
"success", "Success"
],
[
"info", "Info"
],
[
"warning", "Warning"
],
[
"danger", "Danger"
],
[
"none", "None"
]
],
"default": "white",
"display": "select",
"label": "Background Color",
"name": "background_color",
"type": "choice",
"visibility": {
"controlling_field": "background_option",
"controlling_value_regex": "color",
"operator": "EQUAL"
},
"required": true
},
{
"default": {
"color": "#fff"
},
"label": "Background Custom",
"name": "background_custom",
"visibility": {
"controlling_field": "background_option",
"controlling_value_regex": "custom",
"operator": "EQUAL"
},
"type": "color"
}
]},
{
"default": "",
"label": "Heading",
"name": "heading",
"type": "text"
},
{
"choices": [
[
"1", "H1"
],
[
"2", "H2"
],
[
"3", "H3"
],
[
"4", "H4"
],
[
"5", "H5"
],
[
"6", "H6"
]
],
"default": "2",
"display": "select",
"label": "Heading Size",
"name": "heading_size",
"visibility" : {
"controlling_field" : "heading",
"controlling_value_regex" : null,
"operator" : null,
"access" : null
},
"type": "choice",
"required": true
},
{
"name": "heading_display_size",
"label": "Heading Display Size",
"required": true,
"locked": false,
"display": "select",
"visibility": {
"controlling_field": "heading",
"controlling_value_regex": null,
"operator": null,
"access": null
},
"choices": [
[
"auto",
"Auto"
],
[
"h1",
"H1"
],
[
"h2",
"H2"
],
[
"h3",
"H3"
],
[
"h4",
"H4"
],
[
"h5",
"H5"
],
[
"h6",
"H6"
],
[
"display-4",
"L"
],
[
"display-3",
"XL"
],
[
"display-2",
"XXL"
],
[
"display-1",
"XXXL"
]
],
"type": "choice",
"default": "auto"
},
{
"default": "",
"label": "Description",
"name": "description",
"type": "richtext"
},
{
"choices": [
[
"auto", "Auto"
],
[
"left", "Left"
],
[
"center", "Center"
],
[
"right", "Right"
]
],
"default": "auto",
"display": "select",
"label": "Text Align",
"name": "text_align",
"type": "choice",
"required": true
},
{
"choices": [
[
"auto", "Auto"
],
[
"primary", "Primary"
],
[
"secondary", "Secondary"
],
[
"tertiary", "Tertiary"
],
[
"white", "White"
],
[
"black", "Black"
],
[
"dark", "Dark"
],
[
"light", "Light"
],
[
"success", "Success"
],
[
"info", "Info"
],
[
"warning", "Warning"
],
[
"danger", "Danger"
]
],
"default": "auto",
"display": "select",
"label": "Text Color",
"name": "text_color",
"type": "choice",
"required": true
}
],
"source": "",
"widgetLabel": "1.0.0"
},
"custom_module_template": "MODULE_NAME.html",
"available_builder": true,
"category": 0,
"files": []
}4. Deploy Module to HubSpot
Setup SR App Locally5. Browser + Mobile Responsiveness Test
Last updated