From bf3cb42da78a3f31a9e07167a764aa942ec73731 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 5 Oct 2022 03:47:56 +0200 Subject: Add server banner to web app, add `GET /api/v2/instance` to REST API (#19294) Cherry-picked d2528b26b6da34f34b5d7a392e263428d3c09d69 Conflicts: - `app/serializers/initial_state_serializer.rb`: Upstream changed stuff, we had extra attributes. Applied upstream changes while keeping our extra attributes. - `app/serializers/rest/instance_serializer.rb`: Upstream actually moved that to `app/serializers/rest/v1/instance_serializer.rb`, so updated that file by keeping our extra attributes, and took upstream's version of `app/serializers/rest/instance_serializer.rb`. - `spec/views/about/show.html.haml_spec.rb`: Took upstream's version. --- app/javascript/styles/mastodon/components.scss | 82 ++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index a75437b1c..b906117db 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -7949,3 +7949,85 @@ noscript { } } } + +.server-banner { + padding: 20px 0; + + &__introduction { + color: $darker-text-color; + margin-bottom: 20px; + + strong { + font-weight: 600; + } + + a { + color: inherit; + text-decoration: underline; + + &:hover, + &:active, + &:focus { + text-decoration: none; + } + } + } + + &__hero { + display: block; + border-radius: 4px; + width: 100%; + height: auto; + margin-bottom: 20px; + aspect-ratio: 1.9; + border: 0; + background: $ui-base-color; + object-fit: cover; + } + + &__description { + margin-bottom: 20px; + } + + &__meta { + display: flex; + gap: 10px; + max-width: 100%; + + &__column { + flex: 0 0 auto; + width: calc(50% - 5px); + overflow: hidden; + } + } + + &__number { + font-weight: 600; + color: $primary-text-color; + } + + &__number-label { + color: $darker-text-color; + font-weight: 500; + } + + h4 { + text-transform: uppercase; + color: $darker-text-color; + margin-bottom: 10px; + font-weight: 600; + } + + .account { + padding: 0; + border: 0; + } + + .account__avatar-wrapper { + margin-left: 0; + } + + .spacer { + margin: 10px 0; + } +} -- cgit