diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000..35ab5e1 Binary files /dev/null and b/favicon.png differ diff --git a/image/background-acrobatics.jpg b/image/background-acrobatics.jpg new file mode 100644 index 0000000..f9ff12a Binary files /dev/null and b/image/background-acrobatics.jpg differ diff --git a/image/background-archery.jpg b/image/background-archery.jpg new file mode 100644 index 0000000..7c9f8a1 Binary files /dev/null and b/image/background-archery.jpg differ diff --git a/image/background-edged-weapons.jpg b/image/background-edged-weapons.jpg new file mode 100644 index 0000000..bce80ce Binary files /dev/null and b/image/background-edged-weapons.jpg differ diff --git a/image/background-join.jpg b/image/background-join.jpg new file mode 100644 index 0000000..1b840f9 Binary files /dev/null and b/image/background-join.jpg differ diff --git a/image/background-martial-art-for-kids.jpg b/image/background-martial-art-for-kids.jpg new file mode 100644 index 0000000..d7f428a Binary files /dev/null and b/image/background-martial-art-for-kids.jpg differ diff --git a/image/background-martial-art.jpg b/image/background-martial-art.jpg new file mode 100644 index 0000000..f7bdaf0 Binary files /dev/null and b/image/background-martial-art.jpg differ diff --git a/image/background-pakua.jpg b/image/background-pakua.jpg new file mode 100644 index 0000000..394afc3 Binary files /dev/null and b/image/background-pakua.jpg differ diff --git a/image/background-school.jpg b/image/background-school.jpg new file mode 100644 index 0000000..f931d7e Binary files /dev/null and b/image/background-school.jpg differ diff --git a/image/people-alejandro_perez.jpg b/image/people-alejandro_perez.jpg new file mode 100644 index 0000000..c067a98 Binary files /dev/null and b/image/people-alejandro_perez.jpg differ diff --git a/image/people-john_waugh.jpg b/image/people-john_waugh.jpg new file mode 100644 index 0000000..d1026c5 Binary files /dev/null and b/image/people-john_waugh.jpg differ diff --git a/image/people-kasia_bukowska.jpg b/image/people-kasia_bukowska.jpg new file mode 100644 index 0000000..137daf8 Binary files /dev/null and b/image/people-kasia_bukowska.jpg differ diff --git a/image/people-rodolfo_oliva.jpg b/image/people-rodolfo_oliva.jpg new file mode 100644 index 0000000..29bfca0 Binary files /dev/null and b/image/people-rodolfo_oliva.jpg differ diff --git a/image/people-simon_lamb.jpg b/image/people-simon_lamb.jpg new file mode 100644 index 0000000..a8b1c1f Binary files /dev/null and b/image/people-simon_lamb.jpg differ diff --git a/image/people-tom_winch.jpg b/image/people-tom_winch.jpg new file mode 100644 index 0000000..df6ada1 Binary files /dev/null and b/image/people-tom_winch.jpg differ diff --git a/index.php b/index.php index bf73124..2de93f9 100644 --- a/index.php +++ b/index.php @@ -1,29 +1,14 @@ @@ -38,8 +23,11 @@ if (!file_exists($try_html) or !file_exists($try_json)) { '); } +function make_gallery() { + if(file_exists('gallery.html')) { + return True; + } -if(!file_exists('gallery.html')) { $flickr = json_decode(file_get_contents('flickr.json'), TRUE); $flickr['method'] = "flickr.photosets.getPhotos"; $flickr['extras'] = "media,url_m,url_l"; @@ -66,17 +54,24 @@ if(!file_exists('gallery.html')) { } $gs = ' + + + + + '; $t = sprintf( @@ -104,28 +100,81 @@ if(!file_exists('gallery.html')) { file_put_contents('gallery.html', $t); } -$stat = stat($try_html); -$meta = json_decode(file_get_contents($try_json), TRUE); -$meta['author'] = &$org; -$meta['publisher'] = &$org; -$meta['dateModified'] = date("c", $stat['mtime']); -$meta['datePublished'] = date("c", $stat['ctime']); -$meta['copyrightYear'] = date("Y", $stat['mtime']); -$meta['url'] = ('index' == $maybe) ? $site['url'] : sprintf("%s?%s", $site['url'], $maybe); -$meta['@id'] = $meta['url']; -$meta['mainEntityOfPage'] = sprintf("%s#main", $meta['url']); -if (!isset($meta['image']) or empty($meta['image'])) { - $meta['image'] = 'https://static.wixstatic.com/media/80d0c2_39d26f9a66974eadbe85d107a0bb971d~mv2.png'; +class Page { + public $name; + private $html; + private $json; + private $inserts; + + public function __construct($name) { + $this->name = $name; + $this->html = sprintf("page/%s.html", $name); + $this->json = sprintf("page/%s.json", $name); + $this->inserts = array( + 'INSERT_GALLERY_HERE' => 'gallery.html' + ); + } + + public function exists() { + if (file_exists($this->html) && file_exists($this->json)) { + return True; + } + enotfound(); + } + + public function meta() { + global $org; + global $site; + + $stat = stat($self->html); + $meta = json_decode(file_get_contents($self->json), TRUE); + print_r($meta); + $meta['author'] = &$org; + $meta['publisher'] = &$org; + $meta['dateModified'] = date("c", $stat['mtime']); + $meta['datePublished'] = date("c", $stat['ctime']); + $meta['copyrightYear'] = date("Y", $stat['mtime']); + $meta['url'] = ('index' == $maybe) ? $site['url'] : sprintf("%s?%s", $site['url'], $maybe); + $meta['@id'] = $meta['url']; + $meta['mainEntityOfPage'] = sprintf("%s#main", $meta['url']); + if (!isset($meta['image']) or empty($meta['image'])) { + $meta['image'] = $site['image']; + } + return $meta; + } + + public function content(){ + $c = file_get_contents($this->html); + foreach($this->inserts as $insert => $fname ) { + if (file_exists($fname)) { + $c = str_replace($insert, file_get_contents($fname), $c); + } + } + return $c; + } } -$content = file_get_contents($try_html); -$content = str_replace("INSERT_GALLERY_HERE", file_get_contents('gallery.html'), $content); -$meta['text'] = $content; +/* --- */ +if(empty($_GET)) { + $maybe = 'index'; +} +else { + $maybe = array_pop(array_keys($_GET)); +} +$org = json_decode(file_get_contents('org.json'), TRUE); +$site = json_decode(file_get_contents('site.json'), TRUE); $site['author'] = &$org; $site['publisher'] = &$org; $site['url'] = sprintf("%s/", rtrim($site['url'], '/')); +make_gallery(); + +$page = new Page($maybe); +$page->exists(); +$meta = $page->meta(); +$content = $page->content(); $site['mainEntity'] = &$meta; +/* --- */ ?> @@ -155,9 +204,6 @@ $site['mainEntity'] = &$meta; - - - @@ -166,63 +212,29 @@ $site['mainEntity'] = &$meta;
- + @@ -257,60 +269,34 @@ $site['mainEntity'] = &$meta;
- - - - - - - - - - - - - - - - - +
© 2008-2019 by Pa-Kua School UK
- - + diff --git a/page/about-us.html b/page/about-us.html index 6a573ca..81b8d79 100644 --- a/page/about-us.html +++ b/page/about-us.html @@ -16,10 +16,10 @@

Our teachers and class leading instructors

-
    +
    • - +
      Rodolfo Oliva 6th degree black belt Master @@ -30,7 +30,7 @@
    • - +
      Simon Lamb 1st degree black belt instructor @@ -41,7 +41,7 @@
    • - +
      John Waugh Red belt instructor @@ -52,7 +52,7 @@
    • - +
      Tom Winch Red belt instructor @@ -63,7 +63,7 @@
    • - +
      Kasia Bukowska Red belt instructor @@ -74,7 +74,7 @@
    • - +
      Alejandro Perez Blue belt instructor diff --git a/page/contact.html b/page/contact.html index 4fea412..3d8285a 100644 --- a/page/contact.html +++ b/page/contact.html @@ -17,15 +17,28 @@ -

      Do you have questions not listed?
      Message us at any time:

      - +

      Do you have questions not listed?
      Message us at any time!

      +
diff --git a/page/index.html b/page/index.html index bf9ad29..bbd9e71 100644 --- a/page/index.html +++ b/page/index.html @@ -1,5 +1,5 @@

Home

-
+

Join our classes today!

@@ -7,7 +7,7 @@
- +

Martial Art

Learn kicks, punches, and self defence in a non-competitive, inclusive environment

@@ -27,7 +27,7 @@
- +

Acrobatics

Overcome your fears while having fun and building core strength

@@ -47,7 +47,7 @@
- +

Edged Weapons

Learn to handle ancient Chinese weapons: swords, spears, daggers, knives

@@ -64,7 +64,7 @@
- +

Martial Art for Kids

Gain self-confidence, social skills, focus, and control, from DBS certified instructors

@@ -75,7 +75,7 @@
- +

Oriental Archery

Learn to focus, relax, and find the perfect shot

diff --git a/page/the-school.html b/page/the-school.html index 25029a8..e6a658b 100644 --- a/page/the-school.html +++ b/page/the-school.html @@ -2,7 +2,7 @@ Pa-Kua International League
-
+

Pa-Kua is an ancient Chinese knowledge based on the study of changes in nature. It's study and practice feature a variety of ancient concepts such as Yin Yang, Sky Man and Earth, the Five Elements, and the Eight States of Change. diff --git a/style.css b/style.css index 67711ad..f94bd34 100644 --- a/style.css +++ b/style.css @@ -18,6 +18,17 @@ body { background-color: #fff; } +svg { + transform: rotate(0deg); + fill: currentColor; + vertical-align:middle; +} + +body > svg { + display: none; + visibility: hidden; +} + a { color: #ba0000; text-decoration: none; @@ -280,7 +291,7 @@ main ul li { left: 0; top: 0; } -.people { +.grid { list-style-type: none; margin: 0; padding:0; @@ -289,26 +300,27 @@ main ul li { justify-content:center; } -.people img { - width: 8em; +.grid img, +.grid svg { + height: 7em; + width: auto; margin-bottom: 1em; } -.people li { +.grid li { text-align: center; min-width: 12em; padding: 1em 0; margin: 1em; } -.people strong, -.people .rank, -.people .classes { +.grid strong, +.grid span { display: block; } -.people .rank, -.people .classes { +.grid .rank, +.grid .classes { font-size: 0.9em; } @@ -347,6 +359,39 @@ body > header > section > label { display: none; } +/* +.contact { + padding:3em 0; + display: flex; + flex-wrap: wrap; + align-items:baseline; +} + +.contact label { + margin-bottom: 2em; + padding: 0.3em 0; + display: inline-block; + width: 20%; + font-weight: bold; +} + +.contact textarea, +.contact input { + width: 75%; + display: inline-block; + padding: 0.3em; + color: #000; + background-color: #fff; + border:none; + border-bottom: 2px dashed #222; +} + +.contact input[type=url] { + display: none; + visibility: hidden; +} +*/ + .signup { background-color: #111; padding: 2em 0; @@ -355,21 +400,21 @@ body > header > section > label { .signup h2 { text-align: center; - color: rgba(255, 126, 45, 1); } -#mc-embedded-subscribe-form label { +.signup label { font-weight: bold; + display: unset; } -#mc-embedded-subscribe-form > p label { +.signup p label { display: none; } -#mc-embedded-subscribe-form input[type=text], -#mc-embedded-subscribe-form input[type=email] { +.signup input[type=text], +.signup input[type=email] { display: inline-block; - min-width: 20em; + width: 20em; background-color: #111; border: none; border-bottom: 2px solid rgba(255, 126, 45, 1);; @@ -377,22 +422,22 @@ body > header > section > label { color: #ccc; } -#mc-embedded-subscribe-form input[type=email] { +.signup input[type=email] { color: rgba(255, 126, 45, 1); } -#mc-embedded-subscribe-form input[type=checkbox]{ +.signup input[type=checkbox]{ display: inline; width: auto; margin: 0 0.3em 0 1em; } -#mc-embedded-subscribe-form fieldset { +.signup fieldset { display: inline; border: none; } -#mc-embedded-subscribe-form input[type=submit] { +.signup input[type=submit] { background-color: #000; border: 2px solid rgba(255, 126, 45, 1); color: rgba(255, 126, 45, 1); @@ -400,9 +445,10 @@ body > header > section > label { margin: 1em 0; cursor: pointer; transition: 0.5s; + width: auto; } -#mc-embedded-subscribe-form input[type=submit]:hover { +.signup input[type=submit]:hover { border-color: #fff; color: #fff; } @@ -509,7 +555,6 @@ body > header > section > label { } .headline div { - /*! margin: 0.6em; */ padding: 0.6em; text-align: center; } @@ -524,14 +569,21 @@ body > header > section > label { #mc-embedded-subscribe-form { padding: 1em; + display: block; } #mc-embedded-subscribe-form input[type=text], #mc-embedded-subscribe-form input[type=email], #mc-embedded-subscribe-form input[type=submit] { display: block; + width: 80%; margin: 1em auto; } + + #mc-embedded-subscribe-form input[type=submit] { + width: auto; + padding: 1em; + } } details[open] summary { diff --git a/symbols.svg b/symbols.svg new file mode 100644 index 0000000..8c61ce3 --- /dev/null +++ b/symbols.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +