Commit debc5e5c authored by Björn Bartels's avatar Björn Bartels 👩🏻
Browse files

refactoring POC, part I

parent d9746711
Loading
Loading
Loading
Loading

gui/src/data/categories.json

deleted100644 → 0
+0 −409
Original line number Diff line number Diff line
[
    {
        "name": "article",
        "slug": "article",
        "patterns": {
            "molecule/article-excerpt-toggle": {
                "pattern": {
                    "name": "molecule/article-excerpt-toggle",
                    "categories": [
                        "typography",
                        "article"
                    ],
                    "uses": [
                        "atom/text-headline",
                        "molecule/text-excerpt-toggle",
                        "atom/link"
                    ],
                    "type": "molecule"
                },
                "params": {
                    "class": [
                        "*"
                    ],
                    "headline": [
                        "*"
                    ],
                    "content": [
                        "*"
                    ],
                    "url": [
                        "*"
                    ]
                },
                "defaults": {
                    "headline": "This is some article headline...",
                    "url": "https://domain.tld/"
                },
                "body": "<article class=\"{{class}}\">\n    {{PL atom=\"text-headline\" text=headline}}\n    {{PL molecule=\"text-excerpt-toggle\" text=content}}\n    {{PL atom=\"link\" href=url label=\"read more\" class=\"more\"}}\n</article>"
            },
            "molecule/article-teaser": {
                "pattern": {
                    "name": "molecule/article-teaser",
                    "categories": [
                        "typography",
                        "article"
                    ],
                    "uses": [
                        "atom/text-headline",
                        "atom/text-paragraph",
                        "atom/link"
                    ],
                    "type": "molecule"
                },
                "params": {
                    "class": [
                        "*"
                    ],
                    "headline": [
                        "*"
                    ],
                    "content": [
                        "*"
                    ],
                    "url": [
                        "*"
                    ]
                },
                "defaults": {
                    "headline": "This is some article headline...",
                    "url": "https://domain.tld/"
                },
                "body": "<article class=\"{{class}}\">\n    {{PL atom=\"text-headline\" text=headline}}\n    {{PL atom=\"text-paragraph\" text=content}}\n    {{PL atom=\"link\" href=url label=\"more\" class=\"more\"}}\n</article>"
            }
        },
        "patternsCount": 2
    },
    {
        "name": "basic",
        "slug": "basic",
        "patterns": {
            "atom/link": {
                "pattern": {
                    "name": "atom/link",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": null,
                    "type": "atom"
                },
                "params": {
                    "class": [
                        "*"
                    ],
                    "href": [
                        "*"
                    ],
                    "label": [
                        "*"
                    ]
                },
                "body": "<a class=\"{{class}}\" href=\"{{#if href}}{{href}}{{/if}}{{#unless href}}{{texthelper 'url'}}{{/unless}}\">{{#if label}}{{label}}{{/if}}{{#unless label}}{{texthelper 'word'}}{{/unless}}</a>\n ",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            },
            "atom/text-headline": {
                "pattern": {
                    "name": "atom/text-headline",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": null,
                    "type": "atom"
                },
                "params": {
                    "headlevel": [
                        "1",
                        "2",
                        "3",
                        "4",
                        "5",
                        "6"
                    ],
                    "class": [
                        "*"
                    ],
                    "text": [
                        "*"
                    ]
                },
                "defaults": {
                    "headlevel": "1"
                },
                "body": "{{#unless headlevel}}\n<h{{defaults.headlevel}} class=\"{{class}}\">{{#unless text}}{{texthelper 'words'}}{{/unless}}{{#if text}}{{text}}{{/if}}</h{{defaults.headlevel}}>\n{{/unless}}\n{{#if headlevel}}\n<h{{headlevel}} class=\"{{class}}\">{{#unless text}}{{texthelper 'words'}}{{/unless}}{{#if text}}{{text}}{{/if}}</h{{headlevel}}>\n{{/if}}\n",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            },
            "atom/text-paragraph": {
                "pattern": {
                    "name": "atom/text-paragraph",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": null,
                    "type": "atom"
                },
                "params": {
                    "class": [
                        "*"
                    ]
                },
                "body": "<p class=\"{{class}}\">{{texthelper 'normal'}}</p>",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            },
            "molecule/text-excerpt-toggle": {
                "pattern": {
                    "name": "molecule/text-excerpt-toggle",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": [
                        "atom/text-paragraph",
                        "atom/link"
                    ],
                    "type": "molecule"
                },
                "params": {
                    "class": [
                        "*"
                    ]
                },
                "body": "<p class=\"{{class}}\" data-text-excerpt-toggle>{{texthelper 'long'}}</p>\n<a href=\"#more\">show more</a>\n<a href=\"#less\">show less</a>",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            }
        },
        "patternsCount": 4
    },
    {
        "name": "button",
        "slug": "button",
        "patterns": {
            "atom/modal-close-button": {
                "pattern": {
                    "name": "atom/modal-close-button",
                    "categories": [
                        "button",
                        "modal"
                    ],
                    "type": "atom"
                },
                "body": "<a class=\"btn btn-icon btn-cta-xhr cta-xhr-modal-close\" href=\"javascript:return true;\" aria-label=\"Close modal\" data-close>\n  <span aria-hidden=\"true\">&times;</span>\n</a>"
            }
        },
        "patternsCount": 1
    },
    {
        "name": "modal",
        "slug": "modal",
        "patterns": {
            "atom/modal-close-button": {
                "pattern": {
                    "name": "atom/modal-close-button",
                    "categories": [
                        "button",
                        "modal"
                    ],
                    "type": "atom"
                },
                "body": "<a class=\"btn btn-icon btn-cta-xhr cta-xhr-modal-close\" href=\"javascript:return true;\" aria-label=\"Close modal\" data-close>\n  <span aria-hidden=\"true\">&times;</span>\n</a>"
            }
        },
        "patternsCount": 1
    },
    {
        "name": "typography",
        "slug": "typography",
        "patterns": {
            "atom/link": {
                "pattern": {
                    "name": "atom/link",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": null,
                    "type": "atom"
                },
                "params": {
                    "class": [
                        "*"
                    ],
                    "href": [
                        "*"
                    ],
                    "label": [
                        "*"
                    ]
                },
                "body": "<a class=\"{{class}}\" href=\"{{#if href}}{{href}}{{/if}}{{#unless href}}{{texthelper 'url'}}{{/unless}}\">{{#if label}}{{label}}{{/if}}{{#unless label}}{{texthelper 'word'}}{{/unless}}</a>\n ",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            },
            "atom/text-headline": {
                "pattern": {
                    "name": "atom/text-headline",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": null,
                    "type": "atom"
                },
                "params": {
                    "headlevel": [
                        "1",
                        "2",
                        "3",
                        "4",
                        "5",
                        "6"
                    ],
                    "class": [
                        "*"
                    ],
                    "text": [
                        "*"
                    ]
                },
                "defaults": {
                    "headlevel": "1"
                },
                "body": "{{#unless headlevel}}\n<h{{defaults.headlevel}} class=\"{{class}}\">{{#unless text}}{{texthelper 'words'}}{{/unless}}{{#if text}}{{text}}{{/if}}</h{{defaults.headlevel}}>\n{{/unless}}\n{{#if headlevel}}\n<h{{headlevel}} class=\"{{class}}\">{{#unless text}}{{texthelper 'words'}}{{/unless}}{{#if text}}{{text}}{{/if}}</h{{headlevel}}>\n{{/if}}\n",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            },
            "atom/text-paragraph": {
                "pattern": {
                    "name": "atom/text-paragraph",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": null,
                    "type": "atom"
                },
                "params": {
                    "class": [
                        "*"
                    ]
                },
                "body": "<p class=\"{{class}}\">{{texthelper 'normal'}}</p>",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            },
            "molecule/article-excerpt-toggle": {
                "pattern": {
                    "name": "molecule/article-excerpt-toggle",
                    "categories": [
                        "typography",
                        "article"
                    ],
                    "uses": [
                        "atom/text-headline",
                        "molecule/text-excerpt-toggle",
                        "atom/link"
                    ],
                    "type": "molecule"
                },
                "params": {
                    "class": [
                        "*"
                    ],
                    "headline": [
                        "*"
                    ],
                    "content": [
                        "*"
                    ],
                    "url": [
                        "*"
                    ]
                },
                "defaults": {
                    "headline": "This is some article headline...",
                    "url": "https://domain.tld/"
                },
                "body": "<article class=\"{{class}}\">\n    {{PL atom=\"text-headline\" text=headline}}\n    {{PL molecule=\"text-excerpt-toggle\" text=content}}\n    {{PL atom=\"link\" href=url label=\"read more\" class=\"more\"}}\n</article>"
            },
            "molecule/article-teaser": {
                "pattern": {
                    "name": "molecule/article-teaser",
                    "categories": [
                        "typography",
                        "article"
                    ],
                    "uses": [
                        "atom/text-headline",
                        "atom/text-paragraph",
                        "atom/link"
                    ],
                    "type": "molecule"
                },
                "params": {
                    "class": [
                        "*"
                    ],
                    "headline": [
                        "*"
                    ],
                    "content": [
                        "*"
                    ],
                    "url": [
                        "*"
                    ]
                },
                "defaults": {
                    "headline": "This is some article headline...",
                    "url": "https://domain.tld/"
                },
                "body": "<article class=\"{{class}}\">\n    {{PL atom=\"text-headline\" text=headline}}\n    {{PL atom=\"text-paragraph\" text=content}}\n    {{PL atom=\"link\" href=url label=\"more\" class=\"more\"}}\n</article>"
            },
            "molecule/text-excerpt-toggle": {
                "pattern": {
                    "name": "molecule/text-excerpt-toggle",
                    "categories": [
                        "basic",
                        "typography"
                    ],
                    "uses": [
                        "atom/text-paragraph",
                        "atom/link"
                    ],
                    "type": "molecule"
                },
                "params": {
                    "class": [
                        "*"
                    ]
                },
                "body": "<p class=\"{{class}}\" data-text-excerpt-toggle>{{texthelper 'long'}}</p>\n<a href=\"#more\">show more</a>\n<a href=\"#less\">show less</a>",
                "usage": {
                    "count": 1,
                    "consumers": {}
                }
            }
        },
        "patternsCount": 6
    }
]

