Skip to content

Commit

Permalink
Reskin closer to SSP2
Browse files Browse the repository at this point in the history
  • Loading branch information
ghalse committed May 20, 2024
1 parent 25c8430 commit 77a584b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 53 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
include_once(__DIR__ . '/ui/header.inc.php');
?>
<h2>SAML Metadata Validator</h2>
<h1>SAML Metadata Validator</h1>
<p>This validator applys very similar rules to SAFIRE's
<a href="https://phph.<?php echo constant('DOMAIN') ?>">metadata aggregator</a>. It
is intended to allow people to check their own metadata before submitting
Expand Down
37 changes: 25 additions & 12 deletions ui/footer.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,31 @@
include_once(dirname(__DIR__) . '/local/config.inc.php');
}
?>
</div><!-- #content -->
<div id="footer">
<hr>
<span><a href="https://<?php echo constant('DOMAIN') ?>/safire/policy/privacy/">Privacy statement</a></span>
<span class="float-r"><a href="https://<?php echo constant('DOMAIN') ?>/">SAFIRE - South African Identity Federation</a></span>
</div>
</div>
<div id="push"></div>
</main>
</div>
<div id="foot">
<footer id="footer">
<div class="wrap">
<div class="center copyrights">
<!-- these are SAFIRE-specific -->
<ul>
<li><a href="https://<?= constant('DOMAIN') ?>/safire/policy/privacy/">Privacy statement</a></li>
<!-- <li><<a href="#cookiesettings">Cookies</a></li> -->
<li><a href="https://<?= constant('DOMAIN') ?>/">SAFIRE - South African Identity Federation</a></li>
</ul>
</div>
</div>
</footer>
</div>
</body>

<br class="clear-r">

</div><!-- #footer -->

</div><!-- #wrap -->

</body>
<!-- these are the bits you need to keep in a new skin -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.3/jquery-ui.min.js" integrity="sha512-Ww1y9OuQ2kehgVWSD/3nhgfrb424O3802QYP/A5gPXoM4+rRjiKrjHdGxQKrMGQykmsJ/86oGdHszfcVgUr4hA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.33.2/ace.min.js" integrity="sha512-40pej1Lz2wywxd9lNJwJNSp9ekNFyX6wCmOzoaqIuUqexcjAUYqnhbg+fYUuPHzVyr5hshGv5FX8Om7yuTuWnA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="validate.js"></script>
</html>

82 changes: 42 additions & 40 deletions ui/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,35 @@
}

