Skip to content

Commit d8af525

Browse files
committed
Update layout
1 parent e00746f commit d8af525

File tree

3 files changed

+103
-65
lines changed

3 files changed

+103
-65
lines changed

downloads-get-instructions.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,31 @@
2525
<p>
2626
On the OSX command line shell, enter:
2727
</p>
28-
<div class="example"><div class="example-contents screen"><pre>
28+
<div class="phpcode"><pre>
2929
brew install php{$version}
30-
</pre></div></div>
30+
</pre></div>
3131
<p>
3232
To enable PHP in Apache add the following to httpd.conf and restart Apache:
3333
</p>
34-
<div class="example"><div class="example-contents screen"><pre>
34+
<div class="phpcode"><pre>
3535
LoadModule php_module \$HOMEBREW_PREFIX/opt/php/lib/httpd/modules/libphp.so
3636
3737
&lt;FilesMatch \.php$>
3838
SetHandler application/x-httpd-php
3939
&lt;/FilesMatch>
40-
</pre></div></div>
40+
</pre></div>
4141
<p>
4242
Finally, check DirectoryIndex includes index.php
4343
</p>
44-
<div class="example"><div class="example-contents screen"><pre>
44+
<div class="phpcode"><pre>
4545
DirectoryIndex index.php index.html
46-
</pre></div></div>
46+
</pre></div>
4747
<p>
4848
The php.ini and php-fpm.ini file can be found in:
4949
</p>
50-
<div class="example"><div class="example-contents screen"><pre>
50+
<div class="phpcode"><pre>
5151
\$HOMEBREW_PREFIX/etc/php/{$versionDir}/
52-
</pre></div></div>
52+
</pre></div>
5353
</p>
5454
ENDOSX;
5555
return;
@@ -62,10 +62,10 @@
6262
<p>
6363
On the command line shell, enter:
6464
</p>
65-
<div class="example"><div class="example-contents screen"><pre>
65+
<div class="phpcode"><pre>
6666
sudo apt-get update
6767
sudo apt-get install php
68-
</pre></div></div>
68+
</pre></div>
6969
ENDAPT;
7070
} else {
7171
$version = match($_GET['version']) {
@@ -79,12 +79,12 @@
7979
<p>
8080
On the command line shell, enter:
8181
</p>
82-
<div class="example"><div class="example-contents screen"><pre>
82+
<div class="phpcode"><pre>
8383
sudo apt -y install software-properties-common
8484
sudo add-apt-repository ppa:ondrej/php
8585
sudo apt update
8686
sudo apt install php{$version}
87-
</pre></div></div>
87+
</pre></div>
8888
ENDAPT;
8989
}
9090
return;

downloads.php

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -56,65 +56,68 @@ function option(string $id, string $value, string $desc)
5656
?>
5757
<h1>Downloads &amp; Installation Instructions</h1>
5858

59-
<form>
60-
Get PHP for
61-
<select id="os" name="os">
62-
<?= option('os', 'linux', 'Linux'); ?>
63-
<?= option('os', 'osx', 'OSX'); ?>
64-
<?= option('os', 'windows', 'Windows'); ?>
65-
</select>
66-
67-
<select id="osvariant" name="osvariant">
68-
<?= option('osvariant', 'linux-deb-buster', 'Debian Buster'); ?>
69-
<?= option('osvariant', 'linux-deb-bullseye', 'Debian Bullseye'); ?>
70-
<?= option('osvariant', 'linux-deb-bookworm', 'Debian Bookworm'); ?>
71-
<?= option('osvariant', 'linux-rpm-fedora41', 'Fedora 41'); ?>
72-
<?= option('osvariant', 'linux-rpm-fedora42', 'Fedora 42'); ?>
73-
<?= option('osvariant', 'linux-rpm-redhat', 'RedHat'); ?>
74-
<?= option('osvariant', 'osx-latest', 'Latest'); ?>
75-
<?= option('osvariant', 'windows-wsl', 'with WSL'); ?>
76-
<?= option('osvariant', 'windows-normal', 'without WSL'); ?>
77-
</select>
78-
79-
to work on
80-
<select id="usage" name="usage">
81-
<?= option('usage', 'web', 'Web Development'); ?>
82-
<?= option('usage', 'cli', 'Command Line Libraries'); ?>
83-
<?= option('usage', 'fw-drupal', 'Drupal'); ?>
84-
<?= option('usage', 'fw-laravel', 'Laravel'); ?>
85-
<?= option('usage', 'fw-symfony', 'Symfony'); ?>
86-
</select>
87-
88-
with
89-
<select id="version" name="version">
90-
<?= option('version', 'php84', 'version 8.4'); ?>
91-
<?= option('version', 'php83', 'version 8.3'); ?>
92-
<?= option('version', 'php82', 'version 8.2'); ?>
93-
<?= option('version', 'php81', 'version 8.1'); ?>
94-
<?= option('version', 'default', 'OS default version'); ?>
95-
</select>
96-
97-
<input type='submit' value="Go!"></input>
98-
99-
<br/>
100-
101-
I want to have multiple versions at the same time:
102-
<input type="checkbox" id="multiversion" name="multiversion" label="I want to have multiple versions at the same time">
103-
</input>
59+
<form class="instructions-form">
60+
<div class="instructions-row">
61+
I want to use PHP for
62+
<select id="usage" name="usage">
63+
<?= option('usage', 'web', 'Web Development'); ?>
64+
<?= option('usage', 'cli', 'Command Line Libraries'); ?>
65+
<?= option('usage', 'fw-drupal', 'Drupal'); ?>
66+
<?= option('usage', 'fw-laravel', 'Laravel'); ?>
67+
<?= option('usage', 'fw-symfony', 'Symfony'); ?>
68+
</select>.
69+
</div>
70+
71+
<div class="instructions-row">
72+
I work with
73+
<select id="os" name="os">
74+
<?= option('os', 'linux', 'Linux'); ?>
75+
<?= option('os', 'osx', 'OSX'); ?>
76+
<?= option('os', 'windows', 'Windows'); ?>
77+
</select>
78+
<select id="osvariant" name="osvariant">
79+
<?= option('osvariant', 'linux-deb-buster', 'Debian Buster'); ?>
80+
<?= option('osvariant', 'linux-deb-bullseye', 'Debian Bullseye'); ?>
81+
<?= option('osvariant', 'linux-deb-bookworm', 'Debian Bookworm'); ?>
82+
<?= option('osvariant', 'linux-rpm-fedora41', 'Fedora 41'); ?>
83+
<?= option('osvariant', 'linux-rpm-fedora42', 'Fedora 42'); ?>
84+
<?= option('osvariant', 'linux-rpm-redhat', 'RedHat'); ?>
85+
<?= option('osvariant', 'osx-latest', 'Latest'); ?>
86+
<?= option('osvariant', 'windows-wsl', 'with WSL'); ?>
87+
<?= option('osvariant', 'windows-normal', 'without WSL'); ?>
88+
</select>,
89+
and use
90+
<select id="version" name="version">
91+
<?= option('version', 'php84', 'version 8.4'); ?>
92+
<?= option('version', 'php83', 'version 8.3'); ?>
93+
<?= option('version', 'php82', 'version 8.2'); ?>
94+
<?= option('version', 'php81', 'version 8.1'); ?>
95+
<?= option('version', 'default', 'OS default version'); ?>
96+
</select>
97+
</div>
98+
99+
<label for="multiversion" class="instructions-label">
100+
I want to be able to use multiple PHP versions:
101+
<input type="checkbox" id="multiversion" name="multiversion" value="Y"
102+
<?= array_key_exists('multiversion', $_GET) && $_GET['multiversion'] === 'Y' ? 'checked' : '' ?>/>
103+
</label>
104+
105+
<label for="source" class="instructions-label">
106+
I want to compile everything from source:
107+
<input type="checkbox" id="source" name="source" value="Y"
108+
<?= array_key_exists('source', $_GET) && $_GET['source'] === 'Y' ? 'checked' : '' ?>/>
109+
</label>
110+
111+
<div>
112+
<button type="submit" class="button">Get Instructions</button>
113+
</div>
104114
</form>
105115

106116
<h2>Instructions</h2>
107-
<div id="instructions">
117+
<div id="instructions" class="instructions">
108118
<?php include 'downloads-get-instructions.php'; ?>
109119
</div>
110120

111-
<!--
112-
<p>
113-
<a href="/manual/install.general.php">Installing PHP</a> is covered
114-
thoroughly in the PHP documentation.
115-
</p>
116-
-->
117-
118121
<h2>Binaries</h2>
119122

120123
<p>

styles/theme-base.css

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,41 @@ div.classsynopsisinfo_comment {
508508
margin-top:1.5rem;
509509
}
510510

511+
.phpcode {
512+
background-color: #FFF;
513+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
514+
border-radius: 0 0 2px 2px;
515+
overflow-x: auto;
516+
display: flex;
517+
align-items: center;
518+
width: 100%;
519+
height: 100%;
520+
padding: 0 1.5rem;
521+
box-sizing: border-box;
522+
margin: 0;
523+
}
524+
525+
.instructions {
526+
margin-bottom: 2rem;
527+
}
528+
529+
.instructions p {
530+
margin: 1rem 0;
531+
}
532+
533+
.instructions-form {
534+
display: flex;
535+
flex-direction: column;
536+
gap: .75rem;
537+
margin-bottom: 2rem;
538+
}
539+
540+
.instructions-label {
541+
display: flex;
542+
align-items: center;
543+
gap: 8px;
544+
}
545+
511546
.warn {
512547
padding: .75rem 1rem;
513548
margin: 1.5rem 0 1.5rem 1.5rem;

0 commit comments

Comments
 (0)