Skip to content

Commit 1547662

Browse files
committed
fix(ticket): testing for ticket pages
1 parent fba5906 commit 1547662

File tree

6 files changed

+74
-48
lines changed

6 files changed

+74
-48
lines changed

_includes/layouts/base.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</head>
3434
<body>
3535
<div class="banner flex-center">
36-
<span>jQuery UI issues have moved to <a href="https://github.com/jquery/jquery-ui/issues">GitHub</a>. This site is now a static archive of the old <a href="https://trac.edgewall.org/">Trac</a> bugs site. Some functions and pages are no longer available.</span>
36+
<span>jQuery UI issues have moved to <a href="https://github.com/jquery/jquery-ui/issues">GitHub</a>. This site is now a static archive of the old <a href="https://trac.edgewall.org/">Trac</a> bugs site. <br />Some functions and pages are no longer available.</span>
3737
</div>
3838
<div class="container">
3939
<a href="#skip" class="visually-hidden">Skip to main content</a>

content/ticket.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656

5757
<div class="ticket-info">
5858
<div class="flex-row flex-between-start">
59-
<h3>
59+
<h2>
6060
<a href="{{ pagination.url }}" class="ticket-number">#{{ ticket.id }}</a>
6161
<span class="ticket-status">{{ ticket.status }}</span>
6262
<span class="ticket-type">{{ ticket.type }}</span>
6363
<span class="ticket-resolution">({{ ticket.resolution }})</span>
64-
</h3>
64+
</h2>
6565

6666
<div class="ticket-dates">
6767
<p>Opened {{ ticket.time | yearsAgo }}</p>
@@ -196,4 +196,4 @@
196196
</div>
197197
</div>
198198
{% endfor %}
199-
</details>
199+
</details>

content/wiki/TitleIndex.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ eleventyImport:
99

1010
<p>Below is an index of all the wiki pages that were available on the old site.</p>
1111

12-
<div class="flex-column">
12+
<div class="flex-column items-start">
1313
{% for wiki in collections.wiki %}
1414
<a href="{{ wiki.url }}" class="wiki-index-link">{{ wiki.data.title }}</a>
1515
{% endfor %}
16-
</div>
16+
</div>

