Initial commit with contributors

remotes/origin/artem
Gena 11 years ago
commit be6edb72e7
  1. 26
      .idea/batiskaf.iml
  2. 18701
      .idea/dataSources.ids
  3. 11
      .idea/dataSources.local.xml
  4. 19
      .idea/dataSources.xml
  5. 4
      .idea/encodings.xml
  6. 7
      .idea/inspectionProfiles/Project_Default.xml
  7. 7
      .idea/inspectionProfiles/profiles_settings.xml
  8. 4
      .idea/misc.xml
  9. 8
      .idea/modules.xml
  10. 5
      .idea/scopes/scope_settings.xml
  11. 6
      .idea/vcs.xml
  12. 1435
      .idea/workspace.xml
  13. 0
      api/__init__.py
  14. BIN
      api/__pycache__/__init__.cpython-34.pyc
  15. BIN
      api/__pycache__/urls.cpython-34.pyc
  16. BIN
      api/__pycache__/views.cpython-34.pyc
  17. 3
      api/admin.py
  18. 0
      api/migrations/__init__.py
  19. 3
      api/models.py
  20. 3
      api/tests.py
  21. 15
      api/urls.py
  22. 10
      api/views.py
  23. 28
      batiskaf.sublime-project
  24. 1482
      batiskaf.sublime-workspace
  25. 0
      batiskaf/__init__.py
  26. BIN
      batiskaf/__pycache__/__init__.cpython-34.pyc
  27. BIN
      batiskaf/__pycache__/admin.cpython-34.pyc
  28. BIN
      batiskaf/__pycache__/celery.cpython-34.pyc
  29. BIN
      batiskaf/__pycache__/jinja2.cpython-34.pyc
  30. BIN
      batiskaf/__pycache__/models.cpython-34.pyc
  31. BIN
      batiskaf/__pycache__/settings.cpython-34.pyc
  32. BIN
      batiskaf/__pycache__/urls.cpython-34.pyc
  33. BIN
      batiskaf/__pycache__/wsgi.cpython-34.pyc
  34. 22
      batiskaf/celery.py
  35. 16
      batiskaf/jinja2.py
  36. 1
      batiskaf/jinja2_ext/__init__.py
  37. BIN
      batiskaf/jinja2_ext/__pycache__/__init__.cpython-34.pyc
  38. BIN
      batiskaf/jinja2_ext/__pycache__/cart.cpython-34.pyc
  39. BIN
      batiskaf/jinja2_ext/__pycache__/thumbnails.cpython-34.pyc
  40. 5
      batiskaf/jinja2_ext/cart.py
  41. 7
      batiskaf/jinja2_ext/thumbnails.py
  42. 212
      batiskaf/settings.py
  43. 306
      batiskaf/templates/jinja2/base.jinja
  44. 68
      batiskaf/templates/jinja2/cart_detail.jinja
  45. 133
      batiskaf/templates/jinja2/category.jinja
  46. 55
      batiskaf/templates/jinja2/includes/category_filter.jinja
  47. 236
      batiskaf/templates/jinja2/index.jinja
  48. 80
      batiskaf/templates/jinja2/product.jinja
  49. 10
      batiskaf/urls.py
  50. 15
      batiskaf/wsgi.py
  51. 0
      main/__init__.py
  52. BIN
      main/__pycache__/__init__.cpython-34.pyc
  53. BIN
      main/__pycache__/admin.cpython-34.pyc
  54. BIN
      main/__pycache__/models.cpython-34.pyc
  55. BIN
      main/__pycache__/views.cpython-34.pyc
  56. 0
      main/admin.py
  57. 99
      main/migrations/0001_initial.py
  58. 24
      main/migrations/0002_auto_20150328_1422.py
  59. 25
      main/migrations/0003_auto_20150328_1428.py
  60. 20
      main/migrations/0004_auto_20150328_1429.py
  61. 24
      main/migrations/0005_auto_20150328_1452.py
  62. 86
      main/migrations/0006_auto_20150328_1507.py
  63. 0
      main/migrations/__init__.py
  64. BIN
      main/migrations/__pycache__/0001_initial.cpython-34.pyc
  65. BIN
      main/migrations/__pycache__/0002_auto_20150328_1422.cpython-34.pyc
  66. BIN
      main/migrations/__pycache__/0003_auto_20150328_1428.cpython-34.pyc
  67. BIN
      main/migrations/__pycache__/0004_auto_20150328_1429.cpython-34.pyc
  68. BIN
      main/migrations/__pycache__/0005_auto_20150328_1452.cpython-34.pyc
  69. BIN
      main/migrations/__pycache__/0006_auto_20150328_1507.cpython-34.pyc
  70. BIN
      main/migrations/__pycache__/__init__.cpython-34.pyc
  71. 0
      main/models.py
  72. 3
      main/tests.py
  73. 5
      main/views.py
  74. 10
      manage.py
  75. BIN
      myapp_models.png
  76. 54
      static/bower_components/Bootflat/.bower.json
  77. 144
      static/bower_components/Bootflat/Gruntfile.js
  78. 21
      static/bower_components/Bootflat/LICENSE
  79. 105
      static/bower_components/Bootflat/README.markdown
  80. 19
      static/bower_components/Bootflat/_config.yml
  81. 7
      static/bower_components/Bootflat/bootflat/css/bootflat.css.map
  82. 18
      static/bower_components/Bootflat/bootflat/css/bootflat.min.css
  83. BIN
      static/bower_components/Bootflat/bootflat/img/check_flat/default.png
  84. BIN
      static/bower_components/Bootflat/bootflat/img/check_flat/default.psd
  85. 11
      static/bower_components/Bootflat/bootflat/js/icheck.min.js
  86. 9
      static/bower_components/Bootflat/bootflat/js/jquery.fs.selecter.min.js
  87. 9
      static/bower_components/Bootflat/bootflat/js/jquery.fs.stepper.min.js
  88. 40
      static/bower_components/Bootflat/bootflat/scss/bootflat.scss
  89. 76
      static/bower_components/Bootflat/bootflat/scss/bootflat/_accordion.scss
  90. 75
      static/bower_components/Bootflat/bootflat/scss/bootflat/_alert.scss
  91. 121
      static/bower_components/Bootflat/bootflat/scss/bootflat/_breadcrumb.scss
  92. 205
      static/bower_components/Bootflat/bootflat/scss/bootflat/_button.scss
  93. 133
      static/bower_components/Bootflat/bootflat/scss/bootflat/_button_group.scss
  94. 134
      static/bower_components/Bootflat/bootflat/scss/bootflat/_calendar.scss
  95. 67
      static/bower_components/Bootflat/bootflat/scss/bootflat/_checkbox_radio.scss
  96. 122
      static/bower_components/Bootflat/bootflat/scss/bootflat/_dropdown.scss
  97. 82
      static/bower_components/Bootflat/bootflat/scss/bootflat/_footer.scss
  98. 212
      static/bower_components/Bootflat/bootflat/scss/bootflat/_form.scss
  99. 239
      static/bower_components/Bootflat/bootflat/scss/bootflat/_global.scss
  100. 84
      static/bower_components/Bootflat/bootflat/scss/bootflat/_jumbotron.scss
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="batiskaf/settings.py" />
<option name="manageScript" value="manage.py" />
<option name="environment" value="&lt;map/&gt;" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.4.3 virtualenv at ~/Programming/BatiskafENV" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/templates" />
</list>
</option>
</component>
</module>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal">
<data-source name="Django default" uuid="a0d744d4-223a-4a9f-89be-39d785e938c0">
<user-name>batiskaf</user-name>
<user-password>dfc8dfcbdfdedfc3dfd9dfc1dfcbdfcc</user-password>
<schema-pattern>batiskaf.pg_catalog batiskaf.public</schema-pattern>
<default-schemas>batiskaf.pg_catalog batiskaf.public</default-schemas>
</data-source>
</component>
</project>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" hash="3247979745">
<data-source source="LOCAL" name="Django default" uuid="a0d744d4-223a-4a9f-89be-39d785e938c0">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://127.0.0.1:5432/batiskaf</jdbc-url>
<libraries>
<library>
<url>file://$USER_HOME$/Library/Preferences/PyCharm20/jdbc-drivers/postgresql-driver-license.txt</url>
</library>
<library>
<url>file://$USER_HOME$/Library/Preferences/PyCharm20/jdbc-drivers/postgresql-9.1-901.jdbc3.jar</url>
</library>
</libraries>
</data-source>
</component>
</project>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="TaskInspection" enabled="false" level="INFO" enabled_by_default="false" />
</profile>
</component>

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.3 virtualenv at ~/Programming/BatiskafENV" project-jdk-type="Python SDK" />
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/batiskaf.iml" filepath="$PROJECT_DIR$/.idea/batiskaf.iml" />
</modules>
</component>
</project>

@ -0,0 +1,5 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

@ -0,0 +1,15 @@
from django.conf.urls import url, include
from .views import *
from rest_framework import routers
# Serializers define the API representation.
# Routers provide an easy way of automatically determining the URL conf.
router = routers.DefaultRouter()
router.register(r'cart', CartViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
url(r'^', include(router.urls)),
]

@ -0,0 +1,10 @@
from rest_framework import serializers, viewsets
class CartSerializer(serializers.Serializer):
session = serializers.CharField(max_length=500)
items = serializers.CharField(max_length=500)
class CartViewSet(viewsets.ViewSet):
serializer_class = CartSerializer

