Skip to content

Commit

Permalink
Merge pull request #175 from nvisionative/release/2.1.0
Browse files Browse the repository at this point in the history
Release/2.1.0
  • Loading branch information
david-poindexter authored Jul 7, 2019
2 parents f16c0e3 + 4b6c8aa commit 4be2bd9
Show file tree
Hide file tree
Showing 19 changed files with 7,109 additions and 205 deletions.
35 changes: 22 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var gulp = require('gulp'),
var bs = require('browser-sync').create(),
gulp = require('gulp'),
autoprefixer = require('gulp-autoprefixer'),
jshint = require('gulp-jshint'),
sass = require('gulp-sass'),
Expand Down Expand Up @@ -28,11 +29,11 @@ var paths = {
dest: './dist/fonts/'
},
faFonts: {
src: './node_modules/font-awesome/fonts/*',
dest: './dist/fonts/'
src: './node_modules/@fortawesome/fontawesome-free/webfonts/*',
dest: './dist/webfonts/'
},
faCss: {
src: './node_modules/font-awesome/css/font-awesome.min.css',
src: './node_modules/@fortawesome/fontawesome-free/css/all.min.css',
dest: './dist/css/'
},
slimMenu: {
Expand All @@ -43,16 +44,12 @@ var paths = {
src: './node_modules/normalize.css/normalize.css',
dest: './dist/css/'
},
bsCss: {
src: './node_modules/bootstrap/dist/css/bootstrap.min.*',
dest: './dist/css/'
},
bsJs: {
src: './node_modules/bootstrap/dist/js/bootstrap.bundle.min.*',
dest: './dist/js/'
},
images: {
src: './src/images/**/*.{jpg,jpeg,png,gif}',
src: './src/images/**/*.{jpg,jpeg,png,gif,svg}',
dest: './dist/images/'
},
styles: {
Expand Down Expand Up @@ -107,14 +104,14 @@ function fontsInit() {
.pipe(notify({message: '<%= file.relative %> distributed!', title : 'fontsInit', sound: false}));
}

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

// Copy font-awesome CSS from node_modules to dist/css
// Copy fontawesome-free CSS from node_modules to dist/css/fontawesome-free
function faCssInit() {
return gulp.src(paths.faCss.src)
.pipe(gulp.dest(paths.faCss.dest))
Expand Down Expand Up @@ -183,7 +180,7 @@ function images() {
// Compile custom SCSS to CSS and copy to dist/css
function styles() {
return gulp.src(paths.styles.src, { sourcemaps: true })
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(sass({includePaths: ['./node_modules']},{outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(cleanCSS())
.pipe(rename({suffix: '.min'}))
.pipe(autoprefixer({browsers: ['last 2 versions', 'ie >= 9', '> 1%']}))
Expand Down Expand Up @@ -301,6 +298,17 @@ function cleanup() {
/*------------------------------------------------------*/
/* DEV TASKS -------------------------------------------*/
/*------------------------------------------------------*/
//gulp serve
function serve() {
bs.init({
proxy: "nvQuickTheme.loc"
});
gulp.watch(paths.images.src, images).on('change', bs.reload);
gulp.watch(paths.styles.src, styles).on('change', bs.reload);
gulp.watch(paths.scripts.src, scripts).on('change', bs.reload);
gulp.watch(paths.containers.src, containers).on('change', bs.reload);
}

// gulp watch
function watch() {
gulp.watch(paths.images.src, images);
Expand All @@ -310,7 +318,7 @@ function watch() {
}

// gulp init
var init = gulp.series(fontsInit, faFontsInit, faCssInit, slimMenuInit, normalizeInit, bsCssInit, bsJsInit);
var init = gulp.series(fontsInit, faFontsInit, faCssInit, slimMenuInit, normalizeInit, bsJsInit);

// gulp build
var build = gulp.series(init, styles, scripts, images, containers, manifest);
Expand Down Expand Up @@ -344,6 +352,7 @@ exports.zipelse = zipelse;
exports.ziptemp = ziptemp;
exports.zippackage = zippackage;
exports.cleanup = cleanup;
exports.serve = serve;
exports.watch = watch;
exports.init = init;
exports.build = build;
Expand Down
2 changes: 1 addition & 1 deletion manifest.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="9.0">
<packages>
<package name="nvisionative.nvQuickTheme" type="Skin" version="2.0.0">
<package name="nvisionative.nvQuickTheme" type="Skin" version="2.1.0">
<friendlyName>nvQuickTheme</friendlyName>
<description>A DNN Theme Dev Framework</description>
<iconFile>MyIcon.png</iconFile>
Expand Down
8 changes: 4 additions & 4 deletions menus/main/MainMenu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<li[?SELECTED] class="active"[/?]>

[?ENABLED]
<a href="[=URL]" class="btn btn-primary[?NODE] split[/?]">[=TEXT]</a>
<a href="[=URL]" class="btn btn-primary[?NODE] split[/?]" target="[=TARGET]">[=TEXT]</a>
[?ELSE]
<a href="#" class="btn btn-primary[?NODE] single[/?]">[=TEXT]</a>
<a href="#" class="btn btn-primary[?NODE] single[/?]" target="[=TARGET]">[=TEXT]</a>
[/?]

[?NODE]
Expand All @@ -23,9 +23,9 @@
<li class="[?SELECTED] active[/?]">

[?ENABLED]
<a href="[=URL]" [?NODE]class="split"[/?]>[=TEXT]</a>
<a href="[=URL]" [?NODE]class="split"[/?] target="[=TARGET]">[=TEXT]</a>
[?ELSE]
<a href="#">[=TEXT]</a>
<a href="#" target="[=TARGET]">[=TEXT]</a>
[/?]

[?NODE]
Expand Down
67 changes: 67 additions & 0 deletions menus/razor/RazorMenu.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@using DotNetNuke.Web.DDRMenu;
@using System.Dynamic;
@inherits DotNetNuke.Web.Razor.DotNetNukeWebPage<dynamic>

<ul class="slimmenu normal" id="navigation">
@RenderPages(Model.Source.root.Children)
</ul>

@helper RenderPages(IEnumerable<MenuNode> pages)
{
if (!pages.Any())
{
return;
}

foreach (var page in pages)
{
var hasChildren = page.HasChildren();
var split = hasChildren ? "split" : string.Empty;
var single = hasChildren ? "single" :string.Empty;

<li class="@(page.Selected ? "active" : string.Empty)">
@if (page.Enabled)
{
<a href="@page.Url" class="btn btn-primary @split" target="@page.Target">@page.Text</a>
}
else
{
<a href="#" class="btn btn-primary @single" target="@page.Target">@page.Text</a>
}

@if (hasChildren)
{
<ul>
@RenderNestedPages(page.Children)
</ul>
}
</li>
}
}

@helper RenderNestedPages(IEnumerable<MenuNode> pages)
{
foreach (var page in pages)
{
var hasChildren = page.HasChildren();
var split = hasChildren ? "split" : string.Empty;

<li class="@(page.Selected ? "active" : string.Empty)">
@if (page.Enabled)
{
<a href="@page.Url" class="@split" target="@page.Target">@page.Text</a>
}
else
{
<a href="#" target="@page.Target">@page.Text</a>
}

@if (hasChildren)
{
<ul>
@RenderNestedPages(page.Children)
</ul>
}
</li>
}
}
4 changes: 4 additions & 0 deletions menus/razor/menudef.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<manifest>
<template>RazorMenu.cshtml</template>
</manifest>
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"name": "nvquicktheme",
"version": "2.0.0",
"version": "2.1.0",
"description": "Barebones Bootstrap 4 DNN Theme",
"main": "gulpfile.js",
"author": "nvisionative",
"license": "GPL-3.0",
"private": true,
"dependencies": {
"bootstrap": "4.2.1",
"font-awesome": "^4.7.0",
"@fortawesome/fontawesome-free": "^5.9.0",
"bootstrap": "^4.3.1",
"normalize.css": "^8.0.1"
},
"devDependencies": {
"gulp": "^4.0.0",
"browser-sync": "^2.26.7",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^6.0.0",
"gulp-clean": "^0.4.0",
"gulp-clean-css": "^4.0.0",
Expand Down
8 changes: 4 additions & 4 deletions partials/_header.ascx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<header class="bg-light-grey">
<div class="container-fluid user-controls bg-tertiary">
<div class="container-fluid bg-tertiary">
<div class="container">
<div class="row justify-content-end">
<div class="row user-controls justify-content-end">
<ul>
<li><dnn:Login runat="server" id="dnnLogin" /></li>
<li><dnn:User runat="server" id="dnnUser" /></li>
<li><dnn:Search runat="server" id="dnnSearch" ShowSite="false" ShowWeb="false" Submit="<i class='fa fa-search'></i>" /></li>
<li><dnn:Search runat="server" id="dnnSearch" ShowSite="false" ShowWeb="false" Submit="<i class='fas fa-search'></i>" /></li>
<li style="display:none;"><dnn:Language runat="server" id="dnnLanguage" ShowMenu="false" ShowLinks="false" /></li>
</ul>
</div>
Expand All @@ -16,7 +16,7 @@
<div class="row nav-main">
<dnn:LOGO id="dnnLOGO" runat="server" />
<nav id="nav-items">
<dnn:MENU id="menu" MenuStyle="menus/main" runat="server" NodeSelector="*"></dnn:MENU>
<dnn:MENU id="menu" MenuStyle="menus/razor" runat="server" NodeSelector="*"></dnn:MENU>
</nav>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions partials/_includes.ascx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<dnn:META ID="mobileScale" runat="server" Name="viewport" Content="width=device-width, initial-scale=1.0" />
<dnn:DnnCssExclude runat="server" Name="dnndefault" />

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

<dnn:DnnJsInclude runat="server" FilePath="dist/js/jquery.slimmenu.min.js" ForceProvider="DnnFormBottomProvider" Priority="100" PathNameAlias="SkinPath" />
<dnn:DnnJsInclude runat="server" FilePath="dist/js/bootstrap.bundle.min.js" ForceProvider="DnnFormBottomProvider" Priority="110" PathNameAlias="SkinPath" />
Expand Down
2 changes: 1 addition & 1 deletion project-details.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"project": "nvQuickTheme",
"version": "2.0.0",
"version": "2.1.0",
"author": "TK Sheppard &amp; David Poindexter",
"company": "nvisionative",
"url": "www.nvquicktheme.com",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/jquery.slimmenu.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/scss/autoload/_autoload.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'bootstrap';
1 change: 1 addition & 0 deletions src/scss/autoload/_bootstrap.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'bootstrap/scss/bootstrap';
4 changes: 3 additions & 1 deletion src/scss/components/_components.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@import 'dnn';
@import 'login';
@import 'buttons';
@import 'fonts';
@import 'grid';
@import 'helpers';
@import 'nav';
@import 'nav';
@import 'search';
Loading

0 comments on commit 4be2bd9

Please sign in to comment.