Skip to content

Commit 4be2bd9

Browse files
Merge pull request #175 from nvisionative/release/2.1.0
Release/2.1.0
2 parents f16c0e3 + 4b6c8aa commit 4be2bd9

19 files changed

+7109
-205
lines changed

gulpfile.js

+22-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
var gulp = require('gulp'),
1+
var bs = require('browser-sync').create(),
2+
gulp = require('gulp'),
23
autoprefixer = require('gulp-autoprefixer'),
34
jshint = require('gulp-jshint'),
45
sass = require('gulp-sass'),
@@ -28,11 +29,11 @@ var paths = {
2829
dest: './dist/fonts/'
2930
},
3031
faFonts: {
31-
src: './node_modules/font-awesome/fonts/*',
32-
dest: './dist/fonts/'
32+
src: './node_modules/@fortawesome/fontawesome-free/webfonts/*',
33+
dest: './dist/webfonts/'
3334
},
3435
faCss: {
35-
src: './node_modules/font-awesome/css/font-awesome.min.css',
36+
src: './node_modules/@fortawesome/fontawesome-free/css/all.min.css',
3637
dest: './dist/css/'
3738
},
3839
slimMenu: {
@@ -43,16 +44,12 @@ var paths = {
4344
src: './node_modules/normalize.css/normalize.css',
4445
dest: './dist/css/'
4546
},
46-
bsCss: {
47-
src: './node_modules/bootstrap/dist/css/bootstrap.min.*',
48-
dest: './dist/css/'
49-
},
5047
bsJs: {
5148
src: './node_modules/bootstrap/dist/js/bootstrap.bundle.min.*',
5249
dest: './dist/js/'
5350
},
5451
images: {
55-
src: './src/images/**/*.{jpg,jpeg,png,gif}',
52+
src: './src/images/**/*.{jpg,jpeg,png,gif,svg}',
5653
dest: './dist/images/'
5754
},
5855
styles: {
@@ -107,14 +104,14 @@ function fontsInit() {
107104
.pipe(notify({message: '<%= file.relative %> distributed!', title : 'fontsInit', sound: false}));
108105
}
109106

110-
// Copy font-awesome fonts from node_modules to dist/fonts
107+
// Copy fontawesome-free fonts from node_modules to dist/fonts
111108
function faFontsInit() {
112109
return gulp.src(paths.faFonts.src)
113110
.pipe(gulp.dest(paths.faFonts.dest))
114111
.pipe(notify({message: '<%= file.relative %> distributed!', title : 'faFontsInit', sound: false}));
115112
}
116113

117-
// Copy font-awesome CSS from node_modules to dist/css
114+
// Copy fontawesome-free CSS from node_modules to dist/css/fontawesome-free
118115
function faCssInit() {
119116
return gulp.src(paths.faCss.src)
120117
.pipe(gulp.dest(paths.faCss.dest))
@@ -183,7 +180,7 @@ function images() {
183180
// Compile custom SCSS to CSS and copy to dist/css
184181
function styles() {
185182
return gulp.src(paths.styles.src, { sourcemaps: true })
186-
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
183+
.pipe(sass({includePaths: ['./node_modules']},{outputStyle: 'compressed'}).on('error', sass.logError))
187184
.pipe(cleanCSS())
188185
.pipe(rename({suffix: '.min'}))
189186
.pipe(autoprefixer({browsers: ['last 2 versions', 'ie >= 9', '> 1%']}))
@@ -301,6 +298,17 @@ function cleanup() {
301298
/*------------------------------------------------------*/
302299
/* DEV TASKS -------------------------------------------*/
303300
/*------------------------------------------------------*/
301+
//gulp serve
302+
function serve() {
303+
bs.init({
304+
proxy: "nvQuickTheme.loc"
305+
});
306+
gulp.watch(paths.images.src, images).on('change', bs.reload);
307+
gulp.watch(paths.styles.src, styles).on('change', bs.reload);
308+
gulp.watch(paths.scripts.src, scripts).on('change', bs.reload);
309+
gulp.watch(paths.containers.src, containers).on('change', bs.reload);
310+
}
311+
304312
// gulp watch
305313
function watch() {
306314
gulp.watch(paths.images.src, images);
@@ -310,7 +318,7 @@ function watch() {
310318
}
311319

312320
// gulp init
313-
var init = gulp.series(fontsInit, faFontsInit, faCssInit, slimMenuInit, normalizeInit, bsCssInit, bsJsInit);
321+
var init = gulp.series(fontsInit, faFontsInit, faCssInit, slimMenuInit, normalizeInit, bsJsInit);
314322

315323
// gulp build
316324
var build = gulp.series(init, styles, scripts, images, containers, manifest);
@@ -344,6 +352,7 @@ exports.zipelse = zipelse;
344352
exports.ziptemp = ziptemp;
345353
exports.zippackage = zippackage;
346354
exports.cleanup = cleanup;
355+
exports.serve = serve;
347356
exports.watch = watch;
348357
exports.init = init;
349358
exports.build = build;

manifest.dnn

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="9.0">
22
<packages>
3-
<package name="nvisionative.nvQuickTheme" type="Skin" version="2.0.0">
3+
<package name="nvisionative.nvQuickTheme" type="Skin" version="2.1.0">
44
<friendlyName>nvQuickTheme</friendlyName>
55
<description>A DNN Theme Dev Framework</description>
66
<iconFile>MyIcon.png</iconFile>

menus/main/MainMenu.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<li[?SELECTED] class="active"[/?]>
77

88
[?ENABLED]
9-
<a href="[=URL]" class="btn btn-primary[?NODE] split[/?]">[=TEXT]</a>
9+
<a href="[=URL]" class="btn btn-primary[?NODE] split[/?]" target="[=TARGET]">[=TEXT]</a>
1010
[?ELSE]
11-
<a href="#" class="btn btn-primary[?NODE] single[/?]">[=TEXT]</a>
11+
<a href="#" class="btn btn-primary[?NODE] single[/?]" target="[=TARGET]">[=TEXT]</a>
1212
[/?]
1313

1414
[?NODE]
@@ -23,9 +23,9 @@
2323
<li class="[?SELECTED] active[/?]">
2424

2525
[?ENABLED]
26-
<a href="[=URL]" [?NODE]class="split"[/?]>[=TEXT]</a>
26+
<a href="[=URL]" [?NODE]class="split"[/?] target="[=TARGET]">[=TEXT]</a>
2727
[?ELSE]
28-
<a href="#">[=TEXT]</a>
28+
<a href="#" target="[=TARGET]">[=TEXT]</a>
2929
[/?]
3030

3131
[?NODE]

menus/razor/RazorMenu.cshtml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@using DotNetNuke.Web.DDRMenu;
2+
@using System.Dynamic;
3+
@inherits DotNetNuke.Web.Razor.DotNetNukeWebPage<dynamic>
4+
5+
<ul class="slimmenu normal" id="navigation">
6+
@RenderPages(Model.Source.root.Children)
7+
</ul>
8+
9+
@helper RenderPages(IEnumerable<MenuNode> pages)
10+
{
11+
if (!pages.Any())
12+
{
13+
return;
14+
}
15+
16+
foreach (var page in pages)
17+
{
18+
var hasChildren = page.HasChildren();
19+
var split = hasChildren ? "split" : string.Empty;
20+
var single = hasChildren ? "single" :string.Empty;
21+
22+
<li class="@(page.Selected ? "active" : string.Empty)">
23+
@if (page.Enabled)
24+
{
25+
<a href="@page.Url" class="btn btn-primary @split" target="@page.Target">@page.Text</a>
26+
}
27+
else
28+
{
29+
<a href="#" class="btn btn-primary @single" target="@page.Target">@page.Text</a>
30+
}
31+
32+
@if (hasChildren)
33+
{
34+
<ul>
35+
@RenderNestedPages(page.Children)
36+
</ul>
37+
}
38+
</li>
39+
}
40+
}
41+
42+
@helper RenderNestedPages(IEnumerable<MenuNode> pages)
43+
{
44+
foreach (var page in pages)
45+
{
46+
var hasChildren = page.HasChildren();
47+
var split = hasChildren ? "split" : string.Empty;
48+
49+
<li class="@(page.Selected ? "active" : string.Empty)">
50+
@if (page.Enabled)
51+
{
52+
<a href="@page.Url" class="@split" target="@page.Target">@page.Text</a>
53+
}
54+
else
55+
{
56+
<a href="#" target="@page.Target">@page.Text</a>
57+
}
58+
59+
@if (hasChildren)
60+
{
61+
<ul>
62+
@RenderNestedPages(page.Children)
63+
</ul>
64+
}
65+
</li>
66+
}
67+
}

menus/razor/menudef.xml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<manifest>
3+
<template>RazorMenu.cshtml</template>
4+
</manifest>

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "nvquicktheme",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Barebones Bootstrap 4 DNN Theme",
55
"main": "gulpfile.js",
66
"author": "nvisionative",
77
"license": "GPL-3.0",
88
"private": true,
99
"dependencies": {
10-
"bootstrap": "4.2.1",
11-
"font-awesome": "^4.7.0",
10+
"@fortawesome/fontawesome-free": "^5.9.0",
11+
"bootstrap": "^4.3.1",
1212
"normalize.css": "^8.0.1"
1313
},
1414
"devDependencies": {
15-
"gulp": "^4.0.0",
15+
"browser-sync": "^2.26.7",
16+
"gulp": "^4.0.2",
1617
"gulp-autoprefixer": "^6.0.0",
1718
"gulp-clean": "^0.4.0",
1819
"gulp-clean-css": "^4.0.0",

partials/_header.ascx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<header class="bg-light-grey">
2-
<div class="container-fluid user-controls bg-tertiary">
2+
<div class="container-fluid bg-tertiary">
33
<div class="container">
4-
<div class="row justify-content-end">
4+
<div class="row user-controls justify-content-end">
55
<ul>
66
<li><dnn:Login runat="server" id="dnnLogin" /></li>
77
<li><dnn:User runat="server" id="dnnUser" /></li>
8-
<li><dnn:Search runat="server" id="dnnSearch" ShowSite="false" ShowWeb="false" Submit="<i class='fa fa-search'></i>" /></li>
8+
<li><dnn:Search runat="server" id="dnnSearch" ShowSite="false" ShowWeb="false" Submit="<i class='fas fa-search'></i>" /></li>
99
<li style="display:none;"><dnn:Language runat="server" id="dnnLanguage" ShowMenu="false" ShowLinks="false" /></li>
1010
</ul>
1111
</div>
@@ -16,7 +16,7 @@
1616
<div class="row nav-main">
1717
<dnn:LOGO id="dnnLOGO" runat="server" />
1818
<nav id="nav-items">
19-
<dnn:MENU id="menu" MenuStyle="menus/main" runat="server" NodeSelector="*"></dnn:MENU>
19+
<dnn:MENU id="menu" MenuStyle="menus/razor" runat="server" NodeSelector="*"></dnn:MENU>
2020
</nav>
2121
</div>
2222
</div>

partials/_includes.ascx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<dnn:META ID="mobileScale" runat="server" Name="viewport" Content="width=device-width, initial-scale=1.0" />
22
<dnn:DnnCssExclude runat="server" Name="dnndefault" />
33

4-
<dnn:DnnCssInclude runat="server" FilePath="dist/css/bootstrap.min.css" Priority="100" PathNameAlias="SkinPath" />
5-
<dnn:DnnCssInclude runat="server" FilePath="dist/css/font-awesome.min.css" Priority="110" PathNameAlias="SkinPath" />
6-
<dnn:DnnCssInclude runat="server" FilePath="dist/css/style.min.css" Priority="120" PathNameAlias="SkinPath" />
4+
<dnn:DnnCssInclude runat="server" FilePath="dist/css/all.min.css" Priority="100" PathNameAlias="SkinPath" />
5+
<dnn:DnnCssInclude runat="server" FilePath="dist/css/style.min.css" Priority="110" PathNameAlias="SkinPath" />
76

87
<dnn:DnnJsInclude runat="server" FilePath="dist/js/jquery.slimmenu.min.js" ForceProvider="DnnFormBottomProvider" Priority="100" PathNameAlias="SkinPath" />
98
<dnn:DnnJsInclude runat="server" FilePath="dist/js/bootstrap.bundle.min.js" ForceProvider="DnnFormBottomProvider" Priority="110" PathNameAlias="SkinPath" />

project-details.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"project": "nvQuickTheme",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"author": "TK Sheppard &amp; David Poindexter",
55
"company": "nvisionative",
66
"url": "www.nvquicktheme.com",

src/assets/jquery.slimmenu.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scss/autoload/_autoload.scss

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import 'bootstrap';

src/scss/autoload/_bootstrap.scss

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import 'bootstrap/scss/bootstrap';

src/scss/components/_components.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@import 'dnn';
2+
@import 'login';
23
@import 'buttons';
34
@import 'fonts';
45
@import 'grid';
56
@import 'helpers';
6-
@import 'nav';
7+
@import 'nav';
8+
@import 'search';

0 commit comments

Comments
 (0)