├── app ├── views │ ├── __init__.py │ ├── home.py │ ├── error.py │ ├── styleguide.py │ └── paste.py ├── static │ ├── scss │ │ ├── components │ │ │ ├── _comments.scss │ │ │ ├── _buttons.scss │ │ │ ├── _alerts.scss │ │ │ ├── _editor.scss │ │ │ └── _forms.scss │ │ ├── .sass-cache │ │ │ ├── 20b1dacf105ca8c68c01e89d19c061135c5885ac │ │ │ │ ├── _grid.scssc │ │ │ │ ├── _main.scssc │ │ │ │ ├── _footer.scssc │ │ │ │ ├── _header.scssc │ │ │ │ └── _comments.scssc │ │ │ ├── 2e3effafe6914928e902140df12907986ede24ef │ │ │ │ └── _type.scssc │ │ │ ├── 3b23e2aae88044aeb1e9a696f483279dd2592aa7 │ │ │ │ ├── base.scssc │ │ │ │ ├── grid.scssc │ │ │ │ └── toolbox.scssc │ │ │ ├── 3ca1ea5a74a49ac55ffb43db478b25a810b708f8 │ │ │ │ ├── _hyx.scssc │ │ │ │ ├── hyx.scssc │ │ │ │ ├── _normalize.scssc │ │ │ │ └── normalize.scssc │ │ │ ├── 42cf9528ef5dfd3d67823e4d89ef92017c4ccea5 │ │ │ │ ├── main.scssc │ │ │ │ ├── header.scssc │ │ │ │ ├── comments.scssc │ │ │ │ └── footer.scssc │ │ │ ├── 45a0ac165468325dc800454f8d244477f1eba3a4 │ │ │ │ ├── forms.scssc │ │ │ │ ├── _alerts.scssc │ │ │ │ ├── _editor.scssc │ │ │ │ ├── _forms.scssc │ │ │ │ ├── alerts.scssc │ │ │ │ ├── buttons.scssc │ │ │ │ ├── editor.scssc │ │ │ │ └── _buttons.scssc │ │ │ ├── 4c011645740a0ec34af721df1a3c682d2a032802 │ │ │ │ ├── style.scssc │ │ │ │ ├── normalize.scssc │ │ │ │ └── variables.scssc │ │ │ ├── 57c2c2db7acb49e9d1dbce293ead9614df9f16bc │ │ │ │ ├── _hyx.scssc │ │ │ │ └── _normalize.scssc │ │ │ ├── 85ac203039e421e77c7e44643dd207bf2986680c │ │ │ │ └── type.scssc │ │ │ ├── 897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f │ │ │ │ ├── _base.scssc │ │ │ │ ├── _grid.scssc │ │ │ │ ├── _toolbox.scssc │ │ │ │ ├── _typography.scssc │ │ │ │ └── _colors.scssc │ │ │ ├── 9959f85ffedc9946b73cee2718acb7c23d18da9d │ │ │ │ ├── style.scssc │ │ │ │ └── _variables.scssc │ │ │ ├── 9f99231643c1ad3cb833c4ac5cd77849f44cff70 │ │ │ │ ├── forms.scssc │ │ │ │ ├── alerts.scssc │ │ │ │ ├── buttons.scssc │ │ │ │ └── editor.scssc │ │ │ ├── a4d30ef5c10d9dfad93e23b5afc5f07f699fa2e4 │ │ │ │ ├── style.scssc │ │ │ │ └── variables.scssc │ │ │ ├── b7063f693f79941e4035d3b82ad3b136870043d4 │ │ │ │ ├── _base.scssc │ │ │ │ ├── _grid.scssc │ │ │ │ ├── base.scssc │ │ │ │ ├── grid.scssc │ │ │ │ ├── toolbox.scssc │ │ │ │ ├── _toolbox.scssc │ │ │ │ ├── colors.scssc │ │ │ │ └── _colors.scssc │ │ │ ├── b8d886e1cbeab963ba927aea1ed200f4bc5b5e4e │ │ │ │ ├── base.scssc │ │ │ │ ├── grid.scssc │ │ │ │ └── toolbox.scssc │ │ │ ├── bab28e7c738562cfb8540439095b1c947f8eb050 │ │ │ │ ├── _type.scssc │ │ │ │ └── type.scssc │ │ │ ├── c2db06aa0aae363edb38a61fc25e488166aca5f5 │ │ │ │ ├── hyx.scssc │ │ │ │ └── normalize.scssc │ │ │ ├── c34cc9ee2846093f81b5801d655097b099e358bc │ │ │ │ ├── main.scssc │ │ │ │ ├── header.scssc │ │ │ │ ├── comments.scssc │ │ │ │ └── footer.scssc │ │ │ ├── c80c45bb77c9078f4032e69814d171daa263743e │ │ │ │ ├── hyx.scssc │ │ │ │ └── normalize.scssc │ │ │ ├── c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8 │ │ │ │ ├── _main.scssc │ │ │ │ ├── main.scssc │ │ │ │ ├── _footer.scssc │ │ │ │ ├── _header.scssc │ │ │ │ ├── footer.scssc │ │ │ │ ├── header.scssc │ │ │ │ ├── _comments.scssc │ │ │ │ └── comments.scssc │ │ │ ├── d7a6832fd851f397cbe8abf4c08d8806e1d9b8fd │ │ │ │ └── type.scssc │ │ │ ├── f4f4759387734beb6ecafd0e1e3257bff2ec2cca │ │ │ │ ├── forms.scssc │ │ │ │ ├── alerts.scssc │ │ │ │ ├── buttons.scssc │ │ │ │ └── editor.scssc │ │ │ ├── f5e5389f5b43640c62e364bc9cd9ee8635f46e44 │ │ │ │ ├── _alerts.scssc │ │ │ │ ├── _editor.scssc │ │ │ │ ├── _forms.scssc │ │ │ │ └── _buttons.scssc │ │ │ ├── fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1 │ │ │ │ ├── _alerts.scssc │ │ │ │ ├── _editor.scssc │ │ │ │ ├── _forms.scssc │ │ │ │ ├── _buttons.scssc │ │ │ │ └── _comments.scssc │ │ │ ├── 32eaa94dbef05a06be2081bb121580d0d1e25d6e │ │ │ │ ├── _toolbox.scssc │ │ │ │ └── _variables.scssc │ │ │ ├── dbbfd7bf94f524852af3cd3b3b5e5f07bcf45594 │ │ │ │ ├── _variables.scssc │ │ │ │ ├── variables.scssc │ │ │ │ └── style.scssc │ │ │ └── df7819641c26a9492cbecf332e0384b6dfe1a429 │ │ │ │ ├── _code-result.scssc │ │ │ │ ├── _style-guide.scssc │ │ │ │ └── _latest-pastes.scssc │ │ ├── layout │ │ │ ├── _grid.scss │ │ │ ├── _header.scss │ │ │ ├── _footer.scss │ │ │ └── _main.scss │ │ ├── pages │ │ │ ├── _style-guide.scss │ │ │ ├── _code-result.scss │ │ │ └── _latest-pastes.scss │ │ ├── base │ │ │ ├── _base.scss │ │ │ └── _typography.scss │ │ ├── style.scss │ │ ├── utils │ │ │ ├── _toolbox.scss │ │ │ └── _variables.scss │ │ └── vendors │ │ │ ├── _hyx.scss │ │ │ └── _normalize.scss │ ├── .webassets-cache │ │ ├── 2f1fb3f91dfa11d6cd82aa8852882da5 │ │ ├── 22ca9b4316b931c642c9ea34c44c0150 │ │ └── ef3712f91564e3423a3638839127c41a │ ├── favicon.ico │ ├── img │ │ └── rocket.png │ ├── apple-touch-icon.png │ ├── apple-touch-icon-57x57-precomposed.png │ ├── apple-touch-icon-72x72-precomposed.png │ ├── apple-touch-icon-114x114-precomposed.png │ ├── apple-touch-icon-144x144-precomposed.png │ ├── css │ │ ├── github.css │ │ ├── monokai.css │ │ ├── default.css │ │ ├── code.css │ │ ├── style.min.css │ │ └── style.css │ └── js │ │ └── app.js ├── utils.py ├── templates │ ├── 500.html │ ├── 404.html │ ├── latest-pastes.html │ ├── paste.html │ ├── 403.html │ ├── index.html │ ├── layout │ │ └── base.html │ └── style-guide.html ├── database.py ├── __init__.py └── models │ └── __init__.py ├── Procfile ├── rocketbin.db ├── run.py ├── .env ├── requirements.txt ├── package.json ├── config.py ├── gulpfile.js ├── .gitignore ├── CHANGELOG.md ├── README.md └── LICENSE.md /app/views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: python run.py 2 | -------------------------------------------------------------------------------- /app/static/scss/components/_comments.scss: -------------------------------------------------------------------------------- 1 | /* Soon */ 2 | -------------------------------------------------------------------------------- /rocketbin.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/rocketbin.db -------------------------------------------------------------------------------- /app/static/.webassets-cache/2f1fb3f91dfa11d6cd82aa8852882da5: -------------------------------------------------------------------------------- 1 | S'ddab92fd' 2 | p1 3 | . -------------------------------------------------------------------------------- /app/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/favicon.ico -------------------------------------------------------------------------------- /app/static/img/rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/img/rocket.png -------------------------------------------------------------------------------- /app/static/.webassets-cache/22ca9b4316b931c642c9ea34c44c0150: -------------------------------------------------------------------------------- 1 | S'6f5b717bcce8c48d9107b1b05f5326ff' 2 | p1 3 | . -------------------------------------------------------------------------------- /app/static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/apple-touch-icon.png -------------------------------------------------------------------------------- /app/static/apple-touch-icon-57x57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/apple-touch-icon-57x57-precomposed.png -------------------------------------------------------------------------------- /app/static/apple-touch-icon-72x72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/apple-touch-icon-72x72-precomposed.png -------------------------------------------------------------------------------- /app/static/apple-touch-icon-114x114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/apple-touch-icon-114x114-precomposed.png -------------------------------------------------------------------------------- /app/static/apple-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/apple-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | from app import app 5 | port = int(os.environ.get('PORT', 5000)) 6 | app.run(host='0.0.0.0', port=port) 7 | -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_grid.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_grid.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_main.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_main.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/2e3effafe6914928e902140df12907986ede24ef/_type.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/2e3effafe6914928e902140df12907986ede24ef/_type.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/3b23e2aae88044aeb1e9a696f483279dd2592aa7/base.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/3b23e2aae88044aeb1e9a696f483279dd2592aa7/base.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/3b23e2aae88044aeb1e9a696f483279dd2592aa7/grid.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/3b23e2aae88044aeb1e9a696f483279dd2592aa7/grid.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/_hyx.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/_hyx.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/hyx.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/hyx.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/42cf9528ef5dfd3d67823e4d89ef92017c4ccea5/main.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/42cf9528ef5dfd3d67823e4d89ef92017c4ccea5/main.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/forms.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/forms.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/4c011645740a0ec34af721df1a3c682d2a032802/style.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/4c011645740a0ec34af721df1a3c682d2a032802/style.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/57c2c2db7acb49e9d1dbce293ead9614df9f16bc/_hyx.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/57c2c2db7acb49e9d1dbce293ead9614df9f16bc/_hyx.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/85ac203039e421e77c7e44643dd207bf2986680c/type.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/85ac203039e421e77c7e44643dd207bf2986680c/type.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_base.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_base.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_grid.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_grid.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/9959f85ffedc9946b73cee2718acb7c23d18da9d/style.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/9959f85ffedc9946b73cee2718acb7c23d18da9d/style.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/forms.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/forms.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/a4d30ef5c10d9dfad93e23b5afc5f07f699fa2e4/style.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/a4d30ef5c10d9dfad93e23b5afc5f07f699fa2e4/style.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/_base.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/_base.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/_grid.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/_grid.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/base.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/base.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/grid.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/grid.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b8d886e1cbeab963ba927aea1ed200f4bc5b5e4e/base.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b8d886e1cbeab963ba927aea1ed200f4bc5b5e4e/base.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b8d886e1cbeab963ba927aea1ed200f4bc5b5e4e/grid.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b8d886e1cbeab963ba927aea1ed200f4bc5b5e4e/grid.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/bab28e7c738562cfb8540439095b1c947f8eb050/_type.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/bab28e7c738562cfb8540439095b1c947f8eb050/_type.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/bab28e7c738562cfb8540439095b1c947f8eb050/type.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/bab28e7c738562cfb8540439095b1c947f8eb050/type.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c2db06aa0aae363edb38a61fc25e488166aca5f5/hyx.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c2db06aa0aae363edb38a61fc25e488166aca5f5/hyx.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c34cc9ee2846093f81b5801d655097b099e358bc/main.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c34cc9ee2846093f81b5801d655097b099e358bc/main.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c80c45bb77c9078f4032e69814d171daa263743e/hyx.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c80c45bb77c9078f4032e69814d171daa263743e/hyx.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/_main.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/_main.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/main.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/main.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/d7a6832fd851f397cbe8abf4c08d8806e1d9b8fd/type.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/d7a6832fd851f397cbe8abf4c08d8806e1d9b8fd/type.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/forms.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/forms.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_footer.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_footer.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_header.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_header.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/3b23e2aae88044aeb1e9a696f483279dd2592aa7/toolbox.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/3b23e2aae88044aeb1e9a696f483279dd2592aa7/toolbox.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/42cf9528ef5dfd3d67823e4d89ef92017c4ccea5/header.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/42cf9528ef5dfd3d67823e4d89ef92017c4ccea5/header.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_alerts.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_alerts.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_editor.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_editor.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_forms.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_forms.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/alerts.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/alerts.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/buttons.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/buttons.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/editor.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/editor.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/alerts.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/alerts.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/buttons.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/buttons.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/editor.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/9f99231643c1ad3cb833c4ac5cd77849f44cff70/editor.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/toolbox.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/toolbox.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b8d886e1cbeab963ba927aea1ed200f4bc5b5e4e/toolbox.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b8d886e1cbeab963ba927aea1ed200f4bc5b5e4e/toolbox.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c34cc9ee2846093f81b5801d655097b099e358bc/header.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c34cc9ee2846093f81b5801d655097b099e358bc/header.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/_footer.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/_footer.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/_header.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/_header.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/footer.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/footer.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/header.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/header.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/alerts.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/alerts.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/buttons.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/buttons.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/editor.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f4f4759387734beb6ecafd0e1e3257bff2ec2cca/editor.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_alerts.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_alerts.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_editor.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_editor.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_forms.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_forms.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_alerts.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_alerts.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_editor.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_editor.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_forms.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_forms.scssc -------------------------------------------------------------------------------- /app/views/home.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template, Blueprint 2 | 3 | mod = Blueprint('home', __name__) 4 | 5 | # Routes 6 | @mod.route('/') 7 | def index(): 8 | return render_template('index.html') 9 | -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/32eaa94dbef05a06be2081bb121580d0d1e25d6e/_toolbox.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/32eaa94dbef05a06be2081bb121580d0d1e25d6e/_toolbox.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/32eaa94dbef05a06be2081bb121580d0d1e25d6e/_variables.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/32eaa94dbef05a06be2081bb121580d0d1e25d6e/_variables.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/_normalize.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/_normalize.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/normalize.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/3ca1ea5a74a49ac55ffb43db478b25a810b708f8/normalize.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_buttons.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/45a0ac165468325dc800454f8d244477f1eba3a4/_buttons.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/4c011645740a0ec34af721df1a3c682d2a032802/normalize.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/4c011645740a0ec34af721df1a3c682d2a032802/normalize.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/4c011645740a0ec34af721df1a3c682d2a032802/variables.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/4c011645740a0ec34af721df1a3c682d2a032802/variables.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/57c2c2db7acb49e9d1dbce293ead9614df9f16bc/_normalize.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/57c2c2db7acb49e9d1dbce293ead9614df9f16bc/_normalize.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_toolbox.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_toolbox.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/9959f85ffedc9946b73cee2718acb7c23d18da9d/_variables.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/9959f85ffedc9946b73cee2718acb7c23d18da9d/_variables.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/a4d30ef5c10d9dfad93e23b5afc5f07f699fa2e4/variables.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/a4d30ef5c10d9dfad93e23b5afc5f07f699fa2e4/variables.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/_toolbox.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/_toolbox.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c2db06aa0aae363edb38a61fc25e488166aca5f5/normalize.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c2db06aa0aae363edb38a61fc25e488166aca5f5/normalize.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c80c45bb77c9078f4032e69814d171daa263743e/normalize.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/c80c45bb77c9078f4032e69814d171daa263743e/normalize.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/dbbfd7bf94f524852af3cd3b3b5e5f07bcf45594/_variables.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/dbbfd7bf94f524852af3cd3b3b5e5f07bcf45594/_variables.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/dbbfd7bf94f524852af3cd3b3b5e5f07bcf45594/variables.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/dbbfd7bf94f524852af3cd3b3b5e5f07bcf45594/variables.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_buttons.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/f5e5389f5b43640c62e364bc9cd9ee8635f46e44/_buttons.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_buttons.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_buttons.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_typography.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_typography.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/df7819641c26a9492cbecf332e0384b6dfe1a429/_code-result.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/df7819641c26a9492cbecf332e0384b6dfe1a429/_code-result.scssc -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/df7819641c26a9492cbecf332e0384b6dfe1a429/_style-guide.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/df7819641c26a9492cbecf332e0384b6dfe1a429/_style-guide.scssc -------------------------------------------------------------------------------- /app/views/error.py: -------------------------------------------------------------------------------- 1 | from flask import render_template, Blueprint 2 | 3 | mod = Blueprint('error', __name__) 4 | 5 | @mod.route('/500/', methods=['GET']) 6 | def error_500(): 7 | return render_template('500.html'), 500 8 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | export SECRET_KEY=secretkey 2 | export SALT=salt 3 | export MONGODB_HOST=localhost 4 | export MONGODB_DATABASE=test2 5 | export MONGODB_USERNAME= 6 | export MONGODB_PASSWORD= 7 | export DATABASE_URI=sqlite:///../rocketbin.db 8 | -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/df7819641c26a9492cbecf332e0384b6dfe1a429/_latest-pastes.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j0lvera/rocketbin/HEAD/app/static/scss/.sass-cache/df7819641c26a9492cbecf332e0384b6dfe1a429/_latest-pastes.scssc -------------------------------------------------------------------------------- /app/views/styleguide.py: -------------------------------------------------------------------------------- 1 | import os 2 | from flask import Flask, render_template, Blueprint 3 | 4 | mod = Blueprint('styleguide', __name__) 5 | 6 | @mod.route('/style-guide') 7 | def show_style_guide(): 8 | return render_template('style-guide.html') 9 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==0.10.1 2 | Flask-SQLAlchemy==2.0 3 | Jinja2==2.7.3 4 | MarkupSafe==0.23 5 | Pygments==2.0.1 6 | SQLAlchemy==1.0.8 7 | Werkzeug==0.9.6 8 | arrow==0.4.4 9 | hashids==1.0.1 10 | itsdangerous==0.24 11 | pymongo==2.7.2 12 | python-dateutil==2.4.0 13 | six==1.9.0 14 | wsgiref==0.1.2 15 | -------------------------------------------------------------------------------- /app/static/scss/layout/_grid.scss: -------------------------------------------------------------------------------- 1 | $gutter: 2%; 2 | @include namespace('col-'); 3 | 4 | .col-1-1 { 5 | @include cols(12, 0); 6 | } 7 | 8 | .col-1-2 { 9 | @include fraction(1/2); 10 | } 11 | 12 | .col-1-3 { 13 | @include fraction(1/3); 14 | } 15 | 16 | .col-1-4 { 17 | @include fraction(1/4); 18 | } 19 | -------------------------------------------------------------------------------- /app/static/scss/pages/_style-guide.scss: -------------------------------------------------------------------------------- 1 | /* Style guide page */ 2 | .demo-col { 3 | margin-top: 0.618em; 4 | padding: 0.618em 0; 5 | display: block; 6 | text-align: center; 7 | background-color: darken($color-green, 18%); 8 | border-radius: 3px; 9 | } 10 | 11 | section { 12 | margin-bottom: 6em; 13 | } 14 | -------------------------------------------------------------------------------- /app/static/scss/pages/_code-result.scss: -------------------------------------------------------------------------------- 1 | /* Code Results */ 2 | .code-result, 3 | .code-raw-textarea { 4 | // width: 45em; 5 | } 6 | 7 | .code-result { 8 | width: 120%; 9 | margin-left: -10%; 10 | } 11 | 12 | .code-raw-textarea { 13 | height: 24em; 14 | } 15 | 16 | .code-raw-textarea { 17 | resize: none; 18 | } 19 | -------------------------------------------------------------------------------- /app/static/scss/pages/_latest-pastes.scss: -------------------------------------------------------------------------------- 1 | /* Pastes list */ 2 | .pastes-list { 3 | margin-left: 0; 4 | padding-left: 0; 5 | list-style: none; 6 | } 7 | 8 | .paste-list-el { 9 | .paste-link { 10 | margin-right: 0.618em; 11 | font-family: 'Source Code Pro', monospace; 12 | } 13 | } 14 | 15 | /* Pygments layout */ 16 | .highlighttable { 17 | width: 100%; 18 | } 19 | -------------------------------------------------------------------------------- /app/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | from app import app, db 3 | from app.models import Paste 4 | from hashids import Hashids 5 | 6 | 7 | SALT = app.config['SALT'] 8 | SUPPORTED_LANGUAGES = ['HTML', 'CSS', 'Sass', 'SCSS', 'Less', 'JavaScript', 9 | 'CoffeeScript', 'Python', 'Ruby', 'PHP', 10 | 'Bash', 'sh'] 11 | 12 | def gen_new_id(num): 13 | hashids = Hashids(salt=SALT, min_length="6") 14 | 15 | id = num + 1 16 | return hashids.encrypt(id) 17 | -------------------------------------------------------------------------------- /app/templates/500.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | 3 | {% block title %}Paste {{ id }}{% endblock %} 4 | 5 | {% block head %} 6 | 7 | {% endblock %} 8 | 9 | {% block content %} 10 |

