Stupid twitter cards

This commit is contained in:
swagg boi 2023-06-07 15:43:45 -04:00
parent fb0e54fe8a
commit 3abbd3f209
8 changed files with 49 additions and 1 deletions

View file

@ -13,12 +13,22 @@
<%= content 'open_graph' =%> <%= content 'open_graph' =%>
<meta property="og:url" content="<%= url_for->to_abs %>"> <meta property="og:url" content="<%= url_for->to_abs %>">
<meta property="og:site_name" content="Post::Text"> <meta property="og:site_name" content="Post::Text">
<meta property="og:image" content="<%= url_for('/images/logo.png')->to_abs %>"> <meta property="og:image"
content="<%= url_for('/images/logo.png')->to_abs %>">
<meta property="og:image:type" content="image/png"> <meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200"> <meta property="og:image:width" content="1200">
<meta property="og:image:height" content="1200"> <meta property="og:image:height" content="1200">
<meta property="og:image:alt" <meta property="og:image:alt"
content="Post::Text logo; a small nerdy anime girl giving a V sign"> content="Post::Text logo; a small nerdy anime girl giving a V sign">
<%= content 'twitter_card' =%>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@swaggboi@eattherich.club">
<meta name="twitter:site"
content="@posttext@fedi.seriousbusiness.international">
<meta name="twitter:image"
content="<%= url_for('/images/logo.png')->to_abs %>">
<meta name="twitter:image:alt"
content="Post::Text logo; a small nerdy anime girl giving a V sign">
<%= asset 'app.css' %> <%= asset 'app.css' %>
</head> </head>
<body> <body>

View file

@ -8,6 +8,13 @@
content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules." content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules."
> >
% end % end
% content_for twitter_card => begin
<meta name="twitter:title" content="<%= title %>">
<meta
name="twitter:description"
content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules."
>
% end
<h2 class="page-title"><%= title %></h2> <h2 class="page-title"><%= title %></h2>
<main class="page-body"> <main class="page-body">
<p>Post::Text is a <p>Post::Text is a

View file

@ -8,6 +8,13 @@
content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules." content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules."
> >
% end % end
% content_for twitter_card => begin
<meta name="twitter:title" content="<%= title %>">
<meta
name="twitter:description"
content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules."
>
% end
<h2 class="page-title"><%= title %></h2> <h2 class="page-title"><%= title %></h2>
<main class="page-body"> <main class="page-body">
<p>The rules here are pretty simple:</p> <p>The rules here are pretty simple:</p>

View file

@ -9,6 +9,12 @@
<meta property="og:description" <meta property="og:description"
content="<%= truncate_text $remark->{'body'} %>"> content="<%= truncate_text $remark->{'body'} %>">
<% end %> <% end %>
<% content_for twitter_card => begin %>
<meta name="twitter:title"
content="Thread #<%= $remark->{'thread_id'} %>, <%= title %>">
<meta name="twitter:description"
content="<%= truncate_text $remark->{'body'} %>">
<% end %>
<main class="pager"> <main class="pager">
<article class="post"> <article class="post">
<h4 class="post__title"> <h4 class="post__title">

View file

@ -8,6 +8,11 @@
<meta property="og:description" <meta property="og:description"
content="Remark on thread #<%= $thread->{'id'} %>."> content="Remark on thread #<%= $thread->{'id'} %>.">
<% end %> <% end %>
<% content_for twitter_card => begin %>
<meta name="twitter:title" content="<%= title %>">
<meta name="twitter:description"
content="Remark on thread #<%= $thread->{'id'} %>.">
<% end %>
<form method="post" class="form-body"> <form method="post" class="form-body">
<div class="form-field"> <div class="form-field">
<% if (my $error = validation->error('author')) { =%> <% if (my $error = validation->error('author')) { =%>

View file

@ -8,6 +8,11 @@
<meta property="og:description" <meta property="og:description"
content="<%= truncate_text $thread->{'body'} %>"> content="<%= truncate_text $thread->{'body'} %>">
<% end %> <% end %>
<% content_for twitter_card => begin %>
<meta name="twitter:title" content="<%= $thread->{'title'} %>">
<meta name="twitter:description"
content="<%= truncate_text $thread->{'body'} %>">
<% end %>
<main class="pager"> <main class="pager">
<article class="post"> <article class="post">
<h3 class="post__title"> <h3 class="post__title">

View file

@ -5,6 +5,10 @@
<meta property="og:title" content="<%= title %>"> <meta property="og:title" content="<%= title %>">
<meta property="og:description" content="In UTF-8 we trust. 🫡"> <meta property="og:description" content="In UTF-8 we trust. 🫡">
% end % end
% content_for twitter_card => begin
<meta name="twitter:title" content="<%= title %>">
<meta name="twitter:description" content="In UTF-8 we trust. 🫡">
% end
<h2 class="page-title"><%= title %></h2> <h2 class="page-title"><%= title %></h2>
<% if (scalar @{$threads}) { =%> <% if (scalar @{$threads}) { =%>
<main class="pager"> <main class="pager">

View file

@ -5,6 +5,10 @@
<meta property="og:title" content="<%= title %>"> <meta property="og:title" content="<%= title %>">
<meta property="og:description" content="Start a new thread."> <meta property="og:description" content="Start a new thread.">
% end % end
% content_for twitter_card => begin
<meta name="twitter:title" content="<%= title %>">
<meta name="twitter:description" content="Start a new thread.">
% end
<h2 class="page-title"><%= title %></h2> <h2 class="page-title"><%= title %></h2>
<form method="post" class="form-body"> <form method="post" class="form-body">
<div class="form-field"> <div class="form-field">