Skip to content

Commit

Permalink
Finish v15.7-gaston
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceFox committed Sep 3, 2015
2 parents 150cc87 + c5ee759 commit 3fbacb5
Show file tree
Hide file tree
Showing 51 changed files with 959 additions and 252 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ base.db

/.tmp

/scripts/release_summary.md

# Front files
/node_modules
/dist
Expand Down
21 changes: 10 additions & 11 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var gulp = require("gulp"),
$ = require("gulp-load-plugins")(),
sprite = require("css-sprite").stream,
sprite = require("sprity"),
path = require("path"),
del = require("del");

Expand All @@ -12,7 +12,7 @@ var sourceDir = "assets",
scriptsDir = "js",
vendorsDir = "vendors",
spriteDir = "sprite",
stylesFiles = ["main.scss", "only-ie.scss"],
stylesFiles = ["main.scss"],
vendorsCSS = ["node_modules/normalize.css/normalize.css"],
vendorsJS = ["node_modules/jquery/dist/jquery.js", "node_modules/cookies-eu-banner/dist/cookies-eu-banner.js"],
autoprefixerConfig = ["last 1 version", "> 1%", "ff >= 20", "ie >= 8", "opera >= 12", "Android >= 2.2"],
Expand Down Expand Up @@ -113,16 +113,15 @@ gulp.task("errors", ["clean-errors"], function() {
* Generates Sprite files (SASS + image)
*/
gulp.task("sprite", function() {
return gulp.src(path.join(sourceDir, imagesDir, spriteDir, "*"))
.pipe(sprite({
name: "sprite",
style: "_sprite.scss",
return sprite.src({
cssPath: "../" + imagesDir + "/",
retina: true,
prefix: "sprite-icon",
processor: "scss",
template: path.join(sourceDir, sassDir, "sprite-template.mustache")
}))
dimension: [{ ratio: 1, dpi: 72 },
{ ratio: 2, dpi: 192 }],
margin: 0,
src: path.join(sourceDir, imagesDir, spriteDir, "*"),
style: "_sprite.scss",
template: path.join(sourceDir, sassDir, "sprite-template.hbs")
})
.pipe($.if("*.png", gulp.dest(path.join(destDir, imagesDir)), gulp.dest(path.join(sourceDir, sassDir))));
});

Expand Down
14 changes: 9 additions & 5 deletions assets/js/accessibility-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

(function($, undefined){
"use strict";
$("#accessibility a").on("focus", function(){

$("#accessibility a").on("focus", function() {
$(".dropdown:visible").parent().find(".active").removeClass("active");
$("#accessibility").addClass("focused");
});
$("#accessibility a").on("blur", function(){
}).on("blur", function() {
$("#accessibility").removeClass("focused");
}).on("click", function() {
var link = $(this).attr("href");
setTimeout(function() { // Forces the focus on next tick
$(link).find(":tabbable").first().focus(); // Focus the first focusable element
});
});
})(jQuery);
})(jQuery);
4 changes: 2 additions & 2 deletions assets/scss/base/_high-pixel-ratio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.breadcrumb ol li:not(:last-child):after,
input[type=radio]:checked,
input[type=checkbox]:checked {
@include sprite-retina();
@include sprite-2x();
}
}

Expand All @@ -25,7 +25,7 @@
only screen and (min-resolution: 2dppx) and #{$media-mobile-tablet} {

.js.enable-mobile-menu .mobile-menu-hide .page-container .mobile-menu-btn:after {
@include sprite-retina();
@include sprite-2x();
}

.page-container .header-logo-link {
Expand Down
24 changes: 15 additions & 9 deletions assets/scss/components/_content-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,14 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
.content-meta {
padding-top: 1px;

.content-pubdate {
display: none;
}

&:not(.inline) > * {
display: block;
&:not(.inline) {
.content-pubdate {
display: none;
}

& > * {
display: block;
}
}
}
}
Expand All @@ -337,9 +339,13 @@ $content-reaction-offset: -14px; // -30px to not offset the meta

@media only screen and #{$media-mobile-tablet} {
.full-content-wrapper .content-item {
.content-info * {
margin: 0 !important;
padding: 0 !important;
.content-info {
h3 {
padding: 0 !important;
}
p:not(.content-meta) {
margin: 0 !important;
}
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions assets/scss/components/_featured-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,10 @@
flex: 1;
}
}

@media only screen and #{$media-mobile} {
.featured-resource-edit-form {
flex-direction: column;
align-items: unset;
}
}
6 changes: 3 additions & 3 deletions assets/scss/components/_header-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
}
form {
input {
padding: 8px 10px;
height: 14px;
padding: 6px 10px;
height: 18px;
width: 150px;
}
button {
Expand All @@ -112,4 +112,4 @@
line-height: 30px;
}
}
}
}
4 changes: 2 additions & 2 deletions assets/scss/components/_topic-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
.topic-title,
.topic-subtitle {
display: block;
margin: 0;
margin: 0 !important;
padding: 0;
}
.topic-title {
Expand Down Expand Up @@ -350,4 +350,4 @@
}
}
}
}
}
9 changes: 8 additions & 1 deletion assets/scss/layout/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -458,4 +458,11 @@
}
}
}
}
}

