diff --git a/keys_home/static/keys_home/css/main.scss b/keys_home/static/keys_home/css/main.scss index 19c7c3ad9ae4315b78901261b9778f40d68f5ebb..03892989eafec7c59fafd8e0197132e62713018e 100644 --- a/keys_home/static/keys_home/css/main.scss +++ b/keys_home/static/keys_home/css/main.scss @@ -5,6 +5,78 @@ $light: #f4f6f9; @import 'bootstrap/bootstrap.scss'; +a:hover { + text-decoration: none; +} + +.h-control { + display: flex; + justify-content: space-between; +} + +pre { + margin-bottom: 0; +} + +.breakline { + white-space: normal; + word-break: break-all; +} + +i.fas { + padding-left: 1.2em; +} + +main { + @extend .container, .mt-3; +} + +/********************************************************/ +/* Navigation */ +/********************************************************/ +.nav-breadcrumb { + display: none; + @extend .d-md-block; + ol { + @extend .breadcrumb; + } + li { + @extend .breadcrumb-item; + } + li:last-child { + @extend .active; + } +} +.nav-main { + @extend .navbar, .navbar-expand-lg, .navbar-light, .bg-light, .shadow-sm, .border-bottom; + .nav-container { + @extend .container; + } + .navbar-brand img { + height: 2.5rem; + width: auto; + } + + .navbar-nav { + margin-left: auto; + } + li { + @extend .nav-item; + a { + @extend .nav-link; + } + } + li + .navbar-login { + @extend .ml-4; + } + .navbar-login + li{ + @extend .ml-4; + } +} + +/********************************************************/ +/* Footer +/********************************************************/ html { position: relative; min-height: 100%; @@ -12,7 +84,7 @@ html { body { margin-bottom: 14rem; } -.page-footer { +.footer-main { position: absolute; bottom: 0; width: 100%; @@ -20,41 +92,64 @@ body { padding-top: 2rem; margin-top: 2rem; font-size: smaller; - color: #6c757d !important; -} -.page-footer ul { + @extend .text-muted, .border-top; + + .footer-container { + @extend .container; + } + + .footer-left { + @extend .col-md-5; + text-align: left; + } + .footer-center { + @extend .col-md-2; + text-align: center; + img { + height: 3rem; + width: auto; + } + } + .footer-right { + @extend .col-md-5; + text-align: right; + } + .footer-copy { + @extend .mb-3; + } + + ul { list-style: none; -} -.page-footer a { + } + a { color: $dark; -} -.page-footer a:hover { - color: $primary; + &:hover { + color: $primary; + } + } + } +/********************************************************/ +/* Home page */ +/********************************************************/ .mainlist { - list-style: none; - padding-left: 0; - flex-direction: row; - justify-content: space-around; - margin-top: 10vh; -} -.mainlist li { + list-style: none; + padding-left: 0; + flex-direction: row; + justify-content: space-around; + margin-top: 10vh; + @extend .d-lg-flex; + + i, svg { + @extend .display-1; + } + + li { text-align: center; margin-top: 3rem !important; margin-bottom: 3rem !important; -} -a:hover { - text-decoration: none; -} - -pre { - margin-bottom: 0; -} - -.breakline { - white-space: normal; - word-break: break-all; + } } /********************************************************/ @@ -103,9 +198,9 @@ pre { @extend .bg-light; } - .sshkey-finerprint-title { + .sshkey-fingerprint-title { @extend .text-muted, .mb-1; - i.fas { + i, svg { @extend .mr-1; } } @@ -131,7 +226,7 @@ pre { .sshkey-content-title { @extend .d-lg-flex, .mb-1, .text-muted; justify-content: space-between; - i.fas { + i, svg { @extend .mr-1; } } diff --git a/keys_home/templates/keys_home/base.html b/keys_home/templates/keys_home/base.html index 454bf109c9d9d351a06cc31729e19da3959d8a4f..34189591f67262bd665be018ebe3ff59659b5a02 100644 --- a/keys_home/templates/keys_home/base.html +++ b/keys_home/templates/keys_home/base.html @@ -16,42 +16,40 @@ </head> <body> -<nav class="navbar navbar-expand-lg navbar-light bg-light shadow-sm border-bottom"> - <div class="container"> +<nav class="nav-main"> + <div class="nav-container"> <a class="navbar-brand" href="/"> <h1 class="sr-only">Sauerburger Keys</h1> - <img src="{% static 'keys_home/img/logo.svg' %}" alt="Sauerburger IT • Keys" style="height: 2.5rem; width: auto" /> + <img src="{% static 'keys_home/img/logo.svg' %}" alt="Sauerburger IT • Keys" /> </a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbar"> - <ul class="navbar-nav ml-auto"> - <li class="nav-item"> - <a class="nav-link" href="{% url 'ssh-list' %}"> - <i class="fas fa-server"></i> SSH + <ul class="navbar-nav"> + <li> + <a href="{% url 'ssh-list' %}"> + <i class="fas fa-server"></i> SSH </a> </li> - <li class="nav-item"> - <a class="nav-link" href="{% url 'publickey-list' %}"> - <i class="fas fa-envelope-open-text"></i> OpenPGP + <li> + <a href="{% url 'publickey-list' %}"> + <i class="fas fa-envelope-open-text"></i> OpenPGP </a> </li> - <li class="nav-item"> - <a class="nav-link" href="{% url 'ca-list' %}"> - <i class="fas fa-network-wired"></i> PKI + <li> + <a href="{% url 'ca-list' %}"> + <i class="fas fa-network-wired"></i> PKI </a> </li> - <li class="ml-4 nav-item"> + <li class="navbar-login"> {% if request.user.is_anonymous %} - <a class="nav-link" href=""> - <i class="fas fa-sign-in-alt"></i> - Login + <a href=""> + <i class="fas fa-sign-in-alt"></i> Login </a> {% else %} - <a class="nav-link" href=""> - <i class="fas fa-user"></i> - {{ request.user.username }} + <a href=""> + <i class="fas fa-user"></i> {{ request.user.username }} </a> {% endif %} </li> @@ -60,34 +58,34 @@ </div> </nav> -<main class="container mt-3"> +<main> {% block content %} {% endblock %} </main> -<footer class="page-footer border-top"> -<div class="container"> -<div class="row"> - <div class="col-md-5" style="text-align: left;"> - <ul class="pl-0"> - <li class="mb-3">Copyright 2020-{% now "Y" %}, Frank Sauerburger</li> - <li><a href="https://sauerburger.com/">sauerburger.com</a></li> - <li><a href="https://gitlab.sauerburger.com/">gitlab.sauerburger.com</a></li> - <li><a href="https://frank.sauerburger.com/">frank.sauerburger.io</a></li> - </ul> - </div> - <div class="col-md-2" style="text-align: center;"> - <img src="{% static 'keys_home/img/icon.light.svg' %}" alt="SIT" style="height: 3rem; width: auto"/> - </div> - <div class="col-md-5" style="text-align: right"> - <ul> - <li><a href="mailto:frank@sauerburger.com">Contact</a></li> - <li><a href="">Legal notice</a></li> - <li><a href="">Privacy policy</a></li> - </ul> +<footer class="footer-main"> + <div class="footer-container"> + <div class="row"> + <div class="footer-left"> + <ul class="pl-0"> + <li class="footer-copy">Copyright 2020-{% now "Y" %}, Frank Sauerburger</li> + <li><a href="https://sauerburger.com/">sauerburger.com</a></li> + <li><a href="https://gitlab.sauerburger.com/">gitlab.sauerburger.com</a></li> + <li><a href="https://frank.sauerburger.com/">frank.sauerburger.io</a></li> + </ul> + </div> + <div class="footer-center"> + <img src="{% static 'keys_home/img/icon.light.svg' %}" alt="SIT" /> + </div> + <div class="footer-right"> + <ul> + <li><a href="mailto:frank@sauerburger.com">Contact</a></li> + <li><a href="">Legal notice</a></li> + <li><a href="">Privacy policy</a></li> + </ul> + </div> + </div> </div> -</div> -</div> </footer> </body> diff --git a/keys_home/templates/keys_home/home.html b/keys_home/templates/keys_home/home.html index 779dd036ae02a15445e0c5b13c94ceb1617e5103..9d42d21b72533858b4ad303ba008dcf3a62bd72c 100644 --- a/keys_home/templates/keys_home/home.html +++ b/keys_home/templates/keys_home/home.html @@ -3,18 +3,18 @@ {% block content %} <h2>Public key directory</h2> -<ul class="d-lg-flex mainlist"> +<ul class="mainlist"> <li><h3><a href="{% url 'ssh-list' %}"> - <i class="fas fa-server display-1"></i><br /> - SSH Public Keys + <i class="fas fa-server"></i><br /> + SSH Public Keys </a></h3></li> <li><h3><a href="{% url 'publickey-list' %}"> - <i class="fas fa-envelope-open-text display-1"></i><br /> + <i class="fas fa-envelope-open-text"></i><br /> OpenPGP Public Keys </a></h3></li> <li><h3><a href="{% url 'ca-list' %}"> - <i class="fas fa-network-wired display-1"></i><br /> - <h3>CAs and Certificates</h3> + <i class="fas fa-network-wired"></i><br /> + CAs and Certificates </a></h3></li> </ul> diff --git a/ssh/templates/ssh/sshpublickey_detail.html b/ssh/templates/ssh/sshpublickey_detail.html index 7d08e15e37fe736d5df295bb498d060deca9ab32..03889400b9896f506ceb71535b0afc99b5e98f5b 100644 --- a/ssh/templates/ssh/sshpublickey_detail.html +++ b/ssh/templates/ssh/sshpublickey_detail.html @@ -2,16 +2,16 @@ {% block content %} - <nav class="d-md-block d-none" aria-label="breadcrumb"> - <ol class="breadcrumb"> - <li class="breadcrumb-item"><a href="{% url 'home' %}">Home</a></li> - <li class="breadcrumb-item"><a href="{% url 'ssh-list' %}">SSH Keys</a></li> - <li class="breadcrumb-item active" aria-current="page"> - <a href="{% url 'ssh-detail' publickey.pk %}">{{ publickey.server }}</a> - </li> - </ol> - </nav> +<nav class="nav-breadcrumb" aria-label="breadcrumb"> +<ol> + <li><a href="{% url 'home' %}">Home</a></li> + <li><a href="{% url 'ssh-list' %}">SSH Keys</a></li> + <li aria-current="page"> + <a href="{% url 'ssh-detail' publickey.pk %}">{{ publickey.server }}</a> + </li> +</ol> +</nav> - {% include 'ssh/sshpublickey_item.html' %} +{% include 'ssh/sshpublickey_item.html' %} {% endblock %} diff --git a/ssh/templates/ssh/sshpublickey_item.html b/ssh/templates/ssh/sshpublickey_item.html index b92cf082044312983be030fb3c3bfe430576cfae..7097326aac93c3b320b8a8e94ba26dd5105b1c4b 100644 --- a/ssh/templates/ssh/sshpublickey_item.html +++ b/ssh/templates/ssh/sshpublickey_item.html @@ -17,7 +17,7 @@ </h3> <div class="sshkey-fingerprint"> - <div class="sshkey-fignerprint-title"> + <div class="sshkey-fingerprint-title"> <i class="fas fa-fingerprint"></i> Fingerprint {% if not publickey.client_cert %}<small>compare on first connect</small>{% endif %} </div> diff --git a/ssh/templates/ssh/sshpublickey_list.html b/ssh/templates/ssh/sshpublickey_list.html index 4706b449a0fc4d135abee293e6a246cbae07bd7c..a3885ebeab83d46527c1e39dfe58a82602827cab 100644 --- a/ssh/templates/ssh/sshpublickey_list.html +++ b/ssh/templates/ssh/sshpublickey_list.html @@ -2,16 +2,16 @@ {% block content %} - <nav class="d-md-block d-none" aria-label="breadcrumb"> - <ol class="breadcrumb"> - <li class="breadcrumb-item"><a href="{% url 'home' %}">Home</a></li> - <li class="breadcrumb-item active" aria-current="page"> - <a href="{% url 'ssh-list' %}">SSH Keys</a> - </li> - </ol> - </nav> +<nav class="nav-breadcrumb" aria-label="breadcrumb"> +<ol> + <li><a href="{% url 'home' %}">Home</a></li> + <li aria-current="page"> + <a href="{% url 'ssh-list' %}">SSH Keys</a> + </li> +</ol> +</nav> -<h2 class="d-flex justify-content-between"> +<h2 class="h-control"> <div>SSH Public Keys</div> {% if perms.ssh.add_sshpublickey %} <a class="btn btn-outline-primary" href="{% url 'ssh-create' %}">