templates/css/front.css.twig line 1

Open in your IDE?
  1. {% set globalColors = getFrontDataFromSettingOrYaml('front.css_config.colors', platform_front('css_config.colors') ) %}
  2. {% set isHighlights = platform_global('type') is same as('highlights') and platform_global('highlights') and app.user is not same as(null) %}
  3. {% if isHighlights %}
  4. {% set currentDisplayStep = getUserFrontCurrentStep(app.user) %}
  5. {% if currentDisplayStep.options is defined %}
  6. {% set globalColors = globalColors|merge({'primary': currentDisplayStep.options.colors.primary }) %}
  7. {% endif %}
  8. {% endif %}
  9. {% set globalPrimary = globalColors.primary%}
  10. {% set globalSecondary = globalColors.secondary%}
  11. .m-0 {
  12. margin: 0 !important;
  13. }
  14. .mb-40 {
  15. margin-bottom: 40px !important;
  16. }
  17. .font-weight-bold {
  18. font-weight: bold !important;
  19. }
  20. {#{% if platform_front('common.footer.background') %}#}
  21. {#.main-footer {#}
  22. {# background-image : url( {{ asset(platform_front('common.footer.background.url') ) }} ) !important;#}
  23. {#}#}
  24. {#{% endif %}#}
  25. ::-webkit-scrollbar-button {
  26. background-color: #2A2A29;
  27. height: 0;
  28. }
  29. ::-webkit-scrollbar-track {
  30. background-color: #003F72;
  31. }
  32. ::-webkit-scrollbar-thumb {
  33. background-color: #F7CD39;
  34. }
  35. ::-webkit-scrollbar-corner {
  36. background-color: #F7CD39;
  37. }
  38. ::-moz-selection {
  39. background-color: #F7CD39;
  40. color: #2A2A29;
  41. }
  42. .m-0 {
  43. margin: 0 !important;
  44. }
  45. .mb-40 {
  46. margin-bottom: 40px !important;
  47. }
  48. .font-weight-bold {
  49. font-weight: bold !important;
  50. }
  51. {##}
  52. ::-webkit-scrollbar-button {
  53. background-color: #2A2A29;
  54. height: 0;
  55. }
  56. ::-webkit-scrollbar-track {
  57. background-color: #003F72;
  58. }
  59. ::-webkit-scrollbar-thumb {
  60. background-color: #F7CD39;
  61. }
  62. ::-webkit-scrollbar-corner {
  63. background-color: #F7CD39;
  64. }
  65. ::-moz-selection {
  66. background-color: #F7CD39;
  67. color: #2A2A29;
  68. }
  69. {% if platform_front('css_config') %}
  70. /*============================*/
  71. /* CSS global généré par yaml */
  72. /*============================*/
  73. /*----------------------*/
  74. /* Fonts */
  75. /*----------------------*/
  76. {% set fonts = getFrontDataFromSettingOrYaml('front.css_config.fonts', platform_front('css_config.fonts')) %}
  77. {% for k,item in fonts %}
  78. {{ generateCssClass(item)|raw }}
  79. {% endfor %}
  80. /*----------------------*/
  81. /* Couleurs principales */
  82. /*----------------------*/
  83. {% for k,item in globalColors %}
  84. /** Class pour {{ k }} **/
  85. {{ getCssClassGlobal(k, item)|raw }}
  86. {% endfor %}
  87. {#Génération des class pour override les couleurs principale en cas de platforme temps fort + user loggé#}
  88. {% set color_primary = globalPrimary.color %}
  89. {% if platform_front('theme') and platform_front('theme') is same as('theme-default')%}
  90. {% set color_secondary = globalSecondary.color %}
  91. {{ generateHeaderCssClass('default', globalColors)|raw }}
  92. {% for k,item in globalColors %}
  93. /** Class main-menu-{{ k }} **/
  94. {{ generateHeaderCssClass(k, globalColors)|raw }}
  95. {% endfor %}
  96. {% endif %}
  97. {#Génération des class de theme pour les liens en fonction de la couleur principale#}
  98. .link-theme-primary a:not(.btn-impersonation) { color: {{ color_primary|raw }}!important;}
  99. {% if color_secondary is defined %}
  100. .link-theme-primary a:not(.btn-impersonation):hover, .link-theme-primary a.active{ color: {{ color_secondary|raw }}!important;}
  101. .link-theme-secondary a:not(.btn-impersonation) { color: {{ color_secondary|raw }}!important;}
  102. {% endif %}
  103. .link-theme-secondary a:not(.btn-impersonation):hover, .link-theme-secondary a.active{ color: {{ color_primary|raw }}!important;}
  104. /*----------------------*/
  105. /* Elements */
  106. /*----------------------*/
  107. {% for type,element in platform_front('css_config') %}
  108. {% if type is not same as('colors') %}
  109. /** Class pour {{ type }} **/
  110. {% for k,item in element %}
  111. {% if type is same as('thumbnails') %}
  112. {{ generateThumbnailCssClass(item)|raw }}
  113. {% elseif type not in ['buttons', 'form', 'fonts'] %}
  114. {{ generateCssClass(item)|raw }}
  115. {% endif %}
  116. {% endfor %}
  117. {% endif %}
  118. {% endfor %}
  119. {% set buttons = getFrontDataFromSettingOrYaml('front.css_config.buttons', platform_front('css_config.buttons')) %}
  120. {% for k,item in buttons %}
  121. {{ generateCssClass(item)|raw }}
  122. {% endfor %}
  123. {% set form = getFrontDataFromSettingOrYaml('front.css_config.form', platform_front('css_config.form')) %}
  124. {% for k,item in form %}
  125. {{ generateCssClass(item)|raw }}
  126. {% endfor %}
  127. {% endif %}
  128. {% if platform_front('css_config.css') %}
  129. /*----------------------*/
  130. /* Custom global CSS */
  131. /*----------------------*/
  132. {{ platform_front('css_config.css')|raw }}
  133. {% endif %}
  134. /*----------------------*/
  135. /* Common Component */
  136. /*----------------------*/
  137. {% if platform_front('common') %}
  138. {% for type,element in platform_front('common') %}
  139. {% if element.css_custom is defined %}
  140. /** Class pour {{ type }} **/
  141. {{ element.css_custom|raw }}
  142. {% endif %}
  143. {% endfor %}
  144. {% endif %}
  145. /*---------------------------*/
  146. /* Common Component children */
  147. /*---------------------------*/
  148. {% if platform_front('common.header') %}
  149. /** Header => menu, banner, buttons, logo **/
  150. {% set children = ['menu', 'banner', 'buttons', 'logo'] %}
  151. {% set header = platform_front('common.header') %}
  152. {% for k,el in header %}
  153. {% if k in children and el.css_custom is defined %}
  154. /** header.{{ k }} **/
  155. {{el.css_custom|raw }}
  156. {% endif %}
  157. {% endfor %}
  158. {% endif %}
  159. /*---------------------------*/
  160. /* Content Front */
  161. /*---------------------------*/
  162. {% if platform_front('content') %}
  163. {% for type,element in platform_front('content') %}
  164. {% if element.css_custom is defined %}
  165. /** Class pour
  166. {{ type }} **/
  167. {{ element.css_custom|raw }}
  168. {% endif %}
  169. {% endfor %}
  170. {% endif %}
  171. /*---------------------------*/
  172. /* Content Security */
  173. /*---------------------------*/
  174. {% if platform_front('security') %}
  175. {% if platform_front('security.css_custom') %}
  176. /** Class pour security **/
  177. {{ platform_front('security.css_custom')|raw }}
  178. {% endif %}
  179. {% endif %}
  180. /*---------------------------*/
  181. /* Content Catalogue */
  182. /*---------------------------*/
  183. {% set theme = globalPrimary %}
  184. {% if platform_front('content.catalog') and platform_front('content.catalog.theme_color') %}
  185. {% set theme = globalColors[platform_front('content.catalog.theme_color')] %}
  186. {% endif %}
  187. .main-products.product-grid .product-thumb .stats {
  188. color : {{ theme.color|raw }};
  189. }
  190. .irs--round .irs-from,
  191. .irs--round .irs-to,
  192. .irs--round .irs-single,
  193. .irs--round .irs-bar,
  194. .irs--round .irs-handle {
  195. background-color: {{ theme.color|raw }} !important;
  196. }
  197. .irs--round .irs-from:before, .irs--round .irs-to:before, .irs--round .irs-single:before {
  198. border-top-color: {{ theme.color|raw }} !important;
  199. }
  200. {% if color_primary is defined %}
  201. .theme-default .list-catalogue-link.active::after,.theme-default .list-catalogue-link:hover::after { background: {{ color_primary|raw }}; }
  202. .theme-default .list-catalogue-link.active { color: {{ color_primary|raw }} !important; }
  203. {% endif %}
  204. .theme-default .user-menu > li.active, .theme-default .user-menu > li:hover { border-color: {{ color_primary|raw }}; }
  205. /*---------------------------*/
  206. /* Content Product */
  207. /*---------------------------*/
  208. .lSPager.lSGallery li.active{border-color: {{ theme.color|raw }} !important }
  209. /*---------------------------*/
  210. /* Content Profile */
  211. /*---------------------------*/
  212. {% if isHighlights %}
  213. {% set theme = globalPrimary.color %}
  214. {% if platform_front('content.profile') and platform_front('content.profile.theme_color') %}
  215. {% set theme = globalColors[platform_front('content.profile.theme_color')] %}
  216. {% endif %}
  217. .user-menu > li.active > a, .user-menu > li:hover > a {
  218. border-left-color : {{ theme.color|raw }} !important;
  219. color : {{ theme.color|raw }} !important;
  220. }
  221. .profil_page h1,
  222. .profil_page .h1,
  223. .profil_page h2,
  224. .profil_page .h2 {
  225. color : {{ theme.color|raw }};
  226. }
  227. .profil_page .pseudo_border:after {
  228. background: {{ theme.color|raw }};
  229. }
  230. .profil_page .btn-blue-nuance {
  231. background-color: {{ theme.color|raw }};
  232. border-color: {{ theme.color|raw }};
  233. color: {{ theme.text_color|raw }};
  234. }
  235. .profil_page .btn-blue-nuance.active,
  236. .profil_page .btn-blue-nuance:hover {
  237. background-color: {{ theme.hover|raw }};
  238. border-color: {{ theme.hover|raw }};
  239. color: {{ theme.text_hover|raw }};
  240. }
  241. {% endif %}
  242. /*---------------------------*/
  243. /* Content Containt */
  244. /*---------------------------*/
  245. {% if platform_front('content') %}
  246. {% for type,element in platform_front('content') %}
  247. {% if element.css_custom is defined %}
  248. /** Class pour
  249. {{ type }} **/
  250. {{ element.css_custom|raw }}
  251. {% endif %}
  252. {% endfor %}
  253. {% endif %}
  254. /*---------------------------*/
  255. /* MISC */
  256. /*---------------------------*/
  257. /* Responsive embed video */
  258. .video-container {
  259. position: relative;
  260. padding-bottom: 56.25%;
  261. padding-top: 30px;
  262. height: 0;
  263. overflow: hidden;
  264. }
  265. .video-container iframe,
  266. .video-container object,
  267. .video-container embed {
  268. width: 100%;
  269. height: 100%;
  270. position: absolute;
  271. top: 0;
  272. left: 0;
  273. }
  274. /*Responsive video*/
  275. video {
  276. width: 100%;
  277. max-height: 100%;
  278. }