Sfoglia il codice sorgente

Add no posts banner

sbkwgh 8 anni fa
parent
commit
8ae770b638
1 ha cambiato i file con 17 aggiunte e 0 eliminazioni
  1. 17 0
      src/components/routes/Index.vue

+ 17 - 0
src/components/routes/Index.vue

@@ -29,6 +29,9 @@
 					<td>{{thread.category}}</td>
 					<td>{{thread.replies}}</td>
 				</tr>
+				<tr class='thread' v-if='!threads.length' colspan='4'>
+					<td colspan='4' class='thread--empty'>No threads or posts.</td>
+				</tr>
 			</tbody>
 		</div>
 	</div>
@@ -119,6 +122,20 @@
 			}
 		}
 
+		@at-root #{&}--empty {
+			height: 5rem;
+			text-align: center;
+			font-size: 2rem;
+			user-select: none;
+			cursor: default;
+			transition: none;
+
+			&:hover {
+				transition: none;
+				background-color: #fff;
+			}
+		}
+
 		@at-root #{&}__section {
 			padding: 0 0.5rem;
 		}