Use badges for instance languages/categories
authorChocobozzz <me@florianbigard.com>
Wed, 28 Aug 2019 08:22:01 +0000 (10:22 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Thu, 5 Sep 2019 08:17:02 +0000 (10:17 +0200)
client/src/app/+about/about-instance/about-instance.component.html
client/src/app/+about/about-instance/about-instance.component.scss

index c6247c4aeef371ee534905d6979dc2585e417cee..80acfcce02d4b05b2ad2b9e81da59b069b308f55 100644 (file)
@@ -7,26 +7,16 @@
       <div *ngIf="isContactFormEnabled" (click)="openContactModal()" i18n role="button" class="contact-admin">Contact administrator</div>
     </div>
 
+    <div class="block instance-badges">
+      <span *ngFor="let category of categories" class="badge badge-primary category">{{ category }}</span>
+
+      <span *ngFor="let language of languages" class="badge badge-secondary language">{{ language }}</span>
+    </div>
+
     <div class="short-description">
       <div class="block short-description">{{ shortDescription }}</div>
 
       <div *ngIf="isNSFW" class="block dedicated-to-nsfw">This instance is dedicated to sensitive/NSFW content.</div>
-
-      <div class="block">
-        <div class="section-title" *ngIf="languages.length !== 0">Main instance languages</div>
-
-        <ul>
-          <li *ngFor="let language of languages">{{ language }}</li>
-        </ul>
-      </div>
-
-      <div class="block">
-        <div class="section-title" *ngIf="categories.length !== 0">Main instance categories</div>
-
-        <ul>
-          <li *ngFor="let category of categories">{{ category }}</li>
-        </ul>
-      </div>
     </div>
 
     <div class="middle-title" *ngIf="html.administrator || maintenanceLifetime || businessModel">
index d71cfffc638741f66dde17b357b10aaacc724ea8..909ae5c21330078da2f5f0a14b1443973ce9df0a 100644 (file)
@@ -7,7 +7,6 @@
 
   .title {
     font-size: 20px;
-    margin-bottom: 15px;
     font-weight: $font-semibold;
   }
 
   }
 }
 
+.instance-badges {
+  font-size: 16px;
+
+  .badge {
+    font-size: 12px;
+    font-weight: $font-semibold;
+    margin-right: 5px;
+
+    &.category {
+      background-color: var(--mainColor);
+    }
+  }
+}
+
 .section-title {
   font-weight: $font-semibold;
   font-size: 16px;