Skip to content

Commit

Permalink
Feature Request a static revision page for better loading, sharing an…
Browse files Browse the repository at this point in the history
…d crawling (#140)

* Start adding static revision page.

* Fix the SSR and CSR discrepency, remove legacy.vue and NewRevisionCard

* Add SEO, search engine optimization, improve crawler friendliness

* Fix the revert feature on the StaticRevisionCard

* Improve the SEO

* Facebook Shraing Debugger discourages setting og:url and we are removing canonicalUrl

* Improve image and its url

* Fix the base url:

* Fix the image url

* Use real host
  • Loading branch information
xinbenlv committed Dec 28, 2019
1 parent 41105a1 commit 0a6ba2b
Show file tree
Hide file tree
Showing 21 changed files with 326 additions and 439 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WikiLoop Battlefield: Fight vandalism on Wikipedia together

[![WikiLoop Logo](./assets/wikiloop-battlefield-logo.svg)](https://meta.wikimedia.org/wiki/WikiProject_WikiLoop)
[![WikiLoop Logo](static/wikiloop-battlefield-logo.svg)](https://meta.wikimedia.org/wiki/WikiProject_WikiLoop)

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

Expand Down
Binary file added assets/wikiloop-battlefield-logo.ico
Binary file not shown.
Binary file added assets/wikiloop-logo.ico
Binary file not shown.
5 changes: 4 additions & 1 deletion components/DiffBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
-->
<template>
<div class="diff-card">
<table class="pl-sm-0 w-100 diff-content" v-html="diffContent"></table>
<table class="pl-sm-0 w-100 diff-content" >
<tbody v-html="diffContent" >
</tbody>
</table>
</div>
</template>

Expand Down
6 changes: 4 additions & 2 deletions components/RevisionCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-->

<template>
<section>
<section class="XXX-debug">
<div v-bind:class="{
'border-danger': ores ? ores.goodfaith.false > 0.5 : false,
'border-warning': ores ? ores.damaging.true > 0.5 : false,
Expand Down Expand Up @@ -67,7 +67,7 @@
:href="`/extra/stiki/${wikiRevId}`">{{ stikiPercent() }}</a>
</span>
</div>
<div v-if="stiki" class="col-lg-2">
<div v-if="cbng" class="col-lg-2">
<span data-toggle="tooltip" data-placement="top"
title="Vandalism Score by ClueBotNG">
<i v-bind:class="{ 'text-warning': cbng && cbng > 0.5 ? true : false }" class="fas fa-theater-masks"></i> ClueBotNG: <a
Expand Down Expand Up @@ -142,6 +142,7 @@
</div>
<div v-if="interaction && interaction.judgements.length > 0" class="col-lg-12">
<table class="b-table table mt-2 w-100">
<tbody>
<tr class="row">
<td class="col-4">User</td>
<td class="col-4">Label</td>
Expand All @@ -163,6 +164,7 @@
<td class="col-4">{{judgement.judgement}}</td>
<td class="col-4">{{new Date(judgement.timestamp * 1000).toISOString()}} <br/> (<timeago :locale="$i18n.locale" :datetime="new Date(interaction.lastTimestamp * 1000).toString()" :auto-update="60"></timeago>)</td>
</tr>
</tbody>
</table>
</div>
</div>
Expand Down
347 changes: 136 additions & 211 deletions components/NewRevisionCard.vue → components/StaticRevisionCard.vue

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion locales/en.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
LoginMenuItem: "Login",
LogoutMenuItem: "Logout",
ContributionsMenuItem: "Contributions",
ContributionsMenuItem: "My contributions",
ContributionsBeforeLoginMenuItem: "My contributions before login",
Anonymous: "Anonymous",
Me: "Me",
Someone: "Someone",
Expand Down
2 changes: 2 additions & 0 deletions locales/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module.exports = {
LoginMenuItem: "Connexion",
LogoutMenuItem: "Déconnexion",
ContributionsMenuItem: "Contributions",
// TODO please help add translation of this item
// ContributionsBeforeLoginMenuItem: "",
Anonymous: "Anonyme",
Me: "Moi",
Someone: "Quelqu'un",
Expand Down
2 changes: 2 additions & 0 deletions locales/tr.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module.exports = {
LoginMenuItem: "Giriş",
LogoutMenuItem: "Çıkış",
ContributionsMenuItem: "Katkılar",
// TODO please help add translation of this item
// ContributionsBeforeLoginMenuItem: "",
Anonymous: "Anonim",
Me: "Ben",
Someone: "Birisi",
Expand Down
3 changes: 2 additions & 1 deletion locales/zh.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
LoginMenuItem: "登录",
LogoutMenuItem: "登出",
ContributionsMenuItem: "贡献",
ContributionsMenuItem: "我的贡献",
ContributionsBeforeLoginMenuItem: "我的匿名贡献",
Anonymous: "游客",
Me: "我",
Someone: "别人",
Expand Down
219 changes: 0 additions & 219 deletions pages/legacy.vue

This file was deleted.

Loading

0 comments on commit 0a6ba2b

Please sign in to comment.