documentation/assets/style.scss

843 lines
14 KiB
SCSS
Raw Normal View History

@import 'fontawesome.scss';
2022-10-23 23:59:48 +02:00
@import 'roboto.scss';
@import 'roboto-mono.scss';
2018-09-23 00:14:25 +02:00
$white: #fff ; // color5
$lightest: #d9e1e8; // color2
$lighter: #9baec8; // color3
$darkest: #1F232B; // color1
$black: #000 ; // color8
$darker: lighten($darkest, 34%);
$vibrant: #2b90d9; // color4
$error: #df405a; // color6
$success: #79bd9a; // color7
$transition-in: 100ms linear;
$transition-out: 250ms linear;
2020-01-05 20:08:58 +01:00
$content-width: 1080px;
2018-10-06 02:34:46 +02:00
$mobile-width: 600px;
2018-09-23 00:14:25 +02:00
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
box-sizing: border-box;
text-rendering: optimizelegibility;
font-feature-settings: "kern";
text-size-adjust: none;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
a {
outline: 0;
}
body {
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
text-rendering: optimizeLegibility;
background-color: $darkest;
color: $lighter;
font-size: 13px;
line-height: 18px;
font-weight: 400;
padding-top: 30px;
}
.container {
2020-01-05 20:08:58 +01:00
box-sizing: border-box;
2018-09-23 00:14:25 +02:00
max-width: $content-width;
margin: 0 auto;
2020-01-05 20:08:58 +01:00
padding: 0 20px;
2018-09-23 00:14:25 +02:00
}
.sidebar-layout {
display: grid;
grid-gap: 15px;
grid-template-columns: 260px minmax(300px, ($content-width - 260px));
grid-template-rows: auto;
margin-bottom: 30px;
2018-10-06 02:34:46 +02:00
@media screen and (max-width: $mobile-width) {
display: block;
}
2018-09-23 00:14:25 +02:00
}
.sidebar {
2018-10-06 02:34:46 +02:00
@media screen and (max-width: $mobile-width) {
margin-bottom: 60px;
}
2018-09-23 00:14:25 +02:00
.brand {
display: flex;
justify-content: flex-start;
align-items: center;
color: $darkest;
margin-top: 12px;
2018-09-23 00:14:25 +02:00
margin-bottom: 52px;
img {
height: 38px;
}
2018-10-06 02:34:46 +02:00
@media screen and (max-width: $mobile-width) {
justify-content: center;
img {
position: static;
}
}
2018-09-23 00:14:25 +02:00
}
& > ul > li {
margin-bottom: 26px;
2020-01-05 20:08:58 +01:00
&:last-child {
margin-bottom: 0;
}
}
2018-09-23 00:14:25 +02:00
.sub-title {
display: block;
padding: 10px;
font-weight: 500;
text-transform: uppercase;
2018-09-23 00:14:25 +02:00
}
& > ul a {
display: block;
color: $white;
text-decoration: none;
font-weight: 500;
padding: 10px;
2018-09-23 00:14:25 +02:00
}
.sub-menu {
a.active {
color: $vibrant;
}
&.collapsed {
display: none;
}
.sub-menu {
padding-left: 15px;
}
2018-09-23 00:14:25 +02:00
}
}
.footer {
padding-bottom: 30px;
.legal {
margin-top: 30px;
2018-10-06 02:34:46 +02:00
&--right {
float: right;
text-align: right;
@media screen and (max-width: $mobile-width) {
float: none;
text-align: left;
}
}
2018-09-23 00:14:25 +02:00
a {
color: $darker;
text-decoration: none;
}
}
}
main {
h1 {
font-size: 36px;
2018-10-06 02:34:46 +02:00
line-height: 1.48;
2018-09-23 00:14:25 +02:00
font-weight: 600;
color: $lightest;
padding-bottom: 35px;
border-bottom: 1px solid lighten($darkest, 8%);
margin-bottom: 35px;
margin-left: -2.63px;
text-align: left;
position: relative;
}
h2 {
font-size: 26px;
margin-left: -1.63px;
line-height: 1.22;
text-align: left;
margin-top: 50px;
margin-bottom: 30px;
font-weight: 600;
color: $lightest;
}
h3 {
font-size: 21px;
line-height: 1.22;
font-weight: 500;
color: $lightest;
margin-top: 25px;
margin-bottom: 30px;
margin-left: -1.75px;
text-align: left;
}
h4 {
font-size: 18px;
line-height: 1.22;
font-weight: 500;
color: $lightest;
margin-top: 25px;
margin-bottom: 30px;
margin-left: -1.75px;
text-align: left;
}
h5 {
font-size: 18px;
line-height: 1.22;
font-weight: 500;
color: $lightest;
margin-top: 25px;
margin-bottom: 30px;
margin-left: -1.75px;
text-align: left;
}
h6 {
font-weight: 700;
margin-top: 25px;
margin-left: -1.75px;
text-align: left;
color: $lightest;
font-size: 16px;
line-height: 28px;
margin-bottom: 26px;
}
blockquote {
color: $lightest;
font-size: 16px;
line-height: 28px;
font-style: italic;
border-left: 3px solid $vibrant;
padding-left: 20px;
margin-left: -23px;
padding-bottom: 2px;
margin-bottom: 26px;
p:last-child {
margin-bottom: 0;
}
}
p {
color: $lightest;
font-size: 16px;
line-height: 28px;
font-weight: normal;
margin-bottom: 26px;
hyphens: auto;
}
a {
color: lighten($vibrant, 18%);
}
img {
display: block;
margin: 0 auto;
max-width: 100%;
height: auto;
border-radius: 4px;
box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
}
.image-large {
margin-bottom: 50px;
}
.image-pull-left {
float: left;
}
em {
font-style: italic;
}
strong {
font-weight: 600;
color: #fff;
}
ul,
ol {
counter-reset: post;
margin-bottom: 26px;
}
ul li,
ol li {
margin-left: 30px;
margin-bottom: 14px;
color: $lightest;
font-size: 16px;
line-height: 28px;
&::before {
position: absolute;
display: inline-block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 78px;
margin-left: -78px;
text-align: right;
padding-top: 4px;
padding-right: 15px;
content: '\2022';
}
}
ol > li {
&::before {
padding-top: 0;
content: counter(post) ". ";
counter-increment: post;
}
}
li > ul,
li > ol {
margin-top: 14px;
}
2018-09-23 02:34:19 +02:00
table {
width: 100%;
margin-bottom: 26px;
color: $lightest;
tr:nth-child(2n),
thead tr {
background-color: darken($darkest, 4%);
}
th,
td {
font-size: 16px;
2018-09-24 01:04:17 +02:00
line-height: 28px;
padding: 10px 15px;
vertical-align: middle;
2018-09-23 02:34:19 +02:00
border: 1px solid lighten($darkest, 8%);
.fa-check {
color: $success;
}
.fa-times {
color: $error;
}
}
thead th {
font-weight: 500;
}
}
2018-09-23 00:14:25 +02:00
figure {
figcaption {
margin-top: 8px;
text-align: center;
&,
p {
color: $darker;
}
}
}
hr {
background: transparent;
border: 0;
border-top: 1px solid $darker;
margin: 26px 0;
}
pre {
margin-bottom: 26px;
font-size: 16px;
line-height: 28px;
background-color: lighten($darkest, 8%);
border-radius: 4px;
padding: 16px;
overflow: auto;
}
figure pre {
margin-bottom: 0;
}
2018-09-23 00:14:25 +02:00
code {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
font-family: 'Roboto Mono', monospace;
background-color: lighten($darkest, 8%);
border-radius: 3px;
2020-01-05 20:08:58 +01:00
hyphens: none;
white-space: pre;
2018-09-23 00:14:25 +02:00
}
pre code {
background: transparent;
padding: 0;
}
Update content for 4.0 (part 1) (#991) * add rules * join date on profiles * deprecate follow scope * deprecate identity proofs * familiar followers * use definition lists instead of tables for defining activitypub properties * reformat notifications page into markdown * fix broken links to publicKey header * Application website is now nullable * update environment variables added and removed * fix typo * fix heading level * min_id and max_id can be used at the same time (3.3) * fix typo * new tootctl options * reformat tootctl page to use definition lists for params * add rules and configuration to Instance * fix typo * refactor instance api page * 3.3.0 duration on mutes * 3.3.0 mute_expires_at * improve section headings * 3.4.0 resend email confirmation api * 3.4.0 policy on push subscriptions * 3.4.0 add details to account registration error * refactor accounts api page and start adding relrefs to entity pages * 3.4.0 accounts/lookup api * add see also to accounts methods * add more see-also links * 3.5.0 appeal mod decisions * 3.5.0 reformat reports and add category/rule_ids params * document report entity and missing responses * fix typos * fix relrefs and url schema, add aliases to old urls * add archetypes for new methods/entities * update archetypes with see-also stubs * clearer presentation of rate limits * announcements api methods * refactor apps methods * refactor bookmarks methods + some anchors * refactor conversations methods * custom_emojis methods refactor * anchors * refactor directory methods * refactor domain_blocks methods * add see also to emails methods * fix page relref shortcodes to specific methods + refactor endorsements methods * min_id max_id * refactor favourites methods * refactor featured_tags methods * refactor filters methods, make path params consistent, i18n required shortcode * follow_requests methods * lists methods * markers methods * forgot to add entity links * media methods, also fix formatting of some json errors * mutes methods, add more see-also links * oembed methods * preferences methods * proofs methods * push methods * suggestions methods * 3.5.0 add new trend types, fix formatting * refactor streaming methods * refactor oauth methods * note that streaming api casts payload to string * refactor search methods * refactor polls methods * remove unnecessary link * reformat scheduled_statuses methods * reformat timelines methods * reformat statuses methods * 3.5.0 editing statuses * consistent use of array brackets in form data parameters * update dev setup guide, add vagrant and clean up text * add admin/accounts methods * 3.6 role entity * admin/accounts methods v2 * minor fix * stub admin/reports methods * document admin reports * add 403 example to methods archetype * cleanup entities for admin reports and add new attrs * 3.6.0 domain allows methods + normalize admin entity namespace * fix search-and-replace error * add aliases for admin entities * 3.6.0 canonical email blocks entity * 3.5.0 admin/retention api * 3.5.0 add admin::ip doc * 3.5.0 admin/reports * 3.6.0 admin/domain_allows * 3.5.0 admin/dimensions * 3.6.0 permissions and roles * minor formatting fix * add anchor link to headings * checkpoint * add update commands to dev env setup guide * change mentions of v3.6 to v4.0 * tootctl now uses custom roles * fix formatting * v2 instance api * update frontmatter, add better titles to pages * minor wording change * consistency * add more aliases * add placeholders and WIP notices * explain link pagination and stub out todos * switch baseURL to https * 422 on reports with rules but category!=violation * document bug fixes * fix typo * remove duplicate API method definition * s/tootsuite/mastodon for github links * remove unnecessary escaping * s/tootsuite/mastodon in Entity archetype * add missing nullable shortcode * clarify oauth scope when requesting a user token * api/v2/media now synchronous for images * DISALLOW_UNAUTHENTICATED_API_ACCESS * add undocumented env variables * add instance domain blocks and extended description api * add SMTP_ENABLE_STARTTLS * add description to SMTP_ENABLE_STARTTLS * take suggestions from open PRs * normalize links and flavour language * Fully document streaming API based on source code * Add mention of MIME types * bump to ruby 3.0.4 * clarify how to check on async media processing * validation of replies_policy * remove TODOs on admin account action * EmailDomainBlocks * IpBlocks * Admin::DomainBlock * remove TODOs * following hashtags * followed_tags * remove reference to unused parameter * add new oauth scopes for admin blocks and allows * fix command signature for i18n-tasks normalize * reformat code structure page * document fixes for following tags (assume 4.0.3) * Add warning about pre-4.0 hardcoded roles * add note about case sensitivity * remove use of 'simply' from docs * remove reference to silencing * add reference to IDN normalization for verified links * add lang parameter
2022-11-20 07:34:38 +01:00
dl {
color: $lightest;
font-size: 16px;
line-height: 28px;
font-weight: normal;
margin-bottom: 26px;
hyphens: auto;
dt {
font-weight: 700;
background: lighten($darkest, 8%);
padding: 2px 16px;
max-width: max-content;
margin-bottom: 4px;
}
dd {
margin-left: 16px;
margin-bottom: 16px;
}
}
.mastodon-embed,
iframe {
2018-09-23 00:14:25 +02:00
width: 100%;
display: block;
margin: 0 auto;
margin-bottom: 26px;
border-radius: 4px;
box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
}
}
.mascot {
display: flex;
justify-content: flex-start;
align-items: center;
margin-bottom: 60px;
2018-10-06 02:34:46 +02:00
@media screen and (max-width: $mobile-width) {
display: none;
}
2018-09-23 00:14:25 +02:00
}
#TableOfContents {
color: $lighter;
ul li {
color: inherit;
}
& > ul > li {
margin-left: 0;
&::before {
display: none;
}
}
a {
text-decoration: none;
color: inherit;
}
padding-bottom: 35px - 14px;
border-bottom: 1px solid lighten($darkest, 8%);
margin-bottom: 35px;
}
2018-09-25 21:33:43 +02:00
.cta-banner {
background: $vibrant;
border-radius: 4px;
text-align: center;
padding: 40px;
h4 {
font-size: 24px;
line-height: 1.08;
font-weight: 600;
margin-bottom: 20px;
color: #fff;
}
p {
color: #fff;
font-size: 18px;
line-height: 1.22;
margin-bottom: 20px;
}
& > a {
font-weight: 500;
color: $vibrant;
background: #fff;
border-radius: 4px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
font-family: inherit;
display: inline-block;
text-align: center;
font-size: 16px;
text-decoration: none;
line-height: 36px;
padding: 4px 16px;
margin: 0 auto;
border: 0;
cursor: pointer;
&.secondary {
padding: 2px 14px;
border: 2px solid #fff;
background: transparent;
margin-left: 4px;
color: #fff;
}
@media screen and (max-width: 375px) {
margin-bottom: 10px;
}
}
}
.hint {
margin: 26px 0;
padding: 16px 16px 16px 56px;
position: relative;
border-left: 4px solid;
border-radius: 4px;
background-color: lighten($darkest, 8%);
color: $white;
font-size: 16px;
line-height: 28px;
&-info {
border-color: $vibrant;
.hint-icon {
color: $vibrant;
}
}
&-warning {
border-color: #ca8f04;
.hint-icon {
color: #ca8f04;
}
}
&-success {
border-color: $success;
.hint-icon {
color: $success;
}
}
&-danger {
border-color: $error;
.hint-icon {
color: $error;
}
}
&-icon {
position: absolute;
top: 18px;
left: 16px;
font-size: 24px;
}
}
.page-ref {
display: block;
background: lighten($darkest, 4%);
color: $vibrant;
text-decoration: none;
font-weight: 500;
font-size: 18px;
position: relative;
margin: 26px 0;
padding: 24px 24px 24px 50px;
border-radius: 4px;
&-icon {
position: absolute;
top: 20px;
left: 16px;
font-size: 24px;
}
&:hover,
&:focus,
&:active {
background: lighten($darkest, 8%);
}
}
.api-method {
display: flex;
align-items: center;
font-weight: 500;
font-size: 18px;
&-method {
display: inline-flex;
align-items: center;
padding: 2px 0;
border-radius: 9999px;
height: 21px;
color: $white;
background: $vibrant;
margin: 0;
margin-right: 8px;
span {
display: inline-block;
padding: 0 8px;
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
line-height: 15px;
}
}
&-url {
background: lighten($darkest, 4%);
border-radius: 4px;
padding: 8px;
font-size: 16px;
margin: 26px 0;
line-height: 1.7;
}
&-host {
color: $darker;
}
&-path {
font-weight: 700;
color: $white;
}
}
.api-method-parameters-list {
border: 1px solid lighten($darkest, 8%);
border-radius: 4px;
margin-bottom: 26px;
}
.api-method-parameters-type {
font-weight: 400;
color: $darker;
}
.api-method-parameters-type,
.api-method-response-example h5 {
font-size: 16px;
margin-bottom: 16px;
}
.api-method-parameter {
display: flex;
border-bottom: 1px solid lighten($darkest, 8%);
&:last-child {
border-bottom: 0;
}
&-cell {
box-sizing: border-box;
padding: 16px 10px;
color: $white;
}
&-required {
text-transform: uppercase;
font-size: 12px;
font-weight: 500;
color: $error;
}
&-optional {
text-transform: uppercase;
font-size: 12px;
font-weight: 500;
color: $darker;
}
&-name {
width: 180px;
font-size: 16px;
& > div:first-child {
margin-bottom: 2px;
}
}
&-type {
width: 100px;
}
&-description {
flex: 1 1 0%;
font-size: 15px;
}
}
.api-method-response-example {
&-indicator {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
background: $success;
&-error {
background: $error;
}
}
}
2020-09-23 03:22:34 +02:00
.sponsorship {
background: darken($darkest, 4%);
border-radius: 4px;
padding: 40px 0;
h2 {
line-height: 21px;
font-weight: 500;
font-size: 16px;
color: lighten($darkest, 40%);
text-align: center;
margin-bottom: 20px;
}
.logo-grid {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
& > div {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
}
a {
display: inline-block;
text-decoration: none;
padding: 0 10px;
img {
display: block;
margin: 0;
height: 28px;
width: auto;
opacity: 0.8;
transition: all $transition-in;
filter: grayscale(100%);
}
&:hover {
img {
opacity: 0.9;
transition: all $transition-out;
filter: grayscale(0%);
}
}
}
}
h2 {
color: $lightest;
}
.logo-grid > div {
flex-wrap: wrap;
}
.logo-grid a {
padding: 20px;
}
}
Update content for 4.0 (part 1) (#991) * add rules * join date on profiles * deprecate follow scope * deprecate identity proofs * familiar followers * use definition lists instead of tables for defining activitypub properties * reformat notifications page into markdown * fix broken links to publicKey header * Application website is now nullable * update environment variables added and removed * fix typo * fix heading level * min_id and max_id can be used at the same time (3.3) * fix typo * new tootctl options * reformat tootctl page to use definition lists for params * add rules and configuration to Instance * fix typo * refactor instance api page * 3.3.0 duration on mutes * 3.3.0 mute_expires_at * improve section headings * 3.4.0 resend email confirmation api * 3.4.0 policy on push subscriptions * 3.4.0 add details to account registration error * refactor accounts api page and start adding relrefs to entity pages * 3.4.0 accounts/lookup api * add see also to accounts methods * add more see-also links * 3.5.0 appeal mod decisions * 3.5.0 reformat reports and add category/rule_ids params * document report entity and missing responses * fix typos * fix relrefs and url schema, add aliases to old urls * add archetypes for new methods/entities * update archetypes with see-also stubs * clearer presentation of rate limits * announcements api methods * refactor apps methods * refactor bookmarks methods + some anchors * refactor conversations methods * custom_emojis methods refactor * anchors * refactor directory methods * refactor domain_blocks methods * add see also to emails methods * fix page relref shortcodes to specific methods + refactor endorsements methods * min_id max_id * refactor favourites methods * refactor featured_tags methods * refactor filters methods, make path params consistent, i18n required shortcode * follow_requests methods * lists methods * markers methods * forgot to add entity links * media methods, also fix formatting of some json errors * mutes methods, add more see-also links * oembed methods * preferences methods * proofs methods * push methods * suggestions methods * 3.5.0 add new trend types, fix formatting * refactor streaming methods * refactor oauth methods * note that streaming api casts payload to string * refactor search methods * refactor polls methods * remove unnecessary link * reformat scheduled_statuses methods * reformat timelines methods * reformat statuses methods * 3.5.0 editing statuses * consistent use of array brackets in form data parameters * update dev setup guide, add vagrant and clean up text * add admin/accounts methods * 3.6 role entity * admin/accounts methods v2 * minor fix * stub admin/reports methods * document admin reports * add 403 example to methods archetype * cleanup entities for admin reports and add new attrs * 3.6.0 domain allows methods + normalize admin entity namespace * fix search-and-replace error * add aliases for admin entities * 3.6.0 canonical email blocks entity * 3.5.0 admin/retention api * 3.5.0 add admin::ip doc * 3.5.0 admin/reports * 3.6.0 admin/domain_allows * 3.5.0 admin/dimensions * 3.6.0 permissions and roles * minor formatting fix * add anchor link to headings * checkpoint * add update commands to dev env setup guide * change mentions of v3.6 to v4.0 * tootctl now uses custom roles * fix formatting * v2 instance api * update frontmatter, add better titles to pages * minor wording change * consistency * add more aliases * add placeholders and WIP notices * explain link pagination and stub out todos * switch baseURL to https * 422 on reports with rules but category!=violation * document bug fixes * fix typo * remove duplicate API method definition * s/tootsuite/mastodon for github links * remove unnecessary escaping * s/tootsuite/mastodon in Entity archetype * add missing nullable shortcode * clarify oauth scope when requesting a user token * api/v2/media now synchronous for images * DISALLOW_UNAUTHENTICATED_API_ACCESS * add undocumented env variables * add instance domain blocks and extended description api * add SMTP_ENABLE_STARTTLS * add description to SMTP_ENABLE_STARTTLS * take suggestions from open PRs * normalize links and flavour language * Fully document streaming API based on source code * Add mention of MIME types * bump to ruby 3.0.4 * clarify how to check on async media processing * validation of replies_policy * remove TODOs on admin account action * EmailDomainBlocks * IpBlocks * Admin::DomainBlock * remove TODOs * following hashtags * followed_tags * remove reference to unused parameter * add new oauth scopes for admin blocks and allows * fix command signature for i18n-tasks normalize * reformat code structure page * document fixes for following tags (assume 4.0.3) * Add warning about pre-4.0 hardcoded roles * add note about case sensitivity * remove use of 'simply' from docs * remove reference to silencing * add reference to IDN normalization for verified links * add lang parameter
2022-11-20 07:34:38 +01:00
.heading {
display: flex;
align-items: center;
&__anchor-link {
display: inline-flex;
align-content: center;
margin-left: 0.25em;
}
}