Browse Source

Allow for stylesheets to have optional "additions"

spaghetti 8 years ago
parent
commit
f1f5b2fd56

+ 3
- 1
classes/script_start.php View File

279
       SELECT
279
       SELECT
280
         ID,
280
         ID,
281
         LOWER(REPLACE(Name, " ", "_")) AS Name,
281
         LOWER(REPLACE(Name, " ", "_")) AS Name,
282
-        Name AS ProperName
282
+        Name AS ProperName,
283
+        LOWER(REPLACE(Additions, " ", "_")) AS Additions,
284
+        Additions AS ProperAdditions
283
       FROM stylesheets');
285
       FROM stylesheets');
284
     $Stylesheets = $DB->to_array('ID', MYSQLI_BOTH);
286
     $Stylesheets = $DB->to_array('ID', MYSQLI_BOTH);
285
     $Cache->cache_value('stylesheets', $Stylesheets, 0);
287
     $Cache->cache_value('stylesheets', $Stylesheets, 0);

+ 6
- 1
design/privateheader.php View File

131
 }
131
 }
132
 ?>
132
 ?>
133
 </head>
133
 </head>
134
-<body id="<?=$Document == 'collages' ? 'collage' : $Document?>">
134
+<?
135
+  if (!empty(G::$LoggedUser['StyleAdditions'])) {
136
+    $BodyStyles = 'style_'.implode(' style_', G::$LoggedUser['StyleAdditions']);
137
+  }
138
+?>
139
+<body id="<?=$Document == 'collages' ? 'collage' : $Document?>" class="<?=($BodyStyles??'')?>">
135
   <div id="wrapper">
140
   <div id="wrapper">
136
     <h1 class="hidden"><?=SITE_NAME?></h1>
141
     <h1 class="hidden"><?=SITE_NAME?></h1>
137
     <div id="header">
142
     <div id="header">

+ 1
- 0
gazelle.sql View File

1063
   `Name` varchar(255) NOT NULL,
1063
   `Name` varchar(255) NOT NULL,
1064
   `Description` varchar(255) NOT NULL,
1064
   `Description` varchar(255) NOT NULL,
1065
   `Default` enum('0','1') NOT NULL DEFAULT '0',
1065
   `Default` enum('0','1') NOT NULL DEFAULT '0',
1066
+  `Additions` text,
1066
   PRIMARY KEY (`ID`)
1067
   PRIMARY KEY (`ID`)
1067
 ) ENGINE=InnoDB CHARSET=utf8;
1068
 ) ENGINE=InnoDB CHARSET=utf8;
1068
 
1069
 

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

140
             <option value="<?=($Style['ID'])?>"<?=$Style['ID'] == $StyleID ? ' selected="selected"' : ''?>><?=($Style['ProperName'])?></option>
140
             <option value="<?=($Style['ID'])?>"<?=$Style['ID'] == $StyleID ? ' selected="selected"' : ''?>><?=($Style['ProperName'])?></option>
141
 <?  } ?>
141
 <?  } ?>
142
           </select>&nbsp;&nbsp;
142
           </select>&nbsp;&nbsp;
143
-          <a href="#" id="toggle_css_gallery" class="brackets">Show gallery</a>
144
-          <div id="css_gallery">
143
+          <a toggle-target="#css_gallery" class="brackets">Show gallery</a>
144
+          <div id="css_gallery" class="hidden">
145
 <?  foreach ($Stylesheets as $Style) { ?>
145
 <?  foreach ($Stylesheets as $Style) { ?>
146
             <div class="preview_wrapper">
146
             <div class="preview_wrapper">
147
               <div class="preview_image" name="<?=($Style['Name'])?>">
147
               <div class="preview_image" name="<?=($Style['Name'])?>">
157
           </div>
157
           </div>
158
         </td>
158
         </td>
159
       </tr>
159
       </tr>
160
+      <tr id="style_additions_tr" class="<?=$Stylesheets[$LoggedUser['StyleID']]['Additions'][0]?'':'hidden'?>">
161
+        <td class="label tooltip" title="Select changes that you want made to your chosen stylesheet"><strong>Stylesheet additions</strong></td>
162
+        <td> <?
163
+          foreach($Stylesheets as $Style) {
164
+            $StyleAdditions = explode('|',$Style['Additions']);
165
+            ?> <ul class="nobullet style_addition<?=$Style['ID']==$Stylesheets[$LoggedUser['StyleID']]['ID']?'':' hidden'?>" id="style_addition_<?=$Style['Name']?>"> <?
166
+            foreach($StyleAdditions as $i => $Addition) {
167
+              if ($Addition) { ?>
168
+                <li>
169
+                <input type="checkbox" name="style_additions[]" value="<?=$Addition?>" id="addition_<?=$Addition?>"<?=(in_array($Addition, $SiteOptions['StyleAdditions']??[])?' checked="checked"':'')?>>
170
+                  <label for="addition_<?=$Addition?>"><?=explode('|',$Style['ProperAdditions'])[$i]?></label>
171
+                </li>
172
+           <? }
173
+            }
174
+            ?> </ul> <?
175
+          }
176
+        ?> </td>
177
+      </tr>
160
       <tr id="site_extstyle_tr">
178
       <tr id="site_extstyle_tr">
161
         <td class="label tooltip" title="Providing a link to an externally-hosted stylesheet will override your default stylesheet selection."><strong>External stylesheet URL</strong></td>
179
         <td class="label tooltip" title="Providing a link to an externally-hosted stylesheet will override your default stylesheet selection."><strong>External stylesheet URL</strong></td>
162
         <td>
180
         <td>

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

212
 }
212
 }
213
 $Options['DisableGrouping2']    = (!empty($_POST['disablegrouping']) ? 0 : 1);
213
 $Options['DisableGrouping2']    = (!empty($_POST['disablegrouping']) ? 0 : 1);
214
 $Options['TorrentGrouping']     = (!empty($_POST['torrentgrouping']) ? 1 : 0);
214
 $Options['TorrentGrouping']     = (!empty($_POST['torrentgrouping']) ? 1 : 0);
215
-//$Options['DiscogView']          = (!empty($_POST['discogview']) ? 1 : 0);
216
 $Options['PostsPerPage']        = (int)$_POST['postsperpage'];
215
 $Options['PostsPerPage']        = (int)$_POST['postsperpage'];
217
-//$Options['HideCollage']         = (!empty($_POST['hidecollage']) ? 1 : 0);
218
 $Options['CollageCovers']       = (empty($_POST['collagecovers']) ? 0 : $_POST['collagecovers']);
216
 $Options['CollageCovers']       = (empty($_POST['collagecovers']) ? 0 : $_POST['collagecovers']);
219
 $Options['ShowTorFilter']       = (empty($_POST['showtfilter']) ? 0 : 1);
217
 $Options['ShowTorFilter']       = (empty($_POST['showtfilter']) ? 0 : 1);
220
 $Options['ShowTags']            = (!empty($_POST['showtags']) ? 1 : 0);
218
 $Options['ShowTags']            = (!empty($_POST['showtags']) ? 1 : 0);
235
 $Options['HideScat']            = (int)!empty($_POST['hide_scat']);
233
 $Options['HideScat']            = (int)!empty($_POST['hide_scat']);
236
 $Options['HideSnuff']           = (int)!empty($_POST['hide_snuff']);
234
 $Options['HideSnuff']           = (int)!empty($_POST['hide_snuff']);
237
 $Options['AutoComplete']        = (int)$_POST['autocomplete'];
235
 $Options['AutoComplete']        = (int)$_POST['autocomplete'];
236
+$Options['StyleAdditions']      = $_POST['style_additions'] ?? [];
238
 
237
 
239
 if (isset($LoggedUser['DisableFreeTorrentTop10'])) {
238
 if (isset($LoggedUser['DisableFreeTorrentTop10'])) {
240
   $Options['DisableFreeTorrentTop10'] = $LoggedUser['DisableFreeTorrentTop10'];
239
   $Options['DisableFreeTorrentTop10'] = $LoggedUser['DisableFreeTorrentTop10'];

BIN
static/styles/beluga-oppai/fonts/sourcesanspro-ln.woff2 View File


BIN
static/styles/beluga-oppai/fonts/sourcesanspro-lne.woff2 View File


BIN
static/styles/beluga-oppai/fonts/sourcesanspro-vm.woff2 View File


BIN
static/styles/beluga-oppai/images/search.png View File


BIN
static/styles/beluga-oppai/images/snatched.png View File


+ 0
- 2105
static/styles/beluga-oppai/style.css
File diff suppressed because it is too large
View File


+ 99
- 46
static/styles/beluga/style.css View File

28
 .group .cats_anime:after, .group .cats_movies:after,
28
 .group .cats_anime:after, .group .cats_movies:after,
29
 .group .cats_manga:after, .group .cats_games:after,
29
 .group .cats_manga:after, .group .cats_games:after,
30
 .group .cats_other:after {
30
 .group .cats_other:after {
31
-  color: black;
31
+  color: black!important;
32
 }
32
 }
33
 .cats_anime:after {
33
 .cats_anime:after {
34
   content: "ANM";
34
   content: "ANM";
83
   font-weight: 400!important
83
   font-weight: 400!important
84
 }
84
 }
85
 
85
 
86
-::selection {
87
-  background: #3eaca7
88
-}
89
-
90
-::-moz-selection {
86
+::selection, ::-moz-selection {
91
   background: #3eaca7
87
   background: #3eaca7
92
 }
88
 }
93
 
89
 
442
 }
438
 }
