{$content}
{$teamMemberMarkup}
@@ -300,24 +322,163 @@ class Subtemplate {
return $result;
}
public function content($subtemplate,$subtemplateTitle) {
- $result = '';
- $result .= get_sub_field('content');
+ $content = get_sub_field('content');
+
+ $result = "
+
+
{$subtemplateTitle}
+
{$content}
+
+ ";
+
+ return $result;
+ }
+ public function image($subtemplate,$subtemplateTitle) {
+
+ $image = get_sub_field('image')['url'];
+ $imageAlt = get_sub_field('image')['alt'];
+
+ $result = "
+
+
{$subtemplateTitle}
+
+
+ ";
return $result;
}
public function faq($subtemplate,$subtemplateTitle) {
- $result = '';
+ $featuredFAQ = '
';
+ if (have_rows('featured_faqs')) {
+ while (have_rows('featured_faqs')) {
+ the_row();
+
+ $question = get_sub_field('question');
+ $answer = get_sub_field('answer');
+
+ $featuredFAQ .= "- {$question}
+ - {$answer}
";
+ }
+ }
+ $featuredFAQ .= "
";
+
+ $regularFAQ = '
';
+ if (have_rows('regular_faqs')) {
+ while (have_rows('regular_faqs')) {
+ the_row();
+
+ $question = get_sub_field('question');
+ $answer = get_sub_field('answer');
+
+ $regularFAQ .= "- Q: {$question}
+ - A: {$answer}
";
+ }
+ }
+ $regularFAQ .= "
";
+
+ $result = "
+
+
{$subtemplateTitle}
+ {$featuredFAQ}
+ {$regularFAQ}
+
+ ";
+
+ return $result;
+ }
+ public function values($subtemplate,$subtemplateTitle) {
+ $values = '';
+ if (have_rows('ascribe_values')) {
+ while (have_rows('ascribe_values')) {
+ the_row();
+
+ $title = get_sub_field('value_title');
+ $description = get_sub_field('value_description');
+
+ $values .= "
+ {$title}
+ {$description}
+ ";
+ }
+ }
+
+ $result = "
";
return $result;
}
public function careers($subtemplate,$subtemplateTitle) {
- $result = '';
+ $args = array(
+ 'post_type' => 'career',
+ 'order' => 'ASC'
+ );
+
+ $careers = get_posts($args);
+ $careerMarkup = '';
+ if (!empty($careers)) {
+ foreach ($careers as $career) {
+ $id = $career->ID;
+ $name = $career->post_title;
+ $url = get_permalink($id);
+
+ $careerMarkup .= "
{$name}";
+ }
+ }
+
+ $result = "
+
+
{$subtemplateTitle}
+
+
+ ";
return $result;
}
public function mediaDetail($subtemplate,$subtemplateTitle) {
- $result = '';
+ $args = array(
+ 'post_type' => 'presscoverage',
+ 'order' => 'ASC'
+ );
+
+ $pressItems = get_posts($args);
+ $pressMarkup = '';
+ if (!empty($pressItems)) {
+ foreach ($pressItems as $item) {
+ $id = $item->ID;
+ $name = $item->post_title;
+ $url = get_field('link_to_article',$id);
+ $pubDate= get_field('date_published',$id);
+ $quote = get_field('quote',$id);
+
+ $pressMarkup .= "
+
+
+ {$quote}
+ ";
+ }
+ }
+
+ $result = "
+
+
{$subtemplateTitle}
+
{$pressMarkup}
+
+ ";
+
+ return $result;
+ }
+ public function download($subtemplate,$subtemplateTitle) {
+ $leftUrl = get_sub_field('left_button_url');
+ $leftText = get_sub_field('left_button_text');
+ $rightUrl = get_sub_field('right_button_url');
+ $rightText = get_sub_field('right_button_text');
+
+ $result = "
";
return $result;
}
diff --git a/header.php b/header.php
index fa303d7..688d3c2 100644
--- a/header.php
+++ b/header.php
@@ -8,6 +8,10 @@
require 'controller/header.php';
$controller = new Controller();
+if (!isset($headColour)) {
+ $headColour = '';
+}
+
?>
@@ -59,11 +63,11 @@ $controller = new Controller();
-
-
-
+
+
+
->
+ >
diff --git a/images/svg/ascribe-chevron.svg b/images/svg/ascribe-chevron.svg
new file mode 100644
index 0000000..90f8324
--- /dev/null
+++ b/images/svg/ascribe-chevron.svg
@@ -0,0 +1,93 @@
+
+
+
+
diff --git a/index.php b/index.php
index 6fefc9f..0cc0df5 100644
--- a/index.php
+++ b/index.php
@@ -5,14 +5,4 @@
* @package ascribe
* @since 0.1.0
*/
-
-get_header(); ?>
-
-
-
-
-
-
-
-
-)">