Giter VIP home page Giter VIP logo

patternlibrarybuilder's People

Contributors

benatespina avatar gorkalaucirica avatar mktoast avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jagopg

patternlibrarybuilder's Issues

Add opinionated theme with default values

Currently CustomizeThemePass does not have any default values, and all values have to be customized. Having color groups such as 'primary-color' would be nice to have, to avoid writing same color multiple times.

Would be nice too, to extract HTML generation from compiler pass to a twig template.

Custom status colors

Allow adding via config a key value array defining colors for each status.

Example config:

lin3s_pattern_library_builder:
    theme:
         status:
             todo: '#f00'
             done: '#0f0'
             deprecated: '#000'

Allow adding a logo in the pattern-library header

At configuration level we need an option to add company logo with ease.

Suggested configuration:

lin3s_pattern_library_builder:
     theme:
          title: '@AppBundle/svg/logo.svg.twig'
          description: 'Design system'
          custom_styles: []
     templates_config_files_path: 'some-dir'

The goal is to make theme.title flexible to allow a simple string or a twig template that can render whatever the developer wants.

Maybe we can look for @ to paint the twig template, otherwise paint the title as string

Allow adding assets via configuration

We need to add the required stylesheets / javascript files to paint the components easily via configuration instead extending partial/javascript.html.twig or partial/stylesheets.html.twig

Twig extensions conflicts with apps implementing it

As we have some generic twig extension names such as 'icon' and 'find_icons' we can have some issues when pattern library is integrated in other applications.

Add a namespace (lin3s_pattern_library_*** for example) and replace occurrences of these function names

Unify theme config parameters in a single parameters for Controllers

Currently the following is passed to the template:

    return new Response($this->twig->render('@Lin3sPatternLibraryBuilder/pattern_library.html.twig', [
            'title' => $this->themeConfig->title(),
            'description' => $this->themeConfig->description(),
            'stylesheets' => $this->themeConfig->stylesheets(),
            'javascripts' => $this->themeConfig->javascripts(),
            'custom_styles' => $this->themeConfig->customStyles(),
            'logo' => $this->themeConfig->logo(),
            'menu' => $config->allInHierarchy(),
            'breadcrumbs' => $this->generateBreadcrumbs($slug),
            'content' => $content,
            'item' => $item['config']
        ]));

The values in theme config should be passed within the ThemeConfig class to the view.

Check all templates and renderers such as the TwigRenderer that also used this approach

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.