diff --git a/www/data/css/styles.css b/www/data/css/styles.css index ab4dc22..da08a1f 100644 --- a/www/data/css/styles.css +++ b/www/data/css/styles.css @@ -180,6 +180,10 @@ html, body { background: #CCCCCCFF; background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 350, from(#CCC), to(#FFFFFF00)); } +@media (max-width: 850px) { + #footerdiv .footerspan2 { + display: none; + visibility: collapse; } } .bloglistelem_container { display: flex; align-items: center; @@ -476,6 +480,104 @@ html, body { .ev_master .ev_msg { font-size: 15pt; } } +.prgl_parent { + display: flex; + flex-direction: column; } + +.prgl_elem { + display: flex; + flex-direction: row; + text-decoration: none; + background: #BBB; + border: solid 1px #444; + margin: 5px 0; } + .prgl_elem:hover { + background: #999; + box-shadow: 0 0 4px #000000; } + +.prgl_elem_left { + padding: 4px; + display: flex; } + +.prgl_elem_left img { + width: 250px; + height: 100%; + min-height: 100px; } + +.prgl_elem_right { + display: flex; + flex-direction: column; + flex-grow: 1; } + +.prgl_elem_title { + color: #222; + font-size: 40pt; + font-weight: bolder; + flex-grow: 1; + display: flex; + justify-content: center; + align-items: center; } + +.prgl_elem_info { + display: flex; + flex-direction: row; } + +.prgl_elem_subinfo { + flex: 1; + display: flex; + flex-direction: row; } + +.prgl_elem_subinfo_caption { + color: #111; + font-weight: bold; + margin: 0 5px 0 10px; } + +.prgl_elem_subinfo_data { + color: #555; + display: flex; + flex-direction: row; + align-items: center; + height: 100%; } + +.prgl_elem_subinfo_data img { + display: inline; + height: 13pt; + margin: 1px 2px 0 2px; } + +@media (max-width: 1199px) { + .prgl_elem_title { + font-size: 22pt; } + + .prgl_elem_subinfo { + flex-direction: column; } + + .prgl_elem_subinfo_data { + justify-content: center; } + + .prgl_elem_subinfo_caption { + text-align: center; } } +@media (max-width: 850px) { + .prgl_elem { + flex-direction: column; + width: 350px; } + + .prgl_elem_left img { + width: 100%; } + + .prgl_elem_title { + font-size: 24pt; + word-wrap: break-word; + text-align: center; } + + .prgl_elem_left { + justify-content: center; } + + .prgl_elem_info { + flex-direction: column; + margin: 8px 0 8px 8px; } + + .prgl_elem_subinfo { + flex-direction: row; } } .euler_pnl_base { display: inline-flex; flex-direction: column; diff --git a/www/data/css/styles.scss b/www/data/css/styles.scss index 2374668..254a0a7 100644 --- a/www/data/css/styles.scss +++ b/www/data/css/styles.scss @@ -7,6 +7,7 @@ @import 'styles_blogview'; @import 'styles_blogview_befunge'; @import 'styles_errorview'; +@import 'styles_programslist'; @import 'styles_eulerpanel'; @import 'styles_programspanel'; diff --git a/www/data/css/styles_footer.scss b/www/data/css/styles_footer.scss index a1e0b37..68b46a1 100644 --- a/www/data/css/styles_footer.scss +++ b/www/data/css/styles_footer.scss @@ -49,3 +49,7 @@ html, body { background: #CCCCCCFF; background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 350, from($COL_TEXT_NORMAL), to($COL_TRANSPARENT)); } + +@media (max-width: 850px) { + #footerdiv .footerspan2 {display: none; visibility: collapse;} +} diff --git a/www/data/css/styles_programslist.scss b/www/data/css/styles_programslist.scss new file mode 100644 index 0000000..b3b8fc6 --- /dev/null +++ b/www/data/css/styles_programslist.scss @@ -0,0 +1,127 @@ +@import 'styles_config'; + + +.prgl_parent { + display: flex; + flex-direction: column; +} + +.prgl_elem { + display: flex; + flex-direction: row; + text-decoration: none; + + background: #BBB; + border: solid 1px #444; + margin: 5px 0; + + &:hover { + background: #999; + box-shadow: 0 0 4px #000000; + } +} + +.prgl_elem_left { + padding: 4px; + display: flex; +} + +.prgl_elem_left img { + width: 250px; + height: 100%; + min-height: 100px; +} + +.prgl_elem_right { + display: flex; + flex-direction: column; + flex-grow: 1; +} + +.prgl_elem_title { + color: #222; + font-size: 40pt; + font-weight: bolder; + flex-grow: 1; + + display: flex; + justify-content: center; + align-items: center; +} + +.prgl_elem_info { + display:flex; + flex-direction: row; +} + +.prgl_elem_subinfo { + flex: 1; + + display: flex; + flex-direction: row; +} + +.prgl_elem_subinfo_caption { + color: #111; + font-weight: bold; + margin: 0 5px 0 10px; +} + +.prgl_elem_subinfo_data { + color: #555; + + display: flex; + flex-direction: row; + align-items: center; + height: 100%; +} + +.prgl_elem_subinfo_data img { + display: inline; + height: 13pt; + margin: 1px 2px 0 2px; +} + + +@media(max-width:1199px) +{ + .prgl_elem_title { + font-size: 22pt; + } + .prgl_elem_subinfo { + flex-direction: column; + } + .prgl_elem_subinfo_data { + justify-content: center; + } + .prgl_elem_subinfo_caption { + text-align: center; + } +} +@media (max-width: 850px) +{ + .prgl_elem { + flex-direction: column; + width: 350px; + } + .prgl_elem_left img { + width: 100%; + } + .prgl_elem_title { + font-size: 24pt; + word-wrap: break-word; + text-align: center; + } + .prgl_elem_left { + justify-content: center; + } + .prgl_elem_info { + flex-direction: column; + margin: 8px 0 8px 8px; + } + .prgl_elem_subinfo { + flex-direction: row; + } +} + + diff --git a/www/data/images/flags/013-italy.svg b/www/data/images/flags/013-italy.svg new file mode 100644 index 0000000..b1269c5 --- /dev/null +++ b/www/data/images/flags/013-italy.svg @@ -0,0 +1,37 @@ + + + diff --git a/www/data/images/flags/034-china.svg b/www/data/images/flags/034-china.svg new file mode 100644 index 0000000..2ef65e5 --- /dev/null +++ b/www/data/images/flags/034-china.svg @@ -0,0 +1,42 @@ + + + diff --git a/www/data/images/flags/063-japan.svg b/www/data/images/flags/063-japan.svg new file mode 100644 index 0000000..e86a6d7 --- /dev/null +++ b/www/data/images/flags/063-japan.svg @@ -0,0 +1,36 @@ + + + diff --git a/www/data/images/flags/082-united-nations.svg b/www/data/images/flags/082-united-nations.svg new file mode 100644 index 0000000..8ae3efc --- /dev/null +++ b/www/data/images/flags/082-united-nations.svg @@ -0,0 +1,58 @@ + + + diff --git a/www/data/images/flags/094-south-korea.svg b/www/data/images/flags/094-south-korea.svg new file mode 100644 index 0000000..c9e7402 --- /dev/null +++ b/www/data/images/flags/094-south-korea.svg @@ -0,0 +1,57 @@ + + + diff --git a/www/data/images/flags/128-spain.svg b/www/data/images/flags/128-spain.svg new file mode 100644 index 0000000..c657c11 --- /dev/null +++ b/www/data/images/flags/128-spain.svg @@ -0,0 +1,89 @@ + + + diff --git a/www/data/images/flags/143-norway.svg b/www/data/images/flags/143-norway.svg new file mode 100644 index 0000000..9f8a3e1 --- /dev/null +++ b/www/data/images/flags/143-norway.svg @@ -0,0 +1,37 @@ + + + diff --git a/www/data/images/flags/149-czech-republic.svg b/www/data/images/flags/149-czech-republic.svg new file mode 100644 index 0000000..20117a3 --- /dev/null +++ b/www/data/images/flags/149-czech-republic.svg @@ -0,0 +1,37 @@ + + + diff --git a/www/data/images/flags/162-germany.svg b/www/data/images/flags/162-germany.svg new file mode 100644 index 0000000..be7634d --- /dev/null +++ b/www/data/images/flags/162-germany.svg @@ -0,0 +1,37 @@ + + + diff --git a/www/data/images/flags/184-sweden.svg b/www/data/images/flags/184-sweden.svg new file mode 100644 index 0000000..c888df2 --- /dev/null +++ b/www/data/images/flags/184-sweden.svg @@ -0,0 +1,36 @@ + + + diff --git a/www/data/images/flags/195-france.svg b/www/data/images/flags/195-france.svg new file mode 100644 index 0000000..f783824 --- /dev/null +++ b/www/data/images/flags/195-france.svg @@ -0,0 +1,37 @@ + + + diff --git a/www/data/images/flags/205-switzerland.svg b/www/data/images/flags/205-switzerland.svg new file mode 100644 index 0000000..8541193 --- /dev/null +++ b/www/data/images/flags/205-switzerland.svg @@ -0,0 +1,36 @@ + + + diff --git a/www/data/images/flags/216-england.svg b/www/data/images/flags/216-england.svg new file mode 100644 index 0000000..c97f6a4 --- /dev/null +++ b/www/data/images/flags/216-england.svg @@ -0,0 +1,36 @@ + + + diff --git a/www/data/images/flags/226-united-states.svg b/www/data/images/flags/226-united-states.svg new file mode 100644 index 0000000..f855ac3 --- /dev/null +++ b/www/data/images/flags/226-united-states.svg @@ -0,0 +1,88 @@ + + + diff --git a/www/data/images/flags/243-canada.svg b/www/data/images/flags/243-canada.svg new file mode 100644 index 0000000..15d75e5 --- /dev/null +++ b/www/data/images/flags/243-canada.svg @@ -0,0 +1,43 @@ + + + diff --git a/www/data/images/flags/248-russia.svg b/www/data/images/flags/248-russia.svg new file mode 100644 index 0000000..774c201 --- /dev/null +++ b/www/data/images/flags/248-russia.svg @@ -0,0 +1,37 @@ + + + diff --git a/www/data/images/flags/259-european-union.svg b/www/data/images/flags/259-european-union.svg new file mode 100644 index 0000000..5ecdfca --- /dev/null +++ b/www/data/images/flags/259-european-union.svg @@ -0,0 +1,49 @@ + + + diff --git a/www/data/images/flags/260-united-kingdom.svg b/www/data/images/flags/260-united-kingdom.svg new file mode 100644 index 0000000..f9a26fb --- /dev/null +++ b/www/data/images/flags/260-united-kingdom.svg @@ -0,0 +1,43 @@ + + + diff --git a/www/data/images/program_thumbnails/Crystal Grid.png b/www/data/images/program_thumbnails/Crystal Grid.png index 9ab1c09..ba2627e 100644 Binary files a/www/data/images/program_thumbnails/Crystal Grid.png and b/www/data/images/program_thumbnails/Crystal Grid.png differ diff --git a/www/data/images/program_thumbnails/Dynamic Link Fighters.png b/www/data/images/program_thumbnails/Dynamic Link Fighters.png index 3b19ea5..b7d9d3f 100644 Binary files a/www/data/images/program_thumbnails/Dynamic Link Fighters.png and b/www/data/images/program_thumbnails/Dynamic Link Fighters.png differ diff --git a/www/data/images/program_thumbnails/QuickHiddenFolderToggle.png b/www/data/images/program_thumbnails/QuickHiddenFolderToggle.png index 063e837..0a755c4 100644 Binary files a/www/data/images/program_thumbnails/QuickHiddenFolderToggle.png and b/www/data/images/program_thumbnails/QuickHiddenFolderToggle.png differ diff --git a/www/fragments/footer.php b/www/fragments/footer.php index fc578d2..ebb1d2a 100644 --- a/www/fragments/footer.php +++ b/www/fragments/footer.php @@ -1,4 +1,4 @@
\ No newline at end of file diff --git a/www/internals/base.php b/www/internals/base.php index 471b99f..4c8510f 100644 --- a/www/internals/base.php +++ b/www/internals/base.php @@ -115,4 +115,42 @@ function printCSS() { function isProd() { global $CONFIG; return $CONFIG['prod']; +} + +function convertCountryToFlag($country) { + $country = trim(strtolower($country)); + + if ($country === 'italy') return '/data/images/flags/013-italy.svg'; + if ($country === 'china') return '/data/images/flags/034-china.svg'; + if ($country === 'japan') return '/data/images/flags/063-japan.svg'; + if ($country === 'un') return '/data/images/flags/082-united-nations.svg'; + if ($country === 'south korea') return '/data/images/flags/094-south-korea.svg'; + if ($country === 'spain') return '/data/images/flags/128-spain.svg'; + if ($country === 'norway') return '/data/images/flags/143-norway.svg'; + if ($country === 'Czech') return '/data/images/flags/149-czech-republic.svg'; + if ($country === 'germany') return '/data/images/flags/162-germany.svg'; + if ($country === 'sweden') return '/data/images/flags/184-sweden.svg'; + if ($country === 'france') return '/data/images/flags/195-france.svg'; + if ($country === 'switzerland') return '/data/images/flags/205-switzerland.svg'; + if ($country === 'england') return '/data/images/flags/216-england.svg'; + if ($country === 'usa') return '/data/images/flags/226-united-states.svg'; + if ($country === 'america') return '/data/images/flags/226-united-states.svg'; + if ($country === 'canada') return '/data/images/flags/243-canada.svg'; + if ($country === 'russia') return '/data/images/flags/248-russia.svg'; + if ($country === 'eu') return '/data/images/flags/259-european-union.svg'; + if ($country === 'uk') return '/data/images/flags/260-united-kingdom.svg'; + + return null; +} + +function convertLanguageToFlag($lang) { + $lang = trim(strtolower($lang)); + + if ($lang === 'italian') return '/data/images/flags/013-italy.svg'; + if ($lang === 'english') return '/data/images/flags/226-united-states.svg'; + if ($lang === 'french') return '/data/images/flags/195-france.svg'; + if ($lang === 'german') return '/data/images/flags/162-germany.svg'; + if ($lang === 'spanish') return '/data/images/flags/128-spain.svg'; + + return null; } \ No newline at end of file diff --git a/www/internals/programs.php b/www/internals/programs.php index 4ad354e..1e7f208 100644 --- a/www/internals/programs.php +++ b/www/internals/programs.php @@ -18,10 +18,11 @@ class Programs return array_map('self::readSingle', $all); } - public static function listAllNewestFirst() + public static function listAllNewestFirst($filter = '') { $data = self::listAll(); usort($data, function($a, $b) { return strcasecmp($b['add_date'], $a['add_date']); }); + if ($filter !== '') $data = array_filter($data, function($a) use($filter) { return strtolower($a['category']) === strtolower($filter); }); return $data; } diff --git a/www/pages/blog_list.php b/www/pages/blog_list.php index 93e34f4..9e82301 100644 --- a/www/pages/blog_list.php +++ b/www/pages/blog_list.php @@ -12,6 +12,7 @@ $allposts = Blog::listAllOrderedDescending();