Browse Source

Further integrate Skeleton and fix a large swath of minor bugs

biotorrents 3 years ago
parent
commit
63fe3124b5
41 changed files with 511 additions and 1728 deletions
  1. 2
    2
      classes/torrent_form.class.php
  2. 2
    2
      classes/util.php
  3. 1
    1
      design/privatefooter.php
  4. 1
    0
      design/publicfooter.php
  5. 4
    1
      design/publicheader.php
  6. 1
    1
      design/views/generic/reply/quickreply.php
  7. 1
    1
      sections/better/better.php
  8. 2
    2
      sections/better/index.php
  9. 19
    20
      sections/better/literature.php
  10. 9
    9
      sections/better/single.php
  11. 5
    6
      sections/collages/torrent_collage.php
  12. 113
    64
      sections/comments/comments.php
  13. 11
    2
      sections/comments/index.php
  14. 2
    2
      sections/forums/newthread.php
  15. 47
    36
      sections/friends/friends.php
  16. 11
    4
      sections/login/login.php
  17. 2
    1
      sections/register/step1.php
  18. 12
    11
      sections/reportsv2/report.php
  19. 3
    4
      sections/reportsv2/takereport.php
  20. 5
    5
      sections/requests/request.php
  21. 1
    1
      sections/rules/clients.php
  22. 9
    9
      sections/tools/tools.php
  23. 1
    1
      sections/top10/donors.php
  24. 1
    1
      sections/top10/tags.php
  25. 1
    1
      sections/top10/users.php
  26. 2
    2
      sections/torrents/details.php
  27. 2
    2
      sections/upload/index.php
  28. 2
    2
      sections/user/user.php
  29. 59
    55
      sections/userhistory/subscriptions.php
  30. 1
    1
      sections/wiki/article.php
  31. BIN
      static/common/logos/torrents.bio.png
  32. 0
    23
      static/functions/vendor/biojs/cytoscape.js
  33. 0
    1335
      static/functions/vendor/biojs/ntseq.js
  34. 7
    0
      static/styles/bookish/scss/colors.scss
  35. 3
    2
      static/styles/bookish/scss/fonts.scss
  36. 18
    20
      static/styles/bookish/scss/layout.scss
  37. 11
    10
      static/styles/bookish/scss/menus.scss
  38. 58
    75
      static/styles/bookish/scss/tables.scss
  39. 14
    0
      static/styles/global/scss/layout.scss
  40. 49
    5
      static/styles/global/scss/skeleton-fixes.scss
  41. 19
    9
      static/styles/public/scss/public.scss

+ 2
- 2
classes/torrent_form.class.php View File

@@ -388,8 +388,8 @@ HTML;
388 388
 
389 389
         echo <<<HTML
390 390
               <tr>
391
-                <td>
392
-                  <input id="post" type="submit" value="$Value" />
391
+                <td class="center">
392
+                  <input id="post" type="submit" value="$Value" class="button-primary" />
393 393
                 </td>
394 394
               </tr>
395 395
             </table> <!-- torrent_form -->

+ 2
- 2
classes/util.php View File

@@ -383,14 +383,14 @@ function error($Error = 1, $NoHTML = false, $Log = false, $Debug = true) # , $JS
383 383
      * Append $Log
384 384
      * Formerly in sections/error/index.php
385 385
      */
