diff options
40 files changed, 386 insertions, 42 deletions
diff --git a/static/workshop_app/css/index.css b/static/workshop_app/css/index.css new file mode 100644 index 0000000..a54f9b1 --- /dev/null +++ b/static/workshop_app/css/index.css @@ -0,0 +1,129 @@ +body { + background-color: #C8C5B6; +} + +.fossee-label { + padding-top: 90px; + margin-left: 200px; + color: #6D5847; + font-size: 70px; +} + + +.logo { + width: 600px; + height: 70px; + background: white; + float: left; + margin-top: 40px; + margin-left: 85px; +} + +.label-bar { + color: #6D5847; + float: right; + margin-top: 36px; + font-size: 18px; + margin-right: 30px; +} + + +.login { + margin-left: 330px; + width: 420px; + height: 470px; + background: white; +} + +#rectbox { + border-radius: 25px; + background: #6D5847; + padding: 20px; + margin-left: 20px; + margin-top: 10px; + width: 350px; + height: 120px; +} + + +.caption-img { + width:70px; + height:75px; + margin-top: -9px; +} + + +/* Icons with their respective Images */ +.icons { + background: white; + height: 110px; + margin-top: 15px; +} + +figure.item { + /* To correctly align image, regardless of content height: */ + vertical-align: top; + display: inline-block; + /* To horizontally center images and caption */ + text-align: center; + /* The width of the container also implies margin around the images. */ +} + +.caption-img { + width:70px; + height:75px; + margin-top: 5px; +} + + +.caption { + /* Make the caption a block so it occupies its own line. */ + display: block; + color: #5A3700; + padding-bottom: 10px; +} + +/* Contact Us, Related Links and Organization Logo */ + +.contact { + width: 100%; + margin: auto; +} + + +.org-logo { + margin-top: 30px; + margin-left: 60px; + float: left; + + color: #5A3700; + +} + +.related-links { + font-size: 20px; + color: #5A3700; + margin-top: 12px; + margin-left: 90px +} + +.contact-us { + font-size: 20px; + color: #5A3700; + margin-top: 12px; + margin-right: 10px; + float: right; + +} + +/* Footer */ +.footer { + position: absolute; + right: 0; + bottom: 0; + left: 0; + + background-color: black; + text-align: center; + color:white; +} diff --git a/static/workshop_app/img/Dwsim_logo.png b/static/workshop_app/img/Dwsim_logo.png Binary files differnew file mode 100644 index 0000000..1b22085 --- /dev/null +++ b/static/workshop_app/img/Dwsim_logo.png diff --git a/static/workshop_app/img/OR_logo.png b/static/workshop_app/img/OR_logo.png Binary files differnew file mode 100644 index 0000000..88bd685 --- /dev/null +++ b/static/workshop_app/img/OR_logo.png diff --git a/static/workshop_app/img/OpenFoam_logo.png b/static/workshop_app/img/OpenFoam_logo.png Binary files differnew file mode 100644 index 0000000..5e674ed --- /dev/null +++ b/static/workshop_app/img/OpenFoam_logo.png diff --git a/static/workshop_app/img/Scilab_logo.png b/static/workshop_app/img/Scilab_logo.png Binary files differnew file mode 100644 index 0000000..f2babe2 --- /dev/null +++ b/static/workshop_app/img/Scilab_logo.png diff --git a/static/workshop_app/img/bnft.png b/static/workshop_app/img/bnft.png Binary files differnew file mode 100644 index 0000000..4b26613 --- /dev/null +++ b/static/workshop_app/img/bnft.png diff --git a/static/workshop_app/img/cc.png b/static/workshop_app/img/cc.png Binary files differnew file mode 100644 index 0000000..72c7cf6 --- /dev/null +++ b/static/workshop_app/img/cc.png diff --git a/static/workshop_app/img/esim_logo.png b/static/workshop_app/img/esim_logo.png Binary files differnew file mode 100644 index 0000000..ea73365 --- /dev/null +++ b/static/workshop_app/img/esim_logo.png diff --git a/static/workshop_app/img/faq.png b/static/workshop_app/img/faq.png Binary files differnew file mode 100644 index 0000000..e2caf34 --- /dev/null +++ b/static/workshop_app/img/faq.png diff --git a/static/workshop_app/img/fossee_logo.png b/static/workshop_app/img/fossee_logo.png Binary files differnew file mode 100644 index 0000000..d2d18d0 --- /dev/null +++ b/static/workshop_app/img/fossee_logo.png diff --git a/static/workshop_app/img/homepg.png b/static/workshop_app/img/homepg.png Binary files differnew file mode 100644 index 0000000..4943deb --- /dev/null +++ b/static/workshop_app/img/homepg.png diff --git a/static/workshop_app/img/iitb_logo.png b/static/workshop_app/img/iitb_logo.png Binary files differnew file mode 100644 index 0000000..70b2c46 --- /dev/null +++ b/static/workshop_app/img/iitb_logo.png diff --git a/static/workshop_app/img/img_1.png b/static/workshop_app/img/img_1.png Binary files differnew file mode 100644 index 0000000..3824f16 --- /dev/null +++ b/static/workshop_app/img/img_1.png diff --git a/static/workshop_app/img/list.png b/static/workshop_app/img/list.png Binary files differnew file mode 100644 index 0000000..6eb0640 --- /dev/null +++ b/static/workshop_app/img/list.png diff --git a/static/workshop_app/img/part.png b/static/workshop_app/img/part.png Binary files differnew file mode 100644 index 0000000..915e6c9 --- /dev/null +++ b/static/workshop_app/img/part.png diff --git a/static/workshop_app/img/python_logo.png b/static/workshop_app/img/python_logo.png Binary files differnew file mode 100644 index 0000000..c147919 --- /dev/null +++ b/static/workshop_app/img/python_logo.png diff --git a/static/workshop_app/img/sandhi_logo.png b/static/workshop_app/img/sandhi_logo.png Binary files differnew file mode 100644 index 0000000..1c35e0e --- /dev/null +++ b/static/workshop_app/img/sandhi_logo.png diff --git a/workshop_app/static/workshop_app/css/index.css b/workshop_app/static/workshop_app/css/index.css new file mode 100644 index 0000000..c7b07fb --- /dev/null +++ b/workshop_app/static/workshop_app/css/index.css @@ -0,0 +1,129 @@ +body { + background-color: grey; +} + +.fossee-label { + padding-top: 90px; + margin-left: 200px; + color: #6D5847; + font-size: 70px; +} + + +.logo { + width: 600px; + height: 70px; + background: white; + float: left; + margin-top: 40px; + margin-left: 85px; +} + +.label-bar { + color: #6D5847; + float: right; + margin-top: 36px; + font-size: 18px; + margin-right: 30px; +} + + +.login { + margin-left: 330px; + width: 420px; + height: 470px; + background: white; +} + +#rectbox { + border-radius: 25px; + background: #6D5847; + padding: 20px; + margin-left: 20px; + margin-top: 10px; + width: 350px; + height: 130px; +} + + +.caption-img { + width:70px; + height:75px; + margin-top: -9px; +} + + +/* Icons with their respective Images */ +.icons { + background: white; + height: 110px; + margin-top: 15px; +} + +figure.item { + /* To correctly align image, regardless of content height: */ + vertical-align: top; + display: inline-block; + /* To horizontally center images and caption */ + text-align: center; + /* The width of the container also implies margin around the images. */ +} + +.caption-img { + width:70px; + height:75px; + margin-top: 5px; +} + + +.caption { + /* Make the caption a block so it occupies its own line. */ + display: block; + color: #5A3700; + padding-bottom: 10px; +} + +/* Contact Us, Related Links and Organization Logo */ + +.contact { + width: 100%; + margin: auto; +} + + +.org-logo { + margin-top: 30px; + margin-left: 60px; + float: left; + + color: #5A3700; + +} + +.related-links { + font-size: 20px; + color: #5A3700; + margin-top: 12px; + margin-left: 90px +} + +.contact-us { + font-size: 20px; + color: #5A3700; + margin-top: 12px; + margin-right: 10px; + float: right; + +} + +/* Footer */ +.footer { + position: absolute; + right: 0; + bottom: 0; + left: 0; + + background-color: black; + text-align: center; + color:white; +} diff --git a/workshop_app/static/workshop_app/img/Dwsim_logo.png b/workshop_app/static/workshop_app/img/Dwsim_logo.png Binary files differnew file mode 100644 index 0000000..1b22085 --- /dev/null +++ b/workshop_app/static/workshop_app/img/Dwsim_logo.png diff --git a/workshop_app/static/workshop_app/img/OR_logo.png b/workshop_app/static/workshop_app/img/OR_logo.png Binary files differnew file mode 100644 index 0000000..88bd685 --- /dev/null +++ b/workshop_app/static/workshop_app/img/OR_logo.png diff --git a/workshop_app/static/workshop_app/img/OpenFoam_logo.png b/workshop_app/static/workshop_app/img/OpenFoam_logo.png Binary files differnew file mode 100644 index 0000000..5e674ed --- /dev/null +++ b/workshop_app/static/workshop_app/img/OpenFoam_logo.png diff --git a/workshop_app/static/workshop_app/img/Scilab_logo.png b/workshop_app/static/workshop_app/img/Scilab_logo.png Binary files differnew file mode 100644 index 0000000..f2babe2 --- /dev/null +++ b/workshop_app/static/workshop_app/img/Scilab_logo.png diff --git a/workshop_app/static/workshop_app/img/bnft.png b/workshop_app/static/workshop_app/img/bnft.png Binary files differnew file mode 100644 index 0000000..4b26613 --- /dev/null +++ b/workshop_app/static/workshop_app/img/bnft.png diff --git a/workshop_app/static/workshop_app/img/cc.png b/workshop_app/static/workshop_app/img/cc.png Binary files differnew file mode 100644 index 0000000..72c7cf6 --- /dev/null +++ b/workshop_app/static/workshop_app/img/cc.png diff --git a/workshop_app/static/workshop_app/img/esim_logo.png b/workshop_app/static/workshop_app/img/esim_logo.png Binary files differnew file mode 100644 index 0000000..ea73365 --- /dev/null +++ b/workshop_app/static/workshop_app/img/esim_logo.png diff --git a/workshop_app/static/workshop_app/img/faq.png b/workshop_app/static/workshop_app/img/faq.png Binary files differnew file mode 100644 index 0000000..e2caf34 --- /dev/null +++ b/workshop_app/static/workshop_app/img/faq.png diff --git a/workshop_app/static/workshop_app/img/fossee_logo.png b/workshop_app/static/workshop_app/img/fossee_logo.png Binary files differnew file mode 100644 index 0000000..d2d18d0 --- /dev/null +++ b/workshop_app/static/workshop_app/img/fossee_logo.png diff --git a/workshop_app/static/workshop_app/img/homepg.png b/workshop_app/static/workshop_app/img/homepg.png Binary files differnew file mode 100644 index 0000000..4943deb --- /dev/null +++ b/workshop_app/static/workshop_app/img/homepg.png diff --git a/workshop_app/static/workshop_app/img/iitb_logo.png b/workshop_app/static/workshop_app/img/iitb_logo.png Binary files differnew file mode 100644 index 0000000..70b2c46 --- /dev/null +++ b/workshop_app/static/workshop_app/img/iitb_logo.png diff --git a/workshop_app/static/workshop_app/img/img_1.png b/workshop_app/static/workshop_app/img/img_1.png Binary files differnew file mode 100644 index 0000000..3824f16 --- /dev/null +++ b/workshop_app/static/workshop_app/img/img_1.png diff --git a/workshop_app/static/workshop_app/img/list.png b/workshop_app/static/workshop_app/img/list.png Binary files differnew file mode 100644 index 0000000..6eb0640 --- /dev/null +++ b/workshop_app/static/workshop_app/img/list.png diff --git a/workshop_app/static/workshop_app/img/part.png b/workshop_app/static/workshop_app/img/part.png Binary files differnew file mode 100644 index 0000000..915e6c9 --- /dev/null +++ b/workshop_app/static/workshop_app/img/part.png diff --git a/workshop_app/static/workshop_app/img/python_logo.png b/workshop_app/static/workshop_app/img/python_logo.png Binary files differnew file mode 100644 index 0000000..c147919 --- /dev/null +++ b/workshop_app/static/workshop_app/img/python_logo.png diff --git a/workshop_app/static/workshop_app/img/sandhi_logo.png b/workshop_app/static/workshop_app/img/sandhi_logo.png Binary files differnew file mode 100644 index 0000000..1c35e0e --- /dev/null +++ b/workshop_app/static/workshop_app/img/sandhi_logo.png diff --git a/workshop_app/templates/workshop_app/booking.html b/workshop_app/templates/workshop_app/booking.html index d69bf8f..6a0bbf8 100644 --- a/workshop_app/templates/workshop_app/booking.html +++ b/workshop_app/templates/workshop_app/booking.html @@ -85,7 +85,7 @@ <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> - <a class="navbar-brand" href="#">WebSiteName</a> + <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Home</a> </div> <ul class="nav navbar-nav"> <li class="active"><a href="{{ URL_ROOT}}/my_workshops/">My Workshops</a></li> diff --git a/workshop_app/templates/workshop_app/index.html b/workshop_app/templates/workshop_app/index.html index 363922e..5fd17bf 100644 --- a/workshop_app/templates/workshop_app/index.html +++ b/workshop_app/templates/workshop_app/index.html @@ -1,45 +1,119 @@ -{% extends "workshop_app/base.html" %} - <!DOCTYPE html> <html> - <head> - {% block title %} - Welcome - {% endblock %} - </head> + <head> + <title>Welcome</title> + </head> + + <!-- Bootstrap CDN --> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> + + <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"> - {% block header %} - <nav class="navbar navbar-inverse"> - <div class="container-fluid"> - <div class="navbar-header"> - <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a> + + <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/index.css" type="text/css" /> + + <body > + <div class="container" style="width: 90%; height:90%;background:#C8C5B6;"> + <div class="row"> + + <div class="col-md-4"> + <div class="fossee-label">FOSSEE Workshop</div> + <div class="logo"> + <img src="{{ URL_ROOT }}/static/workshop_app/img/python_logo.png" style="margin-left: 50px;margin-top:6px;width:60px ;height: 60px"> + <img src="{{ URL_ROOT }}/static/workshop_app/img/sandhi_logo.png" style="margin-left: 50px;margin-top:6px;width:60px ;height: 60px"> + <img src="{{ URL_ROOT }}/static/workshop_app/img/Scilab_logo.png" style="margin-left: 50px;margin-top:6px;width:90px ;height: 60px"> + <img src="{{ URL_ROOT }}/static/workshop_app/img/OR_logo.png" style="margin-left: 30px;margin-top:6px;width:60px ;height: 60px"> + <img src="{{ URL_ROOT }}/static/workshop_app/img/Dwsim_logo.png" style="margin-left: 50px;margin-top:6px;width:60px ;height: 60px"> + </div> + + </div> + + <div class="login col-md-8"> + <div class="label-bar"><a href="" style="color: #6D5847;">About </a>|<a href="" style="color: #6D5847;">Blog </a>| <a href="" style="color: #6D5847;">Gallery</a></div> + <img src=" {{ URL_ROOT }}/static/workshop_app/img/img_1.png" style="margin-left: 160px;padding-top: 45px;"><br> + <div id="rectbox"> + + <form method="post"> + {% csrf_token %} + {{ form.as_p }} + <button class="btn btn-default btn-sm" style="margin-left: 35%;" type="submit">Login</button> + <br> + </form> + </div> + + <h4 style="margin-left: 90px; color: grey;">If not Registered yet, <br> please <a href="" target="_blank">register here.</a></h4> + <br><br> + <button style="margin-left: 140px; width:120px;height:45px;border-radius:15px;background:#6D5847;color: white" class="demo-button"><h4>Demo</h4></button> + </div> + + </div> + + <div class="row"> + <div class="icons col-md-12"> + + <figure class="item"> + <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/list.png" style="margin-left: 195px;"> + <figcaption class="caption" style="margin-left: 195px;"><a href="" style="color: #6D5847;">Course List</a></figcaption> + </figure> + + <figure class="item"> + <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/bnft.png" style="margin-left: 195px; "> + <figcaption class="caption" style="margin-left: 195px;"><a href="" style="color: #6D5847;">Benefits</a></figcaption> + </figure> + + <figure class="item"> + <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/faq.png" style="margin-left: 195px; "> + <figcaption class="caption" style="margin-left: 195px;"><a href="" style="color: #6D5847;">FAQs</a></figcaption> + </figure> + + + <figure class="item"> + <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/part.png" style="margin-left: 195px; "> + <figcaption class="caption" style="margin-left: 195px;"><a href="" style="color: #6D5847;">How to participate</a></figcaption> + </figure> + + </div> </div> - <ul class="nav navbar-nav navbar-right"> - <li><a href="{{ URL_ROOT }}/register/"><span class="glyphicon glyphicon-user"></span> Register</a></li> - <li><a href="{{ URL_ROOT }}/login/"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> - </ul> + <!-- Bottom 3 cols --> + <div class="row"> + <!-- Logo --> + <div class="org-logo col-md-3"> + <span style="margin-top:10px; font-size: 15px;">Organized By:</span><br> + <img src="{{ URL_ROOT }}/static/workshop_app/img/fossee_logo.png" style="width:120px;height:54px;"> + + <img src="{{ URL_ROOT }}/static/workshop_app/img/iitb_logo.png" style="margin-left:5px ;width:45px;height:48px;"> + </div> + + <!-- Related Links --> + <div class="related-links col-md-3"> + Related Links<br> + <h6> + <a href="fossee.in" style="font-size: 12px;">fossee.in</a><br> + <a href="yaksh.fossee.in" style="font-size: 12px;">yaksh.fossee.in</a><br> + <a href="python.fossee.in" style="font-size: 12px;">python.fossee.in</a> + </h6> </div> - </nav> - {% endblock %} - - {% block content %} - <div class="container"> - <div class="jumbotron container-fluid"> - <h3>Why should you attend Python workshop</h3> - <p>Python is widely used in organizations like <b>Google, Yahoo, Zope, Walt Disney , IBM etc.</b> It is easy to earn and widely used in scientific computing. If you are new to programming, python is the best place to start exploring the power of programming. Moreover that, you can easy integrate python with your existing projects.Python has an extensive set of libraries and well documented user guide.</p> - </div> - <div class="row"> - <div class="col-lg-6"> - FOSSEE python workshop is designed by keeping students and faculties of India in prime focus. Workshop content is designed without any assumption about prior knowledge of participants. It takes you by hand from basic to advanced level in 3 days. - <img src="{{ URL_ROOT }}/static/workshop_app/img/img1.png" style="width:304px;height:228px;"> - </div> - <div class="col-lg-6"> - FOSSEE has imparted <b>“Introduction to Scientific Computing using python”</b> workshop to 1364 students from 20+ colleges spread across different states in India in 2017.This number is increasing and you can also become part of this incredible initiative by organizing FOSSEE workshop at your college. Visit <a href=http://www.fossee.in/fossee-stats target="_blank">stats</a> for details on statistics. - <img src="{{ URL_ROOT }}/static/workshop_app/img/img2.png" style="width:304px;height:228px;"> - </div> - </div> - </div> - {% endblock %} - -</html>
\ No newline at end of file + + <!-- Contact Us --> + <div class="contact-us col-md-3"> + Contact Us:<br> + <h6>FOSSEE, IIT-Bombay<br> + Mumbai, India<br></h6> + <h6> + Phone: (+91) 22 2576 + 4133<br> + Email: info[at]fossee[dot]in + </h6> + </div> + + </div> + + <div class="footer"> + <img src="{{ URL_ROOT }}/static/workshop_app/img/cc.png" style="width:45px;height:15px;"> + This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License + </div> + </div> + </body> +</html> diff --git a/workshop_app/templates/workshop_app/login.html b/workshop_app/templates/workshop_app/login.html index 300a9d4..9ac9a93 100644 --- a/workshop_app/templates/workshop_app/login.html +++ b/workshop_app/templates/workshop_app/login.html @@ -24,7 +24,7 @@ <br> <form method="post"> {% csrf_token %} - {{ form.as_table }} + {{ form.as_p }} <br> <br> <button class="btn btn-default" type="submit">Login</button> diff --git a/workshop_app/templates/workshop_app/view_workshoptype_list.html b/workshop_app/templates/workshop_app/view_workshoptype_list.html index eb907c0..b8fd867 100644 --- a/workshop_app/templates/workshop_app/view_workshoptype_list.html +++ b/workshop_app/templates/workshop_app/view_workshoptype_list.html @@ -54,6 +54,7 @@ <td>{{ w.workshoptype_name }}</td> <td>{{ w.workshoptype_duration }}</td> <td><button class="btn btn-default btn-sm" class="accordion-toggle" data-toggle="collapse" href="#collapseOne{{ forloop.counter }}">View Workshop Details</button></td> + <td><button class="btn btn-default btn-sm" ><a href="{{ URL_ROOT }}/book/">Book</a></button></td> </tr> <tr> diff --git a/workshop_app/views.py b/workshop_app/views.py index a9e8be1..80b2fcf 100644 --- a/workshop_app/views.py +++ b/workshop_app/views.py @@ -40,11 +40,21 @@ def index(request): '''Landing Page''' user = request.user + form = UserLoginForm() if user.is_authenticated(): if user.groups.filter(name='instructor').count() > 0: return redirect('/manage/') return redirect('/book/') - return render(request, "workshop_app/index.html") + elif request.method == "POST": + form = UserLoginForm(request.POST) + if form.is_valid(): + user = form.cleaned_data + login(request, user) + if user.groups.filter(name='instructor').count() > 0: + return redirect('/manage/') + return redirect('/book/') + + return render(request, "workshop_app/index.html", {"form": form}) def is_instructor(user): diff --git a/workshop_portal/settings.py b/workshop_portal/settings.py index 851d859..94c52a9 100644 --- a/workshop_portal/settings.py +++ b/workshop_portal/settings.py @@ -148,3 +148,4 @@ EMAIL_TIMEOUT = 300 #EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' #Temp Solution LOGIN_REDIRECT_URL = '/profile' +SESSION_EXPIRE_AT_BROWSER_CLOSE = True |