Skip to content

Commit

Permalink
Merge branch 'master' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceFox committed Sep 1, 2014
2 parents 2d93e88 + 19bd147 commit a4a9668
Show file tree
Hide file tree
Showing 99 changed files with 4,002 additions and 1,410 deletions.
62 changes: 44 additions & 18 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ var paths = {
scripts: "assets/js/**",
images: "assets/images/**",
smileys: "assets/smileys/**",
copy: "assets/misc/**",
stylesheet: "assets/scss/main.scss",
scss: ["assets/scss/**", "!assets/scss/_sprite.scss"],
sass: {
errors_main: "errors/scss/main.scss",
errors_path: "errors/scss/**",
errors: {
sass: "errors/scss",
images: "errors/images",
includePaths: ["errors/scss", "assets/bower_components/modularized-normalize-scss"],
},
styles_main: "assets/scss/main.scss",
styles_path: ["assets/scss/**", "!assets/scss/_sprite.scss"],
styles: {
sass: "assets/scss",
images: "assets/images",
includePaths: ["assets/scss", "assets/bower_components/modularized-normalize-scss"],
Expand All @@ -36,12 +42,31 @@ gulp.task("script", ["test"], function() {
.pipe($.size({ title: "main.min.js" }));
});

gulp.task("clean-errors", function() {
return gulp.src(["errors/css/*"])
.pipe($.clean());
});

gulp.task("errors", ["clean-errors"], function() {
return gulp.src(paths.errors_main)
.pipe($.sass({
sass: paths.errors.sass,
imagePath: paths.errors.images,
includePaths: paths.errors.includePaths
}))
.pipe($.autoprefixer(["last 1 version", "> 1%", "ff >= 20", "ie >= 8", "opera >= 12", "Android >= 2.2"], { cascade: true }))
.pipe(gulp.dest("errors/css"))
.pipe($.rename({ suffix: ".min" })) // génère une version minimifié
.pipe($.minifyCss())
.pipe(gulp.dest("errors/css"));
});

gulp.task("stylesheet", ["sprite"], function() {
return gulp.src(paths.stylesheet)
return gulp.src(paths.styles_main)
.pipe($.sass({
sass: paths.sass.sass,
imagePath: paths.sass.images,
includePaths: paths.sass.includePaths
sass: paths.styles.sass,
imagePath: paths.styles.images,
includePaths: paths.styles.includePaths
}))
.pipe($.autoprefixer(["last 1 version", "> 1%", "ff >= 20", "ie >= 8", "opera >= 12", "Android >= 2.2"], { cascade: true }))
.pipe(gulp.dest("dist/css"))
Expand Down Expand Up @@ -71,7 +96,7 @@ gulp.task("sprite", function() {
}
}));
sprite.img.pipe(gulp.dest("dist/images"));
sprite.css.pipe(gulp.dest(paths.sass.sass));
sprite.css.pipe(gulp.dest(paths.styles.sass));
return sprite.css;
});

Expand Down Expand Up @@ -115,17 +140,23 @@ gulp.task("merge-scripts", ["script", "vendors"], function() {

gulp.task("watch", function(cb) {
gulp.watch(paths.scripts, ["script"]);
gulp.watch(paths.copy, ["copy"]);
gulp.watch(paths.smiley, ["smileys"]);
gulp.watch(paths.images, ["images"]);
gulp.watch(paths.scss, ["stylesheet"]);
gulp.watch(paths.styles_path, ["stylesheet"]);
gulp.watch(paths.errors_path, ["errors"]);
gulp.watch(paths.sprite, ["sprite", "stylesheet"]);

gulp.watch("dist/*/**", function(file) {
filePath = path.join("static/", path.relative(path.join(__dirname, "dist/"), file.path)); // Pour que le chemin ressemble à static/.../...
var filePath = path.join("static/", path.relative(path.join(__dirname, "dist/"), file.path)); // Pour que le chemin ressemble à static/.../...
$.livereload.changed(filePath);
});

gulp.watch("errors/*/**", function(file) {
setImmediate(function(){
$.livereload.changed(file.path);
});
});

$.livereload.listen();
});

Expand All @@ -135,11 +166,6 @@ gulp.task("test", function() {
.pipe($.jshint.reporter("jshint-stylish"));
});

gulp.task("copy", function() {
return gulp.src(paths.copy)
.pipe(gulp.dest("dist/"));
});

gulp.task("pack", ["build"], function() {
return gulp.src(["dist/*/**", "!dist/pack.zip"])
.pipe($.zip("pack.zip"))
Expand All @@ -149,6 +175,6 @@ gulp.task("pack", ["build"], function() {
gulp.task("travis", ["test"]);


gulp.task("build", ["smileys", "images", "sprite", "stylesheet", "vendors", "script", "merge-scripts", "copy"]);
gulp.task("build", ["smileys", "images", "sprite", "stylesheet", "vendors", "script", "merge-scripts"]);

gulp.task("default", ["build", "watch"]);
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pip install --upgrade -r requirements.txt
Pour bénéficier de données de test, exécutez les commandes suivantes, dans l'ordre, à la fin des précédentes :

```console
python manage.py loaddata fixtures/users.yaml fixtures/forums.yaml fixtures/topics.yaml fixtures/mps.yaml fixtures/categories.yaml
python manage.py loaddata fixtures/users.yaml fixtures/forums.yaml fixtures/topics.yaml fixtures/mps.yaml fixtures/categories.yaml fixtures/licences.yaml

```

Expand Down
Binary file removed assets/images/favicon.ico
Binary file not shown.
6 changes: 5 additions & 1 deletion assets/js/mobile-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@
if(parseInt($("html").css("width")) < 960 && !disableMobileMenu){
var $newBtns = $(".sidebar .new-btn:not(.mobile-btn-imported)");
if($newBtns.length > 0){
var $prevElem = $("#content > .content-wrapper, #content > .full-content-wrapper").find("h1, h2");
var $prevElem = $("#content")
.find("> .content-wrapper, > .full-content-wrapper, > .content-col-2")
.first()
.find("h1, h2")
.first();
if($prevElem.next(".license").length > 0)
$prevElem = $prevElem.next(".license");
if($prevElem.next(".subtitle").length > 0)
Expand Down
2 changes: 1 addition & 1 deletion assets/js/zen-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"use strict";

if($(".article-content").length > 0){
$(".content-container .taglist + .authors").before($("<button/>", {
$(".content-container .taglist ~ .authors").before($("<button/>", {
"class": "btn btn-grey ico-after view open-zen-mode",
"text": "Lecture zen",
"click": function(e){
Expand Down
1 change: 0 additions & 1 deletion assets/misc/css/newsletter.css

This file was deleted.

13 changes: 0 additions & 13 deletions assets/misc/js/newsletter.js

This file was deleted.

97 changes: 69 additions & 28 deletions assets/scss/_all-supports.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@
background: url('../images/logo.png') no-repeat center center;
background-size: 100% auto;

&.oldie {
width: 240px;
}
&:hover,
&:focus {
opacity: .7;
Expand Down Expand Up @@ -1048,19 +1045,24 @@
}

.member-item {
margin-right: 7px;

.avatar {
margin-top: -2px;
height: 20px;
width: 20px;
border: 1px solid #CCC;
}

.avatar + span {
padding-left: 3px;
}

&:hover .avatar {
border-color: #999;
}
}
.member-item + .member-item {
margin-left: 7px;
}
.authors .member-item {
margin-right: 0;
margin-left: 7px;
Expand Down Expand Up @@ -1774,9 +1776,11 @@
}
}

.content-wrapper.comment-author,
.comment-author {
background: #EEE;
padding: 7px 15px;
margin-bottom: 20px;

blockquote {
margin: 10px 0;
Expand Down Expand Up @@ -2007,16 +2011,26 @@
margin: 0;
}

// touche
kbd {
$kbd-color: #F1F1F1;
$kbd-color: #F8F6EA;
background-color: $kbd-color;
padding: 2px 6px;
border-radius: 3px;
border-bottom: solid 2px desaturate(darken($kbd-color, 20%), 10%);
border: solid 1px desaturate(darken($kbd-color, 15%), 10%);
border-bottom-width: 3px;
text-shadow: 0 1px 0 #FFF;
color: darken($kbd-color, 70%);
}

// Code inline
p code {
color: #A00;
background: #EEE;
border: 1px solid #CCC;
padding: 0 5px;
}

mathjax {
font-size: 16px;
font-size: 1.6rem;
Expand Down Expand Up @@ -2099,6 +2113,7 @@ table {
}

tbody tr {
background: #FDFDFD;
border-bottom: 1px solid #DDD;

&:nth-child(2n+1) {
Expand Down Expand Up @@ -2178,21 +2193,6 @@ table {
width: 58px;
}
}
.badge {
display: block;
width: 60px;
height: 25px;
line-height: 25px;
text-align: center;
text-transform: uppercase;
color: #EEE;
text-shadow: rgba(0, 0, 0, .25) 0 0 3px;
background: #777;

&.staff {
background: #48a200;
}
}
.user-metadata {
width: 60px;
height: 25px;
Expand Down Expand Up @@ -2368,10 +2368,6 @@ table {
text-indent: 20px;
}

.member-item {
margin: 0;
}

textarea {
margin: 10px 0 10px -1px;
background-color: transparent;
Expand Down Expand Up @@ -2429,8 +2425,8 @@ table {
}
}
}
.upvote,
.downvote {
span.upvote,
span.downvote {
&:not(.has-vote) {
border-bottom: none;
opacity: .5;
Expand Down Expand Up @@ -2592,6 +2588,51 @@ form.topic-message {
margin-top: 50px;
}

.badge {
display: block;
width: 60px;
height: 25px;
line-height: 25px;
text-align: center;
text-transform: uppercase;
color: #EEE;
text-shadow: rgba(0, 0, 0, .25) 0 0 3px;
background: #777;

&.staff {
background: #48a200;
}
}





/* ==============
ALL: Main / Profile
============== */

.member-card {
.member-avatar {
float: left;
width: 60px;
}
.member-infos {
float: left;
list-style: none;
margin: 0;
padding-left: 15px;
}
}

.member-social {
list-style: none;
margin: 15px 0 0;
padding: 0;
}





/* ==============
Expand Down
6 changes: 6 additions & 0 deletions assets/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,10 @@ nav {

.clearfix {
*zoom: 1;
}

hr.clearfix {
clear: both;
height: 0;
border: none;
}
6 changes: 5 additions & 1 deletion assets/scss/_wide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
content: "Quitter la ";
}

.reactions-title,
.comments-title,
.pagination:not(.pagination-chapter),
.topic-message {
display: none;
Expand Down Expand Up @@ -477,6 +477,10 @@
.full-content-wrapper {
margin: 0 0 0 4%;

&.without-margin {
margin: 0;
}

.content-wrapper {
max-width: none;
margin: 0;
Expand Down
Loading

0 comments on commit a4a9668

Please sign in to comment.