├── .bowerrc
├── .coveragerc
├── .gitignore
├── .travis.yml
├── LICENSE
├── Procfile
├── README.rst
├── bower.json
├── flask_editablesite
├── __init__.py
├── app.py
├── assets.py
├── compat.py
├── contentblock
│ ├── __init__.py
│ └── models.py
├── database.py
├── editable
│ ├── __init__.py
│ ├── commands.py
│ ├── forms.py
│ ├── sample_images.py
│ ├── sample_text.py
│ ├── utils.py
│ └── views.py
├── event
│ ├── __init__.py
│ └── models.py
├── extensions.py
├── gallery
│ ├── __init__.py
│ └── models.py
├── public
│ ├── __init__.py
│ ├── forms.py
│ └── views.py
├── settings.py
├── static
│ ├── css
│ │ ├── editable.css
│ │ └── style.css
│ ├── img
│ │ └── favicon.ico
│ ├── js
│ │ ├── autosave.js
│ │ ├── dante.js
│ │ ├── datetimepicker.js
│ │ ├── deleteconfirm.js
│ │ ├── dropzone.js
│ │ ├── editable.js
│ │ ├── pagescroll.js
│ │ └── weight.js
│ ├── libs
│ │ ├── Dante
│ │ │ ├── css
│ │ │ │ └── dante-editor.css
│ │ │ ├── fonts
│ │ │ │ └── dante
│ │ │ │ │ ├── dante.eot
│ │ │ │ │ ├── dante.svg
│ │ │ │ │ ├── dante.ttf
│ │ │ │ │ ├── dante.woff
│ │ │ │ │ ├── fontello.eot
│ │ │ │ │ ├── fontello.svg
│ │ │ │ │ ├── fontello.ttf
│ │ │ │ │ └── fontello.woff
│ │ │ ├── images
│ │ │ │ └── dante
│ │ │ │ │ └── media-loading-placeholder.png
│ │ │ └── js
│ │ │ │ └── dante-editor.js
│ │ ├── Sanitize.js
│ │ │ └── js
│ │ │ │ └── sanitize.js
│ │ ├── bootbox
│ │ │ └── js
│ │ │ │ └── bootbox.min.js
│ │ ├── bootstrap-datetimepicker
│ │ │ ├── css
│ │ │ │ └── bootstrap-datetimepicker.css
│ │ │ └── js
│ │ │ │ └── bootstrap-datetimepicker.js
│ │ ├── bootstrap
│ │ │ ├── .bower.json
│ │ │ ├── Gruntfile.js
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── bower.json
│ │ │ ├── dist
│ │ │ │ ├── css
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ ├── bootstrap-theme.css.map
│ │ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ │ ├── bootstrap.css
│ │ │ │ │ ├── bootstrap.css.map
│ │ │ │ │ └── bootstrap.min.css
│ │ │ │ ├── fonts
│ │ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ │ └── js
│ │ │ │ │ ├── bootstrap.js
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ └── npm.js
│ │ │ ├── fonts
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ ├── grunt
│ │ │ │ ├── .jshintrc
│ │ │ │ ├── bs-commonjs-generator.js
│ │ │ │ ├── bs-glyphicons-data-generator.js
│ │ │ │ ├── bs-lessdoc-parser.js
│ │ │ │ ├── bs-raw-files-generator.js
│ │ │ │ ├── configBridge.json
│ │ │ │ └── sauce_browsers.yml
│ │ │ ├── js
│ │ │ │ ├── .jscsrc
│ │ │ │ ├── .jshintrc
│ │ │ │ ├── affix.js
│ │ │ │ ├── alert.js
│ │ │ │ ├── button.js
│ │ │ │ ├── carousel.js
│ │ │ │ ├── collapse.js
│ │ │ │ ├── dropdown.js
│ │ │ │ ├── modal.js
│ │ │ │ ├── popover.js
│ │ │ │ ├── scrollspy.js
│ │ │ │ ├── tab.js
│ │ │ │ ├── tooltip.js
│ │ │ │ └── transition.js
│ │ │ ├── less
│ │ │ │ ├── .csscomb.json
│ │ │ │ ├── .csslintrc
│ │ │ │ ├── alerts.less
│ │ │ │ ├── badges.less
│ │ │ │ ├── bootstrap.less
│ │ │ │ ├── breadcrumbs.less
│ │ │ │ ├── button-groups.less
│ │ │ │ ├── buttons.less
│ │ │ │ ├── carousel.less
│ │ │ │ ├── close.less
│ │ │ │ ├── code.less
│ │ │ │ ├── component-animations.less
│ │ │ │ ├── dropdowns.less
│ │ │ │ ├── forms.less
│ │ │ │ ├── glyphicons.less
│ │ │ │ ├── grid.less
│ │ │ │ ├── input-groups.less
│ │ │ │ ├── jumbotron.less
│ │ │ │ ├── labels.less
│ │ │ │ ├── list-group.less
│ │ │ │ ├── media.less
│ │ │ │ ├── mixins.less
│ │ │ │ ├── mixins
│ │ │ │ │ ├── alerts.less
│ │ │ │ │ ├── background-variant.less
│ │ │ │ │ ├── border-radius.less
│ │ │ │ │ ├── buttons.less
│ │ │ │ │ ├── center-block.less
│ │ │ │ │ ├── clearfix.less
│ │ │ │ │ ├── forms.less
│ │ │ │ │ ├── gradients.less
│ │ │ │ │ ├── grid-framework.less
│ │ │ │ │ ├── grid.less
│ │ │ │ │ ├── hide-text.less
│ │ │ │ │ ├── image.less
│ │ │ │ │ ├── labels.less
│ │ │ │ │ ├── list-group.less
│ │ │ │ │ ├── nav-divider.less
│ │ │ │ │ ├── nav-vertical-align.less
│ │ │ │ │ ├── opacity.less
│ │ │ │ │ ├── pagination.less
│ │ │ │ │ ├── panels.less
│ │ │ │ │ ├── progress-bar.less
│ │ │ │ │ ├── reset-filter.less
│ │ │ │ │ ├── resize.less
│ │ │ │ │ ├── responsive-visibility.less
│ │ │ │ │ ├── size.less
│ │ │ │ │ ├── tab-focus.less
│ │ │ │ │ ├── table-row.less
│ │ │ │ │ ├── text-emphasis.less
│ │ │ │ │ ├── text-overflow.less
│ │ │ │ │ └── vendor-prefixes.less
│ │ │ │ ├── modals.less
│ │ │ │ ├── navbar.less
│ │ │ │ ├── navs.less
│ │ │ │ ├── normalize.less
│ │ │ │ ├── pager.less
│ │ │ │ ├── pagination.less
│ │ │ │ ├── panels.less
│ │ │ │ ├── popovers.less
│ │ │ │ ├── print.less
│ │ │ │ ├── progress-bars.less
│ │ │ │ ├── responsive-embed.less
│ │ │ │ ├── responsive-utilities.less
│ │ │ │ ├── scaffolding.less
│ │ │ │ ├── tables.less
│ │ │ │ ├── theme.less
│ │ │ │ ├── thumbnails.less
│ │ │ │ ├── tooltip.less
│ │ │ │ ├── type.less
│ │ │ │ ├── utilities.less
│ │ │ │ ├── variables.less
│ │ │ │ └── wells.less
│ │ │ ├── package.js
│ │ │ └── package.json
│ │ ├── dropzone
│ │ │ ├── basic.css
│ │ │ ├── dropzone-amd-module.js
│ │ │ ├── dropzone.css
│ │ │ ├── dropzone.js
│ │ │ ├── min
│ │ │ │ ├── basic.min.css
│ │ │ │ ├── dropzone-amd-module.min.js
│ │ │ │ ├── dropzone.min.css
│ │ │ │ └── dropzone.min.js
│ │ │ └── readme.md
│ │ ├── font-awesome4
│ │ │ ├── css
│ │ │ │ ├── font-awesome.css
│ │ │ │ └── font-awesome.min.css
│ │ │ └── fonts
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ └── fontawesome-webfont.woff
│ │ ├── jQuery
│ │ │ ├── .bower.json
│ │ │ ├── MIT-LICENSE.txt
│ │ │ ├── bower.json
│ │ │ ├── dist
│ │ │ │ ├── jquery.js
│ │ │ │ ├── jquery.min.js
│ │ │ │ └── jquery.min.map
│ │ │ └── src
│ │ │ │ ├── ajax.js
│ │ │ │ ├── ajax
│ │ │ │ ├── jsonp.js
│ │ │ │ ├── load.js
│ │ │ │ ├── parseJSON.js
│ │ │ │ ├── parseXML.js
│ │ │ │ ├── script.js
│ │ │ │ └── xhr.js
│ │ │ │ ├── attributes.js
│ │ │ │ ├── attributes
│ │ │ │ ├── attr.js
│ │ │ │ ├── classes.js
│ │ │ │ ├── prop.js
│ │ │ │ ├── support.js
│ │ │ │ └── val.js
│ │ │ │ ├── callbacks.js
│ │ │ │ ├── core.js
│ │ │ │ ├── core
│ │ │ │ ├── access.js
│ │ │ │ ├── init.js
│ │ │ │ ├── parseHTML.js
│ │ │ │ └── ready.js
│ │ │ │ ├── css.js
│ │ │ │ ├── css
│ │ │ │ ├── addGetHookIf.js
│ │ │ │ ├── curCSS.js
│ │ │ │ ├── defaultDisplay.js
│ │ │ │ ├── hiddenVisibleSelectors.js
│ │ │ │ ├── support.js
│ │ │ │ └── swap.js
│ │ │ │ ├── data.js
│ │ │ │ ├── data
│ │ │ │ ├── Data.js
│ │ │ │ └── accepts.js
│ │ │ │ ├── deferred.js
│ │ │ │ ├── deprecated.js
│ │ │ │ ├── dimensions.js
│ │ │ │ ├── effects.js
│ │ │ │ ├── effects
│ │ │ │ ├── Tween.js
│ │ │ │ └── animatedSelector.js
│ │ │ │ ├── event.js
│ │ │ │ ├── event
│ │ │ │ ├── ajax.js
│ │ │ │ ├── alias.js
│ │ │ │ └── support.js
│ │ │ │ ├── exports
│ │ │ │ ├── amd.js
│ │ │ │ └── global.js
│ │ │ │ ├── intro.js
│ │ │ │ ├── jquery.js
│ │ │ │ ├── manipulation.js
│ │ │ │ ├── manipulation
│ │ │ │ ├── _evalUrl.js
│ │ │ │ └── support.js
│ │ │ │ ├── offset.js
│ │ │ │ ├── outro.js
│ │ │ │ ├── queue.js
│ │ │ │ ├── queue
│ │ │ │ └── delay.js
│ │ │ │ ├── selector-native.js
│ │ │ │ ├── selector-sizzle.js
│ │ │ │ ├── selector.js
│ │ │ │ ├── serialize.js
│ │ │ │ ├── sizzle
│ │ │ │ └── dist
│ │ │ │ │ ├── sizzle.js
│ │ │ │ │ ├── sizzle.min.js
│ │ │ │ │ └── sizzle.min.map
│ │ │ │ ├── traversing.js
│ │ │ │ ├── traversing
│ │ │ │ └── findFilter.js
│ │ │ │ └── wrap.js
│ │ ├── jquery-easing
│ │ │ └── jquery.easing.js
│ │ ├── moment
│ │ │ └── moment.min.js
│ │ └── underscore
│ │ │ └── js
│ │ │ └── underscore-min.js
│ ├── public
│ │ ├── .gitkeep
│ │ ├── css
│ │ │ └── .gitkeep
│ │ └── js
│ │ │ └── .gitkeep
│ ├── robots.txt
│ ├── sitemap.xml
│ └── uploads
│ │ └── placeholder.png
├── templates
│ ├── 401.html
│ ├── 404.html
│ ├── 500.html
│ ├── autosave_status.html
│ ├── event.html
│ ├── footer.html
│ ├── google_analytics.html
│ ├── layout.html
│ ├── macros
│ │ ├── dante.html
│ │ ├── date_pick.html
│ │ ├── heading.html
│ │ ├── hiddenfield.html
│ │ ├── image.html
│ │ ├── rich_text.html
│ │ ├── short_text.html
│ │ └── time_pick.html
│ ├── nav.html
│ └── public
│ │ └── home.html
├── user
│ ├── __init__.py
│ ├── commands.py
│ └── models.py
└── utils.py
├── manage.py
├── migrations
├── README
├── alembic.ini
├── env.py
├── script.py.mako
└── versions
│ ├── 10ac6fbf6ec5_.py
│ ├── 213a4ce02333_.py
│ ├── 2829167b2aff_.py
│ └── 4c98d9952b7e_.py
├── requirements.txt
├── requirements
├── dev.txt
└── prod.txt
├── tests
├── __init__.py
├── conftest.py
├── factories.py
├── sample-text-great-expectations.txt
├── test_config.py
├── test_contact_views.py
├── test_contentblock_views.py
├── test_editable_views.py
├── test_sample_images.py
├── test_sample_text.py
├── test_user_forms.py
├── test_user_models.py
└── test_user_views.py
└── tox.ini
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "flask_editablesite/static/libs"
3 | }
4 |
--------------------------------------------------------------------------------
/.coveragerc:
--------------------------------------------------------------------------------
1 | [run]
2 | source = flask_editablesite
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.py[cod]
2 |
3 | # C extensions
4 | *.so
5 |
6 | # Packages
7 | *.egg
8 | *.egg-info
9 | build
10 | eggs
11 | parts
12 | bin
13 | var
14 | sdist
15 | develop-eggs
16 | .installed.cfg
17 | lib
18 | lib64
19 |
20 | # Installer logs
21 | pip-log.txt
22 |
23 | # Unit test / coverage reports
24 | .coverage
25 | .tox
26 | nosetests.xml
27 | htmlcov
28 |
29 | # Translations
30 | *.mo
31 |
32 | # Mr Developer
33 | .mr.developer.cfg
34 | .project
35 | .pydevproject
36 |
37 | # Complexity
38 | output/*.html
39 | output/*/index.html
40 |
41 | # Sphinx
42 | docs/_build
43 |
44 | .webassets-cache
45 |
46 | # Virtualenvs
47 | env/
48 |
49 | +# Flask project-specific stuff
50 | log
51 | .cache
52 | flask_editablesite/.cache
53 | flask_editablesite/tests/.cache
54 | flask_editablesite/static/uploads/*
55 | !flask_editablesite/static/uploads/placeholder.png
56 | flask_editablesite/static/cache
57 | flask_editablesite/static/css/admin.css
58 | flask_editablesite/static/css/common.css
59 | flask_editablesite/static/js/admin.js
60 | flask_editablesite/static/js/common.js
61 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # Config file for automatic testing at travis-ci.org
2 |
3 | language: python
4 |
5 | cache:
6 | directories:
7 | - $HOME/.cache/pip
8 |
9 | python:
10 | - "2.6"
11 | - "2.7"
12 | - "pypy"
13 | - "3.3"
14 | - "3.4"
15 |
16 | install:
17 | - "pip install --upgrade pip"
18 | - if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install importlib; fi
19 | - "pip install -r requirements/dev.txt"
20 |
21 | before_script:
22 | - psql -c 'create database travis_ci_test;' -U postgres
23 |
24 | script:
25 | - "coverage run manage.py test"
26 | - flake8 flask_editablesite tests
27 |
28 | after_success:
29 | coveralls
30 |
31 | matrix:
32 | allow_failures:
33 | - python: "pypy"
34 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: gunicorn flask_editablesite.app:create_app\(\) -b 0.0.0.0:$PORT -w 3
2 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flask_editablesite",
3 | "dependencies": {
4 | "bootstrap": "~3.2.0",
5 | "jQuery": "~2.1.3"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/flask_editablesite/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/__init__.py
--------------------------------------------------------------------------------
/flask_editablesite/assets.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from flask_assets import Bundle, Environment
3 |
4 | css = Bundle(
5 | "css/style.css",
6 | filters="cssmin",
7 | output="public/css/common.css"
8 | )
9 |
10 | css_admin = Bundle(
11 | "libs/Dante/css/dante-editor.css",
12 | "libs/dropzone/dropzone.css",
13 | "libs/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css",
14 | "css/editable.css",
15 | filters='cssmin',
16 | output='public/css/admin.css'
17 | )
18 |
19 | js = Bundle(
20 | "libs/jQuery/dist/jquery.js",
21 | "libs/bootstrap/dist/js/bootstrap.min.js",
22 | "libs/jquery-easing/jquery.easing.js",
23 | "js/pagescroll.js",
24 | filters='jsmin',
25 | output="public/js/common.js"
26 | )
27 |
28 | js_admin = Bundle(
29 | "libs/underscore/js/underscore-min.js",
30 | "libs/moment/moment.min.js",
31 | "libs/bootbox/js/bootbox.min.js",
32 | "libs/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js",
33 | "libs/Sanitize.js/js/sanitize.js",
34 | "libs/Dante/js/dante-editor.js",
35 | "libs/dropzone/dropzone.js",
36 | "js/autosave.js",
37 | "js/deleteconfirm.js",
38 | "js/editable.js",
39 | "js/dante.js",
40 | "js/dropzone.js",
41 | "js/datetimepicker.js",
42 | "js/weight.js",
43 | filters='jsmin',
44 | output='public/js/admin.js'
45 | )
46 |
47 | assets = Environment()
48 |
49 | assets.register("js_all", js)
50 | assets.register("css_all", css)
51 |
52 | assets.register("js_admin", js_admin)
53 | assets.register("css_admin", css_admin)
54 |
--------------------------------------------------------------------------------
/flask_editablesite/compat.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """Python 2/3 compatibility module."""
3 |
4 |
5 | import sys
6 |
7 | PY2 = int(sys.version[0]) == 2
8 |
9 | if PY2:
10 | text_type = unicode # flake8: noqa
11 | binary_type = str
12 | string_types = (str, unicode) # flake8: noqa
13 | unicode = unicode # flake8: noqa
14 | basestring = basestring # flake8: noqa
15 | else:
16 | text_type = str
17 | binary_type = bytes
18 | string_types = (str,)
19 | unicode = str
20 | basestring = (str, bytes)
21 |
--------------------------------------------------------------------------------
/flask_editablesite/contentblock/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
--------------------------------------------------------------------------------
/flask_editablesite/editable/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
--------------------------------------------------------------------------------
/flask_editablesite/editable/commands.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | try:
4 | from urllib.parse import urlparse # python 3.x
5 | except ImportError:
6 | from urlparse import urlparse # python 2.x
7 |
8 | from flask_script import Command, Option, prompt
9 |
10 | from flask_editablesite.editable.sample_images import scrape_sample_images
11 |
12 |
13 | class DownloadSampleImages(Command):
14 | """Downloads sample images by scraping a specified URL for links."""
15 |
16 | def get_options(self):
17 | return (
18 | Option('--url',
19 | help='URL of web site to scrape for images'),
20 | Option('--targetdir',
21 | help='Path to target directory'),
22 | Option('--parentelname',
23 | help='Parent element name (optional)'),
24 | Option('--parentelclass',
25 | help='Parent element class (optional)'),
26 | Option('--onlyfirstel',
27 | help=('Only get the first element of each parent '
28 | '(optional)'),
29 | default=False),
30 | )
31 |
32 | def download_sample_images(self, url, targetdir, parentelname,
33 | parentelclass, onlyfirstel):
34 | import requests
35 |
36 | from clint.textui import progress
37 |
38 | hrefs = scrape_sample_images(
39 | url=url,
40 | parentelname=parentelname,
41 | parentelclass=parentelclass,
42 | onlyfirstel=onlyfirstel)
43 |
44 | target_filepath = os.path.abspath(targetdir)
45 | if not os.path.exists(target_filepath):
46 | os.makedirs(target_filepath)
47 |
48 | total_downloaded = 0
49 |
50 | for href in progress.bar(hrefs):
51 | filename = os.path.basename(urlparse(href).path)
52 | filepath = os.path.join(target_filepath, filename)
53 |
54 | if not os.path.exists(filepath):
55 | r = requests.get(href, stream=True)
56 |
57 | with open(filepath, 'wb') as f:
58 | for chunk in r.iter_content(chunk_size=1024):
59 | if chunk:
60 | f.write(chunk)
61 |
62 | total_downloaded += 1
63 |
64 | return 'Downloaded %d images' % total_downloaded
65 |
66 | def run(self, url=None, targetdir=None, parentelname=None,
67 | parentelclass=None, onlyfirstel=False):
68 | if not url:
69 | url = prompt("URL of web site to scrape for images")
70 |
71 | if not targetdir:
72 | targetdir = prompt("Path to target directory")
73 |
74 | msg = self.download_sample_images(
75 | url=url,
76 | targetdir=targetdir,
77 | parentelname=parentelname,
78 | parentelclass=parentelclass,
79 | onlyfirstel=onlyfirstel)
80 |
81 | if not msg:
82 | msg = "Error downloading images"
83 |
84 | print(msg)
85 |
--------------------------------------------------------------------------------
/flask_editablesite/editable/forms.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from wtforms import (TextField, TextAreaField, HiddenField, FieldList,
3 | FormField, DateField)
4 | from wtforms_components import TimeField
5 | from wtforms.validators import DataRequired
6 |
7 | from flask_wtf import Form
8 | from flask_wtf.file import FileField, FileAllowed
9 |
10 |
11 | class TextEditForm(Form):
12 | content = TextField('Content', validators=[DataRequired()])
13 |
14 |
15 | class TextOptionalEditForm(Form):
16 | content = TextField('Content', validators=[])
17 |
18 |
19 | class LongTextEditForm(Form):
20 | content = TextAreaField('Content', validators=[DataRequired()])
21 |
22 |
23 | class LongTextOptionalEditForm(Form):
24 | content = TextAreaField('Content', validators=[])
25 |
26 |
27 | class ImageEditForm(Form):
28 | image = FileField('Image', validators=[
29 | DataRequired(),
30 | FileAllowed(
31 | ('gif', 'jpg', 'jpeg', 'png'),
32 | ('Only image files (gif, jpg, png) can be uploaded '
33 | 'for this field'))])
34 |
35 |
36 | class ImageOptionalEditForm(Form):
37 | image = FileField('Image', validators=[
38 | FileAllowed(
39 | ('gif', 'jpg', 'jpeg', 'png'),
40 | ('Only image files (gif, jpg, png) can be uploaded for '
41 | 'this field'))])
42 |
43 |
44 | class DateEditForm(Form):
45 | content = DateField('Date', format='%d %b %Y', validators=[
46 | DataRequired()])
47 |
48 |
49 | class DateOptionalEditForm(Form):
50 | content = DateField('Date', format='%d %b %Y', validators=[])
51 |
52 |
53 | class TimeEditForm(Form):
54 | content = TimeField('Time', validators=[DataRequired()])
55 |
56 |
57 | class TimeOptionalEditForm(Form):
58 | content = TimeField('Time', validators=[])
59 |
60 |
61 | class ReorderItemForm(Form):
62 | identifier = HiddenField(validators=[])
63 | weight = HiddenField(validators=[])
64 |
65 |
66 | class ReorderForm(Form):
67 | items = FieldList(FormField(ReorderItemForm))
68 |
--------------------------------------------------------------------------------
/flask_editablesite/editable/sample_text.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | import markovify
4 | import random
5 | import requests
6 | from unidecode import unidecode
7 |
8 | from flask import current_app as app
9 | from flask import g
10 |
11 |
12 | def placeholder_or_random_sample_text():
13 | """
14 | Gets a random sample chunk of text if possible, otherwise the
15 | default placeholder text.
16 | """
17 |
18 | is_sample_text_configured = (
19 | app.config.get('EDITABLE_SAMPLE_TEXT_SCRAPE_URLS') and
20 | True or False)
21 |
22 | return (is_sample_text_configured
23 | and random_sample_text()
24 | or app.config['EDITABLE_PLACEHOLDER_TEXT'])
25 |
26 |
27 | def random_sample_text(num_sentences=3):
28 | """Attempts to generate a random piece of text content."""
29 |
30 | text = getattr(g, 'sample_text_cached', None)
31 | is_decoding_needed = False
32 |
33 | if not text:
34 | url = random.choice(
35 | app.config['EDITABLE_SAMPLE_TEXT_SCRAPE_URLS'])
36 |
37 | r = requests.get(url)
38 |
39 | # Thanks to:
40 | # https://github.com/kennethreitz/requests/issues/1604 ...
41 | # #issuecomment-24476927
42 | r.encoding = 'utf-8'
43 |
44 | is_decoding_needed = (type(r.text).__name__ == 'unicode')
45 | text = (
46 | is_decoding_needed
47 | and r.text.encode('utf-8')
48 | or r.text)
49 | g.sample_text_cached = text
50 |
51 | # Use a Markov chain generator for random sentences based on
52 | # sample input (e.g. text of a book).
53 | # https://github.com/jsvine/markovify
54 | # See also:
55 | # http://agiliq.com/blog/2009/06/ ...
56 | # generating-pseudo-random-text-with-markov-chains-u/
57 | text_model = markovify.Text(text)
58 |
59 | sentences = []
60 | for i in range(num_sentences):
61 | s = text_model.make_sentence()
62 |
63 | if s:
64 | if is_decoding_needed:
65 | s = s.decode('utf-8')
66 |
67 | s = unidecode(s.strip())
68 | sentences.append(s)
69 |
70 | return '
{0}
'.format(' '.join(sentences))
71 |
--------------------------------------------------------------------------------
/flask_editablesite/editable/utils.py:
--------------------------------------------------------------------------------
1 | import importlib
2 | import re
3 |
4 |
5 | def get_model_class(model_classpath, model_name):
6 | """Dynamically imports the model with the specified classpath."""
7 |
8 | model_classpath_format = r'^[a-z0-9_]+(\.[A-Za-z0-9_]+)+$'
9 |
10 | if not re.match(model_classpath_format, model_classpath):
11 | raise ValueError(
12 | ('Class path "%s" for model name "%s" '
13 | 'must be a valid Python module / class path (in the '
14 | 'format "%s")') % (
15 | model_classpath,
16 | model_name,
17 | model_classpath_format))
18 |
19 | model_classpath_split = model_classpath.rpartition('.')
20 | model_modulepath, model_classname = (
21 | model_classpath_split[0],
22 | model_classpath_split[2])
23 |
24 | try:
25 | model_module = importlib.import_module(model_modulepath)
26 | except ImportError:
27 | raise ValueError(
28 | ('Error importing module "%s" for '
29 | 'model name "%s"') % (
30 | model_modulepath,
31 | model_name))
32 |
33 | model_class = getattr(model_module, model_classname, None)
34 | if not model_class:
35 | raise ValueError(
36 | ('Class "%s" not found in module "%s" for '
37 | 'model name "%s"') % (
38 | model_classname,
39 | model_modulepath,
40 | model_name))
41 |
42 | return model_class
43 |
--------------------------------------------------------------------------------
/flask_editablesite/event/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
--------------------------------------------------------------------------------
/flask_editablesite/extensions.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """Extensions module. Each extension is initialized in the app factory located
3 | in app.py
4 | """
5 |
6 | from flask_bcrypt import Bcrypt
7 | from flask_login import LoginManager
8 | from flask_sqlalchemy import SQLAlchemy
9 | from flask_migrate import Migrate
10 | from flask_cache import Cache
11 | from flask_mail import Mail
12 | from flask_session import Session
13 | from flask_debugtoolbar import DebugToolbarExtension
14 | from flask_thumbnails import Thumbnail
15 |
16 | bcrypt = Bcrypt()
17 | login_manager = LoginManager()
18 | db = SQLAlchemy()
19 | migrate = Migrate()
20 | cache = Cache()
21 | mail = Mail()
22 | sess = Session()
23 | debug_toolbar = DebugToolbarExtension()
24 | thumb = Thumbnail()
25 |
--------------------------------------------------------------------------------
/flask_editablesite/gallery/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
--------------------------------------------------------------------------------
/flask_editablesite/public/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
--------------------------------------------------------------------------------
/flask_editablesite/public/forms.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from flask import current_app as app
3 | from flask_wtf import Form
4 | from wtforms import TextField, TextAreaField, PasswordField
5 | from wtforms.validators import DataRequired, Email
6 |
7 | from flask_editablesite.user.models import User
8 |
9 |
10 | class ContactForm(Form):
11 | name = TextField('Name', validators=[DataRequired()])
12 | email = TextField('Email Address', validators=[DataRequired(), Email()])
13 | phone = TextField('Phone Number', validators=[])
14 | message = TextAreaField('Message', validators=[DataRequired()])
15 |
16 |
17 | class LoginForm(Form):
18 | email = TextField('Email', validators=[DataRequired()])
19 | password = PasswordField('Password', validators=[DataRequired()])
20 |
21 | def __init__(self, *args, **kwargs):
22 | super(LoginForm, self).__init__(*args, **kwargs)
23 | self.user = None
24 |
25 | def validate(self):
26 | initial_validation = super(LoginForm, self).validate()
27 | if not initial_validation:
28 | return False
29 |
30 | # Log in with dummy credentials when we're set to 'sessionstore'
31 | # instead of 'db'.
32 | if app.config.get('USE_SESSIONSTORE_NOT_DB'):
33 | if self.email.data != app.config['SESSIONSTORE_USER_EMAIL']:
34 | self.email.errors.append('Unknown email')
35 | return False
36 |
37 | if self.password.data != app.config['SESSIONSTORE_USER_PASSWORD']:
38 | self.password.errors.append('Invalid password')
39 | return False
40 |
41 | self.user = User.sessionstore_user()
42 | # Regular login.
43 | else:
44 | self.user = User.query.filter_by(email=self.email.data).first()
45 | if not self.user:
46 | self.email.errors.append('Unknown email')
47 | return False
48 |
49 | if not self.user.check_password(self.password.data):
50 | self.password.errors.append('Invalid password')
51 | return False
52 |
53 | if not self.user.active:
54 | self.email.errors.append('User {0} not activated'.format(
55 | self.user.full_name_or_email))
56 | return False
57 |
58 | return True
59 |
--------------------------------------------------------------------------------
/flask_editablesite/static/css/editable.css:
--------------------------------------------------------------------------------
1 | /* EDITABLE */
2 |
3 | .form-editable label {
4 | display: none;
5 | }
6 |
7 | .form-editable-button {
8 | margin-bottom: 40px;
9 | }
10 |
11 | .form-editable-inline {
12 | display: inline;
13 | }
14 |
15 | .title-image-wrapper {
16 | margin-left: auto;
17 | margin-right: auto;
18 | position: relative;
19 | }
20 |
21 | .edit-icon-wrapper {
22 | position: absolute;
23 | top: 0.7em;
24 | left: -2.5em;
25 | color: #999;
26 | }
27 |
28 | .btn .edit-icon-wrapper {
29 | top: 0;
30 | left: -2em;
31 | }
32 |
33 | h1 .edit-icon-wrapper, .h1 .edit-icon-wrapper {
34 | top: 1em;
35 | left: -2em;
36 | font-size: 18px;
37 | }
38 |
39 | .edit-icon-dante {
40 | left: -1.5em;
41 | }
42 |
43 | .form-editable input[type=text] {
44 | background-color: transparent;
45 | width: 100%;
46 | }
47 |
48 | .form-editable span input[type=text] {
49 | width: 40%;
50 | }
51 |
52 | .form-editable input[type=text], .dante-editable {
53 | border: 1px solid transparent;
54 | }
55 |
56 | .form-editable input[type=text].active, .dante-editable.active {
57 | border: 1px dotted #999;
58 | }
59 |
60 | .postArticle .layoutSingleColumn {
61 | width: auto;
62 | }
63 |
64 | .postArticle section {
65 | overflow: hidden;
66 | }
67 |
68 |
69 | /* Dropzone */
70 |
71 | .dropzone {
72 | min-height: 0;
73 | border: 1px solid transparent;
74 | background-color: transparent;
75 | padding: 0;
76 | position: relative;
77 | }
78 |
79 | .dropzone:hover {
80 | border: 1px dotted #999;
81 | }
82 |
83 | .dropzone .dz-message {
84 | position: absolute;
85 | bottom: 0;
86 | width: 100%;
87 | display: none;
88 | }
89 |
90 | .jumbotron .dropzone .dz-message {
91 | bottom: 100px;
92 | }
93 |
94 | .modal .modal-content .dropzone .dz-message {
95 | bottom: 40%;
96 | }
97 |
98 | .dropzone:hover .dz-message {
99 | display: block;
100 | z-index: 1001;
101 | }
102 |
103 | .dropzone .dz-message span {
104 | background-color: rgba(255, 255, 255, 0.7);
105 | padding: 0.5em;
106 | }
107 |
108 | .dropzone .dz-preview.dz-image-preview {
109 | background-color: transparent;
110 | }
111 |
112 | .dropzone .dz-preview {
113 | position: absolute;
114 | top: 0;
115 | left: 0;
116 | margin: 0;
117 | width: 100%;
118 | }
119 |
120 | .jumbotron .dropzone .dz-preview {
121 | text-align: center;
122 | }
123 |
124 | .jumbotron .dropzone .dz-preview .dz-image {
125 | border-radius: 50%;
126 | display: inline-block;
127 | width: 256px;
128 | height: 256px;
129 | }
130 |
131 | .modal .modal-content .dropzone .dz-preview .dz-image {
132 | width: auto;
133 | height: auto;
134 | max-width: 100%;
135 | margin: 0 auto;
136 | border-radius: 0;
137 | }
138 |
139 |
140 |
141 | /* WEIGHT / DELETE CONTROLS */
142 |
143 | .form-delete-item {
144 | display: inline-block;
145 | position: absolute;
146 | bottom: 50px;
147 | right: 35px;
148 | }
149 |
150 | .form-delete-item .btn, .weight-controls .btn {
151 | font-size: 1.8em;
152 | border-radius: 50%;
153 | text-align: center;
154 | }
155 |
156 | .weight-controls {
157 | display: inline-block;
158 | position: absolute;
159 | bottom: 50px;
160 | left: 35px;
161 | }
162 |
163 | .weight-controls .btn {
164 | margin-right: 15px;
165 | }
166 |
--------------------------------------------------------------------------------
/flask_editablesite/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/img/favicon.ico
--------------------------------------------------------------------------------
/flask_editablesite/static/js/dante.js:
--------------------------------------------------------------------------------
1 | (function($, window) {
2 |
3 | function updateDanteFromTextareas(event) {
4 | var ta = $(event.target);
5 | if (((event.type == 'keyup' || event.type == 'paste') && ta.is(':focus')) || event.type == 'blur') {
6 | var elem_jq = $('#' + ta.attr('id') + '-wysiwyg');
7 | elem_jq.html(ta.val());
8 | }
9 | }
10 |
11 | var elements = document.querySelectorAll('.dante-editable');
12 |
13 | $.each(elements, function(i, elem) {
14 | var elem_jq = $(elem);
15 | var elem_id = elem_jq.attr('id');
16 | var ta_id = elem_id.replace('-wysiwyg', '');
17 | var ta = elem_jq.siblings('#' + ta_id);
18 |
19 | if (ta.val()) {
20 | elem_jq.html(ta.val());
21 | }
22 |
23 | var dante_editor_options = {
24 | el: elem,
25 | upload_url: null,
26 | debug: false
27 | };
28 |
29 | var editor = new Dante.Editor(dante_editor_options);
30 | editor.start();
31 |
32 | $('body').on('input', elem_jq, function(event) {
33 | var c = editor.cleanContents(
34 | elem_jq.find('.section-inner')
35 | .clone());
36 |
37 | if (typeof c !== 'undefined') {
38 | c = c.html()
39 | .replace(/\
\<\/p\>/g, '')
40 | .replace(/ class=\"[^\"]+\"/g, '');
41 |
42 | ta.val(c)
43 | .trigger('keyup');
44 | }
45 | });
46 |
47 | ta.hide();
48 | $('body').on('blur keyup paste', ta, updateDanteFromTextareas);
49 | });
50 |
51 | }).call(this, jQuery, window);
52 |
--------------------------------------------------------------------------------
/flask_editablesite/static/js/datetimepicker.js:
--------------------------------------------------------------------------------
1 | (function($, window) {
2 |
3 | $('.datepicker-enable').datetimepicker({
4 | format: 'DD MMM YYYY'});
5 |
6 | $('.timepicker-enable').datetimepicker({
7 | format: 'HH:mm'});
8 |
9 | $('.datepicker-enable, .timepicker-enable').on('dp.change', function(e) {
10 | $(this)
11 | .trigger('input');
12 | });
13 |
14 | }).call(this, jQuery, window);
15 |
--------------------------------------------------------------------------------
/flask_editablesite/static/js/deleteconfirm.js:
--------------------------------------------------------------------------------
1 | (function($, window) {
2 | $('.delete-confirm-link').click(function(e) {
3 | var $this = $(this);
4 |
5 | if ($(this).attr('data-delete-confirm-item-type')) {
6 | e.preventDefault();
7 |
8 | bootbox.confirm('Are you sure you want to ' + $(this).attr('data-delete-confirm-item-type') + '? This operation cannot be undone.', function(result) {
9 | if (result) {
10 | $this.parent('form').submit();
11 | }
12 | });
13 | }
14 | });
15 | }).call(this, jQuery, window);
16 |
--------------------------------------------------------------------------------
/flask_editablesite/static/js/dropzone.js:
--------------------------------------------------------------------------------
1 | Dropzone.autoDiscover = false;
2 |
3 | (function($, window) {
4 |
5 | var dropzone_dict_default_message = 'Drop image here or click to upload.';
6 |
7 | $('.dropzone-to-enable').each(function() {
8 | $(this).addClass('dropzone');
9 |
10 | var thumbDim = (
11 | $(this).closest('.jumbotron').length ? 256 : (
12 | $(this).closest('.modal-content').length ? 1200 : 72));
13 |
14 | var thumbWidth = thumbDim;
15 |
16 | var thumbHeight = (
17 | $(this).closest('.modal-content').length ? 900 : thumbDim);
18 |
19 | $(this).dropzone({
20 | url: $(this).attr('action').replace('/image-update/', '/image-update-dropzone/'),
21 | dictDefaultMessage: dropzone_dict_default_message,
22 | uploadMultiple: false,
23 | paramName: 'image',
24 | thumbnailWidth: thumbWidth,
25 | thumbnailHeight: thumbHeight
26 | });
27 | });
28 |
29 | }).call(this, jQuery, window);
30 |
--------------------------------------------------------------------------------
/flask_editablesite/static/js/editable.js:
--------------------------------------------------------------------------------
1 | (function($, window) {
2 |
3 | $('.form-editable-button').addClass('hidden');
4 |
5 | $('.title-image-wrapper .editable-wrapper, .dante-editable').each(function() {
6 | if ($(this).find('#start_date, #end_date').length) {
7 | $(this).before('
');
8 | }
9 | else if ($(this).find('#start_time, #end_time').length) {
10 | $(this).before('
');
11 | }
12 | else if ($(this).hasClass('dante-editable')) {
13 | $(this).before('
');
14 | }
15 | else {
16 | $(this).before('
');
17 | }
18 | });
19 |
20 | $('.title-image-wrapper .editable-wrapper, .dante-editable')
21 | .hover(function() {
22 | var editableEl = $(this);
23 | if (!$(this).hasClass('dante-editable')) {
24 | editableEl = editableEl.find('input[type=text]');
25 | }
26 |
27 | editableEl.addClass('active');
28 | if (!$(this).hasClass('dante-editable')) {
29 | $(this).prev('.edit-icon-wrapper').find('.glyphicon').wrap('');
30 | }
31 | else {
32 | $(this).closest('.postArticle').prev('.edit-icon-wrapper').find('.glyphicon').wrap('');
33 | }
34 | },
35 | function() {
36 | var editableEl = $(this);
37 | if (!$(this).hasClass('dante-editable')) {
38 | editableEl = editableEl.find('input[type=text]');
39 | }
40 |
41 | editableEl.removeClass('active');
42 | if (!$(this).hasClass('dante-editable')) {
43 | if ($(this).prev('.edit-icon-wrapper').find('.glyphicon').parent('a').length) {
44 | $(this).prev('.edit-icon-wrapper').find('.glyphicon').unwrap();
45 | }
46 | }
47 | else {
48 | if ($(this).closest('.postArticle').prev('.edit-icon-wrapper').find('.glyphicon').parent('a').length) {
49 | $(this).closest('.postArticle').prev('.edit-icon-wrapper').find('.glyphicon').unwrap();
50 | }
51 | }
52 | });
53 |
54 | }).call(this, jQuery, window);
55 |
--------------------------------------------------------------------------------
/flask_editablesite/static/js/pagescroll.js:
--------------------------------------------------------------------------------
1 | (function($, window) {
2 | $('body').on('click', '.page-scroll a', function(event) {
3 | var $anchor = $(this);
4 | $('html, body').stop().animate({
5 | scrollTop: $($anchor.attr('href')).offset().top
6 | }, 1500, 'easeInOutExpo');
7 | event.preventDefault();
8 | });
9 | }).call(this, jQuery, window);
10 |
--------------------------------------------------------------------------------
/flask_editablesite/static/js/weight.js:
--------------------------------------------------------------------------------
1 | (function($, window) {
2 | $('body').on('click', '.weight-move-up, .weight-move-down', function() {
3 | var weightItem = $(this).closest('.weight-item');
4 | var weightFormItemId = null;
5 | var weightFormItem = null;
6 | var weightFormGroup = null;
7 |
8 | if (weightItem.attr('id') && /^for\-/.test(weightItem.attr('id')) && /\-weight$/.test(weightItem.attr('id'))) {
9 | weightFormItemId = weightItem.attr('id').replace('for-', '');
10 | weightFormItem = $('#' + weightFormItemId);
11 |
12 | if (weightFormItem.length) {
13 | weightFormGroup = weightFormItem.parent('.form-group');
14 | }
15 | }
16 |
17 | if ($(this).hasClass('weight-move-up')) {
18 | weightItem.prev('.weight-item').before(weightItem);
19 |
20 | if (weightFormGroup) {
21 | weightFormGroup.prev('.form-group').before(weightFormGroup);
22 | }
23 | }
24 | else {
25 | weightItem.next('.weight-item').after(weightItem);
26 |
27 | if (weightFormGroup) {
28 | weightFormGroup.next('.form-group').after(weightFormGroup);
29 | }
30 | }
31 |
32 | var currWeight = 0;
33 | var weightItems = weightItem.parent('.weight-sortable').children('.weight-item');
34 |
35 | if (weightFormGroup && weightFormGroup.siblings('button[type="submit"].hidden').length) {
36 | weightFormGroup.siblings('button[type="submit"].hidden').removeClass('hidden');
37 | }
38 |
39 | weightItems.each(function(i, v) {
40 | weightItem = $(this);
41 | weightFormItemId = null;
42 | weightFormItem = null;
43 | weightFormGroup = null;
44 |
45 | if (weightItem.attr('id') && /^for\-/.test(weightItem.attr('id')) && /\-weight$/.test(weightItem.attr('id'))) {
46 | weightFormItemId = weightItem.attr('id').replace('for-', '');
47 | weightFormItem = $('#' + weightFormItemId);
48 |
49 | if (weightFormItem.length) {
50 | weightFormGroup = weightFormItem.parent('.form-group');
51 | }
52 | }
53 |
54 | if (weightFormItem) {
55 | $(weightFormItem).val(currWeight);
56 | }
57 | else {
58 | $(this).find('input[type="hidden"][id$="-weight"]').val(currWeight);
59 | }
60 |
61 | currWeight += 1;
62 |
63 | if ($(this).find('.weight-humanized').length) {
64 | $(this).find('.weight-humanized').html(currWeight + '.');
65 | }
66 |
67 | var newControls = '';
68 |
69 | if (i) {
70 | newControls += ' ';
71 | }
72 |
73 | if (i != weightItems.length-1) {
74 | newControls += ' ';
75 | }
76 |
77 | $(this).find('.weight-controls').html(newControls);
78 | });
79 |
80 | return false;
81 | });
82 | }).call(this, jQuery, window);
83 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/fonts/dante/dante.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/Dante/fonts/dante/dante.eot
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/fonts/dante/dante.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/fonts/dante/dante.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/Dante/fonts/dante/dante.ttf
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/fonts/dante/dante.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/Dante/fonts/dante/dante.woff
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/fonts/dante/fontello.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/Dante/fonts/dante/fontello.eot
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/fonts/dante/fontello.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/Dante/fonts/dante/fontello.ttf
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/fonts/dante/fontello.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/Dante/fonts/dante/fontello.woff
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/Dante/images/dante/media-loading-placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/Dante/images/dante/media-loading-placeholder.png
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 | "version": "3.3.4",
5 | "keywords": [
6 | "css",
7 | "js",
8 | "less",
9 | "mobile-first",
10 | "responsive",
11 | "front-end",
12 | "framework",
13 | "web"
14 | ],
15 | "homepage": "http://getbootstrap.com",
16 | "main": [
17 | "less/bootstrap.less",
18 | "dist/css/bootstrap.css",
19 | "dist/js/bootstrap.js",
20 | "dist/fonts/glyphicons-halflings-regular.eot",
21 | "dist/fonts/glyphicons-halflings-regular.svg",
22 | "dist/fonts/glyphicons-halflings-regular.ttf",
23 | "dist/fonts/glyphicons-halflings-regular.woff",
24 | "dist/fonts/glyphicons-halflings-regular.woff2"
25 | ],
26 | "ignore": [
27 | "/.*",
28 | "_config.yml",
29 | "CNAME",
30 | "composer.json",
31 | "CONTRIBUTING.md",
32 | "docs",
33 | "js/tests",
34 | "test-infra"
35 | ],
36 | "dependencies": {
37 | "jquery": ">= 1.9.1"
38 | },
39 | "_release": "3.3.4",
40 | "_resolution": {
41 | "type": "version",
42 | "tag": "v3.3.4",
43 | "commit": "a10eb60bc0b07b747fa0c4ebd8821eb7307bd07f"
44 | },
45 | "_source": "git://github.com/twbs/bootstrap.git",
46 | "_target": "~3.3.4",
47 | "_originalSource": "bootstrap"
48 | }
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2011-2015 Twitter, Inc
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 | "version": "3.3.4",
5 | "keywords": [
6 | "css",
7 | "js",
8 | "less",
9 | "mobile-first",
10 | "responsive",
11 | "front-end",
12 | "framework",
13 | "web"
14 | ],
15 | "homepage": "http://getbootstrap.com",
16 | "main": [
17 | "less/bootstrap.less",
18 | "dist/css/bootstrap.css",
19 | "dist/js/bootstrap.js",
20 | "dist/fonts/glyphicons-halflings-regular.eot",
21 | "dist/fonts/glyphicons-halflings-regular.svg",
22 | "dist/fonts/glyphicons-halflings-regular.ttf",
23 | "dist/fonts/glyphicons-halflings-regular.woff",
24 | "dist/fonts/glyphicons-halflings-regular.woff2"
25 | ],
26 | "ignore": [
27 | "/.*",
28 | "_config.yml",
29 | "CNAME",
30 | "composer.json",
31 | "CONTRIBUTING.md",
32 | "docs",
33 | "js/tests",
34 | "test-infra"
35 | ],
36 | "dependencies": {
37 | "jquery": ">= 1.9.1"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/dist/js/npm.js:
--------------------------------------------------------------------------------
1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2 | require('../../js/transition.js')
3 | require('../../js/alert.js')
4 | require('../../js/button.js')
5 | require('../../js/carousel.js')
6 | require('../../js/collapse.js')
7 | require('../../js/dropdown.js')
8 | require('../../js/modal.js')
9 | require('../../js/tooltip.js')
10 | require('../../js/popover.js')
11 | require('../../js/scrollspy.js')
12 | require('../../js/tab.js')
13 | require('../../js/affix.js')
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jaza/flask-editablesite/a6f22d301516f09ccf79f99c1e10d051871e6d53/flask_editablesite/static/libs/bootstrap/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/grunt/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends" : "../js/.jshintrc",
3 | "asi" : false,
4 | "browser" : false,
5 | "es3" : false,
6 | "node" : true
7 | }
8 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/grunt/bs-commonjs-generator.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | var fs = require('fs');
3 | var path = require('path');
4 |
5 | var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n';
6 |
7 | module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) {
8 | var destDir = path.dirname(destFilepath);
9 |
10 | function srcPathToDestRequire(srcFilepath) {
11 | var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
12 | return 'require(\'' + requirePath + '\')';
13 | }
14 |
15 | var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n');
16 | try {
17 | fs.writeFileSync(destFilepath, moduleOutputJs);
18 | }
19 | catch (err) {
20 | grunt.fail.warn(err);
21 | }
22 | grunt.log.writeln('File ' + destFilepath.cyan + ' created.');
23 | };
24 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/grunt/bs-glyphicons-data-generator.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Grunt task for Glyphicons data generation
3 | * http://getbootstrap.com
4 | * Copyright 2014 Twitter, Inc.
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 | */
7 | 'use strict';
8 | var fs = require('fs');
9 |
10 | module.exports = function generateGlyphiconsData(grunt) {
11 | // Pass encoding, utf8, so `readFileSync` will return a string instead of a
12 | // buffer
13 | var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8');
14 | var glyphiconsLines = glyphiconsFile.split('\n');
15 |
16 | // Use any line that starts with ".glyphicon-" and capture the class name
17 | var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/;
18 | var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' +
19 | '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n';
20 | var glyphiconsYml = 'docs/_data/glyphicons.yml';
21 | for (var i = 0, len = glyphiconsLines.length; i < len; i++) {
22 | var match = glyphiconsLines[i].match(iconClassName);
23 |
24 | if (match !== null) {
25 | glyphiconsData += '- ' + match[1] + '\n';
26 | }
27 | }
28 |
29 | // Create the `_data` directory if it doesn't already exist
30 | if (!fs.existsSync('docs/_data')) {
31 | fs.mkdirSync('docs/_data');
32 | }
33 |
34 | try {
35 | fs.writeFileSync(glyphiconsYml, glyphiconsData);
36 | }
37 | catch (err) {
38 | grunt.fail.warn(err);
39 | }
40 | grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');
41 | };
42 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/grunt/bs-raw-files-generator.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Grunt task for generating raw-files.min.js for the Customizer
3 | * http://getbootstrap.com
4 | * Copyright 2014 Twitter, Inc.
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 | */
7 |
8 | /* global btoa: true */
9 |
10 | 'use strict';
11 | var fs = require('fs');
12 | var btoa = require('btoa');
13 | var glob = require('glob');
14 |
15 | function getFiles(type) {
16 | var files = {};
17 | var recursive = (type === 'less');
18 | var globExpr = (recursive ? '/**/*' : '/*');
19 | glob.sync(type + globExpr)
20 | .filter(function (path) {
21 | return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path);
22 | })
23 | .forEach(function (fullPath) {
24 | var relativePath = fullPath.replace(/^[^/]+\//, '');
25 | files[relativePath] = (type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'));
26 | });
27 | return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
28 | }
29 |
30 | module.exports = function generateRawFilesJs(grunt, banner) {
31 | if (!banner) {
32 | banner = '';
33 | }
34 | var dirs = ['js', 'less', 'fonts'];
35 | var files = banner + dirs.map(getFiles).reduce(function (combined, file) {
36 | return combined + file;
37 | }, '');
38 | var rawFilesJs = 'docs/assets/js/raw-files.min.js';
39 | try {
40 | fs.writeFileSync(rawFilesJs, files);
41 | }
42 | catch (err) {
43 | grunt.fail.warn(err);
44 | }
45 | grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.');
46 | };
47 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/grunt/configBridge.json:
--------------------------------------------------------------------------------
1 | {
2 | "paths": {
3 | "customizerJs": [
4 | "../assets/js/vendor/autoprefixer.js",
5 | "../assets/js/vendor/less.min.js",
6 | "../assets/js/vendor/jszip.min.js",
7 | "../assets/js/vendor/uglify.min.js",
8 | "../assets/js/vendor/Blob.js",
9 | "../assets/js/vendor/FileSaver.js",
10 | "../assets/js/raw-files.min.js",
11 | "../assets/js/src/customizer.js"
12 | ],
13 | "docsJs": [
14 | "../assets/js/vendor/holder.js",
15 | "../assets/js/vendor/ZeroClipboard.min.js",
16 | "../assets/js/vendor/anchor.js",
17 | "../assets/js/src/application.js"
18 | ]
19 | },
20 | "config": {
21 | "autoprefixerBrowsers": [
22 | "Android 2.3",
23 | "Android >= 4",
24 | "Chrome >= 20",
25 | "Firefox >= 24",
26 | "Explorer >= 8",
27 | "iOS >= 6",
28 | "Opera >= 12",
29 | "Safari >= 6"
30 | ],
31 | "jqueryCheck": [
32 | "if (typeof jQuery === 'undefined') {",
33 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery')",
34 | "}\n"
35 | ],
36 | "jqueryVersionCheck": [
37 | "+function ($) {",
38 | " 'use strict';",
39 | " var version = $.fn.jquery.split(' ')[0].split('.')",
40 | " if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {",
41 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')",
42 | " }",
43 | "}(jQuery);\n\n"
44 | ]
45 | }
46 | }
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/grunt/sauce_browsers.yml:
--------------------------------------------------------------------------------
1 | [
2 | # Docs: https://saucelabs.com/docs/platforms/webdriver
3 |
4 | {
5 | browserName: "safari",
6 | platform: "OS X 10.10"
7 | },
8 | {
9 | browserName: "chrome",
10 | platform: "OS X 10.10"
11 | },
12 | {
13 | browserName: "firefox",
14 | platform: "OS X 10.10"
15 | },
16 |
17 | # Mac Opera not currently supported by Sauce Labs
18 |
19 | {
20 | browserName: "internet explorer",
21 | version: "11",
22 | platform: "Windows 8.1"
23 | },
24 | {
25 | browserName: "internet explorer",
26 | version: "10",
27 | platform: "Windows 8"
28 | },
29 | {
30 | browserName: "internet explorer",
31 | version: "9",
32 | platform: "Windows 7"
33 | },
34 | {
35 | browserName: "internet explorer",
36 | version: "8",
37 | platform: "Windows 7"
38 | },
39 |
40 | # { # Unofficial
41 | # browserName: "internet explorer",
42 | # version: "7",
43 | # platform: "Windows XP"
44 | # },
45 |
46 | {
47 | browserName: "chrome",
48 | platform: "Windows 8.1"
49 | },
50 | {
51 | browserName: "firefox",
52 | platform: "Windows 8.1"
53 | },
54 |
55 | # Win Opera 15+ not currently supported by Sauce Labs
56 |
57 | {
58 | browserName: "iphone",
59 | platform: "OS X 10.10",
60 | version: "8.1"
61 | },
62 |
63 | # iOS Chrome not currently supported by Sauce Labs
64 |
65 | # Linux (unofficial)
66 | {
67 | browserName: "chrome",
68 | platform: "Linux"
69 | },
70 | {
71 | browserName: "firefox",
72 | platform: "Linux"
73 | }
74 |
75 | # Android Chrome not currently supported by Sauce Labs
76 |
77 | # { # Android Browser (super-unofficial)
78 | # browserName: "android",
79 | # version: "4.0",
80 | # platform: "Linux"
81 | # }
82 | ]
83 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/js/.jscsrc:
--------------------------------------------------------------------------------
1 | {
2 | "disallowEmptyBlocks": true,
3 | "disallowKeywords": ["with"],
4 | "disallowMixedSpacesAndTabs": true,
5 | "disallowMultipleLineStrings": true,
6 | "disallowMultipleVarDecl": true,
7 | "disallowQuotedKeysInObjects": "allButReserved",
8 | "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
9 | "disallowSpaceBeforeBinaryOperators": [","],
10 | "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
11 | "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
12 | "disallowSpacesInsideArrayBrackets": true,
13 | "disallowSpacesInsideParentheses": true,
14 | "disallowTrailingComma": true,
15 | "disallowTrailingWhitespace": true,
16 | "requireCamelCaseOrUpperCaseIdentifiers": true,
17 | "requireCapitalizedConstructors": true,
18 | "requireCommaBeforeLineBreak": true,
19 | "requireDotNotation": true,
20 | "requireLineFeedAtFileEnd": true,
21 | "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
22 | "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
23 | "requireSpaceAfterLineComment": true,
24 | "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
25 | "requireSpaceBetweenArguments": true,
26 | "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
27 | "requireSpacesInConditionalExpression": true,
28 | "requireSpacesInForStatement": true,
29 | "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
30 | "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
31 | "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
32 | "requireSpacesInsideObjectBrackets": "allButNested",
33 | "validateIndentation": 2,
34 | "validateLineBreaks": "LF",
35 | "validateQuoteMarks": "'"
36 | }
37 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/js/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "asi" : true,
3 | "browser" : true,
4 | "eqeqeq" : false,
5 | "eqnull" : true,
6 | "es3" : true,
7 | "expr" : true,
8 | "jquery" : true,
9 | "latedef" : true,
10 | "laxbreak" : true,
11 | "nonbsp" : true,
12 | "strict" : true,
13 | "undef" : true,
14 | "unused" : true
15 | }
16 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/js/alert.js:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * Bootstrap: alert.js v3.3.4
3 | * http://getbootstrap.com/javascript/#alerts
4 | * ========================================================================
5 | * Copyright 2011-2015 Twitter, Inc.
6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 | * ======================================================================== */
8 |
9 |
10 | +function ($) {
11 | 'use strict';
12 |
13 | // ALERT CLASS DEFINITION
14 | // ======================
15 |
16 | var dismiss = '[data-dismiss="alert"]'
17 | var Alert = function (el) {
18 | $(el).on('click', dismiss, this.close)
19 | }
20 |
21 | Alert.VERSION = '3.3.4'
22 |
23 | Alert.TRANSITION_DURATION = 150
24 |
25 | Alert.prototype.close = function (e) {
26 | var $this = $(this)
27 | var selector = $this.attr('data-target')
28 |
29 | if (!selector) {
30 | selector = $this.attr('href')
31 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
32 | }
33 |
34 | var $parent = $(selector)
35 |
36 | if (e) e.preventDefault()
37 |
38 | if (!$parent.length) {
39 | $parent = $this.closest('.alert')
40 | }
41 |
42 | $parent.trigger(e = $.Event('close.bs.alert'))
43 |
44 | if (e.isDefaultPrevented()) return
45 |
46 | $parent.removeClass('in')
47 |
48 | function removeElement() {
49 | // detach from parent, fire event then clean up data
50 | $parent.detach().trigger('closed.bs.alert').remove()
51 | }
52 |
53 | $.support.transition && $parent.hasClass('fade') ?
54 | $parent
55 | .one('bsTransitionEnd', removeElement)
56 | .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
57 | removeElement()
58 | }
59 |
60 |
61 | // ALERT PLUGIN DEFINITION
62 | // =======================
63 |
64 | function Plugin(option) {
65 | return this.each(function () {
66 | var $this = $(this)
67 | var data = $this.data('bs.alert')
68 |
69 | if (!data) $this.data('bs.alert', (data = new Alert(this)))
70 | if (typeof option == 'string') data[option].call($this)
71 | })
72 | }
73 |
74 | var old = $.fn.alert
75 |
76 | $.fn.alert = Plugin
77 | $.fn.alert.Constructor = Alert
78 |
79 |
80 | // ALERT NO CONFLICT
81 | // =================
82 |
83 | $.fn.alert.noConflict = function () {
84 | $.fn.alert = old
85 | return this
86 | }
87 |
88 |
89 | // ALERT DATA-API
90 | // ==============
91 |
92 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
93 |
94 | }(jQuery);
95 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/js/transition.js:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * Bootstrap: transition.js v3.3.4
3 | * http://getbootstrap.com/javascript/#transitions
4 | * ========================================================================
5 | * Copyright 2011-2015 Twitter, Inc.
6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 | * ======================================================================== */
8 |
9 |
10 | +function ($) {
11 | 'use strict';
12 |
13 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
14 | // ============================================================
15 |
16 | function transitionEnd() {
17 | var el = document.createElement('bootstrap')
18 |
19 | var transEndEventNames = {
20 | WebkitTransition : 'webkitTransitionEnd',
21 | MozTransition : 'transitionend',
22 | OTransition : 'oTransitionEnd otransitionend',
23 | transition : 'transitionend'
24 | }
25 |
26 | for (var name in transEndEventNames) {
27 | if (el.style[name] !== undefined) {
28 | return { end: transEndEventNames[name] }
29 | }
30 | }
31 |
32 | return false // explicit for ie8 ( ._.)
33 | }
34 |
35 | // http://blog.alexmaccaw.com/css-transitions
36 | $.fn.emulateTransitionEnd = function (duration) {
37 | var called = false
38 | var $el = this
39 | $(this).one('bsTransitionEnd', function () { called = true })
40 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
41 | setTimeout(callback, duration)
42 | return this
43 | }
44 |
45 | $(function () {
46 | $.support.transition = transitionEnd()
47 |
48 | if (!$.support.transition) return
49 |
50 | $.event.special.bsTransitionEnd = {
51 | bindType: $.support.transition.end,
52 | delegateType: $.support.transition.end,
53 | handle: function (e) {
54 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
55 | }
56 | }
57 | })
58 |
59 | }(jQuery);
60 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/.csslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "adjoining-classes": false,
3 | "box-sizing": false,
4 | "box-model": false,
5 | "compatible-vendor-prefixes": false,
6 | "floats": false,
7 | "font-sizes": false,
8 | "gradients": false,
9 | "important": false,
10 | "known-properties": false,
11 | "outline-none": false,
12 | "qualified-headings": false,
13 | "regex-selectors": false,
14 | "shorthand": false,
15 | "text-indent": false,
16 | "unique-headings": false,
17 | "universal-selector": false,
18 | "unqualified-attributes": false
19 | }
20 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/alerts.less:
--------------------------------------------------------------------------------
1 | //
2 | // Alerts
3 | // --------------------------------------------------
4 |
5 |
6 | // Base styles
7 | // -------------------------
8 |
9 | .alert {
10 | padding: @alert-padding;
11 | margin-bottom: @line-height-computed;
12 | border: 1px solid transparent;
13 | border-radius: @alert-border-radius;
14 |
15 | // Headings for larger alerts
16 | h4 {
17 | margin-top: 0;
18 | // Specified for the h4 to prevent conflicts of changing @headings-color
19 | color: inherit;
20 | }
21 |
22 | // Provide class for links that match alerts
23 | .alert-link {
24 | font-weight: @alert-link-font-weight;
25 | }
26 |
27 | // Improve alignment and spacing of inner content
28 | > p,
29 | > ul {
30 | margin-bottom: 0;
31 | }
32 |
33 | > p + p {
34 | margin-top: 5px;
35 | }
36 | }
37 |
38 | // Dismissible alerts
39 | //
40 | // Expand the right padding and account for the close button's positioning.
41 |
42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
43 | .alert-dismissible {
44 | padding-right: (@alert-padding + 20);
45 |
46 | // Adjust close link position
47 | .close {
48 | position: relative;
49 | top: -2px;
50 | right: -21px;
51 | color: inherit;
52 | }
53 | }
54 |
55 | // Alternate styles
56 | //
57 | // Generate contextual modifier classes for colorizing the alert.
58 |
59 | .alert-success {
60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
61 | }
62 |
63 | .alert-info {
64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
65 | }
66 |
67 | .alert-warning {
68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
69 | }
70 |
71 | .alert-danger {
72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
73 | }
74 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/badges.less:
--------------------------------------------------------------------------------
1 | //
2 | // Badges
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .badge {
8 | display: inline-block;
9 | min-width: 10px;
10 | padding: 3px 7px;
11 | font-size: @font-size-small;
12 | font-weight: @badge-font-weight;
13 | color: @badge-color;
14 | line-height: @badge-line-height;
15 | vertical-align: baseline;
16 | white-space: nowrap;
17 | text-align: center;
18 | background-color: @badge-bg;
19 | border-radius: @badge-border-radius;
20 |
21 | // Empty badges collapse automatically (not available in IE8)
22 | &:empty {
23 | display: none;
24 | }
25 |
26 | // Quick fix for badges in buttons
27 | .btn & {
28 | position: relative;
29 | top: -1px;
30 | }
31 |
32 | .btn-xs &,
33 | .btn-group-xs > .btn & {
34 | top: 0;
35 | padding: 1px 5px;
36 | }
37 |
38 | // Hover state, but only for links
39 | a& {
40 | &:hover,
41 | &:focus {
42 | color: @badge-link-hover-color;
43 | text-decoration: none;
44 | cursor: pointer;
45 | }
46 | }
47 |
48 | // Account for badges in navs
49 | .list-group-item.active > &,
50 | .nav-pills > .active > a > & {
51 | color: @badge-active-color;
52 | background-color: @badge-active-bg;
53 | }
54 |
55 | .list-group-item > & {
56 | float: right;
57 | }
58 |
59 | .list-group-item > & + & {
60 | margin-right: 5px;
61 | }
62 |
63 | .nav-pills > li > a > & {
64 | margin-left: 3px;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/bootstrap.less:
--------------------------------------------------------------------------------
1 | // Core variables and mixins
2 | @import "variables.less";
3 | @import "mixins.less";
4 |
5 | // Reset and dependencies
6 | @import "normalize.less";
7 | @import "print.less";
8 | @import "glyphicons.less";
9 |
10 | // Core CSS
11 | @import "scaffolding.less";
12 | @import "type.less";
13 | @import "code.less";
14 | @import "grid.less";
15 | @import "tables.less";
16 | @import "forms.less";
17 | @import "buttons.less";
18 |
19 | // Components
20 | @import "component-animations.less";
21 | @import "dropdowns.less";
22 | @import "button-groups.less";
23 | @import "input-groups.less";
24 | @import "navs.less";
25 | @import "navbar.less";
26 | @import "breadcrumbs.less";
27 | @import "pagination.less";
28 | @import "pager.less";
29 | @import "labels.less";
30 | @import "badges.less";
31 | @import "jumbotron.less";
32 | @import "thumbnails.less";
33 | @import "alerts.less";
34 | @import "progress-bars.less";
35 | @import "media.less";
36 | @import "list-group.less";
37 | @import "panels.less";
38 | @import "responsive-embed.less";
39 | @import "wells.less";
40 | @import "close.less";
41 |
42 | // Components w/ JavaScript
43 | @import "modals.less";
44 | @import "tooltip.less";
45 | @import "popovers.less";
46 | @import "carousel.less";
47 |
48 | // Utility classes
49 | @import "utilities.less";
50 | @import "responsive-utilities.less";
51 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/breadcrumbs.less:
--------------------------------------------------------------------------------
1 | //
2 | // Breadcrumbs
3 | // --------------------------------------------------
4 |
5 |
6 | .breadcrumb {
7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
8 | margin-bottom: @line-height-computed;
9 | list-style: none;
10 | background-color: @breadcrumb-bg;
11 | border-radius: @border-radius-base;
12 |
13 | > li {
14 | display: inline-block;
15 |
16 | + li:before {
17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
18 | padding: 0 5px;
19 | color: @breadcrumb-color;
20 | }
21 | }
22 |
23 | > .active {
24 | color: @breadcrumb-active-color;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/close.less:
--------------------------------------------------------------------------------
1 | //
2 | // Close icons
3 | // --------------------------------------------------
4 |
5 |
6 | .close {
7 | float: right;
8 | font-size: (@font-size-base * 1.5);
9 | font-weight: @close-font-weight;
10 | line-height: 1;
11 | color: @close-color;
12 | text-shadow: @close-text-shadow;
13 | .opacity(.2);
14 |
15 | &:hover,
16 | &:focus {
17 | color: @close-color;
18 | text-decoration: none;
19 | cursor: pointer;
20 | .opacity(.5);
21 | }
22 |
23 | // Additional properties for button version
24 | // iOS requires the button element instead of an anchor tag.
25 | // If you want the anchor version, it requires `href="#"`.
26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
27 | button& {
28 | padding: 0;
29 | cursor: pointer;
30 | background: transparent;
31 | border: 0;
32 | -webkit-appearance: none;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/code.less:
--------------------------------------------------------------------------------
1 | //
2 | // Code (inline and block)
3 | // --------------------------------------------------
4 |
5 |
6 | // Inline and block code styles
7 | code,
8 | kbd,
9 | pre,
10 | samp {
11 | font-family: @font-family-monospace;
12 | }
13 |
14 | // Inline code
15 | code {
16 | padding: 2px 4px;
17 | font-size: 90%;
18 | color: @code-color;
19 | background-color: @code-bg;
20 | border-radius: @border-radius-base;
21 | }
22 |
23 | // User input typically entered via keyboard
24 | kbd {
25 | padding: 2px 4px;
26 | font-size: 90%;
27 | color: @kbd-color;
28 | background-color: @kbd-bg;
29 | border-radius: @border-radius-small;
30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
31 |
32 | kbd {
33 | padding: 0;
34 | font-size: 100%;
35 | font-weight: bold;
36 | box-shadow: none;
37 | }
38 | }
39 |
40 | // Blocks of code
41 | pre {
42 | display: block;
43 | padding: ((@line-height-computed - 1) / 2);
44 | margin: 0 0 (@line-height-computed / 2);
45 | font-size: (@font-size-base - 1); // 14px to 13px
46 | line-height: @line-height-base;
47 | word-break: break-all;
48 | word-wrap: break-word;
49 | color: @pre-color;
50 | background-color: @pre-bg;
51 | border: 1px solid @pre-border-color;
52 | border-radius: @border-radius-base;
53 |
54 | // Account for some code outputs that place code tags in pre tags
55 | code {
56 | padding: 0;
57 | font-size: inherit;
58 | color: inherit;
59 | white-space: pre-wrap;
60 | background-color: transparent;
61 | border-radius: 0;
62 | }
63 | }
64 |
65 | // Enable scrollable blocks of code
66 | .pre-scrollable {
67 | max-height: @pre-scrollable-max-height;
68 | overflow-y: scroll;
69 | }
70 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/component-animations.less:
--------------------------------------------------------------------------------
1 | //
2 | // Component animations
3 | // --------------------------------------------------
4 |
5 | // Heads up!
6 | //
7 | // We don't use the `.opacity()` mixin here since it causes a bug with text
8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9 |
10 | .fade {
11 | opacity: 0;
12 | .transition(opacity .15s linear);
13 | &.in {
14 | opacity: 1;
15 | }
16 | }
17 |
18 | .collapse {
19 | display: none;
20 |
21 | &.in { display: block; }
22 | tr&.in { display: table-row; }
23 | tbody&.in { display: table-row-group; }
24 | }
25 |
26 | .collapsing {
27 | position: relative;
28 | height: 0;
29 | overflow: hidden;
30 | .transition-property(~"height, visibility");
31 | .transition-duration(.35s);
32 | .transition-timing-function(ease);
33 | }
34 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/grid.less:
--------------------------------------------------------------------------------
1 | //
2 | // Grid system
3 | // --------------------------------------------------
4 |
5 |
6 | // Container widths
7 | //
8 | // Set the container width, and override it for fixed navbars in media queries.
9 |
10 | .container {
11 | .container-fixed();
12 |
13 | @media (min-width: @screen-sm-min) {
14 | width: @container-sm;
15 | }
16 | @media (min-width: @screen-md-min) {
17 | width: @container-md;
18 | }
19 | @media (min-width: @screen-lg-min) {
20 | width: @container-lg;
21 | }
22 | }
23 |
24 |
25 | // Fluid container
26 | //
27 | // Utilizes the mixin meant for fixed width containers, but without any defined
28 | // width for fluid, full width layouts.
29 |
30 | .container-fluid {
31 | .container-fixed();
32 | }
33 |
34 |
35 | // Row
36 | //
37 | // Rows contain and clear the floats of your columns.
38 |
39 | .row {
40 | .make-row();
41 | }
42 |
43 |
44 | // Columns
45 | //
46 | // Common styles for small and large grid columns
47 |
48 | .make-grid-columns();
49 |
50 |
51 | // Extra small grid
52 | //
53 | // Columns, offsets, pushes, and pulls for extra small devices like
54 | // smartphones.
55 |
56 | .make-grid(xs);
57 |
58 |
59 | // Small grid
60 | //
61 | // Columns, offsets, pushes, and pulls for the small device range, from phones
62 | // to tablets.
63 |
64 | @media (min-width: @screen-sm-min) {
65 | .make-grid(sm);
66 | }
67 |
68 |
69 | // Medium grid
70 | //
71 | // Columns, offsets, pushes, and pulls for the desktop device range.
72 |
73 | @media (min-width: @screen-md-min) {
74 | .make-grid(md);
75 | }
76 |
77 |
78 | // Large grid
79 | //
80 | // Columns, offsets, pushes, and pulls for the large desktop device range.
81 |
82 | @media (min-width: @screen-lg-min) {
83 | .make-grid(lg);
84 | }
85 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/jumbotron.less:
--------------------------------------------------------------------------------
1 | //
2 | // Jumbotron
3 | // --------------------------------------------------
4 |
5 |
6 | .jumbotron {
7 | padding: @jumbotron-padding (@jumbotron-padding / 2);
8 | margin-bottom: @jumbotron-padding;
9 | color: @jumbotron-color;
10 | background-color: @jumbotron-bg;
11 |
12 | h1,
13 | .h1 {
14 | color: @jumbotron-heading-color;
15 | }
16 |
17 | p {
18 | margin-bottom: (@jumbotron-padding / 2);
19 | font-size: @jumbotron-font-size;
20 | font-weight: 200;
21 | }
22 |
23 | > hr {
24 | border-top-color: darken(@jumbotron-bg, 10%);
25 | }
26 |
27 | .container &,
28 | .container-fluid & {
29 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
30 | }
31 |
32 | .container {
33 | max-width: 100%;
34 | }
35 |
36 | @media screen and (min-width: @screen-sm-min) {
37 | padding: (@jumbotron-padding * 1.6) 0;
38 |
39 | .container &,
40 | .container-fluid & {
41 | padding-left: (@jumbotron-padding * 2);
42 | padding-right: (@jumbotron-padding * 2);
43 | }
44 |
45 | h1,
46 | .h1 {
47 | font-size: (@font-size-base * 4.5);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/labels.less:
--------------------------------------------------------------------------------
1 | //
2 | // Labels
3 | // --------------------------------------------------
4 |
5 | .label {
6 | display: inline;
7 | padding: .2em .6em .3em;
8 | font-size: 75%;
9 | font-weight: bold;
10 | line-height: 1;
11 | color: @label-color;
12 | text-align: center;
13 | white-space: nowrap;
14 | vertical-align: baseline;
15 | border-radius: .25em;
16 |
17 | // Add hover effects, but only for links
18 | a& {
19 | &:hover,
20 | &:focus {
21 | color: @label-link-hover-color;
22 | text-decoration: none;
23 | cursor: pointer;
24 | }
25 | }
26 |
27 | // Empty labels collapse automatically (not available in IE8)
28 | &:empty {
29 | display: none;
30 | }
31 |
32 | // Quick fix for labels in buttons
33 | .btn & {
34 | position: relative;
35 | top: -1px;
36 | }
37 | }
38 |
39 | // Colors
40 | // Contextual variations (linked labels get darker on :hover)
41 |
42 | .label-default {
43 | .label-variant(@label-default-bg);
44 | }
45 |
46 | .label-primary {
47 | .label-variant(@label-primary-bg);
48 | }
49 |
50 | .label-success {
51 | .label-variant(@label-success-bg);
52 | }
53 |
54 | .label-info {
55 | .label-variant(@label-info-bg);
56 | }
57 |
58 | .label-warning {
59 | .label-variant(@label-warning-bg);
60 | }
61 |
62 | .label-danger {
63 | .label-variant(@label-danger-bg);
64 | }
65 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/media.less:
--------------------------------------------------------------------------------
1 | .media {
2 | // Proper spacing between instances of .media
3 | margin-top: 15px;
4 |
5 | &:first-child {
6 | margin-top: 0;
7 | }
8 | }
9 |
10 | .media,
11 | .media-body {
12 | zoom: 1;
13 | overflow: hidden;
14 | }
15 |
16 | .media-body {
17 | width: 10000px;
18 | }
19 |
20 | .media-object {
21 | display: block;
22 | }
23 |
24 | .media-right,
25 | .media > .pull-right {
26 | padding-left: 10px;
27 | }
28 |
29 | .media-left,
30 | .media > .pull-left {
31 | padding-right: 10px;
32 | }
33 |
34 | .media-left,
35 | .media-right,
36 | .media-body {
37 | display: table-cell;
38 | vertical-align: top;
39 | }
40 |
41 | .media-middle {
42 | vertical-align: middle;
43 | }
44 |
45 | .media-bottom {
46 | vertical-align: bottom;
47 | }
48 |
49 | // Reset margins on headings for tighter default spacing
50 | .media-heading {
51 | margin-top: 0;
52 | margin-bottom: 5px;
53 | }
54 |
55 | // Media list variation
56 | //
57 | // Undo default ul/ol styles
58 | .media-list {
59 | padding-left: 0;
60 | list-style: none;
61 | }
62 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 |
4 | // Utilities
5 | @import "mixins/hide-text.less";
6 | @import "mixins/opacity.less";
7 | @import "mixins/image.less";
8 | @import "mixins/labels.less";
9 | @import "mixins/reset-filter.less";
10 | @import "mixins/resize.less";
11 | @import "mixins/responsive-visibility.less";
12 | @import "mixins/size.less";
13 | @import "mixins/tab-focus.less";
14 | @import "mixins/text-emphasis.less";
15 | @import "mixins/text-overflow.less";
16 | @import "mixins/vendor-prefixes.less";
17 |
18 | // Components
19 | @import "mixins/alerts.less";
20 | @import "mixins/buttons.less";
21 | @import "mixins/panels.less";
22 | @import "mixins/pagination.less";
23 | @import "mixins/list-group.less";
24 | @import "mixins/nav-divider.less";
25 | @import "mixins/forms.less";
26 | @import "mixins/progress-bar.less";
27 | @import "mixins/table-row.less";
28 |
29 | // Skins
30 | @import "mixins/background-variant.less";
31 | @import "mixins/border-radius.less";
32 | @import "mixins/gradients.less";
33 |
34 | // Layout
35 | @import "mixins/clearfix.less";
36 | @import "mixins/center-block.less";
37 | @import "mixins/nav-vertical-align.less";
38 | @import "mixins/grid-framework.less";
39 | @import "mixins/grid.less";
40 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins/alerts.less:
--------------------------------------------------------------------------------
1 | // Alerts
2 |
3 | .alert-variant(@background; @border; @text-color) {
4 | background-color: @background;
5 | border-color: @border;
6 | color: @text-color;
7 |
8 | hr {
9 | border-top-color: darken(@border, 5%);
10 | }
11 | .alert-link {
12 | color: darken(@text-color, 10%);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins/background-variant.less:
--------------------------------------------------------------------------------
1 | // Contextual backgrounds
2 |
3 | .bg-variant(@color) {
4 | background-color: @color;
5 | a&:hover {
6 | background-color: darken(@color, 10%);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins/border-radius.less:
--------------------------------------------------------------------------------
1 | // Single side border-radius
2 |
3 | .border-top-radius(@radius) {
4 | border-top-right-radius: @radius;
5 | border-top-left-radius: @radius;
6 | }
7 | .border-right-radius(@radius) {
8 | border-bottom-right-radius: @radius;
9 | border-top-right-radius: @radius;
10 | }
11 | .border-bottom-radius(@radius) {
12 | border-bottom-right-radius: @radius;
13 | border-bottom-left-radius: @radius;
14 | }
15 | .border-left-radius(@radius) {
16 | border-bottom-left-radius: @radius;
17 | border-top-left-radius: @radius;
18 | }
19 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins/buttons.less:
--------------------------------------------------------------------------------
1 | // Button variants
2 | //
3 | // Easily pump out default styles, as well as :hover, :focus, :active,
4 | // and disabled options for all buttons
5 |
6 | .button-variant(@color; @background; @border) {
7 | color: @color;
8 | background-color: @background;
9 | border-color: @border;
10 |
11 | &:hover,
12 | &:focus,
13 | &.focus,
14 | &:active,
15 | &.active,
16 | .open > .dropdown-toggle& {
17 | color: @color;
18 | background-color: darken(@background, 10%);
19 | border-color: darken(@border, 12%);
20 | }
21 | &:active,
22 | &.active,
23 | .open > .dropdown-toggle& {
24 | background-image: none;
25 | }
26 | &.disabled,
27 | &[disabled],
28 | fieldset[disabled] & {
29 | &,
30 | &:hover,
31 | &:focus,
32 | &.focus,
33 | &:active,
34 | &.active {
35 | background-color: @background;
36 | border-color: @border;
37 | }
38 | }
39 |
40 | .badge {
41 | color: @background;
42 | background-color: @color;
43 | }
44 | }
45 |
46 | // Button sizes
47 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
48 | padding: @padding-vertical @padding-horizontal;
49 | font-size: @font-size;
50 | line-height: @line-height;
51 | border-radius: @border-radius;
52 | }
53 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins/center-block.less:
--------------------------------------------------------------------------------
1 | // Center-align a block level element
2 |
3 | .center-block() {
4 | display: block;
5 | margin-left: auto;
6 | margin-right: auto;
7 | }
8 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins/clearfix.less:
--------------------------------------------------------------------------------
1 | // Clearfix
2 | //
3 | // For modern browsers
4 | // 1. The space content is one way to avoid an Opera bug when the
5 | // contenteditable attribute is included anywhere else in the document.
6 | // Otherwise it causes space to appear at the top and bottom of elements
7 | // that are clearfixed.
8 | // 2. The use of `table` rather than `block` is only necessary if using
9 | // `:before` to contain the top-margins of child elements.
10 | //
11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/
12 |
13 | .clearfix() {
14 | &:before,
15 | &:after {
16 | content: " "; // 1
17 | display: table; // 2
18 | }
19 | &:after {
20 | clear: both;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/flask_editablesite/static/libs/bootstrap/less/mixins/forms.less:
--------------------------------------------------------------------------------
1 | // Form validation states
2 | //
3 | // Used in forms.less to generate the form validation CSS for warnings, errors,
4 | // and successes.
5 |
6 | .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
7 | // Color the label and help text
8 | .help-block,
9 | .control-label,
10 | .radio,
11 | .checkbox,
12 | .radio-inline,
13 | .checkbox-inline,
14 | &.radio label,
15 | &.checkbox label,
16 | &.radio-inline label,
17 | &.checkbox-inline label {
18 | color: @text-color;
19 | }
20 | // Set the border and box shadow on specific inputs to match
21 | .form-control {
22 | border-color: @border-color;
23 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
24 | &:focus {
25 | border-color: darken(@border-color, 10%);
26 | @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
27 | .box-shadow(@shadow);
28 | }
29 | }
30 | // Set validation states also for addons
31 | .input-group-addon {
32 | color: @text-color;
33 | border-color: @border-color;
34 | background-color: @background-color;
35 | }
36 | // Optional feedback icon
37 | .form-control-feedback {
38 | color: @text-color;
39 | }
40 | }
41 |
42 |
43 | // Form control focus state
44 | //
45 | // Generate a customized focus state and for any input with the specified color,
46 | // which defaults to the `@input-border-focus` variable.
47 | //
48 | // We highly encourage you to not customize the default value, but instead use
49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on
50 | // WebKit's default styles, but applicable to a wider range of browsers. Its
51 | // usability and accessibility should be taken into account with any change.
52 | //
53 | // Example usage: change the default blue border and shadow to white for better
54 | // contrast against a dark gray background.
55 | .form-control-focus(@color: @input-border-focus) {
56 | @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
57 | &:focus {
58 | border-color: @color;
59 | outline: 0;
60 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
61 | }
62 | }
63 |
64 | // Form control sizing
65 | //
66 | // Relative text size, padding, and border-radii changes for form controls. For
67 | // horizontal sizing, wrap controls in the predefined grid classes. `