Skip to content

Commit

Permalink
Merge pull request #11 from Djacket/devel-v0.2.1
Browse files Browse the repository at this point in the history
v0.2.1 confirmed.
  • Loading branch information
moeenz authored Apr 22, 2018
2 parents 47b0ffa + d253e43 commit fa4dd6f
Show file tree
Hide file tree
Showing 17 changed files with 4,684 additions and 60 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Djacket project initiated in Dec, 2015. Below is the list of contributers.

Moeen Zamani <moeenzdev@gmail.com>
Moeen Zamani <moeen.zamani@gmail.com>
Marcos Cáceres <marcos@marcosc.com>
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@
* Djacket is dockerized.
- All the development/production processes are now moved to Docker.
- Lots of useless content is deleted.


# 0.2.1 (April 22, 2018)
* Minor fixes and updates.
- NPM packages updated along with adding `package-lock.json` file.
- `NodeJS` installation version changed to 8.x LTS.
- `404` errors for icons fixed.
- JS scripts modified for new versions of `jQuery` and `Chart.js`.
- `TypeError: get_available_name() got an unexpected keyword argument 'max_length'` issue fixed.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM python:3.6

LABEL maintainer="Moeen Zamani <moeenzdev@gmail.com>"
LABEL maintainer="Moeen Zamani <moeen.zamani@gmail.com>"

RUN apt-get update && apt-get install -y \
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y \
nodejs \
git \
nodejs-legacy \
npm
build-essential

RUN npm install -g gulp

Expand All @@ -15,6 +16,7 @@ ADD requirements.txt /srv/requirements.txt
RUN pip install -r requirements.txt

COPY package.json /srv/package.json
COPY package-lock.json /srv/package-lock.json
RUN npm install

COPY ./core/backend/ /srv/core/backend/
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Djacket Project.
Copyright (c) 2018 Djacket Project.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Project is fully documented and it can be reached by going to:

The MIT License (MIT)

