Metatag fixes, front end description work
This commit is contained in:
parent
d09f49ed24
commit
2907e95d6b
13 changed files with 48 additions and 15 deletions
File diff suppressed because one or more lines are too long
|
|
@ -37,6 +37,16 @@
|
|||
text-decoration-color: colors.$computerBorder;
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-top: 1rem;
|
||||
padding-left: 1rem;
|
||||
border-left: 5px solid colors.$computerBorder;
|
||||
|
||||
p {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ final class BrainPageController extends AbstractController
|
|||
|
||||
$page->setTitle($data->getTitle());
|
||||
$page->setText($data->getText());
|
||||
$page->setDescription($data->getDescription());
|
||||
$page->setUrl($data->getUrl());
|
||||
|
||||
if ($data->isPublished()) {
|
||||
|
|
@ -73,6 +74,7 @@ final class BrainPageController extends AbstractController
|
|||
$data = $form->getData();
|
||||
|
||||
$page->setTitle($data->getTitle());
|
||||
$page->setDescription($data->getDescription());
|
||||
$page->setText($data->getText());
|
||||
$page->setUrl($data->getUrl());
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ final class BrainPhotosController extends AbstractController
|
|||
|
||||
$photos->setTitle($data->getTitle());
|
||||
$photos->setDate($data->getDate());
|
||||
$photos->setDescription($data->getDescription());
|
||||
$photos->setText($data->getText());
|
||||
$photos->setUrl($data->getUrl());
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ final class BrainPostController extends AbstractController
|
|||
|
||||
$post->setTitle($data->getTitle());
|
||||
$post->setDate($data->getDate());
|
||||
$post->setDescription($data->getDescription());
|
||||
$post->setText($data->getText());
|
||||
$post->setUrl($data->getUrl());
|
||||
|
||||
|
|
@ -102,6 +103,7 @@ final class BrainPostController extends AbstractController
|
|||
|
||||
$post->setTitle($data->getTitle());
|
||||
$post->setDate($data->getDate());
|
||||
$post->setDescription($data->getDescription());
|
||||
$post->setText($data->getText());
|
||||
$post->setUrl($data->getUrl());
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ final class PhotosController extends AbstractController
|
|||
'description' => $photos->getDescription(),
|
||||
'date' => $photos->getDate(),
|
||||
'thumbnail' => '/files/uploads/photos/' . strtolower(str_replace(' ', '_', $photos->getTitle())) . '/' . $photos->getThumbnail(),
|
||||
'url' => $photos->getUrl(),
|
||||
];
|
||||
|
||||
foreach ($uploads as $index => $upload) {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ final class PostController extends AbstractController
|
|||
'title' => $post->getTitle(),
|
||||
'category' => $post->getCategory()->getTitle(),
|
||||
'urlSafeCategory' => $post->getCategory()->getUrlSafeTitle(),
|
||||
'description' => $post->getDescription(),
|
||||
'date' => $post->getDate(),
|
||||
'url' => $post->getUrl()
|
||||
];
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@
|
|||
<meta name="description" content="{% block metadescription %}{% endblock %}" />
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://alexdaniels.me" />
|
||||
<meta property="og:url" content="{% block ogurl %}{% endblock %}" />
|
||||
<meta property="og:title" content="{% block ogtitle %}{% endblock %}" />
|
||||
<meta property="og:description" content="{% block ogdescription %}{% endblock %}" />
|
||||
<meta property="og:image" content="{% block ogimage %}{% endblock %}" />
|
||||
|
||||
<!-- X (Twitter) -->
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:url" content="https://alexdaniels.me" />
|
||||
<meta property="twitter:url" content="{% block twitterurl %}{% endblock %}" />
|
||||
<meta property="twitter:title" content="{% block twittertitle %}{% endblock %}" />
|
||||
<meta property="twitter:description" content="{% block twitterdescription %}{% endblock %}" />
|
||||
<meta property="twitter:image" content="{% block twitterimage %}{% endblock %}" />
|
||||
|
|
|
|||
|
|
@ -5,9 +5,12 @@
|
|||
{% block metatitle %}{{page.title}} | Alex Daniels {% endblock %}
|
||||
{% block ogtitle %}{{page.title}} | Alex Daniels {% endblock %}
|
||||
{% block twittertitle %}{{page.title}} | Alex Daniels{% endblock %}
|
||||
{% block metadescription %}{{page.description }} {% endblock %}
|
||||
{% block ogdescription %}{{page.description }} {% endblock %}
|
||||
{% block twitterdescription %}{{page.description }} {% endblock %}
|
||||
{% block metadescription %}{{page.description|striptags }} {% endblock %}
|
||||
{% block ogdescription %}{{page.description|striptags }} {% endblock %}
|
||||
{% block twitterdescription %}{{page.description|striptags }} {% endblock %}
|
||||
|
||||
{% block ogurl %}https://alexdaniels.me/{{page.url}}{% endblock %}
|
||||
{% block twitterurl %}https://alexdaniels.me/{{page.url}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section class="page">
|
||||
|
|
|
|||
|
|
@ -5,12 +5,15 @@
|
|||
{% block metatitle %}{{photos['title']}} | Alex Daniels {% endblock %}
|
||||
{% block ogtitle %}{{photos['title']}} | Alex Daniels {% endblock %}
|
||||
{% block twittertitle %}{{photos['title']}} | Alex Daniels{% endblock %}
|
||||
{% block metadescription %}{{photos['description']}} {% endblock %}
|
||||
{% block ogdescription %}{{photos['description']}} {% endblock %}
|
||||
{% block twitterdescription %}{{photos['description'] }} {% endblock %}
|
||||
{% block metadescription %}{{photos['description']|striptags}} {% endblock %}
|
||||
{% block ogdescription %}{{photos['description']|striptags}} {% endblock %}
|
||||
{% block twitterdescription %}{{photos['description']|striptags }} {% endblock %}
|
||||
{% block ogimage %}{{ photos['thumbnail']}}{% endblock %}
|
||||
{% block twitterimage %}{{ photos['thumbnail']}}{% endblock %}
|
||||
|
||||
{% block ogurl %}https://alexdaniels.me/photos/{{photos['url']}}{% endblock %}
|
||||
{% block twitterurl %}https://alexdaniels.me/photos/{{photos['url']}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<article id="album">
|
||||
<h2 class="title">{{photos['title']}}</h2>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
{# {% block ogimage %}{{ photos['thumbnail']}}{% endblock %}
|
||||
{% block twitterimage %}{{ photos['thumbnail']}}{% endblock %} #}
|
||||
|
||||
{% block ogurl %}https://alexdaniels.me/photos{% endblock %}
|
||||
{% block twitterurl %}https://alexdaniels.me/words{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Photography</h2>
|
||||
<div class="photos">
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@
|
|||
|
||||
{% block metatitle %}{{post.title}} - Writing | Alex Daniels {% endblock %}
|
||||
{% block twittertitle %}{{post.title}} - Writing | Alex Daniels{% endblock %}
|
||||
{% block metadescription %}{{post.description }} {% endblock %}
|
||||
{% block ogdescription %}{{post.description }} {% endblock %}
|
||||
{% block twitterdescription %}{{post.description }} {% endblock %}
|
||||
{% block metadescription %}{{post.description|striptags }} {% endblock %}
|
||||
{% block ogdescription %}{{post.description|striptags}} {% endblock %}
|
||||
{% block twitterdescription %}{{post.description|striptags }} {% endblock %}
|
||||
|
||||
{% block ogurl %}https://alexdaniels.me/words/{{post.url}}{% endblock %}
|
||||
{% block twitterurl %}https://alexdaniels.me/words/{{post.url}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<article class="post">
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
{% block ogdescription %}A truly random smattering of thoughts and feelings. Things may not always be relevant, but they will always be irreverant.{% endblock %}
|
||||
{% block twitterdescription %}A truly random smattering of thoughts and feelings. Things may not always be relevant, but they will always be irreverant.{% endblock %}
|
||||
|
||||
{% block ogurl %}https://alexdaniels.me/words{% endblock %}
|
||||
{% block twitterurl %}https://alexdaniels.me/words{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section class="posts">
|
||||
<h2>Writing</h2>
|
||||
|
|
@ -19,9 +22,10 @@
|
|||
{% for post in posts %}
|
||||
<li>
|
||||
<article class="post">
|
||||
<a href="/categories/{{post['urlSafeCategory']}}" class="category">{{post['category']}}</a>
|
||||
<a href="/words/{{post['url']}}"><h4 class="title">{{post['title']}}</h4></a>
|
||||
<time class="published">{{post['date']|date('l M d Y')}}</time>
|
||||
<a href="/categories/{{post['urlSafeCategory']}}" class="category">{{ post['category'] }}</a>
|
||||
<a href="/words/{{post['url']}}"><h4 class="title">{{post['title'] }}</h4></a>
|
||||
<time class="published">{{post['date']|date('l M d Y') }}</time>
|
||||
<div class="description">{{ post['description']|raw }}</div>
|
||||
</article>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue