1
0
mirror of https://github.com/restoreddev/phpapprentice.git synced 2025-08-18 04:21:15 +02:00

Created initial site setup with hugo

This commit is contained in:
Andrew Davis
2019-07-12 19:21:18 -05:00
parent 77a0d2616b
commit e09557cf2c
80 changed files with 732 additions and 10488 deletions

7
layouts/404.html Normal file
View File

@@ -0,0 +1,7 @@
<div class="container center">
<a href="/" class="logo-404"><?= icon('elephant') ?></a>
<p class="message-404">Whoops! The page could not be found.</p>
<div class="toc-404">
<?php partial('table_of_contents') ?>
</div>
</div>

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}An online book for learning PHP{{ end }}" />
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ $css := resources.Get "site.css" }}
{{ $style := $css | resources.PostCSS }}
<link rel="stylesheet" type="text/css" href="{{ $style.Permalink }}">
<link rel="icon" href="/favicon-32.png">
{{ $prism := resources.Get "prism.js" }}
{{ $site := resources.Get "site.js"}}
{{ $js := slice $prism $site | resources.Concat "bundle.js" }}
<script src="{{ $js.Permalink }}"></script>
</head>
<body>
{{ block "main" . }}{{ end }}
</body>
</html>

View File

@@ -0,0 +1,34 @@
{{ define "main" }}
<div class="container small center">
<div>
<div class="home-title-wrapper">
<div class="home-logo">{{ readFile "static/elephant.svg" | safeHTML }}</div>
<h1 class="home-title">PHP Apprentice</h1>
<h3 class="home-subtitle">An online book for learning PHP</h3>
</div>
<p>
PHP Apprentice is an online, open source book about the PHP programming language. PHP is one of the most popular platforms for building websites and web services. It is a great language that is easy to learn and allows you to build powerful and complex web applications very quickly.
</p>
<p>
The goal of PHP Apprentice is to be an easy to understand resource for learning how to write good code in PHP. There are a lot of PHP tutorials on the internet that use outdated practices or insecure code. I want this book to show how to write PHP code with quality.
</p>
<p>
The contents of PHP Apprentice are for beginners and experienced PHP developers. The book currently has content for learning the basics of the language. In the future, more pages will be added for more advanced topics like building websites, database integration and security.
</p>
<p>
PHP Apprentice is currently a work in progress. If you would like to give feedback or request a certain discussion topic, check out the <a href="https://github.com/restoreddev/phpapprentice" target="_blank">GitHub repository</a>.
</p>
<div class="home-buttons">
<a href="/basics.html" class="button">
<div class="icon">{{ readFile "static/book-reference.svg" | safeHTML }}</div>
Open First Chapter
</a>
{{ partial "menu_button.html" . }}
</div>
<hr />
<p>Created and managed by <a href="https://twitter.com/restoreddev" target="_blank">Andrew Davis @restoreddev</a>
</div>
</div>
{{ partial "menu_modal.html" . }}
{{ end }}

View File

View File

@@ -0,0 +1,26 @@
{{ define "main" }}
<div class="container small center">
{{ partial "menu_button.html" . }}
<h1>{{ .Title }}</h1>
<h3 class="subtitle">{{ .Description }}</h3>
{{ .Content }}
<div class="clearfix"></div>
<div class="navigate-links">
{{ if .Params.previous }}
<a href="/{{ .Params.previous }}" title="Previous" id="prev-link">
<div class="icon">{{ readFile "static/cheveron-outline-left.svg" | safeHTML }}</div>
Previous
</a>
{{ end }}
{{ if .Params.next }}
<a href="/{{ .Params.next }}" title="Next" id="next-link">
Next
<div class="icon">{{ readFile "static/cheveron-outline-right.svg" | safeHTML }}</div>
</a>
{{ end }}
</div>
</div>
{{ partial "menu_modal.html" . }}
{{ end }}

View File

@@ -0,0 +1,6 @@
<div class="menu">
<button class="menu-button" title="Open Menu">
<div class="icon">{{ readFile "static/show-sidebar.svg" | safeHTML }}</div>
Table of Contents
</button>
</div>

View File

@@ -0,0 +1,8 @@
<div class="modal closed">
<div class="modal-content">
<button class="modal-button right" title="Close">
<div class="icon">{{ readFile "static/close-outline.svg" | safeHTML }}</div>
</button>
{{ partial "table_of_contents.html" . }}
</div>
</div>

View File

@@ -0,0 +1,38 @@
<div class="table-of-contents">
<h4>Table of Contents</h4>
<ul class="list-plain">
<li><a href="/">Preface</a></li>
<li><a href="/installing-php.html">Installing PHP</a></li>
</ul>
<h5 class="section-title">Basics</h5>
<ol>
<li><a href="/basics.html">Basics</a></li>
<li><a href="/variables.html">Variables</a></li>
<li><a href="/arithmetic.html">Arithmetic</a></li>
<li><a href="/strings.html">Strings</a></li>
<li><a href="/comparisons.html">Comparisons</a></li>
<li><a href="/boolean-logic.html">Boolean Logic</a></li>
<li><a href="/conditionals.html">Conditionals</a></li>
<li><a href="/loops.html">Loops</a></li>
<li><a href="/arrays.html">Arrays</a></li>
<li><a href="/functions.html">Functions</a></li>
<li><a href="/classes.html">Classes</a></li>
<li><a href="/classes-inheritance.html">Classes: Inheritance</a></li>
<li><a href="/classes-visibility.html">Classes: Visibility</a></li>
<li><a href="/classes-constructor.html">Classes: Constructor</a></li>
<li><a href="/static.html">Static</a></li>
<li><a href="/interfaces.html">Interfaces</a></li>
<li><a href="/abstract.html">Abstract Classes</a></li>
<li><a href="/exceptions.html">Exceptions</a></li>
</ol>
<h5 class="section-title">Web</h5>
<ol>
<li><a href="/web/http.html">HTTP</a></li>
<li><a href="/web/http-post.html">HTTP POST</a></li>
<li><a href="/web/http-server.html">PHP HTTP Server</a></li>
</ol>
<a href="/credits.html">Credits</a>
</div>