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

Add timestamp and version info in header and footer. #1354

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 9 additions & 2 deletions coverage/htmlfiles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ <h1>{{ title|escape }}:
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>

<nav>
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think I would use a <nav> element here. The information here isn't navigation.

<p>
<a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
created at {{ time_stamp }}
</p>
</nav>
</header>

<main id="index">
Expand Down Expand Up @@ -109,12 +116,12 @@ <h1>{{ title|escape }}:
</main>

<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
created at {{ time_stamp }}
</p>
</div>
</nav>
</footer>

</body>
Expand Down
11 changes: 9 additions & 2 deletions coverage/htmlfiles/pyfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ <h2>
<button type="button" class="button_first_chunk" data-shortcut="1">Goto first highlighted chunk</button>
</div>
</div>

<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
created at {{ time_stamp }}
</p>
</nav>
</header>

<main id="source">
Expand Down Expand Up @@ -108,12 +115,12 @@ <h2>
</main>

<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
created at {{ time_stamp }}
</p>
</div>
</nav>
</footer>

</body>
Expand Down
14 changes: 7 additions & 7 deletions coverage/htmlfiles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ a.nav { text-decoration: none; color: inherit; }

a.nav:hover { text-decoration: underline; color: inherit; }

header { background: #f8f8f8; width: 100%; z-index: 2; border-bottom: 1px solid #ccc; }
header { background: #f8f8f8; width: 100%; z-index: 2; border-bottom: 1px solid #ccc; padding: 1rem 1rem; }

@media (prefers-color-scheme: dark) { header { background: black; } }

@media (prefers-color-scheme: dark) { header { border-color: #333; } }

header .content { padding: 1rem 3.5rem; }
header .content { padding: 0 2.5rem; }

header nav { margin-top: 1em; }

header h2 { margin-top: .5em; font-size: 1em; }

Expand All @@ -52,13 +54,11 @@ header.sticky ~ #source { padding-top: 6.5em; }

main { position: relative; z-index: 1; }

.indexfile footer { margin: 1rem 3.5rem; }

.pyfile footer { margin: 1rem 1rem; }
footer { margin: 1rem 1rem; }

footer .content { padding: 0; color: #666; font-style: italic; }
nav { padding: 0; color: #666; font-style: italic; }

@media (prefers-color-scheme: dark) { footer .content { color: #aaa; } }
@media (prefers-color-scheme: dark) { nav { color: #aaa; } }

#index { margin: 1rem 0 0 3.5rem; }

Expand Down
15 changes: 8 additions & 7 deletions coverage/htmlfiles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,14 @@ header {
z-index: 2;
border-bottom: 1px solid $light-gray3;
@include border-color-dark($dark-gray2);
padding: 1rem 1rem;

.content {
padding: 1rem $left-gutter;
padding: 0 ($left-gutter - 1rem);
}

nav {
margin-top: 1em;
}

h2 {
Expand Down Expand Up @@ -208,15 +213,11 @@ main {
z-index: 1;
}

.indexfile footer {
margin: 1rem $left-gutter;
}

.pyfile footer {
footer {
margin: 1rem 1rem;
}

footer .content {
nav {
padding: 0;
color: $light-gray5;
@include color-dark($dark-gray5);
Expand Down
14 changes: 10 additions & 4 deletions tests/gold/html/a/a_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ <h2>
<button type="button" class="button_first_chunk" data-shortcut="1">Goto first highlighted chunk</button>
</div>
</div>
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:00 -0400
</p>
</nav>
</header>
<main id="source">
<p class="run"><span class="n"><a id="t1" href="#t1">1</a></span><span class="t"><span class="key">if</span> <span class="num">1</span> <span class="op">&lt;</span> <span class="num">2</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
Expand All @@ -64,12 +70,12 @@ <h2>
<p class="mis show_mis"><span class="n"><a id="t5" href="#t5">5</a></span><span class="t"> <span class="nam">a</span> <span class="op">=</span> <span class="num">4</span>&nbsp;</span><span class="r"></span></p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.1.1a0">coverage.py v6.1.1a0</a>,
created at 2021-10-30 16:07 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:00 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/a/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ <h1>Coverage report:
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:01 -0400
</p>
</nav>
</header>
<main id="index">
<table class="index" data-sortable>
Expand Down Expand Up @@ -71,12 +77,12 @@ <h1>Coverage report:
</p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.1a0">coverage.py v6.1a0</a>,
created at 2021-10-23 08:16 -0400
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:01 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/b_branch/b_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ <h2>
<button type="button" class="button_first_chunk" data-shortcut="1">Goto first highlighted chunk</button>
</div>
</div>
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</nav>
</header>
<main id="source">
<p class="run"><span class="n"><a id="t1" href="#t1">1</a></span><span class="t"><span class="key">def</span> <span class="nam">one</span><span class="op">(</span><span class="nam">x</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
Expand Down Expand Up @@ -88,12 +94,12 @@ <h2>
<p class="run"><span class="n"><a id="t27" href="#t27">27</a></span><span class="t"><span class="nam">three</span><span class="op">(</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.1.1a0">coverage.py v6.1.1a0</a>,
created at 2021-10-30 16:07 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/b_branch/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ <h1>Coverage report:
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</nav>
</header>
<main id="index">
<table class="index" data-sortable>
Expand Down Expand Up @@ -79,12 +85,12 @@ <h1>Coverage report:
</p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.1a0">coverage.py v6.1a0</a>,
created at 2021-10-23 08:16 -0400
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/bom/bom_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ <h2>
<button type="button" class="button_first_chunk" data-shortcut="1">Goto first highlighted chunk</button>
</div>
</div>
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</nav>
</header>
<main id="source">
<p class="pln"><span class="n"><a id="t1" href="#t1">1</a></span><span class="t"><span class="com"># A Python source file in utf-8, with BOM.</span>&nbsp;</span><span class="r"></span></p>
Expand All @@ -70,12 +76,12 @@ <h2>
<p class="mis show_mis"><span class="n"><a id="t11" href="#t11">11</a></span><span class="t"> <span class="key">assert</span> <span class="nam">len</span><span class="op">(</span><span class="nam">math</span><span class="op">.</span><span class="nam">decode</span><span class="op">(</span><span class="str">'utf-8'</span><span class="op">)</span><span class="op">)</span> <span class="op">==</span> <span class="num">18</span>&nbsp;</span><span class="r"></span></p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.1.1a0">coverage.py v6.1.1a0</a>,
created at 2021-10-30 16:07 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/bom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ <h1>Coverage report:
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</nav>
</header>
<main id="index">
<table class="index" data-sortable>
Expand Down Expand Up @@ -71,12 +77,12 @@ <h1>Coverage report:
</p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.1a0">coverage.py v6.1a0</a>,
created at 2021-10-23 08:16 -0400
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/isolatin1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ <h1>Coverage report:
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</nav>
</header>
<main id="index">
<table class="index" data-sortable>
Expand Down Expand Up @@ -71,12 +77,12 @@ <h1>Coverage report:
</p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.1a0">coverage.py v6.1a0</a>,
created at 2021-10-23 08:16 -0400
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/isolatin1/isolatin1_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ <h2>
<button type="button" class="button_first_chunk" data-shortcut="1">Goto first highlighted chunk</button>
</div>
</div>
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</nav>
</header>
<main id="source">
<p class="pln"><span class="n"><a id="t1" href="#t1">1</a></span><span class="t"><span class="com"># -*- coding: iso8859-1 -*-</span>&nbsp;</span><span class="r"></span></p>
Expand All @@ -64,12 +70,12 @@ <h2>
<p class="run"><span class="n"><a id="t5" href="#t5">5</a></span><span class="t"><span class="key">assert</span> <span class="nam">len</span><span class="op">(</span><span class="nam">math</span><span class="op">)</span> <span class="op">==</span> <span class="num">18</span>&nbsp;</span><span class="r"></span></p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.1.1a0">coverage.py v6.1.1a0</a>,
created at 2021-10-30 16:07 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
14 changes: 10 additions & 4 deletions tests/gold/html/omit_1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ <h1>Coverage report:
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</nav>
</header>
<main id="index">
<table class="index" data-sortable>
Expand Down Expand Up @@ -92,12 +98,12 @@ <h1>Coverage report:
</p>
</main>
<footer>
<div class="content">
<nav>
<p>
<a class="nav" href="https://coverage.readthedocs.io/en/6.1a0">coverage.py v6.1a0</a>,
created at 2021-10-23 08:16 -0400
<a class="nav" href="https://coverage.readthedocs.io/en/6.3.3a0">coverage.py v6.3.3a0</a>,
created at 2022-04-08 16:03 -0400
</p>
</div>
</nav>
</footer>
</body>
</html>
Loading