Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 4 additions & 39 deletions src/apisof.net/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
<link rel="stylesheet" media="(prefers-color-scheme: light)" href="~/css/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="~/lib/forevolve/bootstrap-dark/dist/css/bootstrap-dark.min.css" />
<link href="css/site.css" rel="stylesheet" />
<script src="https://consentdeliveryfd.azurefd.net/mscc/lib/v2/wcp-consent.js"></script>
</head>
<body>
<div id="cookie-banner"></div>

<app>
<component type="typeof(App)" render-mode="ServerPrerendered" />
</app>
Expand All @@ -36,44 +39,6 @@
<script src="_framework/blazor.server.js"></script>
<script src="~/lib/jquery/jquery.min.js"></script>
<script src="~/lib/twitter-bootstrap/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript">

function scrollIntoMainContent(){
var mainContent = document.getElementById("main-content");
if (mainContent) {
mainContent.scrollIntoView({ behavior: "smooth" });
mainContent.focus();
}
}

var observer = new MutationObserver(function (mutations, observer) {
$('[data-toggle="popover"]').popover({
placement: 'top',
trigger: 'hover',
boundary: 'body'
});
$('[data-toggle="popover"]').on('click', function () {
$('[data-toggle="popover"]').popover('dispose');
});
$('.search-result-row.selected').each(function () {
this.scrollIntoView({block: "nearest"});
});
$("#skipToMain").on('keydown', function(e){
if (e.key === "Enter" || e.key === " ") {
scrollIntoMainContent();
e.preventDefault();
}
});
$("#skipToMain").on('click', function(e){
scrollIntoMainContent();
e.preventDefault();
});
});
observer.observe(document, {
subtree: true,
childList: true,
attributes: true
});
</script>
<script src="~/js/site.js"></script>
</body>
</html>
44 changes: 43 additions & 1 deletion src/apisof.net/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@inherits LayoutComponentBase

<div class="page-shell">
<a href="javascript:void(0);" id="skipToMain" class="skip-to-main" target="_self">Skip to main content</a>

<nav class="navbar navbar-expand-lg navbar-dark bg-dotnet">
Expand Down Expand Up @@ -55,7 +56,7 @@
</div>
</nav>

<div class="nofocus" role="main" id="main-content" tabindex="-1">
<div class="layout-main nofocus" role="main" id="main-content" tabindex="-1">
<CascadingValue Value="this">
@Body
</CascadingValue>
Expand All @@ -82,4 +83,45 @@
{
<a href="@CatalogJobInfo.DetailsUrl" class="text-underline">@CatalogJobInfo.Date.Date.ToShortDateString()</a>
}
</div>