443
 
439
 
444
 .alertbar {
440
 .alertbar {
445
-  background: linear-gradient(#186c77,#20717c);
441
+  background-color: #186c77;
446
   text-align: center;
442
   text-align: center;
447
   color: #fff;
443
   color: #fff;
448
   font-size: 10pt;
444
   font-size: 10pt;
658
   background: #055363!important;
654
   background: #055363!important;
659
   font-size: .9em!important;
655
   font-size: .9em!important;
660
   color: #fff!important;
656
   color: #fff!important;
661
-  padding: 0!important
657
+  padding: 0!important;
662
 }
658
 }
663
 
659
 
664
 .ui-widget-header {
660
 .ui-widget-header {
665
   background: none!important;
661
   background: none!important;
666
-  border: none!important
662
+  border: none!important;
667
 }
663
 }
668
 
664
 
669
 .ui-state-default {
665
 .ui-state-default {
671
   border: none!important;
667
   border: none!important;
672
   width: 48px!important;
668
   width: 48px!important;
673
   height: 36px!important;
669
   height: 36px!important;
674
-  margin: 1px!important
670
+  margin: 1px!important;
675
 }
671
 }
676
 
672
 
677
 .ui-state-default a {
673
 .ui-state-default a {
678
   margin-left: 3px!important;
674
   margin-left: 3px!important;
679
-  margin-top: 4px!important
675
+  margin-top: 4px!important;
680
 }
676
 }
681
 
677
 
682
 .ui-state-active,.ui-tabs-selected,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active {
678
 .ui-state-active,.ui-tabs-selected,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active {
683
   background: #2c2f36!important;
679
   background: #2c2f36!important;
684
   color: #fff;
680
   color: #fff;
685
-  margin: 1px!important
681
+  margin: 1px!important;
686
 }
682
 }
687
 
683
 
688
 .ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover {
684
 .ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover {
689
   background: #222429!important;
685
   background: #222429!important;
690
-  color: #fff
686
+  color: #fff;
691
 }
687
 }
692
 
688
 
693
 .ui-tabs {
689
 .ui-tabs {
694
   width: 636px!important;
690
   width: 636px!important;
695
   font-size: 1.1em!important;
691
   font-size: 1.1em!important;
696
-  background-color: #2c2f36!important
692
+  background-color: #2c2f36!important;
697
 }
693
 }
698
 
694
 
699
 .ui-tabs .ui-tabs-panel {
695
 .ui-tabs .ui-tabs-panel {
700
-  background-color: #2c2f36!important
696
+  background-color: #2c2f36!important;
701
 }
697
 }
702
 
698
 
703
 .ui-tabs-nav {
699
 .ui-tabs-nav {
704
   width: 48px!important;
700
   width: 48px!important;
705
   margin-top: -8px!important;
701
   margin-top: -8px!important;
706
   margin-bottom: -10px!important;
702
   margin-bottom: -10px!important;
707
-  margin-left: -1px!important
703
+  margin-left: -1px!important;
708
 }
704
 }
709
 
705
 
710
 .ui-tabs-panel {
706
 .ui-tabs-panel {
711
-  width: 564px!important
707
+  width: 564px!important;
712
 }
708
 }
713
 
709
 
714
 .ui-corner-all {
710
 .ui-corner-all {
715
   -moz-border-radius: 0!important;
711
   -moz-border-radius: 0!important;
716
   -webkit-border-radius: 0!important;
712
   -webkit-border-radius: 0!important;
717
-  border-radius: 0!important
713
+  border-radius: 0!important;
718
 }
714
 }
719
 
715
 
720
 .ui-corner-left {
716
 .ui-corner-left {
721
   border-top-left-radius: 0!important;
717
   border-top-left-radius: 0!important;
722
-  border-bottom-left-radius: 0!important
718
+  border-bottom-left-radius: 0!important;
723
 }
719
 }
724
 
720
 
725
 .ui-autocomplete-loading {
721
 .ui-autocomplete-loading {
726
   background-color: #2c2f36!important;
722
   background-color: #2c2f36!important;
727
-  background-image: none!important
728
-}
729
-
730
-#lumen_exchange_dialog {
731
-  font-size: 1em!important;
732
-  padding: 0 0 0 40px!important;
733
-  background-color: #2c2f36!important
734
-}
735
-
736
-#lumen_exchange_dialog td[style="text-align: center; font-weight: bold;"] {
737
-  padding-right: 40px;
738
-  font-weight: 300!important
723
+  background-image: none!important;
739
 }