gui/src/data/patternlibrary.json

deleted100644 → 0
+0 −2667

File deleted.

Preview size limit exceeded, changes collapsed.

gui/src/data/patterns.json

deleted100644 → 0
+0 −188
Original line number Diff line number Diff line
{
    "atom/link": {
        "pattern": {
            "name": "atom/link",
            "categories": [
                "basic",
                "typography"
            ],
            "uses": null,
            "type": "atom"
        },
        "params": {
            "class": [
                "*"
            ],
            "href": [
                "*"
            ],
            "label": [
                "*"
            ]
        },
        "body": "<a class=\"{{class}}\" href=\"{{#if href}}{{href}}{{/if}}{{#unless href}}{{texthelper 'url'}}{{/unless}}\">{{#if label}}{{label}}{{/if}}{{#unless label}}{{texthelper 'word'}}{{/unless}}</a>\n ",
        "usage": {
            "count": 1,
            "consumers": {}
        }
    },
    "atom/modal-close-button": {
        "pattern": {
            "name": "atom/modal-close-button",
            "categories": [
                "button",
                "modal"
            ],
            "type": "atom"
        },
        "body": "<a class=\"btn btn-icon btn-cta-xhr cta-xhr-modal-close\" href=\"javascript:return true;\" aria-label=\"Close modal\" data-close>\n  <span aria-hidden=\"true\">&times;</span>\n</a>"
    },
    "atom/text-headline": {
        "pattern": {
            "name": "atom/text-headline",
            "categories": [
                "basic",
                "typography"
            ],
            "uses": null,
            "type": "atom"
        },
        "params": {
            "headlevel": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6"
            ],
            "class": [
                "*"
            ],
            "text": [
                "*"
            ]
        },
        "defaults": {
            "headlevel": "1"
        },
        "body": "{{#unless headlevel}}\n<h{{defaults.headlevel}} class=\"{{class}}\">{{#unless text}}{{texthelper 'words'}}{{/unless}}{{#if text}}{{text}}{{/if}}</h{{defaults.headlevel}}>\n{{/unless}}\n{{#if headlevel}}\n<h{{headlevel}} class=\"{{class}}\">{{#unless text}}{{texthelper 'words'}}{{/unless}}{{#if text}}{{text}}{{/if}}</h{{headlevel}}>\n{{/if}}\n",
        "usage": {
            "count": 1,
            "consumers": {}
        }
    },
    "atom/text-paragraph": {
        "pattern": {
            "name": "atom/text-paragraph",
            "categories": [
                "basic",
                "typography"
            ],
            "uses": null,
            "type": "atom"
        },
        "params": {
            "class": [
                "*"
            ]
        },
        "body": "<p class=\"{{class}}\">{{texthelper 'normal'}}</p>",
        "usage": {
            "count": 1,
            "consumers": {}
        }
    },
    "molecule/article-excerpt-toggle": {
        "pattern": {
            "name": "molecule/article-excerpt-toggle",
            "categories": [
                "typography",
                "article"
            ],
            "uses": [
                "atom/text-headline",
                "molecule/text-excerpt-toggle",
                "atom/link"
            ],
            "type": "molecule"
        },
        "params": {
            "class": [
                "*"
            ],
            "headline": [
                "*"
            ],
            "content": [
                "*"
            ],
            "url": [
                "*"
            ]
        },
        "defaults": {
            "headline": "This is some article headline...",
            "url": "https://domain.tld/"
        },
        "body": "<article class=\"{{class}}\">\n    {{PL atom=\"text-headline\" text=headline}}\n    {{PL molecule=\"text-excerpt-toggle\" text=content}}\n    {{PL atom=\"link\" href=url label=\"read more\" class=\"more\"}}\n</article>"
    },
    "molecule/article-teaser": {
        "pattern": {
            "name": "molecule/article-teaser",
            "categories": [
                "typography",
                "article"
            ],
            "uses": [
                "atom/text-headline",
                "atom/text-paragraph",
                "atom/link"
            ],
            "type": "molecule"
        },
        "params": {
            "class": [
                "*"
            ],
            "headline": [
                "*"
            ],
            "content": [
                "*"
            ],
            "url": [
                "*"
            ]
        },
        "defaults": {
            "headline": "This is some article headline...",
            "url": "https://domain.tld/"
        },
        "body": "<article class=\"{{class}}\">\n    {{PL atom=\"text-headline\" text=headline}}\n    {{PL atom=\"text-paragraph\" text=content}}\n    {{PL atom=\"link\" href=url label=\"more\" class=\"more\"}}\n</article>"
    },
    "molecule/text-excerpt-toggle": {
        "pattern": {
            "name": "molecule/text-excerpt-toggle",
            "categories": [
                "basic",
                "typography"
            ],
            "uses": [
                "atom/text-paragraph",
                "atom/link"
            ],
            "type": "molecule"
        },
        "params": {
            "class": [
                "*"
            ]
        },
        "body": "<p class=\"{{class}}\" data-text-excerpt-toggle>{{texthelper 'long'}}</p>\n<a href=\"#more\">show more</a>\n<a href=\"#less\">show less</a>",
        "usage": {
            "count": 1,
            "consumers": {}
        }
    }
}

gui/src/data/search.json

deleted100644 → 0
+0 −297

File deleted.

Preview size limit exceeded, changes collapsed.

gui/src/data/tree.json

deleted100644 → 0
+0 −2068

File deleted.

Preview size limit exceeded, changes collapsed.

Loading