Skip to content

Commit 5a97c12

Browse files
committed
Remove AMP from dev server pages
1 parent d1e3d08 commit 5a97c12

File tree

1 file changed

+3
-43
lines changed

1 file changed

+3
-43
lines changed

dotcom-rendering/src/server/dev-index.html

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,12 @@ <h2>Default Endpoints</h2>
5353
>Article</a
5454
>
5555
</li>
56-
<li>
57-
<a
58-
href="/AMPArticle/https://amp.theguardian.com/world/2013/jun/09/edward-snowden-nsa-whistleblower-surveillance"
59-
>⚡️Article</a
60-
>
61-
</li>
6256
<li>
6357
<a
6458
href="/Interactive/https://www.theguardian.com/global-development/ng-interactive/2022/jun/09/the-black-sea-blockade-mapping-the-impact-of-war-in-ukraine-on-the-worlds-food-supply-interactive"
6559
>Interactive</a
6660
>
6761
</li>
68-
<li>
69-
<a
70-
href="/AMPInteractive/https://www.theguardian.com/world/2021/mar/24/how-a-container-ship-blocked-the-suez-canal-visual-guide"
71-
>⚡️Interactive</a
72-
>
73-
</li>
7462
<li>
7563
<a
7664
href="/AppsInteractive/https://www.theguardian.com/global-development/ng-interactive/2022/jun/09/the-black-sea-blockade-mapping-the-impact-of-war-in-ukraine-on-the-worlds-food-supply-interactive"
@@ -81,19 +69,12 @@ <h2>Default Endpoints</h2>
8169
<a href="/Front/https://www.theguardian.com/international"
8270
>International Front</a
8371
>
84-
(<a href="/FrontJSON/https://www.theguardian.com/international"
85-
>Enhanced JSON</a
86-
>)
8772
</li>
8873
<li>
8974
<a
9075
href="/TagPage/https://www.theguardian.com/tone/minutebyminute"
9176
>Tag Page</a
9277
>
93-
(<a
94-
href="/FrontJSON/https://www.theguardian.com/tone/minutebyminute"
95-
>Enhanced JSON</a
96-
>)
9778
</li>
9879
<li>
9980
<a
@@ -341,23 +322,20 @@ <h2>Article Examples</h2>
341322
<td class="links">
342323
<article-link product="dotcom" env="DEV"></article-link>
343324
<article-link product="apps" env="DEV"></article-link>
344-
<article-link product="amp" env="DEV"></article-link>
345325
</td>
346326
<td class="links">
347327
<article-link
348328
product="dotcom"
349329
env="CODE"
350330
></article-link>
351331
<article-link product="apps" env="CODE"></article-link>
352-
<article-link product="amp" env="CODE"></article-link>
353332
</td>
354333
<td class="links">
355334
<article-link
356335
product="dotcom"
357336
env="PROD"
358337
></article-link>
359338
<article-link product="apps" env="PROD"></article-link>
360-
<article-link product="amp" env="PROD"></article-link>
361339
</td>
362340
</tr>
363341
</template>
@@ -405,9 +383,7 @@ <h2>Test Articles By Element</h2>
405383
<div class="test-article-header">
406384
<span>type</span>
407385
<span>local</span>
408-
<span>local-amp</span>
409386
<span>production</span>
410-
<span>production-amp</span>
411387
</div>
412388
</div>
413389

@@ -417,9 +393,7 @@ <h2>Test Articles By Atom Type</h2>
417393
<div class="test-article-header">
418394
<span>type</span>
419395
<span>local</span>
420-
<span>local-amp</span>
421396
<span>production</span>
422-
<span>production-amp</span>
423397
</div>
424398
</div>
425399

@@ -734,9 +708,7 @@ <h2>Test Articles By Element (Missing)</h2>
734708
<div class="test-article">
735709
<span>${a.name}</span>
736710
<span><a href="/Article/https://www.theguardian.com${a.article}">🔗</a> <a href="/Article/http://localhost:9000${a.article}">🔗(local FE)</a></span>
737-
<span><a href="/AMPArticle/https://www.theguardian.com${a.article}">🔗</a> <a href="/AMPArticle/http://localhost:9000${a.article}">🔗(local FE)</a></span>
738711
<span><a href="https://www.theguardian.com${a.article}">example</a></span>
739-
<span><a href="https://amp.theguardian.com${a.article}">example</a></span>
740712
</div>
741713
`;
742714

@@ -916,7 +888,7 @@ <h2>${title}</h2>
916888

917889
class ArticleLink extends HTMLElement {
918890
/**
919-
* @typedef {'dotcom' | 'apps' | 'amp'} Product
891+
* @typedef {'dotcom' | 'apps'} Product
920892
* @typedef {'PROD' | 'CODE' | 'DEV'} Env
921893
*/
922894

@@ -938,8 +910,6 @@ <h2>${title}</h2>
938910
case 'dotcom':
939911
case 'apps':
940912
return 'https://www.theguardian.com';
941-
case 'amp':
942-
return 'https://amp.theguardian.com';
943913
}
944914
}
945915

@@ -952,8 +922,6 @@ <h2>${title}</h2>
952922
case 'dotcom':
953923
case 'apps':
954924
return 'https://m.code.dev-theguardian.com';
955-
case 'amp':
956-
return 'https://amp.code.dev-theguardian.com';
957925
}
958926
}
959927

@@ -977,8 +945,6 @@ <h2>${title}</h2>
977945
return '/Article';
978946
case 'apps':
979947
return '/AppsArticle';
980-
case 'amp':
981-
return '/AMPArticle';
982948
}
983949
}
984950

@@ -1027,8 +993,6 @@ <h2>${title}</h2>
1027993
return '🌍 Dotcom';
1028994
case 'apps':
1029995
return '📱 Apps';
1030-
case 'amp':
1031-
return '⚡️ AMP';
1032996
}
1033997
}
1034998

@@ -1081,13 +1045,9 @@ <h2>${title}</h2>
10811045
const env = this.getAttribute('env');
10821046
const href = this.getAttribute('href');
10831047

1084-
if (
1085-
product !== 'dotcom' &&
1086-
product !== 'apps' &&
1087-
product !== 'amp'
1088-
) {
1048+
if (product !== 'dotcom' && product !== 'apps') {
10891049
this.textContent =
1090-
"article-link error: 'product' must be one of: 'dotcom', 'apps' or 'amp'";
1050+
"article-link error: 'product' must be one of: 'dotcom' or 'apps'";
10911051
return;
10921052
}
10931053

0 commit comments

Comments
 (0)