$nonce = base64_encode(random_bytes(32));
if (function_exists('apache_setenv')) {
apache_setenv('CSP_NONCE', $nonce);
if (!function_exists('apache_setenv') or !apache_setenv('CSP_NONCE', $nonce)) {
$nonce = array_key_exists('CSP_NONCE', $_SERVER) ? $_SERVER['CSP_NONCE'] : getenv('CSP_NONCE');
}
$nonce = sprintf(' nonce="%s"', $nonce);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<meta name="robots" content="index, nofollow">
<meta name="creator" content="South African Identity Federation">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="description" content="A SAML2 metadata validator that checks for both syntactic/schema correctness as well as applying site-specific local checks">
<meta name="robots" content="noindex, nofollow">
<link rel="license" href="https://github.com/tenet-ac-za/metadata-validator/blob/master/LICENSE">
<title><?= $_SERVER['SERVER_NAME'] ?></title>

<!-- these are SAFIRE-specific -->
<title>validator.<?php echo constant('DOMAIN') ?></title>
<link rel="stylesheet" type="text/css" href="//static.<?php echo constant('DOMAIN') ?>/css/ssp-default.css">
<link rel="icon" type="image/icon" href="//static.<?php echo constant('DOMAIN') ?>/favicons/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="//static.<?php echo constant('DOMAIN') ?>/favicons/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="//static.<?php echo constant('DOMAIN') ?>/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="72x72" href="//static.<?php echo constant('DOMAIN') ?>/favicons/favicon-72x72.png">
<link rel="icon" type="image/png" sizes="150x150" href="//static.<?php echo constant('DOMAIN') ?>/favicons/favicon-150x150.png">
<link rel="preconnect" href="https://static.<?= constant('DOMAIN') ?>">
<link rel="stylesheet" href="https://static.<?= constant('DOMAIN') ?>/css/ssp-stylesheet-test.css">
<link rel="icon" type="image/icon" href="https://static.<?= constant('DOMAIN') ?>/favicons/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="https://static.<?= constant('DOMAIN') ?>/favicons/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://static.<?= constant('DOMAIN') ?>/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="72x72" href="https://static.<?= constant('DOMAIN') ?>/favicons/favicon-72x72.png">
<link rel="icon" type="image/png" sizes="150x150" href="https://static.<?= constant('DOMAIN') ?>/favicons/favicon-150x150.png">
<meta name="theme-color" content="#5da9dd">

<!-- these are the bits you need to keep in a new skin -->
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
<link rel="stylesheet" type="text/css" href="ui/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="ui/validator.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"
integrity="sha512-uto9mlQzrs59VwILcLiRYeLKPPbS/bT71da/OEBYEwcdNUk8jYIy+D176RYoop1Da+f9mvkYrmj5MCLZWEtQuA==" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js"
integrity="sha512-GZ1RIgZaSc8rnco/8CXfRdCpDxRCphenIiZ2ztLy3XQfCbQUSCuk8IudvNHxkRA3oUg6q0qejgN/qqyG1duv5Q==" crossorigin="anonymous"></script>
<script src="validate.js"></script>

<!-- this is for the github-corners - https://github.com/tholman/github-corners -->
<style<?php echo $nonce; ?>>
Expand All @@ -59,26 +53,34 @@
.github-corner:hover .octo-arm{animation:none}
.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}
}
.github-corner svg{fill:#eee; color:#5da9dd; position: absolute; top: 0; border: 0; right: 0;}
.github-corner svg{fill:#eee; color:var(--safire-purple); position: absolute; top: 0; border: 0; right: 0;}
.github-corner .octo-arm{transform-origin: 130px 106px;}
</style>
</head>
<body>

<!-- this is for the github-corners - https://github.com/tholman/github-corners -->
<a href="https://github.com/tenet-ac-za/metadata-validator" target="_blank" class="github-corner" aria-label="View source on Github">
<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
</svg>
</a>
<!-- end of github-corners -->

<div id="wrap">

<div id="header" class="safire-header">
<a title="South African Identity Federation" href="https://safire.ac.za/"><img src="//static.<?php echo constant('DOMAIN') ?>/logos/SAFIRE_P_White_SimpleSAML.svg" alt="SAFIRE" width="258" height="72" alt="[SAFIRE]"></a>
<h1><a href="/">validator.<?php echo constant('DOMAIN') ?></a></h1>
</div>
<div id="languagebar">&nbsp;</div> <div id="content">
<div id="layout">
<header id="header"<?= strpos($_SERVER['SERVER_NAME'], '.local') === false ? '' : ' class="preproduction"' ?>>
<div class="wrap">
<div class="logospace">
<div class="v-center logo-header">
<div id="logo">
<a href="https://<?= constant('DOMAIN') ?>/">
<img id="safire-logo" class="pure-img" src="https://static.<?= constant('DOMAIN') ?>/logos/SAFIRE_P_White_SimpleSAML.svg" width="258" height="72" alt="SAFIRE">
</a>
</div>
</div>
</div>
</div>
<!-- this is for the github-corners - https://github.com/tholman/github-corners -->
<a href="https://github.com/tenet-ac-za/metadata-validator" target="_blank" class="github-corner" aria-label="View source on Github">
<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
</svg>
</a>
<!-- end of github-corners -->
</header>
<main>
<div id="content">
<div class="wrap">

0 comments on commit 77a584b

Please sign in to comment.