Skip to content

Commit cfc849b

Browse files
author
nvisionative
authored
Merge pull request #24 from tksheppard/master
Lots of changes/fixes
2 parents f25451e + 64d67a2 commit cfc849b

25 files changed

+132
-109
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules/
2-
build/
2+
build/
3+
dist/css/style.min.css
4+
dist/css/bootstrap.min.css

default.ascx

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222

2323
<div class="container">
2424
<div class="row">
25-
<div id="DoublePaneOneOne" class="col-md-6 pr-5" runat="server"></div>
26-
<div id="DoublePaneOneTwo" class="col-md-6 bg-light-grey" runat="server"></div>
25+
<div id="DoublePaneOneOne" class="col-md-6 cpr-5" runat="server"></div>
26+
<div id="DoublePaneOneTwo" class="col-md-6 bg-light-grey cp-5" runat="server"></div>
2727
</div>
2828
</div>
2929

3030
<div class="container-fluid bg-tertiary">
3131
<div class="container">
3232
<div class="row align-items-center">
33-
<div id="FullWidthBGDoublePaneOne" class="col-md-6" runat="server"></div>
33+
<div id="FullWidthBGDoublePaneOne" class="col-md-6 cpy-5" runat="server"></div>
3434
<div id="FullWidthBGDoublePaneTwo" class="col-md-6" runat="server"></div>
3535
</div>
3636
</div>

dist/css/bootstrap.min.css

-6
This file was deleted.

dist/css/style.min.css

-1
This file was deleted.

gulpfile.js

+29-24
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
var project = 'nvQuickTheme', // If using dev environment in live instance, this needs to be the same as your root folder name.
2-
version = '1.0.0',
3-
author = 'TK Sheppard &amp; David Poindexter',
4-
company = 'nvisionative',
5-
url = 'www.nvquicktheme.com',
6-
email = 'support@nvisionative.com',
7-
description = 'A DNN Theme Building Framework';
8-
9-
var manifest = './manifest.json';
101
var gulp = require('gulp'),
112
autoprefixer = require('gulp-autoprefixer'),
123
jshint = require('gulp-jshint'),
@@ -20,23 +11,38 @@ var gulp = require('gulp'),
2011
zip = require('gulp-zip'),
2112
clean = require('gulp-clean'),
2213
path = require('path'),
23-
config = require( manifest ),
14+
details = require('./project-details.json'),
15+
project = details.project,
16+
version = details.version,
17+
author = details.author,
18+
company = details.company,
19+
url = details.url,
20+
email = details.email,
21+
description = details.description,
22+
config = require('./pathing.json'),
2423
node = ( config.node.length )? config.node+'/' : '',
2524
assets = ( config.assets.length )? config.assets+'/' : '',
2625
src = ( config.src.length )? config.src+'/' : '',
2726
dist = ( config.dist.length )? config.dist+'/' : '',
2827
temp = ( config.temp.length )? config.temp+'/' : '',
29-
build = ( config.build.length )? config.build+'/' : '';
28+
build = ( config.build.length )? config.build+'/' : '';
29+
30+
3031

3132
/*
3233
* IMAGE/SVG TASKS
3334
------------------------------------------------------*/
3435

3536
// Compresses images for production.
3637
gulp.task('images', function() {
37-
return gulp.src( './'+src+'images/**/*.{jpg,jpeg,png,gif}' )
38-
.pipe(imagemin())
39-
.pipe(gulp.dest( './'+dist+'images/' ));
38+
return gulp.src( './images/**/*.{jpg,jpeg,png,gif}' )
39+
.pipe(imagemin({
40+
interlaced: true,
41+
progressive: true,
42+
optimizationLevel: 5,
43+
svgoPlugins: [{removeViewBox: true}]
44+
}))
45+
.pipe(gulp.dest( './dist/images/' ));
4046
});
4147

4248

@@ -56,15 +62,15 @@ gulp.task('scss', function() {
5662
.pipe(notify({message: 'Styles compiled successfully!', title : 'sass', sound: false}));
5763
});
5864

59-
// Dev Bootstrap creation.
65+
// Development Bootstrap creation.
6066
// Checks for errors and concats. Minifies. All Bootstrap CSS
6167
gulp.task('bscss', function() {
6268
return gulp.src('./'+src+assets+'bootstrap/scss/**/*.scss')
6369
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
6470
.pipe(rename({suffix: '.min'}))
6571
.pipe(autoprefixer({browsers: ['last 2 versions', 'ie >= 9', '> 1%']}))
66-
.pipe(gulp.dest( './'+dist+'/css/'))
67-
.pipe(notify({message: 'Styles compiled successfully!', title : 'sass', sound: false}));
72+
.pipe(gulp.dest( './'+dist+'css/'))
73+
.pipe(notify({message: 'Styles compiled successfully!', title : 'bootstrap', sound: false}));
6874
})
6975

7076

@@ -87,7 +93,6 @@ gulp.task('js', function() {
8793
return { message : 'JS much excellent success!',
8894
title : file.relative,
8995
sound: false,
90-
icon: path.join('node_modules/gulp-notify/node', 'gulp.png'),
9196
};
9297
}
9398
var errors = file.jshint.results.map(function (data) {
@@ -96,9 +101,8 @@ gulp.task('js', function() {
96101
}
97102
}).join("\n");
98103
return { message : file.relative + " (" + file.jshint.results.length + " errors)\n" + errors,
99-
sound: "Frog",
104+
sound: false,
100105
emitError : true,
101-
icon: path.join('node_modules/gulp-notify/node', 'gulp-error.png'),
102106
title : 'JSLint'
103107
};
104108
}))
@@ -112,7 +116,7 @@ gulp.task('js', function() {
112116

113117
gulp.task('containers', function() {
114118
gulp.src('./containers/*')
115-
.pipe(gulp.dest('../../Containers/' +project+ '/'))
119+
.pipe(gulp.dest('../../Containers/'+project+'/'))
116120
.pipe(notify({message: 'Containers updated!', title : 'containers', sound: false}));
117121
});
118122

@@ -147,9 +151,9 @@ gulp.task('init', function() {
147151

148152
});
149153

150-
// Takes the information provided at the top of this file and populates it into the dnn-manifest file.
154+
// Takes the information provided at the top of this file and populates it into the manifest.dnn file.
151155
gulp.task('manifest', function() {
152-
gulp.src('./dnn-manifest.dnn')
156+
gulp.src('./manifest.dnn')
153157
.pipe(replace(/\<package name\=\"(.*?)(?=\")/, '<package name="'+company+ '.' +project))
154158
.pipe(replace(/type\=\"Skin\" version\=\"(.*?)(?=\")/, 'type="Skin" version="'+version))
155159
.pipe(replace(/\<friendlyName\>(.*?)(?=\<)/, '<friendlyName>'+project))
@@ -187,7 +191,7 @@ gulp.task('zipcontainers', function() {
187191

188192
// Zips everything else
189193
gulp.task('zipelse', function() {
190-
return gulp.src(['./menus/**/*', './partials/*', '*.ascx', '*.xml', '*.html', '*.htm'], {base: '.'})
194+
return gulp.src(['./menus/**/*', './partials/*', '*.{ascx,xml,html,htm}'], {base: '.'})
191195
.pipe(gulp.dest('./'+temp))
192196
.pipe(replace('dist/', ''))
193197
.pipe(zip('else.zip'))
@@ -225,6 +229,7 @@ gulp.task('watch', function () {
225229
gulp.watch( src+assets+"bootstrap/scss/**/*.scss", ['bscss'])
226230
gulp.watch([ src+"js/**/*.js"], ['js'])
227231
gulp.watch( './containers/*', ['containers'])
232+
gulp.watch( './project-details.json', ['manifest'])
228233
});
229234

230235
// gulp build

dnn-manifest.dnn manifest.dnn

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<dotnetnuke type="Package" version="9.0">
22
<packages>
3-
<package name="nvisionative.nvQuickTheme" type="Skin" version="1.0.0">
3+
<package name="nvisionative.nvQuickTheme" type="Skin" version="1.2.0">
44
<friendlyName>nvQuickTheme</friendlyName>
5-
<description>A DNN Theme Building Framework</description>
5+
<description>A DNN Theme Dev Framework</description>
66
<iconFile>MyIcon.png</iconFile>
77
<owner>
88
<name>TK Sheppard &amp; David Poindexter</name>

partials/_footer.ascx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<footer>
1+
<footer class="bg-light-grey">
22
<div class="container upper">
3-
<div class="row">
3+
<div class="row py-5">
44
<div id="FooterPaneOne" class="col-md-4" runat="server"></div>
55
<div id="FooterPaneTwo" class="col-md-4" runat="server"></div>
66
<div id="FooterPaneThree" class="col-md-4" runat="server"></div>

partials/_header.ascx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<header>
2-
<div class="container-fluid user-controls">
1+
<header class="bg-light-grey">
2+
<div class="container-fluid user-controls bg-tertiary">
33
<div class="container">
44
<div class="row justify-content-end">
55
<ul>

manifest.json pathing.json

File renamed without changes.

project-details.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"project": "nvQuickTheme",
3+
"version": "1.2.0",
4+
"author": "TK Sheppard &amp; David Poindexter",
5+
"company": "nvisionative",
6+
"url": "www.nvquicktheme.com",
7+
"email": "support@nvisionative.com",
8+
"description": "A DNN Theme Dev Framework"
9+
}
File renamed without changes.

src/assets/bootstrap/scss/_variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ $container-max-widths: (
195195
// Set the number of columns and specify the width of the gutters.
196196

197197
$grid-columns: 12 !default;
198-
$grid-gutter-width: 30px !default;
198+
$grid-gutter-width: 2rem !default;
199199

200200
// Components
201201
//

src/scss/_base.scss

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ body {
1919
-webkit-font-smoothing: antialiased;
2020
}
2121

22-
h1, h2, h3, {
23-
font-family: $open-sans;
24-
}
25-
h4, h5 {
22+
h1, h2, h3, h4, h5 {
2623
font-family: $open-sans;
2724
}
2825

src/scss/components/_components.scss

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import 'dnn';
22
@import 'buttons';
33
@import 'fonts';
4-
@import 'forms';
54
@import 'grid';
65
@import 'helpers';
76
@import 'nav';

src/scss/components/_dnn.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -3304,9 +3304,8 @@ div.actionMenu .dnn_mact {
33043304

33053305
/* On Page Editor */
33063306
.eipbackimg {
3307-
margin-top:-41px !important;
3308-
margin-left:-9px !important;
33093307
height:30px !important;
3308+
z-index:1250;
33103309

33113310
&.editMode {
33123311
border:none !important;

src/scss/components/_forms.scss

Whitespace-only changes.

src/scss/components/_grid.scss

+24-30
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,37 @@
1-
// Bootstrap Grid Changes
2-
3-
/* Changes the default gutter size */
4-
$xgutter:2rem;
5-
$ygutter:4rem;
6-
7-
// Sets gutters on all cols
8-
[class^='col-'] {
9-
padding-left:$xgutter;
10-
padding-right:$xgutter;
11-
margin-top:$ygutter;
12-
margin-bottom:$ygutter;
1+
// bg clipping at gutter for cols
2+
[class*="col"] {
3+
&[class*="bg-"] {
4+
background-clip:content-box;
5+
}
136
}
147

15-
@each $breakpoint in $breakpoints {
16-
$size: nth($breakpoint, 1);
17-
$width: nth($breakpoint, 2);
8+
// Pulls information for each breakpoint
9+
@each $size, $width in $breakpoints {
1810

19-
// Upon collapse of cols at the appropriate breakpoint, adds a margin
11+
// Upon collapse of cols at the appropriate breakpoint:
2012
@include mq-max-width($width) {
13+
14+
// adds a margin to the top cols that come after cols
2115
[class^='col-#{$size}'] + [class^='col-#{$size}'] {
22-
margin-top:0;
23-
margin-bottom:$ygutter;
16+
margin-top:($cspacer * 2);
2417
}
25-
.container {
26-
max-width:1200px;
18+
19+
// adds padding to the child div of the col to even spacing
20+
.container [class^="col-#{$size}"] > div {
21+
padding-left:$cspacer !important;
22+
padding-right:$cspacer !important;
2723
}
24+
25+
// removes padding for container within fluid container
2826
.container-fluid .container {
2927
padding:0;
28+
}
3029

31-
.row {
32-
margin-left:0;
33-
margin-right:0;
30+
// switches bg clipping back to the edge of padding
31+
[class^="col-#{$size}"] {
32+
&[class*="bg-"] {
33+
background-clip:padding-box !important;
3434
}
3535
}
36-
// Adds the gutter to the left and right when collapsed
37-
[class^='col-'] {
38-
padding-left:$xgutter;
39-
padding-right:$xgutter;
40-
}
4136
}
42-
}
43-
37+
}

src/scss/components/_helpers.scss

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/* Position */
1+
// position
22
.pos-relative{
33
position: relative
44
}
55

6-
/* Cover Links */
6+
// cover links
77
.cover-link {
88
position:absolute;
99
top:0;
@@ -13,10 +13,10 @@
1313
z-index:100;
1414
}
1515

16-
/* BG Color Helpers */
16+
// bg colors
1717
[class*="bg-"] {
1818
color:white;
19-
19+
2020
&[class*="-primary"] {
2121
background-color:$primary-color !important;
2222
}
@@ -33,4 +33,28 @@
3333
pre {
3434
background:white;
3535
}
36+
}
37+
38+
// padding on div below contentpane
39+
// usage: adding cpy-4 class to a div would add padding to top and bottom of the div underneath it
40+
// mostly useful for cols with a bg color
41+
@each $size, $length in $cspacers {
42+
43+
.cp-#{$size} > div { padding: $length !important; }
44+
.cpt-#{$size} > div,
45+
.cpy-#{$size} > div {
46+
padding-top: $length !important;
47+
}
48+
.cpr-#{$size} > div,
49+
.cpx-#{$size} > div {
50+
padding-right: $length !important;
51+
}
52+
.cpb-#{$size} > div,
53+
.cpy-#{$size} > div {
54+
padding-bottom: $length !important;
55+
}
56+
.cpl-#{$size} > div,
57+
.cpx-#{$size} > div {
58+
padding-left: $length !important;
59+
}
3660
}

src/scss/mixins/_mixins.scss

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22
@return $num / ($num * 0 + 1);
33
}
44

5-
// REM Font-size with PX falleback
6-
// usage
7-
// @include font-size(13);
8-
// Output: font-size: 13px;
9-
// font-size: 1.3rem;
5+
// rem font-size with px fallback
6+
// usage: @include font-size(16)
107
@mixin font-size($sizeValue) {
118
font-size: $sizeValue + px;
129
font-size: ($sizeValue / 16) + rem;
1310
}
1411

15-
// Vertical rhythm
16-
// @include font-baseline(16,24);
12+
// vertical rhythm
13+
// usage: @include font-baseline(16,24);
1714
@mixin font-baseline($font-size, $lineheight){
1815
font-size: $font-size + px;
1916
font-size: ($font-size / $base-font-size ) + rem;
2017
line-height: ( $lineheight / $font-size / 1 );
21-
margin: 0 0 ( ($lineheight / $font-size * ( 1 / ( $lineheight / $defaultlineheight))) * .5em ) 0;
18+
margin: 0 0 ( ($lineheight / $font-size * ( 1 / ( $lineheight / $defaultlineheight))) * .5em ) 0;
2219
}
2320

2421
@mixin background-cover(){

src/scss/pages/_globals.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
main div.container, main div.container-fluid {
2+
margin-bottom: 4rem;
3+
}

0 commit comments

Comments
 (0)