bootstrap-submenu
Project description
###django-bootstrap-submenu
[bootstrap-submenu examples](https://vsn4ik.github.io/bootstrap-submenu/#html-examples)
###说明:
因为是bootstrap组件,所以jquery、bootstrap等推介使用:
jquery - pip install jquery
bootstrap - pip install bootstrap_themes
它们的使用方式和当前组件一样。
###安装指南
下载或者clone当前仓库,然后在项目目录中执行:
python setup.py install
###使用指南:
```
settings.py
```
```
INSTALLED_APPS = (
'jquery',
'bootstrap_themes',
'bootstrap_submenu',
...
)
```
```
xxxx.html(模板文件使用)
```
```
{% load bootstrap_submenu%}
{% bootstrap_submenu_css%}
{% bootstrap_submenu_js%}
```
```
<div class="row">
<div class="col-sm-4 col-sm-offset-2 m-b">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" data-submenu>
Dropdown <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a tabindex="0">Action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li class="dropdown-submenu">
<a tabindex="0">Another sub action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
<li><a tabindex="0">Something else here</a></li>
<li class="disabled"><a tabindex="-1">Disabled action</a></li>
<li class="dropdown-submenu">
<a tabindex="0">Another action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown-header">Dropdown header</li>
<li class="dropdown-submenu">
<a tabindex="0">Another action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
<li><a tabindex="0">Something else here</a></li>
<li class="divider"></li>
<li><a tabindex="0">Separated link</a></li>
</ul>
</div>
</div>
</div>
<script>
$(function(){
$('[data-submenu]').submenupicker();//启动submenu组件
});
</script>
```
[bootstrap-submenu examples](https://vsn4ik.github.io/bootstrap-submenu/#html-examples)
###说明:
因为是bootstrap组件,所以jquery、bootstrap等推介使用:
jquery - pip install jquery
bootstrap - pip install bootstrap_themes
它们的使用方式和当前组件一样。
###安装指南
下载或者clone当前仓库,然后在项目目录中执行:
python setup.py install
###使用指南:
```
settings.py
```
```
INSTALLED_APPS = (
'jquery',
'bootstrap_themes',
'bootstrap_submenu',
...
)
```
```
xxxx.html(模板文件使用)
```
```
{% load bootstrap_submenu%}
{% bootstrap_submenu_css%}
{% bootstrap_submenu_js%}
```
```
<div class="row">
<div class="col-sm-4 col-sm-offset-2 m-b">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" data-submenu>
Dropdown <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a tabindex="0">Action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li class="dropdown-submenu">
<a tabindex="0">Another sub action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
<li><a tabindex="0">Something else here</a></li>
<li class="disabled"><a tabindex="-1">Disabled action</a></li>
<li class="dropdown-submenu">
<a tabindex="0">Another action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown-header">Dropdown header</li>
<li class="dropdown-submenu">
<a tabindex="0">Another action</a>
<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
<li><a tabindex="0">Something else here</a></li>
<li class="divider"></li>
<li><a tabindex="0">Separated link</a></li>
</ul>
</div>
</div>
</div>
<script>
$(function(){
$('[data-submenu]').submenupicker();//启动submenu组件
});
</script>
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-bootstrap-submenu-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95a73e41391dd84d3e522ed6355be722bad85396c4143387384e27225f5105e8 |
|
MD5 | ad649abfff21f023a248a2349116e76f |
|
BLAKE2b-256 | ad644594adfd9793a2fae9c7b76018809da0228b4c895b608d1e033a6cfaf408 |
Close
Hashes for django_bootstrap_submenu-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d2d890edadccd167a0db031468bd90fce759744886c2f0c3ff0a2254cd154f |
|
MD5 | af05d8caa365a9c20b68b6f3fea4df8f |
|
BLAKE2b-256 | 9209d1177206a31fb425a4cc12243cbaf4eb952df2cb8939d7f2b39c574aa591 |