Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.49 KB | None | 0 0
  1. {% include "section_style", bgColor: "rgba(0,0,0,.5)", defaultImg: "custom.jpg", vertAlign: section.settings.vertical %}
  2. <!-- Extra Settings Variables -->
  3. {% assign s-HorAlign = section.settings.horizontal %}
  4.  
  5. <div class="background-image background-image--{{ s-ID }} {{ s-SplashWrapper }}">
  6. <div class="section section--my-blocks section--{{ s-VertAlign }} section--{{ s-HorAlign }} section--{{ s-Spacing }} section--{{ s-AutoTextColor }} section--{{ s-ID }} {{ s-Splash }}" kjb-settings-id="{{ kjb-Background }}">
  7. <div class="container">
  8. <div class="row">
  9.  
  10. <style type="text/css"> .my-section-content-p-{{ section.id }}{ font-size:16px} </style>
  11. <h1>My Section ID: {{ s-ID }}</h1>
  12. <p class="my-section-content-p-{{ section.id }}" kjb-settings-id="{{ 'kc_header_text' | settings_id: section: section}}">{{ section.settings.kc_header_text}}</p>
  13.  
  14. {% for block in section.blocks %}
  15. {% case block.type %}
  16.  
  17. {% when 'myblock' %}
  18. <!-- BLOCK HEADER INSERTS -->
  19.  
  20. <!-- BLOCK CUSTOM STYLES -->
  21. <style type="text/css"> .my-block-content-p-{{ block.id }}{ font-size:16px} </style>
  22.  
  23. <!-- BLOCK CONTENT -->
  24. <h1>Block ID: {{ block.id }}</h1>
  25. <p class="my-block-content-p-{{ block.id }}" kjb-settings-id="{{ 'kc_text' | settings_id: section: section, block: block }}">{{ block.settings.kc_text}}</p>
  26.  
  27. <!-- BLOCK CUSTOM SCRIPTS -->
  28. <script type="text/javascript"></script>
  29.  
  30. <!-- BLOCK FOOTER INSERTS -->
  31.  
  32. {% when 'myotherblock' %}
  33. <!-- BLOCK HEADER INSERTS -->
  34.  
  35. <!-- BLOCK CUSTOM STYLES -->
  36. <style type="text/css"> .my-block-content-p-{{ block.id }}{ font-size:16px} </style>
  37.  
  38. <!-- BLOCK CONTENT -->
  39. <h1>Block ID: {{ block.id }}</h1>
  40. <p class="my-block-content-p-{{ block.id }}" kjb-settings-id="{{ 'kc_text' | settings_id: section: section, block: block }}">{{ block.settings.kc_text}}</p>
  41.  
  42. <!-- BLOCK CUSTOM SCRIPTS -->
  43. <script type="text/javascript"></script>
  44.  
  45. <!-- BLOCK FOOTER INSERTS -->
  46.  
  47. {% endcase %}
  48. {% endfor %}
  49.  
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54.  
  55. {% schema %}
  56. {
  57. "name": "Starter Section",
  58. "blocks": [
  59. {
  60. "type": "myblock",
  61. "name": "My Block",
  62. "elements": [
  63. {
  64. "type": "text",
  65. "label": "Content Text",
  66. "id": "kc_text",
  67. "default": "Why not update this line of text to say something meaningful!"
  68. }
  69. ]
  70. },
  71. {
  72. "type": "myotherblock",
  73. "name": "My Other Block",
  74. "elements": [
  75. {
  76. "type": "text",
  77. "label": "Content Text",
  78. "id": "kc_text",
  79. "default": "This is another block you can add and update!"
  80. }
  81. ]
  82. }
  83. ],
  84. "elements": [
  85. {
  86. "type": "header",
  87. "content": "Section Appearance",
  88. "style": "subheading"
  89. },
  90. {
  91. "type": "checkbox",
  92. "id": "show_img",
  93. "label": "Use Background Image",
  94. "default": "true"
  95. },
  96. {
  97. "type": "image_picker",
  98. "id": "bg_image",
  99. "label": "Background Image",
  100. "info": "Suggested dimensions: 2880 × 1200"
  101. },
  102. {
  103. "type": "color",
  104. "label": "Background Color",
  105. "id": "background_color",
  106. "allow_blank": true,
  107. "info": "Will be used as overlay if settings for background image selected. Use Opacity slider."
  108. },
  109. {
  110. "type": "color",
  111. "label": "Text Color",
  112. "id": "text_color",
  113. "allow_blank": true,
  114. "info": "Text color will change automatically based on the brightness of your background color. Use this setting if you would like to override with a custom color."
  115. },
  116. {
  117. "type": "radio",
  118. "id": "horizontal",
  119. "label": "Horizontal Alignment",
  120. "default": "center",
  121. "options": [
  122. {
  123. "label": "Left",
  124. "value": "left"
  125. },
  126. {
  127. "label": "Center",
  128. "value": "center"
  129. },
  130. {
  131. "label": "Right",
  132. "value": "right"
  133. }
  134. ]
  135. },
  136. {
  137. "type": "radio",
  138. "id": "vertical",
  139. "label": "Vertical Alignment",
  140. "default": "middle",
  141. "options": [
  142. {
  143. "label": "Top",
  144. "value": "top"
  145. },
  146. {
  147. "label": "Middle",
  148. "value": "middle"
  149. },
  150. {
  151. "label": "Bottom",
  152. "value": "bottom"
  153. }
  154. ]
  155. },
  156. {
  157. "type": "select",
  158. "id": "spacing",
  159. "label": "Spacing",
  160. "default": "medium",
  161. "options": [
  162. {
  163. "label": "Extra Small",
  164. "value": "xs-small"
  165. },
  166. {
  167. "label": "Small",
  168. "value": "small"
  169. },
  170. {
  171. "label": "Medium",
  172. "value": "medium"
  173. },
  174. {
  175. "label": "Large",
  176. "value": "large"
  177. },
  178. {
  179. "label": "Full Height",
  180. "value": "full"
  181. }
  182. ]
  183. },
  184. {
  185. "type": "header",
  186. "content": "Section Content",
  187. "style": "subheading"
  188. },
  189. {
  190. "type": "text",
  191. "id" : "kc_header_text",
  192. "label" : "Header Content",
  193. "default" : "Just some section header text you can edit!"
  194. }
  195. ],
  196. "presets": [
  197. {
  198. "name": "Starter Section",
  199. "category": "Content",
  200. "blocks": [
  201. {
  202. "type": "myblock"
  203. },
  204. {
  205. "type": "myotherblock"
  206. }
  207. ]
  208. }
  209. ]
  210. }
  211. {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement