Adding custom styles.

This commit is contained in:
Dessalines 2018-11-27 18:16:29 -07:00
parent 85063c8232
commit a37d7758b4
3 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,11 @@
.red { .table-fixed {
text-align: center; table-layout: fixed;
color: red; }
.search-name-col {
width: 50%;
}
.search-name-cell {
word-wrap: break-word;
} }

View File

@ -101,10 +101,10 @@ export class Search extends Component<any, State> {
table() { table() {
return ( return (
<div> <div>
<table style="table-layout: fixed;" class="table table-fixed table-hover table-sm table-striped"> <table class="table table-fixed table-hover table-sm table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 50%">Name</th> <th class="search-name-col">Name</th>
<th class="text-right">Size</th> <th class="text-right">Size</th>
<th class="text-right">Seeds</th> <th class="text-right">Seeds</th>
<th class="text-right d-none d-md-table-cell">Leeches</th> <th class="text-right d-none d-md-table-cell">Leeches</th>
@ -115,7 +115,7 @@ export class Search extends Component<any, State> {
<tbody> <tbody>
{this.state.results.torrents.map(torrent => ( {this.state.results.torrents.map(torrent => (
<tr> <tr>
<td style="word-wrap: break-word;">{torrent.name}</td> <td class="search-name-cell">{torrent.name}</td>
<td class="text-right text-muted">{humanFileSize(torrent.size_bytes, true)}</td> <td class="text-right text-muted">{humanFileSize(torrent.size_bytes, true)}</td>
<td class="text-right text-success"><div><i class="fas fa-fw fa-arrow-up"></i>{torrent.seeders}</div></td> <td class="text-right text-success"><div><i class="fas fa-fw fa-arrow-up"></i>{torrent.seeders}</div></td>
<td class="text-right text-danger d-none d-md-table-cell"><i class="fas fa-fw fa-arrow-down"></i>{torrent.leechers}</td> <td class="text-right text-danger d-none d-md-table-cell"><i class="fas fa-fw fa-arrow-down"></i>{torrent.leechers}</td>

View File

@ -1,5 +1,5 @@
import { render, Component } from 'inferno'; import { render, Component } from 'inferno';
import { HashRouter, Route, Switch, Link } from 'inferno-router'; import { HashRouter, Route, Switch } from 'inferno-router';
import { Navbar } from './components/navbar'; import { Navbar } from './components/navbar';
import { Home } from './components/home'; import { Home } from './components/home';