Skip to content

Commit 70d02a2

Browse files
authored
Merge pull request #189 from Mdwiki-TD/update_new
Update new
2 parents deb3229 + 2c5fb2b commit 70d02a2

File tree

9 files changed

+102
-23
lines changed

9 files changed

+102
-23
lines changed

src/backend/api_calls/mdwiki_sql.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ public function __construct($server_name, $db_suffix = 'mdwiki')
3434
$db_suffix = 'mdwiki';
3535
}
3636
// ---
37-
$this->home_dir = getenv("HOME");
38-
//---
39-
if (substr(__DIR__, 0, 2) == 'I:') {
40-
$this->home_dir = 'I:/mdwiki/mdwiki';
41-
}
37+
$this->home_dir = getenv("HOME") ?: 'I:/mdwiki/mdwiki';
4238
//---
4339
$this->db_suffix = $db_suffix;
4440
$this->set_db($server_name);
@@ -51,7 +47,7 @@ private function set_db($server_name)
5147
// ---
5248
$ts_mycnf = parse_ini_file($this->home_dir . "/confs/db.ini");
5349
// ---
54-
if ($server_name === 'localhost' || !getenv('HOME')) {
50+
if ($server_name === 'localhost') {
5551
$this->host = 'localhost:3306';
5652
$this->dbname = $ts_mycnf['user'] . "__" . $this->db_suffix;
5753
$this->user = 'root';

src/backend/include_first/tables_dir.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
function open_td_Tables_file($path, $echo = true)
1919
{
20-
$tables_dir = getenv("HOME") . '/public_html/td/Tables';
20+
// $tables_dir = getenv("HOME") . '/public_html/td/Tables';
21+
// if (substr(__DIR__, 0, 2) == 'I:') $tables_dir = 'I:/mdwiki/mdwiki/public_html/td/Tables';
2122
//---
22-
if (substr(__DIR__, 0, 2) == 'I:') {
23-
$tables_dir = 'I:/mdwiki/mdwiki/public_html/td/Tables';
24-
}
23+
$home_dir = getenv("HOME") ?: 'I:/mdwiki/mdwiki';
24+
$tables_dir = $home_dir . '/public_html/td/Tables';
2525
//---
2626
$file_path = "$tables_dir/$path";
2727
//---

src/backend/results/getcats.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,12 @@ function make_options(): array
388388
$debug = false;
389389
}
390390

391-
$tablesDir = getenv("HOME") . '/public_html/td/Tables';
392-
393-
if (substr(__DIR__, 0, 2) == 'I:') {
394-
$tablesDir = 'I:/mdwiki/mdwiki/public_html/td/Tables';
395-
}
391+
// ---
392+
// $tablesDir = getenv("HOME") . '/public_html/td/Tables';
393+
// if (substr(__DIR__, 0, 2) == 'I:') $tablesDir = 'I:/mdwiki/mdwiki/public_html/td/Tables';
394+
// ---
395+
$home_dir = getenv("HOME") ?: 'I:/mdwiki/mdwiki';
396+
$tablesDir = $home_dir . '/public_html/td/Tables';
396397

397398
$options = [
398399
'nocache' => $nocache,

src/css/dashboard_new1.css

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
/* padding: 0px !important; */
33
}
44

5+
.med-logo {
6+
height: 40px;
7+
max-height: 40px;
8+
/* Adjust as needed */
9+
width: auto;
10+
/* Maintain aspect ratio */
11+
}
12+
513
#collapsibleNavbar>ul>li {
614
/* padding-top: 0.5rem !important; */
715
/* padding-bottom: 0.5rem !important; */
@@ -112,9 +120,16 @@ thead {
112120
.mainindex {
113121
margin-right: 20px;
114122
margin-left: 20px;
123+
display: grid;
124+
grid-template-columns: 2fr 1fr;
125+
grid-template-rows: auto 1fr;
126+
gap: 2vw;
127+
flex-grow: 1;
128+
align-items: center;
129+
align-content: center;
115130
}
116131

117-
.medlogo {
132+
.med-logo-big {
118133
width: 180px;
119134
height: auto;
120135
}
@@ -144,7 +159,7 @@ thead {
144159
margin-left: 5px;
145160
}
146161

147-
.medlogo {
162+
.med-logo-big {
148163
width: 100px;
149164
height: auto;
150165
float: right;

src/favicon.svg

Lines changed: 44 additions & 0 deletions
Loading

src/head.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function head()
123123
<head>
124124
<meta charset="UTF-8">
125125
<meta name="robots" content="noindex">
126+
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
126127
<meta http-equiv="X-UA-Compatible" content="IE=edge">
127128
<meta name="viewport" content="width=device-width, initial-scale=1">
128129
<meta name="color-scheme" content="light dark">

src/header.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,34 @@ function is_active($url)
7676
}
7777
//---
7878
?>
79+
<svg xmlns="http://www.w3.org/2000/svg" style="display:none;">
80+
<symbol id="logo-xtools" viewBox="0 0 742 319">
81+
<g transform="translate(-84.236328,-656.44221)">
82+
<path
83+
d="m 254.95894,666.44732 c -1.22563,0.03 -2.44088,0.19665 -3.65039,0.43164 l 0.002,-0.004 c -1.61269,0.31328 -3.21586,0.74739 -4.81641,1.13867 -12.96358,3.16909 -23.6542,16.17806 -21.76757,29.9043 -0.27136,11.43572 0.12315,23.17366 -1.83008,34.48633 l -37.27149,70.74804 15.39649,25.99805 39.09765,-70.11328 c 6.07192,-7.5895 16.12788,-10.32734 24.51368,-14.6543 5.67827,-2.76279 11.91691,-4.59726 17.2539,-7.92383 8.97616,-8.78805 13.84599,-22.18169 12.36524,-34.66406 -0.2496,-2.99365 -3.31641,-1.38867 -3.31641,-1.38867 l -16.21289,12.0918 -16.13281,-8.42188 -5.01367,-12.29687 c 0,0 3.29754,-5.02106 5.08984,-5.77539 l 16.24023,-10.32032 c -2.24779,-7.14441 -12.23974,-8.85657 -18.71679,-9.21875 -0.41101,-0.023 -0.82192,-0.0276 -1.23047,-0.0176 z"
84+
fill="#069" />
85+
<path d="m 94.236328,965.38563 33.000002,0 53.50195,-102.38672 -14.72452,-25.01026 z" fill="#900" />
86+
<path d="m 168.67566,782.38636 -33.375,-63 -34.50001,0 105.75001,179.625 36,66.375 34.5,0 z" fill="#396" />
87+
<g fill="#484848">
88+
<path d="m 333.38392,817.30635 46.8,0 0,-19.92 -114.48,0 0,19.92 46.8,0 0,148.08 20.88,0 0,-148.08 z" />
89+
<path
90+
d="m 442.66517,965.38635 c 32.88,0 54.24,-24 54.24,-64.32 0,-40.56 -21.36,-64.08 -54.24,-64.08 -32.88,0 -54.24,24 -54.24,64.32 0,40.56 21.36,64.08 54.24,64.08 z m 0,-19.44 c -20.88,0 -33.12,-16.8 -33.12,-44.64 0,-28.56 12.24,-45.12 33.12,-45.12 20.88,0 33.12,17.04 33.12,44.88 0,28.08 -12.48,44.88 -33.12,44.88 z" />
91+
<path
92+
d="m 579.91767,965.38635 c 32.88,0 54.24,-24 54.24,-64.32 0,-40.56 -21.36,-64.08 -54.24,-64.08 -32.88,0 -54.24,24 -54.24,64.32 0,40.56 21.36,64.08 54.24,64.08 z m 0,-19.44 c -20.88,0 -33.12,-16.8 -33.12,-44.64 0,-28.56 12.24,-45.12 33.12,-45.12 20.88,0 33.12,17.04 33.12,44.88 0,28.08 -12.48,44.88 -33.12,44.88 z" />
93+
<path d="m 671.33017,962.50635 20.88,0 0,-173.28 -20.88,9.84 0,163.44 z" />
94+
<path
95+
d="m 772.37268,965.38635 c 26.64,0 43.68,-12.72 43.68,-34.8 0,-23.28 -17.52,-32.88 -39.84,-40.8 -13.68,-5.52 -25.92,-10.08 -25.92,-20.4 0,-8.64 7.92,-13.68 20.4,-13.68 13.2,0 21.84,6.24 27.12,11.76 l 14.4,-12 c -8.88,-10.56 -22.56,-18.48 -41.28,-18.48 -23.52,0 -41.28,12.24 -41.28,32.4 0,20.16 15.36,30 37.92,38.4 14.4,5.52 28.08,11.04 28.08,23.28 0,10.8 -9.84,15.6 -22.8,15.6 -13.2,0 -23.76,-7.92 -30,-14.64 l -14.88,12.72 c 9.6,12.24 26.4,20.64 44.4,20.64 z" />
96+
</g>
97+
</g>
98+
</symbol>
99+
</svg>
79100

80101
<body>
81102
<header class="mb-3 border-bottom">
82103
<nav class="navbar navbar-expand-lg bg-body-tertiary shadow" id="mainnav">
83104
<div class="container-fluid" id="navbardiv">
84105
<a class="navbar-brand mb-0 h1" href="index.php" style="color:#0d6efd;">
106+
<img class='med-logo' width="40px" height="40px" src='/favicon.svg' decoding='async' alt='Wiki Project Med Foundation logo'>
85107
<span class='d-none d-sm-inline tool_title' title=''>WikiProjectMed Translation Dashboard</span>
86108
<span class='d-inline d-sm-none tool_title'>WikiProjectMed TD</span>
87109
</a>

0 commit comments

Comments
 (0)