diff --git a/www/data/styles.css b/www/data/styles.css index 13f4698..56c19b7 100644 --- a/www/data/styles.css +++ b/www/data/styles.css @@ -1,10 +1,16 @@ body { margin: 0; - background-color: #222; + background-color: #EEE; color: #CCC; } +#content { + padding-top: 64px; + display: flex; + justify-content: center; +} + .headerdiv { background-color: #333; display: flex; @@ -37,23 +43,29 @@ body { justify-content: center; align-items: center; - background-color: #111; + background-color: #222; color: #CCC; - border: 1px solid #CCC; + border-left: 1px solid #000; + border-right: 1px solid #000; font-weight: bold; - margin: 5px 10px; + margin: 0px 0px 0px 20px; padding: 2px 5px; min-width: 64px; - vertical-align: center; text-align: center; flex: initial; } +.tab:hover { + cursor: pointer; + background-color: #555; +} + .tab_github { background-color: #4078c0; - border: 1px solid #111; + border-left: 1px solid #111; + border-right: 1px solid #111; color: black; } @@ -61,17 +73,12 @@ body { flex: auto; } -.tab:hover { - cursor: pointer; - background-color: #333; -} - .tab_github:hover { background-color: #c9510c; color: black; } -@media (max-width: 800px) { +@media (max-width: 850px) { .headerdiv { position: static; @@ -91,7 +98,98 @@ body { flex-direction: column; } + .tab { + border: 1px solid #000; + font-weight: bold; + + margin: 5px 10px; + } + + #content { + padding-top: 0px; + } } - \ No newline at end of file +/*############################################################################*/ + +.euler_pnl_base { + display: inline-flex; + flex-direction: column; + + border: 1px solid #AAA; + border-radius: 5px 5px 0 0; + margin: 15px; +} + +.euler_pnl_header { + display: flex; + align-items: center; + justify-content: center; + + color: #222; + font-weight: bold; + padding: 4px; + background: #AAA; + + font-size: large; +} + +.euler_pnl_content { + display: flex; + flex-direction: column; + + background: #DDD; + + padding: 6px; +} + +.euler_pnl_row { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} + +@media (max-width: 850px) { .euler_pnl_row { flex-direction: column; } } + +.euler_pnl_row2 { + display: flex; + flex-direction: row; +} + +.euler_pnl_cell { + width: 24px; + height: 24px; + font-size: 11px; + + margin: 3px; + + border: 1px solid #333; + + display: flex; + align-items: center; + justify-content: center; +} + +.euler_pnl_cell a { + color: black; + text-decoration: none; +} + +.euler_pnl_cell a:hover { + color: black; + text-decoration: none; +} + +.euler_pnl_cell a:visited { + color: black; + text-decoration: none; +} + +.euler_pnl_celltime_perfect { background: #98C398; } +.euler_pnl_celltime_good { background: #B9D89B; } +.euler_pnl_celltime_ok { background: #D8D898; } +.euler_pnl_celltime_bad { background: #D8B298; } +.euler_pnl_celltime_fail { background: #D89D9D; } +.euler_pnl_cell_notexist { background: #CCCCCC; } + diff --git a/www/fragments/euler.php b/www/fragments/euler.php new file mode 100644 index 0000000..d366ca4 --- /dev/null +++ b/www/fragments/euler.php @@ -0,0 +1,81 @@ + +query('SELECT * FROM ms4_eulerproblem', PDO::FETCH_ASSOC); + +?> + +
+ +
+ Project Euler with Befunge-93 +
+
+ + \n"; + echo "
\n"; + for ($i = 1; $i <= $max; $i++) + { + $cssclass = ''; + if (key_exists($i, $arr)) + { + $cssclass = $arr[$i]['timelevel']; + } + else + { + $cssclass = 'euler_pnl_cell_notexist'; + } + + echo "
"; + echo ""; + echo "$i"; + echo ""; + echo "
\n"; + + if (($i)%20 == 0) + { + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + } + else if (($i)%10 == 0) + { + echo "
\n"; + echo "
\n"; + } + } + echo "
\n"; + echo "
\n"; + + + ?> +
+ + \ No newline at end of file diff --git a/www/internals/.gitignore b/www/internals/.gitignore new file mode 100644 index 0000000..4e9b47a --- /dev/null +++ b/www/internals/.gitignore @@ -0,0 +1 @@ +config.php \ No newline at end of file diff --git a/www/internals/backend.php b/www/internals/backend.php new file mode 100644 index 0000000..9b99f6a --- /dev/null +++ b/www/internals/backend.php @@ -0,0 +1,12 @@ + PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::ATTR_EMULATE_PREPARES => false, +]; + +$PDO = new PDO($dsn, $CONFIG['user'], $CONFIG['password'], $opt); \ No newline at end of file diff --git a/www/pages/main.php b/www/pages/main.php index eef8c04..e1a9e1d 100644 --- a/www/pages/main.php +++ b/www/pages/main.php @@ -1,5 +1,6 @@ + Mikescher.com @@ -11,7 +12,9 @@ -
+
+ +