From 969bee9771f5b02b9930b4e3d8490a707b1817cd Mon Sep 17 00:00:00 2001 From: Akshen Date: Tue, 22 May 2018 12:08:30 +0530 Subject: Update India Map layout in Stats - Removes other countries views - Adds forgot password button - opens about-us in new tab - adds coordinator institute column in proposed workshops view of instructor --- static/workshop_app/css/slick-theme.css | 202 +++++++++++++++++ .../statistics_app/workshop_public_stats.html | 6 +- .../templates/statistics_app/workshop_stats.html | 5 +- statistics_app/views.py | 20 ++ workshop_app/static/workshop_app/css/new_index.css | 250 --------------------- workshop_app/templates/workshop_app/index.html | 2 +- workshop_app/templates/workshop_app/login.html | 13 +- .../templates/workshop_app/my_workshops.html | 6 +- workshop_app/templates/workshop_app/new_index.html | 166 -------------- .../workshop_app/view_workshoptype_details.html | 2 +- .../workshop_app/view_workshoptype_list.html | 2 +- 11 files changed, 243 insertions(+), 431 deletions(-) create mode 100644 static/workshop_app/css/slick-theme.css delete mode 100644 workshop_app/static/workshop_app/css/new_index.css delete mode 100644 workshop_app/templates/workshop_app/new_index.html diff --git a/static/workshop_app/css/slick-theme.css b/static/workshop_app/css/slick-theme.css new file mode 100644 index 0000000..46c87bf --- /dev/null +++ b/static/workshop_app/css/slick-theme.css @@ -0,0 +1,202 @@ +@charset 'UTF-8'; +/* Slider */ +.slick-loading .slick-list +{ + background: #fff url('./ajax-loader.gif') center center no-repeat; +} + +/* Icons */ +@font-face +{ + font-family: 'slick'; + font-weight: normal; + font-style: normal; + + src: url('./fonts/slick.eot'); + src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg'); +} +/* Arrows */ +.slick-prev, +.slick-next +{ + font-size: 0; + line-height: 0; + + position: absolute; + top: 50%; + + display: block; + + width: 30px; + height: 35px; + padding: 0; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); + + cursor: pointer; + border: none; + outline: none; + +} +.slick-prev:hover, +.slick-prev:focus, +.slick-next:hover, +.slick-next:focus +{ + color: orange; + outline: none; + background: white; +} +.slick-prev:hover:before, +.slick-prev:focus:before, +.slick-next:hover:before, +.slick-next:focus:before +{ + opacity: 1; +} +.slick-prev.slick-disabled:before, +.slick-next.slick-disabled:before +{ + opacity: .25; +} + +.slick-prev:before, +.slick-next:before +{ + font-family: 'slick'; + font-size: 40px; + line-height: 1; + + opacity: 3; + color: ; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.slick-prev +{ + left: -25px; +} +[dir='rtl'] .slick-prev +{ + right: -25px; + left: auto; +} +.slick-prev:before +{ + content: '<'; +} +[dir='rtl'] .slick-prev:before +{ + content: '>'; +} + +.slick-next +{ + right: -25px; +} +[dir='rtl'] .slick-next +{ + right: auto; + left: -25px; +} +.slick-next:before +{ + content: '>'; +} +[dir='rtl'] .slick-next:before +{ + content: '<'; +} + +/* Dots */ +.slick-dotted.slick-slider +{ + margin-bottom: 30px; +} + +.slick-dots +{ + position: absolute; + bottom: -25px; + + display: block; + + width: 100%; + padding: 0; + margin: 0; + + list-style: none; + + text-align: center; +} +.slick-dots li +{ + position: relative; + + display: inline-block; + + width: 20px; + height: 20px; + margin: 0 5px; + padding: 0; + + cursor: pointer; +} +.slick-dots li button +{ + font-size: 0; + line-height: 0; + + display: block; + + width: 20px; + height: 20px; + padding: 5px; + + cursor: pointer; + + color: transparent; + border: 0; + outline: none; + background: transparent; +} +.slick-dots li button:hover, +.slick-dots li button:focus +{ + outline: none; +} +.slick-dots li button:hover:before, +.slick-dots li button:focus:before +{ + opacity: 1; +} +.slick-dots li button:before +{ + font-family: 'slick'; + font-size: 6px; + line-height: 20px; + + position: absolute; + top: 0; + left: 0; + + width: 20px; + height: 20px; + + content: '•'; + text-align: center; + + opacity: .25; + color: black; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.slick-dots li.slick-active button:before +{ + opacity: .75; + color: black; +} diff --git a/statistics_app/templates/statistics_app/workshop_public_stats.html b/statistics_app/templates/statistics_app/workshop_public_stats.html index 486c154..78f965a 100644 --- a/statistics_app/templates/statistics_app/workshop_public_stats.html +++ b/statistics_app/templates/statistics_app/workshop_public_stats.html @@ -323,7 +323,8 @@ domain: 'IN', displayMode: 'regions', resolution: 'provinces', - colorAxis: {colors: ['lightyellow','orange']}, + datalessRegionColor: 'transparent', + colorAxis: {colors: ['#e6e6e6','#ff8b3e']}, }; @@ -347,7 +348,8 @@
diff --git a/statistics_app/templates/statistics_app/workshop_stats.html b/statistics_app/templates/statistics_app/workshop_stats.html index 3bfce07..f52a0e0 100644 --- a/statistics_app/templates/statistics_app/workshop_stats.html +++ b/statistics_app/templates/statistics_app/workshop_stats.html @@ -335,7 +335,8 @@ domain: 'IN', displayMode: 'regions', resolution: 'provinces', - colorAxis: {colors: ['lightyellow', 'orange']}, + datalessRegionColor: 'transparent', + colorAxis: {colors: ['#e6e6e6', '#ff8b3e']}, legend: {position: 'top'}, }; @@ -358,7 +359,7 @@
diff --git a/statistics_app/views.py b/statistics_app/views.py index 0f3af78..1c13d60 100644 --- a/statistics_app/views.py +++ b/statistics_app/views.py @@ -443,11 +443,31 @@ def workshop_public_stats(request): except BaseException: messages.info(request, 'Please enter Valid Dates') + else: + '''Default Data''' + workshop_list = [] + + proposed_workshops = ProposeWorkshopDate.objects.filter( + status='ACCEPTED') + + # Fetches Accepted workshops which were Accepted by + # Instructors based on their Availability + requested_workshops = RequestedWorkshop.objects.filter( + status='ACCEPTED') + + for workshop in proposed_workshops: + workshop_list.append(workshop) + + for workshop in requested_workshops: + workshop_list.append(workshop) + + return render(request, 'statistics_app/workshop_public_stats.html', { "workshoptype_list": workshoptype_list[::-1], "workshoptype_count": workshoptype_count, + "workshop_list": workshop_list, "india_map": states}) diff --git a/workshop_app/static/workshop_app/css/new_index.css b/workshop_app/static/workshop_app/css/new_index.css deleted file mode 100644 index f194ec2..0000000 --- a/workshop_app/static/workshop_app/css/new_index.css +++ /dev/null @@ -1,250 +0,0 @@ -/* Responsive layout - when the screen is less than 800px wide, make the two columns stack on top of each other instead of next to each other */ -@media screen and (max-width: 800px) { - .leftcolumn, .rightcolumn { - width: 100%; - padding: 0; - - }, - -} - -ul.topnav { - list-style-type: none; - margin: 20px; - padding: 0; - overflow: hidden; -} - -ul.topnav li {float: right;} - -ul.topnav li a { - display: block; - color: black; - text-align: center; - padding: 14px 16px; - text-decoration: none; -} - -ul.topnav li a:hover:not(.active) { - background-color: #3bb1d1; - color:white; - padding: 14px 16px; -} - -ul.topnav li.right {float: right;} - -@media screen and (max-width: 600px){ - ul.topnav li.right, - ul.topnav li {float: none;} -} - -/**/ -.container { - width: 100%; - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); - align-content: center; -} - -.row { - width: 100%; - margin: auto; - align-content: center; - -} - -@font-face { - font-family: aaragh; - src: url("../font/Aaargh.ttf"); - -} - - -#r1_c1 -{ - font-family: aaragh, Helvetica, Arial, sans-serif; - font-size: 30px; - background-image: url("../img/hd_bg.png"); - background-repeat: no-repeat; - background-position: bottom; - padding-top: 15px; - padding-bottom: 15px; - padding-left: 10%; -} - - -.rslides { - position: relative; - list-style: none; - overflow: hidden; - padding: 0; - margin: 0; - width: 10px; - } - -.rslides li { - -webkit-backface-visibility: hidden; - position: absolute; - display: none; - left: 0; - top: 0; - } - -.rslides li:first-child { - position: relative; - display: block; - float: left; - } - -.rslides img { - display: block; - float: left; - border: 0; - width: 100%; - } - -#r2_c1 { - margin: auto; - width: 100%; -} - -#r2_c2 { - padding-top: 15px; - width: 100%; -} - -#r3 { - text-align: center; - color: white; - background: linear-gradient(135deg , #2c5aa0,#2c5aa0 30%, #3bb1d1 ); - padding-bottom: 25px; - margin-top: 15px; - font-family: aaragh, Arial, sans-serif; -} - - - -#r5 { - width: 100%; -} - -#r5_c1 { - text-align: center; - font-size: 2vw; - font-family: aaragh, Arial, sans-serif; - margin-top: 10px; - -} - -#r5_c2 { - font-family: aaragh, Arial, sans-serif; - -} - -#r5_c3 { - padding-top: 15px; -} - -#r6 { - padding: 35px; - margin-top: 15px; - width: 100%; - background: linear-gradient(135deg , #2c5aa0,#2c5aa0 30%, #3bb1d1 ); - -} - -#r6_c2 { - text-align: center; - font-family: aaragh; - color: white; -} - -.tslides { - position: relative; - list-style: none; - overflow: hidden; - padding: 0; - margin: 0; - width: 10px; - } - -.tslides li { - -webkit-backface-visibility: hidden; - position: absolute; - display: none; - left: 0; - top: 0; - text-align: center; - } - -.tslides li:first-child { - position: relative; - display: block; - text-align: center; - } - - -#r8 { - background: #c8c5b6; - margin-top: 15px; - padding-right: 20px; - padding-left: 20px; - width: 100%; -} - - - -#r8_c2 { - font-size: 16px; - font-family: aaragh; - text-align: center; -} - -#social { - float: right; - -} -#r8_c4 { - text-align: center; - font-size: 12px; - width: 100%; - font-family: aaragh; -} - -hr { - background-color: black; -} - -/* Style all font awesome icons */ -.fa { - padding: 6px; - font-size: 30px; - width: 30px; - text-align: center; - text-decoration: none; -} - -/* Add a hover effect if you want */ -.fa:hover { - opacity: 0.7; -} - -/* Facebook */ -.fa-facebook { - background: #3B5998; - color: white; - -} -/* Google */ -.fa-google { - background: #dd4b39; - color: white; -} -/* Youtube */ -.fa-youtube { - background: #bb0000; - color: white; -} - -#social a{ - color: white; -} diff --git a/workshop_app/templates/workshop_app/index.html b/workshop_app/templates/workshop_app/index.html index d5e95c3..a2e8966 100644 --- a/workshop_app/templates/workshop_app/index.html +++ b/workshop_app/templates/workshop_app/index.html @@ -67,7 +67,7 @@ $(document).ready(function(){
{% else %} @@ -213,7 +213,7 @@ {% if request.user.profile.position == 'instructor' %} Coordinator Name - Coordinator Institute Name + Institute {% else %} Instructor Name {% endif %} @@ -296,6 +296,7 @@ {% if request.user.profile.position == 'instructor' %} Coordinator Name + Institute {% else %} {% endif %} @@ -311,6 +312,7 @@ {% if workshop.status == 'Pending' and workshop.condition_one %} {% if request.user.profile.position == 'instructor' %} {{ workshop.proposed_workshop_coordinator.get_full_name }} + {{ workshop.proposed_workshop_coordinator.profile.institute }} {% endif %} {{ workshop.proposed_workshop_title }} {{ workshop.proposed_workshop_date | date }} diff --git a/workshop_app/templates/workshop_app/new_index.html b/workshop_app/templates/workshop_app/new_index.html deleted file mode 100644 index 4603ac7..0000000 --- a/workshop_app/templates/workshop_app/new_index.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Welcome - - - - - - - -
-
- FOSSEE Python Workshop -
-
- -
-
- -
-
- - - - - - - -
- -
- -
-
- -
-

