Skip to content

Commit

Permalink
Restructure site and bug fixes
Browse files Browse the repository at this point in the history
Fixes coala#44
Closes coala#1
  • Loading branch information
ashwini0529 committed Dec 14, 2017
1 parent e9116e5 commit ec600af
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 55 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ ENV/
_site/
/public/
org_name.txt
.idea
2 changes: 1 addition & 1 deletion community/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_index():
distill_file='index.html',
),
distill_url(
r'activity/', TemplateView.as_view(template_name='activity.html'),
r'activity/', TemplateView.as_view(template_name='index.html'),
name='activity',
distill_func=get_index,
distill_file='activity/index.html',
Expand Down
Binary file added static/.DS_Store
Binary file not shown.
20 changes: 20 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.student {
padding-bottom: 20px;
}

.students {
list-style: none;
}
nav {
background-color: #38474e !important;
}

.page-footer {
background-color: #37474f !important;
}

canvas {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions static/main.css

This file was deleted.

114 changes: 74 additions & 40 deletions templates/activity.html
Original file line number Diff line number Diff line change
@@ -1,41 +1,75 @@
<!doctype html>
<html>

<head>
<title>Community Activity</title>
<style>
canvas {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>

<body>
<h1>Community Activity</h1>
<br>
<br>
<div style="width:75%;">
<canvas id="canvas"></canvas>
<!DOCTYPE html>
<html>
<head>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<link rel="stylesheet" href="../static/css/main.css">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>

<body>

<nav>
<div class="nav-wrapper">
<a href="#" class="brand-logo">&nbsp;<img src="https://api.coala.io/en/latest/_static/images/coala_logo.svg"></a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a href="/gci">GCI</a></li>
<li><a href="/activity">Github Activity{{ org_name }}</a></li>
</ul>
</div>
</nav>
<div class="section no-pad-bot" id="index-banner">
<div class="container">
<h1 class="header center col-test">Welcome</h1>
<div class="row center">
<h5 class="header col s12 light">Hello, world. You are at the coala community GCI website.</h5>
</div>
</div>


<div class="row center">
<div class="input-field col s4">
<select id="chartType">
<option value="Month" selected>Year</option>
<option value="Week">Month</option>
<option value="Day">Week</option>
</select>
<label>Time Interval</label>
</div>
<div class="col s12 center">

<div class="card white darken-1">
<div class="card-content black-text">
<span class="card-title">Issues</span>

<div>
<canvas id="canvas"></canvas>
</div>
</div>

</div>
</div>
</div>
</div>
<select id="chartType">
<option value="Month">Year</option>
<option value="Week">Month</option>
<option value="Day">Week</option>
</select>
<br>
<br>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="/static/charts.js"></script>
<script>
$('#chartType').on('change', function(){
updateChart($('#chartType').val())
});
updateChart($('#chartType').val());
</script>
</body>

</html>

{% include 'footer.html' %}
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.js"></script>
<script src="../static/js/charts.js"></script>
<script>
$(document).ready(function() {
$('select').material_select();
});
$('#chartType').on('change', function(){
updateChart($('#chartType').val())
});
updateChart($('#chartType').val());
</script>

</body>
</html>
38 changes: 38 additions & 0 deletions templates/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<footer class="page-footer">
<div class="container">
<div class="row">
<div class="col m3 s12">
<h5 class="white-text fine">coala</h5>
<ul>
<li><a class="grey-text text-lighten-3" href="http://coala.io/docs">Documentation</a></li>
<li><a class="grey-text text-lighten-3" href="http://coala.io/newcomer">Newcomer Docs</a></li>
<li><a class="grey-text text-lighten-3" href="http://coala.io/coc">Code of Conduct</a></li>
<li><a class="grey-text text-lighten-3" href="http://blog.coala.io/">Blog</a></li>
<li><a class="grey-text text-lighten-3" href="mailto:[email protected]">Donate</a></li>
</ul>
</div>
<div class="col m9 s12">
<div class="row footer-btn-row">
<div class="col m6 s12 center">
<div class="twitter-btn center">
<a href="https://twitter.com/coala_io" class="waves-effect waves-light btn-large"><i class="fa fa-twitter" aria-hidden="true"></i><span class="footer-btn-text">Follow Us On Twitter</span></a>
</div>
<br>
</div>
<div class="col m6 s12 center">
<div class="gitter-btn center">
<a class="waves-effect waves-light btn-large"><i class="fa fa-commenting-o" aria-hidden="true"></i><span class="footer-btn-text">Join Chat On Gitter</span></a>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a>
</div>
</div>
</footer>
8 changes: 1 addition & 7 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<title>Community website</title>
<body>
<ul>
<li><a href="/gci/">Google Code-in</a>
<li><a href="/activity/">GitHub activity</a>
</ul>
</body>
{% include 'activity.html' %}

0 comments on commit ec600af

Please sign in to comment.