Skip to content

Commit

Permalink
closes #151. Adds facebook and twitter cards to pages. (#153)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Kaufeld <joe@kenzie.academy>
  • Loading branch information
itsthejoker and Joe Kaufeld committed Jun 15, 2021
1 parent e476b41 commit ed24c9b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions blossom/templates/website/partials/base.partial
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,31 @@
<link rel="stylesheet" href="{% static "css/main.css" %}">
<script defer data-domain="grafeas.org" src="https://plausible.io/js/plausible.js"></script>

{# twitter #}
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="@grafeas">
<meta name="twitter:site" content="@grafeas">
<meta name="twitter:image:src" content="https://grafeas.org/static/images/logo.svg">
<meta name="twitter:image:width" content="280">
<meta name="twitter:image:height" content="150">
<meta name="twitter:image:alt"
content="The logo of the Grafeas Group. It is made of two capital Gs, one upright and the other mirrored and upside-down, and connected by the vertical 'bar' of the two Gs. the letters are centered over the outline of a quill pen.">
{% block socialmediatwitter %}
<meta name="twitter:title"
content="The Grafeas Group - Digital Scribes for Accessibility!">
<meta name="twitter:description"
content="The Grafeas Group is a 501(c)(3) working on increasing accessibility on the internet though crowdsourcing and gamification.">
{% endblock %}

{# facebook #}
<meta property="og:image" content="https://grafeas.org/static/images/logo.svg">
<meta name="og:image:width" content="280">
<meta name="og:image:height" content="150">
{% block socialmediafacebook %}
<meta property="og:title"
content="The Grafeas Group - Digital Scribes for Accessibility!">
{% endblock %}

<title>Grafeas Group, Ltd.</title>
</head>

Expand Down
12 changes: 12 additions & 0 deletions blossom/templates/website/post_detail.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{% extends 'website/partials/base.partial' %}

{% block socialmediatwitter %}
<meta name="twitter:title"
content="Grafeas Group - {{ post.title }}">
<meta name="twitter:description"
content="{{ post.body|safe|truncatechars:200 }}">
{% endblock %}

{% block socialmediafacebook %}
<meta property="og:title"
content="Grafeas Group - {{ post.title }}">
{% endblock %}

{% block content %}
{% if request.user.is_authenticated %}
<a class="btn btn-primary" href="edit/">Edit!</a>
Expand Down

0 comments on commit ed24c9b

Please sign in to comment.