@ -0,0 +1,28 @@
{
"build_systems":
[
{
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"name": "Anaconda Python Builder",
"selector": "source.python",
"shell_cmd": "/Users/spacenergy/Programming/BatiskafENV/bin/python -u \"$file\""
}
],
"folders":
[
{
"follow_symlinks": true,
"path": "."
}
],
"settings":
{
"anaconda_linting": true,
"anaconda_linting_behaviour": "always",
"pep257": false,
"python_interpreter": "/Users/spacenergy/Programming/BatiskafENV/bin/python",
"test_command": "python -m unittest discover",
"use_pylint": false,
"validate_imports": true
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,22 @@
from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'batiskaf.settings')
app = Celery('batiskaf')
# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.request))

@ -0,0 +1,16 @@
from django.contrib.staticfiles.storage import staticfiles_storage
from django.core.urlresolvers import reverse
from batiskaf.jinja2_ext.thumbnails import thumbnail
from batiskaf.jinja2_ext.cart import cart
from jinja2 import Environment
def environment(**options):
env = Environment(**options)
env.globals.update({
'static': staticfiles_storage.url,
'url': reverse,
})
env.filters['thumbnail'] = thumbnail
env.filters['cart'] = cart
return env

@ -0,0 +1 @@
__author__ = 'OG'

@ -0,0 +1,5 @@
from store.cart import Cart
def cart(request):
return Cart(request)

@ -0,0 +1,7 @@
from easy_thumbnails.files import get_thumbnailer
def thumbnail(img, size='420x420'):
weight, height = size.split('x')
options = {'size': (int(weight), int(height)), 'crop': 'upscale'}
return get_thumbnailer(img).get_thumbnail(options)

@ -0,0 +1,212 @@
"""
Django settings for batiskaf project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.contrib.messages import constants as messages
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '3s+98l&+j1d=)t2u86wc)f&v*(hs0fv^xz@ockpq=d(#ncm9yi'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
MESSAGE_TAGS = {
messages.INFO: 'info',
messages.WARNING: 'warning',
messages.ERROR: 'error',
messages.SUCCESS: 'success',
}
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.postgres',
'django_extensions',
'rest_framework',
'easy_thumbnails',
'bootstrap3',
'batiskaf',
'main',
'store',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'batiskaf.urls'
WSGI_APPLICATION = 'batiskaf.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'batiskaf',
'USER': 'batiskaf',
'PASSWORD': 'batiskaf',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'ru'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/
MEDIA_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = '/static/'
STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder"
]
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "batiskaf/templates"), ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.core.context_processors.request",
"django.contrib.messages.context_processors.messages",
)
},
},
{
'BACKEND': 'django.template.backends.jinja2.Jinja2',
'DIRS': [os.path.join(BASE_DIR, "batiskaf/templates/jinja2"), ],
'OPTIONS': {
'environment': 'batiskaf.jinja2.environment',
}
},
]
BOOTSTRAP3 = {
# The complete URL to the Bootstrap CSS file (None means derive it from
# base_url)
'css_url': None,
# The complete URL to the Bootstrap CSS file (None means no theme)
'theme_url': None,
# The complete URL to the Bootstrap JavaScript file (None means derive it
# from base_url)
'javascript_url': None,
# Put JavaScript in the HEAD section of the HTML document (only relevant
# if you use bootstrap3.html)
'javascript_in_head': False,
# Include jQuery with Bootstrap JavaScript (affects django-bootstrap3
# template tags)
'include_jquery': False,
# Label class to use in horizontal forms
'horizontal_label_class': 'col-xs-2',
# Field class to use in horizontal forms
'horizontal_field_class': 'col-xs-10',
# Set HTML required attribute on required fields
'set_required': True,
# Set placeholder attributes to label if no placeholder is provided
'set_placeholder': True,
# Class to indicate required (better to set this in your Django form)
'required_css_class': '',
# Class to indicate error (better to set this in your Django form)
'error_css_class': 'has-error',
# Class to indicate success, meaning the field has valid input (better to
# set this in your Django form)
'success_css_class': 'has-success',
# Renderers (only set these if you have studied the source and understand
# the inner workings)
'formset_renderers': {
'default': 'bootstrap3.renderers.FormsetRenderer',
},
'form_renderers': {
'default': 'bootstrap3.renderers.FormRenderer',
},
'field_renderers': {
'default': 'bootstrap3.renderers.FieldRenderer',
'inline': 'bootstrap3.renderers.InlineFieldRenderer',
},
}
BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_SEND_TASK_ERROR_EMAILS = True
if DEBUG:
EMAIL_BACKEND = 'main.backends.email_backends.EmailBackend'
EMAIL_FILE_PATH = 'tmp/eml/'
GRAPPELLI_ADMIN_TITLE = 'Батискаф'
GRAPPELLI_SWITCH_USER = True
GRAPPELLI_CLEAN_INPUT_TYPES = False

@ -0,0 +1,306 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{% block title %}Батискаф{% endblock %}</title>
<meta name="description" content="{% block meta_description %}{% endblock %}">
<meta name="author" content="Sitio">
<!-- Bootstrap -->
<link href="/static/bower_components/Bootflat/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/bower_components/Bootflat/bootflat/css/bootflat.min.css" rel="stylesheet">
<link href="/static/less/_.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/static/bower_components/sweetalert/lib/sweet-alert.css">
<link href="/static/js/icheck/skins/square/blue.css" rel="stylesheet">
{% block stylesheet %}{% endblock stylesheet %}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container-fluid header-top">
<div class="container">
<div class="top-left-links"><a href="#">Оплата</a> | <a href="#">Доставка</a> | <a href="#">Помощь</a> | <a href="#">Контакты</a></div>
<div class="top-right-links">В Усть-Каменогорске: <span class="yellow">+7 (812) 921-78-12</span> | В Алматы: <span class="yellow">8-800-555-78-12</span> |
<a href="#">Написать нам</a> | <a href="#"><img src="/static/img/skype.png" alt="" width="20" height="20"/></a>
</div>
</div>
</div>
<div class="container-fluid header-middle">
<div class="container">
<div class="logo-container">
<a href="/"><img src="/static/img/logo.png" alt="" width="457" height="104"/></a>
</div>
<div class="quick-access-container">
<form action="">
<input type="text" placeholder="Что ищем?"/> <button type="submit"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
</form>
<p class="small-welcome">Добро пожаловать в интернет-магазин Батискаф!</p>
<p class="quick-links"><a href="#">Мой аккаунт</a> | <a href="#">Новости</a> | <a href="/store/cart/">Моя корзина {% if (request|cart).items|length > 0 %}<span class="label label-success">{{ (request|cart).items|length }}</span>{% endif %}</a> | <a href="#">Оформление заказа</a> | <a href="#">Войти</a></p>
</div>
</div>
</div>
<div class="container-fluid navbar-container" id="shop-categories" data-spy="affix" data-offset-top="170">
<div class="navbar navbar-inverse yamm navbar-static-top">
<div class="container">
<div class="navbar-header">
<a href="/" class="navbar-brand"><span class="glyphicon glyphicon-home" aria-hidden="true"></span></a>
</div>
<div>
<ul class="nav navbar-nav">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Подводная охота</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="/store/spearfishing/spearguns/">Ружья</a></li>
<li><a href="#">Пневматика</a></li>
<li><a href="/store/spearfishing/spearguns/arbalets/">Арбалеты</a></li>
<li><a href="#">Карбоновые арбалеты</a></li>
</ul>
<ul>
<li><a class="title" href="#">Аксессуары к ружьям</a></li>
<li><a href="#">Гарпуны</a></li>
<li><a href="#">Наконечники</a></li>
<li><a href="#">Катушки</a></li>
<li><a href="#">Линь</a></li>
<li><a href="#">Амортизаторы</a></li>
<li><a href="#">Заряжалки</a></li>
<li><a href="#">Запчасти</a></li>
<li><a href="#">Тяжи и зацепы</a></li>
<li><a href="#">Прочее</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Неопрен</a></li>
<li><a href="#">Гидрокостюмы</a></li>
<li><a href="#">Перчатки</a></li>
<li><a href="#">Носки</a></li>
</ul>
<ul>
<li><a class="title" href="#">Экипировка</a></li>
<li><a href="#">Маски</a></li>
<li><a href="#">Ласты</a></li>
<li><a href="#">Трубки</a></li>
<li><a href="#">Куканы</a></li>
<li><a href="#">Сумки</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Грузовые системы</a></li>
<li><a href="#">Ремни</a></li>
<li><a href="#">Грузы</a></li>
<li><a href="#">Жилеты</a></li>
</ul>
<ul>
<li><a class="title" href="#">Приборы</a></li>
<li><a href="#">Компьютеры</a></li>
<li><a href="#">Компасы</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Фонари</a></li>
<li><a href="#">На батарейках</a></li>
<li><a href="#">Аккумуляторные</a></li>
</ul>
<ul>
<li><a class="title" href="#">Безопасность</a></li>
<li><a href="#">Ножи</a></li>
<li><a href="#">Буи, плотики</a></li>
</ul>
</div>
</div>
</div>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Дайвинг</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Фридайвинг</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Отдых на воде</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Распродажа</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Детям</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Для бассейна</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Подарочный сертификат</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container main-container">
{% block content %}
{% endblock %}
</div>
<footer class="footer">
<div class="container-fluid footer-top">
</div>
<div class="container-fluid footer-bottom">
<div class="container">
<div class="row">
<div class="footer-col col-xs-4">
<span class="title">О НАС</span><br/><br/>
<div class="row">
<div class="col-xs-6">
<a href="#">Сеть Батискаф</a><br/>
<a href="#">Магазины</a><br/>
<a href="#">Наши бренды</a><br/>
<a href="#">Новости</a><br/>
</div>
<div class="col-xs-6">
<a href="#">Контакты</a><br/>
<a href="#">Обратная связь</a><br/>
<a href="#">Журнал</a><br/>
<a href="#">Франчайзинг</a><br/>
</div>
</div>
</div>
<div class="footer-col col-xs-4">
<span class="title">ОБСЛУЖИВАНИЕ КЛИЕНТОВ</span><br/><br/>
<div class="row">
<div class="col-xs-6">
<a href="#">Доставка</a><br/>
<a href="#">Оплата</a><br/>
<a href="#">Система скидок</a><br/>
</div>
<div class="col-xs-6">
<a href="#">Сервис</a><br/>
<a href="#">Возврат и возмещение</a><br/>
<a href="#">Правила и условия</a><br/>
<a href="#">Помощь</a><br/>
</div>
</div>
</div>
<div class="footer-col col-xs-4 text-center col-last">
<span class="title">МЫ В ИНТЕРНЕТЕ</span><br/><br/>
<div class="row">
Кнопочки социалок
</div>
</div>
</div>
<br/><br/>
<p>
<a href="#">Карта сайта</a> &nbsp;|&nbsp; <a href="#">Поисковые запросы</a> &nbsp;|&nbsp; <a href="#">Расширенный Поиск</a> &nbsp;|&nbsp; <a href="#">Контакты</a> &nbsp;|&nbsp; <a href="#">RSS</a> &nbsp;|&nbsp; <a href="#">Privacy Policy</a>
</p><br/>
<p>
<a href="#">Карта сайта</a> <a href="#">Поисковые запросы</a> <a href="#">Advanced Search</a> <a
href="#">Contact Us</a> <a href="#">RSS</a>
</p><br/>
<p>
Все права защищены 2001-2014 © компанией Батискаф <br/>
ООО "Батискаф” ИНН 7801565397 ОГРН 1127847046964 от 23.01.2012г. <br/>
Юрид.адрес: 199155 г.Санкт-Петербург Морская наб. д.33 лит.А пом.13Н
</p>
</div>
</div>
</footer>
{% if request._messages %}
<ul class="messages">
{% for message in request._messages %}
<li{% if message.tags %} data-type="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
{% endfor %}
</ul>
{% endif %}
{% block footer_scripts %}
<script src="/static/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/icheck.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/jquery.fs.selecter.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/jquery.fs.stepper.min.js"></script>
<script src="/static/bower_components/sweetalert/lib/sweet-alert.min.js"></script>
<script src="/static/js/icheck/icheck.min.js"></script>
<script src="/static/js/jquery.ba-bbq.min.js"></script>
<script src="/static/js/jquery.zoom.min.js"></script>
<script src="/static/js/Selecter/jquery.fs.selecter.min.js"></script>
<script src="/static/js/_.js"></script>
{% endblock footer_scripts %}
{% block jss %}{% endblock jss %}
{% if messages %}
<script>
{% for message in messages %}
swal("", "{{ message }}", "{{ message.tags|default('success') }}");
{% endfor %}
</script>
{% endif %}
</body>
</html>

@ -0,0 +1,68 @@
{% extends 'base.jinja' %}
{% block content %}
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
<li class="active"><span>Корзина</span></li>
</ol>
</div>
<div class="row">
<h3>Корзина товаров</h3><br/>
{% if cart.items %}
<div class="panel panel-default">
<form action="" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
<table class="table table-hover table-cart ">
<thead>
<tr>
<th>Фото</th>
<th>Наименование</th>
<th>Цена за единицу</th>
<th>Количество</th>
<th>Итого</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
{% for item in cart.items %}
<tr>
<td class="text-center">
{% set im = item.item.product.main_image()|thumbnail("80x80") %}
<a href="{{ item.item.product.get_absolute_url() }}" ><img src="/static/{{ im.url }}" alt="" class="img-thumbnail"/></a>
</td>
<td><a href="{{ item.item.product.get_absolute_url() }}" >{{ item.item.product.title }}</a></td>
<td class="text-right">{{ item.item.price }} ₸</td>
<td class="text-right"><input type="number" value="{{ item.count }}" name="{{ item.id }}" class="form-control col-xs-1"/>
</td>
<td class="text-right">{{ item.subtotal }} ₸</td>
<td class="text-center">
<a class="text-danger" href="/store/cart/remove/?id={{ item.id }}"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="5" class="text-right table-cart-itogo">Итого: {{ cart.total }} ₸</th>
<th class="text-center"><button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-repeat"></span> Пересчитать</button></th>
</tr>
</tfoot>
</table>
</form>
</div>
{% else %}
<div class="alert alert-warning alert-dismissable">
<h4>Ваша корзина пуста</h4>
<p>Вы еще ничего не добавляли в корзину. Выберите товары и добавьте их в корзину для дальнейшего оформления покупки.</p>
<p><a class="btn btn-warning" href="/">Перейти на главную страницу</a></p>
</div>
{% endif %}
</div>
{% endblock %}

@ -0,0 +1,133 @@
{% extends 'base.jinja' %}
{% block content %}
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
{% for parent in category.get_parents() %}
<li><a href="{{ parent.get_absolute_url() }}">{{ parent.title }}</a></li>
{% endfor %}
<li class="active"><span>{{ category.title }}</span></li>
</ol>
</div>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="panel panel-default panel-filter">
<div class="panel-heading">
<h3 class="panel-title">Фильтрация товаров</h3>
</div>
<div class="panel-body">
{% include 'includes/category_filter.jinja' with context %}
</div>
</div>
</div>
<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 index-goods category-items">
<div class="category-paginator">
<div class="category-paginator-top">
<div class="row">
<div class="col-xs-4">С {{ products.start_index() }} до {{ products.end_index() }} из {{ products.paginator.count }}</div>
<div class="col-xs-4 text-center paginate">Страница: {% if products.has_previous() %}<a href="?page={{ products.previous_page_number() }}">&larr;</a>{% endif %}
{% for page in products.paginator.page_range %}
{% if page == products.number %}
{{ page }}
{% else %}
<a href="?page={{ page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if products.has_next() %}
<a href="?page={{ products.next_page_number() }}">&rarr;</a>
{% endif %}</div>
<div class="col-xs-4 text-right">Показать
<select name="show-count" id="">
<option value="10">10</option>
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="all">Все</option>
</select>
на странице</div>
</div>
</div>
<div class="category-paginator-bottom">
<div class="row">
<div class="col-xs-6"></div>
<div class="col-xs-6 text-right">Сортировать по
<select name="products-sort" id="">
<option value="-date">Дате добавления &darr;</option>
<option value="date">Дате добавления &uarr;</option>
<option value="-price">Цене &darr;</option>
<option value="price">Цене &uarr;</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
{% if products %}
{% for product in products %}
<div class="col-md-4 col-xs-4 col-sm-4 col-lg-4">
<div class="thumbnail">
{% set im = product.main_image()|thumbnail("420x420") %}
<a href="{{ product.get_absolute_url() }}"><img src="/static/{{ im.url }}"
class="img-responsive"></a>
<div class="caption">
<div class="title">
<a href="{{ product.get_absolute_url() }}">
{{ product.title }}
</a>
</div>
<div class="price">
{{ product.min_price() }} ₸
</div>
{% if product.in_stock() %}
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
{% else %}
<div class="state-no">
{# TODO: Товар на заказ#}
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара нет в наличии
</div>
{% endif %}
<div class="in-cart">
{# TODO: Сделать кнопку заказать#}
{% if product.in_stock() %}
<a class="btn btn-warning btn-block" href="/store/cart/add/?pk={{ product.variations.filter(in_stock__gt=0).order_by('price').first().pk }}&count=1&next={{ request.get_full_path()|urlencode }}"><span><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</span></a>
{% else %}
<a class=" btn btn-danger btn-block" href="#"><span><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Заказать</span></a>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="alert alert-warning alert-dismissable">
<h4>Список товаров пуст</h4>
<p>Товары в данной категории или с выбранными параметрами отсутствуют. Выберите другую категорию, либо сбросьте фильтр параметров.</p>
<p><a class="btn btn-warning" href="/">Перейти на главную страницу</a> <a class="btn btn-link" href="{{ category.get_absolute_url() }}">или отменить фильтрацию</a></p>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}

@ -0,0 +1,55 @@
{% if category.childs.all() %}
<div class="category-filter-title">&rarr;&nbsp;&nbsp;&nbsp;Категории</div>
<ul class="attr-filter">
{% for child in category.childs.all() %}
<li>
<a href="{{ child.get_absolute_url() }}">{{ child.title }}</a>
</li>
{% endfor %}
</ul>
<hr class="dashed"/>
{% endif %}
<div class="category-filter-title">&rarr;&nbsp;&nbsp;&nbsp;Производитель</div>
<ul class="attr-filter">
{% for choise in category.brands() %}
<li>
<label><input type="checkbox" name="brand[{{ loop.index0 }}]" value="{{ choise.pk }}"
{% if choise.pk.__str__() in request.GET.getlist('brand[]') %}
checked="checked"
{% endif %}
/> {{ choise }}</label>
</li>
{% endfor %}
</ul>
{% for attr in category.attr_cat.all() %}
<hr class="dashed"/>
<div class="category-filter-title">&rarr;&nbsp;&nbsp;&nbsp;{{ attr.attribute.title }}</div>
{% if attr.field_type == 'select' %}
<ul class="attr-filter">
{% for choise in attr.choises_array %}
<li>
<label><input type="checkbox" name="{{ attr.attribute.slug }}[{{ loop.index0 }}]" value="{{ choise }}"
{% if choise in request.GET.getlist('%s[]'|format(attr.attribute.slug)) %}
checked="checked"
{% endif %}/> {{ choise }}</label>
</li>
{% endfor %}
</ul>
{% else %}
<ul class="attr-filter">
{% for value in attr.get_posible_values %}
<li>
<label><input type="checkbox" name="{{ attr.attribute.slug }}[{{ loop.index0 }}]" value="{{ value }}"/> {{ value }}</label>
</li>
{#TODO: Сделать разбор по фильтрам для стринга #}
{% endfor %}
</ul>
{% endif %}
{% endfor %}

@ -0,0 +1,236 @@
{% extends 'base.jinja' %}
{% block content %}
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
<li data-target="#carousel-example-generic" data-slide-to="5"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="/static/img/banner1.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner2.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner3.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner4.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner5.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner6.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Назад</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Вперед</span>
</a>
</div>
<div class="index-goods">
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop1.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>STORM 3 мм женский, розовый
</a>
</div>
<div class="price">
6 170,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop2.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм TX2 BZ <br/>5 мм мужской, оранжевый
</a>
</div>
<div class="price">
13 190,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop3.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>SCORPENA A, 9 мм
</a>
</div>
<div class="price">
9 000,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop4.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>SCORPENA А, 7 мм
</a>
</div>
<div class="price">
8 400,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop5.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Ружье <br/>Marlin Oceania
</a>
</div>
<div class="price">
19 425,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop6.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Экшн камера <br/>Polaroid Cube синяя
</a>
</div>
<div class="price">
6 800,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop7.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Экшн камера <br/>Polaroid Cube красная
</a>
</div>
<div class="price">
6 800,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop8.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>Marlin Prestige 5 мм
</a>
</div>
<div class="price">
20 990,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

@ -0,0 +1,80 @@
{% extends 'base.jinja' %}
{% block content %}
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
{% for parent in category.get_parents() %}
<li><a href="{{ parent.get_absolute_url() }}">{{ parent.title }}</a></li>
{% endfor %}
<li class=""><a href="{{ category.get_absolute_url() }}">{{ category.title }}</a></li>
<li class="active"><span>{{ product.title }}</span></li>
</ol>
</div>
<div class="row">
<div class="product-thumbnails col-xs-6">
<div class="product-min-thumbnails col-xs-2">
{% for image in product.images.all() %}
{% set im = image.image|thumbnail("80x80") %}
{% set im_big = image.image|thumbnail("398x398") %}
<a href="/static/{{ im_big.url }}" data-big-url="/static/{{ image.image.url }}"><img src="/static/{{ im.url }}" alt="" class="img-thumbnail"/></a>
{% endfor %}
</div>
<div class="product-big-thumbnail col-xs-10">
<div class="product-big-thumbnail-container">
{% set im = product.main_image()|thumbnail("398x398") %}
<a href="/static/{{ product.main_image().url }}" id="product-big-image-url">
<img src="/static/{{ im.url }}" alt="" class=""/>
</a>
</div>
</div>
</div>
<div class="col-xs-6 product-short-description">
<h4>{{ product.title }}</h4> <br/>
<div class="product-detail-price">
<span class="product-detail-price-span">{{ product.min_price() }}</span> ₸</div>
<br/>
{% set variant = product.variations.filter(in_stock__gt=0).order_by('price').first() %}
{% if not variant %}
{% set variant = product.variations.order_by('price').first() %}
{% endif %}
<div class="product-variations">
<p>Варианты товара:</p>
{# TODO: Предусмотреть если всего один вариант#}
<select name="product-variations-selecter" class="product-variations-selecter">
{% for variation in product.variations.order_by('price') %}
<option {% if variation.pk == variant.pk %}selected='selected'{% endif %} value="{{ variation.pk }}" data-price="{{ variation.price }}" data-count="{{ variation.in_stock }}">{{ variation.variation }} - {{ variation.price }} ₸</option>
{% endfor %}
</select>
</div>
<br/>
<div class="product-in-stock">
<select name="product-count-selecter" class="product-count-selecter">
{% for count_val in range(variant.in_stock) %}
<option value="{{ count_val + 1 }}">{{ count_val + 1 }} шт.</option>
{% endfor %}
</select>
<br/><br/><br/>
<div class="row">
<div class="itogo col-xs-6">
Итого: <span class="itogo-span">{{ product.min_price() }}</span> ₸
</div>
<div class="col-xs-6 text-right">
{# TODO: Сделать кнопку заказать#}
<a href="/store/cart/add/?pk={{ variant.pk }}&count=1&next={{ product.get_absolute_url() }}" class="btn btn-warning btn-block" id="product-add-to-cart-link"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</a>
</div>
</div>
</div>
<div class="product-not-in-stock">
Товара нет в наличии
</div>
</div>
</div>
{% endblock %}

@ -0,0 +1,10 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns(
'',
url(r'^$', 'main.views.index',
name='index'),
url(r'^store/', include('store.urls')),
url(r'^admin/', include(admin.site.urls)),
)

@ -0,0 +1,15 @@
"""
WSGI config for batiskaf project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "batiskaf.settings")
application = get_wsgi_application()

@ -0,0 +1,99 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Attribute',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('title', models.CharField(verbose_name='Наименование', default='', max_length=256)),
('slug', models.SlugField(verbose_name='Ссылка', default='', max_length=256)),
],
),
migrations.CreateModel(
name='AttributeForCategory',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('priority', models.IntegerField(verbose_name='Приоритет', default=0)),
('attribute', models.ForeignKey(verbose_name='Атрибут в категории', to='main.Attribute')),
],
),
migrations.CreateModel(
name='AttributesInProduct',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('value', models.CharField(verbose_name='Значение', max_length=64)),
('attribute', models.ForeignKey(verbose_name='Атрибут в категории', to='main.AttributeForCategory')),
],
),
migrations.CreateModel(
name='Brand',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('title', models.CharField(verbose_name='Наименование', default='', max_length=256)),
('slug', models.SlugField(verbose_name='Ссылка', default='', max_length=256)),
],
),
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('title', models.CharField(verbose_name='Наименование', default='', max_length=256)),
('slug', models.SlugField(verbose_name='Ссылка', default='', max_length=256)),
('description', models.TextField(verbose_name='Описание', default='')),
('attributes', models.ManyToManyField(through='main.AttributeForCategory', to='main.Attribute')),
('parent', models.ForeignKey(null=True, to='main.Category', default=None)),
],
),
migrations.CreateModel(
name='Image',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('image', models.ImageField(verbose_name='Картинка', upload_to='')),
],
),
migrations.CreateModel(
name='ImageInProduct',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('is_main', models.BooleanField(verbose_name='Главная', default=False)),
('image', models.ForeignKey(verbose_name='Картинка', to='main.Image')),
],
),
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('title', models.CharField(verbose_name='Наименование', default='', max_length=256)),
('slug', models.SlugField(verbose_name='Ссылка', default='', max_length=256)),
('description', models.TextField(verbose_name='Описание', default='')),
('attirbutes', models.ManyToManyField(through='main.AttributesInProduct', to='main.AttributeForCategory')),
('brand', models.ForeignKey(verbose_name='Брэнд', to='main.Brand')),
('categories', models.ManyToManyField(verbose_name='Категории', to='main.Category')),
('images', models.ManyToManyField(through='main.ImageInProduct', to='main.Image')),
],
),
migrations.AddField(
model_name='imageinproduct',
name='product',
field=models.ForeignKey(verbose_name='Товар', to='main.Product'),
),
migrations.AddField(
model_name='attributesinproduct',
name='product',
field=models.ForeignKey(verbose_name='Товар', to='main.Product'),
),
migrations.AddField(
model_name='attributeforcategory',
name='category',
field=models.ForeignKey(verbose_name='Категория', to='main.Category'),
),
]

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='category',
name='description',
field=models.TextField(blank=True, verbose_name='Описание', null=True, default=''),
),
migrations.AlterField(
model_name='category',
name='parent',
field=models.ForeignKey(blank=True, null=True, default=None, to='main.Category'),
),
]

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.postgres.fields
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20150328_1422'),
]
operations = [
migrations.AddField(
model_name='attributeforcategory',
name='choises_array',
field=django.contrib.postgres.fields.ArrayField(size=None, blank=True, base_field=models.CharField(max_length=50, default='[]'), default=[]),
),
migrations.AddField(
model_name='attributeforcategory',
name='field_type',
field=models.CharField(max_length=10, verbose_name='Тип атрибута', choices=[('char', 'Строка'), ('int', 'Целое число'), ('double', 'Десятичное число'), ('select', 'Выбор')], default='char'),
),
]

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.postgres.fields
class Migration(migrations.Migration):
dependencies = [
('main', '0003_auto_20150328_1428'),
]
operations = [
migrations.AlterField(
model_name='attributeforcategory',
name='choises_array',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50), size=None, blank=True, default=[]),
),
]

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0004_auto_20150328_1429'),
]
operations = [
migrations.AlterField(
model_name='image',
name='image',
field=models.ImageField(upload_to='/Users/spacenergy/Programming/BatiskafENV/batiskaf/static/uploads', verbose_name='Картинка'),
),
migrations.AlterField(
model_name='product',
name='description',
field=models.TextField(blank=True, verbose_name='Описание', default='', null=True),
),
]

@ -0,0 +1,86 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0005_auto_20150328_1452'),
]
operations = [
migrations.RemoveField(
model_name='attributeforcategory',
name='attribute',
),
migrations.RemoveField(
model_name='attributeforcategory',
name='category',
),
migrations.RemoveField(
model_name='attributesinproduct',
name='attribute',
),
migrations.RemoveField(
model_name='attributesinproduct',
name='product',
),
migrations.RemoveField(
model_name='category',
name='attributes',
),
migrations.RemoveField(
model_name='category',
name='parent',
),
migrations.RemoveField(
model_name='imageinproduct',
name='image',
),
migrations.RemoveField(
model_name='imageinproduct',
name='product',
),
migrations.RemoveField(
model_name='product',
name='attirbutes',
),
migrations.RemoveField(
model_name='product',
name='brand',
),
migrations.RemoveField(
model_name='product',
name='categories',
),
migrations.RemoveField(
model_name='product',
name='images',
),
migrations.DeleteModel(
name='Attribute',
),
migrations.DeleteModel(
name='AttributeForCategory',
),
migrations.DeleteModel(
name='AttributesInProduct',
),
migrations.DeleteModel(
name='Brand',
),
migrations.DeleteModel(
name='Category',
),
migrations.DeleteModel(
name='Image',
),
migrations.DeleteModel(
name='ImageInProduct',
),
migrations.DeleteModel(
name='Product',
),
]

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

@ -0,0 +1,5 @@
from django.shortcuts import render
def index(request):
return render(request, 'index.jinja')

@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "batiskaf.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

@ -0,0 +1,54 @@
{
"name": "Bootflat",
"version": "2.0.4",
"homepage": "http://bootflat.github.io",
"authors": [
"flathemes <info@flathemes.com>"
],
"description": "BOOTFLAT is an open source Flat UI KIT based on Bootstrap 3.2.0 CSS framework. It provides a faster, easier and less repetitive way for web developers to create elegant web apps.",
"repository": {
"type": "git",
"url": "https://github.com/bootflat/bootflat.github.io.git"
},
"main": [
"bootflat/css/*",
"bootflat/scss/*",
"bootflat/fonts/*",
"bootflat/js/*",
"bootflat/img/*"
],
"keywords": [
"mobile",
"html5",
"css3",
"scss",
"bootflat",
"bootstrap",
"flat",
"flat ui",
"ui"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"angularicons",
"free-psd.html",
"documentation.html",
"getting-started.html",
"index.html",
"test",
"tests"
],
"_release": "2.0.4",
"_resolution": {
"type": "version",
"tag": "v2.0.4",
"commit": "3fa37732cd5b2b97d4f8d101e0c1fcd4db39bf32"
},
"_source": "git://github.com/bootflat/bootflat.github.io.git",
"_target": "~2.0.4",
"_originalSource": "Bootflat",
"_direct": true
}

