Giter Site home page Giter Site logo

ogaty / pro-sidebar-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azouaoui-med/pro-sidebar-template

0.0 0.0 0.0 1.2 MB

Responsive layout with advanced sidebar menu built with SCSS and vanilla Javascript

Home Page: https://azouaoui-med.github.io/pro-sidebar-template

License: MIT License

JavaScript 22.76% CSS 5.30% HTML 35.84% Less 5.33% SCSS 30.78%

pro-sidebar-template's Introduction

Pro sidebar template

Responsive layout with advanced sidebar menu built with SCSS and vanilla Javascript

Demo

See it live

Screenshot

Pro Sidebar

Installation

# clone the repo
$ git clone https://github.com/azouaoui-med/pro-sidebar-template.git my-project

# go into app's directory
$ cd my-project

# install app's dependencies
$ yarn install

Usage

# serve with hot reload at localhost:8080
$ yarn start

# build app for production
$ yarn build

Documentation

Layout

The layout for this template is based on css pro layout package, please refer to the docs for more information

Sidebar

Responsive navigation element for building vertical menu items

Sidebar Image

Adding background image requires adding .has-bg-image class to sidebar component, and the image needs to be inside .image-wrapper component

<aside id="sidebar" class="sidebar break-point-lg has-bg-image">
  <div class="image-wrapper">
    <img src="assets/images/sidebar-bg.jpg" alt="sidebar background" />
  </div>
  <div class="sidebar-layout">
    <!-- Content here -->
  </div>
</aside>

Sidebar Layout

Sidebar comes with layout support for better organization of the inner structure

<aside id="sidebar" class="sidebar break-point-lg">
  <div class="sidebar-layout">
    <div class="sidebar-header">
      <!-- Header content here -->
    </div>
    <div class="sidebar-content">
      <!-- Content here -->
    </div>
    <div class="sidebar-footer">
      <!-- Footer content here -->
    </div>
  </div>
</aside>

More on the sidebar here

Menu

Wrapper component that groups all menu items

<nav class="menu">
  <!-- Content here -->
</nav>

Open current submenu

Use .open-current-submenu to enable opening only one submenu component at a time

<nav class="menu open-current-submenu">
  <!-- Content here -->
</nav>

Icon shape

A set of classes are provided to restyle menu icons

  • .icon-shape-square
  • .icon-shape-rounded
  • .icon-shape-circle
<nav class="menu icon-shape-circle">
  <!-- Content here -->
</nav>

Menu Item

Building menu item requires having .menu-item class in the wrapper and .menu-title for the text

<nav class="menu">
  <ul>
    <li class="menu-item">
      <a href="#">
        <span class="menu-title">menu text</span>
      </a>
    </li>
    <!-- More menu items -->
  </ul>
</nav>

Menu Icon

Use .menu-icon to add an icon to menu items

<nav class="menu">
  <ul>
    <li class="menu-item">
      <a href="#">
        <span class="menu-icon">
          <i class="ri-service-fill"></i>
        </span>
        <span class="menu-title">menu text</span>
      </a>
    </li>
    <!-- More menu items -->
  </ul>
</nav>

Prefix & Suffix

Menu item also supports having prefix and suffix components

<nav class="menu">
  <ul>
    <li class="menu-item">
      <a href="#">
        <span class="menu-icon">
          <i class="ri-service-fill"></i>
        </span>
        <span class="menu-prefix">prefix</span>
        <span class="menu-title">menu text</span>
        <span class="menu-suffix">suffix</span>
      </a>
    </li>
    <!-- More menu items -->
  </ul>
</nav>

Sub Menu

Add .sub-menu class to menu item and create a wrapper component with sub-menu-list class to group sub menu items

Its possible to have unlimited nesting menu items

<nav class="menu">
  <ul>
    <li class="menu-item sub-menu">
      <a href="#">
        <span class="menu-title">menu text</span>
      </a>
      <div class="sub-menu-list">
        <li class="menu-item">
          <a href="#">
            <span class="menu-title">sub menu text</span>
          </a>
        </li>
        <!-- More sub menu items -->
      </div>
    </li>
    <!-- More menu items -->
  </ul>
</nav>

Open default

Use .open class to have sub menu expanded by default

<nav class="menu">
  <ul>
    <li class="menu-item sub-menu open">
      <a href="#">
        <span class="menu-title">menu text</span>
      </a>
      <div class="sub-menu-list">
        <li class="menu-item">
          <a href="#">
            <span class="menu-title">sub menu text</span>
          </a>
        </li>
        <!-- More sub menu items -->
      </div>
    </li>
    <!-- More menu items -->
  </ul>
</nav>

Customization

Update SCSS variables in src/styles/_variables.scss to customize the template

$text-color: #b3b8d4;
$secondary-text-color: #dee2ec;
$bg-color: #0c1e35;
$secondary-bg-color: #0b1a2c;
$border-color: rgba(#535d7d, 0.3);
$sidebar-header-height: 64px;
$sidebar-footer-height: 64px;

License

This code is released under the MIT license.

pro-sidebar-template's People

Contributors

azouaoui-med avatar dependabot[bot] avatar weiserhei avatar techieff avatar

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.