Skip to content

Commit

Permalink
refactor:update: footer reusability component
Browse files Browse the repository at this point in the history
  • Loading branch information
Lochipi committed Mar 14, 2024
1 parent 55d8db2 commit ddc01d1
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 57 deletions.
10 changes: 7 additions & 3 deletions apps/Info.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
crossorigin="anonymous">
<link rel="stylesheet" href="../common/stacktable.css">
<!-- common styling -->
<link rel="stylesheet" href="./common.css">
<style>
html,
body {
Expand Down Expand Up @@ -166,10 +168,12 @@ <h3 class="text-center h3 mb-2" style="margin-top:8px;margin-bottom:10px;">Infor
</div>
</div>

<footer class="text-center text-white bg-dark p-3 mt-2">
<p class="p">Copyright © 2021 caMicroscope</p>
</footer>
<!-- footer -->
<footer id="footer-layout"></footer>
</div>

<!-- script to call a footer(layout footer in the common > utils folder) function -->
<script> insertFooterLayout(); </script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8" crossorigin="anonymous"></script>
</body>
<script>
Expand Down
55 changes: 51 additions & 4 deletions apps/common.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
.text-in-line {
margin: 0 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

/* layout footer styles */
#footer-layout hr {
border-bottom-color: #ffffff;
padding: 0;
margin: 0;
}

#footer-layout hr {
border-bottom-color: #ffffff;
padding: 0;
margin: 0;
}

#footer-layout {
color: whitesmoke;
text-align: left;
padding: 2.5em 4.5em;
background-color: #343a40;
}

#footer-layout p {
color: whitesmoke;
}

.company-name {
color: #24a9f6;
}

.company-name a {
color: #24a9f6;
text-decoration: none;
}

.company-name:hover {
color: #4f5e66;
text-decoration: underline;
}
#footer-layout strong,
#footer-layout b {
color: #ffffff;
}

@media (max-width: 768px) {
#footer-layout {
padding: 2em 2.5em;
}
}
50 changes: 7 additions & 43 deletions apps/landing/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,14 @@
integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
crossorigin="anonymous">
<link rel="stylesheet" href="./main.css" />
<!-- common styling -->
<link rel='stylesheet' type='text/css' media='all' href='../common.css'/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.png">

</head>
<body>



<!-- Header -->

<!-- <header id="header" >
<nav id= "nav" class="navbar navbar-expand-md navbar-dark fixed-top bg-dark" style="position: sticky;">
<button style="display:none;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<ul>
<li><a href="landing.html" class="link" style="color: white;">Home</a></li>
<li><a href="../table.html" class="link">Slides</a></li>
<li style="float: right;"><a href="/apps/signup/signup.html" class="link">Signup</a></li>
<li style="float: right;"><a target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScL91LxrpAZjU88GBZP9gmcdgdf8__uNUwhws2lzU6Lr4qNwA/viewform" class="link">Feedback</a></li>
</ul>
</nav>
</header> -->

<!-- Header -->
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark" style="position: sticky; margin-top: -4em;">
<div class="container-fluid">
<button class="navbar-toggler m-1" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
Expand Down Expand Up @@ -109,26 +91,7 @@ <h3>Documentation</h3>


<!-- Footer -->

<footer id="footer">

<div class="content">

<div class="inner">



<section class="about" style="margin-left:0cm">

U24 CA18092401A1, <b>Tools to Analyze Morphology and Spatially Mapped Molecular Data</b>
</section>


</div>

</div>

</footer>
<footer id="footer-layout"></footer>



Expand All @@ -145,9 +108,10 @@ <h3>Documentation</h3>
<script src="./skel.min.js"></script>

<script src="./util.js"></script>
<script src="../../common/util.js"></script>



<!-- script to call a footer(layout footer in the common > utils folder) function -->
<script> insertFooterLayout(); </script>
</body>


Expand Down
11 changes: 8 additions & 3 deletions apps/signup/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
crossorigin="anonymous">

<!-- common stylings-->
<link rel='stylesheet' type='text/css' media='all' href='../common.css'/>

<link rel='stylesheet' type='text/css' media='all' href='../../css/normalize.css'/>
<link rel='stylesheet' type='text/css' media='all' href='signup.css'/>
<link rel='stylesheet' type='text/css' media='all' href='../../css/popup.css'/>
Expand Down Expand Up @@ -111,9 +114,8 @@ <h2 style="margin-top: -.5em;">User Signup</h2>
</form>
<div class="text-center" onclick="loginPage()">Already have an account? </div>
</div>
<footer class="text-center text-white bg-dark p-3">
<p class="p">Copyright © 2021 caMicroscope</p>
</footer>

<footer id="footer-layout"></footer>
<!-- popup -->
<div id="popup-container"></div>

Expand All @@ -122,5 +124,8 @@ <h2 style="margin-top: -.5em;">User Signup</h2>
crossorigin="anonymous"></script>
<script src="../../common/util.js"></script>

<!-- script to call a footer(layout footer in the common > utils folder) function -->
<script> insertFooterLayout();</script>

</body>
</html>
8 changes: 4 additions & 4 deletions apps/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ <h5 class="modal-title" id="slideNameChangeModalLabel">Slide name change confirm

</div>


<footer class="text-center text-white bg-dark p-3">
<p class="p">Copyright © 2021 caMicroscope</p>
</footer>
<!-- footer -->
<footer id="footer-layout"></footer>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8" crossorigin="anonymous"></script>
<script src="./table.js"></script>
<!-- script to call a footer(layout footer in the common > utils folder) function -->
<script> insertFooterLayout();</script>
</body>

</html>
14 changes: 14 additions & 0 deletions common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1347,3 +1347,17 @@ async function captureScreen(camic, {

return canvas;
}

// footer content layout
const currentYear = new Date().getFullYear();

const footerContent = `
<p>U24 CA18092401A1, <b>Tools to Analyze Morphology and Spatially Mapped Molecular Data</b></p>
<p id='contact'>Spot a Bug? <a href='https://docs.google.com/forms/d/e/1FAIpQLScL91LxrpAZjU88GBZP9gmcdgdf8__uNUwhws2lzU6Lr4qNwA/viewform' target='_blank'>Send us the feedback!</a></p>
<hr />
<p class='copyright'>Copyright &copy; ${currentYear} <span class='company-name'><a href="https://camicroscope.org/" target='_blank'>caMicroscope</a></span></p>
`;

function insertFooterLayout() {
document.getElementById('footer-layout').innerHTML = footerContent;
}

0 comments on commit ddc01d1

Please sign in to comment.