From 25f5fb35806a4297c6f435431c59a2aefe0a227c Mon Sep 17 00:00:00 2001 From: jimmaclean <33517841+jimmaclean@users.noreply.github.com> Date: Mon, 2 Mar 2020 11:28:31 +0000 Subject: [PATCH 01/16] Update styles.css - line up with nav items left edge with rest of the content - Good practice to define media queries and styles 'mobile first' - Remove underline hover on current link - display `block` things are not `list-item` so have no bullet/counter - borders are best defined in px, to avoid extremely thin lines on high dpi devices (not essential) --- css/styles.css | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/css/styles.css b/css/styles.css index bcfcff8..0bc453f 100644 --- a/css/styles.css +++ b/css/styles.css @@ -4,31 +4,30 @@ justify-content: center; flex-flow: column wrap; align-content: stretch; - max-height: 13em; } -@media (max-width: 1000px) { +@media (min-width: 1000px) { #pages ul { - max-height: none; + max-height: 13em; } } #pages ul li { - margin: 0.2em 1em; + margin: 0.2em 1em 0.2em 0; min-width: 20em; - display: block; + list-style: none; flex: 1 1 0; - border-bottom: 0.1em rgba(0,0,0,0) solid; - padding-bottom: 0.1em; + border-bottom: 1px transparent solid; + padding-bottom: 1px; } #pages ul li.current { - list-style: disc; - border-bottom-color: black; + border-bottom-color: inherit; } #pages ul li.current a { color: inherit; + text-decoration: none; } body > div { From 21ffda32dfe02a120d050721aaea1050b3b96910 Mon Sep 17 00:00:00 2001 From: jimmaclean <33517841+jimmaclean@users.noreply.github.com> Date: Mon, 2 Mar 2020 15:15:18 +0000 Subject: [PATCH 02/16] zoom level on on mobile This is needed for the page to be as wide as the viewport instead of trying to scale the page down to fit the viewport. --- templates/layout.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/layout.html.twig b/templates/layout.html.twig index a462989..75f1ea3 100644 --- a/templates/layout.html.twig +++ b/templates/layout.html.twig @@ -3,6 +3,8 @@ + + {{ title }} | A Moderately Short PHP Tutorial @@ -79,4 +81,4 @@ - \ No newline at end of file + From 3dc9037051fd7afb99f503d28e284d8d2fb1cbec Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Sat, 7 Mar 2020 11:33:44 +0000 Subject: [PATCH 03/16] Grammar fix --- content/01-introduction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/01-introduction.md b/content/01-introduction.md index fd334af..b739026 100644 --- a/content/01-introduction.md +++ b/content/01-introduction.md @@ -9,7 +9,7 @@ This is for anyone who wants to learn to program in PHP. You should probably already know at least one programming language with curly braces, if conditions, variables, functions and loops. The most likely scenario is that you are a Javascript or Typescript developer, working on a team that uses a combination of PHP and JS or TS, and while you might not currently need deep PHP knowledge, -you want 'T-shaped skills', involving basic PHP knowledge. There will be some comparisons between with Javascript and +you want 'T-shaped skills', involving basic PHP knowledge. There will be some comparisons with Javascript and Typescript. ### Why did I write it? @@ -27,4 +27,4 @@ PHP is an old language that has evolved organically over the years. There are ma and many parts of the language that are best avoided in new code. This tutorial will concentrate on recommended ways to use PHP, and ignore most of the things that PHP allows you to do but you probably shouldn't. -{% endblock %} \ No newline at end of file +{% endblock %} From ec187a4c647664d7468a77d4451f8bdd136d3345 Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Wed, 11 Mar 2020 20:33:22 +0000 Subject: [PATCH 04/16] Small copy fixes --- content/08-classes-2.md | 2 +- content/10-testing.md | 2 +- content/11-databases.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/08-classes-2.md b/content/08-classes-2.md index 7889672..de66acb 100644 --- a/content/08-classes-2.md +++ b/content/08-classes-2.md @@ -13,7 +13,7 @@ By convention, and to follow the [PSR-1](https://www.php-fig.org/psr/psr-1/) cod point in a separate file to the class declaration. Let's write a simple script to create a planet and print out its details. Since at the moment Planet is just a data -holder the script won't be too exiting. +holder the script won't be too exciting. Write the following in a file called start.php diff --git a/content/10-testing.md b/content/10-testing.md index 321aa66..d2e4fec 100644 --- a/content/10-testing.md +++ b/content/10-testing.md @@ -45,7 +45,7 @@ won't install that unless we edit composer json. Composer works best with depend Composer has also created a new file for us, `composer.lock`. This has metadata about the exact versions of the packages installed. At the time of writing it shows me that PHPUnit is at version 9.0.1, and I can see the details of 29 other packages that have been installed because PHPUnit depends on them directly or indirectly. The `composer show` command -will output the list of installed packages in a much more consice format. +will output the list of installed packages in a much more concise format. ### Writing a test diff --git a/content/11-databases.md b/content/11-databases.md index 8438fb5..5e9009d 100644 --- a/content/11-databases.md +++ b/content/11-databases.md @@ -41,7 +41,7 @@ Once you've found the package name, e.g. `php7.4-sqlite3` install it with a comm ### Mac -If you installed PHP via homebrew, I think will automatically have come with SQLite built in and enabled. +If you installed PHP via homebrew, I think it will automatically have come with SQLite built in and enabled. ### Windows From bf285efbd2a7e3246e371bcb73890c3965030236 Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Sun, 21 Jun 2020 15:07:51 +0100 Subject: [PATCH 05/16] Fix capitilsation --- content/14-what-next.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/14-what-next.md b/content/14-what-next.md index 693de04..5993044 100644 --- a/content/14-what-next.md +++ b/content/14-what-next.md @@ -47,7 +47,7 @@ to install a library or tool. * [Subscribe](https://info.jetbrains.com/PHP-Annotated-Subscription.html) to [PHP Annotated Monthly](https://blog.jetbrains.com/phpstorm/category/php-annotated-monthly/) from the makers of -[PhpStorm](https://www.jetbrains.com/phpstorm/), for interesting links every Month. +[PhpStorm](https://www.jetbrains.com/phpstorm/), for interesting links every month. * And finally, read [Accelerate: The Science of Lean Software and DevOps: Building and Scaling High Performing Technology Organizations](https://itrevolution.com/book/accelerate/), by [Nicole Forsgren](https://twitter.com/nicolefv), @@ -59,4 +59,4 @@ the most important book for anyone making software in an organisation to read. organisations need to develop and maintain to perform well with software. You can also read about those capabilities in the briefer and slightly more up-to date form of the [2019 Accelerate State of DevOps Report](https://cloud.google.com/devops/state-of-devops/). -{% endblock %} \ No newline at end of file +{% endblock %} From dab3cf529930f9a2f76b45040c4f71af163fac20 Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Sun, 28 Jun 2020 12:24:05 +0100 Subject: [PATCH 06/16] Fix instructions for checking if PHP is installed - not -- --- content/02-getting-php.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/02-getting-php.md b/content/02-getting-php.md index 705d78d..ad8ddfa 100644 --- a/content/02-getting-php.md +++ b/content/02-getting-php.md @@ -7,7 +7,7 @@ online at [3v4l](https://3v4l.org/), but to work through this tutorial you shoul ### Installation -First check if you already have PHP installed. Open your command-line prompt, and type `php --v`. If you have PHP, you +First check if you already have PHP installed. Open your command-line prompt, and type `php -v`. If you have PHP, you should see something like: ``` @@ -44,4 +44,4 @@ package bundles PHP along with the Apache web server, MariaDB database server, a for Linux and Macintosh. Run `php -v` again. Hopefully you will now have version **7.2 or later**. -{% endblock %} \ No newline at end of file +{% endblock %} From 5e4cd9c917c64600d547e5ee3758c1752d222e3f Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Sat, 8 Aug 2020 21:30:26 +0100 Subject: [PATCH 07/16] Add link to from footer to my twitter stream --- templates/layout.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layout.html.twig b/templates/layout.html.twig index 75f1ea3..3809c04 100644 --- a/templates/layout.html.twig +++ b/templates/layout.html.twig @@ -70,7 +70,7 @@