6000+
Students Trained
-

100+
Colleges -
-

27 hours of
Workshop Material
-
- - -
-
-
- -
-
-
- -
-
-
- -
-
- -
-
FOSSEE Python Workshop Advantage -
- -


-
Learn Python for Free,
-
Many exercises/practice problems

-
Instructor support for your queries during workshop(s)

-
Get e-certificate
- -
- -
-
- -
- -
-
  • {{ testimonials.0.message }}

    - ~ {{testimonials.0.name}} ~
    - {{testimonials.0.institute}}
  • -
  • {{testimonials.4.message}}

    - ~ {{testimonials.4.name}} ~
    - {{testimonials.4.institute}}
  • -
  • {{testimonials.3.message}}

    - ~ {{testimonials.3.name}} ~
    - {{testimonials.3.institute}}
  • -
    - -
    - -
    - -
    - -
    - -
    -

    - -
    - -
    -

    - FOSSEE, - IIT-Bombay
    Mumbai, India
    - Phone: (+91) 22 2576 4133
    - Email: workshops[at]fossee[dot]in -
    - -
    -
    -

    -   -   - -
    -
    - -
    -
    - The FOSSEE project is funded by the National Mission on Education through ICT, MHRD, Government of India.
    - This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License - -
    -
    - - - diff --git a/workshop_app/templates/workshop_app/view_workshoptype_details.html b/workshop_app/templates/workshop_app/view_workshoptype_details.html index 337595a..e488561 100644 --- a/workshop_app/templates/workshop_app/view_workshoptype_details.html +++ b/workshop_app/templates/workshop_app/view_workshoptype_details.html @@ -17,7 +17,7 @@
  • Create Workshop
  • Workshop List
  • My Workshops
  • -
  • Workshop Stats
  • +
  • Workshop Stats
  • Profile Stats
  • diff --git a/workshop_app/templates/workshop_app/view_workshoptype_list.html b/workshop_app/templates/workshop_app/view_workshoptype_list.html index 019fa8b..10d4351 100644 --- a/workshop_app/templates/workshop_app/view_workshoptype_list.html +++ b/workshop_app/templates/workshop_app/view_workshoptype_list.html @@ -81,7 +81,7 @@
  • Create Workshop
  • Workshop List
  • My Workshops
  • -
  • Workshop Stats
  • +
  • Workshop Stats
  • Profile Stats
  • -- cgit