Copyright (c) 2017 Djacket Project.
Copyright (c) 2018 Djacket Project.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion core/backend/djacket/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class OverwriteStorage(FileSystemStorage):
Overwrites to a file if it exists on file system.
"""

def get_available_name(self, name):
def get_available_name(self, name, max_length=None):
"""
If a file with the given name exists in MEDIA_ROOT,
it will be removed otherwise it's name is returned.
Expand Down
10 changes: 9 additions & 1 deletion core/frontend/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var paths = {
"build": {
"styles": build_folder + "static/styles",
"scripts": build_folder + "static/scripts",
"fonts": build_folder + "static/fonts",
"libs": build_folder + "static/libs",
"views": build_folder + "views",
"ext": build_folder + "static"
Expand Down Expand Up @@ -58,7 +59,7 @@ gulp.task('libs', function () {
'../../node_modules/nprogress/nprogress.js',
'../../node_modules/moment/min/moment.min.js',
'../../node_modules/marked/marked.min.js',
'../../node_modules/chart.js/Chart.min.js'
'../../node_modules/chart.js/dist/Chart.min.js'
])
.pipe(concat('djacket-libs.js'))
.pipe(uglify())
Expand All @@ -76,6 +77,13 @@ gulp.task('libs', function () {
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(gulp.dest(paths.build.libs));

gulp
.src([
'../../node_modules/font-awesome/fonts/*',
'../../node_modules/devicons/fonts/*',
])
.pipe(gulp.dest(paths.build.fonts));
});

gulp.task('views', function () {
Expand Down
48 changes: 26 additions & 22 deletions core/frontend/public/dev/static/scripts/djacket-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,17 @@ function _show_weekly_graphs (dataset) {
datasets: [
{
label: "Weekly Commits",
fillColor: "rgba(57,221,0,0.2)",
strokeColor: "rgba(49,170,8,1)",
pointColor: "rgba(26, 103, 0, 1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(20, 75, 1, 1)",
backgroundColor: "rgba(57,221,0,0.2)",
borderColor: "rgba(49,170,8,1)",
pointBackgroundColor: "#fff",
pointBorderColor: "#fff",
data: weekly_datas
}
]
};

var weekly_ctx = $("#repo-graphs #weekly-commits-graph").get(0).getContext("2d");
var weekly_commits = new Chart(weekly_ctx).Line(weekly_data);
var weekly_commits = new Chart(weekly_ctx, {type: 'line', data: weekly_data});
}


Expand All @@ -152,19 +150,18 @@ function _show_monthly_graphs (dataset) {
datasets: [
{
label: "Monthly Commits",
fillColor: "rgba(57,221,0,0.2)",
strokeColor: "rgba(49,170,8,1)",
pointColor: "rgba(26, 103, 0, 1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(20, 75, 1, 1)",
backgroundColor: "rgba(57,221,0,0.2)",
borderColor: "rgba(49,170,8,1)",
borderWidth: 3,
pointBackgroundColor: "#fff",
pointBorderColor: "#fff",
data: monthly_datas
}
]
};

var monthly_ctx = $("#repo-graphs #monthly-commits-graph").get(0).getContext("2d");
var monthly_commits = new Chart(monthly_ctx).Bar(monthly_data);
var monthly_commits = new Chart(monthly_ctx, {type: 'bar', data: monthly_data, options: {barThickness: 1.0}});
}


Expand Down Expand Up @@ -194,19 +191,26 @@ function get_datasets () {
}
}

function setup_page () {
highlight_codes();
process_dates();
setup_markdown();
setup_file_icons();
get_datasets();
}

$(document).on('ready', function () {
// Called upon first page ready event.
jQuery(function ($) {
setup_nprogress();
setup_view_tabs();
setup_static_tabs();
setup_pjax();
setup_page();
});


$(document).on('ready pjax:end', function () {
highlight_codes();
process_dates();
setup_markdown();
setup_file_icons();
get_datasets();
// Called upon every pjax request ending.
jQuery(function ($) {
$(document).on('pjax:end', function () {
setup_page();
});
});
2 changes: 1 addition & 1 deletion core/frontend/public/dev/static/scripts/djacket.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function setup_static_tabs () {
});
}

$(document).on('ready', function () {
jQuery(function ($) {
setup_static_tabs();

$('a[href="#auth"]').on('click', function () {
Expand Down
2 changes: 0 additions & 2 deletions core/frontend/public/dev/static/styles/_graphs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ div#repo-graphs {
canvas {
display: block;
margin: 64px auto;
width: $default-graph-width;
height: $default-graph-height;
}
}
3 changes: 0 additions & 3 deletions core/frontend/public/dev/static/styles/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ $green: #39DD00;
$green-hover: #31aa08;
$red-hover: #990a0a;
$dark-blue: #000112;

$default-graph-width: 840px;
$default-graph-height: 160px;
4 changes: 2 additions & 2 deletions core/frontend/public/dev/views/base/repo-graphs.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div id="graphs-loader">
{% include 'base/loading.html' %}
</div>
<canvas id="weekly-commits-graph"></canvas>
<canvas id="monthly-commits-graph"></canvas>
<canvas id="weekly-commits-graph" width="840" height="160"></canvas>
<canvas id="monthly-commits-graph" width="840" height="160"></canvas>
</div>
{% else %}
{% include 'base/repo-no-commits.html' %}
Expand Down
2 changes: 1 addition & 1 deletion core/frontend/public/dev/views/base/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ <h3>Anonymous</h3>
</ul>
</section>
<footer>
<p>Copyright &copy; 2017</p>
<p>Copyright &copy; 2018</p>
</footer>
8 changes: 4 additions & 4 deletions core/frontend/public/dev/views/base/user-login-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
{% csrf_token %}
<ul>
<li>
<label for="id_username">Username*</label>
<input id="id_username" name="username" type="text">
<label for="id_username_login">Username*</label>
<input id="id_username_login" name="username" type="text">
<span>Enter your username.</span>
</li>
<li>
<label for="id_password">Password*</label>
<input id="id_password" name="password" type="password">
<label for="id_password_login">Password*</label>
<input id="id_password_login" name="password" type="password">
<span>Enter your password.</span>
</li>
<li>
Expand Down
12 changes: 6 additions & 6 deletions core/frontend/public/dev/views/base/user-register-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
{% csrf_token %}
<ul>
<li>
<label for="id_username">Username*</label>
<input id="id_username" name="username" type="text">
<label for="id_username_register">Username*</label>
<input id="id_username_register" name="username" type="text">
<span>Enter a username.</span>
</li>
<li>
<label for="id_email">Email*</label>
<input id="id_email" name="email" type="email">
<label for="id_email_register">Email*</label>
<input id="id_email_register" name="email" type="email">
<span>Enter your email.</span>
</li>
<li>
<label for="id_password">Password*</label>
<input id="id_password" name="password" type="password">
<label for="id_password_register">Password*</label>
<input id="id_password_regiser" name="password" type="password">
<span>Enter a password.</span>
</li>
<li>
Expand Down
Loading

0 comments on commit fa4dd6f

Please sign in to comment.