Skip to content

Commit

Permalink
Update spaze/phpinfo to add dark mode to phpinfo() (#294)
Browse files Browse the repository at this point in the history
The dark mode in `phpinfo()` is implemented via `@media (prefers-color-scheme: dark)` which this site uses only until you manually select dark/light mode, so it may eventually lead to a dark mode phpinfo in a light mode site, but I think I don't mind.

 - spaze/phpinfo updated from v1.1.0 to v1.1.1 patch
   See changes: spaze/phpinfo@v1.1.0...v1.1.1
   Release notes: https://github.com/spaze/phpinfo/releases/tag/v1.1.1
  • Loading branch information
spaze authored Mar 24, 2024
2 parents 6b3ef6b + 21dc946 commit 39a4946
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 33 deletions.
12 changes: 6 additions & 6 deletions site/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions site/vendor/composer/installed.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions site/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'spaze/michalspacek.cz',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'cf663e5b00eb190e2918792e62e03d67fdc32402',
'reference' => '6b3ef6bf44351cbf37f5ca18f3c42f85534eb3e0',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -474,7 +474,7 @@
'spaze/michalspacek.cz' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'cf663e5b00eb190e2918792e62e03d67fdc32402',
'reference' => '6b3ef6bf44351cbf37f5ca18f3c42f85534eb3e0',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -508,9 +508,9 @@
'dev_requirement' => true,
),
'spaze/phpinfo' => array(
'pretty_version' => 'v1.1.0',
'version' => '1.1.0.0',
'reference' => '5e8137dc67da697fab6463b94931805ff2a182db',
'pretty_version' => 'v1.1.1',
'version' => '1.1.1.0',
'reference' => 'a8db03663903c942f46ad6b395e31c7752620455',
'type' => 'library',
'install_path' => __DIR__ . '/../spaze/phpinfo',
'aliases' => array(),
Expand Down
55 changes: 40 additions & 15 deletions site/vendor/spaze/phpinfo/src/assets/info.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#phpinfo {
color: #222;
font-family: sans-serif;
margin: 1em auto;
text-align: center;
}
#phpinfo pre {
margin: 0;
font-family: monospace;
}
#phpinfo a:link {
color: #009;
Expand All @@ -14,57 +16,80 @@
border-collapse: collapse;
white-space: normal;
border: 0;
width: 800px;
box-shadow: 1px 2px 3px #CCC;
width: 934px;
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
margin: 1em auto;
}
#phpinfo .center { text-align: center; }
#phpinfo .center table {
margin: 1em auto;
text-align: left;
}
#phpinfo th { text-align: center !important; }
#phpinfo td, th {
#phpinfo .center th { text-align: center !important; }
#phpinfo td, #phpinfo th {
border: 1px solid #666;
font-size: 75%;
vertical-align: baseline;
padding: 4px 5px;
}
#phpinfo th {
position: sticky;
top: 0;
background: inherit;
}
#phpinfo h1 {
color: #000;
text-shadow: none;
color: #222;
text-align: center;
margin: 0.5em auto;
font-size: 150%;
}
#phpinfo h2, #phpinfo h2 a {
color: #000;
text-shadow: none;
#phpinfo h2 {
color: #222;
font-size: 125%;
text-align: center;
}
#phpinfo h2 a:link, #phpinfo h2 a:visited {
color: inherit;
background: inherit;
}
#phpinfo .p { text-align: left; }
#phpinfo .e {
background-color: #CCF;
background-color: #ccf;
width: 300px;
font-weight: bold;
}
#phpinfo .h {
background-color: #99C;
background-color: #99c;
font-weight: bold;
}
#phpinfo .v {
background-color: #DDD;
max-width: 200px;
max-width: 300px;
overflow-x: auto;
word-wrap: break-word;
}
#phpinfo .v i { color: #999; }
#phpinfo img {
float: right;
border: 0;
}
#phpinfo hr {
width: 800px;
width: 934px;
background-color: #CCC;
border: 0;
height: 1px;
margin: auto;
}
@media (prefers-color-scheme: dark) {
#phpinfo { color: #E2E4EF; }
#phpinfo h1, #phpinfo h2 { color: #E2E4EF; }
#phpinfo .h td, #phpinfo td.e, #phpinfo th { border-color: #606A90; }
#phpinfo td { border-color: #505153; }
#phpinfo .e { background-color: #404A77; }
#phpinfo .h { background-color: #4F5B93; }
#phpinfo .v { background-color: #333; }
#phpinfo hr { background-color: #505153; }
}
#phpinfo .color-FF8000 { color: #FF8000; }
#phpinfo .color-0000BB { color: #0000BB; }
#phpinfo .color-000000 { color: #000000; }
Expand Down

0 comments on commit 39a4946

Please sign in to comment.