+
Skip to content

armandtvz/front

Repository files navigation

front

A simple, lightweight front-end framework. This project is heavily influenced by IBM's Carbon.

Why does this project exist?

  • This framework aims to be lighter than a big framework but larger than a micro framework.
  • I needed a framework for myself that is highly opinionated so I can get work done faster.

CSS reset

This framework uses Normalize.css as a CSS reset (v8).

Grid

The Bootstrap grid is used (Bootstrap 5).

Quickstart

  1. Copy the files from the dist directory. Or use jsDelivr:

    https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front.min.css
    https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front_head.min.js
    https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front_body.min.js   
    https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front.min.js
  2. Add front.min.css to the <head> tag before your other styles.

    <head>
            <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front.min.css">
    
            <!-- ... -->
    </head>
  3. Add front_head.min.js before the closing <head> tag if you need browser JS detection or if you need a constant that stores the detected websocket protocol that should be used (wss: when https: and ws: when http:). The value is stored in ws.scheme:

    console.log(ws.scheme);
    <head>
            <!-- ... -->
    
            <script src="https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front_head.min.js" charset="utf-8"></script>
    </head>

    Also, for JS browser detection add the no-js class to the <html> tag. no-js will be replaced with js when Javascript is supported or when not disabled in the browser. Modernizr is used for this.

    <html class="no-js">
    </html>
  4. Add front_body.min.js after the opening <body> tag for dark/light theme related scripts. This script checks the prefers-color-scheme: dark and prefers-color-scheme: light media queries and sets the class on the <body> tag accordingly.

    /* CSS class used for dark theme */
    .dark-theme {}
    <body>
            <script src="https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front_body.min.js" charset="utf-8"></script>
    
            <!-- ... -->
    </body>
  5. Add front.min.js before the closing <body> tag for all other scripts.

    <body>
            <script src="https://cdn.jsdelivr.net/gh/armandtvz/front@1.0.x/dist/front.min.js" charset="utf-8"></script>
    
            <!-- ... -->
    </body>

Compatiblity

This framework does not support Internet Explorer or Opera Mini.

Versioning

This project follows semantic versioning (SemVer).

License and code of conduct

Check the root of the repo for these files.

About

A simple, lightweight front-end framework. This project is heavily influenced by IBM's Carbon.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载