Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically add simplified css names for all components #169

Closed
wants to merge 1 commit into from
Closed

Dynamically add simplified css names for all components #169

wants to merge 1 commit into from

Conversation

MathisonProjects
Copy link
Collaborator

What does this implement/fix? Explain your changes.
Adds class with the component name. This will make it easier to be searched in an IDE and identify components within the code.

Does this close any currently open issues?
#63

Any other comments?
N/A

Where has this been tested?
Viewed in the code.

Browser (version): …

Chrome 86.0.4240.75

@MathisonProjects
Copy link
Collaborator Author

Upon site creation, templates happen to retain the classname "themecleanflex-footer-component", needs to take on the site name on generation. Example json for a generated default page.

Template saves are resolved on creation of a new template.

{ "absOgImage": "", "brand": "asdfasd", "canonicalUrl": "/content/asdfasd/pages/articles.html", "children": [ { "children": [ { "experiences": null, "logo": "/content/asdfasd/assets/placeholders/1x1.png", "logoalttext": "example company logo", "logourl": "/content/asdfasd/pages/index", "logosize": "60", "collapsed": "false", "elevation": "1", "sticky": "true", "links": [ { "name": "n1594676077531", "component": "nt:unstructured", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n367dd855-3df0-4630-a362-8dbaa5d2e3bc/links/n1594676077531", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "link": "/content/asdfasd/pages/articles", "text": "Articles", "jcr:lastModified": 1594676098573, "fromTemplate": true } ], "linkcolor": "light", "buttonsize": "default", "buttons": [], "anchorname": null, "extraclasses": null, "htmlelement": "header", "colorscheme": "dark", "custombackground": "false", "backgroundtype": "color", "bgvideo": "https://www.youtube.com/embed/Ju86mknumYM", "bgimage": null, "bgxposition": "50", "bgyposition": "50", "bgsize": "cover", "overlay": null, "overlaycolor": "#ffffff", "overlayopacity": "50", "bgcolor": "#eeeeee", "color2": "#c0c0c0", "blockwidth": "default", "fullheight": "false", "toppadding": "10", "bottompadding": "10", "contentname": null, "component": "themecleanflex-components-header", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n367dd855-3df0-4630-a362-8dbaa5d2e3bc", "fromTemplate": true }, { "experiences": null, "level": "3", "linkcolor": "primary", "anchorname": null, "extraclasses": null, "htmlelement": "section", "colorscheme": "", "custombackground": "false", "backgroundtype": null, "bgvideo": "https://www.youtube.com/embed/Ju86mknumYM", "bgimage": null, "bgxposition": "50", "bgyposition": "50", "bgsize": "cover", "overlay": null, "overlaycolor": "#ffffff", "overlayopacity": "50", "bgcolor": "#ffffff", "color2": "#c0c0c0", "blockwidth": "default", "fullheight": "false", "toppadding": "10", "bottompadding": "10", "contentname": null, "links": [ { "link": "/content/asdfasd/pages/index", "text": "Home", "fromTemplate": true }, { "link": "/content/asdfasd/pages/articles", "text": "Articles", "fromTemplate": true } ], "component": "themecleanflex-components-breadcrumb", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/ndc7bbb80-bc96-4c11-88e6-c774cd579585", "fromTemplate": true }, { "children": [ { "experiences": null, "rootpage": "/content/asdfasd/pages/articles", "includeroot": null, "excludesitemapexcludes": "true", "levels": "2", "references": [ { "name": "n1594675067070", "component": "nt:unstructured", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nde275831-3d90-4955-98e2-5bacd59cb2a9/references/n1594675067070", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "cssclass": "", "htmlelement": "h2", "contentname": "heading", "contentfield": "title", "jcr:lastModified": 1594678232045 }, { "name": "n1594674340162", "component": "nt:unstructured", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nde275831-3d90-4955-98e2-5bacd59cb2a9/references/n1594674340162", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "cssclass": "byline", "htmlelement": "div", "contentname": "byline", "contentfield": "text", "jcr:lastModified": 1594678232046 }, { "name": "n1594678204448", "component": "nt:unstructured", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nde275831-3d90-4955-98e2-5bacd59cb2a9/references/n1594678204448", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "cssclass": "", "htmlelement": "div", "contentname": "heading", "contentfield": "text", "jcr:lastModified": 1594678232046 } ], "anchorname": null, "extraclasses": "articlelist", "htmlelement": "section", "colorscheme": "", "custombackground": "false", "backgroundtype": null, "bgvideo": "https://www.youtube.com/embed/Ju86mknumYM", "bgimage": null, "bgxposition": "50", "bgyposition": "50", "bgsize": "cover", "overlay": null, "overlaycolor": "#ffffff", "overlayopacity": "50", "bgcolor": "#ffffff", "color2": "#c0c0c0", "blockwidth": "default", "fullheight": "false", "toppadding": "20", "bottompadding": "20", "contentname": null, "rootPage": "/content/asdfasd/pages/articles", "childrenPages": [ { "levels": 2, "references": [ { "contentField": "title", "value": "Welcome to your Kestrel-1 Site", "htmlElement": "h2", "cssClass": "", "key": "/content/asdfasd/pages/articles/welcome/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nb8fdb7e0-c386-412c-951c-67d94dbdee55/ne9c0f0bc-c1fd-4557-90e9-352e9da32aaf.title" }, { "contentField": "text", "value": "<p>July-16-2020,&nbsp;<a href=\"/content/asdfasd/pages/authors/nicole-ford.html\" title=\"\" target=\"_self\">Nicole Ford</a></p>", "htmlElement": "div", "cssClass": "byline", "key": "/content/asdfasd/pages/articles/welcome/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/n6ae7522f-5162-430b-82af-302ab57a3908/n72f3e20d-71ee-4600-8ecd-10f2dab74275/n2e29d5bf-9d30-44d8-bdee-d1db6eedaa7a.text" }, { "contentField": "text", "value": "<p>Eligendi fugit asperiores et. Corrupti voluptatum quasi sit. Adipisci ut voluptatem necessitatibus cumque aspernatur.</p>", "htmlElement": "div", "cssClass": "", "key": "/content/asdfasd/pages/articles/welcome/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nb8fdb7e0-c386-412c-951c-67d94dbdee55/ne9c0f0bc-c1fd-4557-90e9-352e9da32aaf.text" } ], "hasChildren": true, "childrenPages": [], "title": "Welcome", "path": "/content/asdfasd/pages/articles/welcome" } ], "rootPageTitle": "Articles", "rootPageLink": "/content/asdfasd/pages/articles", "excludeSitemapExcludes": "true", "component": "themecleanflex-components-pagelist", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nde275831-3d90-4955-98e2-5bacd59cb2a9" }, { "experiences": null, "toggletype": "accordion", "showtitle": null, "title": null, "showmedia": null, "mediatype": null, "imagesrc": "", "videosrc": "", "mediatitle": null, "mediawidth": "50", "mediaposition": "before", "cardborder": "true", "roundedcorners": "none", "accordiontoggle": [ { "name": "n1603741742883", "component": "nt:unstructured", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nd826463a-dd14-4734-bd91-80102210bffc/accordiontoggle/n1603741742883", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "text": "asdfasdf asdf", "title": "asdf", "jcr:lastModified": 1603741746960 } ], "anchorname": null, "extraclasses": null, "htmlelement": "section", "colorscheme": "", "custombackground": "false", "backgroundtype": null, "bgvideo": "https://www.youtube.com/embed/Ju86mknumYM", "bgimage": null, "bgxposition": "50", "bgyposition": "50", "bgsize": "cover", "overlay": null, "overlaycolor": "#ffffff", "overlayopacity": "50", "bgcolor": "#ffffff", "color2": "#c0c0c0", "blockwidth": "default", "fullheight": "false", "toppadding": null, "bottompadding": null, "contentname": null, "component": "asdfasd-components-accordion", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/nd826463a-dd14-4734-bd91-80102210bffc" }, { "experiences": null, "showtitle": "true", "showtext": "true", "showbutton": "true", "showcard": "true", "customcardcolor": null, "cardcolor": "#ffffff", "cardborder": "true", "roundedcorners": "none", "cardsperrow": "4", "cardsperrowtab": "2", "cardsperrowmobile": "1", "cards": [], "anchorname": null, "extraclasses": null, "htmlelement": "section", "colorscheme": "", "custombackground": "false", "backgroundtype": null, "bgvideo": "https://www.youtube.com/embed/Ju86mknumYM", "bgimage": null, "bgxposition": "50", "bgyposition": "50", "bgsize": "cover", "overlay": null, "overlaycolor": "#ffffff", "overlayopacity": "50", "bgcolor": "#ffffff", "color2": "#c0c0c0", "blockwidth": "default", "fullheight": "false", "toppadding": null, "bottompadding": null, "contentname": null, "component": "asdfasd-components-cards", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/n093454a6-12b8-469c-9ef3-7793f201876c" }, { "experiences": null, "showlogo": null, "logo": null, "logoalttext": null, "logourl": null, "logosize": null, "columns": null, "copyright": null, "iconcustomcolor": null, "iconcolor": "#000000", "iconsize": "25", "icons": null, "anchorname": null, "extraclasses": null, "htmlelement": "section", "colorscheme": "", "custombackground": "false", "backgroundtype": null, "bgvideo": "https://www.youtube.com/embed/Ju86mknumYM", "bgimage": null, "bgxposition": "50", "bgyposition": "50", "bgsize": "cover", "overlay": null, "overlaycolor": "#ffffff", "overlayopacity": "50", "bgcolor": "#ffffff", "color2": "#c0c0c0", "blockwidth": "default", "fullheight": "false", "toppadding": null, "bottompadding": null, "contentname": null, "component": "asdfasd-components-footer", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778/n9de0c5b2-29bb-42a4-aff5-f9be08180a1b" } ], "colspan": "12", "component": "themecleanflex-components-container", "experiences": null, "fromTemplate": true, "htmlelement": "section", "jcr:primaryType": "nt:unstructured", "mobilecolspan": "12", "mobilewidth": "auto", "name": "n764b8eef-0b83-434a-94dd-c03d6da81778", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b/n764b8eef-0b83-434a-94dd-c03d6da81778", "tabletcolspan": "12", "tabletwidth": "auto", "width": "auto" } ], "colspan": "12", "component": "themecleanflex-components-container", "experiences": null, "fromTemplate": true, "htmlelement": "section", "jcr:primaryType": "nt:unstructured", "mobilecolspan": "12", "mobilewidth": "auto", "name": "nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b", "path": "/jcr:content/nebf8e89b-7765-4d9c-9e19-bff3f4d03a7b", "tabletcolspan": "12", "tabletwidth": "auto", "width": "auto" }, { "experiences": null, "showlogo": "true", "logo": "/content/asdfasd/assets/placeholders/1x1.png", "logoalttext": "example company logo", "logourl": "/content/asdfasd/pages/index", "logosize": "60", "columns": [ { "name": "columns0", "component": "nt:unstructured", "path": "/jcr:content/nc12b75b5-25da-49e2-824e-0309b40a6a6b/columns/columns0", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "text": "<div><ul><li><a href=\"/content/asdfasd/pages/index.html\" title=\"\" target=\"_self\">Home</a></li><li><a href=\"/content/asdfasd/pages/articles.html\" title=\"\" target=\"_self\">Articles</a></li><li><a href=\"/content/asdfasd/pages/authors.html\" title=\"\" target=\"_self\">Authors</a></li><li><a href=\"/content/asdfasd/pages/sitemap.html\" title=\"our sitemap - access all pages of this site\" target=\"_self\">Sitemap</a></li></ul></div><div><br></div>", "title": "Menu", "jcr:lastModified": 1594681509589, "fromTemplate": true }, { "name": "n1594665568050", "component": "nt:unstructured", "path": "/jcr:content/nc12b75b5-25da-49e2-824e-0309b40a6a6b/columns/n1594665568050", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "text": "", "title": "", "jcr:lastModified": 1594681509589, "fromTemplate": true }, { "name": "columns1", "component": "nt:unstructured", "path": "/jcr:content/nc12b75b5-25da-49e2-824e-0309b40a6a6b/columns/columns1", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "text": "<p>EMail:&nbsp;<a href=\"mailto:[email protected]\" title=\"send us a note\" target=\"_self\">[email protected]</a><br>Phone: ++1 949 555 1212</p>", "title": "Contact", "jcr:lastModified": 1594681509590, "fromTemplate": true }, { "name": "columns2", "component": "nt:unstructured", "path": "/jcr:content/nc12b75b5-25da-49e2-824e-0309b40a6a6b/columns/columns2", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "text": "<p>1234 South Sample Way<br>Neptune, CA 90909</p>", "title": "Location", "jcr:lastModified": 1594681509590, "fromTemplate": true } ], "copyright": "© 2020 example.com, Inc - All Rights Reserved", "iconcustomcolor": null, "iconcolor": "#000000", "iconsize": "25", "icons": [ { "name": "icons1", "component": "nt:unstructured", "path": "/jcr:content/nc12b75b5-25da-49e2-824e-0309b40a6a6b/icons/icons1", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "url": "https://twitter.com/", "icon": "twitter", "jcr:lastModified": 1594681509591, "iconalttext": "Twitter", "fromTemplate": true }, { "name": "icons2", "component": "nt:unstructured", "path": "/jcr:content/nc12b75b5-25da-49e2-824e-0309b40a6a6b/icons/icons2", "jcr:primaryType": "nt:unstructured", "jcr:lastModifiedBy": "admin", "url": "https://www.linkedin.com", "icon": "linkedin", "jcr:lastModified": 1594681509592, "iconalttext": "linkedin", "fromTemplate": true } ], "anchorname": null, "extraclasses": null, "htmlelement": "footer", "colorscheme": "dark", "custombackground": "false", "backgroundtype": "color", "bgvideo": "https://www.youtube.com/embed/Ju86mknumYM", "bgimage": null, "bgxposition": "50", "bgyposition": "50", "bgsize": "cover", "overlay": null, "overlaycolor": "#ffffff", "overlayopacity": "50", "bgcolor": "#eeeeee", "color2": "#c0c0c0", "blockwidth": "default", "fullheight": "false", "toppadding": "30", "bottompadding": "0", "contentname": null, "component": "themecleanflex-components-footer", "path": "/jcr:content/nc12b75b5-25da-49e2-824e-0309b40a6a6b", "fromTemplate": true } ], "component": "themecleanflex-components-page", "dataDefault": null, "dataFrom": null, "description": null, "domains": null, "experiences": null, "fallbackDomain": "http://localhost:8080", "fromTemplate": true, "loaders": null, "metaRobots": "", "metanames": [], "metaproperties": [], "ogDescription": null, "ogTitle": "Articles", "pagePath": "/content/asdfasd/pages/articles", "path": "/jcr:content", "prefetchDNS": [ "https://www.youtube.com", "https://s.ytimg.com", "https://www.google.com", "https://fonts.gstatic.com", "https://www.youtube-nocookie.com" ], "primaryDomain": "", "renderedTags": [], "siteCSS": [ "/content/asdfasd/pages/css/commons.css", "/content/asdfasd/pages/css/palettes/ocean.css", "/content/asdfasd/pages/css/palette.css", "/etc/felibs/themecleanflex.css", "/content/asdfasd/pages/css/custom.css", "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" ], "siteJS": null, "siteRoot": "/content/asdfasd/pages", "suffixToParameter": null, "tags": [], "template": "/content/asdfasd/templates/footer/header-footer", "title": "Articles" }

@reusr1 reusr1 marked this pull request as draft October 26, 2020 20:06
@reusr1 reusr1 closed this Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a class with the component name to each component root
2 participants