724
 }
740
 
725
 
741
 .ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix {
726
 .ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix {
742
-  background-color: #2c2f36!important
727
+  background-color: #2c2f36!important;
743
 }
728
 }
744
 
729
 
745
 #recommend td[width="1%"] {
730
 #recommend td[width="1%"] {
746
-  color: transparent
731
+  color: transparent;
747
 }
732
 }
748
 
733
 
749
 .welcome {
734
 .welcome {
750
   font-size: 1em;
735
   font-size: 1em;
751
   background-color: #282828;
736
   background-color: #282828;
752
-  border: 1px solid #303030
737
+  border: 1px solid #303030;
753
 }
738
 }
754
 
739
 
755
 .b1h,.b2bh,.b2h,.b3bh,.b3h,.b4bh,.b4h,.contenth {
740
 .b1h,.b2bh,.b2h,.b3bh,.b3h,.b4bh,.b4h,.contenth {
756
-  background: none!important
741
+  background: none!important;
757
 }
742
 }
758
 
743
 
759
 .b1bh,.b1h,.b2bh,.b2h,.b3bh,.b3h,.b4bh,.b4h {
744
 .b1bh,.b1h,.b2bh,.b2h,.b3bh,.b3h,.b4bh,.b4h {
761
   border-left: 0 solid #aaa!important;
746
   border-left: 0 solid #aaa!important;
762
   border-right: 0 solid #aaa!important;
747
   border-right: 0 solid #aaa!important;
763
   height: 2px;
748
   height: 2px;
764
-  margin: 0 1px
749
+  margin: 0 1px;
765
 }
750
 }
766
 
751
 
767
 .contenth {
752
 .contenth {
768
   border-left: 0 hidden!important;
753
   border-left: 0 hidden!important;
769
   border-right: 0 hidden!important;
754
   border-right: 0 hidden!important;
770
-  color: #fff!important
755
+  color: #fff!important;
771
 }
756
 }
772
 
757
 
773
 .head {
758
 .head {
782
 div[style="padding-top:8px;background-color:#322;color:#ecc;"] {
767
 div[style="padding-top:8px;background-color:#322;color:#ecc;"] {
783
   padding-top: 8px!important;
768
   padding-top: 8px!important;
784
   background-color: #c1696a!important;
769
   background-color: #c1696a!important;
785
-  color: #ecc!important
770
+  color: #ecc!important;
786
 }
771
 }
787
 
772
 
788
 #reseed_box {
773
 #reseed_box {
789
-  padding-bottom: 0
774
+  padding-bottom: 0;
790
 }
775
 }
791
 
776
 
792
 #reseed_box .sign {
777
 #reseed_box .sign {
793
-  text-align: left
778
+  text-align: left;
794
 }
779
 }
795
 
780
 
796
 #reseed_box #swapreseed {
781
 #reseed_box #swapreseed {
797
   color: #85878F;
782
   color: #85878F;
798
   position: relative;
783
   position: relative;
799
-  left: 468px
784
+  left: 468px;
800
 }
785
 }
801
 
786
 
802
 #reseed_box #swapreseed:hover {
787
 #reseed_box #swapreseed:hover {
803
-  color: #92d4a0
788
+  color: #92d4a0;
804
 }
789
 }
805
 
790
 
806
 #reseed_box .head {
791
 #reseed_box .head {
807
-  margin-bottom: 2px!important
792
+  margin-bottom: 2px!important;
808
 }
793
 }
809
 
794
 
810
 .tags {
795
 .tags {
811
   font-style: italic;
796
   font-style: italic;
812
-  padding: 0 0 0 20px
797
+  padding: 0 0 0 20px;
813
 }
798
 }
814
 
799
 
815
 .tags a {
800
 .tags a {
816
-  color: #7e7e7e
801
+  color: #7e7e7e;
817
 }
802
 }
818
 
803
 
819
 ul.nobullet {
804
 ul.nobullet {
820
-  padding-bottom: 2px
805
+  padding-bottom: 2px;
821
 }
806
 }
822
 
807
 
823
 ul.nobullet, ul.nobullet li {
808
 ul.nobullet, ul.nobullet li {
2042
   background: none;
2027
   background: none;
2043
   background-color: #634852;
2028
   background-color: #634852;
2044
 }
2029
 }
