Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs HTML fixes #3795

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/_includes/backers.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Backers

Find Mocha helpful? Become a [backer](https://opencollective.com/mochajs#support) and support Mocha with a monthly donation.
Find Mocha helpful? Become a [backer](https://opencollective.com/mochajs#support) and support Mocha with a monthly donation.

<!-- markdownlint-disable MD034 -->
{% for i in (0..29) %}[![](https://opencollective.com/mochajs/backer/{{ i }}/avatar.jpg)](https://opencollective.com/mochajs/backer/{{ i }}/website){: target="_blank" rel="noopener"}{% endfor %}
{: .image-list id="_backers" }

{% for i in (0..29) %}[![](https://opencollective.com/mochajs/backer/{{ i }}/avatar.jpg)](https://opencollective.com/mochajs/backer/{{ i }}/website){: target="\_blank" rel="noopener"}{% endfor %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of the added backslash?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be prettier choking on the template code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all 11ty template stuff needs wrapping in

<!-- prettier-ignore -->

stuff

<!-- prettier-ignore-end -->

{: .image-list class="backers" }
46 changes: 22 additions & 24 deletions docs/_includes/default.html
Original file line number Diff line number Diff line change
@@ -1,51 +1,49 @@
<!DOCTYPE html>
<!doctype html>
plroebuck marked this conversation as resolved.
Show resolved Hide resolved
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>{{ page.title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{ title }}</title>
<link
rel="preload"
href="https://opencollective.com/static/images/user.svg"
as="image"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/prism.css" />
<link rel="shortcut icon" href="favicon.ico" />
>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/prism.css">
<link rel="shortcut icon" href="favicon.ico">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I didn't change this here since we don't have a clear list of supported browsers and this is needed for IE.


<!--[if lt IE 9]> <script src="js/html5shiv.min.js"></script> <![endif]-->
<!--[if lt IE 9]><script src="js/html5shiv.min.js"></script><![endif]-->
</head>

<body>
<header id="_header">
<header class="header">
<h1>
<a href="/">
<img
src="/images/mocha-logo.svg"
alt="Mocha"
alt="Mocha Logo"
width="192"
height="192"
/>
>
</a>
</h1>

<p id="tag"><em>simple</em>, <em>flexible</em>, <em>fun</em></p>
<p class="tagline"><em>simple</em>, <em>flexible</em>, <em>fun</em></p>
</header>

<main id="content">{{ content }}</main>
<main class="content">{{ content }}</main>

<footer>
<span>
<a href="https://mochajs.org">mochajs.org</a> is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"
>Creative Commons Attribution 4.0 International License</a
>.
<p>
<em>Last updated: {{ 'now' | date: '%a %b %d %H:%M:%S %Y' }}</em>
</p></span
>
<a href="https://mochajs.org">mochajs.org</a> is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"
>Creative Commons Attribution 4.0 International License</a
>.
<p>
<em>Last updated: {{ 'now' | date: '%a %b %d %H:%M:%S %Y' }}</em>
</p>
</footer>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/api/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
Expand Down
27 changes: 11 additions & 16 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,30 @@ body {
}
}

header,
#content {
.header,
.content {
max-width: 920px;
margin: 0 auto;
padding-left: 30px;
padding-right: 30px;
}

header {
.header {
padding-top: 20px;
}

#content {
.content {
padding-bottom: 60px;
}

#_header h1 {
.header h1 {
margin-top: 0;
margin-left: -19px;
opacity: 0;
animation: fadein 1s forwards;
}

#tag {
.tagline {
color: #c29d7f;
font-weight: 100;
font-size: 30px;
Expand All @@ -62,7 +62,7 @@ header {
animation: fadein 1s forwards, slideright 1s forwards;
}

#tag em {
.tagline em {
font-style: normal;
}

Expand Down Expand Up @@ -93,7 +93,7 @@ nav.badges a + a {
opacity: 1;
}

#_backers a img {
.backers img {
width: 64px;
background: url(/images/backer-background.svg?inline) center center no-repeat;
}
Expand All @@ -119,7 +119,7 @@ h3 > code {
font-size: 14px;
}

#content > p:first-child {
.content > p:first-child {
font-size: 20px;
font-weight: 200;
letter-spacing: 1px;
Expand Down Expand Up @@ -190,20 +190,15 @@ img.screenshot {

footer {
background-color: #eee;
padding: 50px 0;
padding: 50px 30px;
text-align: right;
border-top: 1px solid #ddd;
}

footer span {
display: block;
margin-right: 30px;
color: #888;
font-size: 0.8em;
}

@media all and (max-width: 600px) {
#tag {
.tagline {
margin-top: 0;
margin-left: 0;
margin-bottom: 0;
Expand Down
2 changes: 1 addition & 1 deletion docs/example/tests.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ A typical setup might look something like the following, where we call `mocha.se
<head>
<meta charset="utf-8" />
<title>Mocha Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, something that injects or formats the snippets, adds the useless end tags. Not a big deal, it's just it's useless.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to the prettier hate club...

<link rel="stylesheet" href="https://unpkg.com/mocha/mocha.css" />
</head>
<body>
Expand Down Expand Up @@ -1598,7 +1598,7 @@ tests as shown below:
<head>
<meta charset="utf-8" />
<title>Mocha Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial-scale defines a ratio -- hence, the number written in "float/double" format.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...which is fine an integer in this case.

<link rel="stylesheet" href="https://unpkg.com/mocha/mocha.css" />
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions lib/browser/template.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mocha</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="mocha.css">
</head>
<body>
Expand Down