Skip to content

Commit

Permalink
Repo import (#256)
Browse files Browse the repository at this point in the history
Drop submodules and import files to this repository while preserving
their history.

---------

Co-authored-by: plehegar <plh@w3.org>
Co-authored-by: Coralie Mercier <coralie@w3.org>
Co-authored-by: Chris Lilley <chris@w3.org>
Co-authored-by: Ralph Swick <swick@w3.org>
Co-authored-by: Denis Ah-Kang <deniak@users.noreply.github.com>
Co-authored-by: r12a <ishida@w3.org>
Co-authored-by: Fuqiao Xue <xfq@w3.org>
Co-authored-by: Samuel Weiler <weiler@w3.org>
Co-authored-by: shawn_slh <shawn@w3.org>
Co-authored-by: Francois Daoust <fd@tidoust.net>
Co-authored-by: Nigel Megitt <nigel.megitt@bbc.co.uk>
Co-authored-by: JiayingL <jennyliang@w3.org>
Co-authored-by: Addison Phillips <addisonI18N@gmail.com>
Co-authored-by: Addison Phillips <addison@lab126.com>
Co-authored-by: Daniel <dmontalvo@w3.org>
Co-authored-by: chaals <chaals@users.noreply.github.com>
Co-authored-by: Kaelig Deloumeau-Prigent <kaelig@users.noreply.github.com>
  • Loading branch information
18 people authored Nov 7, 2024
1 parent 8ad5480 commit b109702
Show file tree
Hide file tree
Showing 20 changed files with 7,051 additions and 16 deletions.
12 changes: 0 additions & 12 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion documentreview
Submodule documentreview deleted from 29571e
53 changes: 53 additions & 0 deletions documentreview/createGitHubIssue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
window.addEventListener('load', addGitHubIssueButton);


function addGitHubIssueButton() {
document.querySelector('#githubissue button').addEventListener('click', createGitHubIssue);
document.getElementById('githubissue').hidden = false;
}


function createGitHubIssue() {
const value = document.getElementById('repository').value.trim();
const match = value.match(/github\.com\/(.*?)\/?$/);
const repo = match ? match[1] : value;
if (!repo.match(/^[^\s\/]+\/[^\s\/]+$/)) {
console.warn('Invalid repository name entered', value);
window.alert(`Invalid repository name: "${value}".\nExpected format: "owner/repo", e.g. "w3c/documentreview".`);
return;
}

const title = encodeURIComponent('Seek wide review');
const body = encodeURIComponent(generateGitHubIssueBody());
window.open(`https://github.com/${repo}/issues/new?title=${title}&body=${body}`);
}


function generateGitHubIssueBody() {
const dl = document.querySelector('#how_to_get_horizontal_review dl');
if (!dl) {
console.error('Could not find right anchor in "How to get horizontal review" section');
}

const bullets = [...dl.querySelectorAll('dt')].map(dt => {
const dd = dt.nextElementSibling;
if (dd.tagName !== 'DD') {
console.error('Could not find a DD tag after DT', dt);
return;
}

const subContents = [...dd.querySelectorAll('.step')].map(el => ` - [ ] ${el.innerHTML}`);

return ` - ${dt.textContent}\n${subContents.join('\n')}`;
});

return `This is a meta issue to track wide review steps for the specification.
See [How to do wide review](https://www.w3.org/Guide/documentreview/#who_to_ask_for_review) for details.
- [ ] the groups listed in the WG's charter, especially those who manage dependencies
- [ ] the groups jointly responsible for a particular document (if any).
- the horizontal groups:
${bullets.join('\n')}
- Other outreach (if applicable)
`;
}
376 changes: 376 additions & 0 deletions documentreview/index.html

Large diffs are not rendered by default.

121 changes: 121 additions & 0 deletions documentreview/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
@font-face {
font-family: 'RalewayWF';
src: url('https://www.w3.org/International/style/fonts/raleway-regular-webfont.woff2') format('woff2');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'RalewayWF';
src: url('https://www.w3.org/International/style/fonts/raleway-bold-webfont.woff2') format('woff2');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'RalewayWF';
src: url('https://www.w3.org/International/style/fonts/raleway-italic-webfont.woff2') format('woff2');
font-weight: normal;
font-style: italic;
}


body {
font-family: RalewayWF;
line-height: 1.6;
margin-inline: 3em;
margin-block: 0;
padding-inline: 4em;
padding-block: 2em;
}

@media (max-width: 600px) {
body {
margin-inline: auto;
width: clamp(16rem, 95vw, 85rem);
padding-inline: clamp(1.4rem, 1.5rem, 2rem);
}
}

h2 {
margin-top: 3em;
}
h3 {
margin-top: 2em;
}
#toc ol {
list-style-type: none;
line-height: 1.7;
}
summary {
font-style: italic;
cursor: pointer;
}
dt {
font-weight: bold;
}
#versionInfo {
margin-top: 4em;
}
h2 a {
text-decoration: none;
color: #005a9c;
}
#toc a {
text-decoration: none;
}
.toc1 {
margin-inline-start: 2em;
line-height: 1.7;
}
.toc2 {
margin-inline-start: 5em;
font-size: 90%;
}

