Skip to content

Website HTML tweaks #3783

@plroebuck

Description

@plroebuck

Description

"docs/_includes/default.html"

  • Fix <title> (solution courtesy of @XhmikosR)
    <title>{{ title }}</title>
<link rel="icon" href="favicon.ico" />
  • Mocha logo
    • Change the alt attribute to "Mocha logo"
    • Add an id attribute.
    • Migrate width and height attributes to stylesheet
<img
  id="mocha-logo"
  src="/images/mocha-logo.svg"
  alt="Mocha logo" />

"docs/css/style.css"

#mocha-logo {
  width: 192px;
  height: 192px;
}
<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
  • Add "rel=home" protocol for Mocha URL. Append slash ("/") to end of URL.
  <a rel="home" href="https://mochajs.org/">mochajs.org</a> is licensed under a
  • Use "https" protocol for CC license <a> "href" URL
  <a rel="license" href="https://creativecommons.org/licenses/by/4.0/"
          >Creative Commons Attribution 4.0 International License</a>.
  • Convert the<p>/<em> tags with the following <dl> embedding <time>
  <dl class="dl-inline last-modified">
    <dt>Last updated</dt>
    <dd>
      <time
        itemprop="lastModified"
        datetime="{{ 'now' | date: '%Y-%m-%dT%H:%M:%SZ' }}">
              {{ 'now' | date: '%a %b %d %H:%M:%S %Y' }}
      </time>
    </dd>
  </dl>

"docs/css/style.css"

.last-modified {
  font-style: italic;
}
.dl-inline dt, .dl-inline dd {
  display: inline;
  margin: 0;
}
.dl-inline dt:after {
  content: ': ';
}
.dl-inline dd + dt:before {
  content: '';
  display: block;
}
  • Annotate all links to outside URLs with these relations:
<a href="https://apex.sh/ping/" rel="external noopener" target="_blank">

Discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: websiteinvolving mochajs.org, but not necessarily involving docsgood first issuenew contributors should look here!semver-patchimplementation requires increase of "patch" version number; "bug fixes"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions