Commit f5ef664e authored by Kunal Sarkhel's avatar Kunal Sarkhel

Begin port to Node and TypeScript

parent b02cfb9a
VARNAME=value
# Created by https://www.gitignore.io/api/node
# Edit at https://www.gitignore.io/?templates=node
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# FuseBox cache
.fusebox/
# End of https://www.gitignore.io/api/node
{
"recommendations": [
"eg2.tslint",
"ms-azuretools.vscode-cosmosdb",
"streetsidesoftware.code-spell-checker"
]
}
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
"protocol": "inspector"
},
{
"type": "node",
"request": "launch",
"name": "Launch in Docker",
"preLaunchTask": "tsc-watch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"docker-debug"
],
"port": 9222,
"restart": true,
"timeout": 60000,
"localRoot": "${workspaceFolder}",
"remoteRoot": "/server",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"skipFiles": [
"<node_internals>/**/*.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
// Place your settings in this file to overwrite default and user settings.
{
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
"**/coverge": true
},
"typescript.referencesCodeLens.enabled": true,
"tslint.ignoreDefinitionFiles": false,
"tslint.autoFixOnSave": true,
"tslint.exclude": "**/node_modules/**/*",
"cSpell.words": [
"csrf",
"definitelytyped",
"promisified"
]
}
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"version": "0.1.0",
"tasks": [
{
"taskName": "tsc-watch",
"command": "npm",
"args": [
"run",
"watch"
],
"isShellCommand": true,
"isBackground": true,
"isBuildCommand": true,
"problemMatcher": "$tsc-watch",
"showOutput": "always"
}
]
}
FROM node:10-slim
WORKDIR /server
COPY . /server
RUN npm install
RUN npm run build
EXPOSE 3000
CMD [ "npm", "start" ]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
......@@ -5,3 +5,14 @@ Map out points of interest at Mason, like water fountains, bathrooms, and study
Ideas/Planning: [https://go.gmu.edu/where-ideas](https://go.gmu.edu/where-ideas)
For updates, join #where on Slack.
# Running
First run `npm install` or `yarn`. Then run `npm run build` to build then project, and then `npm run start`. You should then be able to view the site [in your browser](http://localhost:3000/)
Alternatively, you can use Docker Compose by running `docker-compose up`. You can build and run the Docker container on it's own by executing the following
```
docker build -t where .
docker run -p 3000:3000 where
```
import * as shell from "shelljs";
shell.cp("-R", "src/public/js/lib", "dist/public/js/");
shell.cp("-R", "src/public/fonts", "dist/public/");
shell.cp("-R", "src/public/images", "dist/public/");
version: "2"
services:
web:
build: .
command: npm run debug
volumes:
- ./dist:/server/dist
ports:
- "3000:3000"
- "9222:9222"
module.exports = {
globals: {
'ts-jest': {
tsConfigFile: 'tsconfig.json'
}
},
moduleFileExtensions: [
'ts',
'js'
],
transform: {
'^.+\\.(ts|tsx)$': './node_modules/ts-jest/preprocessor.js'
},
testMatch: [
'**/test/**/*.test.(ts|js)'
],
testEnvironment: 'node'
};
\ No newline at end of file
venv/
*.pyc
*.egg-info/
dist/
settings.cfg
*.log*
recursive-include map_mason/templates *
recursive-include map_mason/static *
all: run
clean:
rm -rf venv && rm -rf *.egg-info && rm -rf dist && rm -rf *.log*
venv:
virtualenv --python=python3 venv && venv/bin/python setup.py develop
run: venv
FLASK_APP=map_mason MAP_MASON_SETTINGS=../settings.cfg venv/bin/flask run
test: venv
MAP_MASON_SETTINGS=../settings.cfg venv/bin/python -m unittest discover -s tests
sdist: venv test
venv/bin/python setup.py sdist
# MapMason
MapMason description
## Quick Start
Run the application:
make run
And open it in the browser at [http://127.0.0.1:5000/](http://127.0.0.1:5000/)
## Prerequisites
This is built to be used with Python 3. Update `Makefile` to switch to Python 2 if needed.
Some Flask dependencies are compiled during installation, so `gcc` and Python header files need to be present.
For example, on Ubuntu:
apt install build-essential python3-dev
## Development environment and release process
- create virtualenv with Flask and MapMason installed into it (latter is installed in
[develop mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode) which allows
modifying source code directly without a need to re-install the app): `make venv`
- run development server in debug mode: `make run`; Flask will restart if source code is modified
- run tests: `make test` (see also: [Testing Flask Applications](http://flask.pocoo.org/docs/0.12/testing/))
- create source distribution: `make sdist` (will run tests first)
- to remove virtualenv and built distributions: `make clean`
- to add more python dependencies: add to `install_requires` in `setup.py`
- to modify configuration in development environment: edit file `settings.cfg`; this is a local configuration file
and it is *ignored* by Git - make sure to put a proper configuration file to a production environment when
deploying
## Deployment
If you are interested in an out-of-the-box deployment automation, check out accompanying
[`cookiecutter-flask-ansible`](https://github.com/candidtim/cookiecutter-flask-ansible).
Or, check out [Deploying with Fabric](http://flask.pocoo.org/docs/0.12/patterns/fabric/#fabric-deployment) on one of the
possible ways to automate the deployment.
In either case, generally the idea is to build a package (`make sdist`), deliver it to a server (`scp ...`),
install it (`pip install map_mason.tar.gz`), ensure that configuration file exists and
`MAP_MASON_SETTINGS` environment variable points to it, ensure that user has access to the
working directory to create and write log files in it, and finally run a
[WSGI container](http://flask.pocoo.org/docs/0.12/deploying/wsgi-standalone/) with the application.
And, most likely, it will also run behind a
[reverse proxy](http://flask.pocoo.org/docs/0.12/deploying/wsgi-standalone/#proxy-setups).
import os
from flask import Flask
app = Flask(__name__)
app.config.from_object('map_mason.default_settings')
app.config.from_envvar('MAP_MASON_SETTINGS')
if not app.debug:
import logging
from logging.handlers import TimedRotatingFileHandler
# https://docs.python.org/3.6/library/logging.handlers.html#timedrotatingfilehandler
file_handler = TimedRotatingFileHandler(os.path.join(app.config['LOG_DIR'], 'map_mason.log'), 'midnight')
file_handler.setLevel(logging.WARNING)
file_handler.setFormatter(logging.Formatter('<%(asctime)s> <%(levelname)s> %(message)s'))
app.logger.addHandler(file_handler)
import map_mason.views
DEBUG = False # make sure DEBUG is off unless enabled explicitly otherwise
LOG_DIR = '.' # create log files in current working directory
@keyframes popIn{0%,100%{transform:scale(1,1)}25%{transform:scale(1.2,1)}50%{transform:scale(1.4,1)}}@keyframes popOut{0%,100%{transform:scale(1,1)}25%{transform:scale(1.2,1)}50%{transform:scale(1.4,1)}}@keyframes splashIn{0%,100%{transform:scale(1);opacity:1}25%{transform:scale(1.1);opacity:.8}50%{transform:scale(1.1);opacity:.9}}@keyframes splashOut{0%{transform:scale(1);opacity:1}25%{transform:scale(1);opacity:.8}50%{transform:scale(1);opacity:.9}100%{transform:scale(.5);opacity:1}}.checkbox-slider,.checkbox-slider--a,.checkbox-slider--a-rounded,.checkbox-slider--b,.checkbox-slider--b-flat,.checkbox-slider--c,.checkbox-slider--c-weight,.checkbox-slider--default,.checkbox-toggle{position:relative}.checkbox-slider input[type=checkbox],.checkbox-slider--a input[type=checkbox],.checkbox-slider--a-rounded input[type=checkbox],.checkbox-slider--b input[type=checkbox],.checkbox-slider--b-flat input[type=checkbox],.checkbox-slider--c input[type=checkbox],.checkbox-slider--c-weight input[type=checkbox],.checkbox-slider--default input[type=checkbox],.checkbox-toggle input[type=checkbox]{display:block;position:absolute;top:0;right:0;bottom:0;left:0;width:0%;height:0%;margin:0;cursor:pointer;opacity:0}.checkbox-slider input[type=checkbox]:focus+:before,.checkbox-slider--a input[type=checkbox]:focus+:before,.checkbox-slider--a-rounded input[type=checkbox]:focus+:before,.checkbox-slider--b input[type=checkbox]:focus+:before,.checkbox-slider--b-flat input[type=checkbox]:focus+:before,.checkbox-slider--c input[type=checkbox]:focus+:before,.checkbox-slider--c-weight input[type=checkbox]:focus+:before,.checkbox-slider--default input[type=checkbox]:focus+:before,.checkbox-toggle input[type=checkbox]:focus+:before{outline:#80bdff solid 2px}.checkbox-slider input+span,.checkbox-slider--a input+span,.checkbox-slider--a-rounded input+span,.checkbox-slider--b input+span,.checkbox-slider--b-flat input+span,.checkbox-slider--c input+span,.checkbox-slider--c-weight input+span,.checkbox-slider--default input+span,.checkbox-toggle input+span{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox-slider input+span:before,.checkbox-slider--a input+span:before,.checkbox-slider--a-rounded input+span:before,.checkbox-slider--b input+span:before,.checkbox-slider--b-flat input+span:before,.checkbox-slider--c input+span:before,.checkbox-slider--c-weight input+span:before,.checkbox-slider--default input+span:before,.checkbox-toggle input+span:before{position:absolute;left:0;display:inline-block}.checkbox-slider input+span>h4,.checkbox-slider--a input+span>h4,.checkbox-slider--a-rounded input+span>h4,.checkbox-slider--b input+span>h4,.checkbox-slider--b-flat input+span>h4,.checkbox-slider--c input+span>h4,.checkbox-slider--c-weight input+span>h4,.checkbox-slider--default input+span>h4,.checkbox-toggle input+span>h4{display:inline}.form-horizontal [class^=checkbox] input+span:after{top:7px}.checkbox-slider input+span,.checkbox-slider--a input+span,.checkbox-slider--a-rounded input+span,.checkbox-slider--b input+span,.checkbox-slider--b-flat input+span,.checkbox-slider--c input+span,.checkbox-slider--c-weight input+span,.checkbox-slider--default input+span{padding-left:40px}.checkbox-slider input+span:before,.checkbox-slider--a input+span:before,.checkbox-slider--a-rounded input+span:before,.checkbox-slider--b input+span:before,.checkbox-slider--b-flat input+span:before,.checkbox-slider--c input+span:before,.checkbox-slider--c-weight input+span:before,.checkbox-slider--default input+span:before{content:"";height:20px;width:40px;background:rgba(100,100,100,.2);box-shadow:inset 0 0 5px rgba(0,0,0,.8);transition:background .2s ease-out}.checkbox-slider input+span:after,.checkbox-slider--a input+span:after,.checkbox-slider--a-rounded input+span:after,.checkbox-slider--b input+span:after,.checkbox-slider--b-flat input+span:after,.checkbox-slider--c input+span:after,.checkbox-slider--c-weight input+span:after,.checkbox-slider--default input+span:after{width:20px;height:20px;position:absolute;left:0;top:0;display:block;background:#FFF;transition:margin-left .1s ease-in-out;text-align:center;font-weight:700;content:""}.checkbox-slider input:checked+span:after,.checkbox-slider--a input:checked+span:after,.checkbox-slider--a-rounded input:checked+span:after,.checkbox-slider--b input:checked+span:after,.checkbox-slider--b-flat input:checked+span:after,.checkbox-slider--c input:checked+span:after,.checkbox-slider--c-weight input:checked+span:after,.checkbox-slider--default input:checked+span:after{margin-left:20px;content:""}.checkbox-slider input:checked+span:before,.checkbox-slider--a input:checked+span:before,.checkbox-slider--a-rounded input:checked+span:before,.checkbox-slider--b input:checked+span:before,.checkbox-slider--b-flat input:checked+span:before,.checkbox-slider--c input:checked+span:before,.checkbox-slider--c-weight input:checked+span:before,.checkbox-slider--default input:checked+span:before{transition:background .2s ease-in}.checkbox-slider--a-rounded input+span:after,.checkbox-slider--default input+span:after{background:#FFF;border:1px solid transparent;background-clip:content-box}.checkbox-slider--a-rounded input:checked+span:after,.checkbox-slider--default input:checked+span:after{background:#28a745;border:1px solid transparent;background-clip:content-box}.checkbox-slider--a-rounded input+span:after,.checkbox-slider--a-rounded input+span:before{border-radius:.25rem}.checkbox-slider--a-rounded input+span:after,.checkbox-slider--a-rounded input:checked+span:after{border:2px solid transparent;background-clip:content-box}.checkbox-slider--a-rounded.checkbox-slider-sm input+span:after,.checkbox-slider--a-rounded.checkbox-slider-sm input+span:before{border-radius:.2rem}.checkbox-slider--a-rounded.checkbox-slider-md input+span:after,.checkbox-slider--a-rounded.checkbox-slider-md input+span:before{border-radius:.25rem}.checkbox-slider--a-rounded.checkbox-slider-lg input+span:after,.checkbox-slider--a-rounded.checkbox-slider-lg input+span:before{border-radius:.3rem}.checkbox-slider--a input+span{padding-left:60px}.checkbox-slider--a input+span:before{content:"";width:60px}.checkbox-slider--a input+span:after{width:40px;font-size:10px;color:#000;content:"Off";border:1px solid transparent;background-clip:content-box}.checkbox-slider--a input:checked+span:after{content:"On";color:#fff;background:#28a745;border:1px solid transparent;background-clip:content-box}.checkbox-slider--a.checkbox-slider-sm input+span{padding-left:30px}.checkbox-slider--a.checkbox-slider-sm input+span:before{width:30px}.checkbox-slider--a.checkbox-slider-sm input+span:after{width:20px;font-size:5px}.checkbox-slider--a.checkbox-slider-sm input:checked+span:after{margin-left:10px}.checkbox-slider--a.checkbox-slider-md input+span{padding-left:90px}.checkbox-slider--a.checkbox-slider-md input+span:before{width:90px}.checkbox-slider--a.checkbox-slider-md input+span:after{width:60px;font-size:15px}.checkbox-slider--a.checkbox-slider-md input:checked+span:after{margin-left:30px}.checkbox-slider--a.checkbox-slider-lg input+span{padding-left:120px}.checkbox-slider--b input+span,.checkbox-slider--b-flat input+span,.checkbox-slider--c input+span,.checkbox-slider--c-weight input+span{padding-left:40px}.checkbox-slider--a.checkbox-slider-lg input+span:before{width:120px}.checkbox-slider--a.checkbox-slider-lg input+span:after{width:80px;font-size:20px}.checkbox-slider--a.checkbox-slider-lg input:checked+span:after{margin-left:40px}.checkbox-slider--b input+span:before,.checkbox-slider--b-flat input+span:before{border-radius:20px;width:40px}.checkbox-slider--b input+span:after,.checkbox-slider--b-flat input+span:after{background:#FFF;content:"";width:20px;border:2px solid transparent;background-clip:padding-box;border-radius:20px}.checkbox-slider--b input:not(:checked)+span:after,.checkbox-slider--b-flat input:not(:checked)+span:after{animation:popOut ease-in .3s normal}.checkbox-slider--b input:checked+span:after,.checkbox-slider--b-flat input:checked+span:after{content:"";margin-left:20px;border:2px solid transparent;background-clip:padding-box;animation:popIn ease-in .3s normal}.checkbox-slider--b input:checked+span:before,.checkbox-slider--b-flat input:checked+span:before{background:#28a745}.checkbox-slider--b.checkbox-slider-md input+span:after,.checkbox-slider--b.checkbox-slider-md input+span:before{border-radius:30px}.checkbox-slider--b.checkbox-slider-lg input+span:after,.checkbox-slider--b.checkbox-slider-lg input+span:before{border-radius:40px}.checkbox-slider--b-flat input+span:before{box-shadow:none}.checkbox-slider--c input+span:before,.checkbox-slider--c-weight input+span:before{height:2px!important;top:10px;box-shadow:none;width:40px;background:#adb5bd}.checkbox-slider--c input+span:after,.checkbox-slider--c-weight input+span:after{box-shadow:none;width:20px;border:2px solid #adb5bd;border-radius:20px}.checkbox-slider--a input:disabled+span:before,.checkbox-slider--a-rounded input:disabled+span:before,.checkbox-slider--b input:disabled+span:before,.checkbox-slider--b-flat input:disabled+span:before,.checkbox-slider--default input:disabled+span:before{box-shadow:0 0 0 #000}.checkbox-slider--c input:checked+span:after,.checkbox-slider--c-weight input:checked+span:after{background:#28a745;margin-left:20px;border:2px solid #28a745;animation:splashIn ease-in .3s normal}.checkbox-slider--c input:checked+span:before,.checkbox-slider--c-weight input:checked+span:before{background:#28a745}.checkbox-slider--b input:disabled:checked+span:before,.checkbox-slider--b-flat input:disabled:checked+span:before,.checkbox-slider--c input:disabled+span:before,.checkbox-slider--c input:disabled:checked+span:after,.checkbox-slider--c-weight input:disabled+span:before,.checkbox-slider--c-weight input:disabled:checked+span:after,.checkbox-slider--default input:disabled+span:after{background:#adb5bd}.checkbox-slider--c.checkbox-slider-sm input+span:before{top:4px}.checkbox-slider--c.checkbox-slider-md input+span:before{top:14px}.checkbox-slider--c.checkbox-slider-md input+span:after{width:30px;border-radius:30px}.checkbox-slider--c.checkbox-slider-lg input+span:before{top:19px}.checkbox-slider--c.checkbox-slider-lg input+span:after{width:40px;border-radius:40px}.form-horizontal [class*=checkbox-slider--c].checkbox-slider-sm input+span:before{top:10px}.form-horizontal [class*=checkbox-slider--c].checkbox-slider-md input+span:before{top:20px}.form-horizontal [class*=checkbox-slider--c].checkbox-slider-lg input+span:before{top:25px}.checkbox-slider--c-weight input+span:before{height:1px!important}.checkbox-slider--c-weight input:checked+span:before{height:2px!important}.checkbox-slider--c-weight input:not(:checked)+span:after{transform:scale(.7);left:-6px}.checkbox-slider--c-weight.checkbox-slider-sm input+span:before{top:5px}.checkbox-slider--c-weight.checkbox-slider-md input+span:before{top:15px}.checkbox-slider--c-weight.checkbox-slider-lg input+span:before{top:20px}.checkbox-slider--default input:disabled+span{color:#adb5bd}.checkbox-slider--a input:disabled+span:after,.checkbox-slider--a-rounded input:disabled+span:after{background:#adb5bd;color:#FFF}.checkbox-slider--a input:disabled+span,.checkbox-slider--a-rounded input:disabled+span,.checkbox-slider--b input:disabled+span,.checkbox-slider--b-flat input:disabled+span,.checkbox-slider--c input:disabled+span,.checkbox-slider--c-weight input:disabled+span{color:#adb5bd}.checkbox-slider--b input:disabled+span:after,.checkbox-slider--b-flat input:disabled+span:after{border:2px solid transparent;border-radius:40px}.checkbox-slider--c input:disabled+span:after,.checkbox-slider--c-weight input:disabled+span:after{border-color:#adb5bd}input:checked+.indicator-primary{color:#007bff}input:checked+.indicator-success{color:#28a745}input:checked+.indicator-info{color:#17a2b8}input:checked+.indicator-warning{color:#ffc107}input:checked+.indicator-danger{color:#dc3545}.checkbox-slider-sm{line-height:10px}.checkbox-slider-sm input+span{padding-left:20px}.checkbox-slider-sm input+span:before{width:20px}.checkbox-slider-sm input+span:after,.checkbox-slider-sm input+span:before{height:10px;line-height:10px}.checkbox-slider-sm input+span:after{width:10px;vertical-align:middle}.checkbox-slider-sm input:checked+span:after{margin-left:10px}.checkbox-slider-md{line-height:30px}.checkbox-slider-md input+span{padding-left:60px}.checkbox-slider-md input+span:before{width:60px}.checkbox-slider-md input+span:after,.checkbox-slider-md input+span:before{height:30px;line-height:30px}.checkbox-slider-md input+span:after{width:30px;vertical-align:middle}.checkbox-slider-md input:checked+span:after{margin-left:30px}.checkbox-slider-lg{line-height:40px}.checkbox-slider-lg input+span{padding-left:80px}.checkbox-slider-lg input+span:before{width:80px}.checkbox-slider-lg input+span:after,.checkbox-slider-lg input+span:before{height:40px;line-height:40px}.checkbox-slider-lg input+span:after{width:40px;vertical-align:middle}.checkbox-slider-lg input:checked+span:after{margin-left:40px}.checkbox-slider-primary.checkbox-slider--a input:checked+span:after,.checkbox-slider-primary.checkbox-slider--a-rounded input:checked+span:after,.checkbox-slider-primary.checkbox-slider--c input:checked+span:after,.checkbox-slider-primary.checkbox-slider--c-weight input:checked+span:after,.checkbox-slider-primary.checkbox-slider--default input:checked+span:after{background:#007bff;background-clip:content-box}.checkbox-slider-primary.checkbox-slider--c input:checked+span:after,.checkbox-slider-primary.checkbox-slider--c-weight input:checked+span:after{border-color:#007bff}.checkbox-slider-primary.checkbox-slider--b input:checked+span:before,.checkbox-slider-primary.checkbox-slider--b-flat input:checked+span:before,.checkbox-slider-primary.checkbox-slider--c input:checked+span:before,.checkbox-slider-primary.checkbox-slider--c-weight input:checked+span:before{background:#007bff}.checkbox-slider-info.checkbox-slider--a input:checked+span:after,.checkbox-slider-info.checkbox-slider--a-rounded input:checked+span:after,.checkbox-slider-info.checkbox-slider--c input:checked+span:after,.checkbox-slider-info.checkbox-slider--c-weight input:checked+span:after,.checkbox-slider-info.checkbox-slider--default input:checked+span:after{background:#17a2b8;background-clip:content-box}.checkbox-slider-info.checkbox-slider--c input:checked+span:after,.checkbox-slider-info.checkbox-slider--c-weight input:checked+span:after{border-color:#17a2b8}.checkbox-slider-info.checkbox-slider--b input:checked+span:before,.checkbox-slider-info.checkbox-slider--b-flat input:checked+span:before,.checkbox-slider-info.checkbox-slider--c input:checked+span:before,.checkbox-slider-info.checkbox-slider--c-weight input:checked+span:before{background:#17a2b8}.checkbox-slider-warning.checkbox-slider--a input:checked+span:after,.checkbox-slider-warning.checkbox-slider--a-rounded input:checked+span:after,.checkbox-slider-warning.checkbox-slider--c input:checked+span:after,.checkbox-slider-warning.checkbox-slider--c-weight input:checked+span:after,.checkbox-slider-warning.checkbox-slider--default input:checked+span:after{background:#ffc107;background-clip:content-box}.checkbox-slider-warning.checkbox-slider--c input:checked+span:after,.checkbox-slider-warning.checkbox-slider--c-weight input:checked+span:after{border-color:#ffc107}.checkbox-slider-warning.checkbox-slider--b input:checked+span:before,.checkbox-slider-warning.checkbox-slider--b-flat input:checked+span:before,.checkbox-slider-warning.checkbox-slider--c input:checked+span:before,.checkbox-slider-warning.checkbox-slider--c-weight input:checked+span:before{background:#ffc107}.checkbox-slider-danger.checkbox-slider--a input:checked+span:after,.checkbox-slider-danger.checkbox-slider--a-rounded input:checked+span:after,.checkbox-slider-danger.checkbox-slider--c input:checked+span:after,.checkbox-slider-danger.checkbox-slider--c-weight input:checked+span:after,.checkbox-slider-danger.checkbox-slider--default input:checked+span:after{background:#dc3545;background-clip:content-box}.checkbox-slider-danger.checkbox-slider--c input:checked+span:after,.checkbox-slider-danger.checkbox-slider--c-weight input:checked+span:after{border-color:#dc3545}.checkbox-slider-danger.checkbox-slider--b input:checked+span:before,.checkbox-slider-danger.checkbox-slider--b-flat input:checked+span:before,.checkbox-slider-danger.checkbox-slider--c input:checked+span:before,.checkbox-slider-danger.checkbox-slider--c-weight input:checked+span:before{background:#dc3545}
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href="https://srct.gmu.io/masonstrap/css/masonstrap.min.css" rel="stylesheet">
{% block extra_head %}
{% endblock %}
<title>{% block title %}{% endblock %} - MapMason</title>
</head>
<body>
{% block content %}{% endblock %}
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://srct.gmu.io/masonstrap/js/masonstrap.min.js"></script>
{% block extra_js %}{% endblock %}
</body>
</html>
\ No newline at end of file
{% extends 'base.html' %}
{% block extra_head %}
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css"
integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
crossorigin=""/>
<link rel="stylesheet" href="{{ url_for('static', filename='titatoggle-dist-min.css') }}">
<style>
#map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
html, body {
height: 100%;
width: 100%;
}
#page-content {
height: 100%;
}
#map-container {
padding: 0;
margin: 0;
}
</style>
{% endblock %}
{% block extra_js %}
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"
integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw=="
crossorigin=""></script>
<script type="text/javascript">
// GMU Decimal Latitude and Decimal Longitude
const gmuLatitude = 38.8322871;
const gmuLongitude = -77.3080912;
const defaultZoom = 16;
var map = L.map('map', {
minZoom: 0,
maxZoom: 20,
zoomSnap: 0,
zoomDelta: 0.25
});
var cartodbAttribution = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>';
var tileUrl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png';
// 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png'
var positron = L.tileLayer(tileUrl, {
attribution: cartodbAttribution
}).addTo(map);
map.setView([gmuLatitude, gmuLongitude], defaultZoom);
</script>
{% endblock %}
{% block content %}
<div class="container-fluid" id="page-content">
<div class="row" style="height: 100%;">
<nav class="col-sm-3 col-md-2 d-none d-sm-block navbar-inverse navbar-dark bg-dark sidebar">
<h1 class="navbar-brand navbar-dark bg-dark">MapMason</h1>
<p>
<h3 class="text-primary">Search</h3>
<form class="form-inline mt-2 mt-md-0">
<small class="form-text text-light">Search via Name or Keyword</small>
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Name or Keyword">
</form>
</p>
<p>
<h3 class="text-primary">Filter Locations</h3>
<div class="nav flex-column text-light">
<div class="form-check checkbox-slider--b-flat">
<label>
<input type="checkbox"><span>Parking</span>
</label>
</div>
<div class="form-check checkbox-slider--b-flat">
<label>
<input type="checkbox"><span>Residence Halls</span>
</label>
</div>
<div class="form-check checkbox-slider--b-flat">