Skip to content

Commit 520792b

Browse files
authored
Merge pull request #1049 from Patternslib/maint-inject
Re-organize the inject demos
2 parents 77a3a72 + 3c62c65 commit 520792b

18 files changed

+72
-62
lines changed

src/pat/display-time/display-time.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ export default Base.extend({
6161
lastDay: `[${rtf.format(-1, "day")}]`, // translates to "yesterday"
6262
sameDay: `[${rtf.format(0, "day")}]`, // translates to "today"
6363
nextDay: `[${rtf.format(1, "day")}]`, // translates to "tomorrow"
64-
nextWeek: "dddd",
65-
// when the date is further away, use from-now functionality
64+
nextWeek: "dddd", // translates to week day name
65+
// otherwise, just use Intl.RelativeTimeFormat.
6666
sameElse: () => {
67-
return `[${date.fromNow(this.options.noSuffix)}]`;
67+
return `[${rtf.format(date_diff, "day")}]`;
6868
},
6969
});
7070
} else {

src/pat/inject-history/documentation.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/pat/inject-history/page1.html renamed to src/pat/inject/demo/history-page1.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@
1111
></script>
1212
</head>
1313
<body>
14-
<h1>Injection history demo</h1>
14+
<h1>Injection history demo page 1</h1>
1515
<div id="injection-content">
1616
<h2>This is page1</h2>
1717

1818
<a name="list"></a>
1919
<ul>
2020
<li>
2121
<a
22-
href="index.html"
22+
href="history.html"
2323
class="pat-inject"
2424
data-pat-inject="history: record"
2525
>index</a
2626
>
2727
</li>
2828
<li>
2929
<a
30-
href="page1.html"
30+
href="history-page1.html"
3131
class="pat-inject"
3232
data-pat-inject="history: record"
3333
>page1</a
3434
>
3535
</li>
3636
<li>
3737
<a
38-
href="page2.html"
38+
href="history-page2.html"
3939
class="pat-inject"
4040
data-pat-inject="history: record"
4141
>page2</a
4242
>
4343
</li>
4444
<li>
45-
<a href="page3.html" class="pat-inject"
45+
<a href="history-page3.html" class="pat-inject"
4646
>page3 (no history)</a
4747
>
4848
</li>

src/pat/inject-history/page2.html renamed to src/pat/inject/demo/history-page2.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@
1111
></script>
1212
</head>
1313
<body>
14-
<h1>Injection history demo</h1>
14+
<h1>Injection history demo page 2</h1>
1515
<div id="injection-content">
1616
<h2>This is page2</h2>
1717

1818
<a name="list"></a>
1919
<ul>
2020
<li>
2121
<a
22-
href="index.html"
22+
href="history.html"
2323
class="pat-inject"
2424
data-pat-inject="history: record"
2525
>index</a
2626
>
2727
</li>
2828
<li>
2929
<a
30-
href="page1.html"
30+
href="history-page1.html"
3131
class="pat-inject"
3232
data-pat-inject="history: record"
3333
>page1</a
3434
>
3535
</li>
3636
<li>
3737
<a
38-
href="page2.html"
38+
href="history-page2.html"
3939
class="pat-inject"
4040
data-pat-inject="history: record"
4141
>page2</a
4242
>
4343
</li>
4444
<li>
45-
<a href="page3.html" class="pat-inject"
45+
<a href="history-page3.html" class="pat-inject"
4646
>page3 (no history)</a
4747
>
4848
</li>

src/pat/inject-history/page3.html renamed to src/pat/inject/demo/history-page3.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@
1111
></script>
1212
</head>
1313
<body>
14-
<h1>Injection history demo</h1>
14+
<h1>Injection history demo page 3</h1>
1515
<div id="injection-content">
1616
<h2>This is page3</h2>
1717

1818
<a name="list"></a>
1919
<ul>
2020
<li>
2121
<a
22-
href="index.html"
22+
href="history.html"
2323
class="pat-inject"
2424
data-pat-inject="history: record"
2525
>index</a
2626
>
2727
</li>
2828
<li>
2929
<a
30-
href="page1.html"
30+
href="history-page1.html"
3131
class="pat-inject"
3232
data-pat-inject="history: record"
3333
>page1</a
3434
>
3535
</li>
3636
<li>
3737
<a
38-
href="page2.html"
38+
href="history-page2.html"
3939
class="pat-inject"
4040
data-pat-inject="history: record"
4141
>page2</a
4242
>
4343
</li>
4444
<li>
45-
<a href="page3.html" class="pat-inject"
45+
<a href="history-page3.html" class="pat-inject"
4646
>page3 (no history)</a
4747
>
4848
</li>

src/pat/inject-history/index.html renamed to src/pat/inject/demo/history.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,36 @@
1111
></script>
1212
</head>
1313
<body>
14+
<p><a href="../#demo-history-2">Back to the main inject demo.</a></p>
1415
<h2>This is the index</h2>
1516
<a name="list"></a>
1617
<ul>
1718
<li>
1819
<a
19-
href="index.html#injection-content"
20+
href="history.html#injection-content"
2021
class="pat-inject"
2122
data-pat-inject="history: record"
2223
>index</a
2324
>
2425
</li>
2526
<li>
2627
<a
27-
href="page1.html#injection-content"
28+
href="history-page1.html#injection-content"
2829
class="pat-inject"
2930
data-pat-inject="history: record"
3031
>page1</a
3132
>
3233
</li>
3334
<li>
3435
<a
35-
href="page2.html#injection-content"
36+
href="history-page2.html#injection-content"
3637
class="pat-inject"
3738
data-pat-inject="history: record"
3839
>page2</a
3940
>
4041
</li>
4142
<li>
42-
<a href="page3.html#injection-content" class="pat-inject"
43+
<a href="history-page3.html#injection-content" class="pat-inject"
4344
>page3 (no history)</a
4445
>
4546
</li>
File renamed without changes.

0 commit comments

Comments
 (0)