386
-    if ($Log ?? false) {
386
+    if ($Log) {
387 387
         $Message .= " <a href='log.php?search=$Title'>Search Log</a>";
388 388
     }
389 389
 
390 390
     /**
391 391
      * Append $Debug
392 392
      */
393
-    if ($Debug ?? false) {
393
+    if ($Debug) {
394 394
         $DateTime = strftime('%c', $_SERVER['REQUEST_TIME']);
395 395
         $BackTrace = debug_string_backtrace();
396 396
 

+ 1
- 1
design/privatefooter.php View File

@@ -6,7 +6,7 @@ $Sep = '&emsp;';
6 6
 
7 7
 # End <div#content>, begin <footer>
8 8
 # This needs to be <main>, in each page
9
-echo $HTML = '</div></main><footer class="halfwide">';
9
+echo $HTML = '</div></main><footer>';
10 10
 
11 11
 # Disclaimer
12 12
 #if (!empty($Options['disclaimer'])) {

+ 1
- 0
design/publicfooter.php View File

@@ -8,6 +8,7 @@ echo <<<HTML
8 8
 
9 9
 <footer>
10 10
   <a href="https://github.com/biotorrents/gazelle" target="_blank">GitHub</a>
11
+  <a href="https://docs.biotorrents.de" target="_blank">API</a>
11 12
   <a href="/legal.php?p=privacy">Privacy</a>
12 13
   <a href="/legal.php?p=dmca">DMCA</a>
13 14
 </footer>

+ 4
- 1
design/publicheader.php View File

@@ -41,7 +41,7 @@ foreach ($Scripts as $Script) {
41 41
 }
42 42
 
43 43
 # Load CSS
44
-$Styles = ['vendor/normalize', 'global', 'public'];
44
+$Styles = ['vendor/normalize', 'vendor/skeleton', 'global', 'public'];
45 45
 foreach ($Styles as $Style) {
46 46
     echo View::pushAsset(
47 47
         "$ENV->STATIC_SERVER/styles/$Style.css",
@@ -68,12 +68,15 @@ if ($ENV->OPEN_REGISTRATION) {
68 68
     echo '<a href="register.php">Register</a>';
69 69
 }
70 70
 
71
+/*
71 72
 $Email = $ENV->HELP->Email;
72 73
 $Subject = $ENV->HELP->Subject;
73 74
 $Body = $ENV->HELP->Body;
74 75
 echo "<a href='mailto:$Email?subject=$Subject&body=$Body'>Support</a>";
76
+*/
75 77
 
76 78
 echo <<<HTML
79
+    <a href="https://github.com/biotorrents/gazelle/issues" target="_blank">Support</a>
77 80
   </header>
78 81
 
79 82
 <main>

+ 1
- 1
design/views/generic/reply/quickreply.php View File

@@ -200,7 +200,7 @@ if (!isset($InputTitle)) {
200 200
           class="hidden button_preview_<?=$ReplyText->getID()?>"
201 201
           tabindex="1" />
202 202
 
203
-        <input type="submit" value="Post" id="submit_button" tabindex="1" />
203
+        <input type="submit" class="button-primary" value="Post" id="submit_button" tabindex="1" />
204 204
       </div>
205 205
     </form>
206 206
   </div>

+ 1
- 1
sections/better/better.php View File

@@ -42,7 +42,7 @@ View::show_header('Better');
42 42
 
43 43
     <tr class="row">
44 44
       <td class="nobr">
45
-        <a href="better.php?method=screenshots&filter=all">Publications</a>
45
+        <a href="better.php?method=literature&filter=all">Publications</a>
46 46
       </td>
47 47
 
48 48
       <td class="nobr">

+ 2
- 2
sections/better/index.php View File

@@ -9,8 +9,8 @@ if (isset($_GET['method'])) {
9 9
       require_once SERVER_ROOT.'/sections/better/single.php';
10 10
       break;
11 11
   
12
-    case 'screenshots':
13
-      require_once SERVER_ROOT.'/sections/better/screenshots.php';
12
+    case 'literature':
13
+      require_once SERVER_ROOT.'/sections/better/literature.php';
14 14
       break;
15 15
 
16 16
     case 'covers':

sections/better/screenshots.php → sections/better/literature.php View File

@@ -3,38 +3,37 @@ declare(strict_types=1);
3 3
 
4 4
 $All = (!empty($_GET['filter']) && $_GET['filter'] === 'all');
5 5
 $Join = $All
6
-? ''
7
-: (
8
-    'JOIN torrents AS t ON t.GroupID=tg.ID
9
-    JOIN xbt_snatched AS x ON x.fid = t.ID AND x.uid = '
10
-    . $LoggedUser['ID']
11
-);
6
+    ? ''
7
+    : ("
8
+        JOIN `torrents` AS t ON t.`GroupID` = tg.`id`
9
+        JOIN `xbt_snatched` AS x ON x.`fid` = t.`ID`
10
+        AND x.`uid` = '$LoggedUser[ID]'
11
+    ");
12 12
 
13 13
 View::show_header('Torrent groups with no publications');
14 14
 
15 15
 $DB->query("
16 16
 SELECT SQL_CALC_FOUND_ROWS
17
-  tg.`ID`
17
+  tg.`id`
18 18
 FROM
19 19
   `torrents_group` AS tg
20 20
 $Join
21 21
 WHERE
22
-  tg.`ID` NOT IN(
22
+  tg.`id` NOT IN(
23 23
   SELECT DISTINCT
24
-    `TorrentID`
24
+    `group_id`
25 25
   FROM
26
-    `torrents_doi`
26
+    `literature`
27 27
   )
28 28
 ORDER BY
29 29
   RAND()
30 30
 LIMIT 20
31 31
 ");
32 32
 
33
-$Groups = $DB->to_array('ID', MYSQLI_ASSOC);
33
+$Groups = $DB->to_array('id', MYSQLI_ASSOC);
34 34
 $DB->query('SELECT FOUND_ROWS()');
35 35
 list($NumResults) = $DB->next_record();
36
-$Results = Torrents::get_groups(array_keys($Groups));
37
-?>
36
+$Results = Torrents::get_groups(array_keys($Groups)); ?>
38 37
 
39 38
 <div class="header">
40 39
   <?php if ($All) { ?>
@@ -67,22 +66,22 @@ $Results = Torrents::get_groups(array_keys($Groups));
67 66
     <?php
68 67
 foreach ($Results as $Result) {
69 68
     extract($Result);
70
-    $LangName = $Name ? $Name : ($Title2 ? $Title2 : $NameJP);
71
-    $TorrentTags = new Tags($TagList);
69
+    $LangName = $title ? $title : ($subject ? $subject : $object);
70
+    $TorrentTags = new Tags($tag_list);
72 71
 
73
-    $DisplayName = "<a href='torrents.php?id=$ID' ";
72
+    $DisplayName = "<a href='torrents.php?id=$id' ";
74 73
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
75
-        $DisplayName .= 'data-cover="'.ImageTools::process($WikiImage, 'thumb').'" ';
74
+        $DisplayName .= 'data-cover="'.ImageTools::process($picture, 'thumb').'" ';
76 75
     }
77 76
     $DisplayName .= ">$LangName</a>";
78 77
 
79
-    if ($Year > 0) {
80
-        $DisplayName .= " [$Year]";
78
+    if ($year > 0) {
79
+        $DisplayName .= " [$year]";
81 80
     } ?>
82 81
 
83 82
     <tr class="torrent">
84 83
       <td>
85
-        <div class="<?=Format::css_category($CategoryID)?>"></div>
84
+        <div class="<?=Format::css_category($category_id)?>"></div>
86 85
       </td>
87 86
 
88 87
       <td>

+ 9
- 9
sections/better/single.php View File

@@ -1,13 +1,15 @@
1 1
 <?php
2
+declare(strict_types = 1);
3
+
2 4
 if (($Results = $Cache->get_value('better_single_groupids')) === false) {
3 5
     $DB->query("
4 6
     SELECT
5
-      t.ID AS TorrentID,
6
-      t.GroupID AS GroupID
7
-    FROM xbt_files_users AS x
8
-      JOIN torrents AS t ON t.ID=x.fid
9
-    GROUP BY x.fid
10
-    HAVING COUNT(x.uid) = 1
7
+      t.`ID` AS `TorrentID`,
8
+      t.`GroupID` AS `GroupID`
9
+    FROM `xbt_files_users` AS x
10
+      JOIN `torrents` AS t ON t.`ID`=x.`fid`
11
+    GROUP BY x.`fid`
12
+    HAVING COUNT(x.`uid`) = 1
11 13
     LIMIT 30");
12 14
 
13 15
     $Results = $DB->to_pair('GroupID', 'TorrentID', false);
@@ -15,9 +17,7 @@ if (($Results = $Cache->get_value('better_single_groupids')) === false) {
15 17
 }
16 18
 
17 19
 $Groups = Torrents::get_groups(array_keys($Results));
18
-
19
-View::show_header('Single seeder torrents');
20
-?>
20
+View::show_header('Single seeder torrents'); ?>
21 21
 
22 22
 <div class="header">
23 23
   <h2>

+ 5
- 6
sections/collages/torrent_collage.php View File

@@ -580,13 +580,12 @@ foreach ($UserAdditions as $UserID => $Additions) {
580 580
             value="<?=$LoggedUser['AuthKey']?>" />
581 581
           <input type="hidden" name="collageid"
582 582
             value="<?=$CollageID?>" />
583
-          <div>
584
-            <input type="text" size="20" name="url" />
585
-          </div>
583
+
586 584
           <div class="submit_div">
587
-            <input type="submit" value="Add" />
585
+            <input type="text" size="20" name="url" />
586
+            <input type="submit" class="button-primary" value="Add" />
588 587
           </div>
589
-          <span style="font-style: italic;">Enter the URL of a torrent group on the site.</span>
588
+          <p>Enter the URL of a torrent group on the site.</p>
590 589
         </form>
591 590
       </div>
592 591
 
@@ -668,7 +667,7 @@ if (!$LoggedUser['DisablePosting']) {
668 667
             <textarea name="body" cols="24" rows="5"></textarea>
669 668
           </div>
670 669
           <div class="submit_div">
671
-            <input type="submit" id="submit_button" value="Post" />
670
+            <input type="submit" id="submit_button" class="button-primary" value="Post" />
672 671
           </div>
673 672
         </div>
674 673
       </form>

+ 113
- 64
sections/comments/comments.php View File

@@ -1,5 +1,7 @@
1 1
 <?
2
-/*
2
+declare(strict_types=1);
3
+
4
+/**
3 5
  * $_REQUEST['action'] is artist, collages, requests or torrents (default torrents)
4 6
  * $_REQUEST['type'] depends on the page:
5 7
  *     collages:
@@ -16,17 +18,18 @@
16 18
 // User ID
17 19
 if (isset($_GET['id']) && is_number($_GET['id'])) {
18 20
   $UserID = (int)$_GET['id'];
19
-
20 21
   $UserInfo = Users::user_info($UserID);
21
-
22 22
   $Username = $UserInfo['Username'];
23
-  if ($LoggedUser['ID'] == $UserID) {
23
+
24
+  if ($LoggedUser['ID'] === $UserID) {
24 25
     $Self = true;
25 26
   } else {
26 27
     $Self = false;
27 28
   }
29
+
28 30
   $Perms = Permissions::get_permissions($UserInfo['PermissionID']);
29 31
   $UserClass = $Perms['Class'];
32
+
30 33
   if (!check_paranoia('torrentcomments', $UserInfo['Paranoia'], $UserClass, $UserID)) {
31 34
     error(403);
32 35
   }
@@ -49,91 +52,111 @@ if (!isset($_REQUEST['action'])) {
49 52
 } else {
50 53
   $Action = $_REQUEST['action'];
51 54
 }
55
+
52 56
 if (!isset($_REQUEST['type'])) {
53 57
   $Type = 'default';
54 58
 } else {
55 59
   $Type = $_REQUEST['type'];
56 60
 }
57 61
 
62
+
58 63
 // Construct the SQL query
64
+
59 65
 $Conditions = $Join = [];
60 66
 switch ($Action) {
67
+  # artist comments
61 68
   case 'artist':
62
-    $Field1 = 'artists_group.ArtistID';
63
-    $Field2 = 'artists_group.Name';
64
-    $Table = 'artists_group';
69
+    $Field1 = '`artists_group`.`ArtistID`';
70
+    $Field2 = '`artists_group`.`Name`';
71
+    $Table = '`artists_group`';
65 72
     $Title = 'Artist comments left by ' . ($Self ? 'you' : $Username);
66 73
     $Header = 'Artist comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
67
-    $Conditions[] = "comments.AuthorID = $UserID";
74
+    $Conditions[] = "`comments`.`AuthorID` = $UserID";
68 75
     break;
76
+
77
+  
78
+  # collage comments
69 79
   case 'collages':
70
-    $Field1 = 'collages.ID';
71
-    $Field2 = 'collages.Name';
72
-    $Table = 'collages';
73
-    $Conditions[] = "collages.Deleted = '0'";
80
+    $Field1 = '`collages`.`ID`';
81
+    $Field2 = '`collages`.`Name`';
82
+    $Table = '`collages`';
83
+    $Conditions[] = "`collages`.`Deleted` = '0'";
84
+
74 85
     if ($Type == 'created') {
75
-      $Conditions[] = "collages.UserID = $UserID";
76
-      $Conditions[] = "comments.AuthorID != $UserID";
86
+      $Conditions[] = "`collages`.`UserID` = $UserID";
87
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
77 88
       $Title = 'Comments left on collages ' . ($Self ? 'you' : $Username) . ' created';
78 89
       $Header = 'Comments left on collages ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)) . ' created';
79 90
     } elseif ($Type == 'contributed') {
80
-      $Conditions[] = 'IF(collages.CategoryID = ' . array_search('Artists', $CollageCats) . ', collages_artists.ArtistID, collages_torrents.GroupID) IS NOT NULL';
81
-      $Conditions[] = "comments.AuthorID != $UserID";
82
-      $Join[] = "LEFT JOIN collages_torrents ON collages_torrents.CollageID = collages.ID AND collages_torrents.UserID = $UserID";
83
-      $Join[] = "LEFT JOIN collages_artists ON collages_artists.CollageID = collages.ID AND collages_artists.UserID = $UserID";
91
+      $Conditions[] = 'IF(`collages`.`CategoryID` = ' . array_search('Artists', $CollageCats) . ', `collages_artists`.`ArtistID`, `collages_torrents`.`GroupID`) IS NOT NULL';
92
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
93
+      $Join[] = "LEFT JOIN `collages_torrents` ON `collages_torrents`.`CollageID` = `collages`.`ID` AND `collages_torrents`.`UserID` = $UserID";
94
+      $Join[] = "LEFT JOIN `collages_artists` ON `collages_artists`.`CollageID` = `collages`.`ID` AND `collages_artists`.`UserID` = $UserID";
84 95
       $Title = 'Comments left on collages ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to';
85 96
       $Header = 'Comments left on collages ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false).' has') . ' contributed to';
86 97
     } else {
87 98
       $Type = 'default';
88
-      $Conditions[] = "comments.AuthorID = $UserID";
99
+      $Conditions[] = "`comments`.`AuthorID` = $UserID";
89 100
       $Title = 'Collage comments left by ' . ($Self ? 'you' : $Username);
90 101
       $Header = 'Collage comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
91 102
     }
92 103
     break;
104
+
105
+
106
+  # request comments
93 107
   case 'requests':
94
-    $Field1 = 'requests.ID';
95
-    $Field2 = 'requests.Title';
108
+    $Field1 = '`requests`.`ID`';
109
+    $Field2 = '`requests`.`Title`';
96 110
     $Table = 'requests';
111
+
97 112
     if ($Type == 'created') {
98
-      $Conditions[] = "requests.UserID = $UserID";
99
-      $Conditions[] = "comments.AuthorID != $UserID";
113
+      $Conditions[] = "`requests`.`UserID` = $UserID";
114
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
100 115
       $Title = 'Comments left on requests ' . ($Self ? 'you' : $Username) . ' created';
101 116
       $Header = 'Comments left on requests ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)) . ' created';
102 117
     } elseif ($Type == 'voted') {
103
-      $Conditions[] = "requests_votes.UserID = $UserID";
104
-      $Conditions[] = "comments.AuthorID != $UserID";
105
-      $Join[] = 'JOIN requests_votes ON requests_votes.RequestID = requests.ID';
118
+      $Conditions[] = "`requests_votes`.`UserID` = $UserID";
119
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
120
+      $Join[] = 'JOIN `requests_votes` ON `requests_votes`.`RequestID` = `requests`.`ID`';
106 121
       $Title = 'Comments left on requests ' . ($Self ? 'you\'ve' : $Username . ' has') . ' voted on';
107 122
       $Header = 'Comments left on requests ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false) . ' has') . ' voted on';
108 123
     } else {
109 124
       $Type = 'default';
110
-      $Conditions[] = "comments.AuthorID = $UserID";
125
+      $Conditions[] = "`comments`.`AuthorID` = $UserID";
111 126
       $Title = 'Request comments left by ' . ($Self ? 'you' : $Username);
112 127
       $Header = 'Request comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
113 128
     }
114 129
     break;
130
+
131
+
132
+  # torrent comments
115 133
   case 'torrents':
116 134
   default:
117 135
     $Action = 'torrents';
118
-    $Field1 = 'torrents.GroupID';
119
-    $Field2 = "COALESCE(NULLIF(tg.Name,''),NULLIF(tg.Title2,''),tg.NameJP) AS Name";
120
-    $Table = 'torrents';
121
-    $Join[] = 'JOIN torrents_group AS tg ON torrents.GroupID = tg.ID';
136
+    $Field1 = '`torrents`.`GroupID`';
137
+    $Field2 = "COALESCE(NULLIF(tg.`title`,''),NULLIF(tg.`subject`,''),tg.`object`) AS Name";
138
+    $Table = '`torrents`';
139
+    $Join[] = 'JOIN `torrents_group` AS tg ON `torrents`.`GroupID` = tg.`id`';
140
+
122 141
     if ($Type == 'uploaded') {
123
-      $Conditions[] = "torrents.UserID = $UserID";
124
-      $Conditions[] = 'comments.AddedTime > torrents.Time';
125
-      $Conditions[] = "comments.AuthorID != $UserID";
142
+      $Conditions[] = "`torrents`.`UserID` = $UserID";
143
+      $Conditions[] = '`comments`.`AddedTime` > `torrents`.`Time`';
144
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
126 145
       $Title = 'Comments left on torrents ' . ($Self ? 'you\'ve' : $Username . ' has') . ' uploaded';
127 146
       $Header = 'Comments left on torrents ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false) . ' has') . ' uploaded';
128 147
     } else {
129 148
       $Type = 'default';
130
-      $Conditions[] = "comments.AuthorID = $UserID";
149
+      $Conditions[] = "`comments`.`AuthorID` = $UserID";
131 150
       $Title = 'Torrent comments left by ' . ($Self ? 'you' : $Username);
132 151
       $Header = 'Torrent comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
133 152
     }
134 153
     break;
135 154
 }
136
-$Join[] = "JOIN comments ON comments.Page = '$Action' AND comments.PageID = $Field1";
155
+
156
+# end SQL query constructor
157
+
158
+
159
+$Join[] = "JOIN `comments` ON `comments`.`Page` = '$Action' AND `comments`.`PageID` = $Field1";
137 160
 $Join = implode("\n\t\t", $Join);
138 161
 $Conditions = implode(" AND ", $Conditions);
139 162
 $Conditions = ($Conditions ? 'WHERE ' . $Conditions : '');
@@ -141,20 +164,20 @@ $Conditions = ($Conditions ? 'WHERE ' . $Conditions : '');
141 164
 $SQL = "
142 165
   SELECT
143 166
     SQL_CALC_FOUND_ROWS
144
-    comments.AuthorID,
145
-    comments.Page,
146
-    comments.PageID,
167
+    `comments`.`AuthorID`,
168
+    `comments`.`Page`,
169
+    `comments`.`PageID`,
147 170
     $Field2,
148
-    comments.ID,
149
-    comments.Body,
150
-    comments.AddedTime,
151
-    comments.EditedTime,
152
-    comments.EditedUserID
171
+    `comments`.`ID`,
172
+    `comments`.`Body`,
173
+    `comments`.`AddedTime`,
174
+    `comments`.`EditedTime`,
175
+    `comments`.`EditedUserID`
153 176
   FROM $Table
154 177
     $Join
155 178
   $Conditions
156
-  GROUP BY comments.ID
157
-  ORDER BY comments.ID DESC
179
+  GROUP BY `comments`.`ID`
180
+  ORDER BY `comments`.`ID` DESC
158 181
   LIMIT $Limit";
159 182
 
160 183
 $Comments = $DB->query($SQL);
@@ -163,65 +186,89 @@ $Count = $DB->record_count();
163 186
 $DB->query("SELECT FOUND_ROWS()");
164 187
 list($Results) = $DB->next_record();
165 188
 $Pages = Format::get_pages($Page, $Results, $PerPage, 11);
166
-
167 189
 $DB->set_query_id($Comments);
168
-if ($Action == 'requests') {
190
+
191
+# Remove the weird comment headings on torrent and request comments
192
+/*
193
+if ($Action === 'requests') {
169 194
   $RequestIDs = array_flip(array_flip($DB->collect('PageID')));
170 195
   $Artists = [];
196
+
171 197
   foreach ($RequestIDs as $RequestID) {
172 198
     $Artists[$RequestID] = Requests::get_artists($RequestID);
173 199
   }
174 200
   $DB->set_query_id($Comments);
175
-} elseif ($Action == 'torrents') {
201
+} elseif ($Action === 'torrents') {
176 202
   $GroupIDs = array_flip(array_flip($DB->collect('PageID')));
177 203
   $Artists = Artists::get_artists($GroupIDs);
178 204
   $DB->set_query_id($Comments);
179 205
 }
206
+*/
207
+
208
+# Replace the "shifting" main links with regular static ones
209
+# There are already shifting supplemental links for each type
210
+$ActionLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Torrent comments</a>';
211
+$ActionLinks[] = '<a href="comments.php?action=collages' . $LinkID . '" class="brackets">Collections comments</a>';
212
+$ActionLinks[] = '<a href="comments.php?action=requests' . $LinkID . '" class="brackets">Request comments</a>';
213
+$ActionLinks[] = '<a href="comments.php?action=artist' . $LinkID . '" class="brackets">Artist comments</a>';
180 214
 
215
+/*
181 216
 $LinkID = (!$Self ? '&amp;id=' . $UserID : '');
182 217
 $ActionLinks = $TypeLinks = [];
183
-if ($Action != 'artist') {
218
+if ($Action !== 'artist') {
184 219
   $ActionLinks[] = '<a href="comments.php?action=artist' . $LinkID . '" class="brackets">Artist comments</a>';
185 220
 }
186
-if ($Action != 'collages') {
221
+
222
+if ($Action !== 'collages') {
187 223
   $ActionLinks[] = '<a href="comments.php?action=collages' . $LinkID . '" class="brackets">Collections comments</a>';
188 224
 }
189
-if ($Action != 'requests') {
225
+
226
+if ($Action !== 'requests') {
190 227
   $ActionLinks[] = '<a href="comments.php?action=requests' . $LinkID . '" class="brackets">Request comments</a>';
191 228
 }
192
-if ($Action != 'torrents') {
229
+
230
+if ($Action !== 'torrents') {
193 231
   $ActionLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Torrent comments</a>';
194 232
 }
233
+*/
234
+
195 235
 switch ($Action) {
196 236
   case 'collages':
197 237
     $BaseLink = 'comments.php?action=collages' . $LinkID;
198
-    if ($Type != 'default') {
238
+    if ($Type !== 'default') {
199 239
       $TypeLinks[] = '<a href="' . $BaseLink . '" class="brackets">Display collage comments ' . ($Self ? 'you\'ve' : $Username . ' has') . ' made</a>';
200 240
     }
201
-    if ($Type != 'created') {
241
+
242
+    if ($Type !== 'created') {
202 243
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=created" class="brackets">Display comments left on ' . ($Self ? 'your collections' : 'collections created by ' .$Username) . '</a>';
203 244
     }
204
-    if ($Type != 'contributed') {
245
+
246
+    if ($Type !== 'contributed') {
205 247
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=contributed" class="brackets">Display comments left on collections ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to</a>';
206 248
     }
207 249
     break;
250
+
208 251
   case 'requests':
209 252
     $BaseLink = 'comments.php?action=requests' . $LinkID;
210
-    if ($Type != 'default') {
253
+    if ($Type !== 'default') {
211 254
       $TypeLinks[] = '<a href="' . $BaseLink . '" class="brackets">Display request comments you\'ve made</a>';
212 255
     }
213
-    if ($Type != 'created') {
256
+
257
+    if ($Type !== 'created') {
214 258
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=created" class="brackets">Display comments left on your requests</a>';
215 259
     }
216
-    if ($Type != 'voted') {
260
+
261
+    if ($Type !== 'voted') {
217 262
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=voted" class="brackets">Display comments left on requests you\'ve voted on</a>';
218 263
     }
219 264
     break;
265
+
220 266
   case 'torrents':
221
-    if ($Type != 'default') {
267
+    if ($Type !== 'default') {
222 268
       $TypeLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Display comments you have made</a>';
223 269
     }
224
-    if ($Type != 'uploaded') {
270
+
271
+    if ($Type !== 'uploaded') {
225 272
       $TypeLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '&amp;type=uploaded" class="brackets">Display comments left on your uploads</a>';
226 273
     }
227 274
     break;
@@ -250,12 +297,15 @@ if ($Count > 0) {
250 297
       case 'artist':
251 298
         $Header = " on <a href=\"artist.php?id=$PageID\">$Name</a>";
252 299
         break;
300
+
253 301
       case 'collages':
254 302
         $Header = " on <a href=\"collages.php?id=$PageID\">$Name</a>";
255 303
         break;
304
+
256 305
       case 'requests':
257 306
         $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " <a href=\"requests.php?action=view&id=$PageID\">$Name</a>";
258 307
         break;
308
+
259 309
       case 'torrents':
260 310
         $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " <a href=\"torrents.php?id=$PageID\">$Name</a>";
261 311
         break;
@@ -263,11 +313,10 @@ if ($Count > 0) {
263 313
     CommentsView::render_comment($AuthorID, $PostID, $Body, $AddedTime, $EditedUserID, $EditedTime, $Link, false, $Header, false);
264 314
   }
265 315
 } else { ?>
266
-  <div class="center">No results.</div>
316
+  <h2 class="center">No results.</h2>
267 317
 <? } ?>
268 318
   <div class="linkbox">
269 319
     <?=$Pages?>
270 320
   </div>
271 321
 </div>
272
-<?
273
-View::show_footer();
322
+<? View::show_footer();

+ 11
- 2
sections/comments/index.php View File

@@ -1,10 +1,12 @@
1 1
 <?
2
+declare(strict_types=1);
3
+
2 4
 enforce_login();
3 5
 
4 6
 // fix old links
5
-if ($_REQUEST['action'] == 'artists') {
7
+if ($_REQUEST['action'] === 'artists') {
6 8
   $_REQUEST['action'] = 'artist';
7
-} elseif ($_REQUEST['action'] == 'my_torrents') {
9
+} elseif ($_REQUEST['action'] === 'my_torrents') {
8 10
   $_REQUEST['action'] = 'torrents';
9 11
   $_REQUEST['type'] = 'uploaded';
10 12
 }
@@ -18,24 +20,31 @@ switch ($Action) {
18 20
   case 'take_post':
19 21
     require SERVER_ROOT . '/sections/comments/take_post.php';
20 22
     break;
23
+
21 24
   case 'take_edit':
22 25
     require SERVER_ROOT . '/sections/comments/take_edit.php';
23 26
     break;
27
+
24 28
   case 'take_delete':
25 29
     require SERVER_ROOT . '/sections/comments/take_delete.php';
26 30
     break;
31
+
27 32
   case 'warn':
28 33
     require SERVER_ROOT . '/sections/comments/warn.php';
29 34
     break;
35
+
30 36
   case 'take_warn':
31 37
     require SERVER_ROOT . '/sections/comments/take_warn.php';
32 38
     break;
39
+
33 40
   case 'get':
34 41
     require SERVER_ROOT . '/sections/comments/get.php';
35 42
     break;
43
+
36 44
   case 'jump':
37 45
     require SERVER_ROOT . '/sections/comments/jump.php';
38 46
     break;
47
+    
39 48
   case 'artist':
40 49
   case 'collages':
41 50
   case 'requests':

+ 2
- 2
sections/forums/newthread.php View File

@@ -103,7 +103,7 @@ View::show_header(
103 103
       <input type="hidden" name="auth"
104 104
         value="<?=$LoggedUser['AuthKey']?>" />
105 105
       <input type="hidden" name="forum" value="<?=$ForumID?>" />
106
-      <table id="newthreadtext" class="layout">
106
+      <table id="newthreadtext" class="layout new_thread">
107 107
         <tr>
108 108
           <td class="label">Title</td>
109 109
           <td><input id="title" class="required" type="text" name="title" style="width: 98%;" /></td>
@@ -196,7 +196,7 @@ if (check_perms('forums_polls_create')) {
196 196
       <div id="buttons" class="center">
197 197
         <input type="button" value="Preview" onclick="Newthread_Preview(1);" id="newthreadpreviewbutton" />
198 198
         <input type="button" value="Editor" onclick="Newthread_Preview(0);" id="newthreadeditbutton" class="hidden" />
199
-        <input type="submit" class="submit" id="submit_button" value="Create" />
199
+        <input type="submit" class="submit button-primary" id="submit_button" value="Create" />
200 200
       </div>
201 201
     </form>
202 202
   </div>

+ 47
- 36
sections/friends/friends.php View File

@@ -1,46 +1,43 @@
1 1
 <?php
2 2
 #declare(strict_types=1);
3 3
 
4
-/************************************************************************
5
-//------------// Main friends page //----------------------------------//
6
-This page lists a user's friends.
4
+/**
5
+ * Main friends page
6
+ * 
7
+ * This page lists a user's friends.
8
+ * There's no real point in caching this page.
9
+ * I doubt users load it that much.
10
+ */
7 11
 
8
-There's no real point in caching this page. I doubt users load it that
9
-much.
10
-************************************************************************/
12
+$ENV = ENV::go();
11 13
 
12 14
 // Number of users per page
13 15
 define('FRIENDS_PER_PAGE', '20');
14
-include_once(SERVER_ROOT.'/classes/paranoia.class.php');
15
-
16
-
16
+include_once "$ENV->SERVER_ROOT/classes/paranoia.class.php";
17 17
 
18 18
 View::show_header('Friends');
19 19
 
20
-
21 20
 $UserID = $LoggedUser['ID'];
22
-
23
-
24 21
 list($Page, $Limit) = Format::page_limit(FRIENDS_PER_PAGE);
25 22
 
26 23
 // Main query
27 24
 $DB->query("
28 25
   SELECT
29 26
     SQL_CALC_FOUND_ROWS
30
-    f.FriendID,
31
-    f.Comment,
32
-    m.Username,
33
-    m.Uploaded,
34
-    m.Downloaded,
35
-    m.PermissionID,
36
-    m.Paranoia,
37
-    m.LastAccess,
38
-    i.Avatar
39
-  FROM friends AS f
40
-    JOIN users_main AS m ON f.FriendID = m.ID
41
-    JOIN users_info AS i ON f.FriendID = i.UserID
42
-  WHERE f.UserID = '$UserID'
43
-  ORDER BY Username
27
+    f.`FriendID`,
28
+    f.`Comment`,
29
+    m.`Username`,
30
+    m.`Uploaded`,
31
+    m.`Downloaded`,
32
+    m.`PermissionID`,
33
+    m.`Paranoia`,
34
+    m.`LastAccess`,
35
+    i.`Avatar`
36
+  FROM `friends` AS f
37
+    JOIN `users_main` AS m ON f.`FriendID` = m.`ID`
38
+    JOIN `users_info` AS i ON f.`FriendID` = i.`UserID`
39
+  WHERE f.`UserID` = '$UserID'
40
+  ORDER BY `Username`
44 41
   LIMIT $Limit");
45 42
 $Friends = $DB->to_array(false, MYSQLI_BOTH, array(6, 'Paranoia'));
46 43
 
@@ -48,24 +45,26 @@ $Friends = $DB->to_array(false, MYSQLI_BOTH, array(6, 'Paranoia'));
48 45
 $DB->query('SELECT FOUND_ROWS()');
49 46
 list($Results) = $DB->next_record();
50 47
 
51
-// Start printing stuff
52
-?>
48
+// Start printing stuff ?>
49
+
53 50
 <div>
54 51
   <div class="header">
55 52
     <h2>Friends List</h2>
56 53
   </div>
54
+
57 55
   <div class="linkbox">
58 56
     <?php
59 57
 // Pagination
60 58
 $Pages = Format::get_pages($Page, $Results, FRIENDS_PER_PAGE, 9);
61
-echo $Pages;
62
-?>
59
+echo $Pages; ?>
63 60
   </div>
61
+
64 62
   <div class="box pad">
65 63
     <?php
66
-if ($Results == 0) {
64
+if ($Results === 0) {
67 65
     echo '<p>You have no friends! :(</p>';
68 66
 }
67
+
69 68
 // Start printing out friends
70 69
 foreach ($Friends as $Friend) {
71 70
     list($FriendID, $Comment, $Username, $Uploaded, $Downloaded, $Class, $Paranoia, $LastAccess, $Avatar) = $Friend; ?>
@@ -80,11 +79,13 @@ foreach ($Friends as $Friend) {
80 79
               &nbsp;Ratio: <strong><?=Format::get_ratio_html($Uploaded, $Downloaded)?></strong>
81 80
               <?php
82 81
   }
82
+
83 83
     if (check_paranoia('uploaded', $Paranoia, $Class, $FriendID)) {
84 84
         ?>
85 85
               &nbsp;Up: <strong><?=Format::get_size($Uploaded)?></strong>
86 86
               <?php
87 87
     }
88
+
88 89
     if (check_paranoia('downloaded', $Paranoia, $Class, $FriendID)) {
89 90
         ?>
90 91
               &nbsp;Down: <strong><?=Format::get_size($Downloaded)?></strong>
@@ -106,13 +107,23 @@ foreach ($Friends as $Friend) {
106 107
             <input type="hidden" name="friendid"
107 108
               value="<?=$FriendID?>" />
108 109
 
109
-            <textarea name="comment" rows="4"
110
-              cols="65"><?=$Comment?></textarea>
110
+            <textarea
111
+              name = "comment"
112
+              rows = "5"
113
+              cols = "50"
114
+              placeholder ="Your saved notes about this friend"
115
+              ><?=$Comment?></textarea>
111 116
           </td>
112 117
           <td class="left" valign="top">
113
-            <input type="submit" name="action" value="Update" /><br />
114
-            <input type="submit" name="action" value="Remove friend" /><br />
115
-            <input type="submit" name="action" value="Contact" /><br />
118
+          <p>
119
+            <input type="submit" name="action" value="Update" />
120
+            <input type="submit" name="action" value="Remove friend" />
121
+          </p>
122
+
123
+          <p>
124
+            <input type="submit" name="action" class="button-primary" value="Contact" />
125
+          </p>
126
+
116 127
           </td>
117 128
         </tr>
118 129
       </table>

+ 11
- 4
sections/login/login.php View File

@@ -39,12 +39,13 @@ if (!$Banned) { ?>
39 39
   </aside>
40 40
   <?php } ?>
41 41
 
42
-  <table>
42
+  <br />
43
+  <table class="login_form">
43 44
     <tr>
44 45
       <td colspan="2">
45 46
         <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="username"
46 47
           id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}"
47
-          autofocus="autofocus" placeholder="Username" size="40" autocomplete="username" />
48
+          autofocus="autofocus" placeholder="Username" size="35" autocomplete="username" />
48 49
       </td>
49 50
     </tr>
50 51
 
@@ -69,9 +70,15 @@ if (!$Banned) { ?>
69 70
     </tr>
70 71
 
71 72
     <tr>
72
-      <td colspan="2">
73
-        <input type="submit" name="login" value="Log In" class="submit" />
73
+      <td colspan="4">
74
+        <input type="submit" name="login" value="Log In" class="submit button-primary" />
75
+
76
+        <?php if ($ENV->OPEN_REGISTRATION) { ?>
77
+          &ensp;
78
+          <a href="/register.php" class="button">Register</a>
79
+          <?php } ?>
74 80
       </td>
81
+
75 82
     </tr>
76 83
   </table>
77 84
 </form>

+ 2
- 1
sections/register/step1.php View File

@@ -39,6 +39,7 @@ if (empty($Sent)) { ?>
39 39
           <strong>Don't choose one associated with your real name.</strong>
40 40
           If you do, we won't be changing it for you.
41 41
         </p>
42
+        <br />
42 43
 
43 44
         <input type="text" name="username" id="username" class="inputtext" placeholder="Username"
44 45
           value="<?=(!empty($_REQUEST['username']) ? display_str($_REQUEST['username']) : '')?>" />
@@ -96,7 +97,7 @@ if (empty($Sent)) { ?>
96 97
     </tr>
97 98
 
98 99
     <tr>
99
-      <td colspan="2" align="right"><input type="submit" name="submit" value="Submit" class="submit" /></td>
100
+      <td colspan="2" align="right"><input type="submit" name="submit" value="Submit" class="submit button-primary" /></td>
100 101
     </tr>
101 102
   </table>
102 103
 </form>

+ 12
- 11
sections/reportsv2/report.php View File

@@ -1,12 +1,14 @@
1 1
 <?php
2 2
 #declare(strict_types=1);
3 3
 
4
-/*
4
+/**
5 5
  * This is the frontend of reporting a torrent, it's what users see when
6 6
  * they visit reportsv2.php?id=xxx
7 7
  */
8 8
 
9
-include(SERVER_ROOT.'/sections/torrents/functions.php');
9
+$ENV = ENV::go();
10
+
11
+require_once "$ENV->SERVER_ROOT/sections/torrents/functions.php";
10 12
 
11 13
 // If we're not coming from torrents.php, check we're being returned because of an error.
12 14
 if (!isset($_GET['id']) || !is_number($_GET['id'])) {
@@ -16,11 +18,11 @@ if (!isset($_GET['id']) || !is_number($_GET['id'])) {
16 18
 } else {
17 19
     $TorrentID = $_GET['id'];
18 20
     $DB->query("
19
-    SELECT tg.CategoryID, t.GroupID, u.Username
20
-    FROM torrents_group AS tg
21
-      LEFT JOIN torrents AS t ON t.GroupID = tg.ID
22
-      LEFT JOIN users_main AS u ON t.UserID = u.ID
23
-    WHERE t.ID = " . $_GET['id']);
21
+    SELECT tg.`category_id`, t.`GroupID`, u.`Username`
22
+    FROM `torrents_group` AS tg
23
+      LEFT JOIN `torrents` AS t ON t.`GroupID` = tg.`id`
24
+      LEFT JOIN `users_main` AS u ON t.`UserID` = u.`ID`
25
+    WHERE t.`ID` = " . $_GET['id']);
24 26
     list($CategoryID, $GroupID, $Username) = $DB->next_record();
25 27
     $Artists = Artists::get_artist($GroupID);
26 28
     $TorrentCache = get_group_info($GroupID, true);
@@ -137,7 +139,7 @@ View::show_header('Report', 'reportsv2,browse,torrent,bbcode,recommend');
137 139
 
138 140
       <div id="dynamic_form">
139 141
 <?php
140
-        /*
142
+        /**
141 143
          * THIS IS WHERE SEXY AJAX COMES IN
142 144
          * The following malarky is needed so that if you get sent back here, the fields are filled in.
143 145
          */
@@ -149,8 +151,7 @@ View::show_header('Report', 'reportsv2,browse,torrent,bbcode,recommend');
149 151
         <input id="extra" type="hidden" name="extra" value="<?=(!empty($_POST['extra']) ? display_str($_POST['extra']) : '')?>" />
150 152
       </div>
151 153
     </div>
152
-  <input type="submit" value="Report" />
154
+  <input type="submit" class="button-primary" value="Report" />
153 155
   </form>
154 156
 </div>
155
-<?php
156
-View::show_footer();
157
+<?php View::show_footer();

+ 3
- 4
sections/reportsv2/takereport.php View File

@@ -1,5 +1,6 @@
1 1
 <?
2
-/*
2
+
3
+/**
3 4
  * This page handles the backend from when a user submits a report.
4 5
  * It checks for (in order):
5 6
  * 1. The usual POST injections, then checks that things.
@@ -56,8 +57,6 @@ if (!empty($_POST['sitelink'])) {
56 57
   } else {
57 58
     $Err = 'The permalink was incorrect. It should look like '.site_url().'torrents.php?torrentid=12345';
58 59
   }
59
-} else {
60
-  $ExtraIDs = '';
61 60
 }
62 61
 
63 62
 if (!empty($_POST['link'])) {
@@ -108,7 +107,7 @@ if (!$DB->has_results()) {
108 107
 list($GroupID) = $DB->next_record();
109 108
 
110 109
 if (!empty($Err)) {
111
-  error($Err);
110
+  error($Error = $Err, $Debug = false);
112 111
   include(SERVER_ROOT.'/sections/reportsv2/report.php');
113 112
   error();
114 113
 }

+ 5
- 5
sections/requests/request.php View File

@@ -244,7 +244,7 @@ $encoded_artist = urlencode($encoded_artist);
244 244
     <div class="box">
245 245
       <div class="head"><strong>Info</strong></div>
246 246
       <div class="pad">
247
-        <table class="layout">
247
+        <table class="layout request_form">
248 248
           <tr>
249 249
             <td class="label">Created</td>
250 250
             <td>
@@ -318,16 +318,16 @@ $encoded_artist = urlencode($encoded_artist);
318 318
           <tr id="voting">
319 319
             <td class="label">Custom Vote</td>
320 320
             <td>
321
-              These units are in base 2, not base 10, e.g., there are 1,024 MiB in 1 GiB
321
+              These units are in base 2, not base 10, e.g., there are 1,024 MiB in 1 GiB.
322
+              <strong>The system deducts <?= ($RequestTax * 100) ?>% as tax.</strong>
323
+              <br />
324
+
322 325
               <input type="text" id="amount_box" size="8" onchange="Calculate();" />
323 326
               <select id="unit" name="unit" onchange="Calculate();">
324 327
                 <option value="mb">MiB</option>
325 328
                 <option value="gb">GiB</option>
326 329
               </select>
327 330
               <input type="button" value="Preview" onclick="Calculate();" />
328
-              <strong>The system deducts <?= ($RequestTax * 100) ?>%
329
-                as tax</strong>
330
-
331 331
             </td>
332 332
           </tr>
333 333
           <tr>

+ 1
- 1
sections/rules/clients.php View File

@@ -34,7 +34,7 @@ if (!$WhitelistedClients = $Cache->get_value('whitelisted_clients')) {
34 34
   </p>
35 35
   <br />
36 36
 
37
-  <table>
37
+  <table class="clients_table">
38 38
     <tr class="colhead">
39 39
       <td>
40 40
         <strong>Allowed Clients</strong>

+ 9
- 9
sections/tools/tools.php View File

@@ -53,7 +53,7 @@ View::show_header('Staff Tools');
53 53
   if ($ToolsHTML) {
54 54
       ?>
55 55
     <div class="permission_subcontainer">
56
-      <table class="layout">
56
+      <table class="layout admin_tools">
57 57
         <tr class="colhead">
58 58
           <td>Administration</td>
59 59
         </tr>
@@ -72,7 +72,7 @@ View::show_header('Staff Tools');
72 72
   if ($ToolsHTML) {
73 73
       ?>
74 74
     <div class="permission_subcontainer">
75
-      <table class="layout">
75
+      <table class="layout admin_tools">
76 76
         <tr class="colhead">
77 77
           <td>Announcements</td>
78 78
         </tr>
@@ -89,7 +89,7 @@ View::show_header('Staff Tools');
89 89
   if ($ToolsHTML) {
90 90
       ?>
91 91
     <div class="permission_subcontainer">
92
-      <table class="layout">
92
+      <table class="layout admin_tools">
93 93
         <tr class="colhead">
94 94
           <td>Community</td>
95 95
         </tr>
@@ -107,7 +107,7 @@ View::show_header('Staff Tools');
107 107
   if ($ToolsHTML) {
108 108
       ?>
109 109
     <div class="permission_subcontainer">
110
-      <table class="layout">
110
+      <table class="layout admin_tools">
111 111
         <tr class="colhead">
112 112
           <td>Finances</td>
113 113
         </tr>
@@ -130,7 +130,7 @@ View::show_header('Staff Tools');
130 130
   if ($ToolsHTML) {
131 131
       ?>
132 132
     <div class="permission_subcontainer">
133
-      <table class="layout">
133
+      <table class="layout admin_tools">
134 134
         <tr class="colhead">
135 135
           <td>Queue</td>
136 136
         </tr>
@@ -149,7 +149,7 @@ View::show_header('Staff Tools');
149 149
   if ($ToolsHTML) {
150 150
       ?>
151 151
     <div class="permission_subcontainer">
152
-      <table class="layout">
152
+      <table class="layout admin_tools">
153 153
         <tr class="colhead">
154 154
           <td>Managers</td>
155 155
         </tr>
@@ -171,7 +171,7 @@ View::show_header('Staff Tools');
171 171
   if ($ToolsHTML) {
172 172
       ?>
173 173
     <div class="permission_subcontainer">
174
-      <table class="layout">
174
+      <table class="layout admin_tools">
175 175
         <tr class="colhead">
176 176
           <td>Development</td>
177 177
         </tr>
@@ -200,7 +200,7 @@ View::show_header('Staff Tools');
200 200
   if ($ToolsHTML) {
201 201
       ?>
202 202
     <div class="permission_subcontainer">
203
-      <table class="layout">
203
+      <table class="layout admin_tools">
204 204
         <tr class="colhead">
205 205
           <td>Site Information</td>
206 206
         </tr>
@@ -224,7 +224,7 @@ View::show_header('Staff Tools');
224 224
   if ($ToolsHTML) {
225 225
       ?>
226 226
     <div class="permission_subcontainer">
227
-      <table class="layout">
227
+      <table class="layout admin_tools">
228 228
         <tr class="colhead">
229 229
           <td>Torrents</td>
230 230
         </tr>

+ 1
- 1
sections/top10/donors.php View File

@@ -65,7 +65,7 @@ function generate_user_table($Caption, $Results, $Limit)
65 65
     </small>
66 66
   </h3>
67 67
 
68
-  <table class="border">
68
+  <table class="border top10_table">
69 69
     <tr class="colhead">
70 70
       <td class="center">Position</td>
71 71
       <td>User</td>

+ 1
- 1
sections/top10/tags.php View File

@@ -108,7 +108,7 @@ function generate_tag_table($Caption, $Tag, $Details, $Limit, $RequestsTable = f
108 108
     </small>
109 109
   </h3>
110 110
 
111
-  <table class="border">
111
+  <table class="border top10_table">
112 112
     <tr class="colhead">
113 113
       <td class="center">Rank</td>
114 114
       <td>Tag</td>

+ 1
- 1
sections/top10/users.php View File

@@ -130,7 +130,7 @@ function generate_user_table($Caption, $Tag, $Details, $Limit)
130 130
       <?php } ?>
131 131
     </small>
132 132
   </h3>
133
-  <table class="border">
133
+  <table class="border top10_table">
134 134
     <tr class="colhead">
135 135
       <td class="center">Rank</td>
136 136
       <td>User</td>

+ 2
- 2
sections/torrents/details.php View File

@@ -322,7 +322,7 @@ $Index++;
322 322
             value="<?=$GroupID?>" />
323 323
           <input type="text" id="artist" name="artistname[]" <?php Users::has_autocomplete_enabled('other'); ?>
324 324
           />
325
-          <input type="submit" value="Add" />
325
+          <input type="submit" class="button-primary" value="Add" />
326 326
         </form>
327 327
       </div>
328 328
     </div>
@@ -396,7 +396,7 @@ $Index++;
396 396
             value="<?=$GroupID?>" />
397 397
           <input type="text" name="tagname" id="tagname" <?php Users::has_autocomplete_enabled('other'); ?>
398 398
           />
399
-          <input type="submit" value="Add" />
399
+          <input type="submit" class="button-primary" value="Add" />
400 400
         </form>
401 401
         <br />
402 402
         <strong><a href="rules.php?p=tag" class="brackets">View tagging rules</a></strong>

+ 2
- 2
sections/upload/index.php View File

@@ -3,11 +3,11 @@ declare(strict_types=1);
3 3
 
4 4
 enforce_login();
5 5
 if (!check_perms('site_upload')) {
6
-    error(403);
6
+    error('Please read the site wiki for information on how to become a Member and gain upload privileges.', $Debug = false);
7 7
 }
8 8
 
9 9
 if ($LoggedUser['DisableUpload']) {
10
-    error('Your upload privileges have been revoked.');
10
+    error('Your upload privileges have been revoked.', $Debug = false);
11 11
 }
12 12
 
13 13
 // Build the page

+ 2
- 2
sections/user/user.php View File

@@ -1514,7 +1514,7 @@ if (!$DisablePoints) {
1514 1514
       <?php } ?>
1515 1515
     </table>
1516 1516
     <?php if (check_perms('users_disable_any')) { ?>
1517
-    <table class="layout box">
1517
+    <table class="layout box" id="user_lock_account">
1518 1518
       <tr class="colhead">
1519 1519
         <td colspan="2">
1520 1520
           Lock Account
@@ -1703,7 +1703,7 @@ if (!$DisablePoints) {
1703 1703
 
1704 1704
       <tr>
1705 1705
         <td align="right" colspan="2">
1706
-          <input type="submit" value="Save changes" />
1706
+          <input type="submit" class="button-primary" value="Save changes" />
1707 1707
         </td>
1708 1708
       </tr>
1709 1709
     </table>

+ 59
- 55
sections/userhistory/subscriptions.php View File

@@ -1,7 +1,7 @@
1 1
 <?php
2 2
 #declare(strict_types=1);
3 3
 
4
-/*
4
+/**
5 5
  * User subscription page
6 6
  */
7 7
 
@@ -38,54 +38,54 @@ $ShowCollapsed = (!isset($_GET['collapse']) && !isset($HeavyInfo['SubscriptionsC
38 38
 $DB->query("
39 39
   (SELECT
40 40
     SQL_CALC_FOUND_ROWS
41
-    s.Page,
42
-    s.PageID,
43
-    lr.PostID,
41
+    s.`Page`,
42
+    s.`PageID`,
43
+    lr.`PostID`,
44 44
     null AS ForumID,
45 45
     null AS ForumName,
46
-    IF(s.Page = 'artist', a.Name, co.Name) AS Name,
47
-    c.ID AS LastPost,
48
-    c.AddedTime AS LastPostTime,
49
-    c_lr.Body AS LastReadBody,
50
-    c_lr.EditedTime AS LastReadEditedTime,
51
-    um.ID AS LastReadUserID,
52
-    um.Username AS LastReadUsername,
53
-    ui.Avatar AS LastReadAvatar,
54
-    c_lr.EditedUserID AS LastReadEditedUserID
55
-  FROM users_subscriptions_comments AS s
56
-    LEFT JOIN users_comments_last_read AS lr ON lr.UserID = $LoggedUser[ID] AND lr.Page = s.Page AND lr.PageID = s.PageID
57
-    LEFT JOIN artists_group AS a ON s.Page = 'artist' AND a.ArtistID = s.PageID
58
-    LEFT JOIN collages AS co ON s.Page = 'collages' AND co.ID = s.PageID
59
-    LEFT JOIN comments AS c ON c.ID = (
60
-          SELECT MAX(ID)
61
-          FROM comments
62
-          WHERE Page = s.Page
63
-            AND PageID = s.PageID
46
+    IF(s.`Page` = 'artist', a.`Name`, co.`Name`) AS Name,
47
+    c.`ID` AS LastPost,
48
+    c.`AddedTime` AS LastPostTime,
49
+    c_lr.`Body` AS LastReadBody,
50
+    c_lr.`EditedTime` AS LastReadEditedTime,
51
+    um.`ID` AS LastReadUserID,
52
+    um.`Username` AS LastReadUsername,
53
+    ui.`Avatar` AS LastReadAvatar,
54
+    c_lr.`EditedUserID` AS LastReadEditedUserID
55
+  FROM `users_subscriptions_comments` AS s
56
+    LEFT JOIN `users_comments_last_read` AS lr ON lr.`UserID` = $LoggedUser[ID] AND lr.`Page` = s.`Page` AND lr.`PageID` = s.`PageID`
57
+    LEFT JOIN `artists_group` AS a ON s.`Page` = 'artist' AND a.`ArtistID` = s.`PageID`
58
+    LEFT JOIN `collages` AS co ON s.`Page` = 'collages' AND co.`ID` = s.`PageID`
59
+    LEFT JOIN `comments` AS c ON c.`ID` = (
60
+          SELECT MAX(`ID`)
61
+          FROM `comments`
62
+          WHERE `Page` = s.`Page`
63
+            AND `PageID` = s.`PageID`
64 64
         )
65
-    LEFT JOIN comments AS c_lr ON c_lr.ID = lr.PostID
66
-    LEFT JOIN users_main AS um ON um.ID = c_lr.AuthorID
67
-    LEFT JOIN users_info AS ui ON ui.UserID = um.ID
68
-  WHERE s.UserID = $LoggedUser[ID] AND s.Page IN ('artist', 'collages', 'requests', 'torrents') AND (s.Page != 'collages' OR co.Deleted = '0')" . ($ShowUnread ? ' AND c.ID > IF(lr.PostID IS NULL, 0, lr.PostID)' : '') . "
69
-  GROUP BY s.PageID)
65
+    LEFT JOIN `comments` AS c_lr ON c_lr.`ID` = lr.`PostID`
66
+    LEFT JOIN `users_main` AS um ON um.`ID` = c_lr.`AuthorID`
67
+    LEFT JOIN `users_info` AS ui ON ui.`UserID` = um.`ID`
68
+  WHERE s.`UserID` = $LoggedUser[ID] AND s.`Page` IN ('artist', 'collages', 'requests', 'torrents') AND (s.`Page` != 'collages' OR co.`Deleted` = '0')" . ($ShowUnread ? ' AND c.`ID` > IF(lr.`PostID` IS NULL, 0, lr.`PostID`)' : '') . "
69
+  GROUP BY s.`PageID`)
70 70
   UNION ALL
71
-  (SELECT 'forums', s.TopicID, lr.PostID, f.ID, f.Name, t.Title, p.ID, p.AddedTime, p_lr.Body, p_lr.EditedTime, um.ID, um.Username, ui.Avatar, p_lr.EditedUserID
72
-  FROM users_subscriptions AS s
73
-    LEFT JOIN forums_last_read_topics AS lr ON lr.UserID = $LoggedUser[ID] AND s.TopicID = lr.TopicID
74
-    LEFT JOIN forums_topics AS t ON t.ID = s.TopicID
75
-    LEFT JOIN forums AS f ON f.ID = t.ForumID
76
-    LEFT JOIN forums_posts AS p ON p.ID = (
77
-          SELECT MAX(ID)
78
-          FROM forums_posts
79
-          WHERE TopicID = s.TopicID
71
+  (SELECT 'forums', s.`TopicID`, lr.`PostID`, f.`ID`, f.`Name`, t.`Title`, p.`ID`, p.`AddedTime`, p_lr.`Body`, p_lr.`EditedTime`, um.`ID`, um.`Username`, ui.`Avatar`, p_lr.`EditedUserID`
72
+  FROM `users_subscriptions` AS s
73
+    LEFT JOIN `forums_last_read_topics` AS lr ON lr.`UserID` = $LoggedUser[ID] AND s.`TopicID` = lr.`TopicID`
74
+    LEFT JOIN `forums_topics` AS t ON t.`ID` = s.`TopicID`
75
+    LEFT JOIN `forums` AS f ON f.`ID` = t.`ForumID`
76
+    LEFT JOIN `forums_posts` AS p ON p.`ID` = (
77
+          SELECT MAX(`ID`)
78
+          FROM `forums_posts`
79
+          WHERE `TopicID` = s.`TopicID`
80 80
         )
81
-    LEFT JOIN forums_posts AS p_lr ON p_lr.ID = lr.PostID
82
-    LEFT JOIN users_main AS um ON um.ID = p_lr.AuthorID
83
-    LEFT JOIN users_info AS ui ON ui.UserID = um.ID
84
-  WHERE s.UserID = $LoggedUser[ID]" .
85
-    ($ShowUnread ? " AND p.ID > IF(t.IsLocked = '1' AND t.IsSticky = '0'" . ", p.ID, IF(lr.PostID IS NULL, 0, lr.PostID))" : '') .
81
+    LEFT JOIN `forums_posts` AS p_lr ON p_lr.`ID` = lr.`PostID`
82
+    LEFT JOIN `users_main` AS um ON um.`ID` = p_lr.`AuthorID`
83
+    LEFT JOIN `users_info` AS ui ON ui.`UserID` = um.`ID`
84
+  WHERE s.`UserID` = $LoggedUser[ID]" .
85
+    ($ShowUnread ? " AND p.`ID` > IF(t.`IsLocked` = '1' AND t.`IsSticky` = '0'" . ", p.`ID`, IF(lr.`PostID` IS NULL, 0, lr.`PostID`))" : '') .
86 86
     ' AND ' . Forums::user_forums_sql() . "
87
-  GROUP BY t.ID)
88
-  ORDER BY LastPostTime DESC
87
+  GROUP BY t.`ID`)
88
+  ORDER BY `LastPostTime` DESC
89 89
   LIMIT $Limit");
90 90
 
91 91
 $Results = $DB->to_array(false, MYSQLI_ASSOC, false);
@@ -162,41 +162,44 @@ if (!$NumResults) {
162 162
         $Links = 'Artist: <a href="artist.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
163 163
         $JumpLink = 'artist.php?id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
164 164
         break;
165
+
166
+
165 167
       case 'collages':
166 168
         $Links = 'Collage: <a href="collages.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
167 169
         $JumpLink = 'collages.php?action=comments&collageid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
168 170
         break;
171
+
172
+
169 173
       case 'requests':
170 174
         if (!isset($Requests[$Result['PageID']])) {
171 175
             continue;
172 176
         }
177
+
173 178
         $Request = $Requests[$Result['PageID']];
174 179
         $CategoryName = $Categories[$CategoryID - 1];
175 180
 
176 181
         $Links = 'Request: ';
177
-        /*
178
-        if ($CategoryName == 'Music' || $CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
179
-            $Links .= ($CategoryName == 'Music' ? Artists::display_artists(Requests::get_artists($Result['PageID'])) : '') . '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
180
-        } else {
181
-          */
182 182
             $Links .= '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a>";
183
-        #} # else
184 183
         $JumpLink = 'requests.php?action=view&amp;id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
185 184
         break;
185
+
186
+
186 187
       case 'torrents':
187 188
         if (!isset($TorrentGroups[$Result['PageID']])) {
188 189
             continue;
189 190
         }
191
+
190 192
         $GroupInfo = $TorrentGroups[$Result['PageID']];
191
-        $Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['ID'] . '" dir="ltr">' . $GroupInfo['Name'] . '</a>';
192
-        if ($GroupInfo['Year'] > 0) {
193
-            $Links .= " [" . $GroupInfo['Year'] . "]";
194
-        }
195
-        if ($GroupInfo['ReleaseType'] > 0) {
196
-            $Links .= " [" . $ReleaseTypes[$GroupInfo['ReleaseType']] . "]";
193
+        $Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['id'] . '" dir="ltr">' . $GroupInfo['title'] . '</a>';
194
+       
195
+        if ($GroupInfo['year'] > 0) {
196
+            $Links .= " [" . $GroupInfo['year'] . "]";
197 197
         }
198
+
198 199
         $JumpLink = 'torrents.php?id=' . $GroupInfo['ID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
199 200
         break;
201
+
202
+
200 203
       case 'forums':
201 204
         $Links = 'Forums: <a href="forums.php?action=viewforum&amp;forumid=' . $Result['ForumID'] . '">' . display_str($Result['ForumName']) . '</a> &gt; ' .
202 205
           '<a href="forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] .
@@ -205,6 +208,7 @@ if (!$NumResults) {
205 208
           '</a>';
206 209
         $JumpLink = 'forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
207 210
         break;
211
+
208 212
       default:
209 213
         error(0);
210 214
     } ?>

+ 1
- 1
sections/wiki/article.php View File

@@ -83,7 +83,7 @@ View::show_header($Title, 'wiki,bbcode');
83 83
         <form class="search_form" name="articles" action="wiki.php" method="get">
84 84
           <input type="hidden" name="action" value="search" />
85 85
           <input type="search" placeholder="Search articles" name="search" size="20" />
86
-          <input value="Search" type="submit" class="hidden" />
86
+          <input value="Search" type="submit" class="hidden button-primary" />
87 87
         </form>
88 88
 
89 89
         <br style="line-height: 10px;" />

BIN
static/common/logos/torrents.bio.png View File


+ 0
- 23
static/functions/vendor/biojs/cytoscape.js
File diff suppressed because it is too large
View File


+ 0
- 1335
static/functions/vendor/biojs/ntseq.js
File diff suppressed because it is too large
View File


+ 7
- 0
static/styles/bookish/scss/colors.scss View File

@@ -17,6 +17,11 @@ $lb700: #0288d1;
17 17
 $lb800: #0277bd;
18 18
 $lb900: #01579b;
19 19
 
20
+/* Skeleton CSS */
21
+$SkeletonDefault: #33c3f0;
22
+$SkeletonFocus: #1eaedb;
23
+$SkeletonHalfdark: scale-color($SkeletonFocus, $lightness: -50%);
24
+
20 25
 /* The shadow under floating elements */
21 26
 $shadow: 2px 2px 10px -2px slategray;
22 27
 
@@ -25,6 +30,7 @@ $shadow: 2px 2px 10px -2px slategray;
25 30
  */
26 31
 
27 32
 /* Alternating tables */
33
+/*
28 34
 #request_table .request:nth-of-type(even) {
29 35
     background: white;
30 36
 }
@@ -32,6 +38,7 @@ $shadow: 2px 2px 10px -2px slategray;
32 38
 #request_table .request:nth-of-type(odd) {
33 39
     background: whitesmoke;
34 40
 }
41
+*/
35 42
 
36 43
 /**
37 44
  * RGB color intensity border

+ 3
- 2
static/styles/bookish/scss/fonts.scss View File

@@ -42,7 +42,8 @@ a {
42 42
 }
43 43
 
44 44
 a:hover {
45
-    color: $lb900;
45
+    color: $SkeletonFocus;
46
+    /* color: $lb900; */
46 47
     text-decoration: none;
47 48
 }
48 49
 
@@ -102,7 +103,7 @@ pre {
102 103
 }
103 104
 
104 105
 ul {
105
-    margin-left: 1rem;
106
+    margin-left: 0.5rem;
106 107
 }
107 108
 
108 109
 /* Markdown Extra new features */

+ 18
- 20
static/styles/bookish/scss/layout.scss View File

@@ -26,11 +26,11 @@
26 26
 
27 27
 /* Logo */
28 28
 #logo {
29
-    background: url("/static/common/logos/bookish.png") no-repeat center;
29
+    background: url("/static/common/logos/torrents.bio.png") no-repeat center;
30 30
     background-size: contain;
31 31
     width: 250px;
32 32
     height: 50px;
33
-    margin: 0 0 0 10%;
33
+    margin: 0.5rem 0 0.25rem 10%;
34 34
 
35 35
     a {
36 36
         border: none;
@@ -44,15 +44,6 @@
44 44
     }
45 45
 }
46 46
 
47
-/* Content container */
48
-.box {
49
-    background-color: white;
50
-    /* border: 2px solid rgba(0, 0, 0, 0.01); */
51
-    margin: auto;
52
-    margin-bottom: 1rem;
53
-    width: 100%;
54
-}
55
-
56 47
 /* Main column and sidebar */
57 48
 @mixin column-flex($width) {
58 49
     display: flex;
@@ -76,6 +67,11 @@
76 67
     float: right;
77 68
 }
78 69
 
70
+/* Box: soon to be <section> */
71
+.box {
72
+    margin-bottom: 1rem;
73
+}
74
+
79 75
 /* Links */
80 76
 div.linkbox {
81 77
     text-align: center;
@@ -96,7 +92,10 @@ div.linkbox {
96 92
     margin-top: 1rem;
97 93
 }
98 94
 
99
-/* Torrents page */
95
+/**
96
+ * Torrents page
97
+ */
98
+
100 99
 .show_torrents {
101 100
     width: 21px;
102 101
     height: 28px;
@@ -143,18 +142,16 @@ div.linkbox {
143 142
     text-align: center;
144 143
 }
145 144
 
146
-.torrent_table,
147
-.torrent_table td {
148
-    border: none;
149
-}
145
+/**
146
+ * Text elements
147
+ */
150 148
 
151
-/* Text elements */
152 149
 p {
153
-    margin: 1em 0.5rem;
150
+    margin-bottom: 1rem;
154 151
 }
155 152
 
156 153
 li {
157
-    margin: 0.5em 2rem;
154
+    margin: 0 1rem;
158 155
 }
159 156
 
160 157
 .torrent_title {
@@ -241,7 +238,8 @@ ul .invitetree {
241 238
 
242 239
 .center_poll {
243 240
     height: 0.75rem;
244
-    background: $lb50;
241
+    background: $SkeletonDefault;
242
+    /* background: $lb50; */
245 243
     border-radius: 0;
246 244
     float: left;
247 245
     margin: 0.25rem 0;

+ 11
- 10
static/styles/bookish/scss/menus.scss View File

@@ -3,7 +3,8 @@
3 3
  */
4 4
 
5 5
 #menu {
6
-    background-color: $lb900;
6
+    background-color: $SkeletonHalfdark;
7
+    /* background-color: $lb900; */
7 8
     font-size: 1rem;
8 9
     text-align: center;
9 10
     width: 100%;
@@ -36,26 +37,28 @@
36 37
     max-width: 2.5rem;
37 38
 }
38 39
 
39
-#menu ul li a.active {
40
-    background-color: $lb700;
40
+#menu ul li a:active {
41
+    background-color: $SkeletonFocus;
42
+    /* background-color: $lb700; */
41 43
 }
42 44
 
43 45
 #menu ul li a:hover {
44
-    background-color: $lb700;
46
+    background-color: $SkeletonFocus;
47
+    /* background-color: $lb700; */
45 48
     color: white;
46 49
     text-decoration: none;
47 50
 }
48 51
 
49 52
 /* Dropdown */
50 53
 #menu .nav_dropdown {
51
-    background: #01579b;
54
+    background-color: $SkeletonHalfdark;
52 55
     margin-top: 0;
53 56
 }
54 57
 
55 58
 .nav_dropdown > div {
56 59
     box-shadow: $shadow;
57 60
     position: absolute;
58
-    background-color: #01579b;
61
+    background-color: $SkeletonHalfdark;
59 62
     width: 100%;
60 63
     z-index: 99999;
61 64
     margin-top: 2.5rem;
@@ -85,8 +88,6 @@
85 88
 
86 89
 #searchbars {
87 90
     text-align: center;
88
-    background-color: $lb200;
89
-    box-shadow: $shadow;
90 91
     box-sizing: content-box;
91 92
     padding: 0.5rem 10%;
92 93
     display: flex;
@@ -133,7 +134,7 @@
133 134
 }
134 135
 
135 136
 #searchbars ul li ul li {
136
-    margin: 0 0 0 0;
137
+    margin: 0;
137 138
     padding: 0;
138 139
     display: block;
139 140
     width: 100%;
@@ -152,7 +153,7 @@
152 153
  */
153 154
 #userinfo {
154 155
     color: black;
155
-    padding: 0.5em 0;
156
+    /* padding: 0.5em 0; */
156 157
     width: 100%;
157 158
     text-align: center;
158 159
 }

+ 58
- 75
static/styles/bookish/scss/tables.scss View File

@@ -1,6 +1,18 @@
1
-@mixin center-all {
1
+/**
2
+ * Tables
3
+ */
4
+
5
+@mixin alternating-rows {
6
+    tr:nth-child(2n) {
7
+        background: whitesmoke;
8
+    }
9
+
10
+    tr:nth-child(2n-1) {
11
+        background: white;
12
+    }
2 13
 }
3 14
 
15
+/* Every table */
4 16
 table {
5 17
     width: 100%;
6 18
 
@@ -8,16 +20,41 @@ table {
8 20
         font-size: 120%;
9 21
     }
10 22
 
11
-    /*
12
-    tr {
13
-        background-color: white;
23
+    td,
24
+    td:first-child {
25
+        padding: 0.5rem !important;
26
+    }
27
+}
28
+
29
+/* Special tables */
30
+.torrent_table,
31
+.collage_table,
32
+.request_table,
33
+.top10_table {
34
+    @include alternating-rows;
35
+
36
+    th,
37
+    td {
38
+        border-bottom: 1px solid #e1e1e1;
39
+    }
40
+}
41
+
42
+.torrent_table,
43
+.collage_table {
44
+    div.tags {
45
+        font-weight: normal;
46
+        max-width: 500px;
47
+    }
48
+
49
+    span {
50
+        float: right;
14 51
     }
15
-    */
16 52
 }
17 53
 
18 54
 /**
19 55
  * Torrent form
20 56
  */
57
+
21 58
 .torrent_form,
22 59
 #dynamic_form {
23 60
     /* margin-bottom: 2rem; */
@@ -35,6 +72,7 @@ table {
35 72
  * colhead
36 73
  * The main table heading.
37 74
  */
75
+
38 76
 .colhead {
39 77
     padding: 0.5em 0;
40 78
     border-bottom: 1px solid #e1e1e1;
@@ -56,88 +94,33 @@ table {
56 94
 }
57 95
 
58 96
 /* Torrent and collage tables */
59
-.torrent_table,
60
-.collage_table {
61
-    tr:nth-child(2n) {
62
-        background-color: whitesmoke;
63
-    }
64
-
65
-    tr:nth-child(2n-1) {
66
-        background-color: white;
67
-    }
68
-
69
-    div.tags {
70
-        font-weight: normal;
71
-        max-width: 500px;
72
-    }
73
-
74
-    span {
75
-        float: right;
76
-    }
77
-}
78
-
79
-/*
80
-.torrent_table,
81
-.collage_table {
82
-    tr.group {
83
-        background-color: white;
84
-
85
-        td.center:first-child {
86
-            padding: 3px;
87
-            width: 21px;
88
-        }
89
-    }
90
-
91
-    tr.group_torrent {
92
-        background-color: white;
93
-
94
-        span {
95
-            float: right;
96
-        }
97
-    }
98
-
99
-    tr.torrent {
100
-        background-color: white;
101
-    }
102
-
103
-    tr.torrent:nth-child(2n),
104
-    tr.row:nth-child(2n) {
105
-        background-color: whitesmoke;
106
-    }
107
-
108
-    tr.torrent:nth-child(2n-1),
109
-    tr.row:nth-child(2n-1) {
110
-        background-color: white;
111
-    }
112
-
113
-    tr .center,
114
-    td {
115
-        vertical-align: middle;
116
-        /* text-align: center; * /
117
-    }
118
-    div.tags {
119
-        font-weight: normal;
120
-        max-width: 500px;
121
-    }
122
-}
123
-*/
124
-
125 97
 .torrent_table .group_torrent .torrent span {
126 98
     font-weight: normal;
127 99
     float: right;
128 100
 }
129 101
 
130
-/* Forums */
102
+/**
103
+ * Forums
104
+ */
105
+
106
+@mixin forum-post($color) {
107
+    background-color: $color;
108
+    border-bottom: 1px solid #e1e1e1;
109
+    font-size: 120%;
110
+}
111
+
131 112
 .forum_post .colhead_dark {
132
-    background: $lb100;
113
+    @include forum-post(white);
114
+    /* background: $lb100; */
133 115
 }
134 116
 
135 117
 .forum_post.staff_post .colhead_dark {
136
-    background: $lb200;
118
+    @include forum-post(whitesmoke);
119
+    /* background: $lb200; */
137 120
 }
138 121
 
139 122
 .forum_post.sticky_post {
140
-    border: 2px solid $lb200;
123
+    border: 2px solid $SkeletonDefault;
141 124
 }
142 125
 
143 126
 td.label {

+ 14
- 0
static/styles/global/scss/layout.scss View File

@@ -59,6 +59,7 @@ aside {
59 59
     &.upload_notice {
60 60
         @include transparent-border($R: 255, $A: 0.5);
61 61
         margin: 1rem auto;
62
+        padding-top: 1rem;
62 63
         text-align: center;
63 64
     }
64 65
 
@@ -76,6 +77,19 @@ aside {
76 77
     }
77 78
 }
78 79
 
80
+/**
81
+ * Footer
82
+ */
83
+
84
+footer {
85
+    margin-top: 2rem;
86
+    width: 100%;
87
+
88
+    p {
89
+        text-align: center;
90
+    }
91
+}
92
+
79 93
 /*
80 94
  * Misc
81 95
  */

+ 49
- 5
static/styles/global/scss/skeleton-fixes.scss View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Fixes needed to use skeleton.css
3
- * to its best advantage
3
+ * to its best no-fuss advantage
4 4
  */
5 5
 
6 6
 /* Set heading fonts 50% of default and bump down a level */
@@ -66,19 +66,44 @@ h6 {
66 66
     }
67 67
 }
68 68
 
69
+/* Forum list headings */
69 70
 table.forum_index {
70 71
     h4 {
71 72
         margin: 0 !important;
72 73
     }
73 74
 }
74 75
 
76
+/* Checkbox and radio labels */
75 77
 label,
76 78
 legend {
77 79
     display: inline !important;
78 80
 }
79 81
 
82
+/* Tables usually containing forms */
83
+/* browse */
80 84
 table.torrent_search,
81
-table.torrent_requests {
85
+/* request search */ table.torrent_requests,
86
+/* forum list */ table.forum_index,
87
+/* upload form */ table.torrent_form,
88
+/* new request? */ table.request_form,
89
+/* forum thread */ table.new_thread,
90
+/* toolbox */ table.admin_tools,
91
+/* BP */ table.store_table,
92
+/* rule sections */ div.rule_table,
93
+/* client rules */ table.clients_table,
94
+/* login */ table.login_form,
95
+/* requests? */form.create_form,
96
+/* top10 */ form.search_form,
97
+/* start user management */
98
+table#user_info_box,
99
+table#warn_user_box,
100
+table#user_lock_account,
101
+table#user_privs_box,
102
+table#session_box,
103
+table#donation_box,
104
+table#donor_points_box,
105
+table#submit_box
106
+/* end user management */ {
82 107
     th,
83 108
     td {
84 109
         border-bottom: 0 !important;
@@ -86,28 +111,47 @@ table.torrent_requests {
86 111
     }
87 112
 }
88 113
 
114
+/* Duplicate input rules here */
89 115
 input,
90 116
 input[type="search"],
91 117
 input[type="text"] {
92 118
     margin: 0 !important;
93 119
 }
94 120
 
95
-ul {
96
-    list-style: circle !important;
121
+input,
122
+textarea,
123
+select,
124
+fieldset {
125
+    margin-bottom: 0 !important;
97 126
 }
98 127
 
128
+/* Block elements */
99 129
 pre,
100 130
 blockquote,
101 131
 dl,
102 132
 figure,
103 133
 table,
104
-p,
105 134
 ul,
106 135
 ol,
107 136
 form {
108 137
     margin-bottom: 0 !important;
109 138
 }
110 139
 
140
+/* Inline code */
111 141
 code {
112 142
     padding: 0 !important;
113 143
 }
144
+
145
+/* Unordered lists */
146
+ul {
147
+    list-style: circle outside !important;
148
+}
149
+
150
+/* Nested lists */
151
+ul ul,
152
+ul ol,
153
+ol ol,
154
+ol ul {
155
+    margin: 0 !important;
156
+    font-size: 100% !important;
157
+}

+ 19
- 9
static/styles/public/scss/public.scss View File

@@ -1,3 +1,8 @@
1
+/* Skeleton CSS */
2
+$SkeletonDefault: #33c3f0;
3
+$SkeletonFocus: #1eaedb;
4
+$SkeletonHalfdark: scale-color($SkeletonFocus, $lightness: -50%);
5
+
1 6
 * {
2 7
     margin: 0;
3 8
     padding: 0;
@@ -49,7 +54,11 @@ p {
49 54
 }
50 55
 
51 56
 ul {
52
-    margin-left: 2rem;
57
+    margin-left: 0.5rem;
58
+
59
+    li {
60
+        margin-bottom: 0;
61
+    }
53 62
 
54 63
     &.p li {
55 64
         margin-bottom: 1rem;
@@ -64,7 +73,7 @@ h2 {
64 73
 /**
65 74
  * Inputs
66 75
  */
67
-
76
+/*
68 77
 input[type="text"],
69 78
 input[type="password"],
70 79
 input[type="email"] {
@@ -119,6 +128,7 @@ input[type="submit"]:hover {
119 128
     text-align: right;
120 129
     padding-right: 5px;
121 130
 }
131
+*/
122 132
 
123 133
 /**
124 134
  * Layout
@@ -126,10 +136,10 @@ input[type="submit"]:hover {
126 136
 
127 137
 header,
128 138
 footer {
129
-    height: 2rem;
130
-    line-height: 2rem;
139
+    height: 2.5rem;
140
+    line-height: 2.5rem;
131 141
     width: 100%;
132
-    background: #01579b;
142
+    background: $SkeletonHalfdark;
133 143
     position: fixed;
134 144
     left: 0;
135 145
 
@@ -156,16 +166,16 @@ footer {
156 166
 }
157 167
 
158 168
 main {
159
-    width: 250px;
169
+    width: 25%;
160 170
     height: calc(80% - 60px);
161 171
     margin: 0 auto;
162 172
     padding: 10% 0;
163 173
 }
164 174
 
165 175
 #logo {
166
-    width: 250px;
176
+    /* width: 250px; */
167 177
     height: 50px;
168
-    background-image: url("/static/common/logos/bookish.png");
178
+    background-image: url("/static/common/logos/torrents.bio.png");
169 179
     background-repeat: no-repeat;
170 180
     background-position: center;
171 181
     background-size: contain;
@@ -215,5 +225,5 @@ main {
215 225
     content: "℠";
216 226
     font-size: 0.75rem;
217 227
     font-weight: normal;
218
-    margin-left: 100%;
228
+    margin-left: 93%;
219 229
 }

Loading…
Cancel
Save