From 518f4aba5b39a85eda256c47dbb939142e7dae93 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 16:10:29 -0700 Subject: [PATCH 04/19] changed animation --- js/stanford_soe_regions_megamenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/stanford_soe_regions_megamenu.js b/js/stanford_soe_regions_megamenu.js index a5815ea..fcd196e 100644 --- a/js/stanford_soe_regions_megamenu.js +++ b/js/stanford_soe_regions_megamenu.js @@ -7,7 +7,7 @@ //TODO: hook topics link to dropdown action $('.menu-name-menu-magazine ul a').first().click(function(e) { e.preventDefault(); - $('#digital-magazine-megamenu').toggle( "slow", function() { + $('#digital-magazine-megamenu').slideToggle( "slow", function() { // Animation complete. }); }); From 98877ffd07a1c478b24ac876fb4004ca898429bd Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 16:42:17 -0700 Subject: [PATCH 05/19] adding overlay --- css/stanford_soe_regions_megamenu.css | 15 +++++++++++++++ js/stanford_soe_regions_megamenu.js | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/css/stanford_soe_regions_megamenu.css b/css/stanford_soe_regions_megamenu.css index e69de29..6176b7b 100644 --- a/css/stanford_soe_regions_megamenu.css +++ b/css/stanford_soe_regions_megamenu.css @@ -0,0 +1,15 @@ +#digital-magazine-megamenu { + width: 1170px; + margin-left: auto; + margin-right: auto; +} +#digital-magazine-megamenu .container { + position: absolute; + width: 1170px; + z-index: 9999; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + +} diff --git a/js/stanford_soe_regions_megamenu.js b/js/stanford_soe_regions_megamenu.js index fcd196e..0e73008 100644 --- a/js/stanford_soe_regions_megamenu.js +++ b/js/stanford_soe_regions_megamenu.js @@ -2,12 +2,13 @@ $(document).ready(function(){ //Do Stuff... //var megamenu = '
Yo, I\'m Stuff
'; - $('#digital-magazine-megamenu').insertAfter('#fullwidth-top');$('.dm-megamenu').css('display', 'none'); - $('#digital-magazine-megamenu').css('display', 'none'); + //$('#digital-magazine-megamenu').insertAfter('#fullwidth-top');$('.dm-megamenu').css('display', 'none'); + var megamenu = $('#digital-magazine-megamenu .container'); + $(megamenu).css('display', 'none'); //TODO: hook topics link to dropdown action $('.menu-name-menu-magazine ul a').first().click(function(e) { e.preventDefault(); - $('#digital-magazine-megamenu').slideToggle( "slow", function() { + $('#digital-magazine-megamenu .container').slideToggle( "slow", function() { // Animation complete. }); }); From 00b0990f9598d0d51bee8794e9a54dea929ca973 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 18:08:58 -0700 Subject: [PATCH 06/19] structural css for megamenu --- css/stanford_soe_regions_megamenu.css | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/css/stanford_soe_regions_megamenu.css b/css/stanford_soe_regions_megamenu.css index 6176b7b..8996495 100644 --- a/css/stanford_soe_regions_megamenu.css +++ b/css/stanford_soe_regions_megamenu.css @@ -1,15 +1,17 @@ #digital-magazine-megamenu { - width: 1170px; - margin-left: auto; - margin-right: auto; + z-index: 9999; } #digital-magazine-megamenu .container { position: absolute; - width: 1170px; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 0; - + margin-left: auto; + margin-right: auto; + background-color: #9ca4ab; +} +.region-digital-magazine-megamenu { + width: 1170px; } From baa3bdf9320e3fee6ab2f1619fd458fa5ba5f3c4 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 18:21:06 -0700 Subject: [PATCH 07/19] interaction mods --- js/stanford_soe_regions_megamenu.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/stanford_soe_regions_megamenu.js b/js/stanford_soe_regions_megamenu.js index 0e73008..2c4acdf 100644 --- a/js/stanford_soe_regions_megamenu.js +++ b/js/stanford_soe_regions_megamenu.js @@ -1,14 +1,12 @@ (function ($) { $(document).ready(function(){ //Do Stuff... - //var megamenu = '
Yo, I\'m Stuff
'; - //$('#digital-magazine-megamenu').insertAfter('#fullwidth-top');$('.dm-megamenu').css('display', 'none'); var megamenu = $('#digital-magazine-megamenu .container'); $(megamenu).css('display', 'none'); - //TODO: hook topics link to dropdown action - $('.menu-name-menu-magazine ul a').first().click(function(e) { + var topics = $('.menu-name-menu-magazine ul a').first(); + $(topics).click(function(e) { e.preventDefault(); - $('#digital-magazine-megamenu .container').slideToggle( "slow", function() { + $(megamenu).slideToggle( "slow", function() { // Animation complete. }); }); From dbbd949a264d2a2ffa247073ee61215a31408388 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 20:53:58 -0700 Subject: [PATCH 08/19] initial config for sass --- Gruntfile.js | 26 +++++++++++++++++++ package.json | 25 ++++++++++++++++++ scss/components/_soe_components.scss | 8 ++++++ .../components/_soe_dm_megamenu.scss | 0 scss/soe_regions.scss | 4 +++ 5 files changed, 63 insertions(+) create mode 100644 Gruntfile.js create mode 100644 package.json create mode 100644 scss/components/_soe_components.scss rename css/stanford_soe_regions.scss => scss/components/_soe_dm_megamenu.scss (100%) create mode 100644 scss/soe_regions.scss diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..ab351d3 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,26 @@ +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + sass: { + options: { + lineNumbers: true, + sourcemap: 'none' + }, + dist: { + files: { + 'css/soe_helper.css': 'scss/soe_helper.scss' + } + } + }, + watch: { + css: { + files: '**/*.scss', + tasks: ['sass'] + } + } + }); + grunt.loadNpmTasks('grunt-sass'); + grunt.loadNpmTasks('grunt-contrib-sass'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.registerTask('default', ['watch']); +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..7690af9 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "stanford_soe_regions", + "description": "SCSS for School of Engineering custom regions.", + "author": "", + "version": "1.0.0", + "homepage": "https://github.com/SU-SOE/stanford_soe_regions#readme", + "license": "MIT", + "keywords": [ + "css", + "scss" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/SU-SOE/stanford_soe_regions.git" + }, + "bugs": { + "url": "https://github.com/SU-SOE/stanford_soe_regions/issues" + }, + "devDependencies": { + "grunt": "^1.0.1", + "grunt-contrib-sass": "^1.0.0", + "grunt-contrib-watch": "^1.0.0", + "grunt-sass": "^2.0.0" + } +} diff --git a/scss/components/_soe_components.scss b/scss/components/_soe_components.scss new file mode 100644 index 0000000..d89f40a --- /dev/null +++ b/scss/components/_soe_components.scss @@ -0,0 +1,8 @@ +@charset "UTF-8"; + +//// +/// ROLL UP +/// + +@import + 'soe_dm_megamenu'; diff --git a/css/stanford_soe_regions.scss b/scss/components/_soe_dm_megamenu.scss similarity index 100% rename from css/stanford_soe_regions.scss rename to scss/components/_soe_dm_megamenu.scss diff --git a/scss/soe_regions.scss b/scss/soe_regions.scss new file mode 100644 index 0000000..4073fb4 --- /dev/null +++ b/scss/soe_regions.scss @@ -0,0 +1,4 @@ +@charset "UTF-8"; + +@import + 'components/soe_dm_megamenu' From ac8023ada286cc93e7eb15d9328ffbe1ab75ccee Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 20:57:36 -0700 Subject: [PATCH 09/19] added rollup to parent --- scss/soe_regions.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/soe_regions.scss b/scss/soe_regions.scss index 4073fb4..36db980 100644 --- a/scss/soe_regions.scss +++ b/scss/soe_regions.scss @@ -1,4 +1,4 @@ @charset "UTF-8"; @import - 'components/soe_dm_megamenu' + 'components/soe_components' From 47066cab74f5d5afb43ed60c38a8b39010caea66 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 21:02:55 -0700 Subject: [PATCH 10/19] removed unused scss file --- css/stanford_soe_regions_megamenu.scss | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 css/stanford_soe_regions_megamenu.scss diff --git a/css/stanford_soe_regions_megamenu.scss b/css/stanford_soe_regions_megamenu.scss deleted file mode 100644 index e69de29..0000000 From 5f15afc7d76508a673897b98d529f372dbda7ab8 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 21:14:35 -0700 Subject: [PATCH 11/19] making things extensible --- Gruntfile.js | 2 +- ...ns_megamenu.css => soe_regions_megamenu.css} | 0 scss/components/_soe_dm_megamenu.scss | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) rename css/{stanford_soe_regions_megamenu.css => soe_regions_megamenu.css} (100%) diff --git a/Gruntfile.js b/Gruntfile.js index ab351d3..132df26 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,7 +8,7 @@ module.exports = function(grunt) { }, dist: { files: { - 'css/soe_helper.css': 'scss/soe_helper.scss' + 'css/soe_regions.css': 'scss/soe_regions.scss' } } }, diff --git a/css/stanford_soe_regions_megamenu.css b/css/soe_regions_megamenu.css similarity index 100% rename from css/stanford_soe_regions_megamenu.css rename to css/soe_regions_megamenu.css diff --git a/scss/components/_soe_dm_megamenu.scss b/scss/components/_soe_dm_megamenu.scss index e69de29..8996495 100644 --- a/scss/components/_soe_dm_megamenu.scss +++ b/scss/components/_soe_dm_megamenu.scss @@ -0,0 +1,17 @@ +#digital-magazine-megamenu { + z-index: 9999; +} +#digital-magazine-megamenu .container { + position: absolute; + z-index: 9999; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + margin-left: auto; + margin-right: auto; + background-color: #9ca4ab; +} +.region-digital-magazine-megamenu { + width: 1170px; +} From 2202f664cdddcea42454dc52bfef4b65496687e4 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 21:18:25 -0700 Subject: [PATCH 12/19] adding ignore --- .gitignore | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c9a6fd --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# Numerous always-ignore extensions +*.diff +*.err +*.orig +*.log +*.rej +*.swo +*.swp +*.vi +*~ + +# OS or Editor folders +.DS_Store +.cache +.idea +.sass-cache +.project +.settings +.tmproj +nbproject +Thumbs.db +config.rb +*.scssc +*.sassc +*.map + +# Folders to ignore +.hg +.svn +.CVS +cgi-bin +node_modules From 6ba4c5d8c64970ef6d223a4632b65e7b2e36329b Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 21:25:32 -0700 Subject: [PATCH 13/19] updated README --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 9bd5257..122c93f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,18 @@ Install this module like any other module. [See Drupal Documentation](https://dr Configuration --- +Developer +--- + +If you wish to develop on this module you will most likely need to compile some new css. Please use the sass structure provided and compile with the sass compiler packaged in this module. To install: + +``` +npm install +grunt watch + or +grunt devmode +``` + Troubleshooting --- From 615beac940dfa50c19043ce945d9dce0ec433d91 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Fri, 28 Apr 2017 21:58:18 -0700 Subject: [PATCH 14/19] scss structure --- Gruntfile.js | 4 +++- css/soe_regions.css | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 css/soe_regions.css diff --git a/Gruntfile.js b/Gruntfile.js index 132df26..7fb95f2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,7 +4,8 @@ module.exports = function(grunt) { sass: { options: { lineNumbers: true, - sourcemap: 'none' + sourcemap: 'none', + keepSpecialComments: false }, dist: { files: { @@ -23,4 +24,5 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['watch']); + grunt.registerTask('default', ['stripCssComments']); } diff --git a/css/soe_regions.css b/css/soe_regions.css new file mode 100644 index 0000000..7db7b1b --- /dev/null +++ b/css/soe_regions.css @@ -0,0 +1,19 @@ +/* line 1, ../scss/components/_soe_dm_megamenu.scss */ +#digital-magazine-megamenu { + z-index: 9999; } + +/* line 4, ../scss/components/_soe_dm_megamenu.scss */ +#digital-magazine-megamenu .container { + position: absolute; + z-index: 9999; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + margin-left: auto; + margin-right: auto; + background-color: #9ca4ab; } + +/* line 15, ../scss/components/_soe_dm_megamenu.scss */ +.region-digital-magazine-megamenu { + width: 1170px; } From d4122618dce8999fc4f468ef206f0a4dfca383de Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Sat, 29 Apr 2017 10:39:09 -0700 Subject: [PATCH 15/19] more sassy --- Gruntfile.js | 5 +++-- css/soe_regions.css | 3 --- css/soe_regions_megamenu.css | 17 ----------------- css/stanford_soe_regions.css | 4 ---- js/{stanford_soe_regions.js => soe_regions.js} | 0 package.json | 4 +++- scss/components/_soe_dm_megamenu.scss | 3 +++ stanford_soe_regions.module | 16 ++++++++-------- 8 files changed, 17 insertions(+), 35 deletions(-) delete mode 100644 css/soe_regions_megamenu.css delete mode 100644 css/stanford_soe_regions.css rename js/{stanford_soe_regions.js => soe_regions.js} (100%) diff --git a/Gruntfile.js b/Gruntfile.js index 7fb95f2..d41f106 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,9 +5,11 @@ module.exports = function(grunt) { options: { lineNumbers: true, sourcemap: 'none', - keepSpecialComments: false }, dist: { + options: { + lineNumbers: false + }, files: { 'css/soe_regions.css': 'scss/soe_regions.scss' } @@ -24,5 +26,4 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['watch']); - grunt.registerTask('default', ['stripCssComments']); } diff --git a/css/soe_regions.css b/css/soe_regions.css index 7db7b1b..5f23a11 100644 --- a/css/soe_regions.css +++ b/css/soe_regions.css @@ -1,8 +1,6 @@ -/* line 1, ../scss/components/_soe_dm_megamenu.scss */ #digital-magazine-megamenu { z-index: 9999; } -/* line 4, ../scss/components/_soe_dm_megamenu.scss */ #digital-magazine-megamenu .container { position: absolute; z-index: 9999; @@ -14,6 +12,5 @@ margin-right: auto; background-color: #9ca4ab; } -/* line 15, ../scss/components/_soe_dm_megamenu.scss */ .region-digital-magazine-megamenu { width: 1170px; } diff --git a/css/soe_regions_megamenu.css b/css/soe_regions_megamenu.css deleted file mode 100644 index 8996495..0000000 --- a/css/soe_regions_megamenu.css +++ /dev/null @@ -1,17 +0,0 @@ -#digital-magazine-megamenu { - z-index: 9999; -} -#digital-magazine-megamenu .container { - position: absolute; - z-index: 9999; - display: flex; - align-items: center; - justify-content: center; - padding: 0; - margin-left: auto; - margin-right: auto; - background-color: #9ca4ab; -} -.region-digital-magazine-megamenu { - width: 1170px; -} diff --git a/css/stanford_soe_regions.css b/css/stanford_soe_regions.css deleted file mode 100644 index ed0c577..0000000 --- a/css/stanford_soe_regions.css +++ /dev/null @@ -1,4 +0,0 @@ -#full-width-super-hero { -} - - diff --git a/js/stanford_soe_regions.js b/js/soe_regions.js similarity index 100% rename from js/stanford_soe_regions.js rename to js/soe_regions.js diff --git a/package.json b/package.json index 7690af9..6801105 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "grunt": "^1.0.1", "grunt-contrib-sass": "^1.0.0", "grunt-contrib-watch": "^1.0.0", - "grunt-sass": "^2.0.0" + "grunt-sass": "^2.0.0", + "grunt-strip-css-comments": "^1.3.0", + "grunt-stripcomments": "^0.7.2" } } diff --git a/scss/components/_soe_dm_megamenu.scss b/scss/components/_soe_dm_megamenu.scss index 8996495..a003f7b 100644 --- a/scss/components/_soe_dm_megamenu.scss +++ b/scss/components/_soe_dm_megamenu.scss @@ -15,3 +15,6 @@ .region-digital-magazine-megamenu { width: 1170px; } +.test { + +} diff --git a/stanford_soe_regions.module b/stanford_soe_regions.module index 2286524..12d67e1 100644 --- a/stanford_soe_regions.module +++ b/stanford_soe_regions.module @@ -11,32 +11,32 @@ function stanford_soe_regions_define_regions() { $region['full_width_super_hero'] = array( 'title' => 'Full Width Super Hero', - //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', - //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/soe_regions.js', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/soe_regions.css', 'render_callback' => '_full_width_super_hero_render_region', ); $region['content_body_lower'] = array( 'title' => 'Content Body Lower', - //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', - //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/soe_regions.js', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/soe_regions.css', 'render_callback' => '_content_body_lower_render_region', ); $region['full_width_middle'] = array( 'title' => 'Full Width Middle', - //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', - //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/soe_regions.js', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/soe_regions.css', 'render_callback' => '_full_width_middle_render_region', ); $region['content_body_bottom'] = array( 'title' => 'Content Body Lower', //'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions.js', - //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions.css', + //'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/soe_regions.css', 'render_callback' => '_content_body_bottom_render_region', ); $region['digital_magazine_megamenu'] = array( 'title' => 'Digital Magazine Megamenu', 'js' => drupal_get_path('module', 'stanford_soe_regions') . '/js/stanford_soe_regions_megamenu.js', - 'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/stanford_soe_regions_megamenu.css', + 'css' => drupal_get_path('module', 'stanford_soe_regions') . '/css/soe_regions.css', 'render_callback' => '_digital_magazine_megamenu_render_region', ); return $region; From 34bdd3fe06907f0e75a8ae88a5ecd5f09b0ad646 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Sat, 29 Apr 2017 10:52:54 -0700 Subject: [PATCH 16/19] sass fixes --- scss/components/_soe_dm_megamenu.scss | 6 ++---- scss/soe_regions.scss | 1 + scss/variables/_soe_dm_megamenu_colors.scss | 3 +++ scss/variables/_soe_regions_variables.scss | 8 ++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 scss/variables/_soe_dm_megamenu_colors.scss create mode 100644 scss/variables/_soe_regions_variables.scss diff --git a/scss/components/_soe_dm_megamenu.scss b/scss/components/_soe_dm_megamenu.scss index a003f7b..2b15368 100644 --- a/scss/components/_soe_dm_megamenu.scss +++ b/scss/components/_soe_dm_megamenu.scss @@ -10,11 +10,9 @@ padding: 0; margin-left: auto; margin-right: auto; - background-color: #9ca4ab; + background-color: $mm-background; } .region-digital-magazine-megamenu { width: 1170px; } -.test { - -} + diff --git a/scss/soe_regions.scss b/scss/soe_regions.scss index 36db980..f24399e 100644 --- a/scss/soe_regions.scss +++ b/scss/soe_regions.scss @@ -1,4 +1,5 @@ @charset "UTF-8"; @import + 'variables/soe_regions_variables', 'components/soe_components' diff --git a/scss/variables/_soe_dm_megamenu_colors.scss b/scss/variables/_soe_dm_megamenu_colors.scss new file mode 100644 index 0000000..1114060 --- /dev/null +++ b/scss/variables/_soe_dm_megamenu_colors.scss @@ -0,0 +1,3 @@ +@charset "UTF-8"; + +$mm-background: #9ca4ab; diff --git a/scss/variables/_soe_regions_variables.scss b/scss/variables/_soe_regions_variables.scss new file mode 100644 index 0000000..5309f4f --- /dev/null +++ b/scss/variables/_soe_regions_variables.scss @@ -0,0 +1,8 @@ +@charset "UTF-8"; + +//// +/// ROLL UP +/// + +@import + 'soe_dm_megamenu_colors' From fc67d02bad8ed1ce206ce3122ed9db83128690c0 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Sat, 29 Apr 2017 11:03:41 -0700 Subject: [PATCH 17/19] removing unnnecessary dev dependencies --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 6801105..7690af9 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,6 @@ "grunt": "^1.0.1", "grunt-contrib-sass": "^1.0.0", "grunt-contrib-watch": "^1.0.0", - "grunt-sass": "^2.0.0", - "grunt-strip-css-comments": "^1.3.0", - "grunt-stripcomments": "^0.7.2" + "grunt-sass": "^2.0.0" } } From 2170d943a867b93994140ebbf33c6297abb33f0f Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Sun, 30 Apr 2017 11:45:20 -0700 Subject: [PATCH 18/19] adding cc --- .codeclimate.yml | 134 ++++++++++++++++++++++++++++++++++++ stanford_soe_regions.module | 10 +-- 2 files changed, 139 insertions(+), 5 deletions(-) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..3d65068 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,134 @@ + +engines: + # https://docs.codeclimate.com/docs/eslint + # ES Linting requires an .eslintrc file to tweak checks. + eslint: + enabled: false + csslint: + enabled: true + checks: + overqualified-elements: + enabled: false + # We don't lint our coffee. Eew. + coffeelint: + enabled: false + # SCSS Lint requires a .scss-lint.yml file in the repo in order to tweak settings. + # Withouth the .scss-lint.yml file it will run with the defaults. + # Defaults file: https://github.com/brigade/scss-lint/blob/master/config/default.yml + scss-lint: + enabled: true + checks: + IdSelector: + enabled: false + ColorVariable: + enabled: false + PropertySortOrder: + enabled: false + SelectorDepth: + enabled: false + QualifyingElement: + enabled: false + VendorPrefix: + enabled: false + LeadingZero: + enabled: false + phpcodesniffer: + enabled: true + checks: + Drupal Commenting FunctionComment TypeHintMissing: + enabled: false + Drupal Commenting FunctionComment IncorrectTypeHint: + enabled: false + DrupalPractice Commenting CommentEmptyLine SpacingAfter: + enabled: false + Drupal NamingConventions ValidFunctionName ScopeNotCamelCaps: + enabled: false + Drupal NamingConventions ValidClassName StartWithCaptial: + enabled: false + Drupal NamingConventions ValidFunctionName NotCamelCaps: + enabled: false + DrupalPractice General ClassName ClassPrefix: + enabled: false + Drupal NamingConventions ValidClassName NoUnderscores: + enabled: false + config: + file_extensions: "php,inc,install,module,profile" + standard: "Drupal,DrupalPractice" + phpmd: + enabled: true + checks: + Design/WeightedMethodCount: + enabled: false + CleanCode/StaticAccess: + enabled: false + CleanCode/ElseExpression: + enabled: false + CleanCode/BooleanArgumentFlag: + enabled: false + UnusedFormalParameter: + enabled: false + config: + # https://phpmd.org/rules/index.html + # The following sets include everything except the controversial set. + # We can configure these further through .xml files. See docs. + rulesets: "cleancode,codesize,design,naming,unusedcode" + # Include special Drupal file extensions. + file_extensions: "inc,module,profile,php,install" + # https://docs.codeclimate.com/docs/phan + phan: + enabled: true + config: + file_extensions: "php,module,profile,inc" + # minimum-severity: 1 + ignore-undeclared: true + # quick: true + # backward-compatiility-checks: true + # dead-code-detection: true + # https://docs.codeclimate.com/docs/duplication + duplication: + enabled: true + # exclude_paths: + # - examples/ + config: + languages: + javascript: + mass_threshold: 50 + # count_threshold: 3 + php: + mass_threshold: 60 + fixme: + enabled: true + config: + strings: + - FIXME + - BUG + - TODO + - todo + - dpm + - dsm +ratings: + paths: + - "**.inc" + - "**.module" + - "**.profile" + - "**.php" + - "**.install" + - "**.scss" + - "**.sass" + - "**.js" +# exclude these files/paths +exclude_paths: +- "**.features.**" +- "**.views_default.inc" +- "**.field_group.inc" +- "**.ds.inc" +- "**.bean.inc" +- "**.context.inc" +- "test/**/*" +- "**/vendor/**/*" +- "**.min.*" +- "tests/" +- "spec/" +- "**/vendor/" +- "**.api.php" +- "*.twig" diff --git a/stanford_soe_regions.module b/stanford_soe_regions.module index 12d67e1..0192019 100644 --- a/stanford_soe_regions.module +++ b/stanford_soe_regions.module @@ -43,7 +43,7 @@ function stanford_soe_regions_define_regions() { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _full_width_super_hero_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -52,7 +52,7 @@ function _full_width_super_hero_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _content_body_lower_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -61,7 +61,7 @@ function _content_body_lower_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _full_width_middle_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -70,7 +70,7 @@ function _full_width_middle_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _content_body_bottom_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); @@ -79,7 +79,7 @@ function _content_body_bottom_render_region($block_html, $block) { } /** - * Helper function for rendering the blocks in this region + * Helper function for rendering the blocks in this region. */ function _digital_magazine_megamenu_render_region($block_html, $block) { $renderable_block = _block_get_renderable_array(array($block)); From aee5d59fb8d466fb24f700da0fcb989a62576682 Mon Sep 17 00:00:00 2001 From: Greg Garvey Date: Mon, 1 May 2017 11:32:56 -0700 Subject: [PATCH 19/19] modified scss --- Gruntfile.js | 5 +---- scss/components/_soe_components.scss | 2 +- scss/components/_soe_dm_megamenu.scss | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index d41f106..c01f146 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,13 +3,10 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON('package.json'), sass: { options: { - lineNumbers: true, + lineNumbers: false, sourcemap: 'none', }, dist: { - options: { - lineNumbers: false - }, files: { 'css/soe_regions.css': 'scss/soe_regions.scss' } diff --git a/scss/components/_soe_components.scss b/scss/components/_soe_components.scss index d89f40a..9239dd4 100644 --- a/scss/components/_soe_components.scss +++ b/scss/components/_soe_components.scss @@ -5,4 +5,4 @@ /// @import - 'soe_dm_megamenu'; + 'soe_dm_megamenu' diff --git a/scss/components/_soe_dm_megamenu.scss b/scss/components/_soe_dm_megamenu.scss index 2b15368..cf6a29f 100644 --- a/scss/components/_soe_dm_megamenu.scss +++ b/scss/components/_soe_dm_megamenu.scss @@ -15,4 +15,3 @@ .region-digital-magazine-megamenu { width: 1170px; } -