Skip to content

Commit ffe1cf2

Browse files
committed
I updated the style of all websites to improve the colors, the accessibility, and the user experience (UX)
1 parent c82880d commit ffe1cf2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+532
-210
lines changed

.megaignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-:*.sb-????????-??????
2+
-:*.tmp
3+
-:*~.*
4+
-:.git
5+
-:desktop.ini
6+
-:Thumbs.db
7+
-:~*

Archive/Variables/Website/Image Maker.php

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
$website_image_button_computer = "<!-- Computer website image link button -->"."\n".
3030
'<div class="'.$computer_variable.' w3-center">'."\n".
3131
'<button class="w3-btn '.$first_button_style.'" '.$roundedborderstyle.' onclick="window.open('."'".$website_information["image_link"]."'".')">'."\n".
32+
"<br />".
3233
'<'.$h4_element.'>'.ucfirst($website_open_image_in_new_tab_text).': '.$icons[2].'</'.$h4_element.'>'."\n".
3334
'</button>'."\n".
3435
$div_close."\n";

Classes/File.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@ public function Verbose($file, $text) {
1212
}
1313

1414
public function Sanitize($file) {
15-
$restricted_characters = [":", "?", '"', "|", "*", "<", ">", "/"];
15+
$restricted_characters = [
16+
":",
17+
"?",
18+
'"',
19+
"|",
20+
"*",
21+
"<",
22+
">",
23+
"/"
24+
];
1625

1726
return str_replace($restricted_characters, "", $file);
1827
}

Classes/HTML.php

+27-4
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ public static function Image($source, $class = "", $attributes = "") {
108108
return HTML::Element("img", "", 'src="'.$source.'"'.$attributes, $class);
109109
}
110110

111+
public static function Make_Image_Size($image, $width) {
112+
global $website;
113+
114+
$image = str_replace("image_size ", "", $image);
115+
#$image = str_replace("height: auto;", "max-width: ".$website_dictionary["JSON"]["image"]["width"]."vw; height: auto;", $image);
116+
$image = str_replace('height: auto;"', 'height: auto;" width="'.$width.'%"', $image);
117+
118+
return $image;
119+
}
120+
111121
public static function Format($text, $parameters) {
112122
$parameters = (array)$parameters;
113123

@@ -134,14 +144,17 @@ function ($key) {
134144
);
135145
}
136146

137-
public static function Button($text = "", $attributes = "", $class = "", $heading = "h3", $tab = True) {
147+
public static function Button($text = "", $attributes = "", $class = "", $heading = "h3", $tab = True, $bold = True) {
138148
global $website;
139149

140-
$class = $website["Style"]["button"]["theme"]["light"].$class;
150+
$class = $website["Style"]["button"]["theme"]["dark"].$class;
141151

142152
$text_attributes = "";
143153

144-
if ($heading == "h3") {
154+
if (
155+
$heading == "h3" and
156+
$bold == True
157+
) {
145158
$text_attributes = 'style="font-weight: bold;"';
146159
}
147160

@@ -184,7 +197,17 @@ public static function Generate_Buttons() {
184197
global $Language;
185198
global $i;
186199

187-
$show_text = HTML::Element("h2", "\n\t\t\t\t".$website["Icons"]["bars"]."\n\t\t\t", "", "text_size");
200+
$open_text = $website["Icons"]["bars"];
201+
202+
if ($website["Data"]["type"] == "Normal") {
203+
$open_text = $website["Language texts"]["click_to_open_the_buttons_menu"]." ".$website["Icons"]["bars"];
204+
}
205+
206+
if ($website["Data"]["type"] == "Story") {
207+
$open_text = $website["Language texts"]["click_to_read_story"]." ".$website["Icons"]["reader"];
208+
}
209+
210+
$show_text = HTML::Element("h2", "\n\t\t\t\t".$open_text."\n\t\t\t", "", "text_size");
188211
$hide_text = HTML::Element("h4", "\n\t\t\t\t"."X"."\n\t\t\t", 'style="font-weight: bold;"', "text_size");
189212

190213
$border_color = $website["Style"]["border_color"];

Classes/Story.php

+29-10
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,10 @@ public function Chapter_Cover() {
201201
$remote_chapter_folder .= $chapter_folder;
202202

203203
foreach ($website["Image formats"] as $format) {
204-
$local_chapter_cover = $local_chapter_folder.$chapter_cover_file_name.".".$format;
204+
$chapter_cover = $local_chapter_folder.$chapter_cover_file_name.".".$format;
205205

206-
if (file_exists($local_chapter_cover) == True) {
206+
if (file_exists($chapter_cover) == True) {
207+
$local_chapter_cover = $chapter_cover;
207208
$image_format = $format;
208209
}
209210
}
@@ -234,9 +235,17 @@ public function Chapter_Cover() {
234235
if ($local_chapter_cover != "") {
235236
$chapter_tab["comment"] = str_replace("button", "button, image,", $chapter_tab["comment"]);
236237

238+
#$width = $website["Data"]["JSON"]["image"]["width"];
239+
$width = "100";
240+
241+
$style = $website["Style"]["img"]["theme"]["light"];
242+
$style = str_replace("image_size ", "", $website["Style"]["img"]["theme"]["light"]);
243+
244+
$image = HTML::Element("img", "", 'id="chapter_cover_'.$i.'" src="'.$remote_chapter_cover.'" width="100%"', $website["Style"]["box_shadow"]["theme"]["dark"]." ".$style);
245+
237246
$chapter_cover = "<br />"."<!-- Chapter cover image -->"."\n".
238247
"\t\t"."<center>"."\n".
239-
"\t\t\t".HTML::Element("img", "", 'id="chapter_cover_'.$i.'" src="'.$remote_chapter_cover.'"', $website["Style"]["box_shadow"]["theme"]["dark"]." ".$website["Style"]["img"]["theme"]["light"])."\n\t\t"."</center>"."\n".
248+
"\t\t\t"."\n\t\t".$image."</center>"."\n".
240249
"\t\t"."<br />\n\n";
241250
}
242251

@@ -309,7 +318,7 @@ public function Get_Chapter_Comments($comments_folder) {
309318
$h4 = "\n"."\t\t".HTML::Element("h4", "\n\t\t\t".$text."\n\t\t", 'style="text-align: left;"', "text_size ".$website["Style"]["text"]["theme"]["dark"]." margin_sides_10_cent")."\n";
310319

311320
$div = "\t".'<!-- Chapter read number '.($c + 1).' -->'."\n".
312-
"\t".HTML::Element("div", $h4."\t", 'style="width: 33%;"', $website["Style"]["background"]["theme"]["light"]." ".$website["Style"]["border_4px"]["theme"]["dark"]." ".$website["Style"]["box_shadow"]["theme"][$border_color]." border_radius_50px");
321+
"\t".HTML::Element("div", $h4."\t", 'style="width: 33%;"', $website["Style"]["background"]["theme"]["dark"]." ".$website["Style"]["border_4px"]["theme"]["light"]." border_radius_50px");
313322

314323
if (file_exists($reads_folder) == True) {
315324
$div = str_replace("33%", "100%", $div);
@@ -380,14 +389,14 @@ public function Get_Chapter_Reads($reads_folder) {
380389
}
381390

382391
$text = '<br class="mobile_inline_block" />'.$text;
383-
$text .= "<br />";
392+
$text .= "<br /><br />";
384393
$text .= HTML::Element("b", $website["Language texts"]["in, title()"]).": ".date("H:i d/m/Y", strtotime($read_date));
385394
$text .= '<br class="mobile_inline_block" />'.'<br class="mobile_inline_block" />';
386395

387396
$h4 = "\n"."\t\t".HTML::Element("h4", "\n\t\t\t".$text."\n\t\t", 'style="text-align: left;"', "text_size ".$website["Style"]["text"]["theme"]["dark"]." margin_sides_10_cent margin_top_bottom_2_cent")."\n";
388397

389398
$div = "\t".'<!-- Chapter read number '.($r + 1).' -->'."\n".
390-
"\t".HTML::Element("div", $h4."\t", 'style="width: 33%;"', $website["Style"]["background"]["theme"]["light"]." ".$website["Style"]["border_4px"]["theme"]["dark"]." ".$website["Style"]["box_shadow"]["theme"][$border_color]." border_radius_50px");
399+
"\t".HTML::Element("div", $h4."\t", 'style="width: 33%;"', $website["Style"]["background"]["theme"]["dark"]." ".$website["Style"]["border_4px"]["theme"]["light"]." border_radius_50px");
391400

392401
if (file_exists($comments_folder) == True) {
393402
$div = str_replace("33%", "100%", $div);
@@ -491,6 +500,7 @@ public function Top_And_Bottom_Buttons() {
491500

492501
public function Chapter_Tab() {
493502
global $Folder;
503+
global $File;
494504
global $website;
495505
global $story;
496506
global $full_language;
@@ -523,7 +533,7 @@ public function Chapter_Tab() {
523533
"number_leading_zeroes" => Text::Add_Leading_Zeroes($i),
524534
"id" => "chapter_".$i,
525535
"chapter_title" => $i." - ".$chapter_title,
526-
"chapter_title_file" => Text::Add_Leading_Zeroes($i)." - ".$Folder -> Sanitize($chapter_title),
536+
"chapter_title_file" => Text::Add_Leading_Zeroes($i)." - ".$File -> Sanitize($chapter_title),
527537
"Dictionary" => [],
528538
"painted_chapter_title" => $painted_chapter_title,
529539
"you_are_reading" => "",
@@ -592,14 +602,16 @@ public function Chapter_Tab() {
592602
$story["chapter_buttons"] .= $chapter_button;
593603

594604
if ($chapter_title != end($chapter_titles)) {
595-
$story["chapter_buttons"] .= "\n";
605+
$story["chapter_buttons"] .= "<br />"."\n";
596606
}
597607

598608
# Get the chapter text
599609
$array = $this -> Chapter_Text();
600610

601611
$chapter_tab["chapter_text"] = $array["Text"]."\n";
602612

613+
$chapter_tab["chapter_text_color"] = " text_white";
614+
603615
if (isset($website["Style"]["chapter_text_color"]) == True) {
604616
$chapter_tab["chapter_text_color"] = " text_".$website["Style"]["chapter_text_color"];
605617
}
@@ -717,6 +729,12 @@ public function Chapter_Tab() {
717729
"Border" => "light",
718730
"Theme" => "secondary_theme"
719731
],
732+
"Dark" => [
733+
"Background" => "dark",
734+
"Text" => "dark",
735+
"Border" => "light",
736+
"Theme" => "theme"
737+
],
720738
"Stylized" => [
721739
"Background" => "dark",
722740
"Text" => "light",
@@ -726,9 +744,10 @@ public function Chapter_Tab() {
726744
];
727745

728746
# Select a theme
729-
#$theme = $themes["Story"];
730-
$theme = $themes["Light"];
747+
$theme = $themes["Story"];
748+
#$theme = $themes["Light"];
731749
#$theme = $themes["Light (secondary)"];
750+
$theme = $themes["Dark"];
732751
#$theme = $themes["Stylized"];
733752

734753
$background_and_text_class = $website["Data"]["Style"]["background"]["theme"][$theme["Background"]]." ".$website["Data"]["Style"]["text"]["theme"][$theme["Text"]];

Classes/Text files/Texts.json

+16
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@
143143
"en": "Read story",
144144
"pt": "Ler história"
145145
},
146+
"click_to_open_the_buttons_menu": {
147+
"en": "Click to open the buttons menu",
148+
"pt": "Clique para abrir o menu de botões"
149+
},
150+
"click_to_read_story": {
151+
"en": "Click to read story",
152+
"pt": "Clique para ler a história"
153+
},
146154
"synopsis, title()": {
147155
"en": "Synopsis",
148156
"pt": "Sinopse"
@@ -341,6 +349,14 @@
341349
"en": "on Wikipedia",
342350
"pt": "na Wikipédia"
343351
},
352+
"on, title()": {
353+
"en": "On",
354+
"pt": "No"
355+
},
356+
"the_story_on_other_websites": {
357+
"en": "The story on other websites",
358+
"pt": "A história em outros sites"
359+
},
344360
"variables, title()": {
345361
"en": "Variables",
346362
"pt": "Variáveis"

Index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function Generate_Website() {
146146
$website["Meta title"] = str_replace('"', "'", $website["Data"]["titles"]["language"]);
147147

148148
# Define website link
149-
$website["Data"]["links"]["language"] = $website["Local URL"]["Index"];
149+
$website["Data"]["Links"]["Language"] = $website["Local URL"]["Index"];
150150

151151
# Remove JavaScript stuff
152152
$website["javascript"]["links"] = "";

JSON/Colors.json

+21-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"Black",
88
"Purple",
99
"Dark purple",
10+
"Darker purple",
1011
"Light purple",
1112
"Light purple darker",
1213
"Pink",
@@ -23,13 +24,16 @@
2324
"Light orange",
2425
"Brown",
2526
"Dark brown",
27+
"Darker brown",
2628
"Light brown",
2729
"Yellow",
2830
"Dark yellow",
31+
"Darker yellow",
2932
"Light yellow",
3033
"Yellow sand",
3134
"Green",
3235
"Dark green",
36+
"Darker green",
3337
"Light green",
3438
"Green water",
3539
"Dark green water",
@@ -76,6 +80,10 @@
7680
"Name": "Dark purple",
7781
"Code": "#4a1254"
7882
},
83+
"Darker purple": {
84+
"Name": "Darker purple",
85+
"Code": "#1d0322"
86+
},
7987
"Light purple": {
8088
"Name": "Light purple",
8189
"Code": "#dc96e8"
@@ -125,7 +133,7 @@
125133
"Code": "#ff1200"
126134
},
127135
"Orange": {
128-
"Name": "Yellow",
136+
"Name": "Orange",
129137
"Code": "#ffa500"
130138
},
131139
"Dark orange": {
@@ -144,6 +152,10 @@
144152
"Name": "Dark brown",
145153
"Code": "#402807"
146154
},
155+
"Darker brown": {
156+
"Name": "Darker brown",
157+
"Code": "#221502"
158+
},
147159
"Light brown": {
148160
"Name": "Light brown",
149161
"Code": "#e0a448"
@@ -156,6 +168,10 @@
156168
"Name": "Dark yellow",
157169
"Code": "#c19d15"
158170
},
171+
"Darker yellow": {
172+
"Name": "Darker yellow",
173+
"Code": "#594808"
174+
},
159175
"Light yellow": {
160176
"Name": "Light yellow",
161177
"Code": "#ffc65e"
@@ -172,6 +188,10 @@
172188
"Name": "Dark green",
173189
"Code": "#1C4F1F"
174190
},
191+
"Darker green": {
192+
"Name": "Darker green",
193+
"Code": "#052B08"
194+
},
175195
"Light green": {
176196
"Name": "Light green",
177197
"Code": "#73FF78"

JSON/Websites.json

+18-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"2021",
2828
"2022",
2929
"2023",
30-
"2024"
30+
"2024",
31+
"2025"
3132
],
3233
"pt": [
3334
"Stake2",
@@ -56,7 +57,8 @@
5657
"2021",
5758
"2022",
5859
"2023",
59-
"2024"
60+
"2024",
61+
"2025"
6062
]
6163
},
6264
"Dictionary": {
@@ -221,6 +223,12 @@
221223
"pt": "2024",
222224
"en": "2024"
223225
}
226+
},
227+
"2025": {
228+
"Titles": {
229+
"pt": "2025",
230+
"en": "2025"
231+
}
224232
}
225233
},
226234
"Per type": {
@@ -286,15 +294,20 @@
286294
"2021",
287295
"2022",
288296
"2023",
289-
"2024"
297+
"2024",
298+
"2025"
290299
]
291300
},
292-
"Remove from websites tab": [],
301+
"Remove from websites tab": [
302+
"Rise to Equestria",
303+
"The Life of Izaque in Equestria"
304+
],
293305
"Configuration": {
294306
"Friendship Is Magic": {
295307
"Parent": {
296308
"Title": "My Little Pony"
297309
}
298310
}
299-
}
311+
},
312+
"Settings": []
300313
}

0 commit comments

Comments
 (0)