/* SELF LINKS */
h2, h3, h4, h5, h6 { position: relative; }
.selflink { display: none; }
h2:hover > a.selflink::before, h3:hover > a.selflink::before, h4:hover > a.selflink::before, h5:hover > a.selflink::before, h6:hover > a.selflink::before {
content: "§";
display: block;
}
h2 > a.selflink, h3 > a.selflink, h4 > a.selflink, h5 > a.selflink, h6 > a.selflink {
color: inherit;
font-size: 83%;
text-align: center;
background-color: transparent;
}
h2:hover > a.selflink, h3 > a.selflink, h4 > a.selflink, h5 > a.selflink, h6 > a.selflink {
border: none;
color: inherit;
font-size: 83%;
height: 2em;
left: -1.6em;
opacity: .5;
position: absolute;
text-align: start;
text-decoration: none;
top: 0;
transition: opacity .2s;
width: 2em;
display: block;
}

#githubissue {
width: 70%;
margin: auto;
border-bottom: 3px solid #005A9C;
padding: 1em 1em;
background: #e2edfe;
}

#githubissue input[type=text] {
width: 70%;
margin-bottom: 0.5em;
}

.githublabel {
font-weight: bold;
border: 1px solid gray;
border-radius: .5em;
padding: 2px 5px;
}
59 changes: 59 additions & 0 deletions documentreview/toc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
function createtoc (maxlevel) {
// creates a TOC and puts it in a div with id="toc" & creates a self-link
// expect to find the id on the heading markup, NOT the section, and NO a around the heading text
// works for h2 or h2+h3 (if maxlevel set to 3)

var h2s = document.querySelectorAll('h2')
var toc = document.getElementById('toc')
var h2, h3, id, h, a
var toc = ''

for (var i=0; i<h2s.length; i++) {
if (!h2s[i].className.match(/notoc/)) {
h2 = h2s[i].textContent
id = getNearestSectionID(h2s[i])
if (id !== '') {
h2s[i].appendChild(addSelfLink(id))
toc += newTOCLine(h2, id, '1')
}
if (maxlevel && maxlevel > 2) {
// check for h3s
var h3s = h2s[i].parentNode.querySelectorAll('h3');
for (var k=0; k<h3s.length; k++) {
if (!h3s[k].className.match(/notoc/)) {
h3 = h3s[k].textContent
id = getNearestSectionID(h3s[k])
if (id !== '') {
h3s[k].appendChild(addSelfLink(id))
toc += newTOCLine(h3, id, '2')
}
}
}
}
}
}
document.getElementById('toc_placeholder').innerHTML = toc
}


function getNearestSectionID (node) {
var id = ''
var section = node.closest('section')
if (section.id == null) console.log('ERROR: No id on section:', node.textContent)
else id = section.id

return id
}


function addSelfLink (id) {
var selflink = document.createElement('a')
selflink.className = 'selflink'
selflink.href = '#'+id
return selflink
}


function newTOCLine (heading, id, level) {
return '<div class="toc'+level+'"><a href="#'+id+'">'+heading+'</a></div>'
}
1 change: 0 additions & 1 deletion manual-of-style
Submodule manual-of-style deleted from 4d919c
Loading

0 comments on commit b109702

Please sign in to comment.