diff --git a/controller/Controller.class.php b/controller/Controller.class.php
index d682f145..8b90ed72 100644
--- a/controller/Controller.class.php
+++ b/controller/Controller.class.php
@@ -89,14 +89,14 @@ class Controller
{
return ContentActions::executeRss();
}
- return $slug ? ContentActions::executePost($uri) : ContentActions::executeNews();
+ return $slug ? ContentActions::executeNewsPost($uri) : ContentActions::executeNews();
}
$faqPattern = '#^' . ContentActions::URL_FAQ . '(/|$)#';
if (preg_match($faqPattern, $uri))
{
$slug = preg_replace($faqPattern, '', $uri);
- return $slug ? ContentActions::executePost($uri) : ContentActions::executeFaq();
+ return $slug ? ContentActions::executeFaqPost($uri) : ContentActions::executeFaq();
}
$noSlashUri = ltrim($uri, '/');
diff --git a/controller/action/ContentActions.class.php b/controller/action/ContentActions.class.php
index e29e41bd..c2803eb5 100644
--- a/controller/action/ContentActions.class.php
+++ b/controller/action/ContentActions.class.php
@@ -72,14 +72,14 @@ class ContentActions extends Actions
]];
}
- public static function executePost($relativeUri)
+ public static function executeNewsPost($relativeUri)
{
$post = Post::load(ltrim($relativeUri, '/'));
if (!$post)
{
return ['page/404', []];
}
- return ['content/post', [
+ return ['content/news-post', [
'post' => $post,
View::LAYOUT_PARAMS => [
'showRssLink' => true
@@ -87,6 +87,18 @@ class ContentActions extends Actions
]];
}
+ public static function executeFaqPost($relativeUri)
+ {
+ $post = Post::load(ltrim($relativeUri, '/'));
+ if (!$post)
+ {
+ return ['page/404', []];
+ }
+ return ['content/faq-post', [
+ 'post' => $post,
+ ]];
+ }
+
public static function executePressKit()
{
$zipFileName = 'lbry-press-kit-' . date('Y-m-d') . '.zip';
diff --git a/model/Post.class.php b/model/Post.class.php
index a4e02756..522625a6 100644
--- a/model/Post.class.php
+++ b/model/Post.class.php
@@ -163,16 +163,6 @@ class Post
return $this->date !== null;
}
- public function hasPrevNext()
- {
- return $this->postType == 'news';
- }
-
- public function hasLearnFooter()
- {
- return $this->postType == 'news';
- }
-
public function getAuthorName()
{
switch(strtolower($this->author))
diff --git a/view/template/content/faq-post.php b/view/template/content/faq-post.php
new file mode 100644
index 00000000..60c92785
--- /dev/null
+++ b/view/template/content/faq-post.php
@@ -0,0 +1,17 @@
+getTitle()) ?>
+getImageUrls()) ?>
+
+
+
+
+
+
+
+
getTitle()) ?>
+ getContentHtml() ?>
+
+
+
+
\ No newline at end of file
diff --git a/view/template/content/faq.php b/view/template/content/faq.php
index 745a42b6..78e6e54d 100644
--- a/view/template/content/faq.php
+++ b/view/template/content/faq.php
@@ -1,4 +1,5 @@
+
false]) ?>
diff --git a/view/template/content/post.php b/view/template/content/news-post.php
similarity index 83%
rename from view/template/content/post.php
rename to view/template/content/news-post.php
index 92fdb59c..a0ba3bf8 100644
--- a/view/template/content/post.php
+++ b/view/template/content/news-post.php
@@ -22,14 +22,10 @@
getContentHtml() ?>
- hasPrevNext()): ?>
- $post]) ?>
-
+ $post]) ?>
- hasLearnFooter()): ?>
- false]) ?>
-
+ false]) ?>
hasAuthor()): ?>
$post]) ?>
diff --git a/web/scss/_code.scss b/web/scss/_code.scss
index 4294ffa9..b41c1df2 100644
--- a/web/scss/_code.scss
+++ b/web/scss/_code.scss
@@ -13,6 +13,9 @@ code
}
pre
{
+ > code {
+ padding: 0;
+ }
margin-bottom: $spacing-vertical;
border-left: .3rem solid $color-primary;
padding: 10px 20px;