Browse Source

Allow for stylesheets to have optional "additions"

spaghetti 4 years ago
parent
commit
f1f5b2fd56

+ 3
- 1
classes/script_start.php View File

@@ -279,7 +279,9 @@ if (isset($_COOKIE['session']) && isset($_COOKIE['userid'])) {
279 279
       SELECT
280 280
         ID,
281 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 285
       FROM stylesheets');
284 286
     $Stylesheets = $DB->to_array('ID', MYSQLI_BOTH);
285 287
     $Cache->cache_value('stylesheets', $Stylesheets, 0);

+ 6
- 1
design/privateheader.php View File

@@ -131,7 +131,12 @@ if ($NotificationsManager->is_skipped(NotificationsManager::SUBSCRIPTIONS)) {
131 131
 }
132 132
 ?>
133 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 140
   <div id="wrapper">
136 141
     <h1 class="hidden"><?=SITE_NAME?></h1>
137 142
     <div id="header">

+ 1
- 0
gazelle.sql View File

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

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

@@ -140,8 +140,8 @@ echo $Val->GenerateJS('userform');
140 140
             <option value="<?=($Style['ID'])?>"<?=$Style['ID'] == $StyleID ? ' selected="selected"' : ''?>><?=($Style['ProperName'])?></option>
141 141
 <?  } ?>