500 Error

11 | 12 |

Something went wrong with the server.

13 | {% endblock %} 14 | 15 | {% block scripts %} 16 | 17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rocketbin", 3 | "version": "0.0.1", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/thinkxl/rocketbin.git" 7 | }, 8 | "bugs": { 9 | "url": "https://github.com/thinkxl/rocketbin/issues" 10 | }, 11 | "homepage": "http://rocketb.in/", 12 | "devDependencies": { 13 | "gulp": "^3.8.10", 14 | "gulp-autoprefixer": "^2.1.0", 15 | "gulp-load-plugins": "^0.8.0", 16 | "gulp-minify-css": "^0.4.3", 17 | "gulp-rename": "^1.2.0", 18 | "gulp-sass": "^1.3.2", 19 | "gulp-sourcemaps": "^1.3.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | DEBUG=True 4 | SECRET_KEY=os.getenv('SECRET_KEY', '') 5 | SALT=os.getenv('SALT', '') 6 | 7 | SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URI', '') 8 | 9 | MONGODB_HOSTNAME = os.getenv('MONGODB_HOST', 'localhost') 10 | MONGODB_NAME = os.getenv('MONGODB_DATABASE', '') 11 | MONGODB_PORT = int(os.getenv('MONGODB_PORT', 27017)) 12 | MONGODB_USERNAME = os.getenv('MONGODB_USERNAME', '') 13 | MONGODB_PASSWORD = os.getenv('MONGODB_PASSWORD', '') 14 | 15 | del os 16 | -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c34cc9ee2846093f81b5801d655097b099e358bc/comments.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"P/Users/thinkxl/Development/python/pastebin/static/scss/layout/comments.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI";/Users/thinkxl/Development/python/pastebin/static/scss;T:@real_rootI";/Users/thinkxl/Development/python/pastebin/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/colors.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"P/Users/thinkxl/Development/python/pastebin/app/static/scss/base/colors.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@real_rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/897ccf60cd64aa0d5229c2bf2926eac6b6bbe61f/_colors.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"R/Users/thinkxl/Development/python/rocketbin/app/static/scss/base/_colors.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI"@/Users/thinkxl/Development/python/rocketbin/app/static/scss;T:@real_rootI"@/Users/thinkxl/Development/python/rocketbin/app/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/b7063f693f79941e4035d3b82ad3b136870043d4/_colors.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"Q/Users/thinkxl/Development/python/pastebin/app/static/scss/base/_colors.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@real_rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/_comments.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"U/Users/thinkxl/Development/python/pastebin/app/static/scss/layout/_comments.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@real_rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c91c6dc84179ffa47d6d14b71bf2d71aedd6c4f8/comments.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"T/Users/thinkxl/Development/python/pastebin/app/static/scss/layout/comments.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@real_rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/20b1dacf105ca8c68c01e89d19c061135c5885ac/_comments.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"V/Users/thinkxl/Development/python/rocketbin/app/static/scss/layout/_comments.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI"@/Users/thinkxl/Development/python/rocketbin/app/static/scss;T:@real_rootI"@/Users/thinkxl/Development/python/rocketbin/app/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/42cf9528ef5dfd3d67823e4d89ef92017c4ccea5/comments.scssc: -------------------------------------------------------------------------------- 1 | 3.4.7 (Selective Steve) 2 | da39a3ee5e6b4b0d3255bfef95601890afd80709 3 | o:Sass::Tree::RootNode 4 | :@children[:@templateI":ET: 5 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso; ; i;i: 6 | @fileI"X/Users/adwhiteit3/Development/Juan/python/frontbin/static/scss/layout/comments.scss;T:@importero: Sass::Importers::Filesystem: 7 | @rootI"C/Users/adwhiteit3/Development/Juan/python/frontbin/static/scss;T:@real_rootI"C/Users/adwhiteit3/Development/Juan/python/frontbin/static/scss;T:@same_name_warningso:Set: 8 | @hash{: @options{ -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | $ = require('gulp-load-plugins')(); 3 | 4 | gulp.task('styles', function () { 5 | return gulp.src('app/static/scss/**/*.scss') 6 | .pipe($.sourcemaps.init()) 7 | .pipe($.sass({ 8 | onError: console.error.bind(console, 'Sass:') 9 | })) 10 | .pipe($.autoprefixer()) 11 | .pipe($.sourcemaps.write('maps')) 12 | .pipe(gulp.dest('app/static/css')) 13 | .pipe($.rename({ 14 | suffix: '.min' 15 | })) 16 | .pipe($.minifyCss()) 17 | .pipe(gulp.dest('app/static/css')); 18 | }); 19 | 20 | gulp.task('watch', ['styles'], function () { 21 | gulp.watch('app/static/scss/**/*', ['styles']); 22 | }); 23 | 24 | gulp.task('default', ['styles']); -------------------------------------------------------------------------------- /app/database.py: -------------------------------------------------------------------------------- 1 | import os 2 | from app import app 3 | from pymongo import MongoClient 4 | 5 | db_client = MongoClient( 6 | app.config['MONGODB_HOSTNAME'], 7 | app.config['MONGODB_PORT'] 8 | ) 9 | 10 | db = db_client[app.config['MONGODB_NAME']] 11 | 12 | if app.config['MONGODB_USERNAME']: 13 | db.authenticate( 14 | app.config['MONGODB_USERNAME'], 15 | app.config['MONGODB_PASSWORD'] 16 | ) 17 | 18 | pastes = db.pastes 19 | users = db.users 20 | 21 | # { 22 | # '_id': _id, 23 | # 'author_id': author_id, 24 | # 'title': title, 25 | # 'private': false, 26 | # 'code': code, 27 | # 'lang': lang, 28 | # 'theme': theme, 29 | # 'created_at': created_at 30 | # } 31 | -------------------------------------------------------------------------------- /app/static/scss/layout/_header.scss: -------------------------------------------------------------------------------- 1 | /* Header */ 2 | %go-inline { 3 | display: inline-block; 4 | } 5 | 6 | .site-title { 7 | @extend %go-inline; 8 | } 9 | 10 | .page-title { 11 | margin: 1.618em auto; 12 | text-align: center; 13 | } 14 | 15 | .site-logo { 16 | @extend %go-inline; 17 | width: 2em; 18 | display: inline-block; 19 | } 20 | 21 | .masthead { 22 | display: table; 23 | width: 100%; 24 | border-top: 4px solid $color-red; 25 | background-color: #fff; 26 | } 27 | 28 | .heading { 29 | color: darken($color-green, 30%); 30 | } 31 | 32 | /* Navigation */ 33 | .main-nav { 34 | margin-bottom: 0; 35 | display: table; 36 | width: 100%; 37 | } 38 | 39 | .main-nav-el { 40 | float: left; 41 | margin-right: 0.618em; 42 | } 43 | -------------------------------------------------------------------------------- /app/static/scss/layout/_footer.scss: -------------------------------------------------------------------------------- 1 | /* Footer */ 2 | .tilt-container { 3 | top: -2em; 4 | left: -5px; 5 | position: relative; 6 | display: block; 7 | height: 3em; 8 | background-color: #eee; 9 | transform: rotate(2deg); 10 | box-shadow: 0 -10px 0 0 #eee; 11 | } 12 | 13 | .site-footer { 14 | position: relative; 15 | top: -2em; 16 | background-color: #eee; 17 | 18 | p { 19 | margin: 0; 20 | color: #999; 21 | } 22 | 23 | a { 24 | color: #555; 25 | } 26 | } 27 | 28 | .site-footer { 29 | position: relative; 30 | text-align: right; 31 | } 32 | 33 | .footer-logo { 34 | position: absolute; 35 | top: -1em; 36 | left: 3em; 37 | width: 5em; 38 | background-color: #fff; 39 | border-radius: 50%; 40 | border: 1px solid #ccc; 41 | } 42 | -------------------------------------------------------------------------------- /app/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | 3 | {% block title %}Paste {{ id }}{% endblock %} 4 | 5 | {% block head %} 6 | 7 | {% endblock %} 8 | 9 | {% block content %} 10 |

Ah! This page doesn't exist

11 | 12 |

Not to worry. Here is a link to the homepage.

13 | 14 | 15 | {% endblock %} 16 | 17 | {% block scripts %} 18 | 19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /app/templates/latest-pastes.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | 3 | {% block title %}Latest Pastes{% endblock %} 4 | 5 | {% block head %} 6 | 7 | {% endblock %} 8 | 9 | {% block content %} 10 |

Latest Public Pastes

11 |
12 |
    13 | {% for item in all %} 14 |
  • {% block loop_item scoped %}{{ item['_id'] }} {{ item['lang'] }} paste created {{ item['created_at']|datetimeformat }}{% endblock %}
  • 15 | {% endfor %} 16 |
17 |
18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/fe4216f757fcd1fdc4bdfc15f6c20472ba3262b1/_comments.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | a9848c2c13944adcb9ae0ee7349d3fefa700f5e9 3 | o:Sass::Tree::RootNode :@children[o:Sass::Tree::CommentNode 4 | : @value[I"/* Soon */:ET: 5 | @type: normal;[: 6 | @linei: @options{:@templateI"/* Soon */ 7 | ; T; i:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso;; i;i: 8 | @fileI"Z/Users/thinkxl/Development/python/rocketbin/app/static/scss/components/_comments.scss; T:@importero: Sass::Importers::Filesystem: 9 | @rootI"@/Users/thinkxl/Development/python/rocketbin/app/static/scss; T:@real_rootI"@/Users/thinkxl/Development/python/rocketbin/app/static/scss; T:@same_name_warningso:Set: 10 | @hash{:@has_childrenT; @ -------------------------------------------------------------------------------- /app/templates/paste.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | 3 | {% block title %}Paste {{ id }}{% endblock %} 4 | 5 | {% block head %} 6 | 7 | {% endblock %} 8 | 9 | {% block content %} 10 |

{{ title }}

11 | 12 |

By: {{ created_by }} • {{ created_at|datetimeformat }} • Language: {{ lang }}

13 | 14 |
{{ code|safe }}
15 | 16 |
17 | 18 |

Raw Data

19 | {#

Raw data

#} 20 | 21 |
22 | 23 |
24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /app/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from flask import Flask, g, render_template, abort 4 | from flask.ext.sqlalchemy import SQLAlchemy 5 | 6 | app = Flask(__name__) 7 | app.config.from_object('config') 8 | db = SQLAlchemy(app) 9 | 10 | db.create_all() 11 | 12 | @app.errorhandler(403) 13 | def forbidden_page(error): 14 | return render_template('403.html'), 403 15 | 16 | @app.errorhandler(404) 17 | def page_not_found(error): 18 | return render_template('404.html'), 404 19 | 20 | @app.errorhandler(500) 21 | def server_error_page(error): 22 | return render_template('500.html'), 500 23 | 24 | from app.views import home 25 | from app.views import paste 26 | from app.views import styleguide 27 | from app.views import error 28 | 29 | app.register_blueprint(home.mod) 30 | app.register_blueprint(paste.mod) 31 | app.register_blueprint(styleguide.mod) 32 | app.register_blueprint(error.mod) 33 | -------------------------------------------------------------------------------- /app/static/scss/base/_base.scss: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | background-color: #eee; 4 | } 5 | 6 | *, *:before, *:after { 7 | box-sizing: inherit; 8 | } 9 | 10 | body { 11 | font-family: $base-font-family; 12 | background-color: $body-background-color; 13 | color: $text-color; 14 | text-rendering: optimizeLegibility; 15 | -webkit-font-smoothing: antialiased; 16 | } 17 | 18 | pre, 19 | code, 20 | .ace_editor { 21 | font-family: 'Source Code Pro', 'source-code-pro', monospace !important; 22 | font-size: 13px !important; 23 | -webkit-font-smoothing: auto; 24 | /* line-height: 1; */ 25 | } 26 | 27 | h1, h2, h3, h4, h5 { 28 | font-family: $headings-font-family; 29 | color: $headings-color; 30 | } 31 | 32 | /* Text that is inside the `.app` class, because the green background */ 33 | .app { 34 | color: $app-text-color; 35 | 36 | h1, h2, h3, h4 { 37 | color: $app-headings-color; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/static/scss/components/_buttons.scss: -------------------------------------------------------------------------------- 1 | /* Buttons */ 2 | %button-static { 3 | display: inline-block; 4 | padding: 0.418em 1em; 5 | border: 0; 6 | border-radius: $btn-roundness; 7 | color: #fff; 8 | text-decoration: none; 9 | font-family: inherit; 10 | font-weight: 400; 11 | line-height: 1; 12 | cursor: pointer; 13 | 14 | &:focus { 15 | outline: none; 16 | } 17 | } 18 | 19 | button, 20 | a.btn-default, 21 | .btn-default { 22 | @extend %button-static; 23 | 24 | color: #fff; 25 | 26 | @include button($btn-default-bg, $btn-primary-text-color); 27 | } 28 | 29 | 30 | .btn-ghost { 31 | @extend .btn-default; 32 | @include button(transparent, #fff); 33 | border: 3px solid #fff; 34 | opacity: 0.8; 35 | 36 | &:hover { 37 | opacity: 1; 38 | } 39 | } 40 | 41 | .btn-small { 42 | @extend .btn-default; 43 | font-size: $btn-small-font-size; 44 | } 45 | 46 | .btn-large { 47 | @extend .btn-default; 48 | font-size: $btn-large-font-size; 49 | } 50 | -------------------------------------------------------------------------------- /app/static/scss/layout/_main.scss: -------------------------------------------------------------------------------- 1 | /* Main layout */ 2 | .container { 3 | margin: 0 auto; 4 | width: 45em; 5 | } 6 | 7 | .section { 8 | margin-bottom: 1em; 9 | padding-top: 1em; 10 | padding-bottom: 1em; 11 | 12 | &:last-child { 13 | margin-top: 0; 14 | } 15 | } 16 | 17 | /* App */ 18 | .app { 19 | padding-bottom: 4em; 20 | background-color: $color-green; 21 | color: #fff; 22 | 23 | hr { 24 | border-color: lighten($color-green, 5%); 25 | } 26 | 27 | // a { 28 | // color: darken($color-green, 40%); 29 | // } 30 | } 31 | 32 | /* Editor */ 33 | #editor { 34 | margin-bottom: 1em; 35 | width: 100%; 36 | height: 40em; 37 | } 38 | 39 | /* Options */ 40 | [class^="option-"] { 41 | display: inline-block; 42 | margin-right: 1em; 43 | 44 | input, 45 | select { 46 | color: #333; 47 | } 48 | 49 | &:last-child { 50 | margin-right: 0; 51 | } 52 | } 53 | 54 | /* Paste title */ 55 | .option-title { 56 | display: block; 57 | margin: 1em 0; 58 | 59 | input { 60 | width: 100%; 61 | padding: 0.618em; 62 | color: #333; 63 | outline: none; 64 | border: 6px solid $color-grey; 65 | border-radius: 4px; 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /app/static/scss/components/_alerts.scss: -------------------------------------------------------------------------------- 1 | /* Alerts */ 2 | [class^="alert-"] { 3 | border: 1px solid; 4 | border-bottom-width: 3px; 5 | border-radius: 4px; 6 | margin: 1em 0; 7 | padding: 1.125em; 8 | 9 | p { 10 | margin: 0; 11 | } 12 | } 13 | 14 | .alert-information { 15 | border-color: lighten($information-color, 30%); 16 | color: darken($information-color, 25%); 17 | background-color: lighten($information-color, 45%); 18 | 19 | strong { 20 | color: $information-color; 21 | } 22 | } 23 | 24 | .alert-error { 25 | border-color: lighten($error-color, 30%); 26 | color: darken($error-color, 25%); 27 | background-color: lighten($error-color, 45%); 28 | 29 | strong { 30 | color: $error-color; 31 | } 32 | } 33 | 34 | .alert-warning { 35 | border-color: lighten($warning-color, 30%); 36 | color: darken($warning-color, 25%); 37 | background-color: lighten($warning-color, 45%); 38 | 39 | strong { 40 | color: $warning-color; 41 | } 42 | } 43 | 44 | .alert-success { 45 | border-color: lighten($success-color, 30%); 46 | color: darken($success-color, 25%); 47 | background-color: lighten($success-color, 45%); 48 | 49 | strong { 50 | color: $success-color; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/static/scss/style.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * _______ ____/ /_____ / /_/ / (_)__ 4 | * / __/ _ \/ __/ '_/ -_' __/ _ \/ / _ \ 5 | * /_/ \___/\__/_/\_\\__/\__/_.__/_/_//_/ 6 | * 7 | * Designed, built, and released under GPL license by @thinkxl. 8 | * https://github.com/thinkxl/rocketbin 9 | */ 10 | 11 | /* 12 | * Contents 13 | * 14 | * Vendors 15 | * Utils 16 | * Base 17 | * Components 18 | * Layouts 19 | * Pages 20 | */ 21 | 22 | /* 23 | * Vendors 24 | */ 25 | 26 | @import "vendors/normalize"; 27 | @import "vendors/hyx"; 28 | 29 | /* 30 | * Utils 31 | */ 32 | 33 | @import "utils/variables"; 34 | @import "utils/toolbox"; 35 | 36 | /* 37 | * Base 38 | */ 39 | 40 | @import "base/typography"; 41 | @import "base/base"; 42 | 43 | /* 44 | * Components 45 | */ 46 | 47 | @import "components/alerts"; 48 | @import "components/buttons"; 49 | @import "components/forms"; 50 | @import "components/editor"; 51 | @import "components/comments"; 52 | 53 | /* 54 | * Layouts 55 | */ 56 | 57 | @import "layout/grid"; 58 | @import "layout/header"; 59 | @import "layout/main"; 60 | @import "layout/footer"; 61 | 62 | /* 63 | * Pages 64 | */ 65 | 66 | @import "pages/style-guide"; 67 | @import "pages/code-result"; 68 | @import "pages/latest-pastes"; 69 | -------------------------------------------------------------------------------- /app/models/__init__.py: -------------------------------------------------------------------------------- 1 | from app import db 2 | 3 | # class User(db.Model): 4 | # _id = db.Column(db.String, unique=True) 5 | # username = db.Column(db.String, unique=True) 6 | # email_address = db.Column(db.String, unique=True) 7 | 8 | # def __init__(self, _id, username, email_address): 9 | # self._id = _id 10 | # self.username = username 11 | # self.email_address = email_address 12 | 13 | # def __repr__(self): 14 | # return '' % self._id 15 | 16 | class Paste(db.Model): 17 | id = db.Column(db.Integer, primary_key=True) 18 | _id = db.Column(db.String(6), unique=True) 19 | title = db.Column(db.String(100)) 20 | private = db.Column(db.String(5)) 21 | code = db.Column(db.String) 22 | lang = db.Column(db.String(24)) 23 | created_at = db.Column(db.Date) 24 | created_by = db.Column(db.String(120)) 25 | edited_at = db.Column(db.Date) 26 | 27 | def __init__(self, _id, title, private, code, lang, theme, created_at): 28 | self._id = _id 29 | # If no title, set the id as title 30 | self.title = _id if not title else title 31 | self.private = private 32 | self.code = code 33 | self.lang = lang 34 | self.created_at = created_at 35 | self.created_by = "Guest" 36 | self.edited_at = created_at 37 | 38 | def __repr__(self): 39 | return '' % self._id 40 | -------------------------------------------------------------------------------- /app/static/scss/utils/_toolbox.scss: -------------------------------------------------------------------------------- 1 | @mixin respond-to($size) { 2 | @media only screen and (max-width: $size) { @content; } 3 | } 4 | 5 | @mixin button($background-color, $text-color) { 6 | background-color: $background-color; 7 | color: $text-color; 8 | 9 | &:hover { 10 | background-color: darken($background-color, 7%); 11 | color: $text-color; 12 | } 13 | 14 | &:active { 15 | background-color: darken($background-color, 3%); 16 | } 17 | } 18 | 19 | @mixin button-gradient($top-color, $bottom-color, $text-color) { 20 | background: $top-color; /* Old browsers */ 21 | background: -moz-linear-gradient(-45deg, $top-color 0%, $bottom-color 100%); /* FF3.6+ */ 22 | background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,$top-color), color-stop(100%,$bottom-color)); /* Chrome,Safari4+ */ 23 | background: -webkit-linear-gradient(-45deg, $top-color 0%,$bottom-color 100%); /* Chrome10+,Safari5.1+ */ 24 | background: -o-linear-gradient(-45deg, $top-color 0%,$bottom-color 100%); /* Opera 11.10+ */ 25 | background: -ms-linear-gradient(-45deg, $top-color 0%,$bottom-color 100%); /* IE10+ */ 26 | background: linear-gradient(135deg, $top-color 0%,$bottom-color 100%); /* W3C */ 27 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$top-color', endColorstr='$bottom-color',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ 28 | 29 | color: $text-color; 30 | 31 | &:hover { 32 | background: $top-color; 33 | color: $text-color; 34 | } 35 | 36 | &:active { 37 | background: lighten($bottom-color, 5%); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/templates/403.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | You did something wrong. 6 | 7 | 54 | 55 | 56 |

403

57 |

You are trying to do something that is not allowed, please go back and try do things right.

58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /app/static/scss/components/_editor.scss: -------------------------------------------------------------------------------- 1 | /* Editor */ 2 | %editor-border-style { 3 | border-radius: 4px !important; 4 | border: 8px solid #ccc; 5 | // border-top: 20px solid $editor-top-bar-color; 6 | } 7 | 8 | // Dark 9 | .linenos-dark { 10 | color: #8f908a; 11 | background-color: #2F3129; 12 | } 13 | 14 | .highlighttable-dark { 15 | & > tbody { 16 | background-color: #272822; 17 | } 18 | } 19 | 20 | // Light 21 | .linenos-light { 22 | color: #aaa; 23 | background-color: #E8E8E8; 24 | } 25 | 26 | .highlighttable-light { 27 | color: #333; 28 | 29 | & > tbody { 30 | background-color: #fff; 31 | } 32 | } 33 | 34 | .code-raw-textarea-light { 35 | color: #333; 36 | } 37 | 38 | // Code result 39 | .code-raw { 40 | width: 100%; 41 | } 42 | 43 | .code-raw-textarea { 44 | @extend .code-raw-textarea-light; 45 | padding: 0.618em; 46 | width: 100%; 47 | height: 20em; 48 | font-family: 'Source Code Pro', monospace; 49 | font-size: 13px; 50 | background-color: #fff; 51 | border-radius: 4px; 52 | border: none; 53 | 54 | &:focus { 55 | outline: none; 56 | } 57 | } 58 | 59 | .code-result { 60 | width: 100%; 61 | height: auto; 62 | overflow: auto; 63 | @extend %editor-border-style; 64 | & > table { 65 | border-collapse: inherit !important; 66 | } 67 | } 68 | 69 | .highlighttable { 70 | @extend .highlighttable-light; 71 | border-radius: 4px; 72 | } 73 | 74 | .linenos { 75 | // padding: 0 2px 0 12px; 76 | width: 2em; 77 | min-width: 2em; 78 | text-align: center; 79 | @extend .linenos-light; 80 | } 81 | 82 | .code { 83 | padding-left: 5px; 84 | } 85 | 86 | // Home editor 87 | #editor { 88 | @extend %editor-border-style; 89 | } 90 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #### joe made this: https://goel.io/joe 2 | 3 | #####=== Vim ===##### 4 | [._]*.s[a-w][a-z] 5 | [._]s[a-w][a-z] 6 | *.un~ 7 | Session.vim 8 | .netrwhist 9 | *~ 10 | 11 | #####=== Python ===##### 12 | 13 | # Byte-compiled / optimized / DLL files 14 | __pycache__/ 15 | *.py[cod] 16 | 17 | # C extensions 18 | *.so 19 | 20 | # Distribution / packaging 21 | .Python 22 | env/ 23 | build/ 24 | develop-eggs/ 25 | dist/ 26 | downloads/ 27 | eggs/ 28 | lib/ 29 | lib64/ 30 | parts/ 31 | sdist/ 32 | var/ 33 | *.egg-info/ 34 | .installed.cfg 35 | *.egg 36 | 37 | # PyInstaller 38 | # Usually these files are written by a python script from a template 39 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 40 | *.manifest 41 | *.spec 42 | 43 | # Installer logs 44 | pip-log.txt 45 | pip-delete-this-directory.txt 46 | 47 | # Unit test / coverage reports 48 | htmlcov/ 49 | .tox/ 50 | .coverage 51 | .cache 52 | nosetests.xml 53 | coverage.xml 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | 62 | # Sphinx documentation 63 | docs/_build/ 64 | 65 | # PyBuilder 66 | target/ 67 | 68 | #####=== OSX ===##### 69 | .DS_Store 70 | .AppleDouble 71 | .LSOverride 72 | 73 | # Icon must end with two \r 74 | Icon 75 | 76 | # Thumbnails 77 | ._* 78 | 79 | # Files that might appear on external disk 80 | .Spotlight-V100 81 | .Trashes 82 | 83 | # Directories potentially created on remote AFP share 84 | .AppleDB 85 | .AppleDesktop 86 | Network Trash Folder 87 | Temporary Items 88 | .apdisk 89 | 90 | #####=== VirtualEnv ===##### 91 | # Virtualenv 92 | # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ 93 | .Python 94 | [Bb]in 95 | [Ii]nclude 96 | [Ll]ib 97 | [Ss]cripts 98 | pyvenv.cfg 99 | pip-selfcheck.json 100 | 101 | -------------------------------------------------------------------------------- /app/static/scss/utils/_variables.scss: -------------------------------------------------------------------------------- 1 | // Colors 2 | $color-red: #e74c3c; 3 | $color-green: #5FBCA8; 4 | $color-grey: #CCCCCC; 5 | 6 | // General 7 | $site-width: 65rem; 8 | $baseline: 1.618rem; 9 | $body-background-color: #eee; 10 | 11 | // Typography Variables. 12 | $site-title-color: #1a237e; 13 | $page-title-color: #283593; 14 | $text-color: #333; 15 | $link-color: darken($color-green, 40%); 16 | $muted-text-color: lighten($text-color, 15%); 17 | 18 | $headings-font-family: 'Source Sans Pro', sans-serif; 19 | $base-font-family: 'Droid Sans', sans-serif; 20 | $base-font-size: 18px; 21 | $base-line-height: 1.618; 22 | $base-margin-bottom: $baseline; 23 | $measure: 806px; 24 | 25 | $headings-margin-bottom: $base-margin-bottom; 26 | $headings-line-height: 1.125; 27 | $headings-color: #333; 28 | 29 | $code-font-family: 'DejaVu Sans Mono', Inconsolata, Consolas, 'Lucida Console', monospace; 30 | $code-text-color: brown; 31 | 32 | // Inside app 33 | $app-text-color: #fff; 34 | $app-headings-color: $link-color; 35 | 36 | // Button Variables. 37 | $btn-roundness: 0.236rem; 38 | 39 | $btn-small-font-size: 0.818rem; 40 | $btn-large-font-size: 1.318rem; 41 | 42 | $btn-default-bg: #3498db; 43 | $btn-default-top-color: #ff512f; 44 | $btn-default-bottom-color: #f09819; 45 | $btn-default-text-color: #fff; 46 | 47 | $btn-primary-top-color: #aa076b; 48 | $btn-primary-bottom-color: #61045f; 49 | $btn-primary-bg: #2ecc71; 50 | $btn-primary-text-color: lighten($btn-primary-bg, 70%); 51 | 52 | // Form Variables. 53 | $field-border-color: #ccc; 54 | $field-error-color: brown; 55 | $field-required-color: brown; 56 | 57 | // Icon Variables. 58 | $icon-roundness: 3.778px; 59 | $icon-border-color: #333; 60 | 61 | // Feedback Variables. 62 | $information-color: #439ccf; 63 | $error-color: #e72915; 64 | $warning-color: #d35400; 65 | $success-color: #74a730; 66 | 67 | // Editor 68 | $editor-top-bar-color: #999; 69 | 70 | // Alerts 71 | $alert-text-color: #333; 72 | -------------------------------------------------------------------------------- /app/static/scss/components/_forms.scss: -------------------------------------------------------------------------------- 1 | %form-border-radius { 2 | // border: 2px solid $field-border-color; 3 | border: none; 4 | border-radius: 4px; 5 | } 6 | 7 | /* Forms */ 8 | .form { 9 | background-color: #eee; 10 | color: lighten($text-color, 20%); 11 | border-radius: 4px; 12 | 13 | .field-group { 14 | margin-bottom: 1em; 15 | 16 | &:last-child { 17 | margin-bottom: 0; 18 | } 19 | 20 | .label-text, 21 | .label-radio, 22 | .label-checkbox { 23 | font-weight: bold; 24 | } 25 | 26 | .label-text { 27 | display: block; 28 | } 29 | 30 | .label-radio, 31 | .label-checkbox { 32 | display: inline-block; 33 | } 34 | 35 | input[type="text"], 36 | input[type="password"], 37 | input[type="number"], 38 | textarea { 39 | width: 100%; 40 | } 41 | 42 | input:not([class^="btn"]), 43 | textarea { 44 | @extend %form-border-radius; 45 | 46 | padding: 0.618em; 47 | color: lighten($text-color, 10%); 48 | 49 | &:focus, 50 | &:hover { 51 | border-color: darken($field-border-color, 15%); 52 | outline: none; 53 | } 54 | 55 | &.field-fw { 56 | width: 100%; 57 | } 58 | } 59 | 60 | .help { 61 | font-size: 0.718em; 62 | margin: 0.618em 0 0; 63 | } 64 | 65 | .form-help { 66 | margin-top: 0.618em; 67 | color: $muted-text-color; 68 | font-size: 0.818em; 69 | font-style: italic; 70 | } 71 | } 72 | 73 | .field-error { 74 | label, 75 | .help, 76 | input { 77 | color: $field-error-color; 78 | border-color: lighten($field-error-color, 40%) !important; 79 | } 80 | } 81 | 82 | .required { 83 | color: $field-required-color; 84 | } 85 | 86 | fieldset { 87 | margin-bottom: 1em; 88 | padding: 1em; 89 | border: none; 90 | 91 | legend { 92 | padding: 0 0.618em; 93 | font-weight: bold; 94 | } 95 | 96 | p:last-child { 97 | margin-bottom: 0; 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /app/static/css/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | * GitHub style for Pygments 3 | * Courtesy of GitHub.com 4 | */ 5 | 6 | .hll { background-color: #f8f8f8; } 7 | .c { color: #999988; font-style: italic; } 8 | .err { color: #a61717; background-color: #e3d2d2; } 9 | .k { font-weight: bold; } 10 | .o { font-weight: bold; } 11 | .cm { color: #999988; font-style: italic; } 12 | .cp { color: #999999; font-weight: bold; } 13 | .c1 { color: #999988; font-style: italic; } 14 | .cs { color: #999999; font-weight: bold; font-style: italic; } 15 | .gd { color: #000000; background-color: #ffdddd; } 16 | .gd .x { color: #000000; background-color: #ffaaaa; } 17 | .ge { font-style: italic; } 18 | .gr { color: #aa0000; } 19 | .gh { color: #999999; } 20 | .gi { color: #000000; background-color: #ddffdd; } 21 | .gi .x { color: #000000; background-color: #aaffaa; } 22 | .go { color: #888888; } 23 | .gp { color: #555555; } 24 | .gs { font-weight: bold; } 25 | .gu { color: #800080; font-weight: bold; } 26 | .gt { color: #aa0000; } 27 | .kc { font-weight: bold; } 28 | .kd { font-weight: bold; } 29 | .kn { font-weight: bold; } 30 | .kp { font-weight: bold; } 31 | .kr { font-weight: bold; } 32 | .kt { color: #445588; font-weight: bold; } 33 | .m { color: #009999; } 34 | .s { color: #dd1144; } 35 | .n { color: #333333; } 36 | .na { color: teal; } 37 | .nb { color: #0086b3; } 38 | .nc { color: #445588; font-weight: bold; } 39 | .no { color: teal; } 40 | .ni { color: purple; } 41 | .ne { color: #990000; font-weight: bold; } 42 | .nf { color: #990000; font-weight: bold; } 43 | .nn { color: #555555; } 44 | .nt { color: navy; } 45 | .nv { color: teal; } 46 | .ow { font-weight: bold; } 47 | .w { color: #bbbbbb; } 48 | .mf { color: #009999; } 49 | .mh { color: #009999; } 50 | .mi { color: #009999; } 51 | .mo { color: #009999; } 52 | .sb { color: #dd1144; } 53 | .sc { color: #dd1144; } 54 | .sd { color: #dd1144; } 55 | .s2 { color: #dd1144; } 56 | .se { color: #dd1144; } 57 | .sh { color: #dd1144; } 58 | .si { color: #dd1144; } 59 | .sx { color: #dd1144; } 60 | .sr { color: #009926; } 61 | .s1 { color: #dd1144; } 62 | .ss { color: #990073; } 63 | .bp { color: #999999; } 64 | .vc { color: teal; } 65 | .vg { color: teal; } 66 | .vi { color: teal; } 67 | .il { color: #009999; } 68 | .gc { color: #999; background-color: #EAF2F5; } 69 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | ### [Unreleased][unreleased] 6 | 7 | ### Added 8 | 9 | - SQLite as main database. 10 | 11 | ### Changed 12 | 13 | - `CHANGELOG.md` following [keepachangelog][keepachangelog] template. 14 | 15 | ### Removed 16 | 17 | - MongoDB Support. 18 | 19 | ## [0.2.0][0.2.0] - 2015-02-17 20 | ### Changed 21 | 22 | - Switched to Gulp, thanks [@BillCriswell](http://twitter.com/bill) 23 | 24 | ### Added 25 | 26 | - Bash support 27 | - feature to add Name to pastes 28 | - feature to avoid list the pastes in the public list (Private Option) 29 | - [Style Guide]('http://rocketb.in/style-guide') 30 | 31 | ## [0.1.4][0.1.4] - 2015-01-30 32 | 33 | ### Removed 34 | 35 | - `paste.js` 36 | 37 | ## [0.1.3][0.1.3] - 2015-01-14 38 | 39 | ### Added 40 | 41 | - Style guide added at `/style-guide` route 42 | 43 | ### Changed 44 | 45 | - Sass folder structure. 46 | - Raw data set to fixed height. 47 | 48 | ### Fixed 49 | 50 | - Bug of `.linenos` showing wrong size. 51 | 52 | ## [0.1.2][0.1.2] - 2015-01-06 53 | 54 | ### Added 55 | 56 | - Added `favicon.ico` 57 | 58 | ### Changed 59 | 60 | - Replaced Pymongo class `Connection` for `MongoClient` 61 | - `all_entries` renamed to `latest_pastes` on `pastes.py` 62 | - `pastes.html` renamted to `latest_pastes.html` 63 | 64 | ### Removed 65 | 66 | - Removed my GA and WMT verification code. 67 | 68 | ## [0.1.1][0.1.1] - 2014-12-27 69 | 70 | ### Added 71 | 72 | - MIT License. 73 | - CSS styling. 74 | 75 | ### Changed 76 | 77 | - Sorting paste by date fixed. 78 | 79 | ## [0.1.0][0.1.0] - 2014-12-17 80 | 81 | ### Added 82 | 83 | - Autocomplete for Ace.js. 84 | - Emmet mode for Ace.js. 85 | - Vim mode for Ace.js. 86 | - Emacs mode for Ace.js. 87 | 88 | ### Removed 89 | 90 | - User management. 91 | 92 | [unreleased]: https://github.com/thinkxl/rocketbin/compare/v0.2.0...HEAD 93 | [0.1.3]: https://github.com/thinkxl/rocketbin/compare/v0.1.3...v0.2.0 94 | [0.1.2]: https://github.com/thinkxl/rocketbin/compare/v0.1.2...v0.1.3 95 | [0.1.1]: https://github.com/thinkxl/rocketbin/compare/v0.1.1...v0.1.2 96 | [0.1.0]: https://github.com/thinkxl/rocketbin/compare/v0.1.0...v0.1.1 97 | [keepachangelog]: http://keepachangelog.com/ 98 | -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/dbbfd7bf94f524852af3cd3b3b5e5f07bcf45594/style.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | 66f55450ee7c33b697b1cc9f5757f325f444246e 3 | o:Sass::Tree::RootNode :@children[o:Sass::Tree::ImportNode :@imported_filenameI"variables:ET;[:@template0: 4 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso;; i;i: 5 | @fileI"J/Users/thinkxl/Development/python/pastebin/app/static/scss/style.scss; T:@importero: Sass::Importers::Filesystem: 6 | @rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss; T:@real_rootI"?/Users/thinkxl/Development/python/pastebin/app/static/scss; T:@same_name_warningso:Set: 7 | @hash{: @options{:@imported_file0o; ;I"vendors/normalize; T;[; 8 | 0; i; o; ;o;; i;i;o;; i;i!;@ ;@;@;0o; ;I"vendors/hyx; T;[; 9 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I"typography/type; T;[; 10 | 0; i ; o; ;o;; i ;i;o;; i ;i;@ ;@;@;0o; ;I"base/colors; T;[; 11 | 0; i 12 | ; o; ;o;; i 13 | ;i;o;; i 14 | ;i;@ ;@;@;0o; ;I"base/base; T;[; 15 | 0; i ; o; ;o;; i ;i;o;; i ;i;@ ;@;@;0o; ;I"base/grid; T;[; 16 | 0; i ; o; ;o;; i ;i;o;; i ;i;@ ;@;@;0o; ;I"base/toolbox; T;[; 17 | 0; i ; o; ;o;; i ;i;o;; i ;i;@ ;@;@;0o; ;I"layout/header; T;[; 18 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I"layout/main; T;[; 19 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I"layout/footer; T;[; 20 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I"layout/comments; T;[; 21 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I"ui/alerts; T;[; 22 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I"ui/buttons; T;[; 23 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I" ui/forms; T;[; 24 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0o; ;I"ui/editor; T;[; 25 | 0; i; o; ;o;; i;i;o;; i;i;@ ;@;@;0; 26 | I"u@import "variables"; 27 | @import "vendors/normalize"; 28 | @import "vendors/hyx"; 29 | @import "typography/type"; 30 | @import "base/colors"; 31 | @import "base/base"; 32 | @import "base/grid"; 33 | @import "base/toolbox"; 34 | @import "layout/header"; 35 | @import "layout/main"; 36 | @import "layout/footer"; 37 | @import "layout/comments"; 38 | @import "ui/alerts"; 39 | @import "ui/buttons"; 40 | @import "ui/forms"; 41 | @import "ui/editor"; 42 | ; T; i; o; ;o;; i;i;o;; i;i;@ ;@:@has_childrenT;@ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/c34cc9ee2846093f81b5801d655097b099e358bc/footer.scssc: -------------------------------------------------------------------------------- 1 | 3.4.3 (Selective Steve) 2 | 2bb1bfe0fa415ffdbea3bafd7bb65de17bb3f042 3 | o:Sass::Tree::RootNode :@children[o:Sass::Tree::CommentNode 4 | : @value[I"/* 5 | * Footer 6 | */:ET: 7 | @type: normal;[: 8 | @linei: @options{o:Sass::Tree::RuleNode: 9 | @rule[I".site-footer; T:@parsed_ruleso:"Sass::Selector::CommaSequence: @members[o:Sass::Selector::Sequence;[o:#Sass::Selector::SimpleSequence ;[o:Sass::Selector::Class: 10 | @nameI"site-footer; T; i 11 | :@filename0: @subject0: @sourceso:Set: 12 | @hash{:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso;; i; i: 13 | @file0:@importer0; i 14 | ;0; i 15 | ;0:@selector_source_rangeo; ;o;; i 16 | ; i;!o;; i 17 | ; i;"I"N/Users/thinkxl/Development/python/pastebin/static/scss/layout/footer.scss; T;#o: Sass::Importers::Filesystem: 18 | @rootI";/Users/thinkxl/Development/python/pastebin/static/scss; T:@real_rootI";/Users/thinkxl/Development/python/pastebin/static/scss; T:@same_name_warningso;;{: 19 | @tabsi;[o:Sass::Tree::PropNode;[I"margin-top; T;o: Sass::Script::Tree::Literal;o: Sass::Script::Value::String;I"1em; T; 20 | :identifier; @ ; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ ;)i:@prop_syntax:new;[; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ :@name_source_rangeo; ;@1;!o;; i ; i;"@;#@ :@value_source_rangeo; ;o;; i ; i;!@2;"@;#@ ; @ o;*;[I" padding; T;o;+;o;,;I"1em; T; 21 | ;-; @ ; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ ;)i;.;/;[; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ ;0o; ;@B;!o;; i ; i;"@;#@ ;1o; ;o;; i ; i;!@C;"@;#@ ; @ ; i 22 | ;o; ;@;!o;; i 23 | ; i;"@;#@ :@has_childrenT; @ o;;[I".site-footer p; T;o;;[o;;[o; ;[o;;I"site-footer; T; i;0;0;o;;{;o; ;o;; i; i;!o;; i; i;"0;#0; i;0o; ;[o:Sass::Selector::Element ;I"p; T:@namespace0; i;0;0;o;;{;o; ;o;; i; i;!o;; i; i;"0;#0; i;0; i;0;$o; ;o;; i; i;!o;; i; i;"@;#@ ;)i;[o;*;[I" margin; T;o;+;o;,;I"0; T; 24 | ;-; @ ; i;o; ;o;; i; i;!o;; i; i;"@;#@ ;)i;.;/;[; i;o; ;o;; i; i;!o;; i; i;"@;#@ ;0o; ;@r;!o;; i; i;"@;#@ ;1o; ;o;; i; i;!@s;"@;#@ ; @ ; i;o; ;@d;!o;; i; i;"@;#@ ;2T; @ :@templateI"m/* 25 | * Footer 26 | */ 27 | 28 | .site-footer { 29 | margin-top: 1em; 30 | padding: 1em; 31 | } 32 | 33 | .site-footer p { 34 | margin: 0; 35 | } 36 | ; T; i;o; ;o;; i; i;!o;; i; i;"@;#@ ;2T; @ -------------------------------------------------------------------------------- /app/static/scss/.sass-cache/42cf9528ef5dfd3d67823e4d89ef92017c4ccea5/footer.scssc: -------------------------------------------------------------------------------- 1 | 3.4.7 (Selective Steve) 2 | 2bb1bfe0fa415ffdbea3bafd7bb65de17bb3f042 3 | o:Sass::Tree::RootNode :@children[o:Sass::Tree::CommentNode 4 | : @value[I"/* 5 | * Footer 6 | */:ET: 7 | @type: normal;[: 8 | @linei: @options{o:Sass::Tree::RuleNode: 9 | @rule[I".site-footer; T:@parsed_ruleso:"Sass::Selector::CommaSequence: @members[o:Sass::Selector::Sequence;[o:#Sass::Selector::SimpleSequence ;[o:Sass::Selector::Class: 10 | @nameI"site-footer; T; i 11 | :@filename0: @subject0: @sourceso:Set: 12 | @hash{:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position; i: @offseti: @end_poso;; i; i: 13 | @file0:@importer0; i 14 | ;0; i 15 | ;0:@selector_source_rangeo; ;o;; i 16 | ; i;!o;; i 17 | ; i;"I"V/Users/adwhiteit3/Development/Juan/python/frontbin/static/scss/layout/footer.scss; T;#o: Sass::Importers::Filesystem: 18 | @rootI"C/Users/adwhiteit3/Development/Juan/python/frontbin/static/scss; T:@real_rootI"C/Users/adwhiteit3/Development/Juan/python/frontbin/static/scss; T:@same_name_warningso;;{: 19 | @tabsi;[o:Sass::Tree::PropNode;[I"margin-top; T;o: Sass::Script::Tree::Literal;o: Sass::Script::Value::String;I"1em; T; 20 | :identifier; @ ; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ ;)i:@prop_syntax:new;[; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ :@name_source_rangeo; ;@1;!o;; i ; i;"@;#@ :@value_source_rangeo; ;o;; i ; i;!@2;"@;#@ ; @ o;*;[I" padding; T;o;+;o;,;I"1em; T; 21 | ;-; @ ; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ ;)i;.;/;[; i ;o; ;o;; i ; i;!o;; i ; i;"@;#@ ;0o; ;@B;!o;; i ; i;"@;#@ ;1o; ;o;; i ; i;!@C;"@;#@ ; @ ; i 22 | ;o; ;@;!o;; i 23 | ; i;"@;#@ :@has_childrenT; @ o;;[I".site-footer p; T;o;;[o;;[o; ;[o;;I"site-footer; T; i;0;0;o;;{;o; ;o;; i; i;!o;; i; i;"0;#0; i;0o; ;[o:Sass::Selector::Element ;I"p; T:@namespace0; i;0;0;o;;{;o; ;o;; i; i;!o;; i; i;"0;#0; i;0; i;0;$o; ;o;; i; i;!o;; i; i;"@;#@ ;)i;[o;*;[I" margin; T;o;+;o;,;I"0; T; 24 | ;-; @ ; i;o; ;o;; i; i;!o;; i; i;"@;#@ ;)i;.;/;[; i;o; ;o;; i; i;!o;; i; i;"@;#@ ;0o; ;@r;!o;; i; i;"@;#@ ;1o; ;o;; i; i;!@s;"@;#@ ; @ ; i;o; ;@d;!o;; i; i;"@;#@ ;2T; @ :@templateI"m/* 25 | * Footer 26 | */ 27 | 28 | .site-footer { 29 | margin-top: 1em; 30 | padding: 1em; 31 | } 32 | 33 | .site-footer p { 34 | margin: 0; 35 | } 36 | ; T; i;o; ;o;; i; i;!o;; i; i;"@;#@ ;2T; @ -------------------------------------------------------------------------------- /app/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | 3 | {% block title %}Create a new paste{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |
9 |
10 | 11 | 24 |
25 | 26 |
27 | 28 | 33 |
34 | 35 |
36 | 37 | 38 |
39 | 40 |
41 | 42 |
43 |
44 | 45 |
46 | 47 |
48 |
49 | {% endblock %} 50 | 51 | {% block scripts %} 52 | 53 | {# #} 54 | {# #} 55 | {# #} 56 | {# #} 57 | 58 | 59 | 60 | 61 | 62 | {% endblock %} 63 | -------------------------------------------------------------------------------- /app/static/scss/base/_typography.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Type.scss 3 | * 4 | * https://github.com/thinkxl/type 5 | */ 6 | 7 | /* Modular Scale 8 | http://modularscale.com/scale/?px1=16&px2=18&ra1=1.618&ra2=0 9 | ---------------------- 10 | 16px @ 1:1.618 11 | 18px @ 1:1.618 12 | ----------------------*/ 13 | 14 | // TODO: 15 | // - Should I remove `hr`? 16 | // - If this is focused on typography, should I include table styling? 17 | 18 | /* 19 | * ## Some Tips: 20 | * 21 | * - Read http://alistapart.com/article/more-meaningful-typography to understand about modular scale 22 | * - Don’t use more than 2 fonts unless you know what you’re doing. 23 | * - Use at least 16px for a base font size. 24 | * - Don't use the darkest black (#000) available in your body text: http://ianstormtaylor.com/design-tip-never-use-black/ 25 | */ 26 | 27 | // Default settings 28 | $unit: 'rem' !default; // You can change it to 'em' 29 | 30 | $base: 1#{$unit} !default; 31 | $base-font-size: 16px !default; 32 | $base-margin-top: $base !default; 33 | $base-margin-bottom: $base !default; 34 | $base-line-height: 1.5 !default; 35 | $base-headings-color: $headings-color !default; 36 | $base-headings-line-height: 1.125 !default; 37 | $base-text-color: #444 !default; 38 | 39 | $code-text-color: tomato; 40 | 41 | $indented-paragraphs: false !default; 42 | 43 | /* 44 | * Base 45 | * 46 | * 1. Vertical space between lines of text, for body text 150% is a good starting point. 47 | * Use a longer line height with a wider measure and vice versa. 48 | */ 49 | 50 | html { 51 | font-size: $base-font-size; 52 | line-height: $base-line-height; /* 1 */ 53 | } 54 | 55 | /* 56 | * Headings 57 | * 58 | * 1. On headings use a smaller line-height than body text. 59 | */ 60 | 61 | h1, h2, h3, h4, h5, h6 { 62 | margin-top: $base-margin-top; 63 | margin-bottom: 0.382#{$unit}; 64 | color: $base-headings-color; 65 | line-height: $base-headings-line-height; /* 1 */ 66 | text-rendering: optimizeLegibility; 67 | } 68 | 69 | h1 { 70 | font-size: 2.618#{$unit}; 71 | } 72 | 73 | h2 { 74 | font-size: 1.82#{$unit}; 75 | } 76 | 77 | h3 { 78 | font-size: 1.618#{$unit}; 79 | } 80 | 81 | h4, h5, h6 { 82 | font-size: 1.125#{$unit}; 83 | } 84 | 85 | /* Paragraph */ 86 | p { 87 | margin-top: $base-margin-top; 88 | margin-bottom: $base-margin-bottom; 89 | } 90 | 91 | /* Anchor links */ 92 | a { 93 | color: $link-color; 94 | 95 | &:hover { 96 | color: darken($link-color, 10%); 97 | } 98 | } 99 | 100 | /* Lists */ 101 | nav ul, 102 | nav ol { 103 | list-style: none; 104 | margin-left: 0; 105 | padding-left: 0; 106 | } 107 | 108 | ul, ol, dl { 109 | margin-top: 0; 110 | margin-bottom: $base-margin-bottom; 111 | line-height: $base-line-height; 112 | } 113 | 114 | li > ul, 115 | li > ol { 116 | margin-bottom: 0; 117 | } 118 | 119 | /* Better styled `
` */ 120 | hr { 121 | position: relative; 122 | margin: 1.5#{$unit} 0; 123 | border: 0; 124 | border-top: 1px solid #eee; 125 | border-bottom: 1px solid #fff; 126 | } 127 | 128 | /* Quotes */ 129 | blockquote { 130 | padding-right: 5#{$unit}; 131 | padding-left: 1.25#{$unit}; 132 | margin: 1#{$unit} 0; 133 | border-left: .25#{$unit} solid lighten($base-text-color, 65%); 134 | } 135 | 136 | blockquote p:last-child { 137 | margin-bottom: 0; 138 | } 139 | -------------------------------------------------------------------------------- /app/views/paste.py: -------------------------------------------------------------------------------- 1 | import os 2 | from datetime import datetime 3 | from flask import Flask, request, render_template, redirect, url_for, Blueprint, \ 4 | abort 5 | import jinja2 6 | import json 7 | import arrow 8 | from pygments import highlight 9 | from pygments.lexers import get_lexer_by_name 10 | from pygments.formatters import HtmlFormatter 11 | from app import db 12 | from app.utils import gen_new_id, SUPPORTED_LANGUAGES 13 | from app.database import pastes 14 | from app.models import Paste 15 | 16 | mod = Blueprint('paste', __name__) 17 | 18 | def datetimeformat(value): 19 | past = arrow.get(value) 20 | return past.humanize() 21 | 22 | # jinja_env = Environment() 23 | # jinja_env.filters['datetimeformat'] = datetimeformat 24 | jinja2.filters.FILTERS['datetimeformat'] = datetimeformat 25 | 26 | @mod.route('/paste/save', methods=['POST']) 27 | def save_paste(): 28 | if request.method == 'POST' and request.form['lang'] in SUPPORTED_LANGUAGES: 29 | if Paste.query.all(): 30 | _id = gen_new_id(len(Paste.query.all()) + 1) 31 | else: 32 | _id = gen_new_id(1) 33 | 34 | # pastes.insert({ 35 | # '_id': _id, 36 | # 'code': request.form['code'], 37 | 38 | # # In the front-end 'Bash' needs to be called 'sh' because Ace.js need it 39 | # # that way, so we change it to 'Bash' here to avoid conflicts 40 | # 'lang': 'Bash' if request.form['lang'] == 'sh' else request.form['lang'], 41 | # 'theme': request.form['theme'], 42 | # 'title': request.form['title'], 43 | # 'private': request.form['private'], 44 | # 'created_at': datetime.utcnow() 45 | # }) 46 | 47 | 48 | # _id, title, private, code, lang, theme, created_at 49 | 50 | # SQLAlchemy 51 | paste = Paste(_id, request.form['title'], request.form['private'], 52 | request.form['code'], request.form['lang'], 'github', 53 | datetime.utcnow()) 54 | 55 | db.session.add(paste) 56 | db.session.commit() 57 | 58 | return json.dumps({'status': 'success', '_id': _id}) 59 | else: 60 | abort(403) 61 | 62 | @mod.route('/paste/') 63 | def show_paste(id=id): 64 | # MongoDB 65 | # paste = pastes.find_one({'_id':id}) 66 | 67 | # SQLAlchemy 68 | # paste = Paste.filter(_id==id).first() 69 | paste = Paste.query.filter_by(_id=id).first() 70 | 71 | # If title is not set, use `id` instead 72 | # title = id if not 'title' in paste else paste.title 73 | title = paste.title 74 | 75 | lexer = get_lexer_by_name(paste.lang, stripall=True) 76 | code_result = highlight(paste.code, lexer, HtmlFormatter(linenos=True)) 77 | return render_template('paste.html', code=code_result, code_raw=paste.code, 78 | id=id, lang=paste.lang, created_at=paste.created_at, title=title, 79 | created_by=paste.created_by) 80 | 81 | @mod.route('/pastes') 82 | def show_all(): 83 | ## TODO: Fix to show in `False` instead of `"false"` 84 | latest_pastes = Paste.query.filter(Paste.private=='false')\ 85 | .order_by(Paste.id.desc()).limit(25) 86 | 87 | # MongoDB 88 | # latest_pastes = pastes.find({'private': 'false'}).limit(25).sort('created_at', -1) 89 | return render_template('latest-pastes.html', all=latest_pastes) 90 | -------------------------------------------------------------------------------- /app/static/scss/vendors/_hyx.scss: -------------------------------------------------------------------------------- 1 | /*! Hyx v2.0.0 | MIT License | http://github.com/thinkxl/hyx.less */ 2 | 3 | // Global settings 4 | $gutter: 4% !default; // - distance between columns 5 | $grid-size: 12 !default; // - num of columns 6 | $width: 100% !default; // - space that we want to use for the grid 7 | 8 | // Mixin that does all the math in % for columns 9 | // 10 | // @param $num {num} number of columns 11 | // @param $global-gutter {num} gutter inhered from global `$gutter;` 12 | // @param @in-gutter {num} gutter that only affects this mixin 13 | // 14 | // @usage: 15 | // `@include core(0, 2%, 0);` 16 | // `@include core(1/4, 4%, 1%);` 17 | @mixin core($num, $gutter, $margin) { 18 | $col-size: ( $width / $grid-size ); 19 | $cols: ( $width / ( $col-size * $num ) ); 20 | float: left; 21 | width: ( $width - ( $gutter * ( $cols - 1 ) ) ) / $cols; 22 | margin-left: $margin; 23 | } 24 | 25 | // Allow to use fractions as number of colums 26 | // 27 | // @param $num {num} fraction representing number of columns 28 | // @param $margin {num} overwrite @param $gutter mostly to set it 0 29 | // @param $gutter {num} set margin-right to the global $gutter value 30 | // 31 | // @usage: 32 | // `.col-1-3 { 33 | // @include fraction(1/3); 34 | // } 35 | // 36 | // .col-1-2 { 37 | // @include fraction(1/2); 38 | // }` 39 | @mixin fraction($num, $margin: $gutter, $gutter: $gutter) { 40 | @include core($num * $grid-size, $gutter, $margin); 41 | } 42 | 43 | // Main mixin that define the size in % based on columns 44 | // 45 | // @param $num {num} number of columns 46 | // @param $margin {num} overwrite @param $gutter mostly to set it 0 47 | // @param $gutter {num} set margin-right to the global $gutter value 48 | 49 | // 50 | // @usage: 51 | // `.col-1-4 { 52 | // .cols(3); 53 | // } 54 | // 55 | // .col-8 { 56 | // .cols(8); 57 | // } 58 | // 59 | // /* If is first element with no namespace */ 60 | // #main { 61 | // .cols(8, 0); /* set margin-left to 0 */ 62 | // }` 63 | @mixin cols($num, $margin: $gutter, $gutter: $gutter) { 64 | @include core($num, $gutter, $margin); 65 | } 66 | 67 | // It will take first element matching the attribute selector 68 | // and will add a `margin-left: 0;` to avoid collapsing, so we 69 | // can build grids like: `.col-8 {};` and `.col-4 {};` 70 | // 71 | // @param $name {String} namespace you want to use 72 | // 73 | // @usage: 74 | // `@include namespace('grid-');` 75 | @mixin namespace($namespace: 'col-') { 76 | [class^="#{$namespace}"]:first-child { 77 | margin-left: 0; 78 | } 79 | } 80 | 81 | // Grid container 82 | .row { 83 | width: 100%; 84 | 85 | &:before, 86 | &:after { 87 | content: " "; 88 | display: table; 89 | } 90 | 91 | &:after { 92 | clear: both; 93 | } 94 | } 95 | 96 | // Box sizing reset 97 | // http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ 98 | // 99 | // @usage: 100 | // `@include edit();` 101 | @mixin box-sizing() { 102 | html { 103 | box-sizing: border-box; 104 | } 105 | 106 | *, *:before, *:after { 107 | box-sizing: inherit; 108 | } 109 | } 110 | 111 | // It will make sites look from this: http://bit.ly/1CQmQwl to this: http://bit.ly/1CQmVjH 112 | // 113 | // @usage: 114 | // `@include edit();` 115 | @mixin edit() { 116 | * { 117 | background: rgba(0,0,0,0.1); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /app/templates/layout/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block head %}{% endblock %} 6 | 7 | {% block title %}{% endblock %} - Rocketbin 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Fork me on GitHub 21 | 22 |
23 |
24 |
25 | {# #} 26 |

Rocketbin

27 |
28 | 29 |
30 | 36 |
37 |
38 |
39 | 40 |
41 |
42 |
43 | {% block content %}{% endblock %} 44 |
45 |
46 |
47 | 48 |
49 |
50 | 51 | 62 | 63 | {% block scripts %}{% endblock %} 64 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Rocketbin v0.2.0 2 | ======== 3 | 4 | Rocketbin is a very easy to use [Pastebin](http://pastebin.com/) clone. 5 | 6 | You can share code snippets right away, just write code, submit and share the link. 7 | 8 | Supported languages: 9 | 10 | - HTML 11 | - CSS 12 | - Sass 13 | - Less 14 | - JavaScript 15 | - CoffeeScript 16 | - Python 17 | - Ruby 18 | - PHP 19 | 20 | Rocketbin is powered by [Flask](http://flask.pocoo.org/), [MongoDB](http://www.mongodb.org/), [Sass](http://sass-lang.com/), [jQuery](http://jquery.com/), & [Ace](http://ace.c9.io/). 21 | 22 | Installation 23 | ------------ 24 | 25 | Prerequisites: 26 | - Python 2.7 or Python 3.3 27 | - [pip](https://pip.pypa.io/en/latest/installing.html) 28 | - [virtualenv](https://virtualenv.pypa.io/en/latest/) 29 | - [MongoDB](http://www.mongodb.org/) server running 30 | 31 | ```bash 32 | # First you need to clone the project 33 | $ git clone https://github.com/thinkxl/rocketbin.git 34 | $ cd rocketbin 35 | # Create a virtual enviroment 36 | $ virtualenv venv 37 | # Activate the enviroment 38 | $ . venv/bin/activate 39 | # Install all dependencies with pip 40 | $ pip install -r requirements.txt 41 | # Rename `config.example.py` to `config.py` 42 | $ mv config.example.py config.py 43 | # Edit settings inside `config.py` file with your favorite editor 44 | $ nano config.py 45 | ``` 46 | 47 | After `nano config.py` you will see something like this: 48 | 49 | ```python 50 | import os 51 | 52 | DEBUG=True 53 | SECRET_KEY=os.getenv('SECRET_KEY', '') 54 | SALT=os.getenv('SALT', '') 55 | 56 | MONGODB_HOSTNAME = os.getenv('MONGODB_HOST', 'localhost') 57 | MONGODB_NAME = os.getenv('MONGODB_DATABASE', '') 58 | MONGODB_PORT = int(os.getenv('MONGODB_PORT', 27017)) 59 | MONGODB_USERNAME = os.getenv('MONGODB_USERNAME', '') 60 | MONGODB_PASSWORD = os.getenv('MONGODB_PASSWORD', '') 61 | 62 | del os 63 | ``` 64 | 65 | And then you will have to enter your own settings like this example: 66 | 67 | ```python 68 | import os 69 | 70 | DEBUG=True 71 | SECRET_KEY=os.getenv('SECRET_KEY', 'development-key') 72 | SALT=os.getenv('SALT', 'development-salt') 73 | 74 | MONGODB_HOSTNAME = os.getenv('MONGODB_HOST', 'localhost') 75 | MONGODB_NAME = os.getenv('MONGODB_DATABASE', 'rocketbin-test') 76 | MONGODB_PORT = int(os.getenv('MONGODB_PORT', 27017)) 77 | 78 | # If you didn't specify username and password when starting the MongoDB server, then just leave these blank. 79 | MONGODB_USERNAME = os.getenv('MONGODB_USERNAME', '') 80 | MONGODB_PASSWORD = os.getenv('MONGODB_PASSWORD', '') 81 | 82 | del os 83 | ``` 84 | 85 | **NOTE:** *In most cases when you are running the app in your computer (localhost) you won’t need to enter `MONGODB_USERNAME` and `MONGODB_PASSWORD` so leaving them blank is ok.* 86 | 87 | ```bash 88 | # After editing the `config.py` file run the server 89 | $ python run.py 90 | # Open the browser at http://127.0.0.1:4000 91 | ``` 92 | 93 | Support 94 | ------- 95 | 96 | If you are having issues trying to install Rocketbin or have any question ping me via: 97 | 98 | - **Email:** thinkxl (at) gmail.com 99 | - **IRC:** `##frontend` or `#pocoo` in freenode 100 | - **Twitter:** [@thinkxl](http://twitter.com/thinkxl) 101 | 102 | FAQ 103 | --- 104 | 105 | **Why another Pastebin clone?** 106 | 107 | I just wanted to know how to make one, my goal is to learn Python and Flask, so I thought it was a good exercise. 108 | 109 | **Why MongoDB and not SQLite?** 110 | 111 | Because I’m learning MongoDB. 112 | 113 | License 114 | ------- 115 | 116 | The project is licensed under the GPL v2 license. 117 | -------------------------------------------------------------------------------- /app/static/css/monokai.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #49483e } 2 | .highlight { background: #272822; color: #f8f8f2 } 3 | .highlight .c { color: #75715e } /* Comment */ 4 | .highlight .err { color: #960050; background-color: #1e0010 } /* Error */ 5 | .highlight .k { color: #66d9ef } /* Keyword */ 6 | .highlight .l { color: #ae81ff } /* Literal */ 7 | .highlight .n { color: #f8f8f2 } /* Name */ 8 | .highlight .o { color: #f92672 } /* Operator */ 9 | .highlight .p { color: #f8f8f2 } /* Punctuation */ 10 | .highlight .cm { color: #75715e } /* Comment.Multiline */ 11 | .highlight .cp { color: #75715e } /* Comment.Preproc */ 12 | .highlight .c1 { color: #75715e } /* Comment.Single */ 13 | .highlight .cs { color: #75715e } /* Comment.Special */ 14 | .highlight .gd { color: #f92672 } /* Generic.Deleted */ 15 | .highlight .ge { font-style: italic } /* Generic.Emph */ 16 | .highlight .gi { color: #a6e22e } /* Generic.Inserted */ 17 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 18 | .highlight .gu { color: #75715e } /* Generic.Subheading */ 19 | .highlight .kc { color: #66d9ef } /* Keyword.Constant */ 20 | .highlight .kd { color: #66d9ef } /* Keyword.Declaration */ 21 | .highlight .kn { color: #f92672 } /* Keyword.Namespace */ 22 | .highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ 23 | .highlight .kr { color: #66d9ef } /* Keyword.Reserved */ 24 | .highlight .kt { color: #66d9ef } /* Keyword.Type */ 25 | .highlight .ld { color: #e6db74 } /* Literal.Date */ 26 | .highlight .m { color: #ae81ff } /* Literal.Number */ 27 | .highlight .s { color: #e6db74 } /* Literal.String */ 28 | .highlight .na { color: #a6e22e } /* Name.Attribute */ 29 | .highlight .nb { color: #f8f8f2 } /* Name.Builtin */ 30 | .highlight .nc { color: #a6e22e } /* Name.Class */ 31 | .highlight .no { color: #66d9ef } /* Name.Constant */ 32 | .highlight .nd { color: #a6e22e } /* Name.Decorator */ 33 | .highlight .ni { color: #f8f8f2 } /* Name.Entity */ 34 | .highlight .ne { color: #a6e22e } /* Name.Exception */ 35 | .highlight .nf { color: #a6e22e } /* Name.Function */ 36 | .highlight .nl { color: #f8f8f2 } /* Name.Label */ 37 | .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ 38 | .highlight .nx { color: #a6e22e } /* Name.Other */ 39 | .highlight .py { color: #f8f8f2 } /* Name.Property */ 40 | .highlight .nt { color: #f92672 } /* Name.Tag */ 41 | .highlight .nv { color: #f8f8f2 } /* Name.Variable */ 42 | .highlight .ow { color: #f92672 } /* Operator.Word */ 43 | .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ 44 | .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ 45 | .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ 46 | .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ 47 | .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ 48 | .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ 49 | .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ 50 | .highlight .sc { color: #e6db74 } /* Literal.String.Char */ 51 | .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ 52 | .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ 53 | .highlight .se { color: #ae81ff } /* Literal.String.Escape */ 54 | .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ 55 | .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ 56 | .highlight .sx { color: #e6db74 } /* Literal.String.Other */ 57 | .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ 58 | .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ 59 | .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ 60 | .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ 61 | .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ 62 | .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ 63 | .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ 64 | .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ 65 | -------------------------------------------------------------------------------- /app/static/css/default.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #f8f8f8; } 3 | .highlight .c { color: #408080; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #BC7A00 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #888888 } /* Generic.Output */ 17 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 21 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 27 | .highlight .m { color: #666666 } /* Literal.Number */ 28 | .highlight .s { color: #BA2121 } /* Literal.String */ 29 | .highlight .na { color: #7D9029 } /* Name.Attribute */ 30 | .highlight .nb { color: #008000 } /* Name.Builtin */ 31 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #880000 } /* Name.Constant */ 33 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 34 | .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ 36 | .highlight .nf { color: #0000FF } /* Name.Function */ 37 | .highlight .nl { color: #A0A000 } /* Name.Label */ 38 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #19177C } /* Name.Variable */ 41 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 44 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 45 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 46 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 47 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 48 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 49 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 50 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 51 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 52 | .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ 53 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 54 | .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ 55 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 56 | .highlight .sr { color: #BB6688 } /* Literal.String.Regex */ 57 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 58 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 59 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 60 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 61 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 62 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 63 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ 64 | -------------------------------------------------------------------------------- /app/static/css/code.css: -------------------------------------------------------------------------------- 1 | /* railcasts.css 2 | * https://github.com/uraimo/pygments-vimstyles/blob/2a99e97f6383d1b978917ff42f9ecdd6b2f021c0/railscasts.css 3 | */ 4 | 5 | .highlight { background: #2B2B2B; color: #E6E1DC} 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight .c { color: #BC9458; font-style: italic} /* Comment */ 8 | .highlight .err { color: #E6E1DC} /* Error */ 9 | .highlight .g { color: #E6E1DC} /* Generic */ 10 | .highlight .k { color: #CC7833} /* Keyword */ 11 | .highlight .l { color: #E6E1DC} /* Literal */ 12 | .highlight .n { color: #E6E1DC} /* Name */ 13 | .highlight .o { color: #E6E1DC} /* Operator */ 14 | .highlight .x { color: #E6E1DC} /* Other */ 15 | .highlight .p { color: #E6E1DC} /* Punctuation */ 16 | .highlight .cm { color: #BC9458; font-style: italic} /* Comment.Multiline */ 17 | .highlight .cp { color: #CC7833} /* Comment.Preproc */ 18 | .highlight .c1 { color: #BC9458; font-style: italic} /* Comment.Single */ 19 | .highlight .cs { color: #BC9458; font-style: italic} /* Comment.Special */ 20 | .highlight .gd { color: #E6E1DC; background-color: #660000 } /* Generic.Deleted */ 21 | .highlight .ge { color: #E6E1DC} /* Generic.Emph */ 22 | .highlight .gr { color: #FFFFFF; background-color: #990000 } /* Generic.Error */ 23 | .highlight .gh { color: #FFFFFF} /* Generic.Heading */ 24 | .highlight .gi { color: #E6E1DC; background-color: #144212 } /* Generic.Inserted */ 25 | .highlight .go { color: #E6E1DC} /* Generic.Output */ 26 | .highlight .gp { color: #E6E1DC} /* Generic.Prompt */ 27 | .highlight .gs { color: #E6E1DC} /* Generic.Strong */ 28 | .highlight .gu { color: #FFFFFF} /* Generic.Subheading */ 29 | .highlight .gt { color: #E6E1DC} /* Generic.Traceback */ 30 | .highlight .kc { color: #CC7833} /* Keyword.Constant */ 31 | .highlight .kd { color: #CC7833} /* Keyword.Declaration */ 32 | .highlight .kn { color: #CC7833} /* Keyword.Namespace */ 33 | .highlight .kp { color: #CC7833} /* Keyword.Pseudo */ 34 | .highlight .kr { color: #CC7833} /* Keyword.Reserved */ 35 | .highlight .kt { color: #DA4939} /* Keyword.Type */ 36 | .highlight .ld { color: #E6E1DC} /* Literal.Date */ 37 | .highlight .m { color: #A5C261} /* Literal.Number */ 38 | .highlight .s { color: #A5C261} /* Literal.String */ 39 | .highlight .na { color: #FFC66D} /* Name.Attribute */ 40 | .highlight .nb { color: #E6E1DC} /* Name.Builtin */ 41 | .highlight .nc { color: #E6E1DC} /* Name.Class */ 42 | .highlight .no { color: #6D9CBE} /* Name.Constant */ 43 | .highlight .nd { color: #E6E1DC} /* Name.Decorator */ 44 | .highlight .ni { color: #E6E1DC} /* Name.Entity */ 45 | .highlight .ne { color: #E6E1DC} /* Name.Exception */ 46 | .highlight .nf { color: #FFC66D} /* Name.Function */ 47 | .highlight .nl { color: #E6E1DC} /* Name.Label */ 48 | .highlight .nn { color: #E6E1DC} /* Name.Namespace */ 49 | .highlight .nx { color: #E6E1DC} /* Name.Other */ 50 | .highlight .py { color: #E6E1DC} /* Name.Property */ 51 | .highlight .nt { color: #CC7833} /* Name.Tag */ 52 | .highlight .nv { color: #D0D0FF} /* Name.Variable */ 53 | .highlight .ow { color: #E6E1DC} /* Operator.Word */ 54 | .highlight .w { color: #E6E1DC} /* Text.Whitespace */ 55 | .highlight .mf { color: #A5C261} /* Literal.Number.Float */ 56 | .highlight .mh { color: #A5C261} /* Literal.Number.Hex */ 57 | .highlight .mi { color: #A5C261} /* Literal.Number.Integer */ 58 | .highlight .mo { color: #A5C261} /* Literal.Number.Oct */ 59 | .highlight .sb { color: #A5C261} /* Literal.String.Backtick */ 60 | .highlight .sc { color: #A5C261} /* Literal.String.Char */ 61 | .highlight .sd { color: #A5C261} /* Literal.String.Doc */ 62 | .highlight .s2 { color: #A5C261} /* Literal.String.Double */ 63 | .highlight .se { color: #A5C261} /* Literal.String.Escape */ 64 | .highlight .sh { color: #A5C261} /* Literal.String.Heredoc */ 65 | .highlight .si { color: #A5C261} /* Literal.String.Interpol */ 66 | .highlight .sx { color: #A5C261} /* Literal.String.Other */ 67 | .highlight .sr { color: #A5C261} /* Literal.String.Regex */ 68 | .highlight .s1 { color: #A5C261} /* Literal.String.Single */ 69 | .highlight .ss { color: #A5C261} /* Literal.String.Symbol */ 70 | .highlight .bp { color: #E6E1DC} /* Name.Builtin.Pseudo */ 71 | .highlight .vc { color: #D0D0FF} /* Name.Variable.Class */ 72 | .highlight .vg { color: #D0D0FF} /* Name.Variable.Global */ 73 | .highlight .vi { color: #D0D0FF} /* Name.Variable.Instance */ 74 | .highlight .il { color: #A5C261} /* Literal.Number.Integer.Long */ 75 | -------------------------------------------------------------------------------- /app/static/js/app.js: -------------------------------------------------------------------------------- 1 | ;(function($) { 2 | var s, 3 | d = document, 4 | editor = ace.edit("editor"), 5 | 6 | app = { 7 | settings: { 8 | // Defaults 9 | title: '', 10 | lang: localStorage.getItem("rocketbin-language") || "html", 11 | theme: "github", 12 | keybinding: localStorage.getItem("rocketbin-keybinding") || "keybinding", 13 | private: '', 14 | // UI 15 | optionLanguage: d.getElementById('language'), 16 | optionTheme: d.getElementById('theme'), 17 | optionKeybinding: d.getElementById('keybinding'), 18 | form: d.getElementsByClassName('editor-form')[0], 19 | btnDelete: $('.btnDelete') 20 | }, 21 | 22 | init: function() { 23 | s = this.settings; 24 | 25 | // start app 26 | this.setDefaultOptions(); 27 | this.bindUI(); 28 | }, 29 | 30 | bindUI: function() { 31 | s.optionLanguage.addEventListener('change', app.changeLang); 32 | s.optionKeybinding.addEventListener('change', app.changeKeybinding); 33 | // s.optionTheme.addEventListener('change', app.changeTheme); 34 | s.form.addEventListener('submit', app.saveCode); 35 | }, 36 | 37 | setKeybinding: function(keybinding) { 38 | editor.setKeyboardHandler("ace/keyboard/" + keybinding); 39 | app.saveSetting("rocketbin-keybinding", keybinding); 40 | }, 41 | 42 | setDefaultOptions: function() { 43 | ace.require("ace/ext/language_tools"); 44 | ace.require("ace/ext/emmet"); 45 | 46 | // http://stackoverflow.com/questions/22262136/ace-editor-with-vim-mode-and-emmet-enabled 47 | editor.setOption("EnableEmmet", true); 48 | 49 | // display saved options on UI 50 | s.optionKeybinding.value = localStorage.getItem("rocketbin-keybinding") || s.keybinding; 51 | s.optionLanguage.value = localStorage.getItem("rocketbin-language") || s.lang; 52 | 53 | this.setTheme(s.theme); 54 | this.setLang(s.lang); 55 | this.setKeybinding(s.keybinding); 56 | 57 | editor.setOptions({ 58 | wrap: true, 59 | enableBasicAutocompletion: true, 60 | enableSnippets: true, 61 | enableLiveAutocompletion: true, 62 | behavioursEnabled: true 63 | }); 64 | }, 65 | 66 | saveSetting: function(option, value) { 67 | localStorage.setItem(option, value); 68 | }, 69 | 70 | setLang: function(lang) { 71 | if (lang != "html") { 72 | editor.setOption("enableEmmet", false); 73 | } else { 74 | editor.setOption("enableEmmet", true); 75 | } 76 | 77 | editor.getSession().setMode("ace/mode/" + lang.toLowerCase()); 78 | app.editorFocus(); 79 | app.saveSetting("rocketbin-language", lang); 80 | }, 81 | 82 | setTheme: function(theme) { 83 | editor.setTheme("ace/theme/" + theme); 84 | app.editorFocus(); 85 | }, 86 | 87 | // http://stackoverflow.com/questions/7050931/how-to-set-focus-on-the-ace-editor 88 | editorFocus: function() { 89 | editor.focus(); 90 | var lineNumber = editor.getSession().getValue().split("\n").length, 91 | session = editor.getSession(), 92 | count = session.getLength(); 93 | editor.gotoLine(count, session.getLine(count - 1).length); 94 | }, 95 | 96 | changeKeybinding: function() { 97 | var value = this.value; 98 | s.keybinding = value; 99 | app.setKeybinding(value); 100 | app.editorFocus(); 101 | }, 102 | 103 | changeLang: function() { 104 | var value = this.value; 105 | s.lang = value; 106 | app.setLang(value); 107 | }, 108 | 109 | changeTheme: function() { 110 | var value = this.value; 111 | s.theme = value; 112 | app.setTheme(value); 113 | app.editorFocus(); 114 | }, 115 | 116 | saveCode: function(e) { 117 | e.preventDefault(); 118 | var code = editor.getValue(); 119 | 120 | // Fixes 121 | s.title = document.getElementById('title').value; 122 | s.private = document.getElementById('private').checked; 123 | 124 | // Ace.js uses Coffee instead of CoffeeScript , so we fix it here 125 | // to make the server be able to read it correctly. 126 | if (s.lang == 'Coffee') { 127 | s.lang = 'CoffeeScript'; 128 | } 129 | 130 | console.log(s.title); 131 | console.log(s.private); 132 | 133 | if (code != '') { 134 | $.ajax({ 135 | url: '/paste/save', 136 | data: { 137 | code: code, 138 | lang: s.lang, 139 | theme: s.theme, 140 | // Make sure that the title is less than 60 chars 141 | title: s.title.substring(0, 100), 142 | private: s.private 143 | }, 144 | type: 'POST', 145 | success: function(data) { 146 | var status = $.parseJSON(data); 147 | 148 | if (status._id) { 149 | location.href = location.href + 'paste/' + status._id; 150 | } 151 | }, 152 | error: function(xhr, textStatus) { 153 | /* 154 | * Need to get the error msg from the server to send it back 155 | * and render the correct 500.html template 156 | */ 157 | 158 | if (xhr.status === 500) { 159 | location.href = location.href + '500/'; 160 | } 161 | } 162 | }); 163 | } else { 164 | // show an error msg about not leaving blank the textarea 165 | } 166 | } 167 | }; 168 | 169 | app.init(); 170 | })(jQuery); 171 | -------------------------------------------------------------------------------- /app/static/css/style.min.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8";/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Hyx v2.0.0 | MIT License | http://github.com/thinkxl/hyx.less */.row{width:100%}.row:after,.row:before{content:" ";display:table}.row:after{clear:both}html{font-size:18px;line-height:1.618}h1,h2,h3,h4,h5,h6{margin-top:1rem;margin-bottom:.382rem;color:#333;line-height:1.125;text-rendering:optimizeLegibility}h1{font-size:2.618rem}h2{font-size:1.82rem}h3{font-size:1.618rem}h4,h5,h6{font-size:1.125rem}p{margin-top:1rem;margin-bottom:1.618rem}a{color:#173831}a:hover{color:#081411}nav ol,nav ul{list-style:none;margin-left:0;padding-left:0}dl,ol,ul{margin-top:0;margin-bottom:1.618rem;line-height:1.618}li>ol,li>ul{margin-bottom:0}hr{position:relative;margin:1.5rem 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}blockquote{padding-right:5rem;padding-left:1.25rem;margin:1rem 0;border-left:.25rem solid #eaeaea}blockquote p:last-child{margin-bottom:0}html{box-sizing:border-box;background-color:#eee}*,:after,:before{box-sizing:inherit}body{font-family:'Droid Sans',sans-serif;background-color:#eee;color:#333;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.ace_editor,code,pre{font-family:'Source Code Pro',source-code-pro,monospace!important;font-size:13px!important;-webkit-font-smoothing:auto}h1,h2,h3,h4,h5{font-family:'Source Sans Pro',sans-serif;color:#333}.app h1,.app h2,.app h3,.app h4{color:#173831}[class^=alert-]{border:1px solid;border-bottom-width:3px;border-radius:4px;margin:1em 0;padding:1.125em}[class^=alert-] p{margin:0}.alert-information{border-color:#bddcee;color:#1e5575;background-color:#fafcfe}.alert-information strong{color:#439ccf}.alert-error{border-color:#f6a79f;color:#72140a;background-color:#fde7e5}.alert-error strong{color:#e72915}.alert-warning{border-color:#ffa76d;color:#532100;background-color:#ffd5ba}.alert-warning strong{color:#d35400}.alert-success{border-color:#bedf91;color:#2f4414;background-color:#e1f0cc}.alert-success strong{color:#74a730}.btn-default,.btn-ghost,.btn-large,.btn-small,a.btn-default,a.btn-ghost,a.btn-large,a.btn-small,button{display:inline-block;padding:.418em 1em;border:0;border-radius:.236rem;text-decoration:none;font-family:inherit;font-weight:400;line-height:1;cursor:pointer}.btn-default:focus,.btn-ghost:focus,.btn-large:focus,.btn-small:focus,button:focus{outline:0}.btn-default,.btn-ghost,.btn-large,.btn-small,a.btn-default,a.btn-ghost,a.btn-large,a.btn-small,button{background-color:#3498db;color:#fff}.btn-default:hover,.btn-ghost:hover,.btn-large:hover,.btn-small:hover,a.btn-default:hover,a.btn-ghost:hover,a.btn-large:hover,a.btn-small:hover,button:hover{background-color:#2386c8;color:#fff}.btn-default:active,.btn-ghost:active,.btn-large:active,.btn-small:active,a.btn-default:active,a.btn-ghost:active,a.btn-large:active,a.btn-small:active,button:active{background-color:#2791d9}.btn-ghost{background-color:transparent;color:#fff;border:3px solid #fff;opacity:.8}.btn-ghost:hover{background-color:transparent;color:#fff}.btn-ghost:active{background-color:transparent}.btn-ghost:hover{opacity:1}.btn-small{font-size:.818rem}.btn-large{font-size:1.318rem}.form .field-group input:not([class^=btn]),.form .field-group textarea{border:none;border-radius:4px}.form{background-color:#eee;color:#666;border-radius:4px}.form .field-group{margin-bottom:1em}.form .field-group:last-child{margin-bottom:0}.form .field-group .label-checkbox,.form .field-group .label-radio,.form .field-group .label-text{font-weight:700}.form .field-group .label-text{display:block}.form .field-group .label-checkbox,.form .field-group .label-radio{display:inline-block}.form .field-group input[type=text],.form .field-group input[type=password],.form .field-group input[type=number],.form .field-group textarea{width:100%}.form .field-group input:not([class^=btn]),.form .field-group textarea{padding:.618em;color:#4d4d4d}.form .field-group input:not([class^=btn]):focus,.form .field-group input:not([class^=btn]):hover,.form .field-group textarea:focus,.form .field-group textarea:hover{border-color:#a6a6a6;outline:0}.form .field-group input:not([class^=btn]).field-fw,.form .field-group textarea.field-fw{width:100%}.form .field-group .help{font-size:.718em;margin:.618em 0 0}.form .field-group .form-help{margin-top:.618em;color:#595959;font-size:.818em;font-style:italic}.form .field-error .help,.form .field-error input,.form .field-error label{color:brown;border-color:#ebb0b0!important}.form .required{color:brown}.form fieldset{margin-bottom:1em;padding:1em;border:none}.form fieldset legend{padding:0 .618em;font-weight:700}.form fieldset p:last-child{margin-bottom:0}#editor,.code-result{border-radius:4px!important;border:8px solid #ccc}.linenos-dark{color:#8f908a;background-color:#2F3129}.highlighttable-dark>tbody{background-color:#272822}.linenos,.linenos-light{color:#aaa;background-color:#E8E8E8}.highlighttable,.highlighttable-light{color:#333}.highlighttable-light>tbody,.highlighttable>tbody{background-color:#fff}.code-raw-textarea,.code-raw-textarea-light{color:#333}.code-raw{width:100%}.code-raw-textarea{padding:.618em;width:100%;font-family:'Source Code Pro',monospace;font-size:13px;background-color:#fff;border-radius:4px;border:none}.code-raw-textarea:focus{outline:0}.code-result{height:auto;overflow:auto}.code-result>table{border-collapse:inherit!important}.highlighttable{border-radius:4px}.linenos{width:2em;min-width:2em;text-align:center}.code{padding-left:5px}[class^=col-]:first-child{margin-left:0}.col-1-1{float:left;width:100%;margin-left:0}.col-1-2{float:left;width:49%;margin-left:2%}.col-1-3{float:left;width:32%;margin-left:2%}.col-1-4{float:left;width:23.5%;margin-left:2%}.site-logo,.site-title{display:inline-block}.page-title{margin:1.618em auto;text-align:center}.site-logo{width:2em;display:inline-block}.masthead{display:table;width:100%;border-top:4px solid #e74c3c;background-color:#fff}.heading{color:#265c50}.main-nav{margin-bottom:0;display:table;width:100%}.main-nav-el{float:left;margin-right:.618em}.container{margin:0 auto;width:45em}.section{margin-bottom:1em;padding-top:1em;padding-bottom:1em}.section:last-child{margin-top:0}.app{padding-bottom:4em;background-color:#5FBCA8;color:#fff}.app hr{border-color:#71c4b2}#editor{margin-bottom:1em;width:100%;height:40em}[class^=option-]{display:inline-block;margin-right:1em}[class^=option-] input,[class^=option-] select{color:#333}[class^=option-]:last-child{margin-right:0}.option-title{display:block;margin:1em 0}.option-title input{width:100%;padding:.618em;color:#333;outline:0;border:6px solid #CCC;border-radius:4px}.tilt-container{top:-2em;left:-5px;position:relative;display:block;height:3em;background-color:#eee;-webkit-transform:rotate(2deg);-ms-transform:rotate(2deg);transform:rotate(2deg);box-shadow:0 -10px 0 0 #eee}.site-footer{top:-2em;background-color:#eee}.site-footer p{margin:0;color:#999}.site-footer a{color:#555}.site-footer{position:relative;text-align:right}.footer-logo{position:absolute;top:-1em;left:3em;width:5em;background-color:#fff;border-radius:50%;border:1px solid #ccc}.demo-col{margin-top:.618em;padding:.618em 0;display:block;text-align:center;background-color:#388776;border-radius:3px}section{margin-bottom:6em}.code-result{width:120%;margin-left:-10%}.code-raw-textarea{height:24em;resize:none}.pastes-list{margin-left:0;padding-left:0;list-style:none}.paste-list-el .paste-link{margin-right:.618em;font-family:'Source Code Pro',monospace}.highlighttable{width:100%} -------------------------------------------------------------------------------- /app/static/scss/vendors/_normalize.scss: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS text size adjust after orientation change, without disabling 6 | * user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 29 | * and Firefox. 30 | * Correct `block` display not defined for `main` in IE 11. 31 | */ 32 | 33 | article, 34 | aside, 35 | details, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | hgroup, 41 | main, 42 | menu, 43 | nav, 44 | section, 45 | summary { 46 | display: block; 47 | } 48 | 49 | /** 50 | * 1. Correct `inline-block` display not defined in IE 8/9. 51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 52 | */ 53 | 54 | audio, 55 | canvas, 56 | progress, 57 | video { 58 | display: inline-block; /* 1 */ 59 | vertical-align: baseline; /* 2 */ 60 | } 61 | 62 | /** 63 | * Prevent modern browsers from displaying `audio` without controls. 64 | * Remove excess height in iOS 5 devices. 65 | */ 66 | 67 | audio:not([controls]) { 68 | display: none; 69 | height: 0; 70 | } 71 | 72 | /** 73 | * Address `[hidden]` styling not present in IE 8/9/10. 74 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 75 | */ 76 | 77 | [hidden], 78 | template { 79 | display: none; 80 | } 81 | 82 | /* Links 83 | ========================================================================== */ 84 | 85 | /** 86 | * Remove the gray background color from active links in IE 10. 87 | */ 88 | 89 | a { 90 | background-color: transparent; 91 | } 92 | 93 | /** 94 | * Improve readability when focused and also mouse hovered in all browsers. 95 | */ 96 | 97 | a:active, 98 | a:hover { 99 | outline: 0; 100 | } 101 | 102 | /* Text-level semantics 103 | ========================================================================== */ 104 | 105 | /** 106 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 107 | */ 108 | 109 | abbr[title] { 110 | border-bottom: 1px dotted; 111 | } 112 | 113 | /** 114 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 115 | */ 116 | 117 | b, 118 | strong { 119 | font-weight: bold; 120 | } 121 | 122 | /** 123 | * Address styling not present in Safari and Chrome. 124 | */ 125 | 126 | dfn { 127 | font-style: italic; 128 | } 129 | 130 | /** 131 | * Address variable `h1` font-size and margin within `section` and `article` 132 | * contexts in Firefox 4+, Safari, and Chrome. 133 | */ 134 | 135 | h1 { 136 | font-size: 2em; 137 | margin: 0.67em 0; 138 | } 139 | 140 | /** 141 | * Address styling not present in IE 8/9. 142 | */ 143 | 144 | mark { 145 | background: #ff0; 146 | color: #000; 147 | } 148 | 149 | /** 150 | * Address inconsistent and variable font size in all browsers. 151 | */ 152 | 153 | small { 154 | font-size: 80%; 155 | } 156 | 157 | /** 158 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 159 | */ 160 | 161 | sub, 162 | sup { 163 | font-size: 75%; 164 | line-height: 0; 165 | position: relative; 166 | vertical-align: baseline; 167 | } 168 | 169 | sup { 170 | top: -0.5em; 171 | } 172 | 173 | sub { 174 | bottom: -0.25em; 175 | } 176 | 177 | /* Embedded content 178 | ========================================================================== */ 179 | 180 | /** 181 | * Remove border when inside `a` element in IE 8/9/10. 182 | */ 183 | 184 | img { 185 | border: 0; 186 | } 187 | 188 | /** 189 | * Correct overflow not hidden in IE 9/10/11. 190 | */ 191 | 192 | svg:not(:root) { 193 | overflow: hidden; 194 | } 195 | 196 | /* Grouping content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Address margin not present in IE 8/9 and Safari. 201 | */ 202 | 203 | figure { 204 | margin: 1em 40px; 205 | } 206 | 207 | /** 208 | * Address differences between Firefox and other browsers. 209 | */ 210 | 211 | hr { 212 | -moz-box-sizing: content-box; 213 | box-sizing: content-box; 214 | height: 0; 215 | } 216 | 217 | /** 218 | * Contain overflow in all browsers. 219 | */ 220 | 221 | pre { 222 | overflow: auto; 223 | } 224 | 225 | /** 226 | * Address odd `em`-unit font size rendering in all browsers. 227 | */ 228 | 229 | code, 230 | kbd, 231 | pre, 232 | samp { 233 | font-family: monospace, monospace; 234 | font-size: 1em; 235 | } 236 | 237 | /* Forms 238 | ========================================================================== */ 239 | 240 | /** 241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 242 | * styling of `select`, unless a `border` property is set. 243 | */ 244 | 245 | /** 246 | * 1. Correct color not being inherited. 247 | * Known issue: affects color of disabled elements. 248 | * 2. Correct font properties not being inherited. 249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | color: inherit; /* 1 */ 258 | font: inherit; /* 2 */ 259 | margin: 0; /* 3 */ 260 | } 261 | 262 | /** 263 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 264 | */ 265 | 266 | button { 267 | overflow: visible; 268 | } 269 | 270 | /** 271 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 272 | * All other form control elements do not inherit `text-transform` values. 273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 274 | * Correct `select` style inheritance in Firefox. 275 | */ 276 | 277 | button, 278 | select { 279 | text-transform: none; 280 | } 281 | 282 | /** 283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 284 | * and `video` controls. 285 | * 2. Correct inability to style clickable `input` types in iOS. 286 | * 3. Improve usability and consistency of cursor style between image-type 287 | * `input` and others. 288 | */ 289 | 290 | button, 291 | html input[type="button"], /* 1 */ 292 | input[type="reset"], 293 | input[type="submit"] { 294 | -webkit-appearance: button; /* 2 */ 295 | cursor: pointer; /* 3 */ 296 | } 297 | 298 | /** 299 | * Re-set default cursor for disabled elements. 300 | */ 301 | 302 | button[disabled], 303 | html input[disabled] { 304 | cursor: default; 305 | } 306 | 307 | /** 308 | * Remove inner padding and border in Firefox 4+. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | input::-moz-focus-inner { 313 | border: 0; 314 | padding: 0; 315 | } 316 | 317 | /** 318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 319 | * the UA stylesheet. 320 | */ 321 | 322 | input { 323 | line-height: normal; 324 | } 325 | 326 | /** 327 | * It's recommended that you don't attempt to style these elements. 328 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 329 | * 330 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 331 | * 2. Remove excess padding in IE 8/9/10. 332 | */ 333 | 334 | input[type="checkbox"], 335 | input[type="radio"] { 336 | box-sizing: border-box; /* 1 */ 337 | padding: 0; /* 2 */ 338 | } 339 | 340 | /** 341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 342 | * `font-size` values of the `input`, it causes the cursor style of the 343 | * decrement button to change from `default` to `text`. 344 | */ 345 | 346 | input[type="number"]::-webkit-inner-spin-button, 347 | input[type="number"]::-webkit-outer-spin-button { 348 | height: auto; 349 | } 350 | 351 | /** 352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 354 | * (include `-moz` to future-proof). 355 | */ 356 | 357 | input[type="search"] { 358 | -webkit-appearance: textfield; /* 1 */ 359 | -moz-box-sizing: content-box; 360 | -webkit-box-sizing: content-box; /* 2 */ 361 | box-sizing: content-box; 362 | } 363 | 364 | /** 365 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 366 | * Safari (but not Chrome) clips the cancel button when the search input has 367 | * padding (and `textfield` appearance). 368 | */ 369 | 370 | input[type="search"]::-webkit-search-cancel-button, 371 | input[type="search"]::-webkit-search-decoration { 372 | -webkit-appearance: none; 373 | } 374 | 375 | /** 376 | * Define consistent border, margin, and padding. 377 | */ 378 | 379 | fieldset { 380 | border: 1px solid #c0c0c0; 381 | margin: 0 2px; 382 | padding: 0.35em 0.625em 0.75em; 383 | } 384 | 385 | /** 386 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 387 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 388 | */ 389 | 390 | legend { 391 | border: 0; /* 1 */ 392 | padding: 0; /* 2 */ 393 | } 394 | 395 | /** 396 | * Remove default vertical scrollbar in IE 8/9/10/11. 397 | */ 398 | 399 | textarea { 400 | overflow: auto; 401 | } 402 | 403 | /** 404 | * Don't inherit the `font-weight` (applied by a rule above). 405 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 406 | */ 407 | 408 | optgroup { 409 | font-weight: bold; 410 | } 411 | 412 | /* Tables 413 | ========================================================================== */ 414 | 415 | /** 416 | * Remove most spacing between table cells. 417 | */ 418 | 419 | table { 420 | border-collapse: collapse; 421 | border-spacing: 0; 422 | } 423 | 424 | td, 425 | th { 426 | padding: 0; 427 | } 428 | -------------------------------------------------------------------------------- /app/templates/style-guide.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | 3 | {% block title %}Style Guide{% endblock %} 4 | 5 | {% block content %} 6 |

Style Guide

7 | 8 |
9 |
10 |

Grid System

11 | 12 |
13 | 14 |
15 |
16 |
.col-1-1
17 |
18 |
19 | 20 |
21 |
22 |
.col-1-2
23 |
24 | 25 |
26 |
.col-1-2
27 |
28 |
29 | 30 |
31 |
32 |
.col-1-3
33 |
34 |
35 |
.col-1-3
36 |
37 |
38 |
.col-1-3
39 |
40 |
41 | 42 |
43 |
44 |
.col-1-4
45 |
46 |
47 |
.col-1-4
48 |
49 |
50 |
.col-1-4
51 |
52 |
53 |
.col-1-4
54 |
55 |
56 |
57 |
58 | 59 |
60 |
61 |

Typography

62 | 63 |
64 | 65 |
66 |
67 |

Heading 1

68 |

Heading 2

69 |

Heading 3

70 |

Heading 4

71 |
72 | 73 |
74 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

75 | 76 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

77 |
78 |
79 | 80 |
81 |
82 |
    83 |
  • Item 1
  • 84 |
  • Item 2
  • 85 |
  • Item 3
  • 86 |
  • Item 4
  • 87 |
  • Item 5
  • 88 |
89 |
90 | 91 |
92 |
    93 |
  1. Item 1
  2. 94 |
  3. Item 2
  4. 95 |
  5. Item 3
  6. 96 |
  7. Item 4
  8. 97 |
  9. Item 5
  10. 98 |
99 |
100 |
101 | 102 |
103 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. 104 | 105 | 106 |
107 |
108 |
109 | 110 |
111 |
112 |

Buttons

113 | 114 |
115 | 116 |
117 |
118 |

Button styles

119 | 120 |

121 |

122 |
123 | 124 |
125 |

Button sizes

126 | 127 |

128 |

129 |

130 |
131 | 132 |
133 |

HTML elements

134 | 135 |

136 |

Anchor tag

137 |

138 |

139 |
140 |
141 | 142 |
143 |
144 | 145 |
146 |
147 |

Forms

148 | 149 |
150 | 151 |
152 |
153 |
154 |
155 |
156 | 157 | 158 | 159 |

This is a contextual help for the field above.

160 |
161 | 162 |
163 | 164 | 165 | 166 |

This is an error message for the field above.

167 |
168 |
169 | 170 | 171 |
172 |
173 |
174 |
175 | 176 |
177 |
178 |
179 |
180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 |
189 | 190 |
191 | 192 | 193 |
194 |
195 |
196 |
197 |
198 | 199 |
200 |
201 |

Sign-in

202 | 203 |
204 | 205 |
206 |
207 |
208 | 209 | 210 |
211 | 212 |
213 | 214 | 215 |
216 | 217 |
218 | 219 | 220 |
221 | 222 |
223 | 224 |
225 | 226 |

* required fields

227 |
228 |
229 |
230 | 231 |
232 |

Sign-up

233 | 234 |
235 | 236 |
237 |
238 |
239 | 240 | 241 |
242 | 243 |
244 | 245 | 246 |
247 | 248 |
249 | 250 | 251 |
252 | 253 |
254 | 255 |
256 | 257 |

* required fields

258 |
259 |
260 |
261 | 262 |
263 |

Sign-up

264 | 265 |
266 | 267 |
268 |
269 |
270 | 271 | 272 |
273 | 274 |
275 | 276 | 277 |
278 | 279 |
280 | 281 | 282 |
283 | 284 |
285 | 286 | 287 |
288 | 289 |
290 | 291 |
292 | 293 |

* required fields

294 |
295 |
296 |
297 |
298 |
299 |
300 | 301 |
302 |

Feedback

303 | 304 |
305 | 306 |
307 |
308 |
309 |

Information

310 |

This is the body of the message!

311 |
312 | 313 |
314 |

Error

315 |

This is the body of the message!

316 |
317 |
318 | 319 |
320 |
321 |

Warning

322 |

This is the body of the message!

323 |
324 | 325 |
326 |

Success

327 |

This is the body of the message!

328 |
329 |
330 |
331 |
332 | 333 | {% endblock %} 334 | -------------------------------------------------------------------------------- /app/static/.webassets-cache/ef3712f91564e3423a3638839127c41a: -------------------------------------------------------------------------------- 1 | Vhtml {\u000a font-family: sans-serif;\u000a -ms-text-size-adjust: 100%;\u000a -webkit-text-size-adjust: 100%; }\u000a\u000a body {\u000a margin: 0; }\u000a\u000a article, aside, details, figcaption, figure, footer, header, hgroup, main,\u000a menu, nav, section, summary {\u000a display: block; }\u000a\u000a audio, canvas, progress, video {\u000a display: inline-block;\u000a vertical-align: baseline; }\u000a\u000a audio:not([controls]) {\u000a display: none;\u000a height: 0; }\u000a\u000a [hidden], template {\u000a display: none; }\u000a\u000a a {\u000a background-color: transparent; }\u000a\u000a a:active, a:hover {\u000a outline: 0; }\u000a\u000a abbr[title] {\u000a border-bottom: 1px dotted; }\u000a\u000a b, strong {\u000a font-weight: bold; }\u000a\u000a dfn {\u000a font-style: italic; }\u000a\u000a h1 {\u000a font-size: 2em;\u000a margin: 0.67em 0; }\u000a\u000a mark {\u000a background: #ff0;\u000a color: #000; }\u000a\u000a small {\u000a font-size: 80%; }\u000a\u000a sub, sup {\u000a font-size: 75%;\u000a line-height: 0;\u000a position: relative;\u000a vertical-align: baseline; }\u000a\u000a sup {\u000a top: -0.5em; }\u000a\u000a sub {\u000a bottom: -0.25em; }\u000a\u000a img {\u000a border: 0; }\u000a\u000a svg:not(:root) {\u000a overflow: hidden; }\u000a\u000a figure {\u000a margin: 1em 40px; }\u000a\u000a hr {\u000a -moz-box-sizing: content-box;\u000a box-sizing: content-box;\u000a height: 0; }\u000a\u000a pre {\u000a overflow: auto; }\u000a\u000a code, kbd, pre, samp {\u000a font-family: monospace, monospace;\u000a font-size: 1em; }\u000a\u000a button, input, optgroup, select, textarea {\u000a color: inherit;\u000a font: inherit;\u000a margin: 0; }\u000a\u000a button {\u000a overflow: visible; }\u000a\u000a button, select {\u000a text-transform: none; }\u000a\u000a button, html input[type="button"], input[type="reset"], input[type="submit"] {\u000a -webkit-appearance: button;\u000a cursor: pointer; }\u000a\u000a button[disabled], html input[disabled] {\u000a cursor: default; }\u000a\u000a button::-moz-focus-inner, input::-moz-focus-inner {\u000a border: 0;\u000a padding: 0; }\u000a\u000a input {\u000a line-height: normal; }\u000a\u000a input[type="checkbox"], input[type="radio"] {\u000a box-sizing: border-box;\u000a padding: 0; }\u000a\u000a input[type="number"]::-webkit-inner-spin-button,\u000a input[type="number"]::-webkit-outer-spin-button {\u000a height: auto; }\u000a\u000a input[type="search"] {\u000a -webkit-appearance: textfield;\u000a -moz-box-sizing: content-box;\u000a -webkit-box-sizing: content-box;\u000a box-sizing: content-box; }\u000a\u000a input[type="search"]::-webkit-search-cancel-button,\u000a input[type="search"]::-webkit-search-decoration {\u000a -webkit-appearance: none; }\u000a\u000a fieldset {\u000a border: 1px solid #c0c0c0;\u000a margin: 0 2px;\u000a padding: 0.35em 0.625em 0.75em; }\u000a\u000a legend {\u000a border: 0;\u000a padding: 0; }\u000a\u000a textarea {\u000a overflow: auto; }\u000a\u000a optgroup {\u000a font-weight: bold; }\u000a\u000a table {\u000a border-collapse: collapse;\u000a border-spacing: 0; }\u000a\u000a td, th {\u000a padding: 0; }\u000ahtml {\u000a font-family: sans-serif;\u000a font-size: 16px;\u000a line-height: 1.5; }\u000a\u000a h1, h2, h3, h4, h5, h6 {\u000a margin-top: 1 em;\u000a margin-bottom: 0.354em;\u000a font-weight: bold;\u000a line-height: 1.125;\u000a color: #222;\u000a text-rendering: optimizeLegibility; }\u000a\u000a h1 {\u000a font-size: 2.618 em; }\u000a\u000a h2 {\u000a font-size: 1.82 em; }\u000a\u000a h3 {\u000a font-size: 1.618 em; }\u000a\u000a h4, h5, h6 {\u000a font-size: 1.125 em; }\u000a\u000a p {\u000a margin-top: 0;\u000a margin-bottom: 1 em; }\u000a\u000a strong {\u000a color: #515151; }\u000a\u000a nav ul, nav ol {\u000a list-style: none;\u000a margin-left: 0;\u000a padding-left: 0; }\u000a\u000a ul, ol, dl {\u000a margin-top: 0;\u000a margin-bottom: 1 em;\u000a line-height: 1.5; }\u000a\u000a dt {\u000a font-weight: bold; }\u000a\u000a dd {\u000a margin-bottom: 0.5 em; }\u000a\u000a hr {\u000a position: relative;\u000a margin: 1.5 em 0;\u000a border: 0;\u000a border-top: 1px solid #eee;\u000a border-bottom: 1px solid #fff; }\u000a\u000a abbr {\u000a font-weight: bold;\u000a font-variant: small-caps;\u000a color: #5e5e5e;\u000a text-transform: lowercase;\u000a letter-spacing: 0.1em; }\u000a\u000a abbr[title] {\u000a cursor: help;\u000a border-bottom: 1px dotted #e5e5e5; }\u000a\u000a pre {\u000a margin-left: 1.125 em;\u000a white-space: pre-wrap; }\u000a\u000a code {\u000a color: tomato;\u000a font-family: "DejaVu Sans Mono", Inconsolata, Consolas, "Lucida Console", monospace; }\u000a\u000a kbd, samp {\u000a color: #6a6a6a;\u000a font-family: "DejaVu Sans Mono", Inconsolata, Consolas, "Lucida Console", monospace;\u000a background-color: #eee; }\u000a\u000a samp {\u000a padding: 1px 3px; }\u000a\u000a kbd {\u000a padding: 2px 6px;\u000a border: 1px solid #ccc;\u000a border-radius: 4px; }\u000a\u000a mark {\u000a background-color: #fff9d9; }\u000a\u000a blockquote {\u000a padding: 0.5 em 1 em;\u000a margin: 0.8 em 0;\u000a color: #919191;\u000a border-left: 0.25 em solid #eaeaea; }\u000a @media (min-width: 30em) {\u000a blockquote {\u000a padding-right: 5 em;\u000a padding-left: 1.25 em; }\u000a}\u000a\u000ablockquote p:last-child {\u000a margin-bottom: 0; }\u000a\u000a figure {\u000a margin-left: 0; }\u000a\u000a figcaption {\u000a font-size: 0.85 em;\u000a color: #afafaf; }\u000a\u000a caption {\u000a margin-top: 0.695 em;\u000a font-size: 0.85 em;\u000a caption-side: bottom;\u000a color: #aaa; }\u000a\u000a table {\u000a margin-bottom: 1 em;\u000a width: 100%;\u000a border: 1px solid #c3c3c3;\u000a border-collapse: collapse; }\u000a\u000a td, th {\u000a padding: 0.25 em 0.5 em;\u000a border: 1px solid #f6f6f6; }\u000a\u000a tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th {\u000a background-color: white; }\u000abody {\u000a font-family: Inconsolata, monospace;\u000a background-color: #eee; }\u000a\u000a pre, code {\u000a font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\u000a font-size: 12px; }\u000aheader {\u000a margin-bottom: 0.618em;\u000a display: table;\u000a width: 100%; }\u000a\u000a .main-nav {\u000a margin-bottom: 0.618em;\u000a display: table;\u000a width: 100%; }\u000a\u000a .main-nav-el {\u000a float: left;\u000a margin-right: 0.618em; }\u000a\u000a .main-nav-el a {\u000a padding: 0.218em 1.618em;\u000a background-color: #333;\u000a color: #fff;\u000a text-decoration: none; }\u000a.container {\u000a margin: 0 auto;\u000a width: 45em; }\u000a\u000a #editor {\u000a margin: 1em 0;\u000a width: 100%;\u000a height: 40em; }\u000a\u000a .code-result, .code-raw-textarea {\u000a width: 45em; }\u000a\u000a .code-raw-textarea {\u000a height: 24em; }\u000a\u000a .code-raw-textarea {\u000a resize: none; }\u000a\u000a .highlighttable {\u000a width: 100%; }\u000a.site-footer {\u000a margin-top: 1em;\u000a padding: 1em; }\u000a\u000a .site-footer p {\u000a margin: 0; }\u000a 2 | p1 3 | . -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | Rocketbin - A simple pastebin clone 294 | Copyright (C) 2015 Juan Olvera 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /app/static/css/style.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* 3 | * 4 | * _______ ____/ /_____ / /_/ / (_)__ 5 | * / __/ _ \/ __/ '_/ -_' __/ _ \/ / _ \ 6 | * /_/ \___/\__/_/\_\\__/\__/_.__/_/_//_/ 7 | * 8 | * Designed, built, and released under GPL license by @thinkxl. 9 | * https://github.com/thinkxl/rocketbin 10 | */ 11 | /* 12 | * Contents 13 | * 14 | * Vendors 15 | * Utils 16 | * Base 17 | * Components 18 | * Layouts 19 | * Pages 20 | */ 21 | /* 22 | * Vendors 23 | */ 24 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ 25 | /** 26 | * 1. Set default font family to sans-serif. 27 | * 2. Prevent iOS text size adjust after orientation change, without disabling 28 | * user zoom. 29 | */ 30 | html { 31 | font-family: sans-serif; 32 | /* 1 */ 33 | -ms-text-size-adjust: 100%; 34 | /* 2 */ 35 | -webkit-text-size-adjust: 100%; 36 | /* 2 */ } 37 | 38 | /** 39 | * Remove default margin. 40 | */ 41 | body { 42 | margin: 0; } 43 | 44 | /* HTML5 display definitions 45 | ========================================================================== */ 46 | /** 47 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 48 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 49 | * and Firefox. 50 | * Correct `block` display not defined for `main` in IE 11. 51 | */ 52 | article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { 53 | display: block; } 54 | 55 | /** 56 | * 1. Correct `inline-block` display not defined in IE 8/9. 57 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 58 | */ 59 | audio, canvas, progress, video { 60 | display: inline-block; 61 | /* 1 */ 62 | vertical-align: baseline; 63 | /* 2 */ } 64 | 65 | /** 66 | * Prevent modern browsers from displaying `audio` without controls. 67 | * Remove excess height in iOS 5 devices. 68 | */ 69 | audio:not([controls]) { 70 | display: none; 71 | height: 0; } 72 | 73 | /** 74 | * Address `[hidden]` styling not present in IE 8/9/10. 75 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 76 | */ 77 | [hidden], template { 78 | display: none; } 79 | 80 | /* Links 81 | ========================================================================== */ 82 | /** 83 | * Remove the gray background color from active links in IE 10. 84 | */ 85 | a { 86 | background-color: transparent; } 87 | 88 | /** 89 | * Improve readability when focused and also mouse hovered in all browsers. 90 | */ 91 | a:active, a:hover { 92 | outline: 0; } 93 | 94 | /* Text-level semantics 95 | ========================================================================== */ 96 | /** 97 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 98 | */ 99 | abbr[title] { 100 | border-bottom: 1px dotted; } 101 | 102 | /** 103 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 104 | */ 105 | b, strong { 106 | font-weight: bold; } 107 | 108 | /** 109 | * Address styling not present in Safari and Chrome. 110 | */ 111 | dfn { 112 | font-style: italic; } 113 | 114 | /** 115 | * Address variable `h1` font-size and margin within `section` and `article` 116 | * contexts in Firefox 4+, Safari, and Chrome. 117 | */ 118 | h1 { 119 | font-size: 2em; 120 | margin: 0.67em 0; } 121 | 122 | /** 123 | * Address styling not present in IE 8/9. 124 | */ 125 | mark { 126 | background: #ff0; 127 | color: #000; } 128 | 129 | /** 130 | * Address inconsistent and variable font size in all browsers. 131 | */ 132 | small { 133 | font-size: 80%; } 134 | 135 | /** 136 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 137 | */ 138 | sub, sup { 139 | font-size: 75%; 140 | line-height: 0; 141 | position: relative; 142 | vertical-align: baseline; } 143 | 144 | sup { 145 | top: -0.5em; } 146 | 147 | sub { 148 | bottom: -0.25em; } 149 | 150 | /* Embedded content 151 | ========================================================================== */ 152 | /** 153 | * Remove border when inside `a` element in IE 8/9/10. 154 | */ 155 | img { 156 | border: 0; } 157 | 158 | /** 159 | * Correct overflow not hidden in IE 9/10/11. 160 | */ 161 | svg:not(:root) { 162 | overflow: hidden; } 163 | 164 | /* Grouping content 165 | ========================================================================== */ 166 | /** 167 | * Address margin not present in IE 8/9 and Safari. 168 | */ 169 | figure { 170 | margin: 1em 40px; } 171 | 172 | /** 173 | * Address differences between Firefox and other browsers. 174 | */ 175 | hr { 176 | box-sizing: content-box; 177 | height: 0; } 178 | 179 | /** 180 | * Contain overflow in all browsers. 181 | */ 182 | pre { 183 | overflow: auto; } 184 | 185 | /** 186 | * Address odd `em`-unit font size rendering in all browsers. 187 | */ 188 | code, kbd, pre, samp { 189 | font-family: monospace, monospace; 190 | font-size: 1em; } 191 | 192 | /* Forms 193 | ========================================================================== */ 194 | /** 195 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 196 | * styling of `select`, unless a `border` property is set. 197 | */ 198 | /** 199 | * 1. Correct color not being inherited. 200 | * Known issue: affects color of disabled elements. 201 | * 2. Correct font properties not being inherited. 202 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 203 | */ 204 | button, input, optgroup, select, textarea { 205 | color: inherit; 206 | /* 1 */ 207 | font: inherit; 208 | /* 2 */ 209 | margin: 0; 210 | /* 3 */ } 211 | 212 | /** 213 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 214 | */ 215 | button { 216 | overflow: visible; } 217 | 218 | /** 219 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 220 | * All other form control elements do not inherit `text-transform` values. 221 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 222 | * Correct `select` style inheritance in Firefox. 223 | */ 224 | button, select { 225 | text-transform: none; } 226 | 227 | /** 228 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 229 | * and `video` controls. 230 | * 2. Correct inability to style clickable `input` types in iOS. 231 | * 3. Improve usability and consistency of cursor style between image-type 232 | * `input` and others. 233 | */ 234 | button, html input[type="button"], input[type="reset"], input[type="submit"] { 235 | -webkit-appearance: button; 236 | /* 2 */ 237 | cursor: pointer; 238 | /* 3 */ } 239 | 240 | /** 241 | * Re-set default cursor for disabled elements. 242 | */ 243 | button[disabled], html input[disabled] { 244 | cursor: default; } 245 | 246 | /** 247 | * Remove inner padding and border in Firefox 4+. 248 | */ 249 | button::-moz-focus-inner, input::-moz-focus-inner { 250 | border: 0; 251 | padding: 0; } 252 | 253 | /** 254 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 255 | * the UA stylesheet. 256 | */ 257 | input { 258 | line-height: normal; } 259 | 260 | /** 261 | * It's recommended that you don't attempt to style these elements. 262 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 263 | * 264 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 265 | * 2. Remove excess padding in IE 8/9/10. 266 | */ 267 | input[type="checkbox"], input[type="radio"] { 268 | box-sizing: border-box; 269 | /* 1 */ 270 | padding: 0; 271 | /* 2 */ } 272 | 273 | /** 274 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 275 | * `font-size` values of the `input`, it causes the cursor style of the 276 | * decrement button to change from `default` to `text`. 277 | */ 278 | input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { 279 | height: auto; } 280 | 281 | /** 282 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 283 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 284 | * (include `-moz` to future-proof). 285 | */ 286 | input[type="search"] { 287 | -webkit-appearance: textfield; 288 | /* 1 */ 289 | /* 2 */ 290 | box-sizing: content-box; } 291 | 292 | /** 293 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 294 | * Safari (but not Chrome) clips the cancel button when the search input has 295 | * padding (and `textfield` appearance). 296 | */ 297 | input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { 298 | -webkit-appearance: none; } 299 | 300 | /** 301 | * Define consistent border, margin, and padding. 302 | */ 303 | fieldset { 304 | border: 1px solid #c0c0c0; 305 | margin: 0 2px; 306 | padding: 0.35em 0.625em 0.75em; } 307 | 308 | /** 309 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 310 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 311 | */ 312 | legend { 313 | border: 0; 314 | /* 1 */ 315 | padding: 0; 316 | /* 2 */ } 317 | 318 | /** 319 | * Remove default vertical scrollbar in IE 8/9/10/11. 320 | */ 321 | textarea { 322 | overflow: auto; } 323 | 324 | /** 325 | * Don't inherit the `font-weight` (applied by a rule above). 326 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 327 | */ 328 | optgroup { 329 | font-weight: bold; } 330 | 331 | /* Tables 332 | ========================================================================== */ 333 | /** 334 | * Remove most spacing between table cells. 335 | */ 336 | table { 337 | border-collapse: collapse; 338 | border-spacing: 0; } 339 | 340 | td, th { 341 | padding: 0; } 342 | 343 | /*! Hyx v2.0.0 | MIT License | http://github.com/thinkxl/hyx.less */ 344 | .row { 345 | width: 100%; } 346 | .row:before, .row:after { 347 | content: " "; 348 | display: table; } 349 | .row:after { 350 | clear: both; } 351 | 352 | /* 353 | * Utils 354 | */ 355 | /* 356 | * Base 357 | */ 358 | /* 359 | * Type.scss 360 | * 361 | * https://github.com/thinkxl/type 362 | */ 363 | /* Modular Scale 364 | http://modularscale.com/scale/?px1=16&px2=18&ra1=1.618&ra2=0 365 | ---------------------- 366 | 16px @ 1:1.618 367 | 18px @ 1:1.618 368 | ----------------------*/ 369 | /* 370 | * ## Some Tips: 371 | * 372 | * - Read http://alistapart.com/article/more-meaningful-typography to understand about modular scale 373 | * - Don’t use more than 2 fonts unless you know what you’re doing. 374 | * - Use at least 16px for a base font size. 375 | * - Don't use the darkest black (#000) available in your body text: http://ianstormtaylor.com/design-tip-never-use-black/ 376 | */ 377 | /* 378 | * Base 379 | * 380 | * 1. Vertical space between lines of text, for body text 150% is a good starting point. 381 | * Use a longer line height with a wider measure and vice versa. 382 | */ 383 | html { 384 | font-size: 18px; 385 | line-height: 1.618; 386 | /* 1 */ } 387 | 388 | /* 389 | * Headings 390 | * 391 | * 1. On headings use a smaller line-height than body text. 392 | */ 393 | h1, h2, h3, h4, h5, h6 { 394 | margin-top: 1rem; 395 | margin-bottom: 0.382rem; 396 | color: #333; 397 | line-height: 1.125; 398 | /* 1 */ 399 | text-rendering: optimizeLegibility; } 400 | 401 | h1 { 402 | font-size: 2.618rem; } 403 | 404 | h2 { 405 | font-size: 1.82rem; } 406 | 407 | h3 { 408 | font-size: 1.618rem; } 409 | 410 | h4, h5, h6 { 411 | font-size: 1.125rem; } 412 | 413 | /* Paragraph */ 414 | p { 415 | margin-top: 1rem; 416 | margin-bottom: 1.618rem; } 417 | 418 | /* Anchor links */ 419 | a { 420 | color: #173831; } 421 | a:hover { 422 | color: #081411; } 423 | 424 | /* Lists */ 425 | nav ul, nav ol { 426 | list-style: none; 427 | margin-left: 0; 428 | padding-left: 0; } 429 | 430 | ul, ol, dl { 431 | margin-top: 0; 432 | margin-bottom: 1.618rem; 433 | line-height: 1.618; } 434 | 435 | li > ul, li > ol { 436 | margin-bottom: 0; } 437 | 438 | /* Better styled `
` */ 439 | hr { 440 | position: relative; 441 | margin: 1.5rem 0; 442 | border: 0; 443 | border-top: 1px solid #eee; 444 | border-bottom: 1px solid #fff; } 445 | 446 | /* Quotes */ 447 | blockquote { 448 | padding-right: 5rem; 449 | padding-left: 1.25rem; 450 | margin: 1rem 0; 451 | border-left: .25rem solid #eaeaea; } 452 | 453 | blockquote p:last-child { 454 | margin-bottom: 0; } 455 | 456 | html { 457 | box-sizing: border-box; 458 | background-color: #eee; } 459 | 460 | *, *:before, *:after { 461 | box-sizing: inherit; } 462 | 463 | body { 464 | font-family: 'Droid Sans', sans-serif; 465 | background-color: #eee; 466 | color: #333; 467 | text-rendering: optimizeLegibility; 468 | -webkit-font-smoothing: antialiased; } 469 | 470 | pre, code, .ace_editor { 471 | font-family: 'Source Code Pro', 'source-code-pro', monospace !important; 472 | font-size: 13px !important; 473 | -webkit-font-smoothing: auto; 474 | /* line-height: 1; */ } 475 | 476 | h1, h2, h3, h4, h5 { 477 | font-family: 'Source Sans Pro', sans-serif; 478 | color: #333; } 479 | 480 | /* Text that is inside the `.app` class, because the green background */ 481 | .app { 482 | color: #fff; } 483 | .app h1, .app h2, .app h3, .app h4 { 484 | color: #173831; } 485 | 486 | /* 487 | * Components 488 | */ 489 | /* Alerts */ 490 | [class^="alert-"] { 491 | border: 1px solid; 492 | border-bottom-width: 3px; 493 | border-radius: 4px; 494 | margin: 1em 0; 495 | padding: 1.125em; } 496 | [class^="alert-"] p { 497 | margin: 0; } 498 | 499 | .alert-information { 500 | border-color: #bddcee; 501 | color: #1e5575; 502 | background-color: #fafcfe; } 503 | .alert-information strong { 504 | color: #439ccf; } 505 | 506 | .alert-error { 507 | border-color: #f6a79f; 508 | color: #72140a; 509 | background-color: #fde7e5; } 510 | .alert-error strong { 511 | color: #e72915; } 512 | 513 | .alert-warning { 514 | border-color: #ffa76d; 515 | color: #532100; 516 | background-color: #ffd5ba; } 517 | .alert-warning strong { 518 | color: #d35400; } 519 | 520 | .alert-success { 521 | border-color: #bedf91; 522 | color: #2f4414; 523 | background-color: #e1f0cc; } 524 | .alert-success strong { 525 | color: #74a730; } 526 | 527 | /* Buttons */ 528 | button, a.btn-default, a.btn-ghost, a.btn-small, a.btn-large, .btn-default, .btn-ghost, .btn-small, .btn-large { 529 | display: inline-block; 530 | padding: 0.418em 1em; 531 | border: 0; 532 | border-radius: 0.236rem; 533 | color: #fff; 534 | text-decoration: none; 535 | font-family: inherit; 536 | font-weight: 400; 537 | line-height: 1; 538 | cursor: pointer; } 539 | button:focus, .btn-default:focus, .btn-ghost:focus, .btn-small:focus, .btn-large:focus { 540 | outline: none; } 541 | 542 | button, a.btn-default, a.btn-ghost, a.btn-small, a.btn-large, .btn-default, .btn-ghost, .btn-small, .btn-large { 543 | color: #fff; 544 | background-color: #3498db; 545 | color: white; } 546 | button:hover, a.btn-default:hover, a.btn-ghost:hover, a.btn-small:hover, a.btn-large:hover, .btn-default:hover, .btn-ghost:hover, .btn-small:hover, .btn-large:hover { 547 | background-color: #2386c8; 548 | color: white; } 549 | button:active, a.btn-default:active, a.btn-ghost:active, a.btn-small:active, a.btn-large:active, .btn-default:active, .btn-ghost:active, .btn-small:active, .btn-large:active { 550 | background-color: #2791d9; } 551 | 552 | .btn-ghost { 553 | background-color: transparent; 554 | color: #fff; 555 | border: 3px solid #fff; 556 | opacity: 0.8; } 557 | .btn-ghost:hover { 558 | background-color: transparent; 559 | color: #fff; } 560 | .btn-ghost:active { 561 | background-color: transparent; } 562 | .btn-ghost:hover { 563 | opacity: 1; } 564 | 565 | .btn-small { 566 | font-size: 0.818rem; } 567 | 568 | .btn-large { 569 | font-size: 1.318rem; } 570 | 571 | .form .field-group input:not([class^="btn"]), .form .field-group textarea { 572 | border: none; 573 | border-radius: 4px; } 574 | 575 | /* Forms */ 576 | .form { 577 | background-color: #eee; 578 | color: #666666; 579 | border-radius: 4px; } 580 | .form .field-group { 581 | margin-bottom: 1em; } 582 | .form .field-group:last-child { 583 | margin-bottom: 0; } 584 | .form .field-group .label-text, .form .field-group .label-radio, .form .field-group .label-checkbox { 585 | font-weight: bold; } 586 | .form .field-group .label-text { 587 | display: block; } 588 | .form .field-group .label-radio, .form .field-group .label-checkbox { 589 | display: inline-block; } 590 | .form .field-group input[type="text"], .form .field-group input[type="password"], .form .field-group input[type="number"], .form .field-group textarea { 591 | width: 100%; } 592 | .form .field-group input:not([class^="btn"]), .form .field-group textarea { 593 | padding: 0.618em; 594 | color: #4d4d4d; } 595 | .form .field-group input:not([class^="btn"]):focus, .form .field-group input:not([class^="btn"]):hover, .form .field-group textarea:focus, .form .field-group textarea:hover { 596 | border-color: #a6a6a6; 597 | outline: none; } 598 | .form .field-group input:not([class^="btn"]).field-fw, .form .field-group textarea.field-fw { 599 | width: 100%; } 600 | .form .field-group .help { 601 | font-size: 0.718em; 602 | margin: 0.618em 0 0; } 603 | .form .field-group .form-help { 604 | margin-top: 0.618em; 605 | color: #595959; 606 | font-size: 0.818em; 607 | font-style: italic; } 608 | .form .field-error label, .form .field-error .help, .form .field-error input { 609 | color: brown; 610 | border-color: #ebb0b0 !important; } 611 | .form .required { 612 | color: brown; } 613 | .form fieldset { 614 | margin-bottom: 1em; 615 | padding: 1em; 616 | border: none; } 617 | .form fieldset legend { 618 | padding: 0 0.618em; 619 | font-weight: bold; } 620 | .form fieldset p:last-child { 621 | margin-bottom: 0; } 622 | 623 | /* Editor */ 624 | .code-result, #editor { 625 | border-radius: 4px !important; 626 | border: 8px solid #ccc; } 627 | 628 | .linenos-dark { 629 | color: #8f908a; 630 | background-color: #2F3129; } 631 | 632 | .highlighttable-dark > tbody { 633 | background-color: #272822; } 634 | 635 | .linenos-light, .linenos { 636 | color: #aaa; 637 | background-color: #E8E8E8; } 638 | 639 | .highlighttable-light, .highlighttable { 640 | color: #333; } 641 | .highlighttable-light > tbody, .highlighttable > tbody { 642 | background-color: #fff; } 643 | 644 | .code-raw-textarea-light, .code-raw-textarea { 645 | color: #333; } 646 | 647 | .code-raw { 648 | width: 100%; } 649 | 650 | .code-raw-textarea { 651 | padding: 0.618em; 652 | width: 100%; 653 | height: 20em; 654 | font-family: 'Source Code Pro', monospace; 655 | font-size: 13px; 656 | background-color: #fff; 657 | border-radius: 4px; 658 | border: none; } 659 | .code-raw-textarea:focus { 660 | outline: none; } 661 | 662 | .code-result { 663 | width: 100%; 664 | height: auto; 665 | overflow: auto; } 666 | .code-result > table { 667 | border-collapse: inherit !important; } 668 | 669 | .highlighttable { 670 | border-radius: 4px; } 671 | 672 | .linenos { 673 | width: 2em; 674 | min-width: 2em; 675 | text-align: center; } 676 | 677 | .code { 678 | padding-left: 5px; } 679 | 680 | /* Soon */ 681 | /* 682 | * Layouts 683 | */ 684 | [class^="col-"]:first-child { 685 | margin-left: 0; } 686 | 687 | .col-1-1 { 688 | float: left; 689 | width: 100%; 690 | margin-left: 0; } 691 | 692 | .col-1-2 { 693 | float: left; 694 | width: 49%; 695 | margin-left: 2%; } 696 | 697 | .col-1-3 { 698 | float: left; 699 | width: 32%; 700 | margin-left: 2%; } 701 | 702 | .col-1-4 { 703 | float: left; 704 | width: 23.5%; 705 | margin-left: 2%; } 706 | 707 | /* Header */ 708 | .site-title, .site-logo { 709 | display: inline-block; } 710 | 711 | .page-title { 712 | margin: 1.618em auto; 713 | text-align: center; } 714 | 715 | .site-logo { 716 | width: 2em; 717 | display: inline-block; } 718 | 719 | .masthead { 720 | display: table; 721 | width: 100%; 722 | border-top: 4px solid #e74c3c; 723 | background-color: #fff; } 724 | 725 | .heading { 726 | color: #265c50; } 727 | 728 | /* Navigation */ 729 | .main-nav { 730 | margin-bottom: 0; 731 | display: table; 732 | width: 100%; } 733 | 734 | .main-nav-el { 735 | float: left; 736 | margin-right: 0.618em; } 737 | 738 | /* Main layout */ 739 | .container { 740 | margin: 0 auto; 741 | width: 45em; } 742 | 743 | .section { 744 | margin-bottom: 1em; 745 | padding-top: 1em; 746 | padding-bottom: 1em; } 747 | .section:last-child { 748 | margin-top: 0; } 749 | 750 | /* App */ 751 | .app { 752 | padding-bottom: 4em; 753 | background-color: #5FBCA8; 754 | color: #fff; } 755 | .app hr { 756 | border-color: #71c4b2; } 757 | 758 | /* Editor */ 759 | #editor { 760 | margin-bottom: 1em; 761 | width: 100%; 762 | height: 40em; } 763 | 764 | /* Options */ 765 | [class^="option-"] { 766 | display: inline-block; 767 | margin-right: 1em; } 768 | [class^="option-"] input, [class^="option-"] select { 769 | color: #333; } 770 | [class^="option-"]:last-child { 771 | margin-right: 0; } 772 | 773 | /* Paste title */ 774 | .option-title { 775 | display: block; 776 | margin: 1em 0; } 777 | .option-title input { 778 | width: 100%; 779 | padding: 0.618em; 780 | color: #333; 781 | outline: none; 782 | border: 6px solid #CCCCCC; 783 | border-radius: 4px; } 784 | 785 | /* Footer */ 786 | .tilt-container { 787 | top: -2em; 788 | left: -5px; 789 | position: relative; 790 | display: block; 791 | height: 3em; 792 | background-color: #eee; 793 | -webkit-transform: rotate(2deg); 794 | -ms-transform: rotate(2deg); 795 | transform: rotate(2deg); 796 | box-shadow: 0 -10px 0 0 #eee; } 797 | 798 | .site-footer { 799 | position: relative; 800 | top: -2em; 801 | background-color: #eee; } 802 | .site-footer p { 803 | margin: 0; 804 | color: #999; } 805 | .site-footer a { 806 | color: #555; } 807 | 808 | .site-footer { 809 | position: relative; 810 | text-align: right; } 811 | 812 | .footer-logo { 813 | position: absolute; 814 | top: -1em; 815 | left: 3em; 816 | width: 5em; 817 | background-color: #fff; 818 | border-radius: 50%; 819 | border: 1px solid #ccc; } 820 | 821 | /* 822 | * Pages 823 | */ 824 | /* Style guide page */ 825 | .demo-col { 826 | margin-top: 0.618em; 827 | padding: 0.618em 0; 828 | display: block; 829 | text-align: center; 830 | background-color: #388776; 831 | border-radius: 3px; } 832 | 833 | section { 834 | margin-bottom: 6em; } 835 | 836 | /* Code Results */ 837 | .code-result { 838 | width: 120%; 839 | margin-left: -10%; } 840 | 841 | .code-raw-textarea { 842 | height: 24em; } 843 | 844 | .code-raw-textarea { 845 | resize: none; } 846 | 847 | /* Pastes list */ 848 | .pastes-list { 849 | margin-left: 0; 850 | padding-left: 0; 851 | list-style: none; } 852 | 853 | .paste-list-el .paste-link { 854 | margin-right: 0.618em; 855 | font-family: 'Source Code Pro', monospace; } 856 | 857 | /* Pygments layout */ 858 | .highlighttable { 859 | width: 100%; } 860 | 861 | 862 | /*# sourceMappingURL=maps/style.css.map */ --------------------------------------------------------------------------------