Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clubs Startups Student-Council #71

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Student_Council_Website/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
'django.contrib.messages',
'django.contrib.staticfiles',

'braces',
'authtools',
'crispy_forms',
'easy_thumbnails',
Expand Down
Binary file added src/db.sqlite3
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/media/default_profile.png.30x30_q85_crop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
{% block styles %}
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300' rel='stylesheet' type='text/css'>
<link href="{% static 'site/css/main.css' %}" rel="stylesheet">
<style>
@media only screen and (max-width : 1100px) {
.hide-on-med-and-down {
display: none !important; } }
</style>
{% endblock styles %}

<!-- Custom tags for the head tag -->
Expand Down Expand Up @@ -71,6 +76,7 @@
<li><a class="dropdown-button" href="#!" data-activates="dropdown2">Academics<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a class="dropdown-button" href="#!" data-activates="dropdown3">News and Events<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a class="dropdown-button" href="#!" data-activates="dropdown4">Students' Life<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a class="dropdown-button" href="{% url 'website:clubs' %}">Clubs</a></li>

<!-- <li><a href="/smriti">Smriti</a></li> -->

Expand Down Expand Up @@ -120,6 +126,7 @@
<li class="bold"><a href="/blog" class="collapsible-header waves-effect waves-teal">Literary Archive</a></li>
<li class="bold"><a href="/resources" class="collapsible-header waves-effect waves-teal">Resources</a></li>
<li class="bold"><a href="/faq" class="collapsible-header waves-effect waves-teal">FAQs</a></li>
<li class="bold"><a class="collapsible-header waves-effect waves-teal" href="{% url 'website:clubs' %}">Clubs</a></li>

<!-- <li><a href="/smriti">Smriti</a></li> -->

Expand Down
32 changes: 32 additions & 0 deletions src/templates/club-events-edit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{% extends "club-events.html" %}
{% block add %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript">


</script>
<a href="{% url 'website:events-add' club.id %}">
<button class="btn add">Add Event</button></a>
{% endblock %}

{% for event in club.events_set.all %}
{% block options %}
<a href="{% url 'website:events-delete' club.id event.id %}"><button type="submit" class="btn edit" >Delete</button></a>
<a href="{% url 'website:events-edit' club.id event.id %}"><button type="submit" class="btn edit" >Edit</button></a>
{% endblock %}
{% endfor %}
{% block login %}
<div class="container">
<a href="{% url 'website:logout_user' %}">
<button class="btn">Logout</button></a>
</div>
<style>
.edit{
float:right;
width: 15%;
padding: 0;
margin: 5px;
}
</style>

{% endblock %}
54 changes: 54 additions & 0 deletions src/templates/club-events.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{% extends "static.html" %}

{% block page-info %}
<div class="row">
<div class="container">
<div class="col s12">
<a href="/" class="breadcrumb">Home</a>
<a href="/clubs" class="breadcrumb">Clubs</a>
<a href="" class="breadcrumb">{{ club.name }}</a>
</div>
</div>
</div>
{% endblock %}


{% block content %}
<div class="container container-table" >
<div class="container center" style="background-color: ">
<img src="{{ club.logo }}">
<h1>{{ club.name }}</h1>
<h5>Convenor: {{ club.convenor }}</h5>
<h6>Strength: {{ club.strength }}</h6>
<p>{{ club.description}}</p>
</div>

{% block add %}
{% endblock %}
{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% else %}
<h3><strong>Event List</strong></h3>
{% endif %}

<div class='container'>

{% for event in club.events_set.all %}
<div >
<label for="event{{ forloop.counter }}">
<a href="{% url 'website:events' event.id %}"><h3 style="display: inline;">{{ event.title }}</h3></a>
</label>
{% block options %}
{% endblock %}
</div>
<br>

{% endfor %}
</div>


</div>

{% block login %}
{% endblock %}
{% endblock %}
144 changes: 144 additions & 0 deletions src/templates/clubs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{% extends "static.html" %}
{% load staticfiles %}



{% block page-info %}
<div class="row">
<div class="container">
<div class="col s12">
<a href="/" class="breadcrumb">Home</a>
<a href="" class="breadcrumb">Clubs</a>
</div>
</div>
</div>
{% endblock %}

{% block content %}
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){

$("#TECH").show();
$("#TECH").siblings().hide();

$("#hobbyclubs").click(function(){
$("#HOBBY").show();
$("#HOBBY").siblings().hide();

});

$("#techclubs").click(function(){

$("#TECH").show();
$("#TECH").siblings().hide();

});

$("#startups").click(function(){

$("#START").show();
$("#START").siblings().hide();

});

$("#sc").click(function(){

$("#SC").show();
$("#SC").siblings().hide();

});


});
</script>
<div class="container">