142 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 145
 <?  foreach ($Stylesheets as $Style) { ?>
146 146
             <div class="preview_wrapper">
147 147
               <div class="preview_image" name="<?=($Style['Name'])?>">
@@ -157,6 +157,24 @@ echo $Val->GenerateJS('userform');
157 157
           </div>
158 158
         </td>
159 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 178
       <tr id="site_extstyle_tr">
161 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 180
         <td>

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

@@ -212,9 +212,7 @@ if (!empty($LoggedUser['DefaultSearch'])) {
212 212
 }
213 213
 $Options['DisableGrouping2']    = (!empty($_POST['disablegrouping']) ? 0 : 1);
214 214
 $Options['TorrentGrouping']     = (!empty($_POST['torrentgrouping']) ? 1 : 0);
215
-//$Options['DiscogView']          = (!empty($_POST['discogview']) ? 1 : 0);
216 215
 $Options['PostsPerPage']        = (int)$_POST['postsperpage'];
217
-//$Options['HideCollage']         = (!empty($_POST['hidecollage']) ? 1 : 0);
218 216
 $Options['CollageCovers']       = (empty($_POST['collagecovers']) ? 0 : $_POST['collagecovers']);
219 217
 $Options['ShowTorFilter']       = (empty($_POST['showtfilter']) ? 0 : 1);
220 218
 $Options['ShowTags']            = (!empty($_POST['showtags']) ? 1 : 0);
@@ -235,6 +233,7 @@ $Options['HideLolicon']         = (int)!empty($_POST['hide_lolicon']);
235 233
 $Options['HideScat']            = (int)!empty($_POST['hide_scat']);
236 234
 $Options['HideSnuff']           = (int)!empty($_POST['hide_snuff']);
237 235
 $Options['AutoComplete']        = (int)$_POST['autocomplete'];
236
+$Options['StyleAdditions']      = $_POST['style_additions'] ?? [];
238 237
 
239 238
 if (isset($LoggedUser['DisableFreeTorrentTop10'])) {
240 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,7 +28,7 @@
28 28
 .group .cats_anime:after, .group .cats_movies:after,
29 29
 .group .cats_manga:after, .group .cats_games:after,
30 30
 .group .cats_other:after {
31
-  color: black;
31
+  color: black!important;
32 32
 }
33 33
 .cats_anime:after {
34 34
   content: "ANM";
@@ -83,11 +83,7 @@ b,strong {
83 83
   font-weight: 400!important
84 84
 }
85 85
 
86
-::selection {
87
-  background: #3eaca7
88
-}
89
-
90
-::-moz-selection {
86
+::selection, ::-moz-selection {
91 87
   background: #3eaca7
92 88
 }
93 89
 
@@ -442,7 +438,7 @@ p.min_padding {
442 438
 }
443 439
 
444 440
 .alertbar {
445
-  background: linear-gradient(#186c77,#20717c);
441
+  background-color: #186c77;
446 442
   text-align: center;
447 443
   color: #fff;
448 444
   font-size: 10pt;
@@ -658,12 +654,12 @@ input[value="Make Default"] {
658 654
   background: #055363!important;
659 655
   font-size: .9em!important;
660 656
   color: #fff!important;
661
-  padding: 0!important
657
+  padding: 0!important;
662 658
 }
663 659
 
664 660
 .ui-widget-header {
665 661
   background: none!important;
666
-  border: none!important
662
+  border: none!important;
667 663
 }
668 664
 
669 665
 .ui-state-default {
@@ -671,89 +667,78 @@ input[value="Make Default"] {
671 667
   border: none!important;
672 668
   width: 48px!important;
673 669
   height: 36px!important;
674
-  margin: 1px!important
670
+  margin: 1px!important;
675 671
 }
676 672
 
677 673
 .ui-state-default a {
678 674
   margin-left: 3px!important;
679
-  margin-top: 4px!important
675
+  margin-top: 4px!important;
680 676
 }
681 677
 
682 678
 .ui-state-active,.ui-tabs-selected,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active {
683 679
   background: #2c2f36!important;
684 680
   color: #fff;
685
-  margin: 1px!important
681
+  margin: 1px!important;
686 682
 }
687 683
 
688 684
 .ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover {
689 685
   background: #222429!important;
690
-  color: #fff
686
+  color: #fff;
691 687
 }
692 688
 
693 689
 .ui-tabs {
694 690
   width: 636px!important;
695 691
   font-size: 1.1em!important;
696
-  background-color: #2c2f36!important
692
+  background-color: #2c2f36!important;
697 693
 }
698 694
 
699 695
 .ui-tabs .ui-tabs-panel {
700
-  background-color: #2c2f36!important
696
+  background-color: #2c2f36!important;
701 697
 }
702 698
 
703 699
 .ui-tabs-nav {
704 700
   width: 48px!important;
705 701
   margin-top: -8px!important;
706 702
   margin-bottom: -10px!important;
707
-  margin-left: -1px!important
703
+  margin-left: -1px!important;
708 704
 }
709 705
 
710 706
 .ui-tabs-panel {
711
-  width: 564px!important
707
+  width: 564px!important;
712 708
 }
713 709
 
714 710
 .ui-corner-all {
715 711
   -moz-border-radius: 0!important;
716 712
   -webkit-border-radius: 0!important;
717
-  border-radius: 0!important
713
+  border-radius: 0!important;
718 714
 }
719 715
 
720 716
 .ui-corner-left {
721 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 721
 .ui-autocomplete-loading {
726 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 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 730
 #recommend td[width="1%"] {
746
-  color: transparent
731
+  color: transparent;
747 732
 }
748 733
 
749 734
 .welcome {
750 735
   font-size: 1em;
751 736
   background-color: #282828;
752
-  border: 1px solid #303030
737
+  border: 1px solid #303030;
753 738
 }
754 739
 
755 740
 .b1h,.b2bh,.b2h,.b3bh,.b3h,.b4bh,.b4h,.contenth {
756
-  background: none!important
741
+  background: none!important;
757 742
 }
758 743
 
759 744
 .b1bh,.b1h,.b2bh,.b2h,.b3bh,.b3h,.b4bh,.b4h {
@@ -761,13 +746,13 @@ input[value="Make Default"] {
761 746
   border-left: 0 solid #aaa!important;
762 747
   border-right: 0 solid #aaa!important;
763 748
   height: 2px;
764
-  margin: 0 1px
749
+  margin: 0 1px;
765 750
 }
766 751
 
767 752
 .contenth {
768 753
   border-left: 0 hidden!important;
769 754
   border-right: 0 hidden!important;
770
-  color: #fff!important
755
+  color: #fff!important;
771 756
 }
772 757
 
773 758
 .head {
@@ -782,42 +767,42 @@ input[value="Make Default"] {
782 767
 div[style="padding-top:8px;background-color:#322;color:#ecc;"] {
783 768
   padding-top: 8px!important;
784 769
   background-color: #c1696a!important;
785
-  color: #ecc!important
770
+  color: #ecc!important;
786 771
 }
787 772
 
788 773
 #reseed_box {
789
-  padding-bottom: 0
774
+  padding-bottom: 0;
790 775
 }
791 776
 
792 777
 #reseed_box .sign {
793
-  text-align: left
778
+  text-align: left;
794 779
 }
795 780
 
796 781
 #reseed_box #swapreseed {
797 782
   color: #85878F;
798 783
   position: relative;
799
-  left: 468px
784
+  left: 468px;
800 785
 }
801 786
 
802 787
 #reseed_box #swapreseed:hover {
803
-  color: #92d4a0
788
+  color: #92d4a0;
804 789
 }
805 790
 
806 791
 #reseed_box .head {
807
-  margin-bottom: 2px!important
792
+  margin-bottom: 2px!important;
808 793
 }
809 794
 
810 795
 .tags {
811 796
   font-style: italic;
812
-  padding: 0 0 0 20px
797
+  padding: 0 0 0 20px;
813 798
 }
814 799
 
815 800
 .tags a {
816
-  color: #7e7e7e
801
+  color: #7e7e7e;
817 802
 }
818 803
 
819 804
 ul.nobullet {
820
-  padding-bottom: 2px
805
+  padding-bottom: 2px;
821 806
 }
822 807
 
823 808
 ul.nobullet, ul.nobullet li {
@@ -2042,3 +2027,71 @@ tbody .staff_post {
2042 2027
   background: none;
2043 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,7 +512,6 @@ tr.torrent .bookmark>a:after {
512 512
 }
513 513
 /* Stylesheet gallery in user profile editing */
514 514
 #css_gallery {
515
-  display: none;
516 515
   overflow: hidden;
517 516
   margin-top: 10px;
518 517
 }

Loading…
Cancel
Save