1
0
mirror of https://github.com/actix/actix-website synced 2024-12-18 01:43:59 +01:00
actix-website/static/css/actix.css

763 lines
11 KiB
CSS
Raw Normal View History

2018-05-22 23:15:08 +02:00
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto+Mono');
body {
2020-09-12 17:21:54 +02:00
font-family: Source Sans Pro, sans-serif;
2018-05-22 23:15:08 +02:00
}
a {
2020-09-12 17:21:54 +02:00
color: #306ebf;
2018-05-22 23:15:08 +02:00
}
a:hover {
2020-09-12 17:21:54 +02:00
color: #071540;
2018-05-22 23:15:08 +02:00
}
2020-09-12 17:21:54 +02:00
table,
td {
border: 1px solid black;
2018-05-22 23:15:08 +02:00
}
td {
2020-09-12 17:21:54 +02:00
padding: 4px;
2018-05-22 23:15:08 +02:00
}
img {
max-width: 100%;
}
2018-05-22 23:15:08 +02:00
/*
*
* ===== Content ====
*
*/
.actix-content {
line-height: 1.75rem;
}
.actix-content h1 {
margin-top: 2rem;
margin-bottom: 1.5rem;
font-size: 2.2rem;
}
2020-09-12 17:21:54 +02:00
.actix-content h1:first-child,
.actix-content h2:first-child {
2018-05-22 23:15:08 +02:00
margin-top: 0;
}
2020-09-12 17:21:54 +02:00
.actix-content h2,
.actix-content h3 {
2018-05-22 23:15:08 +02:00
margin-top: 2rem;
margin-bottom: 1rem;
}
.actix-content hr {
margin: 2rem 0;
}
.actix-content figure {
margin: 2.5rem auto;
max-width: 80%;
}
.actix-content figure figcaption {
font-size: 90%;
color: #818a91;
text-align: right;
}
.actix-content figure img {
max-width: 100%;
}
.actix-next {
text-align: right;
}
.github-edit .fa {
font-family: inherit;
}
.github-edit .fa:before {
2020-09-12 17:21:54 +02:00
font-family: FontAwesome;
2018-05-22 23:15:08 +02:00
display: inline-block;
font-style: normal;
font-weight: normal;
line-height: 1;
text-decoration: inherit;
}
.github-edit {
text-align: right;
padding-bottom: 1rem;
}
/*
*
* ===== Navbar =====
*
*/
2020-09-12 17:21:54 +02:00
.navbar-nav {
display: flex;
}
.navbar-nav img {
width: 100%;
}
.navbar-nav .nav-item {
margin-left: 1rem;
margin-right: 1rem;
}
2018-05-22 23:15:08 +02:00
.navbar-nav .nav-link {
padding-top: 0;
padding-bottom: 0;
font-weight: bold;
2018-05-22 23:15:08 +02:00
}
.navbar-brand {
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
width: 52px;
height: auto;
}
2020-09-12 17:21:54 +02:00
@keyframes spin-logo {
100% {
transform: rotate(360deg);
}
}
2018-05-22 23:15:08 +02:00
.navbar-brand img {
animation: spin-logo 30s linear infinite;
2018-06-09 18:32:32 +02:00
width: 48px;
height: 48px;
2018-05-22 23:15:08 +02:00
}
.navbar-toggle {
2020-09-12 17:21:54 +02:00
padding: 0.25rem 0.35rem;
2018-05-22 23:15:08 +02:00
font-size: 1.25rem;
line-height: 1;
height: 2.6rem;
width: 2.8rem;
background: 0 0;
border: 1px solid transparent;
2020-09-12 17:21:54 +02:00
border-radius: 0.25rem;
2018-05-22 23:15:08 +02:00
}
.navbar-light .navbar-toggle {
border-color: rgba(0, 0, 0, 0.1);
color: rgba(0, 0, 0, 0.9);
margin-top: 4px;
}
/* reset border and change color outline */
.navbar-light .navbar-toggle:focus {
outline: none;
border-color: #888;
}
.navbar-toggler-icon {
display: inline-block;
width: 1.5em;
height: 1.5em;
vertical-align: middle;
2020-09-12 17:21:54 +02:00
content: '';
2018-05-22 23:15:08 +02:00
background: no-repeat center center;
-webkit-background-size: 100% 100%;
background-size: 100% 100%;
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
}
.navbar-nav li {
line-height: 60px;
height: 60px;
padding-top: 0;
2018-06-23 21:14:26 +02:00
list-style: none;
}
2018-06-25 16:52:00 +02:00
.navbar-nav .language-selector {
position: relative;
2018-06-24 04:00:12 +02:00
}
.navbar-nav .language-selector ul.subitem {
display: none;
position: absolute;
right: 0;
2018-06-23 21:14:26 +02:00
}
.navbar-nav .language-selector:hover .subitem {
margin: 0;
padding: 0;
display: block;
background-color: #dcfaf7;
2018-06-23 21:14:26 +02:00
}
.navbar-nav .language-selector ul li {
padding: 0;
margin: 0;
height: auto;
line-height: 1;
}
.navbar-nav .language-selector ul li a {
display: block;
padding: 1em;
2018-05-22 23:15:08 +02:00
}
2018-06-09 18:32:32 +02:00
.doctoggle {
margin: -1rem 0 2rem 0;
display: none;
}
2020-09-12 17:21:54 +02:00
.leftnav {
margin: 0 -1rem;
padding: 0 1rem;
}
2018-06-09 18:32:32 +02:00
2018-05-22 23:15:08 +02:00
.leftnav li {
margin: 1rem 0rem;
}
.leftnav li a {
color: #888;
2020-09-12 17:21:54 +02:00
width: 100%;
height: 100%;
2018-06-11 14:37:12 +02:00
word-wrap: break-word;
2018-05-22 23:15:08 +02:00
}
.leftnav li.active {
2020-09-12 17:21:54 +02:00
margin: -0.5rem -1rem -0.5rem -1rem;
2018-06-09 18:32:32 +02:00
padding: 0.5rem 1rem 0.5rem 1rem;
2020-09-12 17:21:54 +02:00
background-color: #dfe6ee;
2018-05-22 23:15:08 +02:00
}
.leftnav li.active a {
2020-09-12 17:21:54 +02:00
color: #163e8c;
2018-05-22 23:15:08 +02:00
}
.leftnav h5 {
margin: 2rem 0 1rem 0;
}
.leftnav h5:first-child {
margin-top: 0;
}
.leftnav a {
font-weight: 600;
}
.in .navbar-nav .nav-item {
text-align: left;
}
.navbar-toggleable-md .navbar-nav {
margin-top: 0;
margin-bottom: 0;
margin-left: auto;
margin-right: auto;
}
.navbar-toggleable-md .navbar-brand {
margin-top: 0;
}
/*
*
* ===== Page header =====
*
*/
2020-09-12 17:21:54 +02:00
.actix-pageheader,
.jumbotron {
2018-05-22 23:15:08 +02:00
background-image: url(/img/jumbotron.jpg);
background-size: cover;
2020-09-12 17:21:54 +02:00
background-color: #071540;
2018-05-22 23:15:08 +02:00
color: #fff;
}
.jumbotron {
border-radius: 0;
padding: 4rem 1rem;
}
.actix-jumbotron {
margin-left: auto;
margin-right: auto;
max-width: 700px;
text-align: center;
}
.jumbotron .actix-logo {
max-height: 10rem;
2018-06-11 14:39:17 +02:00
max-width: 80%;
2018-05-22 23:15:08 +02:00
}
.jumbotron .lead {
font-size: 1.5rem;
margin: 2rem 0 0 0;
}
.actix-pageheader {
padding: 1rem 1rem;
margin-bottom: 2.5rem;
}
.actix-pageheader h1 {
font-weight: 300;
font-size: 3rem;
}
.actix-pageheader .lead {
2020-09-12 17:21:54 +02:00
color: #dadada;
2018-05-22 23:15:08 +02:00
font-size: 1.5rem;
margin-bottom: 0;
}
2018-06-11 14:37:12 +02:00
.actix-pageheader #blog-title {
2020-09-12 17:21:54 +02:00
width: 100%;
height: 100%;
2018-06-11 14:37:12 +02:00
word-wrap: break-word;
}
2018-05-22 23:15:08 +02:00
@media (min-width: 576px) {
.actix-pageheader {
padding: 2rem 0rem;
}
}
/*
*
* ===== Home =====
*
*/
.actix-jumbotron-install {
min-width: 120px;
margin-top: 2rem;
display: inline-block;
}
2018-05-22 23:15:08 +02:00
.actix-features h2 {
font-size: 1.5rem;
margin-top: 2.25rem;
margin-bottom: 0.8rem;
}
.actix-features .fa {
margin-right: 0.4rem;
2020-09-12 17:21:54 +02:00
color: #163e8c;
2018-05-22 23:15:08 +02:00
}
.actix-features p {
font-size: 1rem;
}
.final-pitch {
text-align: center;
}
2018-06-09 18:32:32 +02:00
.actix-showcase {
overflow: hidden;
margin-top: 2rem;
margin-bottom: 2rem;
padding: 2rem 1rem 0 1rem;
2020-09-12 17:21:54 +02:00
background-color: #dfe6ee;
2018-06-09 18:32:32 +02:00
}
.actix-showcase ul {
list-style: none;
margin: 0;
padding: 0;
line-height: 2;
}
2020-09-12 17:21:54 +02:00
.actix-showcase input[type='radio'] {
2018-06-09 18:32:32 +02:00
display: none;
}
.actix-showcase div.feature {
display: none;
}
2020-09-12 17:21:54 +02:00
.actix-showcase input[type='radio']:checked + div.feature {
2018-06-09 18:32:32 +02:00
display: block;
}
.actix-showcase label {
display: block;
font-weight: bold;
2020-09-12 17:21:54 +02:00
color: #163e8c;
2018-06-09 18:32:32 +02:00
cursor: pointer;
}
.actix-showcase label:hover {
2020-09-12 17:21:54 +02:00
color: #003b3b;
2018-06-09 18:32:32 +02:00
}
.actix-feature-selectors {
2020-09-12 17:21:54 +02:00
padding-bottom: 2rem;
}
.actix-feature-selector {
text-align: center;
padding: 0.5rem 1rem;
font-weight: bold;
}
.actix-feature-selector.active {
background-color: white;
}
.actix-feature-selector.active a {
color: #333 !important;
text-decoration: none;
}
2018-06-24 16:31:09 +02:00
2018-05-22 23:15:08 +02:00
/*
*
* ===== Footer =====
*
*/
.actix-footer {
padding: 4rem 0;
margin-top: 4rem;
font-size: 85%;
line-height: 35px;
}
.actix-footer-gray {
padding-left: 1rem;
padding-right: 1rem;
margin: 0 auto;
}
.actix-footer-social a .fa {
font-size: 35px;
}
.actix-footer-social a .fa-github {
margin-left: 35px;
}
/*
*
* ===== Misc =====
*
*/
p.uplink {
margin: 0;
float: right;
}
/*
*
* ===== Highlight =====
*
*/
code {
2020-09-12 17:21:54 +02:00
color: #163e8c;
2018-05-22 23:15:08 +02:00
}
2020-09-12 17:21:54 +02:00
pre,
code {
2018-05-22 23:15:08 +02:00
font-family: 'Roboto Mono', monospace;
}
pre {
display: block;
overflow-x: auto;
margin: 2rem 0rem;
padding: 1rem;
2020-09-12 17:21:54 +02:00
background-color: #f7f7f7;
2018-05-22 23:15:08 +02:00
font-size: 90%;
line-height: 1.4rem;
}
/* Show section header on hover */
h2:hover a:after,
h3:hover a:after,
h4:hover a:after,
h5:hover a:after {
2020-09-12 17:21:54 +02:00
content: '\2002\00a7\2002';
2018-05-22 23:15:08 +02:00
}
h2:hover a,
h3:hover a,
h4:hover a,
h5:hover a {
2020-09-12 17:21:54 +02:00
text-decoration: none;
2018-05-22 23:15:08 +02:00
}
2020-09-12 17:21:54 +02:00
@media (min-width: 520px) {
2018-05-22 23:15:08 +02:00
.jumbotron {
padding: 4rem;
}
}
/*
*
* ===== Utilities =====
*
*/
2020-09-12 17:21:54 +02:00
.d-flex {
display: flex;
}
2018-05-22 23:15:08 +02:00
2020-09-12 17:21:54 +02:00
.justify-content-between {
justify-content: space-between;
}
2018-05-22 23:15:08 +02:00
2020-09-12 17:21:54 +02:00
/*
2018-05-22 23:15:08 +02:00
*
* ===== Media queries =====
*
*/
2020-09-12 17:21:54 +02:00
@media screen and (max-width: 767px) {
.doctoggle {
display: block;
}
2018-06-09 18:32:32 +02:00
}
2018-05-22 23:15:08 +02:00
2020-09-12 17:21:54 +02:00
@media (min-width: 768px) {
2018-06-09 18:32:32 +02:00
.leftnav {
display: block;
}
2020-09-12 17:21:54 +02:00
.bootstrap-vertical-nav .navbar .navbar-collapse {
padding: 0;
max-height: none;
}
.bootstrap-vertical-nav .navbar ul {
float: none;
}
.bootstrap-vertical-nav .navbar ul:not {
display: block;
}
.bootstrap-vertical-nav .navbar li {
float: none;
display: block;
}
.bootstrap-vertical-nav .navbar-nav .nav-item + .nav-item {
margin-left: 0;
}
}
@media screen and (min-width: 480px) {
2018-05-22 23:15:08 +02:00
.hidden-lg-up {
display: none !important;
}
.navbar-collapse {
display: flex !important;
}
}
2020-09-12 17:21:54 +02:00
@media screen and (max-width: 479px) {
2018-05-22 23:15:08 +02:00
.hd-lg-down {
display: none !important;
}
.navbar-toggleable-md > .container {
2020-09-12 17:21:54 +02:00
padding-right: 0;
padding-left: 0;
2018-05-22 23:15:08 +02:00
}
.navbar-brand {
margin-top: 0 !important;
margin-right: 1rem !important;
}
.navbar-nav {
display: flex;
flex-direction: column;
padding-left: 0;
margin-bottom: 0 !important;
margin-top: 0 !important;
list-style: none;
}
.navbar-nav .nav-link {
padding: 0;
}
.navbar-nav li {
line-height: 36px;
height: 36px;
padding-top: 0;
}
.navbar-nav .nav-item + .nav-item {
margin-left: 0;
}
.actix-footer-gray {
text-align: center;
flex-direction: column;
}
.actix-footer-social a .fa-github {
margin-right: 1rem;
}
.navbar-nav .language-selector:hover .subitem {
2018-06-23 21:14:26 +02:00
margin: 0 -2rem 0 -1rem;
display: block;
background-color: #e8f9fc;
}
2018-05-22 23:15:08 +02:00
}
@media (min-width: 480px) and (max-width: 576px) {
2020-09-12 17:21:54 +02:00
header .nav,
#heads-up {
width: 100%;
}
.hd-lg-down {
width: 50%;
2018-05-27 21:04:29 +02:00
}
}
@media (min-width: 576px) and (max-width: 768px) {
2020-09-12 17:21:54 +02:00
header .nav,
#heads-up {
width: 88%;
}
.hd-lg-down {
width: 40%;
2018-05-27 21:04:29 +02:00
}
}
@media (min-width: 768px) and (max-width: 992px) {
2020-09-12 17:21:54 +02:00
header .nav,
#heads-up {
width: 90%;
2018-05-22 23:15:08 +02:00
}
2018-06-09 11:22:55 +02:00
.hd-lg-down {
width: 60%;
2018-06-09 11:22:55 +02:00
}
2018-05-22 23:15:08 +02:00
}
@media (min-width: 992px) {
2020-09-12 17:21:54 +02:00
header .nav,
#heads-up {
width: 75%;
}
.hd-lg-down {
width: 60%;
}
2020-09-12 17:21:54 +02:00
.actix-pageheader .container,
.container {
width: 72%;
}
2018-05-22 23:15:08 +02:00
.actix-footer-gray {
width: 88%;
2018-05-22 23:15:08 +02:00
}
}
2018-06-23 09:54:08 +02:00
#act-cn-tabs {
2018-06-23 16:31:17 +02:00
padding: 2rem 2rem 1rem 2rem;
2018-06-23 09:54:08 +02:00
margin: 2rem auto;
2020-09-12 17:21:54 +02:00
background-color: #dfe6ee;
2018-06-23 09:54:08 +02:00
}
2020-09-12 17:21:54 +02:00
.act-menu li {
text-align: center;
line-height: 44px;
font-size: 15px;
overflow: hidden;
2018-06-23 09:54:08 +02:00
}
2020-09-12 17:21:54 +02:00
.act-menu li.off {
2018-06-23 16:31:17 +02:00
padding: 0 1.5rem;
2020-09-12 17:21:54 +02:00
background-color: #ffffff;
color: #589c9e;
font-weight: bold;
2018-06-23 16:31:17 +02:00
}
@media (min-width: 768px) {
#act-cn-tabs {
display: flex;
flex-flow: row;
padding: 2rem 1rem 1rem 2rem;
}
#act-cn-tabs #content {
2020-09-12 17:21:54 +02:00
width: 77%;
2018-06-23 16:31:17 +02:00
}
}
#heads-up {
margin-left: auto;
margin-right: auto;
margin-top: 1rem;
}
@media (prefers-color-scheme: dark) {
html body {
background: #111;
color:white;
}
div.actix-showcase {
background-color: #333;
}
a.nav-link,li.active * {
color:cornflowerblue !important;
}
a:hover{
color: cornflowerblue;
opacity: 0.8;
}
pre,p code {
background: #222;
color:white;
}
a.navbar-brand img {
filter:invert(1) brightness(2)
}
li.active {
background: #222 !important;
}
/*
you can strip out these by just choosing another code theme that is dark mode compatible
*/
span.s {
color: green !important;
}
span.k,span.kd {
color:violet !important;
}
span.sd,span.cp {
color: #888 !important;
}
span.kt,span.mi {
color:red !important;
}
span.nf{
color:dodgerblue !important;
}
span.nc,span.nb {
color:gold !important;
}
.navbar-toggler-icon {
filter: invert(100%);
}
}