<footer id="footer-site" class="uhf-footer" role="contentinfo" aria-label="Microsoft footer">
<div class="uhf-footer-row">
<span>This site is managed by Microsoft | &copy; @DateTime.UtcNow.Year Microsoft. All rights reserved.</span>
</div>
<ul class="uhf-footer-links">
<li>
<a href="https://go.microsoft.com/fwlink/?LinkId=521839" data-mscc-ic="false">Privacy Statement</a>
</li>
<li>
<a href="https://go.microsoft.com/fwlink/?linkid=2259814" data-mscc-ic="false">Consumer Health Privacy</a>
</li>
<li>
<a href="https://www.iis.net/terms-of-use" data-mscc-ic="false">Terms of Use</a>
</li>
<li>
<a href="https://www.iis.net/contact" data-mscc-ic="false">Contact Us</a>
</li>
<li>
<a href="https://azure.microsoft.com/" data-mscc-ic="false">Hosted on Microsoft Azure</a>
</li>
<li>
<a href="https://www.effectusmedia.com/?site=iis#contactus" data-mscc-ic="false">Advertise with Us</a>
</li>
<li class="manageCookieChoice" style="display: none">
<a href="javascript:manageConsent();" data-mscc-ic="false">Manage cookies</a>
</li>
<li>
<a href="https://aka.ms/yourcaliforniaprivacychoices" class="uhf-privacy-choices" data-mscc-ic="false">
<svg aria-hidden="true" class="uhf-privacy-icon" viewBox="0 0 26 14" xmlns="http://www.w3.org/2000/svg" focusable="false">
<path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" fill="#fff"></path>
<path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" fill="#06f"></path>
<path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8s.6-.2.8 0L21.6 6l2.2-2.2c.2-.2.6-.2.8 0z" fill="#fff"></path>
<path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8s.6-.2.8 0l1.8 1.8 3.9-4.4c.2-.2.5-.3.8-.2z" fill="#fff"></path>
</svg>
<span>Your Privacy Choices</span>
</a>
</li>
</ul>
</footer>
</div>
77 changes: 77 additions & 0 deletions src/apisof.net/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,83 @@ html, body {
.table-responsive-stack th{
min-width: 200px;
}

/* UHF footer */

.page-shell {
min-height: 100vh;
display: flex;
flex-direction: column;
}

.layout-main {
flex: 1 0 auto;
}

.uhf-footer {
background-color: var(--dotnet-purple);
color: #ffffff;
margin-top: 1rem;
padding: 0.75rem 1rem;
font-size: 0.95rem;
}

.uhf-footer-row {
margin-bottom: 0.35rem;
}

.uhf-footer-links {
display: flex;
flex-wrap: wrap;
gap: 0;
list-style: none;
margin: 0;
padding: 0;
}

.uhf-footer-links li {
white-space: nowrap;
}

.uhf-footer-links li + li::before {
content: "|";
color: rgba(255, 255, 255, 0.55);
margin: 0 0.55rem;
}

.uhf-footer-links a,
.uhf-footer-links a:link,
.uhf-footer-links a:visited {
color: #d1c7f5;
}

.uhf-footer-links a:hover,
.uhf-footer-links a:focus {
color: #ffffff;
}

.uhf-privacy-choices {
display: inline-flex;
align-items: center;
gap: 0.35rem;
}

.uhf-privacy-icon {
width: 1.65rem;
height: 0.9rem;
flex-shrink: 0;
}

@media (max-width: 480px) {
.uhf-footer-links {
row-gap: 0.25rem;
}

.uhf-footer-links li + li::before {
margin: 0 0.4rem;
}
}

/* Small screens (mobile and narrow windows) */
@media (max-width: 480px)
{
Expand Down
79 changes: 79 additions & 0 deletions src/apisof.net/wwwroot/js/site.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
var siteConsent = null;

function setCookieManagementVisibility(isVisible) {
var elements = document.querySelectorAll(".manageCookieChoice");
for (var i = 0; i < elements.length; i++) {
elements[i].style.display = isVisible ? "list-item" : "none";
}
}

function initializeCookieConsent() {
if (typeof WcpConsent === "undefined" || typeof WcpConsent.init !== "function") {
return;
}

WcpConsent.init("en-US", "cookie-banner", function (err, consentInstance) {
if (err || !consentInstance) {
return;
}

siteConsent = consentInstance;
setCookieManagementVisibility(!!siteConsent.isConsentRequired);

if (typeof siteConsent.onConsentChanged === "function") {
siteConsent.onConsentChanged(function () {
setCookieManagementVisibility(!!siteConsent.isConsentRequired);
});
}
});
}

function manageConsent() {
if (siteConsent && typeof siteConsent.manageConsent === "function") {
siteConsent.manageConsent();
}
}

if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initializeCookieConsent);
} else {
initializeCookieConsent();
}

function scrollIntoMainContent() {
var mainContent = document.getElementById("main-content");
if (mainContent) {
mainContent.scrollIntoView({ behavior: "smooth" });
mainContent.focus();
}
}

var observer = new MutationObserver(function () {
$('[data-toggle="popover"]').popover({
placement: 'top',
trigger: 'hover',
boundary: 'body'
});
$('[data-toggle="popover"]').on('click', function () {
$('[data-toggle="popover"]').popover('dispose');
});
$('.search-result-row.selected').each(function () {
this.scrollIntoView({ block: "nearest" });
});
$("#skipToMain").on('keydown', function (e) {
if (e.key === "Enter" || e.key === " ") {
scrollIntoMainContent();
e.preventDefault();
}
});
$("#skipToMain").on('click', function (e) {
scrollIntoMainContent();
e.preventDefault();
});
});

observer.observe(document, {
subtree: true,
childList: true,
attributes: true
});