Browse Source

Gitlab Upgrade

master
clayshieh 4 years ago
commit
e7a933ed7b
91 changed files with 23394 additions and 0 deletions
  1. +340
    -0
      LICENSE
  2. +0
    -0
      cal_hacks/__init__.py
  3. BIN
      cal_hacks/__init__.pyc
  4. +95
    -0
      cal_hacks/settings.py
  5. BIN
      cal_hacks/settings.pyc
  6. +15
    -0
      cal_hacks/urls.py
  7. BIN
      cal_hacks/urls.pyc
  8. +6
    -0
      cal_hacks/views.py
  9. BIN
      cal_hacks/views.pyc
  10. +14
    -0
      cal_hacks/wsgi.py
  11. BIN
      cal_hacks/wsgi.pyc
  12. BIN
      db.sqlite3
  13. +10
    -0
      manage.py
  14. +0
    -0
      maps/__init__.py
  15. BIN
      maps/__init__.pyc
  16. +7
    -0
      maps/admin.py
  17. BIN
      maps/admin.pyc
  18. +28
    -0
      maps/migrations/0001_initial.py
  19. BIN
      maps/migrations/0001_initial.pyc
  20. +29
    -0
      maps/migrations/0002_route.py
  21. BIN
      maps/migrations/0002_route.pyc
  22. +19
    -0
      maps/migrations/0003_auto_20151011_0518.py
  23. BIN
      maps/migrations/0003_auto_20151011_0518.pyc
  24. +0
    -0
      maps/migrations/__init__.py
  25. BIN
      maps/migrations/__init__.pyc
  26. +21
    -0
      maps/models.py
  27. BIN
      maps/models.pyc
  28. +3
    -0
      maps/tests.py
  29. +16
    -0
      maps/urls.py
  30. BIN
      maps/urls.pyc
  31. +106
    -0
      maps/views.py
  32. BIN
      maps/views.pyc
  33. BIN
      media/danger.png
  34. +41
    -0
      static/SkaterPath_files/analytics.js
  35. BIN
      static/SkaterPath_files/blackbox.jpg
  36. +465
    -0
      static/SkaterPath_files/bootstrap-expo.css
  37. BIN
      static/SkaterPath_files/creative-tim-presentation.jpg
  38. BIN
      static/SkaterPath_files/crit-research.jpg
  39. +5
    -0
      static/SkaterPath_files/jquery-1.11.3.min.js
  40. BIN
      static/SkaterPath_files/lyft.jpg
  41. +26
    -0
      static/SkaterPath_files/main.css
  42. +358
    -0
      static/SkaterPath_files/script.js
  43. +293
    -0
      static/SkaterPath_files/script_slow.js
  44. +1
    -0
      static/SkaterPath_files/track.js
  45. BIN
      static/bg.jpg
  46. +587
    -0
      static/bootstrap/css/bootstrap-theme.css
  47. +1
    -0
      static/bootstrap/css/bootstrap-theme.css.map
  48. +5
    -0
      static/bootstrap/css/bootstrap-theme.min.css
  49. +6800
    -0
      static/bootstrap/css/bootstrap.css
  50. +1
    -0
      static/bootstrap/css/bootstrap.css.map
  51. +5
    -0
      static/bootstrap/css/bootstrap.min.css
  52. BIN
      static/bootstrap/fonts/glyphicons-halflings-regular.eot
  53. +288
    -0
      static/bootstrap/fonts/glyphicons-halflings-regular.svg
  54. BIN
      static/bootstrap/fonts/glyphicons-halflings-regular.ttf
  55. BIN
      static/bootstrap/fonts/glyphicons-halflings-regular.woff
  56. BIN
      static/bootstrap/fonts/glyphicons-halflings-regular.woff2
  57. BIN
      static/bootstrap/img/glyphicons-halflings-white.png
  58. BIN
      static/bootstrap/img/glyphicons-halflings.png
  59. +2363
    -0
      static/bootstrap/js/bootstrap.js
  60. +7
    -0
      static/bootstrap/js/bootstrap.min.js
  61. +13
    -0
      static/bootstrap/js/npm.js
  62. +4
    -0
      static/bootstrap/navbar-fixed-top.css
  63. BIN
      static/diffiLevel.png
  64. BIN
      static/rsz_danger-512.png
  65. +27
    -0
      templates/base.html
  66. BIN
      templates/bg.jpg
  67. +1109
    -0
      templates/bootstrap/css/bootstrap-responsive.css
  68. +9
    -0
      templates/bootstrap/css/bootstrap-responsive.min.css
  69. +6167
    -0
      templates/bootstrap/css/bootstrap.css
  70. +9
    -0
      templates/bootstrap/css/bootstrap.min.css
  71. BIN
      templates/bootstrap/img/glyphicons-halflings-white.png
  72. BIN
      templates/bootstrap/img/glyphicons-halflings.png
  73. +2280
    -0
      templates/bootstrap/js/bootstrap.js
  74. +6
    -0
      templates/bootstrap/js/bootstrap.min.js
  75. +9
    -0
      templates/geo-response.html
  76. +65
    -0
      templates/geo.html
  77. +143
    -0
      templates/index.html
  78. +240
    -0
      templates/index1.html
  79. +140
    -0
      templates/index2.html
  80. +354
    -0
      templates/index_slow.html
  81. +33
    -0
      templates/launch.html
  82. +41
    -0
      templates/spf/analytics.js
  83. BIN
      templates/spf/blackbox.jpg
  84. +465
    -0
      templates/spf/bootstrap-expo.css
  85. BIN
      templates/spf/creative-tim-presentation.jpg
  86. BIN
      templates/spf/crit-research.jpg
  87. +5
    -0
      templates/spf/jquery-1.11.3.min.js
  88. BIN
      templates/spf/lyft.jpg
  89. +26
    -0
      templates/spf/main.css
  90. +293
    -0
      templates/spf/script.js
  91. +1
    -0
      templates/spf/track.js

+ 340
- 0
LICENSE View File

@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.

We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

{description}
Copyright (C) {year} {fullname}

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


+ 0
- 0
cal_hacks/__init__.py View File


BIN
cal_hacks/__init__.pyc View File


+ 95
- 0
cal_hacks/settings.py View File

@@ -0,0 +1,95 @@
"""
Django settings for cal_hacks project.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'jd)v$yl7=d@f4+(xj_$prj@6&0o%1b4=lj@491g_()bsx^#c05'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'maps',
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
#'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'cal_hacks.urls'

WSGI_APPLICATION = 'cal_hacks.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

#Template Directory
TEMPLATE_PATH = os.path.join(BASE_DIR, 'templates')
TEMPLATE_DIRS = (TEMPLATE_PATH,)

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_PATH = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'


STATICFILES_DIRS = (
STATIC_PATH,
)

BIN
cal_hacks/settings.pyc View File


+ 15
- 0
cal_hacks/urls.py View File

@@ -0,0 +1,15 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
from cal_hacks import views
from django.conf.urls.static import static
from django.conf import settings

urlpatterns = patterns('',
# Examples:
# url(r'^$', 'cal_hacks.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

url(r'^admin/', include(admin.site.urls)),
url(r'^$', views.launch, name='launch'),
url(r'^maps/', include('maps.urls')),
)+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

BIN
cal_hacks/urls.pyc View File


+ 6
- 0
cal_hacks/views.py View File

@@ -0,0 +1,6 @@
from django.shortcuts import render

# Create your views here.

def launch(request):
return render(request, 'launch.html', {})

BIN
cal_hacks/views.pyc View File


+ 14
- 0
cal_hacks/wsgi.py View File

@@ -0,0 +1,14 @@
"""
WSGI config for cal_hacks project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cal_hacks.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

BIN
cal_hacks/wsgi.pyc View File


BIN
db.sqlite3 View File


+ 10
- 0
manage.py View File

@@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cal_hacks.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)

+ 0
- 0
maps/__init__.py View File


BIN
maps/__init__.pyc View File


+ 7
- 0
maps/admin.py View File

@@ -0,0 +1,7 @@
from django.contrib import admin
from maps.models import Report, Route

# Register your models here.

admin.site.register(Report)
admin.site.register(Route)

BIN
maps/admin.pyc View File


+ 28
- 0
maps/migrations/0001_initial.py View File

@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
]

operations = [
migrations.CreateModel(
name='Report',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('report_type', models.CharField(default=b'Generic', max_length=10)),
('td', models.DateTimeField(auto_now_add=True)),
('quality', models.CharField(default=b'Unknown', max_length=10)),
('desc', models.TextField(default=b' ')),
('lat', models.FloatField(default=0)),
('lng', models.FloatField(default=0)),
],
options={
},
bases=(models.Model,),
),
]

BIN
maps/migrations/0001_initial.pyc View File


+ 29
- 0
maps/migrations/0002_route.py View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('maps', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Route',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('a_lat', models.FloatField(default=0)),
('a_lng', models.FloatField(default=0)),
('b_lat', models.FloatField(default=0)),
('b_lng', models.FloatField(default=0)),
('avg', models.IntegerField(default=0)),
('td', models.DateTimeField(auto_now_add=True)),
],
options={
},
bases=(models.Model,),
),
]

BIN
maps/migrations/0002_route.pyc View File


+ 19
- 0
maps/migrations/0003_auto_20151011_0518.py View File

@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('maps', '0002_route'),
]

operations = [
migrations.AlterField(
model_name='route',
name='avg',
field=models.FloatField(default=-1),
),
]

BIN
maps/migrations/0003_auto_20151011_0518.pyc View File


