Skip to content

Commit

Permalink
Merge pull request #46 from thefirstspine/next
Browse files Browse the repository at this point in the history
Release 2.5.0
  • Loading branch information
thefirstspine authored Apr 15, 2021
2 parents 34c3a14 + cec4f5b commit 7979244
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 22 deletions.
27 changes: 27 additions & 0 deletions api/controllers/AboutController.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ module.exports = {
'pages/about.ejs',
{
...await sails.helpers.layoutConfig(req.user_id),
tags: [
{
type: 'property',
name: 'og:url',
value: 'https://www.thefirstspine.fr' + req.url,
},
{
type: 'property',
name: 'og:type',
value: 'website',
},
{
type: 'property',
name: 'og:title',
value: 'The First Spine - ' + req.i18n.__('navigation.about'),
},
{
type: 'property',
name: 'og:description',
value: req.i18n.__("about.howWePlayText1") + req.i18n.__("about.howWePlayText2") + req.i18n.__("about.howWePlayText3"),
},
{
type: 'property',
name: 'og:image',
value: 'https://www.thefirstspine.fr' + '/images/og-characters2.jpg',
},
],
}
);
}
Expand Down
27 changes: 27 additions & 0 deletions api/controllers/AdventuresController.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ module.exports = {
'pages/drifter-s-tales.ejs',
{
...await sails.helpers.layoutConfig(req.user_id),
tags: [
{
type: 'property',
name: 'og:url',
value: 'https://www.thefirstspine.fr' + req.url,
},
{
type: 'property',
name: 'og:type',
value: 'website',
},
{
type: 'property',
name: 'og:title',
value: 'The First Spine - ' + req.i18n.__('navigation.driftersTales'),
},
{
type: 'property',
name: 'og:description',
value: 'Les Contes du Vagabond est un jeu à paraître début 2022 sur PC.',
},
{
type: 'property',
name: 'og:image',
value: 'https://www.thefirstspine.fr' + '/images/og-characters2.jpg',
},
],
}
);
}
Expand Down
31 changes: 27 additions & 4 deletions api/controllers/ArenaController.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,33 @@ module.exports = {
{
...await sails.helpers.layoutConfig(req.user_id),
title: "arena.playOnline",
/*
browserVersion: await sails.helpers.getWebAppVersion('play'),
mobileVersion: await sails.helpers.getWebAppVersion('play.m'),
*/
tags: [
{
type: 'property',
name: 'og:url',
value: 'https://www.thefirstspine.fr' + req.url,
},
{
type: 'property',
name: 'og:type',
value: 'website',
},
{
type: 'property',
name: 'og:title',
value: 'The First Spine - ' + req.i18n.__('navigation.arena'),
},
{
type: 'property',
name: 'og:description',
value: req.i18n.__("arena.introduction"),
},
{
type: 'property',
name: 'og:image',
value: 'https://www.thefirstspine.fr' + '/images/og-cards2.jpg',
},
],
}
);
}
Expand Down
54 changes: 54 additions & 0 deletions api/controllers/BlogController.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ module.exports = {
'pages/blog.ejs',
{
...await sails.helpers.layoutConfig(req.user_id),
tags: [
{
type: 'property',
name: 'og:url',
value: 'https://www.thefirstspine.fr' + req.url,
},
{
type: 'property',
name: 'og:type',
value: 'website',
},
{
type: 'property',
name: 'og:title',
value: 'The First Spine - ' + req.i18n.__('navigation.news'),
},
{
type: 'property',
name: 'og:description',
value: req.i18n.__("navigation.news"),
},
{
type: 'property',
name: 'og:image',
value: 'https://www.thefirstspine.fr' + '/images/og-characters2.jpg',
},
],
title: "news.title",
news: await sails.models.news.find({
sort: 'createdAt DESC',
Expand All @@ -34,6 +61,33 @@ module.exports = {
'pages/article.ejs',
{
...await sails.helpers.layoutConfig(req.user_id),
tags: [
{
type: 'property',
name: 'og:url',
value: 'https://www.thefirstspine.fr' + req.url,
},
{
type: 'property',
name: 'og:type',
value: 'article',
},
{
type: 'property',
name: 'og:title',
value: 'The First Spine - ' + article.title,
},
{
type: 'property',
name: 'og:description',
value: (article.text.replace(/(<([^>]+)>)/ig,' ').slice(0, 120).split(' ').slice(0, -1).join(' ')) + '...',
},
{
type: 'property',
name: 'og:image',
value: 'https://www.thefirstspine.fr' + '/images/' + article.image,
},
],
title: article.title,
article,
}
Expand Down
43 changes: 27 additions & 16 deletions api/controllers/HomepageController.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,39 @@ module.exports = {
'volkha',
'insanes-echo',
'fire',
/*
These cards are digital-only.
TODO: Think about to add them
'curse-of-mara',
'eternity-gift',
'hunter-souvenir',
'conjurer-souvenir',
'summoner-souvenir',
'sorcerer-souvenir',
'snow-man-s-present',
'great-old-egg',
'juvenile-great-old',
'great-old',
'ovil',
'applicant',
*/
];

return res.view(
'pages/homepage.ejs',
{
...await sails.helpers.layoutConfig(req.user_id, req.session.locale),
tags: [
{
type: 'property',
name: 'og:url',
value: 'https://www.thefirstspine.fr' + req.url,
},
{
type: 'property',
name: 'og:type',
value: 'website',
},
{
type: 'property',
name: 'og:title',
value: 'The First Spine - ' + req.i18n.__('navigation.home'),
},
{
type: 'property',
name: 'og:description',
value: req.i18n.__("about.howWePlayText1") + req.i18n.__("about.howWePlayText2") + req.i18n.__("about.howWePlayText3"),
},
{
type: 'property',
name: 'og:image',
value: 'https://www.thefirstspine.fr' + '/images/og-characters2.jpg',
},
],
news: await sails.models.news.find({
limit: 3,
sort: 'createdAt DESC',
Expand Down
27 changes: 27 additions & 0 deletions api/controllers/TournamentsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@ module.exports = {
// Construct data to pass to the renderer
const dataToView = {
tournament,
tags: [
{
type: 'property',
name: 'og:url',
value: 'https://www.thefirstspine.fr' + req.url,
},
{
type: 'property',
name: 'og:type',
value: 'article',
},
{
type: 'property',
name: 'og:title',
value: 'The First Spine - ' + tournament.title,
},
{
type: 'property',
name: 'og:description',
value: (tournament.text.replace(/(<([^>]+)>)/ig,' ').slice(0, 120).split(' ').slice(0, -1).join(' ')) + '...',
},
{
type: 'property',
name: 'og:image',
value: 'https://www.thefirstspine.fr' + '/images/og-cards2.jpg',
},
],
...await sails.helpers.layoutConfig(req.user_id),
}

Expand Down
Binary file added assets/images/og-cards2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/og-characters2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions config/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"yourAccount": "Votre compte",
"logout": "Se déconnecter",
"referAFriend": "Parrainer un ami",
"driftersTales": "Les Contes du Vagabond"
"driftersTales": "Les Contes du Vagabond",
"arena": "arena"
},
"footer": {
"stayConnected": "Restons connectés",
Expand Down Expand Up @@ -360,5 +361,6 @@
"frozen-statues": "Statues gelées",
"mutations": "Mutations"
}
}
},
"Vos codes sont arrivés !": "Vos codes sont arrivés !"
}
6 changes: 6 additions & 0 deletions views/layouts/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
<%/* If you want to discourage search engines from indexing this site, uncomment the following line: */%>
<%/* <meta name="robots" content="noindex"> */%>

<!-- Page tags -->
<% if(typeof(tags) !== 'undefined') { %>
<% tags.forEach(function(tag) { %>
<meta <%= tag['type'] %>="<%= tag['name'] %>" content="<%= tag['value'] %>" />
<% }) %>
<% } %>

<!--
Stylesheets and Preprocessors
Expand Down

0 comments on commit 7979244

Please sign in to comment.