django-kss-styleguide 0.5.9
pip install django-kss-styleguide
Released:
A simple Django app to make styleguide
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD License)
- Author: Tim Hsu
Classifiers
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
Help you launch your style guide site with django in KSS syntax. you can integrate the style giude in your site easily. I use it every day. feel free to give me any suggestion.
I now change the name to django-kss-styleguide https://pypi.python.org/pypi/django-kss-styleguide/
start
pip install django-kss-styleguide
Settings
in yout settings.py
Add the app,
INSTALLED_APPS += (
"compressor",
"django_kss",
)
Related Settings
in settings.py
because scss is very common, we support it via djagno compressor Add setting about django compressor.
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
)
# Django Compressor for development. so it can put image to correct place
COMPRESS_ENABLED = True
COMPRESS_REBUILD_TIMEOUT = 0
STATIC_ROOT = '/tmp/root'
in your app.
add filename called styleguide.py in your app.
styleguide = {
'source_dir': 'static/css',
'verbose_name': 'Sample APP2', #Optional
'target_files': 'static/css/form.scss' # optional
}
source_dir: Where you write you kss comment and css files
verbose_name: Your app name
target_files: If you use scss, put the scss file you want to compile
urls.py settings
Routing, add the following two lines in your project’s urls.py
import:
import django_kss.urls
add the url patterns:
url(r'^$', include(django_kss.urls)),
html
for F2E or designer
put your complete html in templates/prototype/
you can view it automatically in the site
Writing The KSS in your scss/less/css file
/*
Buttons
Styleguide 1
*/
/*
Your standard form button.
.btn-danger - danger
.btn-warning - warning
.btn-info - info
Example:
<button class="liftedBtn $modifier_class" >按鈕</button>
Styleguide 1.1
*/
.liftedBtn{
@extend .btn;
position: relative;
border-width: 0;
letter-spacing: 1px;
border-bottom-color: rgba(30,30,30,0.3);
border-bottom-width: 0;
transition: all 0.2s;
bottom: 0;
&:hover{
bottom: $strong-border-width;
border-bottom-width: $strong-border-width;
}
}
One More Things
the base template is already integrate livereload.
to utilize livereload,
sudo pip install livereload
and type ‘livereload .’ in you repository root.
you can see all the braowser will reflect your change
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD License)
- Author: Tim Hsu
Classifiers
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
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
File details
Details for the file django-kss-styleguide-0.5.9.tar.gz
.
File metadata
- Download URL: django-kss-styleguide-0.5.9.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fa936449e4fb1a8341555daee046b6797bbf9bf62dc08614037e6653e898fbe |
|
MD5 | c998268fbe08ac201174a37814922b56 |
|
BLAKE2b-256 | 401db25891b166857fbef2237de373c535cf72639b59ea225951677186958479 |
File details
Details for the file django-kss-styleguide-0.5.9.macosx-10.10-intel.tar.gz
.
File metadata
- Download URL: django-kss-styleguide-0.5.9.macosx-10.10-intel.tar.gz
- Upload date:
- Size: 92.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b317d2b7cc19f2b6966f6569ac5183d91a55a13c49814ef28197f29c7dc6b7a4 |
|
MD5 | fd7fe43f66389488fc24c62a539dc3ae |
|
BLAKE2b-256 | ba5a5930683d7a6e230cd072151b52e1390930b8ed2c8f6efec3e7d4ba4d6780 |