Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ropalko committed Jun 27, 2022
1 parent f7a7e4f commit 780709b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
Binary file removed 2shine BS5.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion 2shine BS5.dnn → 2shineBS5.dnn
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<component type="Skin">
<skinFiles>
<skinName>2shine BS5</skinName>
<basePath>Portals\_default\Skins\2shine BS5</basePath>
<basePath>Portals\_default\Skins\2shineBS5</basePath>
<skinFile>
<path>App_LocalResources</path>
<name>2shine.de-DE.resx</name>
Expand Down
Binary file added 2shineBS5.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion controls/theme-body.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
%>
<%
if(DotNetNuke.Security.PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName)) {
if (Request.IsAuthenticated) {
%>
<a href="?ctl=logoff" Title="Logoff" class="to-shine-login" target="_self">
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
Expand Down
2 changes: 1 addition & 1 deletion dist/theme.min.js

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

2 changes: 1 addition & 1 deletion dist/theme.min.js.map

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

32 changes: 21 additions & 11 deletions src/ts/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if(document.querySelector('#to-shine-to-top')) {
})
}

// scrolling behavior (to top button / breadcrumb)
/* scrolling behavior (to top button / breadcrumb) */
const navheader = document.querySelector('#to-shine-page-navigation') as HTMLElement;
const navheight = navheader.offsetHeight;
window.addEventListener('scroll', function (event) {
Expand All @@ -62,19 +62,29 @@ window.addEventListener('scroll', function (event) {
}

}, false);
// breadcrumb

/* Breadcrumb */
const bc = document.querySelector('.to-shine-page-breadcrumb');
if(bc != null){
document.querySelector('.to-shine-page-breadcrumb span a:last-child').classList.add('last');
document.querySelector('.to-shine-page-breadcrumb span:last-child').classList.add('last');
if(document.querySelector('.to-shine-page-breadcrumb span .to-shine-page-breadcrumb-link:nth-last-child(3)') != null) {
document.querySelector('.to-shine-page-breadcrumb span .to-shine-page-breadcrumb-link:nth-last-child(3)').classList.add('second-last');
if(bc){
const bcALast = document.querySelector('.to-shine-page-breadcrumb span a:last-child');
if(bcALast) bcALast.classList.add('last');

const bcSpanLast = document.querySelector('.to-shine-page-breadcrumb span:last-child')
if(bcSpanLast) bcSpanLast.classList.add('last');

const bcSpanLinkChild = document.querySelector('.to-shine-page-breadcrumb span .to-shine-page-breadcrumb-link:nth-last-child(3)');
if(bcSpanLinkChild) bcSpanLinkChild.classList.add('second-last');

bc.classList.toggle('to-shine-page-breadcrumb-shortened',
(document.querySelector('.to-shine-page-breadcrumb-link') != null || document.querySelectorAll('.to-shine-page-breadcrumb-link').length > 2)
)

const bcTrigger = document.querySelector('.to-shine-page-breadcrumb-trigger');
if(bcTrigger) {
bcTrigger.addEventListener('click', () => {
bc.classList.toggle('to-shine-page-breadcrumb-shortened')
})
}
bc.classList.toggle('to-shine-page-breadcrumb-shortened', (document.querySelector('.to-shine-page-breadcrumb-link') != null || document.querySelectorAll('.to-shine-page-breadcrumb-link').length > 2))
document.querySelector('.to-shine-page-breadcrumb-trigger').addEventListener('click', () => {
bc.classList.toggle('to-shine-page-breadcrumb-shortened')
})
}


0 comments on commit 780709b

Please sign in to comment.