@ -0,0 +1,144 @@
module.exports = function(grunt) {
grunt.util.linefeed = '\n';
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
};
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
defaultPath: 'bootflat'
},
banner: '/*\n * <%= pkg.name %> <%= pkg.version %>\n' +
' *\n' +
' * Description: <%= pkg.description %>\n' +
' *\n' +
' * Homepage: <%= pkg.homepage %>\n' +
' *\n' +
' * By @<%= pkg.author %>\n' +
' *\n' +
' * Last modify time: <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' *\n' +
' * Licensed under the MIT license. Please see LICENSE for more information.\n' +
' *\n' +
' * Copyright 2013 FLATHEMES.\n' +
' *\n' +
' */\n',
clean: {
dist: ['<%= meta.defaultPath %>/css/']
},
uglify: {
options: {
banner: '<%= banner %>',
sourceMap: true,
sourceMapIncludeSources: true
},
dist: {
files: {
'js/site.min.js': [
'js/jquery-1.10.1.min.js',
'js/bootstrap.min.js',
'<%= meta.defaultPath %>/js/icheck.min.js',
'<%= meta.defaultPath %>/js/jquery.fs.stepper.min.js',
'<%= meta.defaultPath %>/js/jquery.fs.selecter.min.js',
'js/application.js'
]
}
}
},
csscomb: {
options: {
config: '<%= meta.defaultPath %>/scss/.csscomb.json'
},
dist: {
files: {
'<%= meta.defaultPath %>/css/<%= pkg.name %>.css': 'bootflat/css/<%= pkg.name %>.css'
}
}
},
cssmin: {
options: {
keepSpecialComments: 0,
banner: '<%= banner %>',
},
dist: {
files: {
'css/site.min.css': [
'css/bootstrap.min.css',
'<%= meta.defaultPath %>/css/<%= pkg.name %>.css',
'css/site.css'
],
'<%= meta.defaultPath %>/css/<%= pkg.name %>.min.css': '<%= meta.defaultPath %>/css/<%= pkg.name %>.css'
}
}
},
sass: {
dist: {
files: {
'<%= meta.defaultPath %>/css/<%= pkg.name %>.css': '<%= meta.defaultPath %>/scss/<%= pkg.name %>.scss'
},
options: {
banner: '<%= banner %>',
style: 'expanded',
sourcemap: 'true'
}
}
},
csslint: {
options: {
csslintrc: '<%= meta.defaultPath %>/scss/.csslintrc'
},
src: [
'<%= meta.defaultPath %>/css/<%= pkg.name %>.css'
]
},
validation: {
options: {
charset: 'utf-8',
doctype: 'HTML5',
failHard: true,
reset: true,
relaxerror: [
'Bad value apple-mobile-web-app-title for attribute name on element meta: Keyword apple-mobile-web-app-title is not registered.',
'Bad value apple-mobile-web-app-status-bar-style for attribute name on element meta: Keyword apple-mobile-web-app-status-bar-style is not registered.',
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
'Attribute ontouchstart not allowed on element body at this point.'
]
},
files: {
src: '*.html'
}
},
sed: {
versionNumber: {
pattern: (function () {
var old = grunt.option('oldver');
return old ? RegExp.quote(old) : old;
})(),
replacement: grunt.option('newver'),
recursive: true
}
}
});
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
grunt.registerTask('task-css', ['sass', 'csscomb', 'cssmin']);
grunt.registerTask('task-js', ['uglify']);
grunt.registerTask('task', ['clean', 'task-css', 'task-js']);
grunt.registerTask('build', ['task']);
grunt.registerTask('default', ['task']);
grunt.registerTask('test', ['task', 'csslint', 'validation']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', 'sed');
};

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 bootflat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,105 @@
__________ __ _____.__ __
\______ \ ____ _____/ |__/ ____\ | _____ _/ |_
| | _// _ \ / _ \ __\ __\| | \__ \\ __\
| | ( <_> | <_> ) | | | | |__/ __ \| |
|______ /\____/ \____/|__| |__| |____(____ /__|
\/ \/
***
# What is Bootflat?
[![Bower version](https://badge.fury.io/bo/Bootflat.png)](http://badge.fury.io/bo/Bootflat) [![NPM version](https://badge.fury.io/js/bootflat.png)](http://badge.fury.io/js/bootflat) [![Build Status](https://travis-ci.org/bootflat/bootflat.github.io.svg?branch=master)](https://travis-ci.org/bootflat/bootflat.github.io)
BOOTFLAT is an open source Flat UI KIT based on Bootstrap 3.2.0 CSS framework. It provides a faster, easier and less repetitive way for web developers to create elegant web apps.
Bootflat is built on the foundations of Bootstrap, visioned in a stunning flat design. Bootstrap itself is a trusted, reliable and proven tool for developers. Built with `Sass 3.3.9`.
Bootflat is compatible with the following browsers: `IE8, IE9, IE10, IE11, Firefox, Safari, Opera, Chrome`.
Thanks for supporting our framework, and enjoy!
# Preview
For the designers, we offer a [free PSD](https://github.com/bootflat/Bootflat.UI.Kit.PSD) file for you, it including a set of beautiful and pure components, which you can use to create startup projects, websites or iOS/Android Apps.
![Bootflat UI Kit](http://bootflat.github.io/img/bootflat-ui-kit.jpg "Bootflat UI Kit")
## Features:
### 1. Bootstrap 3.2.0
Bootflat is built on Bootstrap 3.2.0: the sleek, intuitive, and powerful mobile-first front-end framework for faster and easier web development.
### 2. HTML5 & CSS3
Bootflat's components are built with HTML5 and CSS3. The pages use `header`, `nav` and `section` to build the layout. Bootflat also comes with several splendid color schemes built-in, and allows for easy customization.
### 3. Lightweight
Bootflat uses lightweight high-function plugins for maximum performance, keeping CSS and JS file sizes down.
### 4. Mobile first
Bootflat is fully responsive, built for mobile-first in mind. It provides off screen navigation, and almost all the widgets are compatible with all screen sizes.
## Quick start
* Clone the repo: `git clone https://github.com/bootflat/bootflat.github.io.git`
* Install with [npm](https://www.npmjs.org/) `npm install bootflat`
* Install with [bower](http://bower.io/) `bower install Bootflat`
The source files are in the `bootflat/` folder. You can just grab the `bootflat/css/`, `bootflat/scss/`,`bootflat/js/` and `bootflat/img/` folders and you'll be good to go.
<!doctype html>
<html>
<head>
<title>Minimal Bootflat example</title>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://bootflat.github.io/bootflat/css/bootflat.css">
</head>
<body>
<h1>Test bootflat</h1>
<a class="btn btn-primary">Flat button</a>
<!-- Bootstrap -->
<script src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- Bootflat's JS files.-->
<script src="https://bootflat.github.io/bootflat/js/icheck.min.js"></script>
<script src="https://bootflat.github.io/bootflat/js/jquery.fs.selecter.min.js"></script>
<script src="https://bootflat.github.io/bootflat/js/jquery.fs.stepper.min.js"></script>
</body>
</html>
## Table of contents:
+ [Home page](http://bootflat.github.io)
+ [Getting Started](http://bootflat.github.io/getting-started.html)
+ [Documentation](http://bootflat.github.io/documentation.html)
+ [Free PSD](http://bootflat.github.io/free-psd.html)
+ [Flat UI Color Picker](http://bootflat.github.io/color-picker.html)
## Changelog:
2014/8/26 version 2.0.4 `add widgets: TimeLine`
2014/8/26 add `color picker`, you can make a flat design with it
2014/7/9 version 2.0.3 `support bootstrap 3.2.0 and Sass 3.3.9, add wigets: Calendar, Pricing`
2014/6/5 version 2.0.2 `add wigets: Toggle, Selecter, Stepper`
2014/4/3 version 2.0.1 `support bootstrap 3.1.1`
2014/3/6 version 2.0.0 `support bootstrap 3.0.1`
## Community
+ Follow [@flathemes on Twitter](https://twitter.com/flathemes).
+ Have a feature request or find a bug? [Submit an issue](https://github.com/bootflat/bootflat.github.io/issues).
## LICENSE
Bootflat is licensed under the MIT Open Source license. For more information, please see the LICENSE file in this repository.

@ -0,0 +1,19 @@
# Meta data
name: Bootflat
authors: flathemes
description: BOOTFLAT is an open source Flat UI KIT based on Bootstrap 3.2.0 CSS framework. And, for the designers, we offer a free PSD Download. It provides a faster, easier and less repetitive way for web developers or designers to create elegant web apps.
# Dependencies
pygments: true
# Permalinks
permalink: pretty
# Server
source: docs
url: http://bootflat.github.io
encoding: UTF-8
# Custom vars
current_version: 2.0.4
repo: https://github.com/bootflat/bootflat.github.io

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1,11 @@
/*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap();
f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c=
f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this,
b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+=
'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('<ins class="'+C+'"/>').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);

File diff suppressed because one or more lines are too long

@ -0,0 +1,9 @@
/*
* Stepper v3.0.7 - 2014-05-07
* A jQuery plugin for cross browser number inputs. Part of the Formstone Library.
* http://formstone.it/stepper/
*
* Copyright 2014 Ben Plum; MIT Licensed
*/
!function(a){"use strict";function b(b){b=a.extend({},l,b||{});for(var d=a(this),e=0,f=d.length;f>e;e++)c(d.eq(e),b);return d}function c(b,c){if(!b.hasClass("stepper-input")){c=a.extend({},c,b.data("stepper-options"));var f=parseFloat(b.attr("min")),g=parseFloat(b.attr("max")),h=parseFloat(b.attr("step"))||1;b.addClass("stepper-input").wrap('<div class="stepper '+c.customClass+'" />').after('<span class="stepper-arrow up">'+c.labels.up+'</span><span class="stepper-arrow down">'+c.labels.down+"</span>");var i=b.parent(".stepper"),k=a.extend({$stepper:i,$input:b,$arrow:i.find(".stepper-arrow"),min:void 0===typeof f||isNaN(f)?!1:f,max:void 0===typeof g||isNaN(g)?!1:g,step:void 0===typeof h||isNaN(h)?1:h,timer:null},c);k.digits=j(k.step),b.is(":disabled")&&i.addClass("disabled"),i.on("keypress",".stepper-input",k,d),i.on("touchstart.stepper mousedown.stepper",".stepper-arrow",k,e).data("stepper",k)}}function d(a){var b=a.data;(38===a.keyCode||40===a.keyCode)&&(a.preventDefault(),g(b,38===a.keyCode?b.step:-b.step))}function e(b){b.preventDefault(),b.stopPropagation(),f(b);var c=b.data;if(!c.$input.is(":disabled")&&!c.$stepper.hasClass("disabled")){var d=a(b.target).hasClass("up")?c.step:-c.step;c.timer=h(c.timer,125,function(){g(c,d,!1)}),g(c,d),a("body").on("touchend.stepper mouseup.stepper",c,f)}}function f(b){b.preventDefault(),b.stopPropagation();var c=b.data;i(c.timer),a("body").off(".stepper")}function g(a,b){var c=parseFloat(a.$input.val()),d=b;void 0===typeof c||isNaN(c)?d=a.min!==!1?a.min:0:a.min!==!1&&c<a.min?d=a.min:d+=c;var e=(d-a.min)%a.step;0!==e&&(d-=e),a.min!==!1&&d<a.min&&(d=a.min),a.max!==!1&&d>a.max&&(d-=a.step),d!==c&&(d=k(d,a.digits),a.$input.val(d).trigger("change"))}function h(a,b,c){return i(a),setInterval(c,b)}function i(a){a&&(clearInterval(a),a=null)}function j(a){var b=String(a);return b.indexOf(".")>-1?b.length-b.indexOf(".")-1:0}function k(a,b){var c=Math.pow(10,b);return Math.round(a*c)/c}var l={customClass:"",labels:{up:"Up",down:"Down"}},m={defaults:function(b){return l=a.extend(l,b||{}),a(this)},destroy:function(){return a(this).each(function(){var b=a(this).data("stepper");b&&(b.$stepper.off(".stepper").find(".stepper-arrow").remove(),b.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return a(this).each(function(){var b=a(this).data("stepper");b&&(b.$input.attr("disabled","disabled"),b.$stepper.addClass("disabled"))})},enable:function(){return a(this).each(function(){var b=a(this).data("stepper");b&&(b.$input.attr("disabled",null),b.$stepper.removeClass("disabled"))})}};a.fn.stepper=function(a){return m[a]?m[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?this:b.apply(this,arguments)},a.stepper=function(a){"defaults"===a&&m.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,this);

@ -0,0 +1,40 @@
@charset "UTF-8";
@import
// Variables, Extends, Mixins
"bootflat/global",
// Base
"bootflat/typography",
"bootflat/button",
"bootflat/button_group",
"bootflat/label_badge",
"bootflat/tooltip",
"bootflat/popover",
"bootflat/progress",
"bootflat/breadcrumb",
"bootflat/pagination",
"bootflat/pager",
"bootflat/form",
"bootflat/stepper",
"bootflat/selecter",
"bootflat/checkbox_radio",
"bootflat/toggle",
"bootflat/calendar",
"bootflat/pricing",
"bootflat/alert",
"bootflat/tab",
"bootflat/pill",
"bootflat/navbar",
"bootflat/list",
"bootflat/media_list",
"bootflat/modal",
"bootflat/well",
"bootflat/thumbnail",
"bootflat/jumbotron",
"bootflat/panel",
"bootflat/accordion",
"bootflat/footer",
"bootflat/timeline",
"bootflat/dropdown";

@ -0,0 +1,76 @@
// Variables
//------------------------------------------------------
$accordion-border-color: $lightgray-dark !default;
$accordion-panel-font-color: $darkgray-dark !default;
$accordion-panel-font-color-hover: $mediumgray-dark !default;
$accordion-panel-radius: 4px !default;
$accordion-panel-shadow: 0 1px 2px rgba(0, 0, 0, .2) !default;
$accordion-panel-background-color: $white !default;
// Exports
//------------------------------------------------------
@include exports("accordion") {
/**
* accordion
* --------------------------------------------------
*/
.panel-group {
& .panel {
@include radius($type: border-radius, $value: 0);
background-color: transparent;
@include box-shadow($value: none);
}
& .panel+.panel {
margin-top: 0;
}
& .panel-heading {
padding: 0;
border-bottom-color: transparent;
}
& .panel-heading+.panel-collapse .panel-body {
padding: 15px 0;
border-top-color: transparent;
}
& .panel-title a {
padding: 10px 0;
display: block;
}
}
.panel-group-lists {
& .panel {
border-bottom: 1px solid $accordion-border-color;
background-color: $accordion-panel-background-color;
@include box-shadow($value: $accordion-panel-shadow);
}
& .panel:first-child {
@include radius($type: border-radius, $value: $accordion-panel-radius $accordion-panel-radius 0 0);
}
& .panel:last-child {
@include radius($type: border-radius, $value: 0 0 $accordion-panel-radius $accordion-panel-radius);
border-bottom: none;
}
& .panel-heading+.panel-collapse .panel-body {
padding: 15px;
border-top-color: $accordion-border-color;
}
& .panel-title a {
padding: 10px 15px;
color: $accordion-panel-font-color;
}
& .panel-title a:hover,
& .panel-title a:focus,
& .panel-title a:active {
color: $accordion-panel-font-color-hover;
}
}
}

@ -0,0 +1,75 @@
// Variables
//------------------------------------------------------
$alert-primary: $aqua-light !default;
$alert-success: $grass-light !default;
$alert-danger: $grapefruit-light !default;
$alert-warning: $sunflower-light !default;
$alert-close-color: $black !default;
$alert-link-color: $mediumgray-light !default;
// Exports
//------------------------------------------------------
@include exports("alert") {
/**
* alert
* --------------------------------------------------
*/
.alert {
& h4 {
margin-bottom: 10px;
font-weight: bold;
}
&-dismissable .close {
color: $alert-close-color;
}
@at-root &-info {
background-color: lighten($alert-primary, 10%);
border: $alert-primary;
}
@at-root &-warning {
background-color: lighten($alert-warning, 10%);
border: $alert-warning;
}
@at-root &-danger {
background-color: lighten($alert-danger, 10%);
border: $alert-danger;
}
@at-root &-success {
background-color: lighten($alert-success, 10%);
border: $alert-success;
}
@at-root & &-link {
cursor: pointer;
text-decoration: underline;
@include opacity($opacity: 65, $filter: true);
&:hover,
&:focus {
@include opacity($opacity: 45, $filter: true);
}
}
@at-root & .btn-link,
& .btn-link:hover,
& .btn-link:focus {
color: $alert-close-color;
@include opacity($opacity: 65, $filter: true);
}
@at-root & .btn-link:focus,
& .btn-link:hover {
text-decoration: none;
@include opacity($opacity: 40, $filter: true);
}
}
}

@ -0,0 +1,121 @@
// Variables
//------------------------------------------------------
$breadcrumb-font-color: $darkgray-dark !default;
$breadcrumb-link-color: $aqua-dark !default;
$breadcrumb-background-color: $lightgray-dark !default;
$breadcrumb-arrow-radius: 4px !default;
$breadcrumb-arrow-font-color: $white !default;
$breadcrumb-arrow-background-color: $aqua-dark !default;
$breadcrumb-arrow-background-color-hover: $aqua-light !default;
// Exports
//------------------------------------------------------
@include exports("breadcrumb") {
/**
* breadcrumb
* --------------------------------------------------
*/
.breadcrumb {
color: $breadcrumb-font-color;
background-color: $breadcrumb-background-color;
& > .active {
color: $breadcrumb-font-color;
}
& a {
color: $breadcrumb-link-color;
}
}
.breadcrumb-arrow {
padding: 0;
list-style: none;
background-color: $breadcrumb-background-color;
height: 36px;
line-height: 36px;
& li:first-child a {
@include radius($type: border-radius, $value: $breadcrumb-arrow-radius 0 0 $breadcrumb-arrow-radius);
}
& li,
& li a,
& li span{
display: inline-block;
vertical-align: top;
}
& li:not(:first-child) {
margin-left: -5px;
}
& li + li:before {
padding: 0;
content: "";
}
& li span {
padding: 0 10px;
}
& li a,
& li:not(:first-child) span {
padding: 0 10px 0 25px;
height: 36px;
line-height: 36px;
}
& li:first-child a {
padding: 0 10px;
}
& li a {
position: relative;
border: 1px solid $breadcrumb-arrow-background-color;
color: $breadcrumb-arrow-font-color;
background-color: $breadcrumb-arrow-background-color;
text-decoration: none;
}
& li:first-child a {
padding-left: 10px;
}
& li a:before,
& li a:after {
position: absolute;
top: -1px;
content: '';
width: 0;
height: 0;
border-top: 18px solid transparent;
border-bottom: 18px solid transparent;
}
& li a:before {
right: -10px;
border-left-width: 11px;
border-left-style: solid;
border-left-color: $breadcrumb-arrow-background-color;
z-index: 3;
}
& li a:after{
right: -11px;
border-left: 11px solid darken($breadcrumb-arrow-background-color, 10%);
z-index: 2;
}
& li a:hover,
& li a:focus {
background-color: $breadcrumb-arrow-background-color-hover;
border: 1px solid $breadcrumb-arrow-background-color-hover;
}
& li a:hover:before,
& li a:focus:before {
border-left-color: $breadcrumb-arrow-background-color-hover;
}
& li a:active {
background-color: darken($breadcrumb-arrow-background-color, 10%);
border: 1px solid darken($breadcrumb-arrow-background-color, 10%);
}
& li a:active:before,
& li a:active:after {
border-left-color: darken($breadcrumb-arrow-background-color, 10%);
}
& li span {
color: $breadcrumb-font-color;
}
}
}

@ -0,0 +1,205 @@
// Variables
//------------------------------------------------------
$button-normal: $mediumgray-dark !default;
$button-default: $white !default;
$button-primary: $aqua-dark !default;
$button-success: $grass-dark !default;
$button-danger: $grapefruit-dark !default;
$button-warning: $sunflower-dark !default;
$button-info: $mint-dark !default;
$button-normal-hover: $mediumgray-light !default;
$button-default-hover: $button-default !default;
$button-primary-hover: $aqua-light !default;
$button-success-hover: $grass-light !default;
$button-danger-hover: $grapefruit-light !default;
$button-warning-hover: $sunflower-light !default;
$button-info-hover: $mint-light !default;
$button-font-color-dark: $darkgray-dark !default;
$button-font-color-light: $white !default;
$button-opacity: 45 !default;
$button-shadow: inset 0 1px 2px rgba(0, 0, 0, .125) !default;
// Exports
//------------------------------------------------------
@include exports("button") {
/**
* button
* --------------------------------------------------
*/
.btn {
color: $button-font-color-light;
&,
&.disabled,
&[disabled] {
border-color: $button-normal;
background-color: $button-normal;
}
&:hover,
&:focus,
&:active,
&.active {
color: $button-font-color-light;
border-color: $button-normal-hover;
background-color: $button-normal-hover;
outline: none !important;
}
&:active,
&.active {
@include box-shadow($value: $button-shadow);
}
&.disabled,
&[disabled] {
@include opacity($opacity: $button-opacity, $filter: true);
}
@at-root &-link {
&,
&:hover,
&:focus,
&:active,
&.active,
&.disabled,
&[disabled] {
border-color: transparent;
background-color: transparent;
color: $button-primary;
@include box-shadow($value: none);
}
&:hover,
&:focus {
text-decoration: underline;
}
}
@at-root &-default {
color: $button-font-color-dark;
border-color: $button-normal !important;
&:hover,
&:focus,
&:active,
&.active {
border-color: $button-normal-hover;
background-color: $button-normal-hover;
}
&,
&.disabled,
&[disabled] {
background-color: $button-default;
}
}
@at-root .open .dropdown-toggle.btn-default {
border-color: $button-normal-hover;
background-color: $button-normal-hover;
}
@at-root &-primary {
&,
&:active,
&.active,
&.disabled,
&[disabled] {
border-color: $button-primary;
background-color: $button-primary;
}
&:hover,
&:focus {
border-color: $button-primary-hover;
background-color: $button-primary-hover;
}
}
@at-root .open .dropdown-toggle.btn-primary {
border-color: $button-primary-hover;
background-color: $button-primary-hover;
}
@at-root &-info {
&,
&:active,
&.active,
&.disabled,
&[disabled] {
border-color: $button-info;
background-color: $button-info;
}
&:hover,
&:focus {
border-color: $button-info-hover;
background-color: $button-info-hover;
}
}
@at-root .open .dropdown-toggle.btn-info {
border-color: $button-info-hover;
background-color: $button-info-hover;
}
@at-root &-success {
&,
&:active,
&.active,
&.disabled,
&[disabled] {
border-color: $button-success;
background-color: $button-success;
}
&:hover,
&:focus {
border-color: $button-success-hover;
background-color: $button-success-hover;
}
}
@at-root .open .dropdown-toggle.btn-success {
border-color: $button-success-hover;
background-color: $button-success-hover;
}
@at-root &-warning {
&,
&:active,
&.active,
&.disabled,
&[disabled] {
border-color: $button-warning;
background-color: $button-warning;
}
&:hover,
&:focus {
border-color: $button-warning-hover;
background-color: $button-warning-hover;
}
}
@at-root .open .dropdown-toggle.btn-warning {
border-color: $button-warning-hover;
background-color: $button-warning-hover;
}
@at-root &-danger {
&,
&:active,
&.active,
&.disabled,
&[disabled],
.open .dropdown-toggle.btn {
border-color: $button-danger;
background-color: $button-danger;
}
&:hover,
&:focus {
border-color: $button-danger-hover;
background-color: $button-danger-hover;
}
}
@at-root .open .dropdown-toggle.btn-danger {
border-color: $button-danger-hover;
background-color: $button-danger-hover;
}
}
}

@ -0,0 +1,133 @@
// Exports
//------------------------------------------------------
@include exports("button-group") {
/**
* button-group
* --------------------------------------------------
*/
.btn-group {
@at-root &.open .dropdown-toggle {
@include box-shadow($value: inset 0 1px 2px rgba(0, 0, 0, .125));
}
& .btn {
border-left-color: darken($button-normal, 7%);
}
@at-root &.open .btn-default.dropdown-toggle,
& .btn-default:focus,
& .btn-default:active,
& .btn-default.active {
color: $button-default;
}
& .btn-primary,
& .btn-primary:focus,
& .btn-primary:active,
& .btn-primary.active {
border-left-color: darken($button-primary, 7%);
}
& .btn-success,
& .btn-success:focus,
& .btn-success:active,
& .btn-success.active {
border-left-color: darken($button-success, 7%);
}
& .btn-warning,
& .btn-warning:focus,
& .btn-warning:active,
& .btn-warning.active {
border-left-color: darken($button-warning, 12%);
}
& .btn-danger,
& .btn-danger:focus,
& .btn-danger:active,
& .btn-danger.active {
border-left-color: darken($button-danger, 7%);
}
& .btn-info,
& .btn-info:focus,
& .btn-info:active,
& .btn-info.active {
border-left-color: darken($button-info, 7%);
}
& .btn:first-child,
& .btn-primary:first-child,
& .btn-success:first-child,
& .btn-warning:first-child,
& .btn-danger:first-child,
& .btn-info:first-child {
border-left-color: transparent;
}
}
.btn-group-vertical {
& .btn,
& .btn-group .btn-primary {
border-top-color: darken($button-normal, 7%) !important;
}
& .btn-primary,
& .btn-primary:focus,
& .btn-primary:active,
& .btn-primary.active,
& .btn-group .btn-primary {
border-top-color: darken($button-primary, 7%) !important;
}
& .btn-success,
& .btn-success:focus,
& .btn-success:active,
& .btn-success.active,
& .btn-group .btn-success {
border-top-color: darken($button-success, 7%) !important;
}
& .btn-warning,
& .btn-warning:focus,
& .btn-warning:active,
& .btn-warning.active,
& .btn-group .btn-warning {
border-top-color: darken($button-warning, 12%) !important;
}
& .btn-danger,
& .btn-danger:focus,
& .btn-danger:active,
& .btn-danger.active,
& .btn-group .btn-danger {
border-top-color: darken($button-danger, 7%) !important;
}
& .btn-info,
& .btn-info:focus,
& .btn-info:active,
& .btn-info.active,
& .btn-group .btn-info {
border-top-color: darken($button-info, 7%) !important;
}
& .btn:not(.btn-default):first-child,
& .btn-primary:first-child,
& .btn-success:first-child,
& .btn-warning:first-child,
& .btn-danger:first-child,
& .btn-info:first-child {
border-top: none;
}
}
}

@ -0,0 +1,134 @@
// Variables
//------------------------------------------------------
$calendar-background-color: $bittersweet-light !default;
$calendar-font-color: $white !default;
$calendar-current-color: $bittersweet-dark !default;
$calendar-shadow: 0 1px 2px rgba(0, 0, 0, .2) !default;
$calendar-radius: 4px !default;
// Exports
//------------------------------------------------------
@include exports("calendar") {
/**
* calendar
* --------------------------------------------------
*/
.calendar {
padding: 20px;
@include radius($type: border-radius, $value: $calendar-radius);
color: $white;
background-color: lighten($calendar-background-color, 10%);
@include box-shadow($value: $calendar-shadow);
& .unit {
float: left;
width: 14.28%;
text-align: center;
}
& .years {
& .prev {
text-align: left;
}
& .next {
text-align: right;
}
& .prev em,
& .next em {
position: relative;
display: inline-block;
@include radius($type: border-radius, $value: 50%);
border: 1px solid $calendar-font-color;
width: 34px;
height: 34px;
cursor: pointer;
}
& .prev em:before,
& .next em:before {
position: absolute;
display: block;
content: "";
margin-top: 6px;
border-style: solid;
border-width: 7px;
width: 0;
height: 0;
font-size: 0;
}
& .prev em:before {
top: 3px;
left: 4px;
border-color: transparent $calendar-font-color transparent transparent;
}
& .next em:before {
top: 3px;
left: 13px;
border-color: transparent transparent transparent $calendar-font-color;
}
& .prev em:hover,
& .next em:hover,
& .prev em:active,
& .next em:active {
border-color: $calendar-current-color;
}
& .prev em:hover:before,
& .prev em:active:before {
border-color: transparent $calendar-current-color transparent transparent;
}
& .next em:hover:before,
& .next em:active:before {
border-color: transparent transparent transparent $calendar-current-color;
}
& .monyear {
float: left;
width: 71.42%;
text-align: center;
height: 34px;
line-height: 34px;
}
}
& .days {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid lighten($calendar-current-color, 10%);
& .unit {
margin-bottom: 3px;
text-align: center;
height: 34px;
line-height: 34px;
& b {
@include radius($type: border-radius, $value: 50%);
font-weight: normal;
width: 34px;
height: 34px;
}
&:hover b,
&:active b,
&.active b {
display: inline-block;
background-color: $calendar-font-color;
color: $calendar-current-color;
cursor: pointer;
@include transition (all 0.2s ease-in-out);
}
&.older b {
color: $calendar-current-color;
background-color: transparent;
cursor: default;
width: auto;
height: auto;
}
}
}
}
}

@ -0,0 +1,67 @@
// Variables
//------------------------------------------------------
$img-src: "../bootflat/img/check_flat/default.png" !default;
// Exports
//------------------------------------------------------
@include exports("checkbox-radio") {
/**
* checkbox and radio
* --------------------------------------------------
*/
.checkbox, .radio {
margin-top: 0;
padding-left: 0;
}
.checkbox label, .radio label {
position: relative;
top: 2px;
padding-left: 5px;
}
.icheckbox_flat,
.iradio_flat {
display: inline-block;
*display: inline;
vertical-align: middle;
margin: 0;
padding: 0 !important;
width: 20px;
height: 20px;
background: url($img-src) no-repeat;
border: none;
cursor: pointer;
}
.icheckbox_flat {
background-position: 0 0;
&.checked {
background-position: -22px 0;
}
&.disabled {
background-position: -44px 0;
cursor: default;
}
&.checked.disabled {
background-position: -66px 0;
}
}
.iradio_flat {
background-position: -88px 0;
&.checked {
background-position: -110px 0;
}
&.disabled {
background-position: -132px 0;
cursor: default;
}
&.checked.disabled {
background-position: -154px 0;
}
}
}

@ -0,0 +1,122 @@
// Variables
//------------------------------------------------------
$dropdown-background-color: $darkgray-dark !default;
$dropdown-background-color-hover: $darkgray-light !default;
$dropdown-normal: $mediumgray-dark !default;
$dropdown-default: $white !default;
$dropdown-padding: 5px 20px !default;
$dropdown-radius: 4px !default;
$dropdown-font-size: 14px !default;
$dropdown-font-color-dark: $darkgray-dark !default;
$dropdown-font-color-light: $white !default;
$dropdown-font-weight: 700 !default;
// Exports
//------------------------------------------------------
@include exports("dropdown") {
/**
* dropdown-menu
* --------------------------------------------------
*/
.dropdown-menu {
border: none;
background-color: $dropdown-background-color;
& .dropdown-header {
padding: $dropdown-padding;
font-size: $dropdown-font-size;
font-weight: $dropdown-font-weight;
color: $dropdown-normal;
}
& li a {
padding: $dropdown-padding;
color: $dropdown-font-color-light;
}
& li a:hover,
& li a:focus,
& .active a,
& .active a:hover,
& .active a:focus{
color: $dropdown-font-color-light;
background-color: $dropdown-background-color-hover;
outline: none;
}
& .disabled a,
& .disabled a:hover,
& .disabled a:focus {
color: $dropdown-background-color-hover;
cursor: default;
}
& .divider {
background-color: $dropdown-background-color-hover;
border-bottom: none;
}
@at-root .dropup & {
margin-bottom: 0;
@include radius($type: border-radius, $value: $dropdown-radius $dropdown-radius 0 0);
}
}
/**
* dropdown-submenu
* --------------------------------------------------
*/
.dropdown-submenu {
position: relative;
& .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
@include radius($type: border-radius, $value: 0 4px 4px 4px);
}
&:hover .dropdown-menu {
display: block;
}
.dropup & .dropdown-menu {
top: auto;
bottom: 0;
margin-top: 0;
margin-bottom: -2px;
@include radius($type: border-radius, $value: 4px 4px 4px 0);
}
& > a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: $dropdown-default;
margin-top: 5px;
margin-right: -10px;
}
@at-root .dropdown-default & > a:after {
border-left-color: $dropdown-font-color-dark;
}
&:hover a:after {
border-left-color: $dropdown-default;
}
&.pull-left {
float: none;
}
&.pull-left .dropdown-menu {
left: -100%;
margin-left: 10px;
@include radius($type: border-radius, $value: 4px 0 4px 4px);
}
}
}

@ -0,0 +1,82 @@
// Variables
//------------------------------------------------------
$footer-background-color: $darkgray-dark !default;
$footer-menu-title-color: $lightgray-dark !default;
$footer-menu-item-color: $mediumgray-dark !default;
$footer-menu-item-color-hover: $mediumgray-light !default;
$footer-logo-color: $white !default;
// Exports
//------------------------------------------------------
@include exports("footer") {
/**
* footer
* --------------------------------------------------
*/
.footer {
padding: 40px 0;
background-color: $footer-background-color;
&-logo,
&-nav {
float: left;
padding: 0 20px;
width: 20%;
}
@media (max-width: 768px) {
&-logo {
margin-bottom: 20px;
}
&-logo,
&-nav {
float: none;
display: block;
width: 100%;
}
}
&-logo {
margin-top: -5px;
height: 32px;
line-height: 32px;
& img {
margin-right: 10px;
}
& a {
font-size: 20px;
font-weight: bold;
color: $footer-logo-color;
}
& a:hover,
& a:active {
text-decoration: none;
}
}
&-nav .nav-title {
margin-bottom: 15px;
color: $footer-menu-title-color;
}
&-nav .nav-item {
line-height: 28px;
& > a {
color: $footer-menu-item-color;
}
& > a:hover,
& > a:active {
color: $footer-menu-item-color-hover;
text-decoration: none;
}
}
&-copyright {
color: $footer-menu-item-color;
}
}
}

@ -0,0 +1,212 @@
// Variables
//------------------------------------------------------
$form-normal: $mediumgray-dark !default;
$form-default: $white !default;
$form-primary: $aqua-dark !default;
$form-success: $grass-dark !default;
$form-danger: $grapefruit-dark !default;
$form-warning: $sunflower-dark !default;
$form-info: $mint-dark !default;
$message-success: $grass-dark !default;
$message-danger: $grapefruit-dark !default;
$message-warning: $sunflower-dark !default;
$form-font-color: $darkgray-dark !default;
$form-placeholder-font-color: $lightgray-dark !default;
$form-disabled-color: $lightgray-dark !default;
$search-query-value: 17px !default;
$search-icon-width: 30px !default;
$search-icon-line-height: 30px !default;
// Exports
//------------------------------------------------------
@include exports("form") {
/**
* form
* --------------------------------------------------
*/
.form-control {
color: $form-font-color;
border-color: $form-normal;
&,
&:focus {
@include box-shadow($value: none);
}
&:focus {
border-color: $form-primary;
}
&::-moz-placeholder,
&:-ms-input-placeholder,
&::-webkit-input-placeholder {
color: $form-placeholder-font-color;
}
&.disabled,
&[disabled] {
border-color: $form-disabled-color;
background-color: $form-disabled-color;
}
}
.input-group-btn {
& .btn + .btn {
border-width: 1px;
border-style: solid;
border-color: darken($form-normal, 7%);
}
& .btn + .btn.btn-default {
border-color: darken($form-default, 7%);
}
& .btn + .btn.btn-primary {
border-color: darken($form-primary, 7%);
}
& .btn + .btn.btn-info {
border-color: darken($form-info, 7%);
}
& .btn + .btn.btn-success {
border-color: darken($form-success, 7%);
}
& .btn + .btn.btn-warning {
border-color: darken($form-warning, 7%);
}
& .btn + .btn.btn-danger {
border-color: darken($form-danger, 7%);
}
}
.input-group-addon {
background-color: $form-normal;
border-color: darken($form-normal, 7%);
color: $form-default;
& .radio,
& .checkbox {
margin: -3px 0 -4px !important;
}
}
.form-search {
& .search-query,
& .search-query:first-child,
& .search-query:last-child {
padding: 0 $search-query-value;
@include radius($type: border-radius, $value: $search-query-value);
}
@at-root .input-group .form-control:last-child {
// padding: 0 $search-query-value 0 10px;
@include radius($type: border-top-left-radius, $value: 0);
@include radius($type: border-bottom-left-radius, $value: 0);
}
@at-root .input-group .form-control:first-child {
@include radius($type: border-top-right-radius, $value: 0);
@include radius($type: border-bottom-right-radius, $value: 0);
}
& .btn {
@include radius($type: border-radius, $value: $search-query-value);
}
}
.search-only {
position: relative;
& .search-icon {
position: absolute;
top: 2px;
left: $search-query-value / 2;
width: $search-icon-width;
line-height: $search-icon-line-height;
text-align: center;
font-size: $search-query-value;
color: $form-placeholder-font-color;
z-index: 20;
}
& .form-control:last-child {
padding-left: $search-icon-width + 10;
}
}
.has-success {
& .help-block,
& .control-label,
& .radio,
& .checkbox,
& .radio-inline,
& .checkbox-inline {
color: $message-success;
}
& .form-control {
border-color: $message-success;
@include box-shadow($value: none);
}
& .form-control:focus {
border-color: $message-success;
@include box-shadow($value: none);
}
& .input-group-addon {
background-color: $message-success;
border-color: $message-success;
}
& .form-control-feedback {
color: $message-success;
}
}
.has-warning {
& .help-block,
& .control-label,
& .radio,
& .checkbox,
& .radio-inline,
& .checkbox-inline {
color: $message-warning;
}
& .form-control {
border-color: $message-warning;
@include box-shadow($value: none);
}
& .form-control:focus {
border-color: $message-warning;
@include box-shadow($value: none);
}
& .input-group-addon {
background-color: $message-warning;
border-color: $message-warning;
}
& .form-control-feedback {
color: $message-warning;
}
}
.has-error {
& .help-block,
& .control-label,
& .radio,
& .checkbox,
& .radio-inline,
& .checkbox-inline {
color: $message-danger;
}
& .form-control {
border-color: $message-danger;
@include box-shadow($value: none);
}
& .form-control:focus {
border-color: $message-danger;
@include box-shadow($value: none);
}
& .input-group-addon {
background-color: $message-danger;
border-color: $message-danger;
}
& .form-control-feedback {
color: $message-danger;
}
}
}

@ -0,0 +1,239 @@
// Global Variables
//------------------------------------------------------
$modules: () !default;
$experimental: true !default;
// prefix elements
$prefix-webkit: true !global;
$prefix-moz: true !global;
$prefix-spec: true !global;
// color elements
$white: #FFF !default;
$black: #000 !default;
$bluejeans-dark: #4A89DC !default;
$bluejeans-light: #5D9CEC !default;
$aqua-dark: #3BAFDA !default;
$aqua-light: #4FC1E9 !default;
$mint-dark: #37BC9B !default;
$mint-light: #48CFAD !default;
$grass-dark: #8CC152 !default;
$grass-light: #A0D468 !default;
$sunflower-dark: #F6BB42 !default;
$sunflower-light: #FFCE54 !default;
$bittersweet-dark: #E9573F !default;
$bittersweet-light: #FC6E51 !default;
$grapefruit-dark: #DA4453 !default;
$grapefruit-light: #ED5565 !default;
$lavender-dark: #967ADC !default;
$lavender-light: #AC92EC !default;
$pinkrose-dark: #D770AD !default;
$pinkrose-light: #EC87C0 !default;
$lightgray-dark: #E6E9ED !default;
$lightgray-light: #F5F7FA !default;
$mediumgray-dark: #AAB2BD !default;
$mediumgray-light: #CCD1D9 !default;
$darkgray-dark: #434A54 !default;
$darkgray-light: #656D78 !default;
// Global Mixins
//------------------------------------------------------
// We use this to loading scss files
@mixin exports($name) {
@if index($modules, $name) {
} @else {
$modules: append($modules, $name) !global;
@content;
}
}
// We use this to do set opacity
@mixin opacity($opacity:50, $filter: true) {
opacity: $opacity / 100;
@if $filter {
filter: alpha(opacity=$opacity);
}
}
// We use this to ellipsis text
@mixin ellipsis($width: 100%) {
display: inline-block;
max-width: $width;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// We use this to add across browser prefixes
@mixin prefixer($property, $value, $prefixes: webkit moz spec) {
@if $experimental {
@each $prefix in $prefixes {
@if $prefix != spec {
@if $property == border-top-left-radius and $prefix == moz {
@if $prefix-moz {
-moz-border-radius-topleft: $value;
}
} @else if $property == border-top-right-radius and $prefix == moz {
@if $prefix-moz {
-moz-border-radius-topright: $value;
}
} @else if $property == border-bottom-right-radius and $prefix == moz {
@if $prefix-moz {
-moz-border-radius-bottomright: $value;
}
} @else if $property == border-bottom-left-radius and $prefix == moz {
@if $prefix-moz {
-moz-border-radius-bottomleft: $value;
}
} @else {
@if $prefix == webkit {
@if $prefix-webkit {
-webkit-#{$property}: $value;
}
}
@if $prefix == moz {
@if $prefix-moz {
-moz-#{$property}: $value;
}
}
}
} @else {
@if $prefix-spec {
#{$property}: $value;
}
}
}
}
}
// We use this to add box-sizing across browser prefixes
@mixin box-sizing($value: border-box) {
@include prefixer($property: box-sizing, $value: $value, $prefixes: webkit moz spec);
}
// We use this to control border radius.
@mixin radius($type: border-radius, $value: $global-radius) {
@include prefixer($property: $type, $value: $value, $prefixes: webkit moz spec);
}
// We use this to control box shadow.
@mixin box-shadow($value) {
@include prefixer($property: box-shadow, $value: $value, $prefixes: webkit moz spec);
}
// We use this to creat animation effect.
// Examples:
// @include keyframes(move-the-object) {
// 0% { left: 100px; }
// 100% { left: 200px; }
// }
// .object-to-animate {
// @include animation(move-the-object .5s 1);
// }
@mixin animation ($value...) {
@include prefixer($property: animation, $value: $value, $prefixes: webkit moz spec);
}
// Individual Animation Properties
@mixin animation-name ($value...) {
@include prefixer($property: animation-name, $value: $value, $prefixes: webkit moz spec);
}
@mixin animation-duration ($value...) {
@include prefixer($property: animation-duration, $value: $value, $prefixes: webkit moz spec);
}
@mixin animation-timing-function ($value...) {
// ease | linear | ease-in | ease-out | ease-in-out
@include prefixer($property: animation-timing-function, $value: $value, $prefixes: webkit moz spec);
}
@mixin animation-iteration-count ($value...) {
// infinite | <number>
@include prefixer($property: animation-iteration-count, $value: $value, $prefixes: webkit moz spec);
}
@mixin animation-direction ($value...) {
@include prefixer($property: animation-direction, $value: $value, $prefixes: webkit moz spec);
}
@mixin animation-play-state ($value...) {
// running | paused
@include prefixer($property: animation-play-state, $value: $value, $prefixes: webkit moz spec);
}
@mixin animation-delay ($value...) {
@include prefixer($property: animation-delay, $value: $value, $prefixes: webkit moz spec);
}
@mixin animation-fill-mode ($value...) {
// none | forwards | backwards | both
@include prefixer($property: animation-fill-mode, $value: $value, $prefixes: webkit moz spec);
}
@mixin keyframes($name) {
$original-prefix-webkit: $prefix-webkit;
$original-prefix-moz: $prefix-moz;
$original-prefix-spec: $prefix-spec;
@if $original-prefix-webkit {
@include disable-prefix();
$prefix-webkit: true !global;
@-webkit-keyframes #{$name} {
@content;
}
}
@if $original-prefix-moz {
@include disable-prefix();
$prefix-moz: true !global;
@-moz-keyframes #{$name} {
@content;
}
}
@if $original-prefix-spec {
@include disable-prefix();
$prefix-spec: true !global;
@keyframes #{$name} {
@content;
}
}
$prefix-webkit: $original-prefix-webkit !global;
$prefix-moz: $original-prefix-moz !global;
$prefix-spec: $original-prefix-spec !global;
}
// We use this to set transform.
@mixin transform($value: none) {
// none | <transform-function>
@include prefixer($property: transform, $value: $value, $prefixes: webkit moz spec);
}
@mixin transform-origin($value: 50%) {
// x-axis - left | center | right | length | %
// y-axis - top | center | bottom | length | %
// z-axis - length
@include prefixer($property: transform-origin, $value: $value, $prefixes: webkit moz spec);
}
@mixin transform-style ($value: flat) {
@include prefixer($property: transform-style, $value: $value, $prefixes: webkit moz spec);
}
// We use this to set transition.
// example: @include transition (all 2s ease-in-out);
// @include transition (opacity 1s ease-in 2s, width 2s ease-out);
// @include transition-property (transform, opacity);
@mixin transition ($value...) {
@if length($value) >= 1 {
@include prefixer($property: transition, $value: $value, $prefixes: webkit moz spec);
} @else {
$value: all 0.15s ease-out 0s;
@include prefixer($property: transition, $value: $value, $prefixes: webkit moz spec);
}
}

@ -0,0 +1,84 @@
// Variables
//------------------------------------------------------
$jumbotron-font-color: $darkgray-dark !default;
$jumbotron-background-color: $white !default;
$jumbotron-radius: 4px;
$jumbotron-shadow: 0 1px 2px rgba(0, 0, 0, .2) !default;
// Exports
//------------------------------------------------------
@include exports("jumbotron") {
/**
* jumbotron
* --------------------------------------------------
*/
.jumbotron {
margin-bottom: 20px;
padding: 0;
@include radius($type: border-radius, $value: $jumbotron-radius);
background-color: $jumbotron-background-color;
@include box-shadow($value: $jumbotron-shadow);
@at-root .container & {
@include radius($type: border-radius, $value: $jumbotron-radius);
}
& > &-photo img {
@include radius($type: border-radius, $value: $jumbotron-radius $jumbotron-radius 0 0);
width: 100%;
}
& &-contents {
padding: 20px;
color: $jumbotron-font-color;
}
& .carousel,
& .carousel-inner,
& .carousel-inner > .item.active img {
@include radius($type: border-radius, $value: $jumbotron-radius $jumbotron-radius 0 0);
}
.carousel-inner > .item > a >img,
.carousel-inner > .item > img {
width: 100%;
}
& .carousel-control.left {
@include radius($type: border-radius, $value: $jumbotron-radius 0 0 0);
}
& .carousel-control.right {
@include radius($type: border-radius, $value: 0 $jumbotron-radius 0 0);
}
& h1, & .h1,
& h2, & .h2 {
font-weight: 400;
}
& h1, & .h1 {
font-size: 28px;
}
& h2, & .h2 {
font-size: 24px;
}
& p {
font-size: 14px;
}
@media screen and (min-width: 768px) {
&,
.container & {
padding: 0;
}
& h1,
& .h1 {
font-size: 28px;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save