@media only screen and #{$media-mobile} {
.main .content-container .article-content .btn {
float: none;
text-align: center;
}
}
3 changes: 1 addition & 2 deletions assets/scss/layout/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@

.header-container header .header-menu {
float: left;
width: 34%;
width: 40%;
margin-left: .5%;

.header-menu-list > li > a {
Expand Down Expand Up @@ -466,7 +466,6 @@

@media only screen and #{$media-extra-wide} {
.header-container header .header-menu {
width: 40%;
margin-left: 5%;
}
}
Expand Down
3 changes: 2 additions & 1 deletion assets/scss/layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
border-right: 7px solid transparent;
}

img, span {
img,
span:not(.wide) {
vertical-align: middle;
}

Expand Down
58 changes: 0 additions & 58 deletions assets/scss/only-ie.scss

This file was deleted.

3 changes: 1 addition & 2 deletions assets/scss/pages/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ $content-width: 1145px;
&:after {
margin: 16px;
@include sprite-position($search);
//@include sprite-width($search);
width: 17px; // sprite-width's output (16px) isn't correct for some reason...
@include sprite-width($search);
@include sprite-height($search);
}
}
Expand Down
32 changes: 32 additions & 0 deletions assets/scss/sprite-template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{! Based on https://github.com/sprity/sprity-sass/blob/master/template/scss.hbs }}

{{#each layouts}}
{{#each layout.items}}
${{#if ../../opt.split}}{{cssesc ../../name}}-{{/if}}{{cssesc meta.name}}: -{{baseDim x}}px -{{baseDim y}}px {{baseDim width}}px {{baseDim height}}px;
{{/each}}
{{/each}}

@mixin sprite-width($sprite) {
width: nth($sprite, 3);
}

@mixin sprite-height($sprite) {
height: nth($sprite, 4);
}

@mixin sprite-position($sprite) {
$sprite-offset-x: nth($sprite, 1);
$sprite-offset-y: nth($sprite, 2);
background-position: $sprite-offset-x $sprite-offset-y;
}

{{#each layouts}}
{{#each sprites}}
@mixin sprite{{#if dpi}}-{{ratio}}x{{/if}}() {
background-image: url('{{escimage url}}');
{{#if dpi}}
background-size: {{baseWidth}}px {{baseHeight}}px;
{{/if}}
}
{{/each}}
{{/each}}
47 changes: 0 additions & 47 deletions assets/scss/sprite-template.mustache

This file was deleted.

Loading

0 comments on commit 3fbacb5

Please sign in to comment.