<div id="clubs" class="row">
<div class="col s12">
<ul class="tabs">
<li class="tab col s6" id="techclubs"><a href="">TECH CLUBS</a></li>
<li class="tab col s6" id="hobbyclubs"><a href="">HOBBY CLUBS</a></li>
<li class="tab col s6" id="startups"><a href="">STARTUPS</a></li>
<li class="tab col s6" id="sc"><a href="">STUDENT COUNCIL</a></li>
</ul>
</div>
</div>
<div class="border">
{% with 'TECH HOBBY START SC' as list %}
{% for type in list.split %}
<div id={{ type }} >
<div class="row center-align" >
<ul>
{% for club in all_clubs %}
{% if club.type == type %}
<li class="col s12 m6 l6" >
<div id="club.name" class="card border" >
<div class="card-image waves-effect waves-block waves-light" >
<img class="activator" src="{{ club.logo }}" style="height: 16vw">
</div>

<div class="card-content"><a href="{% url 'website:club-events' club.id %}">
<span class="card-title activator grey-text text-darken-4 center-align">{{ club.name }}</span></a>
<p class="center-align">
<a href="mailto:[email protected]" target="_top">[email protected]</a>
<br>
<a href="https://www.google.com"><i class="fa fa-chrome black-text" style="font-size:1rem;"></i></a>
<a href="https://www.google.com"><i class="fa fa-facebook-official black-text" style="font-size:1rem;"></i></a> </p>
</div>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
{% endwith %}
</div>


</div>
<div class="container">

<div class="row">
<div class="col-sm-12 col-md-6">
<div class="panel panel-default">
<div class="panel-body">
<h3>Log In</h3>
{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% endif %}
<form class="form-horizontal" role="form" action="{% url 'website:login_user'%}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="form-group">
<label class="control-label col-sm-2" for="id_username">
Username:
</label>
<div class="col-sm-10">
<input id="id_username" maxlength="30" name="username" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="id_password">
Password:
</label>
<div class="col-sm-10">
<input id="id_password" maxlength="30" name="password" type="password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

</div>

{% endblock %}
21 changes: 21 additions & 0 deletions src/templates/create-event.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "club-events.html" %}
{% block content %}
<div class="panel panel-default">
<div class="panel-body">
<h3>Add a New Event</h3>
{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% endif %}
<form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type="hidden" name="organizer" value="{{ club }}">
{% include 'website/form-template.html' %}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
</div>
{% endblock %}
19 changes: 19 additions & 0 deletions src/templates/events.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends "static.html" %}



{% block content %}
<div class="container">
<h1>{{ events.title }}</h1>
<h4>{{ events.details }}</h4>
<h3>Organised by : {{ events.organizer.name }}</h3>
<h6>Start time: {{ events.start }}</h6>
<h6>End time: {{ events.end }}</h6>
<h5>Contact: {{ events.contact }} </h5>

{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% endif %}
</div>

{% endblock %}
45 changes: 45 additions & 0 deletions src/templates/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% extends 'static.html' %}

{% block content %}
<div class="container-fluid">

<div class="row">
<div class="col-sm-12 col-md-6">
<div class="panel panel-default">
<div class="panel-body">
<h3>Log In</h3>
{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% endif %}
<form class="form-horizontal" role="form" action="{% url 'website:login_user'%}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="form-group">
<label class="control-label col-sm-2" for="id_username">
Username:
</label>
<div class="col-sm-10">
<input id="id_username" maxlength="30" name="username" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="id_password">
Password:
</label>
<div class="col-sm-10">
<input id="id_password" maxlength="30" name="password" type="password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

</div>

{% endblock %}
11 changes: 8 additions & 3 deletions src/templates/static.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
<!-- Load Core Materialize CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="{% static 'materialize/css/materialize.min.css' %}" rel="stylesheet">

<!-- Custom styles for this site -->
<link href='https://fonts.googleapis.com/css?family=Signika:600' rel='stylesheet' type='text/css'>
<link href="{% static 'site/css/main.css' %}" rel="stylesheet">
{% block styles %}

{% endblock styles %}

<style>
@media only screen and (max-width : 1060px) {
.hide-on-med-and-down {
display: none !important; } }
</style>
<!-- Custom tags for the head tag -->
{% block extrahead %}{% endblock extrahead %}
</head>
Expand Down Expand Up @@ -72,7 +76,7 @@
<li><a class="dropdown-button" href="#!" data-activates="dropdown2">Academics<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a class="dropdown-button" href="#!" data-activates="dropdown3">News and Events<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a class="dropdown-button" href="#!" data-activates="dropdown4">Students' Life<i class="material-icons right">arrow_drop_down</i></a></li>

<li><a class="dropdown-button" href="{% url 'website:clubs' %}">Clubs</a></li>
<!-- <li><a href="/smriti">Smriti</a></li> -->

</ul>
Expand Down Expand Up @@ -121,6 +125,7 @@
<li class="bold"><a href="/resources" class="collapsible-header waves-effect waves-teal">Resources</a></li>
<li class="bold"><a href="/faq" class="collapsible-header waves-effect waves-teal">FAQs</a></li>
<li class="bold"><a href="/smriti" class="collapsible-header waves-effect waves-teal">Smriti</a></li>
<li class="bold"><a class="collapsible-header waves-effect waves-teal" href="{% url 'website:clubs' %}">Clubs</a></li>
</ul>
<a href="" id="sidenav" data-activates="slide-out" class="button-collapse"><i class="mdi-navigation-menu"></i></a>
</div>
Expand Down
Loading