Skip to content

Commit

Permalink
ADDED: Addon: SGNFullPage: It will allow the user to scroll whole page.
Browse files Browse the repository at this point in the history
  • Loading branch information
SagnikGanguly96 committed Jan 21, 2023
1 parent ff5bed5 commit d8e0a67
Show file tree
Hide file tree
Showing 8 changed files with 726 additions and 15 deletions.
61 changes: 61 additions & 0 deletions demos/addons/fullpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!--
~ Copyright (c) 2022-2023 SGNetworks. All rights reserved.
~
~ The software is an exclusive copyright of "SGNetworks" and is provided as is exclusively with only "USAGE" access. "Modification", "Alteration", "Re-distribution" is completely prohibited.
~ VIOLATING THE ABOVE TERMS IS A PUNISHABLE OFFENSE WHICH MAY LEAD TO LEGAL CONSEQUENCES.
-->

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>FullPage Addon - SGNUIKit Demo</title>
<script src="/src/js/SGNUIKit.loader.js"></script>
<!--<script src="/dist/js/SGNUIKit.loader.js"></script>-->
<style>
.color-block {
background-color: hsl(0, 0%, 80%);
display: flex;
flex-direction: column;
height: 200px;
position: relative;
text-align: center;
width: 200px;
}

.color-block:before {
color: hsl(0, 0%, 40%);
content: "200x200";
margin-bottom: auto !important;
margin-top: auto !important;
}

.color-block > .title > * {
user-select: all !important;
}
</style>
</head>
<body class="sgn-fullpage-active">
<main>
<div class="sgn-fullpage text-white">
<div class="section blue-gradient d-flex container-center">Section-1</div>
<div class="section purple-gradient">
<div class="slide purple-gradient">Slide 1</div>
<div class="slide ripe-malinka-gradient">Slide 2</div>
<div class="slide aqua-gradient">Slide 3</div>
</div>
<div class="section peach-gradient d-flex container-center">Section-3</div>
<div class="section purple-gradient">
<div class="slide purple-gradient">Slide 1</div>
<div class="slide ripe-malinka-gradient">Slide 2</div>
<div class="slide aqua-gradient">Slide 3</div>
</div>
</div>
</main>
<script>
SGNUIKit.setOnReadyListener((isReady) => {

});
</script>
</body>
</html>
7 changes: 7 additions & 0 deletions demos/atom.index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
<a class="list-link" href="shadows.html">Shadows</a>
</div>
</div>
<div class="list-group">
<div class="list-group-title">Addons</div>
<div class="list-view">
<a class="list-link" href="index.html">Default Indexing</a>
<a class="list-link" href="addons/fullpage.html">fullPage.js</a>
</div>
</div>
</div>
<div class="card-footer jc-center">Copyright &copy; SGNetworks 2022. All rights reserved.</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<div class="list-group-title">Addons</div>
<div class="list-view">
<a class="list-link" href="atom.html">SGNAtom</a>
<a class="list-link" href="addons/fullpage.html">fullPage.js</a>
</div>
</div>
</div>
Expand Down
143 changes: 143 additions & 0 deletions src/addons/SGNFullPage/SGNFullPage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
* Copyright (c) 2023 SGNetworks. All rights reserved.
*
* The software is an exclusive copyright of "SGNetworks" and is provided as is exclusively with only "USAGE" access. "Modification", "Alteration", "Re-distribution" is completely prohibited.
* VIOLATING THE ABOVE TERMS IS A PUNISHABLE OFFENSE WHICH MAY LEAD TO LEGAL CONSEQUENCES.
*/

.sgn-fullpage *,
.sgn-fullpage-active * {
--sgn-fp-nav-color: var(--sgn-accent-primary-text, hsl(0, 0%, 100%));
--sgn-fp-nav-active-color: var(var(--sgn-fp-nav-color), var(--sgn-accent-primary-active));
--sgn-fp-nav-size: 4px;
--sgn-fp-nav-active-size: 12px;
}

.sgn-fullpage,
.sgn-fullpage > section,
.sgn-fullpage > .section {
height: 100vh;
}

.sgn-fullpage {

}

.sgn-fullpage > section.sgn-fp-slides,
.sgn-fullpage > .section.sgn-fp-slides {
display: flex;
justify-content: start;
align-items: center;
width: 100%;
position: relative;
overflow: auto;
scrollbar-width: none !important;
}

.sgn-fullpage > section.sgn-fp-slides > .slide,
.sgn-fullpage > .section.sgn-fp-slides > .slide {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex: 1 0 100%;
}

.sgn-fp-nav {
display: flex;
justify-content: center;
position: absolute;
margin: 0;
}

.sgn-fp-nav > li,
.sgn-fp-nav > li > a {
width: var(--sgn-fp-nav-size);
height: var(--sgn-fp-nav-size);
position: relative;
z-index: 1;
line-height: 1;
text-decoration: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
}

.sgn-fp-nav > li {
list-style: none;
}

.sgn-fp-nav > li > a {
width: 100%;
height: 100%;
}

.sgn-fp-nav > li.active {
width: var(--sgn-fp-nav-active-size);
height: var(--sgn-fp-nav-active-size);
}

.sgn-fp-nav > li > a > i {
content: "";
width: var(--sgn-fp-nav-size);
height: var(--sgn-fp-nav-size);
border-radius: 100%;
background: var(--sgn-fp-nav-color);
transition: width, height .1s ease-out;
}

.sgn-fp-nav > li.active > a > i {
width: var(--sgn-fp-nav-active-size);
height: var(--sgn-fp-nav-active-size);
transition: width, height .2s ease-in;
}

.sgn-fp-nav.nav-top,
.sgn-fp-nav.nav-bottom {
flex-direction: row;
align-items: center;
margin: 1rem 0;
width: 100%;
}

.sgn-fp-nav.nav-top > li,
.sgn-fp-nav.nav-bottom > li {
margin: 0 .5rem;
}

.sgn-fp-nav.nav-left > li,
.sgn-fp-nav.nav-right > li {
justify-content: center;
align-items: center;
display: flex;
margin: .5rem 0;
}

.sgn-fp-nav.nav-top {
top: 0;
}

.sgn-fp-nav.nav-bottom {
bottom: 0;
}

.sgn-fp-nav.nav-left,
.sgn-fp-nav.nav-right {
flex-direction: column;
align-items: center;
top: 0;
bottom: 0;
margin: 0 1rem;
height: 100%;
}

.sgn-fp-nav.nav-left {
left: 0;
}

.sgn-fp-nav.nav-right {
right: 0;
}

Loading

0 comments on commit d8e0a67

Please sign in to comment.