2030
+
2031
+/* Pink Additions */
2032
+
2033
+body.style_pink .cats_anime:after { color: #78467f; }
2034
+body.style_pink .group .cats_anime { background-color: #78467f; }
2035
+body.style_pink .cats_movies:after { color: #4f3063; }
2036
+body.style_pink .group .cats_movies { background-color: #4f3063; }
2037
+body.style_pink .cats_manga:after { color: #9f5c9c; }
2038
+body.style_pink .group .cats_manga { background-color: #9f5c9c; }
2039
+body.style_pink .cats_games:after { color: #c871b9; }
2040
+body.style_pink .group .cats_games { background-color: #c871b9; } 
2041
+body.style_pink .cats_other:after { color: #ef86d5; }
2042
+body.style_pink .group .cats_other { background-color: #ef86d5; }
2043
+body.style_pink a:hover { color: #db7bc7; }
2044
+body.style_pink ::selection,
2045
+body.style_pink ::-moz-selection {
2046
+  background: #8b518e;
2047
+}
2048
+body.style_pink button,
2049
+body.style_pink input[type=button],
2050
+body.style_pink input[type=submit] {
2051
+  background-color: #8b518e;
2052
+}
2053
+body.style_pink button:hover,
2054
+body.style_pink input[type=button]:hover,
2055
+body.style_pink input[type=submit]:hover {
2056
+  background-color: #643c72;
2057
+}
2058
+body.style_pink button:focus,
2059
+body.style_pink input[type=button]:focus,
2060
+body.style_pink input[type=submit]:focus {
2061
+  background-color: #78467f;
2062
+}
2063
+body.style_pink #userinfo_stats { color: #db7bc7; }
2064
+body.style_pink #menu > ul > li:nth-of-type(1) > a { background-color: #3b2655; }
2065
+body.style_pink #menu > ul > li:nth-of-type(2) > a { background-color: #4f3063; }
2066
+body.style_pink #menu > ul > li:nth-of-type(3) > a { background-color: #643c72; }
2067
+body.style_pink #menu > ul > li:nth-of-type(4) > a { background-color: #78467f; }
2068
+body.style_pink #menu > ul > li:nth-of-type(5) > a { background-color: #8b518e; }
2069
+body.style_pink #menu > ul > li:nth-of-type(6) > a { background-color: #9f5c9c; }
2070
+body.style_pink #menu > ul > li:nth-of-type(7) > a { background-color: #b367aa; }
2071
+body.style_pink #menu > ul > li:nth-of-type(8) > a { background-color: #c871b9; }
2072
+body.style_pink #menu > ul > li:nth-of-type(9) > a { background-color: #db7bc7; }
2073
+body.style_pink #menu > ul > li:nth-of-type(10) > a { background-color: #ef86d5; }
2074
+body.style_pink .alertbar { background-color: #4f3063; }
2075
+body.style_pink .hide_torrents > .show_torrents_link:after,
2076
+body.style_pink .show_torrents > .show_torrents_link:after,
2077
+body.style_pink .show_torrents > .show_torrents_link:before {
2078
+  background-color: #b367aa;
2079
+}
2080
+body.style_pink .forum_index td.read:after { background-color: #643c72; }
2081
+body.style_pink .forum_index td.unread:after { background-color: #db7bc7; }
2082
+body.style_pink .forum_index td.read_sticky:after,
2083
+body.style_pink .forum_index td.read_locked_sticky:after {
2084
+  border-bottom: 10px solid #643c72;
2085
+}
2086
+body.style_pink .forum_index td.read_locked:before,
2087
+body.style_pink .forum_index td.read_locked_sticky:before {
2088
+  background-color: #643c72;
2089
+}
2090
+body.style_pink .forum_index td.unread_sticky:after,
2091
+body.style_pink .forum_index td.unread_locked_sticky:after {
2092
+  border-bottom: 10px solid #db7bc7;
2093
+}
2094
+body.style_pink .forum_index td.unread_locked:before,
2095
+body.style_pink .forum_index td.unread_locked_sticky:before {
2096
+  background-color: #db7bc7;
2097
+}

+ 0
- 1
static/styles/global.css View File

512
 }
512
 }
513
 /* Stylesheet gallery in user profile editing */
513
 /* Stylesheet gallery in user profile editing */
514
 #css_gallery {
514
 #css_gallery {
515
-  display: none;
516
   overflow: hidden;
515
   overflow: hidden;
517
   margin-top: 10px;
516
   margin-top: 10px;
518
 }
517
 }

Loading…
Cancel
Save