eleventy.config.tracToHTML.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,40 @@ module.exports = function tracToHTML(text) {
2727
)
2828
return `<pre class="wiki"></pre>`
2929
})
30+
// Linkify http links outside brackets
31+
.replace(/(^|\s)(https?:\/\/[^\s]+)/g, function (_match, space, url) {
32+
return `${space}<a href="${url}" class="ext-link"><span class="icon"></span>${url}</a>`
33+
})
3034
// Linkify http links in brackets
3135
.replace(
32-
/\[(https?:\/\/[^\s\]]+)(?:\s+([^\]]+))?\]/g,
33-
function (_match, url, text) {
34-
return `<a href="${url}" class="ext-link"><span class="icon"></span>${
36+
/(^|\s)\[(https?:\/\/[^\s\]]+)(?:\s+([^\]]+))?\]/g,
37+
function (_match, space, url, text) {
38+
return `${space}<a href="${url}" class="ext-link"><span class="icon"></span>${
3539
text || url
3640
}</a>`
3741
}
3842
)
3943
// Linkify hash links in brackets
4044
.replace(
41-
/\[(#[^\s\]]+)(?:\s+([^\]]+))?\]/g,
42-
function (_match, url, text) {
43-
return `<a href="${url}" class="ext-link"><span class="icon"></span>${
45+
/(^|\s)\[(#[^\s\]]+)(?:\s+([^\]]+))?\]/g,
46+
function (_match, space, url, text) {
47+
return `${space}<a href="${url}" class="ext-link"><span class="icon"></span>${
4448
text || url
4549
}</a>`
4650
}
4751
)
4852
// Linkify CamelCase links in brackets
4953
.replace(
50-
/\[([A-Z][a-z]+[A-Z][\w#-]+)(?:\s+([^\]]+))?\]/g,
51-
function (_match, page, text) {
52-
return `<a href="/wiki/${page}">${text || page}</a>`
54+
/(^|\s)\[([A-Z][a-z]+[A-Z][\w#-]+)(?:\s+([^\]]+))?\]/g,
55+
function (_match, space, page, text) {
56+
return `${space}<a href="/wiki/${page}">${text || page}</a>`
5357
}
5458
)
5559
// Linkify trac links
5660
.replace(
57-
/(?:\[trac:([^ ]+) "([^"]+)"\])|(?:\[trac:([^\s\]]+)(?: ([^\]]+))?\])/g,
58-
function (_match, quotepage, quotedtext, page, text) {
59-
return `<a href="https://trac.edgewall.org/intertrac/${
61+
/(^|\s)(?:\[trac:([^ ]+) "([^"]+)"\])|(?:\[trac:([^\s\]]+)(?: ([^\]]+))?\])/g,
62+
function (_match, space, quotepage, quotedtext, page, text) {
63+
return `${space}<a href="https://trac.edgewall.org/intertrac/${
6064
quotepage || page
6165
}" class="ext-link"><span class="icon"></span>${
6266
quotedtext || text || page

public/css/index.css

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* Defaults */
22
:root {
3-
--font-family: "Arial", "Helvetica", "Verdana", "sans-serif";
3+
--font-family: 'Arial', 'Helvetica', 'Verdana', 'sans-serif';
44
--font-family-header: var(--font-family);
5-
--font-family-alternate: Verdana, Arial, "Bitstream Vera Sans", Helvetica, sans-serif;
6-
--font-family-monospace: Monaco, Andale Mono WT, Andale Mono,
7-
Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono,
8-
Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New,
9-
Courier, monospace;
5+
--font-family-alternate: Verdana, Arial, 'Bitstream Vera Sans', Helvetica,
6+
sans-serif;
7+
--font-family-monospace: Monaco, Andale Mono WT, Andale Mono, Lucida Console,
8+
Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono,
9+
Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
1010
}
1111

1212
/* Theme colors */
@@ -120,7 +120,8 @@ body {
120120
color: var(--text-color-link-active);
121121
}
122122

123-
th, tr {
123+
th,
124+
tr {
124125
font-family: var(--font-family-alternate);
125126
}
126127
.container {
@@ -131,19 +132,35 @@ th, tr {
131132
overflow: hidden;
132133
}
133134

134-
h1, h2, h3, h4, h5, h6 {
135+
h1,
136+
h2,
137+
h3,
138+
h4,
139+
h5,
140+
h6 {
135141
font-family: var(--font-family-header);
136142
font-weight: normal;
137143
margin: 0;
138144
padding: 0;
139145
letter-spacing: 0;
140146
}
147+
h1,
148+
h2,
149+
h3,
150+
h4 {
151+
letter-spacing: -0.018em;
152+
}
141153

142154
h1 {
143155
font-size: 1.25rem;
144156
font-weight: bold;
145157
}
146158

159+
h2 {
160+
font-size: 1rem;
161+
font-weight: bold;
162+
}
163+
147164
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
148165
.visually-hidden {
149166
clip: rect(0 0 0 0);
@@ -258,7 +275,7 @@ pre[class*='language-'] code {
258275

259276
/* Header */
260277
header {
261-
position: relative;
278+
position: relative;
262279
height: 95px;
263280
display: flex;
264281
flex-wrap: wrap;
@@ -462,15 +479,16 @@ main a[href]:active {
462479
/* Footer */
463480
footer {
464481
background-color: var(--nav-background-color);
465-
background: var(--nav-background-color) linear-gradient(
466-
to bottom,
467-
var(--footer-background-start-color),
468-
var(--footer-background-end-color)
469-
);
482+
background: var(--nav-background-color)
483+
linear-gradient(
484+
to bottom,
485+
var(--footer-background-start-color),
486+
var(--footer-background-end-color)
487+
);
470488
padding: 2em;
471489
margin-bottom: 2em;
472490
color: var(--text-color-dark-bg);
473-
border: 2px solid var(--main-background-end-color);
491+
border: 2px solid transparent;
474492
border-top: 0;
475493
border-radius: 0 0 var(--border-radius) var(--border-radius);
476494
}
@@ -515,6 +533,9 @@ footer a[href]:active {
515533
justify-content: center;
516534
align-items: center;
517535
}
536+
.items-start {
537+
align-items: start;
538+
}
518539

519540
/* Utility classes */
520541
.white-box {
@@ -526,7 +547,7 @@ a.ext-link .icon {
526547
background: url(/img/extlink.png) 0 50% no-repeat;
527548
}
528549

529-
@media(max-width: 919px) {
550+
@media (max-width: 919px) {
530551
#jq-menus {
531552
position: absolute;
532553
top: 95px;
@@ -544,8 +565,8 @@ a.ext-link .icon {
544565
}
545566
}
546567

547-
@media(min-width: 920px) {
548-
html:before{
568+
@media (min-width: 920px) {
569+
html:before {
549570
top: 60px;
550571
}
551572
body {
@@ -587,9 +608,9 @@ a.ext-link .icon {
587608
border-radius: var(--border-radius);
588609
margin-top: 2em;
589610
}
590-
#jq-siteLogo {
591-
align-self: flex-end;
592-
}
611+
#jq-siteLogo {
612+
align-self: flex-end;
613+
}
593614
main {
594615
flex-grow: 1;
595616
min-height: 520px;

public/css/ticket.css

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
--ticket-description-title-color: #663;
77
--ticket-changes-text-color: #663;
88
--ticket-changes-box-shadow: #f2f2f2;
9+
--ticket-number-color: #844;
910
}
1011

1112
.ticket-info {
@@ -19,28 +20,25 @@
1920
max-width: 580px;
2021
}
2122
.ticket-number {
22-
font-size: 1.15rem;
23+
font-size: 1.45rem;
2324
font-weight: bold;
2425
margin-right: 0.5em;
26+
text-decoration: none;
27+
}
28+
.ticket-number[href],
29+
.ticket-number[href]:visited {
30+
color: var(--ticket-number-color);
2531
}
2632
.ticket-info span {
27-
font-size: 0.8125em;
2833
font-weight: bold;
2934
}
3035

31-
.ticket-status,
32-
.ticket-type,
33-
.ticket-resolution {
34-
text-transform: uppercase;
35-
}
36-
3736
.missing {
3837
color: var(--text-color-link-disabled);
3938
}
4039

4140
.ticket-title {
4241
border-bottom: 1px solid #bbb;
43-
margin-top: 1em;
4442
padding-bottom: 0.25em;
4543
font-weight: bold;
4644
font-size: 1.1875rem;
@@ -111,6 +109,9 @@
111109
details {
112110
padding: 0.5em 0;
113111
font-size: 0.8125rem;
112+
width: 100%;
113+
max-width: 580px;
114+
margin: 0 auto;
114115
}
115116
summary {
116117
color: var(--text-color-link);

0 commit comments

Comments
 (0)