Skip to content

Commit

Permalink
Implement footer
Browse files Browse the repository at this point in the history
  • Loading branch information
david-poindexter committed Dec 22, 2023
1 parent 49fdecf commit d0d23fc
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 51 deletions.
12 changes: 2 additions & 10 deletions DNN Platform/Skins/Aperture/default.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,11 @@

<!-- Main Content -->
<main>

<div id="BannerPane" runat="server"></div>

<div class="container">
<div class="row">
<div id="ContentPane" class="col-12" runat="server"></div>
</div>
</div>

<div id="ContentPane" class="aperture-container" runat="server"></div>
<div id="FluidPane" runat="server"></div>

</main>

<!-- Footer -->
<!--#include file="partials/_footer.ascx" -->
</div>
39 changes: 39 additions & 0 deletions DNN Platform/Skins/Aperture/menus/footer/RazorMenu.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@using DotNetNuke.Web.DDRMenu;
@using System.Dynamic;
@inherits DotNetNuke.Web.Razor.DotNetNukeWebPage<dynamic>

<ul class="desktop-menu h-100" id="nav-footer">
@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 attrTarget = !string.IsNullOrEmpty(page.Target) ? ("target=\"" + page.Target + "\"") :string.Empty;

<li class="@(page.Selected ? "selected" : string.Empty)">
@if (page.Enabled)
{
<a href="@page.Url" @attrTarget>@page.Text</a>
}
else
{
<a href="javascript:void(0);" @attrTarget>@page</a>
}

@if (hasChildren)
{
<ul>
@RenderPages(page.Children)
</ul>
}
</li>
}
}
4 changes: 4 additions & 0 deletions DNN Platform/Skins/Aperture/menus/footer/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>
33 changes: 12 additions & 21 deletions DNN Platform/Skins/Aperture/partials/_footer.ascx
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
<footer>
<div class="bg-light-shade">
<div class="container">
<div class="row">
<div class="col-md-6">
<div id="FooterPaneA" runat="server"></div>
</div>
<div class="col-md-6">
<div id="FooterPaneB" runat="server"></div>
</div>
</div>
</div>
</div>
<div class="bg-main-shade text-white">
<div class="container py-2">
<div class="row">
<div class="col-12">
<ul class="list-unstyled disclaimer">
<li><dnn:COPYRIGHT id="dnnCopyright" runat="server" /></li>
<li><dnn:TERMS id="dnnTerms" Text="Terms" runat="server" /></li>
<li><dnn:PRIVACY id="dnnPrivacy" Text="Privacy" runat="server" /></li>
</ul>
<div class="aperture-container">
<div class="footer-left">
<div class="footer-menu">
<dnn:MENU id="menu_footer" CssClass="dnn-d-none dnn-d-md-block" MenuStyle="menus/footer" runat="server" NodeSelector="*,0,1"></dnn:MENU>
</div>
<div class="footer-terms-privacy">
<dnn:TERMS id="dnnTerms" Text="Terms" runat="server" CssClass="dnn-terms" /><dnn:PRIVACY id="dnnPrivacy" Text="Privacy" runat="server" />
</div>
<div class="footer-copyright">
<dnn:COPYRIGHT id="dnnCopyright" runat="server" />
</div>
</div>
<div id="FooterPane" runat="server" class="footer-right"></div>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions DNN Platform/Skins/Aperture/src/scss/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ header {

/* Desktop Styling */

#nav-desktop {
#nav-desktop, #nav-footer {

&,
ul {
Expand Down Expand Up @@ -86,7 +86,7 @@ header {
top: 100%;
min-width: 250px;
max-width: 100%;
background: color('background');
background: color('tertiary');
box-shadow: 1px 1px 5px 1px rgba(color('foreground', true), 0.2);

// Below Second Level
Expand Down
59 changes: 42 additions & 17 deletions DNN Platform/Skins/Aperture/src/scss/sections/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,45 @@
footer {
.disclaimer {
@include font-size(12);
display:flex;
margin:0;
li {
position:relative;
padding:0 1rem;
+ li:before {
content:'';
position:absolute;
top:0;
left:0;
bottom:0;
width:1px;
background-color:white;
background-color: color('tertiary');
padding: .5rem 0;
color: color('foreground-contrast');
margin: 0;
padding: 2rem 0;
.aperture-container {
display: flex;
gap: 2rem;
.footer-left {
display: flex;
flex-direction: column;
.footer-menu {
margin-bottom: auto;
@media (max-width: 767px) {
#nav-footer {
flex-direction: column;
gap: 1rem;
}
}
}
.footer-terms-privacy {
font-size: small;
margin-top: 2rem;
margin-bottom: .5rem;
.dnn-terms::after {
content: " | ";
opacity: .25;
}
a {
font-weight: 200;
}
}
.footer-copyright {
font-size: small;
}
}
}
}
.footer-right {
width: 100%;
}
@media (max-width: 767px) {
flex-direction: column-reverse;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.aperture-container {
margin: 0 auto;
padding: 0 1rem;
padding: 0 2rem;
width: 100%;
max-width: 1280px;
}
Expand Down

0 comments on commit d0d23fc

Please sign in to comment.