+ 0
- 0
maps/migrations/__init__.py View File


BIN
maps/migrations/__init__.pyc View File


+ 21
- 0
maps/models.py View File

@@ -0,0 +1,21 @@
from django.db import models

# Create your models here.

class Report(models.Model):
#user = models.ForeignKey(User)
report_type = models.CharField(max_length=10, default="Generic")
td = models.DateTimeField(auto_now_add=True)
quality = models.CharField(max_length=10, default="Unknown")
desc = models.TextField(default=" ")
lat = models.FloatField(default=0)
lng = models.FloatField(default=0)

class Route(models.Model):
a_lat = models.FloatField(default=0)
a_lng = models.FloatField(default=0)
b_lat = models.FloatField(default=0)
b_lng = models.FloatField(default=0)
avg = models.FloatField(default=-1)
td = models.DateTimeField(auto_now_add=True)


BIN
maps/models.pyc View File


+ 3
- 0
maps/tests.py View File

@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.

+ 16
- 0
maps/urls.py View File

@@ -0,0 +1,16 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
from maps import views

urlpatterns = patterns('',
# Examples:
# url(r'^$', 'cal_hacks.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

url(r'^$', views.index, name='index'),
url(r'^test/$', views.test, name='test'),
url(r'^report/$', views.report, name='report'),
url(r'^get/$', views.get, name='get'),
url(r'^slow/$', views.slow, name='slow'),
url(r'^get_slow/$', views.get, name='get'),
)

BIN
maps/urls.pyc View File


+ 106
- 0
maps/views.py View File

@@ -0,0 +1,106 @@
from django.shortcuts import render
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
# from userauth.forms import UserForm, UserProfileForm, ForgotForm
from maps.models import Report, Route
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
# Create your views here.

def test(request):
return HttpResponse('test')

def index(request):
if request.POST:
info = request.POST.get('scoreArray')
alat = info[0]
alng = info[1]
blat = info[2]
blng = info[3]

qual = request.POST.get('quality')
try:
rpt = Report()
rpt.quality = qual
rpt.desc = ""
rpt.lat = float(lat)
rpt.lng = float(lng)
rpt.save()
except:
return HttpResponse('something went wrong')
else:
try:
route = Route.objects.filter(a_lat=alat).filter(a_lng=alng).filter(b_lat=blat).filter(blng)
except:
pass
return render(request, 'index.html', {})
def slow(request):
return render(request, 'index_slow.html', {})
def get_slow(request):
if request.POST:
alat = request.POST.get("lat1")
alng = request.POST.get("lng1")
blat = request.POST.get("lat2")
blng = request.POST.get("lng2")
print alat, alng, blat, blng
try:
print Route.objects.all()
route = Route.objects.filter(a_lat=float(alat)).filter(a_lng=float(alng)).filter(b_lat=float(blat)).filter(b_lng=float(blng))
return HttpResponse(route[0].avg)
except Exception as e:
return HttpResponse(-1)
else:
print "2"
return HttpResponse(-1)

def report(request):
if request.POST:
a = request.POST.getlist("a[]")
b = request.POST.getlist("b[]")
alat = a[0]
alng = a[1]
blat = b[0]
blng = b[1]

qual = request.POST.get('rating')
try:
route = Route.objects.filter(a_lat=float(alat)).filter(a_lng=float(alng)).filter(b_lat=float(blat)).filter(b_lng=float(blng))
if len(route) == 0:
route = Route()
route.a_lat = alat
route.a_lng = alng
route.b_lat = blat
route.b_lng = blng
route.avg = qual
route.save()
return HttpResponse("created")
else:
route = route[0]
if route != None or route != "null":
route.avg -= route.avg / 10
route.avg += float(qual) / 10
route.save()
return HttpResponse("updated route")
except:
return HttpResponse(-1)
def get(request):
if request.POST:
result = []
array = request.POST.getlist("dict[]")
x = 0
while x < len(array):
alat = array[x]
alng = array[x+1]
blat = array[x+2]
blng = array[x+3]
x+=4
route = Route.objects.filter(a_lat=float(alat)).filter(a_lng=float(alng)).filter(b_lat=float(blat)).filter(b_lng=float(blng))
if len(route)==0:
result.append(-1)
else:
result.append(route[0].avg)
return HttpResponse(str(result))
else:
return HttpResponse(-1)

BIN
maps/views.pyc View File


BIN
media/danger.png View File

Before After
Width: 32  |  Height: 32  |  Size: 1.7 KiB

+ 41
- 0
static/SkaterPath_files/analytics.js View File

@@ -0,0 +1,41 @@
(function(){var $c=function(a){this.w=a||[]};$c.prototype.set=function(a){this.w[a]=!0};$c.prototype.encode=function(){for(var a=[],b=0;b<this.w.length;b++)this.w[b]&&(a[Math.floor(b/6)]^=1<<b%6);for(b=0;b<a.length;b++)a[b]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(a[b]||0);return a.join("")+"~"};var vd=new $c;function J(a){vd.set(a)}var Nd=function(a,b){var c=new $c(Dd(a));c.set(b);a.set(Gd,c.w)},Td=function(a){a=Dd(a);a=new $c(a);for(var b=vd.w.slice(),c=0;c<a.w.length;c++)b[c]=b[c]||a.w[c];return(new $c(b)).encode()},Dd=function(a){a=a.get(Gd);ka(a)||(a=[]);return a};var ea=function(a){return"function"==typeof a},ka=function(a){return"[object Array]"==Object.prototype.toString.call(Object(a))},qa=function(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")},D=function(a,b){return 0==a.indexOf(b)},sa=function(a){return a?a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""},ta=function(a){var b=M.createElement("img");b.width=1;b.height=1;b.src=a;return b},ua=function(){},K=function(a){if(encodeURIComponent instanceof Function)return encodeURIComponent(a);J(28);return a},
L=function(a,b,c,d){try{a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)}catch(e){J(27)}},wa=function(a,b){if(a){var c=M.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;b&&(c.id=b);var d=M.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)}},Ud=function(){return"https:"==M.location.protocol},xa=function(){var a=""+M.location.hostname;return 0==a.indexOf("www.")?a.substring(4):a},ya=function(a){var b=M.referrer;if(/^https?:\/\//i.test(b)){if(a)return b;
a="//"+M.location.hostname;var c=b.indexOf(a);if(5==c||6==c)if(a=b.charAt(c+a.length),"/"==a||"?"==a||""==a||":"==a)return;return b}},za=function(a,b){if(1==b.length&&null!=b[0]&&"object"===typeof b[0])return b[0];for(var c={},d=Math.min(a.length+1,b.length),e=0;e<d;e++)if("object"===typeof b[e]){for(var g in b[e])b[e].hasOwnProperty(g)&&(c[g]=b[e][g]);break}else e<a.length&&(c[a[e]]=b[e]);return c};var ee=function(){this.keys=[];this.values={};this.m={}};ee.prototype.set=function(a,b,c){this.keys.push(a);c?this.m[":"+a]=b:this.values[":"+a]=b};ee.prototype.get=function(a){return this.m.hasOwnProperty(":"+a)?this.m[":"+a]:this.values[":"+a]};ee.prototype.map=function(a){for(var b=0;b<this.keys.length;b++){var c=this.keys[b],d=this.get(c);d&&a(c,d)}};var O=window,M=document,Mc=function(){for(var a=O.navigator.userAgent+(M.cookie?M.cookie:"")+(M.referrer?M.referrer:""),b=a.length,c=O.history.length;0<c;)a+=c--^b++;return La(a)};var Aa=function(a){var b=O._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===O["ga-disable-"+a])return!0;try{var c=O.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(d){}return!1};var Ca=function(a){var b=[],c=M.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},zc=function(a,b,c,d,e,g){e=Aa(e)?!1:eb.test(M.location.hostname)||"/"==c&&vc.test(d)?!1:!0;if(!e)return!1;b&&1200<b.length&&(b=b.substring(0,1200),J(24));c=a+"="+b+"; path="+c+"; ";g&&(c+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");d&&"none"!=d&&(c+="domain="+d+";");d=M.cookie;M.cookie=c;if(!(d=d!=M.cookie))a:{a=
Ca(a);for(d=0;d<a.length;d++)if(b==a[d]){d=!0;break a}d=!1}return d},Cc=function(a){return K(a).replace(/\(/g,"%28").replace(/\)/g,"%29")},vc=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,eb=/(^|\.)doubleclick\.net$/i;var oc=function(){return(Ba||Ud()?"https:":"http:")+"//www.google-analytics.com"},Da=function(a){this.name="len";this.message=a+"-8192"},ba=function(a,b,c){c=c||ua;if(2036>=b.length)wc(a,b,c);else if(8192>=b.length)x(a,b,c)||wd(a,b,c)||wc(a,b,c);else throw ge("len",b.length),new Da(b.length);},wc=function(a,b,c){var d=ta(a+"?"+b);d.onload=d.onerror=function(){d.onload=null;d.onerror=null;c()}},wd=function(a,b,c){var d=O.XMLHttpRequest;if(!d)return!1;var e=new d;if(!("withCredentials"in e))return!1;
e.open("POST",a,!0);e.withCredentials=!0;e.setRequestHeader("Content-Type","text/plain");e.onreadystatechange=function(){4==e.readyState&&(c(),e=null)};e.send(b);return!0},x=function(a,b,c){return O.navigator.sendBeacon?O.navigator.sendBeacon(a,b)?(c(),!0):!1:!1},ge=function(a,b,c){1<=100*Math.random()||Aa("?")||(a=["t=error","_e="+a,"_v=j39","sr=1"],b&&a.push("_f="+b),c&&a.push("_m="+K(c.substring(0,100))),a.push("aip=1"),a.push("z="+fe()),wc(oc()+"/collect",a.join("&"),ua))};var Ha=function(){this.M=[]};Ha.prototype.add=function(a){this.M.push(a)};Ha.prototype.D=function(a){try{for(var b=0;b<this.M.length;b++){var c=a.get(this.M[b]);c&&ea(c)&&c.call(O,a)}}catch(d){}b=a.get(Ia);b!=ua&&ea(b)&&(a.set(Ia,ua,!0),setTimeout(b,10))};function Ja(a){if(100!=a.get(Ka)&&La(P(a,Q))%1E4>=100*R(a,Ka))throw"abort";}function Ma(a){if(Aa(P(a,Na)))throw"abort";}function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw"abort";}
function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withCredentials"in new O.XMLHttpRequest&&J(40)}catch(b){}a.set(ld,Td(a),!0);a.set(Ac,R(a,Ac)+1);var c=[];Qa.map(function(b,e){if(e.F){var g=a.get(b);void 0!=g&&g!=e.defaultValue&&("boolean"==typeof g&&(g*=1),c.push(e.F+"="+K(""+g)))}});c.push("z="+Bd());a.set(Ra,c.join("&"),!0)}
function Sa(a){var b=P(a,gd)||oc()+"/collect",c=P(a,fa);!c&&a.get(Vd)&&(c="beacon");if(c){var d=P(a,Ra),e=a.get(Ia),e=e||ua;"image"==c?wc(b,d,e):"xhr"==c&&wd(b,d,e)||"beacon"==c&&x(b,d,e)||ba(b,d,e)}else ba(b,P(a,Ra),a.get(Ia));a.set(Ia,ua,!0)}function Hc(a){var b=O.gaData;b&&(b.expId&&a.set(Nc,b.expId),b.expVar&&a.set(Oc,b.expVar))}function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"abort";}function yd(a){var b=O.gaDevIds;ka(b)&&0!=b.length&&a.set("&did",b.join(","),!0)}
function vb(a){if(!a.get(Na))throw"abort";};var hd=function(){return Math.round(2147483647*Math.random())},Bd=function(){try{var a=new Uint32Array(1);O.crypto.getRandomValues(a);return a[0]&2147483647}catch(b){return hd()}},fe=hd;function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction"!=c&&"item"!=c){var c=R(a,Wa),d=(new Date).getTime(),e=R(a,Xa);0==e&&a.set(Xa,d);e=Math.round(2*(d-e)/1E3);0<e&&(c=Math.min(c+e,20),a.set(Xa,d));if(0>=c)throw"abort";a.set(Wa,--c)}a.set(Ua,++b)};var Ya=function(){this.data=new ee},Qa=new ee,Za=[];Ya.prototype.get=function(a){var b=$a(a),c=this.data.get(a);b&&void 0==c&&(c=ea(b.defaultValue)?b.defaultValue():b.defaultValue);return b&&b.Z?b.Z(this,a,c):c};var P=function(a,b){var c=a.get(b);return void 0==c?"":""+c},R=function(a,b){var c=a.get(b);return void 0==c||""===c?0:1*c};Ya.prototype.set=function(a,b,c){if(a)if("object"==typeof a)for(var d in a)a.hasOwnProperty(d)&&ab(this,d,a[d],c);else ab(this,a,b,c)};
var ab=function(a,b,c,d){if(void 0!=c)switch(b){case Na:wb.test(c)}var e=$a(b);e&&e.o?e.o(a,b,c,d):a.data.set(b,c,d)},bb=function(a,b,c,d,e){this.name=a;this.F=b;this.Z=d;this.o=e;this.defaultValue=c},$a=function(a){var b=Qa.get(a);if(!b)for(var c=0;c<Za.length;c++){var d=Za[c],e=d[0].exec(a);if(e){b=d[1](e);Qa.set(b.name,b);break}}return b},yc=function(a){var b;Qa.map(function(c,d){d.F==a&&(b=d)});return b&&b.name},S=function(a,b,c,d,e){a=new bb(a,b,c,d,e);Qa.set(a.name,a);return a.name},cb=function(a,
b){Za.push([new RegExp("^"+a+"$"),b])},T=function(a,b,c){return S(a,b,c,void 0,db)},db=function(){};var gb=qa(window.GoogleAnalyticsObject)&&sa(window.GoogleAnalyticsObject)||"ga",Ba=!1,he=S("_br"),hb=T("apiVersion","v"),ib=T("clientVersion","_v");S("anonymizeIp","aip");var jb=S("adSenseId","a"),Va=S("hitType","t"),Ia=S("hitCallback"),Ra=S("hitPayload");S("nonInteraction","ni");S("currencyCode","cu");S("dataSource","ds");var Vd=S("useBeacon",void 0,!1),fa=S("transport");S("sessionControl","sc","");S("sessionGroup","sg");S("queueTime","qt");var Ac=S("_s","_s");S("screenName","cd");
var kb=S("location","dl",""),lb=S("referrer","dr"),mb=S("page","dp","");S("hostname","dh");var nb=S("language","ul"),ob=S("encoding","de");S("title","dt",function(){return M.title||void 0});cb("contentGroup([0-9]+)",function(a){return new bb(a[0],"cg"+a[1])});var pb=S("screenColors","sd"),qb=S("screenResolution","sr"),rb=S("viewportSize","vp"),sb=S("javaEnabled","je"),tb=S("flashVersion","fl");S("campaignId","ci");S("campaignName","cn");S("campaignSource","cs");S("campaignMedium","cm");
S("campaignKeyword","ck");S("campaignContent","cc");var ub=S("eventCategory","ec"),xb=S("eventAction","ea"),yb=S("eventLabel","el"),zb=S("eventValue","ev"),Bb=S("socialNetwork","sn"),Cb=S("socialAction","sa"),Db=S("socialTarget","st"),Eb=S("l1","plt"),Fb=S("l2","pdt"),Gb=S("l3","dns"),Hb=S("l4","rrt"),Ib=S("l5","srt"),Jb=S("l6","tcp"),Kb=S("l7","dit"),Lb=S("l8","clt"),Mb=S("timingCategory","utc"),Nb=S("timingVar","utv"),Ob=S("timingLabel","utl"),Pb=S("timingValue","utt");S("appName","an");
S("appVersion","av","");S("appId","aid","");S("appInstallerId","aiid","");S("exDescription","exd");S("exFatal","exf");var Nc=S("expId","xid"),Oc=S("expVar","xvar"),Rc=S("_utma","_utma"),Sc=S("_utmz","_utmz"),Tc=S("_utmht","_utmht"),Ua=S("_hc",void 0,0),Xa=S("_ti",void 0,0),Wa=S("_to",void 0,20);cb("dimension([0-9]+)",function(a){return new bb(a[0],"cd"+a[1])});cb("metric([0-9]+)",function(a){return new bb(a[0],"cm"+a[1])});S("linkerParam",void 0,void 0,Bc,db);var ld=S("usage","_u"),Gd=S("_um");
S("forceSSL",void 0,void 0,function(){return Ba},function(a,b,c){J(34);Ba=!!c});var ed=S("_j1","jid");cb("\\&(.*)",function(a){var b=new bb(a[0],a[1]),c=yc(a[0].substring(1));c&&(b.Z=function(a){return a.get(c)},b.o=function(a,b,g,ca){a.set(c,g,ca)},b.F=void 0);return b});
var Qb=T("_oot"),dd=S("previewTask"),Rb=S("checkProtocolTask"),md=S("validationTask"),Sb=S("checkStorageTask"),Uc=S("historyImportTask"),Tb=S("samplerTask"),Vb=S("_rlt"),Wb=S("buildHitTask"),Xb=S("sendHitTask"),Vc=S("ceTask"),zd=S("devIdTask"),Cd=S("timingTask"),Ld=S("displayFeaturesTask"),V=T("name"),Q=T("clientId","cid"),Ad=S("userId","uid"),Na=T("trackingId","tid"),U=T("cookieName",void 0,"_ga"),W=T("cookieDomain"),Yb=T("cookiePath",void 0,"/"),Zb=T("cookieExpires",void 0,63072E3),$b=T("legacyCookieDomain"),
Wc=T("legacyHistoryImport",void 0,!0),ac=T("storage",void 0,"cookie"),bc=T("allowLinker",void 0,!1),cc=T("allowAnchor",void 0,!0),Ka=T("sampleRate","sf",100),dc=T("siteSpeedSampleRate",void 0,1),ec=T("alwaysSendReferrer",void 0,!1),gd=S("transportUrl"),Md=S("_r","_r");function X(a,b,c,d){b[a]=function(){try{return d&&J(d),c.apply(this,arguments)}catch(b){throw ge("exc",a,b&&b.name),b;}}};var Od=function(a,b,c){this.V=1E4;this.fa=a;this.$=!1;this.B=b;this.ea=c||1},Ed=function(a,b){var c;if(a.fa&&a.$)return 0;a.$=!0;if(b){if(a.B&&R(b,a.B))return R(b,a.B);if(0==b.get(dc))return 0}if(0==a.V)return 0;void 0===c&&(c=Bd());return 0==c%a.V?Math.floor(c/a.V)%a.ea+1:0};var ie=new Od(!0,he,7),je=function(a){if(!Ud()&&!Ba){var b=Ed(ie,a);if(b&&!(!O.navigator.sendBeacon&&4<=b&&6>=b)){var c=(new Date).getHours(),d=[Bd(),Bd(),Bd()].join(".");a=(3==b||5==b?"https:":"http:")+"//www.google-analytics.com/collect?z=br.";a+=[b,"A",c,d].join(".");var e=1!=b%3?"https:":"http:",e=e+"//www.google-analytics.com/collect?z=br.",e=e+[b,"B",c,d].join(".");7==b&&(e=e.replace("//www.","//ssl."));c=function(){4<=b&&6>=b?O.navigator.sendBeacon(e,""):ta(e)};Bd()%2?(ta(a),c()):(c(),ta(a))}}};function fc(){var a,b,c;if((c=(c=O.navigator)?c.plugins:null)&&c.length)for(var d=0;d<c.length&&!b;d++){var e=c[d];-1<e.name.indexOf("Shockwave Flash")&&(b=e.description)}if(!b)try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),b=a.GetVariable("$version")}catch(g){}if(!b)try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b="WIN 6,0,21,0",a.AllowScriptAccess="always",b=a.GetVariable("$version")}catch(ca){}if(!b)try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),b=a.GetVariable("$version")}catch(l){}b&&
(a=b.match(/[\d]+/g))&&3<=a.length&&(b=a[0]+"."+a[1]+" r"+a[2]);return b||void 0};var gc=function(a,b){var c=Math.min(R(a,dc),100);if(!(La(P(a,Q))%100>=c)&&(c={},Ec(c)||Fc(c))){var d=c[Eb];void 0==d||Infinity==d||isNaN(d)||(0<d?(Y(c,Gb),Y(c,Jb),Y(c,Ib),Y(c,Fb),Y(c,Hb),Y(c,Kb),Y(c,Lb),b(c)):L(O,"load",function(){gc(a,b)},!1))}},Ec=function(a){var b=O.performance||O.webkitPerformance,b=b&&b.timing;if(!b)return!1;var c=b.navigationStart;if(0==c)return!1;a[Eb]=b.loadEventStart-c;a[Gb]=b.domainLookupEnd-b.domainLookupStart;a[Jb]=b.connectEnd-b.connectStart;a[Ib]=b.responseStart-b.requestStart;
a[Fb]=b.responseEnd-b.responseStart;a[Hb]=b.fetchStart-c;a[Kb]=b.domInteractive-c;a[Lb]=b.domContentLoadedEventStart-c;return!0},Fc=function(a){if(O.top!=O)return!1;var b=O.external,c=b&&b.onloadT;b&&!b.isValidLoadTime&&(c=void 0);2147483648<c&&(c=void 0);0<c&&b.setPageReadyTime();if(void 0==c)return!1;a[Eb]=c;return!0},Y=function(a,b){var c=a[b];if(isNaN(c)||Infinity==c||0>c)a[b]=void 0},Fd=function(a){return function(b){"pageview"!=b.get(Va)||a.I||(a.I=!0,gc(b,function(b){a.send("timing",b)}))}};var hc=!1,mc=function(a){if("cookie"==P(a,ac)){var b=P(a,U),c=nd(a),d=kc(P(a,Yb)),e=lc(P(a,W)),g=1E3*R(a,Zb),ca=P(a,Na);if("auto"!=e)zc(b,c,d,e,ca,g)&&(hc=!0);else{J(32);var l;a:{c=[];e=xa().split(".");if(4==e.length&&(l=e[e.length-1],parseInt(l,10)==l)){l=["none"];break a}for(l=e.length-2;0<=l;l--)c.push(e.slice(l).join("."));c.push("none");l=c}for(var k=0;k<l.length;k++)if(e=l[k],a.data.set(W,e),c=nd(a),zc(b,c,d,e,ca,g)){hc=!0;return}a.data.set(W,"auto")}}},nc=function(a){if("cookie"==P(a,ac)&&
!hc&&(mc(a),!hc))throw"abort";},Yc=function(a){if(a.get(Wc)){var b=P(a,W),c=P(a,$b)||xa(),d=Xc("__utma",c,b);d&&(J(19),a.set(Tc,(new Date).getTime(),!0),a.set(Rc,d.R),(b=Xc("__utmz",c,b))&&d.hash==b.hash&&a.set(Sc,b.R))}},nd=function(a){var b=Cc(P(a,Q)),c=ic(P(a,W));a=jc(P(a,Yb));1<a&&(c+="-"+a);return["GA1",c,b].join(".")},Gc=function(a,b,c){for(var d=[],e=[],g,ca=0;ca<a.length;ca++){var l=a[ca];l.H[c]==b?d.push(l):void 0==g||l.H[c]<g?(e=[l],g=l.H[c]):l.H[c]==g&&e.push(l)}return 0<d.length?d:e},
lc=function(a){return 0==a.indexOf(".")?a.substr(1):a},ic=function(a){return lc(a).split(".").length},kc=function(a){if(!a)return"/";1<a.length&&a.lastIndexOf("/")==a.length-1&&(a=a.substr(0,a.length-1));0!=a.indexOf("/")&&(a="/"+a);return a},jc=function(a){a=kc(a);return"/"==a?1:a.split("/").length};function Xc(a,b,c){"none"==b&&(b="");var d=[],e=Ca(a);a="__utma"==a?6:2;for(var g=0;g<e.length;g++){var ca=(""+e[g]).split(".");ca.length>=a&&d.push({hash:ca[0],R:e[g],O:ca})}return 0==d.length?void 0:1==d.length?d[0]:Zc(b,d)||Zc(c,d)||Zc(null,d)||d[0]}function Zc(a,b){var c,d;null==a?c=d=1:(c=La(a),d=La(D(a,".")?a.substring(1):"."+a));for(var e=0;e<b.length;e++)if(b[e].hash==c||b[e].hash==d)return b[e]};var od=new RegExp(/^https?:\/\/([^\/:]+)/),pd=/(.*)([?&#])(?:_ga=[^&#]*)(?:&?)(.*)/;function Bc(a){a=a.get(Q);var b=Ic(a,0);return"_ga=1."+K(b+"."+a)}function Ic(a,b){for(var c=new Date,d=O.navigator,e=d.plugins||[],c=[a,d.userAgent,c.getTimezoneOffset(),c.getYear(),c.getDate(),c.getHours(),c.getMinutes()+b],d=0;d<e.length;++d)c.push(e[d].description);return La(c.join("."))}var Dc=function(a){J(48);this.target=a;this.T=!1};
Dc.prototype.ca=function(a,b){if(a.tagName){if("a"==a.tagName.toLowerCase()){a.href&&(a.href=qd(this,a.href,b));return}if("form"==a.tagName.toLowerCase())return rd(this,a)}if("string"==typeof a)return qd(this,a,b)};
var qd=function(a,b,c){var d=pd.exec(b);d&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));a=a.target.get("linkerParam");var e=b.indexOf("?"),d=b.indexOf("#");c?b+=(-1==d?"#":"&")+a:(c=-1==e?"?":"&",b=-1==d?b+(c+a):b.substring(0,d)+c+a+b.substring(d));return b},rd=function(a,b){if(b&&b.action){var c=a.target.get("linkerParam").split("=")[1];if("get"==b.method.toLowerCase()){for(var d=b.childNodes||[],e=0;e<d.length;e++)if("_ga"==d[e].name){d[e].setAttribute("value",c);return}d=M.createElement("input");
d.setAttribute("type","hidden");d.setAttribute("name","_ga");d.setAttribute("value",c);b.appendChild(d)}else"post"==b.method.toLowerCase()&&(b.action=qd(a,b.action))}};
Dc.prototype.S=function(a,b,c){function d(c){try{c=c||O.event;var d;a:{var g=c.target||c.srcElement;for(c=100;g&&0<c;){if(g.href&&g.nodeName.match(/^a(?:rea)?$/i)){d=g;break a}g=g.parentNode;c--}d={}}("http:"==d.protocol||"https:"==d.protocol)&&sd(a,d.hostname||"")&&d.href&&(d.href=qd(e,d.href,b))}catch(w){J(26)}}var e=this;this.T||(this.T=!0,L(M,"mousedown",d,!1),L(M,"keyup",d,!1));if(c){c=function(b){b=b||O.event;if((b=b.target||b.srcElement)&&b.action){var c=b.action.match(od);c&&sd(a,c[1])&&rd(e,
b)}};for(var g=0;g<M.forms.length;g++)L(M.forms[g],"submit",c)}};function sd(a,b){if(b==M.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1};var Jd=function(a,b,c){this.U=ed;this.aa=b;(b=c)||(b=(b=P(a,V))&&"t0"!=b?Wd.test(b)?"_gat_"+Cc(P(a,Na)):"_gat_"+Cc(b):"_gat");this.Y=b},Rd=function(a,b){var c=b.get(Wb);b.set(Wb,function(b){Pd(a,b);var d=c(b);Qd(a,b);return d});var d=b.get(Xb);b.set(Xb,function(b){var c=d(b);Id(a,b);return c})},Pd=function(a,b){b.get(a.U)||("1"==Ca(a.Y)[0]?b.set(a.U,"",!0):b.set(a.U,""+fe(),!0))},Qd=function(a,b){b.get(a.U)&&zc(a.Y,"1",b.get(Yb),b.get(W),b.get(Na),6E5)},Id=function(a,b){if(b.get(a.U)){var c=new ee,
d=function(a){$a(a).F&&c.set($a(a).F,b.get(a))};d(hb);d(ib);d(Na);d(Q);d(a.U);c.set($a(ld).F,Td(b));var e=a.aa;c.map(function(a,b){e+=K(a)+"=";e+=K(""+b)+"&"});e+="z="+fe();ta(e);b.set(a.U,"",!0)}},Wd=/^gtm\d+$/;var fd=function(a,b){var c=a.b;if(!c.get("dcLoaded")){Nd(c,29);b=b||{};var d;b[U]&&(d=Cc(b[U]));d=new Jd(c,"https://stats.g.doubleclick.net/r/collect?t=dc&aip=1&_r=3&",d);Rd(d,c);c.set("dcLoaded",!0)}};var Sd=function(a){var b;b=a.get("dcLoaded")?!1:"cookie"!=a.get(ac)?!1:!0;b&&(Nd(a,51),b=new Jd(a),Pd(b,a),Qd(b,a),a.get(b.U)&&(a.set(Md,1,!0),a.set(gd,oc()+"/r/collect",!0)))};var Lc=function(){var a=O.gaGlobal=O.gaGlobal||{};return a.hid=a.hid||fe()};var ad,bd=function(a,b,c){if(!ad){var d;d=M.location.hash;var e=O.name,g=/^#?gaso=([^&]*)/;if(e=(d=(d=d&&d.match(g)||e&&e.match(g))?d[1]:Ca("GASO")[0]||"")&&d.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))zc("GASO",""+d,c,b,a,0),window._udo||(window._udo=b),window._utcp||(window._utcp=c),a=e[1],wa("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+fe(),"_gasojs");ad=!0}};var wb=/^(UA|YT|MO|GP)-(\d+)-(\d+)$/,pc=function(a){function b(a,b){d.b.data.set(a,b)}function c(a,c){b(a,c);d.filters.add(a)}var d=this;this.b=new Ya;this.filters=new Ha;b(V,a[V]);b(Na,sa(a[Na]));b(U,a[U]);b(W,a[W]||xa());b(Yb,a[Yb]);b(Zb,a[Zb]);b($b,a[$b]);b(Wc,a[Wc]);b(bc,a[bc]);b(cc,a[cc]);b(Ka,a[Ka]);b(dc,a[dc]);b(ec,a[ec]);b(ac,a[ac]);b(Ad,a[Ad]);b(hb,1);b(ib,"j39");c(Qb,Ma);c(dd,cd);c(Rb,Oa);c(md,vb);c(Sb,nc);c(Uc,Yc);c(Tb,Ja);c(Vb,Ta);c(Vc,Hc);c(zd,yd);c(Ld,Sd);c(Wb,Pa);c(Xb,Sa);c(Cd,Fd(this));
Jc(this.b,a[Q]);Kc(this.b);this.b.set(jb,Lc());bd(this.b.get(Na),this.b.get(W),this.b.get(Yb))},Jc=function(a,b){if("cookie"==P(a,ac)){hc=!1;var c;b:{var d=Ca(P(a,U));if(d&&!(1>d.length)){c=[];for(var e=0;e<d.length;e++){var g;g=d[e].split(".");var ca=g.shift();("GA1"==ca||"1"==ca)&&1<g.length?(ca=g.shift().split("-"),1==ca.length&&(ca[1]="1"),ca[0]*=1,ca[1]*=1,g={H:ca,s:g.join(".")}):g=void 0;g&&c.push(g)}if(1==c.length){J(13);c=c[0].s;break b}if(0==c.length)J(12);else{J(14);d=ic(P(a,W));c=Gc(c,
d,0);if(1==c.length){c=c[0].s;break b}d=jc(P(a,Yb));c=Gc(c,d,1);c=c[0]&&c[0].s;break b}}c=void 0}c||(c=P(a,W),d=P(a,$b)||xa(),c=Xc("__utma",d,c),void 0!=c?(J(10),c=c.O[1]+"."+c.O[2]):c=void 0);c&&(a.data.set(Q,c),hc=!0)}c=a.get(cc);if(e=(c=M.location[c?"href":"search"].match("(?:&|#|\\?)"+K("_ga").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==c.length?c[1]:"")a.get(bc)?(c=e.indexOf("."),-1==c?J(22):(d=e.substring(c+1),"1"!=e.substring(0,c)?J(22):(c=d.indexOf("."),-1==c?J(22):(e=
d.substring(0,c),c=d.substring(c+1),e!=Ic(c,0)&&e!=Ic(c,-1)&&e!=Ic(c,-2)?J(23):(J(11),a.data.set(Q,c)))))):J(21);b&&(J(9),a.data.set(Q,K(b)));a.get(Q)||((c=(c=O.gaGlobal&&O.gaGlobal.vid)&&-1!=c.search(/^(?:utma\.)?\d+\.\d+$/)?c:void 0)?(J(17),a.data.set(Q,c)):(J(8),a.data.set(Q,[fe()^Mc()&2147483647,Math.round((new Date).getTime()/1E3)].join("."))));mc(a)},Kc=function(a){var b=O.navigator,c=O.screen,d=M.location;a.set(lb,ya(a.get(ec)));if(d){var e=d.pathname||"";"/"!=e.charAt(0)&&(J(31),e="/"+e);
a.set(kb,d.protocol+"//"+d.hostname+e+d.search)}c&&a.set(qb,c.width+"x"+c.height);c&&a.set(pb,c.colorDepth+"-bit");var c=M.documentElement,g=(e=M.body)&&e.clientWidth&&e.clientHeight,ca=[];c&&c.clientWidth&&c.clientHeight&&("CSS1Compat"===M.compatMode||!g)?ca=[c.clientWidth,c.clientHeight]:g&&(ca=[e.clientWidth,e.clientHeight]);c=0>=ca[0]||0>=ca[1]?"":ca.join("x");a.set(rb,c);a.set(tb,fc());a.set(ob,M.characterSet||M.charset);a.set(sb,b&&"function"===typeof b.javaEnabled&&b.javaEnabled()||!1);a.set(nb,
(b&&(b.language||b.browserLanguage)||"").toLowerCase());if(d&&a.get(cc)&&(b=M.location.hash)){b=b.split(/[?&#]+/);d=[];for(c=0;c<b.length;++c)(D(b[c],"utm_id")||D(b[c],"utm_campaign")||D(b[c],"utm_source")||D(b[c],"utm_medium")||D(b[c],"utm_term")||D(b[c],"utm_content")||D(b[c],"gclid")||D(b[c],"dclid")||D(b[c],"gclsrc"))&&d.push(b[c]);0<d.length&&(b="#"+d.join("&"),a.set(kb,a.get(kb)+b))}};pc.prototype.get=function(a){return this.b.get(a)};pc.prototype.set=function(a,b){this.b.set(a,b)};
var qc={pageview:[mb],event:[ub,xb,yb,zb],social:[Bb,Cb,Db],timing:[Mb,Nb,Pb,Ob]};pc.prototype.send=function(a){if(!(1>arguments.length)){var b,c;"string"===typeof arguments[0]?(b=arguments[0],c=[].slice.call(arguments,1)):(b=arguments[0]&&arguments[0][Va],c=arguments);b&&(c=za(qc[b]||[],c),c[Va]=b,this.b.set(c,void 0,!0),this.filters.D(this.b),this.b.data.m={},je(this.b))}};var rc=function(a){if("prerender"==M.visibilityState)return!1;a();return!0};var td=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,sc=function(a){if(ea(a[0]))this.u=a[0];else{var b=td.exec(a[0]);null!=b&&4==b.length&&(this.c=b[1]||"t0",this.K=b[2]||"",this.C=b[3],this.a=[].slice.call(a,1),this.K||(this.A="create"==this.C,this.i="require"==this.C,this.g="provide"==this.C,this.ba="remove"==this.C),this.i&&(3<=this.a.length?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(qa(this.a[1])?this.X=this.a[1]:this.W=this.a[1])));b=a[1];a=a[2];if(!this.C)throw"abort";if(this.i&&(!qa(b)||""==b))throw"abort";
if(this.g&&(!qa(b)||""==b||!ea(a)))throw"abort";if(ud(this.c)||ud(this.K))throw"abort";if(this.g&&"t0"!=this.c)throw"abort";}};function ud(a){return 0<=a.indexOf(".")||0<=a.indexOf(":")};var Yd,Zd,$d;Yd=new ee;$d=new ee;Zd={ec:45,ecommerce:46,linkid:47};
var ae=function(a){function b(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase(),c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";D(a,"/")||(a="/"+a);return[b,""+c,a]}var c=M.createElement("a");c.href=M.location.href;var d=(c.protocol||"").toLowerCase(),e=b(c),g=c.search||"",ca=d+"//"+e[0]+(e[1]?":"+e[1]:"");D(a,"//")?a=d+a:D(a,"/")?a=ca+a:!a||D(a,"?")?a=ca+e[2]+(a||g):0>a.split("/")[0].indexOf(":")&&(a=ca+e[2].substring(0,e[2].lastIndexOf("/"))+
"/"+a);c.href=a;d=b(c);return{protocol:(c.protocol||"").toLowerCase(),host:d[0],port:d[1],path:d[2],G:c.search||"",url:a||""}};var Z={ga:function(){Z.f=[]}};Z.ga();Z.D=function(a){var b=Z.J.apply(Z,arguments),b=Z.f.concat(b);for(Z.f=[];0<b.length&&!Z.v(b[0])&&!(b.shift(),0<Z.f.length););Z.f=Z.f.concat(b)};
Z.J=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new sc(arguments[c]);if(d.g)Yd.set(d.a[0],d.a[1]);else{if(d.i){var e=d,g=e.a[0];if(!ea(Yd.get(g))&&!$d.get(g)){Zd.hasOwnProperty(g)&&J(Zd[g]);var ca=e.X;!ca&&Zd.hasOwnProperty(g)?(J(39),ca=g+".js"):J(43);if(ca){ca&&0<=ca.indexOf("/")||(ca=(Ba||Ud()?"https:":"http:")+"//www.google-analytics.com/plugins/ua/"+ca);var l=ae(ca),e=void 0;var k=l.protocol,w=M.location.protocol,e="https:"==k||k==w?!0:"http:"!=k?!1:"http:"==w;var Xd;if(Xd=e){var e=
l,be=ae(M.location.href);if(e.G||0<=e.url.indexOf("?")||0<=e.path.indexOf("://"))Xd=!1;else if(e.host==be.host&&e.port==be.port)Xd=!0;else{var ce="http:"==e.protocol?80:443;Xd="www.google-analytics.com"==e.host&&(e.port||ce)==ce&&D(e.path,"/plugins/")?!0:!1}}Xd&&(wa(l.url),$d.set(g,!0))}}}b.push(d)}}catch(de){}return b};
Z.v=function(a){try{if(a.u)a.u.call(O,N.j("t0"));else{var b=a.c==gb?N:N.j(a.c);if(a.A)"t0"==a.c&&N.create.apply(N,a.a);else if(a.ba)N.remove(a.c);else if(b)if(a.i){var c;var d=a.a[0],e=a.W;b==N||b.get(V);var g=Yd.get(d);ea(g)?(b.plugins_=b.plugins_||new ee,b.plugins_.get(d)||b.plugins_.set(d,new g(b,e||{})),c=!0):c=!1;if(!c)return!0}else if(a.K){var ca=a.C,l=a.a,k=b.plugins_.get(a.K);k[ca].apply(k,l)}else b[a.C].apply(b,a.a)}}catch(w){}};var N=function(a){J(1);Z.D.apply(Z,[arguments])};N.h={};N.P=[];N.L=0;N.answer=42;var uc=[Na,W,V];N.create=function(a){var b=za(uc,[].slice.call(arguments));b[V]||(b[V]="t0");var c=""+b[V];if(N.h[c])return N.h[c];b=new pc(b);N.h[c]=b;N.P.push(b);return b};N.remove=function(a){for(var b=0;b<N.P.length;b++)if(N.P[b].get(V)==a){N.P.splice(b,1);N.h[a]=null;break}};N.j=function(a){return N.h[a]};N.getAll=function(){return N.P.slice(0)};
N.N=function(){"ga"!=gb&&J(49);var a=O[gb];if(!a||42!=a.answer){N.L=a&&a.l;N.loaded=!0;var b=O[gb]=N;X("create",b,b.create);X("remove",b,b.remove);X("getByName",b,b.j,5);X("getAll",b,b.getAll,6);b=pc.prototype;X("get",b,b.get,7);X("set",b,b.set,4);X("send",b,b.send);b=Ya.prototype;X("get",b,b.get);X("set",b,b.set);if(!Ud()&&!Ba){a:{for(var b=M.getElementsByTagName("script"),c=0;c<b.length&&100>c;c++){var d=b[c].src;if(d&&0==d.indexOf("https://www.google-analytics.com/analytics")){J(33);b=!0;break a}}b=
!1}b&&(Ba=!0)}Ud()||Ba||!Ed(new Od)||(J(36),Ba=!0);(O.gaplugins=O.gaplugins||{}).Linker=Dc;b=Dc.prototype;Yd.set("linker",Dc);X("decorate",b,b.ca,20);X("autoLink",b,b.S,25);Yd.set("displayfeatures",fd);Yd.set("adfeatures",fd);a=a&&a.q;ka(a)?Z.D.apply(N,a):J(50)}};N.da=function(){for(var a=N.getAll(),b=0;b<a.length;b++)a[b].get(V)};
(function(){var a=N.N;if(!rc(a)){J(16);var b=!1,c=function(){if(!b&&rc(a)){b=!0;var d=c,e=M;e.removeEventListener?e.removeEventListener("visibilitychange",d,!1):e.detachEvent&&e.detachEvent("onvisibilitychange",d)}};L(M,"visibilitychange",c)}})();function La(a){var b=1,c=0,d;if(a)for(b=0,d=a.length-1;0<=d;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=0!=c?b^c>>21:b;return b};})(window);

BIN
static/SkaterPath_files/blackbox.jpg View File

Before After
Width: 1200  |  Height: 900  |  Size: 466 KiB

+ 465
- 0
static/SkaterPath_files/bootstrap-expo.css
File diff suppressed because it is too large
View File


BIN
static/SkaterPath_files/creative-tim-presentation.jpg View File

Before After
Width: 1200  |  Height: 900  |  Size: 934 KiB

BIN
static/SkaterPath_files/crit-research.jpg View File

Before After
Width: 1200  |  Height: 900  |  Size: 1.2 MiB

+ 5
- 0
static/SkaterPath_files/jquery-1.11.3.min.js
File diff suppressed because it is too large
View File


BIN
static/SkaterPath_files/lyft.jpg View File

Before After
Width: 1200  |  Height: 900  |  Size: 586 KiB

+ 26
- 0
static/SkaterPath_files/main.css View File

@@ -0,0 +1,26 @@
.addressInput{
margin-bottom: 10px;
}


#pathInput{
margin-top: 20px;
}

.smallTopMargin{
margin-top: 10px;
}


#feedbackPanel{
margin-top: 30px;
}


#submitButton{
margin-top: 30px;
}

.text_button{
$(".text_button").disabled = true;
}

+ 358
- 0
static/SkaterPath_files/script.js View File

@@ -0,0 +1,358 @@

$(document).ready(function(){
$("#feedbackPanel").hide();
});

document.getElementById("searchButton").addEventListener("click", function(){
console.log("searchButton");
$("#searchButton").addClass("active");
$("#feedbackButton").removeClass();
$("#feedbackPanel").hide();
$("#pathInput").show();
});




function setMapViewBounds(map){
var bbox = new H.geo.Rect(37.8750,-122.2600 ,37.8675, -122.2585);
map.setViewBounds(bbox);
}


function addMarkersToMap(map, lat, lng) {
var Marker = new H.map.Marker({lat:lat, lng:lng});
map.addObject(Marker);
}


function onResult(result) {
//TODO: Check if view is empty before accessing; display error message/empty return if empty
var locations = result.response.view[0].result;
addLocationsToMap(locations);
}

/*
* Boilerplate map initialization code starts below:*/

//Step 1: initialize communication with the platform
var platform = new H.service.Platform({
app_id: 'JJi3EJfcCSqAXMniWrE7',
app_code: 'LWcyk9S8poGNtF1Kgrdh0g',
useCIT: true,
useHTTPS: true
});
var defaultLayers = platform.createDefaultLayers();

//Step 2: initialize a map - not specificing a location will give a whole world view.
var map = new H.Map(document.getElementById('map'),
defaultLayers.normal.map);

//Step 3: make the map interactive
// MapEvents enables the event system
// Behavior implements default interactions for pan/zoom (also on mobile touch environments)
var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
var coords = [];
var x;
var y;
var num_marker = 0;
var route_counter = 0;
var score;

$.ajaxSetup({async: false});
map.addEventListener('dbltap', function(evt) {
// Log 'tap' and 'mouse' events:
if (num_marker == 2) {
return ;
}
console.log(evt.type, evt.currentPointer);
x = evt.currentPointer.viewportX;
y = evt.currentPointer.viewportY;
var pt = map.screenToGeo(x, y);
console.log(pt);
coords.push(pt);
addMarkersToMap(map, pt.lat, pt.lng);
num_marker +=1;
if(num_marker ==1){
coordToAddress(pt);
}
if (num_marker == 2) {
calculateRouteFromAtoB(platform);
}

});


map.addEventListener('longpress', function(evt) {
// Log 'tap' and 'mouse' events:
x = evt.currentPointer.viewportX;
y = evt.currentPointer.viewportY;
var pt = map.screenToGeo(x, y);
var icon = new H.map.Icon("http://127.0.0.1:8000/media/danger.png"),
marker = new H.map.Marker({lat:pt.lat,lng:pt.lng}, {icon: icon});

map.addObject(marker);

});
//Routing algorithm
function calculateRouteFromAtoB (platform) {
var router = platform.getRoutingService(),
routeRequestParams = {
mode: 'shortest;pedestrian',
representation: 'display',
waypoint0: coords[2*route_counter].lat+","+coords[2*route_counter].lng, // St Paul's Cathedral
waypoint1: coords[2*route_counter+1].lat+","+coords[2*route_counter+1].lng, // Tate Modern
routeattributes: 'waypoints,summary,shape,legs',
maneuverattributes: 'direction,action'
};


router.calculateRoute(
routeRequestParams,
onSuccess,
onError
);
}

function updateTextArea(id,addressAsString){
if(markerCount%2==1){
document.getElementById("start_add").value=addressAsString;
}else if(markerCount%2 ==0){
document.getElementById("end_add").value=addressAsString;
}
}


// Get an instance of the geocoding service:
var geocoder = platform.getGeocodingService();

function coordToAddress(point){
// Create the parameters for the reverse geocoding request:
var pointString = "" + point.lat + "," + point.lng + "," + 100;
var reverseGeocodingParameters = {
prox: pointString,
mode: 'retrieveAddresses',
maxresults: 1,
jsonattributes: 1
};
geocoder.reverseGeocode(
reverseGeocodingParameters,
onReverseSuccess,
onError);
}

//reverse Geo
var addressAsString;
var markerCount = 0;

// Define a callback function to process the response:
function onReverseSuccess(result) {
//Check if view contains anything
if(result.response.view.length > 0){
var location = result.response.view[0].result[0];
addressAsString = location.location.address.label;
console.log("Address just found: ", addressAsString);
markerCount++;
//TODO: Add address to start address action form here
if(markerCount%2==1){
document.getElementById("start_add").value=addressAsString;
}else if(markerCount%2 ==0){
document.getElementById("end_add").value=addressAsString;
}
}
};

function onSuccess(result) {
var route = result.response.route[0];
/*
* The styling of the route response on the map is entirely under the developer's control.
* A representitive styling can be found the full JS + HTML code of this example
* in the functions below:
*/
addRouteShapeToMap(route);
}

function onError(error) {
alert('Ooops!');
}

function addRouteShapeToMap(route){
routeShape = route.shape;
var pointsArray = [];
routeShape.forEach(function(point) {
var parts = point.split(',');
pointsArray.push({"lat": parts[0], "lng": parts[1]});
});
createPolyline(pointsArray);

// Add the polyline to the map
//map.addObject(polyline);
// And zoom to its bounding rectangle
//map.setViewBounds(polyline.getBounds(), true);
}

function createPolyline (pointsArray){
var input_for_get = [];
for (i = 0 ; i < pointsArray.length - 1; i++) {
input_for_get.push(pointsArray[i].lat);
input_for_get.push(pointsArray[i].lng);
input_for_get.push(pointsArray[i + 1].lat);
input_for_get.push(pointsArray[i + 1].lng);
}
var input_obj = {dict:input_for_get};
$.post("/maps/get/", input_obj)
.done (function (data) {
postProcess(data, input_for_get);
});
}

function postProcess(data, input_for_get) {
data = JSON.parse(data);
for (i = 0; i < data.length; i +=1) {
var color;
var strip = new H.geo.Strip();
strip.pushLatLngAlt(input_for_get[4*i], input_for_get[4*i+1]);
strip.pushLatLngAlt(input_for_get[4*i+2], input_for_get[4*i+3]);
if (data[i] == -1) {
color = 'gray';
} else if (data[i] <3) {
color = 'red';
} else if (data[i] < 7) {
color = 'yellow';
} else {
color = 'green';
}
drawLine(strip, color);
}
}

function drawLine(strip, color) {
var polyline = new H.map.Polyline(strip, {
style: {
lineWidth: 8,
strokeColor: color
}
});
polyline.addEventListener('tap', function(evt){
//Change color of polyline segment
strip = evt.target.getStrip();
var newPolyline = new H.map.Polyline(strip, {
style: {
lineWidth: 8,
strokeColor: 'rgba(128,0,255,0.7)'
}
});
var rating = prompt("How smooth is this road? Rate 1 - 10","");
if (rating <1 || rating > 10) {
rating = prompt("Plese enter a value between 1 and 10!")
}

var tempStrip = newPolyline.getStrip().Oa;
score = {a: [tempStrip[0], tempStrip[1]], b: [tempStrip[3], tempStrip[4]] , rating:rating};
map.addObject(newPolyline);
map.removeObject(evt.target);
$.post("/maps/report/", score);
});
map.addObject(polyline);
}

// Create the default UI components


// Now use the map as required...
// geocode(platform);
//map part js code




document.getElementById('submit').addEventListener('click',function(){
if(document.getElementById("start_add").value!="" && document.getElementById("end_add").value!=""){
var start_add = document.getElementById("start_add").value;
var end_add = document.getElementById("end_add").value;
DrawMarkOnMap(start_add,platform);
DrawMarkOnMap(end_add,platform);

}else{
alert("Please input valid information");
$("#start_add").val(' ');
$("#end_add").val(' ');
}
});


function addLocationsToMap(locations){
var group = new H.map.Group(),
position,
i;

// Add a marker for each location found
for (i = 0; i < locations.length; i += 1) {
position = {
lat: locations[i].location.displayPosition.latitude,
lng: locations[i].location.displayPosition.longitude
};

coords.push(position);
num_marker +=1;
marker = new H.map.Marker(position);
marker.label = locations[i].location.address.label;
group.addObject(marker);
if(num_marker==2){
calculateRouteFromAtoB(platform);
route_counter +=1;
}
}

group.addEventListener('tap', function (evt) {
map.setCenter(evt.target.getPosition());
openBubble(
evt.target.getPosition(), evt.target.label);
}, false);

// Add the locations group to the map
map.addObject(group);
map.setCenter(group.getBounds().getCenter());
}

function DrawMarkOnMap(address,platform){
var geocodingParameters = {
//Initialize with address from text field
searchText:address,
jsonattributes : 1
};
geocode(platform,geocodingParameters);
}




function geocode(platform, geoparameter) {
var geocoder = platform.getGeocodingService();
geocoder.geocode(
geoparameter,
onAddressResult,
onError
);
}

function onAddressResult(result) {
//TODO: Check if view is empty before accessing; display error message/empty return if empty
if(result.response.view.length > 0){
var locations = result.response.view[0].result;

addLocationsToMap(locations);


}
}

var ui = H.ui.UI.createDefault(map, defaultLayers);
setMapViewBounds(map);

+ 293
- 0
static/SkaterPath_files/script_slow.js View File

@@ -0,0 +1,293 @@

$(document).ready(function(){
$("#feedbackPanel").hide();
});

document.getElementById("searchButton").addEventListener("click", function(){
console.log("searchButton");
$("#searchButton").addClass("active");
$("#feedbackButton").removeClass();
$("#feedbackPanel").hide();
$("#pathInput").show();
});

document.getElementById("feedbackButton").addEventListener("click", function(){
console.log("feeedbackButton");
$("#feedbackButton").addClass("active");
$("#searchButton").removeClass();
$("#feedbackPanel").show();
$("#pathInput").hide();
});



function setMapViewBounds(map){
var bbox = new H.geo.Rect(37.8750,-122.2600 ,37.8675, -122.2585);
map.setViewBounds(bbox);
}


function addMarkersToMap(map, lat, lng) {
var Marker = new H.map.Marker({lat:lat, lng:lng});
map.addObject(Marker);
}


function onResult(result) {
//TODO: Check if view is empty before accessing; display error message/empty return if empty
var locations = result.response.view[0].result;
addLocationsToMap(locations);
}

/*
* Boilerplate map initialization code starts below:*/

//Step 1: initialize communication with the platform
var platform = new H.service.Platform({
app_id: 'JJi3EJfcCSqAXMniWrE7',
app_code: 'LWcyk9S8poGNtF1Kgrdh0g',
useCIT: true,
useHTTPS: true
});
var defaultLayers = platform.createDefaultLayers();

//Step 2: initialize a map - not specificing a location will give a whole world view.
var map = new H.Map(document.getElementById('map'),
defaultLayers.normal.map);

//Step 3: make the map interactive
// MapEvents enables the event system
// Behavior implements default interactions for pan/zoom (also on mobile touch environments)
var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
var coords = [];
var x;
var y;
var num_marker = 0;
var route_counter = 0;
var score;

$.ajaxSetup({async: false});
map.addEventListener('dbltap', function(evt) {
// Log 'tap' and 'mouse' events:
console.log(evt.type, evt.currentPointer);
x = evt.currentPointer.viewportX;
y = evt.currentPointer.viewportY;
var pt = map.screenToGeo(x, y);
console.log(pt);
coords.push(pt);
addMarkersToMap(map, pt.lat, pt.lng);
num_marker +=1;
if (num_marker ==2) {
calculateRouteFromAtoB(platform);
route_counter +=1;
}

});

//Routing algorithm
function calculateRouteFromAtoB (platform) {
var router = platform.getRoutingService(),
routeRequestParams = {
mode: 'shortest;pedestrian',
representation: 'display',
waypoint0: coords[2*route_counter].lat+","+coords[2*route_counter].lng, // St Paul's Cathedral
waypoint1: coords[2*route_counter+1].lat+","+coords[2*route_counter+1].lng, // Tate Modern
routeattributes: 'waypoints,summary,shape,legs',
maneuverattributes: 'direction,action'
};


router.calculateRoute(
routeRequestParams,
onSuccess,
onError
);
}

function onSuccess(result) {
var route = result.response.route[0];
console.log(route);
/*
* The styling of the route response on the map is entirely under the developer's control.
* A representitive styling can be found the full JS + HTML code of this example
* in the functions below:
*/
addRouteShapeToMap(route);
}

function onError(error) {
alert('Ooops!');
}

function addRouteShapeToMap(route){
routeShape = route.shape;
var pointsArray = [];
routeShape.forEach(function(point) {
var parts = point.split(',');
pointsArray.push({"lat": parts[0], "lng": parts[1]});
});
createPolyline(pointsArray, 0);

// Add the polyline to the map
//map.addObject(polyline);
// And zoom to its bounding rectangle
//map.setViewBounds(polyline.getBounds(), true);
}

function createPolyline (pointsArray, i){
var strip = new H.geo.Strip();
var color;
if (i == pointsArray.length - 1) {
return;
}
strip.pushLatLngAlt(pointsArray[i].lat, pointsArray[i].lng);
strip.pushLatLngAlt(pointsArray[i+1].lat, pointsArray[i+1].lng);
console.log(strip);
$.post("/maps/get_slow/", {lat1:pointsArray[i].lat, lng1:pointsArray[i].lng, lat2:pointsArray[i+1].lat, lng2:pointsArray[i+1].lng})
.done (function (data) {
console.log(data);
if (data == -1) {
color = "gray";
} else if (data < 3) {
color = "red";
} else if (data <7) {
color = "yellow";
} else {
color = "green";
}
drawLine(strip, color);
createPolyline(pointsArray, i + 1);
return;
});

}

function drawLine(strip, color) {
var polyline = new H.map.Polyline(strip, {
style: {
lineWidth: 8,
strokeColor: color
}
});
console.log(polyline);
polyline.addEventListener('tap', function(evt){
console.log(evt.type, evt.currentPointer.type);
//Change color of polyline segment
strip = evt.target.getStrip();
console.log(strip);
var newPolyline = new H.map.Polyline(strip, {
style: {
lineWidth: 8,
strokeColor: 'rgba(128,0,255,0.7)'
}
});
var rating = prompt("How smooth is this road? Rate 1 - 10","");
var tempStrip = newPolyline.getStrip().Oa;
score = {a: [tempStrip[0], tempStrip[1]], b: [tempStrip[3], tempStrip[4]] , rating:rating};
map.addObject(newPolyline);
console.log(score);
map.removeObject(evt.target);
$.post("/maps/report/", score);
});
map.addObject(polyline);
}

// Create the default UI components


// Now use the map as required...
// geocode(platform);
//map part js code




document.getElementById('submit').addEventListener('click',function(){
if(document.getElementById("start_add").value!="" && document.getElementById("end_add").value!=""){
var start_add = document.getElementById("start_add").value;
var end_add = document.getElementById("end_add").value;
DrawMarkOnMap(start_add,platform);
DrawMarkOnMap(end_add,platform);

}else{
alert("Please input valid information");
$("#start_add").val(' ');
$("#end_add").val(' ');
}
});


function addLocationsToMap(locations){
var group = new H.map.Group(),
position,
i;

// Add a marker for each location found
for (i = 0; i < locations.length; i += 1) {
position = {
lat: locations[i].location.displayPosition.latitude,
lng: locations[i].location.displayPosition.longitude
};

coords.push(position);
num_marker +=1;
marker = new H.map.Marker(position);
marker.label = locations[i].location.address.label;
group.addObject(marker);
if(num_marker==2){
calculateRouteFromAtoB(platform);
route_counter +=1;
}
}

group.addEventListener('tap', function (evt) {
map.setCenter(evt.target.getPosition());
openBubble(
evt.target.getPosition(), evt.target.label);
}, false);

// Add the locations group to the map
map.addObject(group);
map.setCenter(group.getBounds().getCenter());
}

function DrawMarkOnMap(address,platform){
var geocodingParameters = {
//Initialize with address from text field
searchText:address,
jsonattributes : 1
};
geocode(platform,geocodingParameters);
}




function geocode(platform, geoparameter) {
var geocoder = platform.getGeocodingService();
geocoder.geocode(
geoparameter,
onAddressResult,
onError
);
}

function onAddressResult(result) {
//TODO: Check if view is empty before accessing; display error message/empty return if empty
if(result.response.view.length > 0){
var locations = result.response.view[0].result;

addLocationsToMap(locations);


}
}

var ui = H.ui.UI.createDefault(map, defaultLayers);
setMapViewBounds(map);

+ 1
- 0
static/SkaterPath_files/track.js View File

@@ -0,0 +1 @@
var _gauges=_gauges||[];(function(){var h=(_gauges['slice'])?_gauges.slice(0):[];_gauges={track_referrer:true,image:new Image(),track:function(){this.setCookie('_gauges_cookie',1,1);var a=this.url();if(a){this.image.src=a;var b=60*60,d=b*24,c=d*31,f=d*365,i=f*10;if(!this.getCookie('_gauges_unique_hour')){this.setCookie('_gauges_unique_hour',1,b)}if(!this.getCookie('_gauges_unique_day')){this.setCookie('_gauges_unique_day',1,d)}if(!this.getCookie('_gauges_unique_month')){this.setCookie('_gauges_unique_month',1,c)}if(!this.getCookie('_gauges_unique_year')){this.setCookie('_gauges_unique_year',1,f)}if(!this.getCookie('_gauges_unique')){this.setCookie('_gauges_unique',1,i)}}},push:function(a){var b=a.shift();if(b=='track'){_gauges.track()}},url:function(){var a,b,d,c=this.$('gauges-tracker');if(c){b=c.getAttribute('data-site-id');d=c.getAttribute('data-track-path');if(!d){d=c.src.replace('/track.js','/track.gif')}a=String(d);a+="?h[site_id]="+b;a+="&h[resource]="+this.resource();a+="&h[referrer]="+this.referrer();a+="&h[title]="+this.title();a+="&h[user_agent]="+this.agent();a+="&h[unique]="+this.unique();a+="&h[unique_hour]="+this.uniqueHour();a+="&h[unique_day]="+this.uniqueDay();a+="&h[unique_month]="+this.uniqueMonth();a+="&h[unique_year]="+this.uniqueYear();a+="&h[screenx]="+this.screenWidth();a+="&h[browserx]="+this.browserWidth();a+="&h[browsery]="+this.browserHeight();a+="&timestamp="+this.timestamp()}return a},domain:function(){return window.location.hostname},referrer:function(){var a='';if(!this.track_referrer){return a}this.track_referrer=false;try{a=top.document.referrer}catch(e1){try{a=parent.document.referrer}catch(e2){a=''}}if(a==''){a=document.referrer}return this.escape(a)},agent:function(){return this.escape(navigator.userAgent)},escape:function(a){return(typeof(encodeURIComponent)=='function')?encodeURIComponent(a):escape(a)},resource:function(){return this.escape(document.location.href)},timestamp:function(){return new Date().getTime()},title:function(){return(document.title&&document.title!="")?this.escape(document.title):''},uniqueHour:function(){if(!this.getCookie('_gauges_cookie')){return 0}return this.getCookie('_gauges_unique_hour')?0:1},uniqueDay:function(){if(!this.getCookie('_gauges_cookie')){return 0}return this.getCookie('_gauges_unique_day')?0:1},uniqueMonth:function(){if(!this.getCookie('_gauges_cookie')){return 0}return this.getCookie('_gauges_unique_month')?0:1},uniqueYear:function(){if(!this.getCookie('_gauges_cookie')){return 0}return this.getCookie('_gauges_unique_year')?0:1},unique:function(){if(!this.getCookie('_gauges_cookie')){return 0}return this.getCookie('_gauges_unique')?0:1},screenWidth:function(){try{return screen.width}catch(e){return 0}},browserDimensions:function(){var a=0,b=0;try{if(typeof(window.innerWidth)=='number'){a=window.innerWidth;b=window.innerHeight}else if(document.documentElement&&document.documentElement.clientWidth){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else if(document.body&&document.body.clientWidth){a=document.body.clientWidth;b=document.body.clientHeight}}catch(e){}return{width:a,height:b}},browserWidth:function(){return this.browserDimensions().width},browserHeight:function(){return this.browserDimensions().height},$:function(a){if(document.getElementById){return document.getElementById(a)}return null},setCookie:function(a,b,d){var c,f;b=escape(b);if(d){c=new Date();c.setTime(c.getTime()+(d*1000));f='; expires='+c.toGMTString()}else{f=''}document.cookie=a+"="+b+f+"; path=/"},getCookie:function(a){var b=a+"=",d=document.cookie.split(';');for(var c=0;c<d.length;c++){var f=d[c];while(f.charAt(0)==' '){f=f.substring(1,f.length)}if(f.indexOf(b)==0){return unescape(f.substring(b.length,f.length))}}return null}};_gauges.track();for(var g=0,j=h.length;g<j;g++){_gauges.push(h[g])}})();

BIN
static/bg.jpg View File

Before After
Width: 2400  |  Height: 1600  |  Size: 864 KiB

+ 587
- 0
static/bootstrap/css/bootstrap-theme.css View File

@@ -0,0 +1,587 @@
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
text-shadow: none;
}
.btn:active,
.btn.active {
background-image: none;
}
.btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px;
}
.btn-default:active,
.btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #e0e0e0;
background-image: none;
}
.btn-primary {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #245580;
}
.btn-primary:hover,
.btn-primary:focus {
background-color: #265a88;
background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
background-color: #265a88;
border-color: #245580;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #265a88;
background-image: none;
}
.btn-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
background-color: #419641;
background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
background-color: #419641;
border-color: #3e8f3e;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #419641;
background-image: none;
}
.btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
background-color: #2aabd2;
background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
background-color: #2aabd2;
border-color: #28a4c9;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #2aabd2;
background-image: none;
}
.btn-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
background-color: #eb9316;
background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
background-color: #eb9316;
border-color: #e38d13;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #eb9316;
background-image: none;
}
.btn-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
background-color: #c12e2a;
background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
background-color: #c12e2a;
border-color: #b92c28;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #c12e2a;
background-image: none;
}
.thumbnail,
.img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
background-color: #e8e8e8;
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #2e6da4;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.navbar-default {
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.navbar-inverse {
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
@media (max-width: 767px) {
.navbar .navbar-nav .open .dropdown-menu > .active > a,
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
}
.alert {
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}
.alert-success {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
background-repeat: repeat-x;
border-color: #b2dba1;
}
.alert-info {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
background-repeat: repeat-x;
border-color: #9acfea;
}
.alert-warning {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
background-repeat: repeat-x;
border-color: #f5e79e;
}
.alert-danger {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
background-repeat: repeat-x;
border-color: #dca7a7;
}
.progress {
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);