* [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates
@ 2015-12-30 21:04 W. Trevor King
2015-12-30 21:04 ` [PATCH 1/2] nmbug-status: Adjust headers to start with h1 W. Trevor King
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: W. Trevor King @ 2015-12-30 21:04 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
W. Trevor King
Polishing the templates a bit. Details in the individual patches.
Cheers,
Trevor
W. Trevor King (2):
nmbug-status: Adjust headers to start with h1
nmbug-status: Fix unbalanced <p> tags in default header/footer
devel/nmbug/nmbug-status | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--
2.1.0.60.g85f0837
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] nmbug-status: Adjust headers to start with h1
2015-12-30 21:04 [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates W. Trevor King
@ 2015-12-30 21:04 ` W. Trevor King
2016-01-07 13:20 ` David Bremner
2015-12-30 21:04 ` [PATCH 2/2] nmbug-status: Fix unbalanced <p> tags in default header/footer W. Trevor King
2015-12-31 13:46 ` [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates Tomi Ollila
2 siblings, 1 reply; 12+ messages in thread
From: W. Trevor King @ 2015-12-30 21:04 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
W. Trevor King
We've been leading off with h2s since 3e5fb88f (contrib/nmbug: add
nmbug-status script, 2012-07-07), but the semantically-correct headers
are:
<h1>{title}</h1>
...
<h2>Views</h2>
...
<h3>View 1</h3>
...
<h3>View 2</h3>
...
We can always add additional CSS if the default h1 formatting is too
intense.
---
devel/nmbug/nmbug-status | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index b36b6ad..8fd736c 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -367,10 +367,10 @@ header_template = config['meta'].get('header', '''<!DOCTYPE html>
</style>
</head>
<body>
-<h2>{title}</h2>
+<h1>{title}</h1>
{blurb}
</p>
-<h3>Views</h3>
+<h2>Views</h2>
''')
footer_template = config['meta'].get('footer', '''
--
2.1.0.60.g85f0837
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] nmbug-status: Fix unbalanced <p> tags in default header/footer
2015-12-30 21:04 [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates W. Trevor King
2015-12-30 21:04 ` [PATCH 1/2] nmbug-status: Adjust headers to start with h1 W. Trevor King
@ 2015-12-30 21:04 ` W. Trevor King
2016-01-13 14:36 ` David Bremner
2015-12-31 13:46 ` [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates Tomi Ollila
2 siblings, 1 reply; 12+ messages in thread
From: W. Trevor King @ 2015-12-30 21:04 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
W. Trevor King
These were broken by b70386a4 (Move the generated date from the top of
the page to the footer, 2014-05-31), which moved 'Generated ...' to
the footer with the opening tag, but didn't replace the blurb opening
tag or add a closing tag after 'Generated ...'.
---
devel/nmbug/nmbug-status | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 8fd736c..f33f660 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -368,6 +368,7 @@ header_template = config['meta'].get('header', '''<!DOCTYPE html>
</head>
<body>
<h1>{title}</h1>
+<p>
{blurb}
</p>
<h2>Views</h2>
@@ -375,7 +376,7 @@ header_template = config['meta'].get('header', '''<!DOCTYPE html>
footer_template = config['meta'].get('footer', '''
<hr>
-<p>Generated: {datetime}
+<p>Generated: {datetime}</p>
</body>
</html>
''')
--
2.1.0.60.g85f0837
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates
2015-12-30 21:04 [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates W. Trevor King
2015-12-30 21:04 ` [PATCH 1/2] nmbug-status: Adjust headers to start with h1 W. Trevor King
2015-12-30 21:04 ` [PATCH 2/2] nmbug-status: Fix unbalanced <p> tags in default header/footer W. Trevor King
@ 2015-12-31 13:46 ` Tomi Ollila
2015-12-31 16:43 ` W. Trevor King
2 siblings, 1 reply; 12+ messages in thread
From: Tomi Ollila @ 2015-12-31 13:46 UTC (permalink / raw)
To: W. Trevor King, notmuch
On Wed, Dec 30 2015, "W. Trevor King" <wking@tremily.us> wrote:
> Polishing the templates a bit. Details in the individual patches.
This series LGTM. (html) tidy complains about imo irrelevant things -- or
I just did not know how to use it correctly -- as `| tidy -eq`.
>
> Cheers,
> Trevor
Tomi
PS: it was a bit difficult to test, had to resort to reading sources
and experment with some git commands. So (i.e. Note to self):
$ git --git-dir ./.nmbug cat-file -p remotes/origin/config:status-config.json > ~/tmp/nmbug...
$ PYTHONPATH=$PWD/bindings/python python2.7 devel/nmbug/nmbug-status --config ~/tmp/nmbug...
(and | tidy -eq )
>
> W. Trevor King (2):
> nmbug-status: Adjust headers to start with h1
> nmbug-status: Fix unbalanced <p> tags in default header/footer
>
> devel/nmbug/nmbug-status | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> --
> 2.1.0.60.g85f0837
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates
2015-12-31 13:46 ` [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates Tomi Ollila
@ 2015-12-31 16:43 ` W. Trevor King
2016-01-01 11:30 ` Tomi Ollila
0 siblings, 1 reply; 12+ messages in thread
From: W. Trevor King @ 2015-12-31 16:43 UTC (permalink / raw)
To: Tomi Ollila; +Cc: notmuch
[-- Attachment #1: Type: text/plain, Size: 2178 bytes --]
On Thu, Dec 31, 2015 at 03:46:50PM +0200, Tomi Ollila wrote:
> This series LGTM. (html) tidy complains about imo irrelevant things
> -- or I just did not know how to use it correctly -- as `| tidy
> -eq`.
That doesn't complain about anything with the current tidy 5.1.25 [1]
with output built by this branch (although I ran it on output for a
non-notmuch tag-set).
> PS: it was a bit difficult to test, had to resort to reading sources
> and experment with some git commands. So (i.e. Note to self):
>
> $ git --git-dir ./.nmbug cat-file -p remotes/origin/config:status-config.json > ~/tmp/nmbug...
There's a sample status-config.json in devel/nmbug/, so you don't have
to check with the version in the nmbug repository if you don't want
to.
> $ PYTHONPATH=$PWD/bindings/python python2.7 devel/nmbug/nmbug-status --config ~/tmp/nmbug...
Yeah, if you don't have the ‘notmuch’ package installed globally,
you'll need to do something like this (although nmbug-status should
work with Python 2.6+, including the 3.x line). The error you get
from not having notmuch installed should be fairly understandable
though:
$ nmbug-status
Traceback (most recent call last):
File "./nmbug-status", line 422, in <module>
import notmuch
ImportError: No module named 'notmuch'
So I'd recommend either:
$ PYTHONPATH=$PWD/bindings/python python2.7 devel/nmbug/nmbug-status --config devel/nmbug/status-config.json
or installing notmuch with its Python bindings using your package
manager and running:
$ ./devel/nmbug/nmbug-status --config devel/nmbug/status-config.json
Cheers,
Trevor
[1]: http://www.html-tidy.org/
“Tidy reborn, Thanks for the efforts of HTACG and prominent
contributors, HTML Tidy has a whole new heartbeat and a whole new
life.”
Maybe your distro-packaged tidy is just old? I have Tidy
20090325 from Gentoo, but 5.1.25 was cut on 2015-11-23 [2].
[2]: https://github.com/htacg/tidy-html5/releases
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates
2015-12-31 16:43 ` W. Trevor King
@ 2016-01-01 11:30 ` Tomi Ollila
2016-01-01 17:43 ` W. Trevor King
0 siblings, 1 reply; 12+ messages in thread
From: Tomi Ollila @ 2016-01-01 11:30 UTC (permalink / raw)
To: W. Trevor King; +Cc: notmuch
On Thu, Dec 31 2015, "W. Trevor King" <wking@tremily.us> wrote:
> On Thu, Dec 31, 2015 at 03:46:50PM +0200, Tomi Ollila wrote:
>> This series LGTM. (html) tidy complains about imo irrelevant things
>> -- or I just did not know how to use it correctly -- as `| tidy
>> -eq`.
>
> That doesn't complain about anything with the current tidy 5.1.25 [1]
> with output built by this branch (although I ran it on output for a
> non-notmuch tag-set).
yes, I have old tidy (20091203), and the complaints were about
utf8-characters (being invalid) in output and summary attribute missing in
tables; i.e. nothing about the well-formity of the syntax...
Tomi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates
2016-01-01 11:30 ` Tomi Ollila
@ 2016-01-01 17:43 ` W. Trevor King
2016-01-01 19:33 ` Tomi Ollila
0 siblings, 1 reply; 12+ messages in thread
From: W. Trevor King @ 2016-01-01 17:43 UTC (permalink / raw)
To: Tomi Ollila; +Cc: notmuch
[-- Attachment #1: Type: text/plain, Size: 745 bytes --]
On Fri, Jan 01, 2016 at 01:30:57PM +0200, Tomi Ollila wrote:
> yes, I have old tidy (20091203), and the complaints were about
> utf8-characters (being invalid) in output and
UTF-8 should be valid, because we declare the charset in:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
If you feel like the UTF-8 complaints are valid, can you post more
details about them?
> … summary attribute missing in tables…
This attribute seems like it's obsolete [1].
Cheers,
Trevor
[1]: http://www.w3.org/TR/html5/obsolete.html#attr-table-summary
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates
2016-01-01 17:43 ` W. Trevor King
@ 2016-01-01 19:33 ` Tomi Ollila
0 siblings, 0 replies; 12+ messages in thread
From: Tomi Ollila @ 2016-01-01 19:33 UTC (permalink / raw)
To: W. Trevor King; +Cc: notmuch
On Fri, Jan 01 2016, "W. Trevor King" <wking@tremily.us> wrote:
> On Fri, Jan 01, 2016 at 01:30:57PM +0200, Tomi Ollila wrote:
>> yes, I have old tidy (20091203), and the complaints were about
>> utf8-characters (being invalid) in output and
>
> UTF-8 should be valid, because we declare the charset in:
>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>
> If you feel like the UTF-8 complaints are valid, can you post more
> details about them?
IMO UTF-8 complaints are INvalid ! i.e. everything ok there.
Tomi
>> … summary attribute missing in tables…
>
> This attribute seems like it's obsolete [1].
I believe that :D
i.e. everything looks ok to me.
Tomi
>
> Cheers,
> Trevor
>
> [1]: http://www.w3.org/TR/html5/obsolete.html#attr-table-summary
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] nmbug-status: Adjust headers to start with h1
2015-12-30 21:04 ` [PATCH 1/2] nmbug-status: Adjust headers to start with h1 W. Trevor King
@ 2016-01-07 13:20 ` David Bremner
2016-01-07 13:51 ` [PATCH] nmbug-status: Style headers with smaller fonts W. Trevor King
0 siblings, 1 reply; 12+ messages in thread
From: David Bremner @ 2016-01-07 13:20 UTC (permalink / raw)
To: W. Trevor King, notmuch
"W. Trevor King" <wking@tremily.us> writes:
> We've been leading off with h2s since 3e5fb88f (contrib/nmbug: add
> nmbug-status script, 2012-07-07), but the semantically-correct headers
> are:
>
> <h1>{title}</h1>
> ...
> <h2>Views</h2>
> ...
> <h3>View 1</h3>
> ...
> <h3>View 2</h3>
> ...
>
> We can always add additional CSS if the default h1 formatting is too
> intense.
I'm pretty sure it will be, at least for me, since that's the reason I
did it this way in the first place. I'm (obviously) not a web person,
how about providing some CSS to roughly duplicate the current visuals?
d
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] nmbug-status: Style headers with smaller fonts
2016-01-07 13:20 ` David Bremner
@ 2016-01-07 13:51 ` W. Trevor King
2016-01-07 21:58 ` Tomi Ollila
0 siblings, 1 reply; 12+ messages in thread
From: W. Trevor King @ 2016-01-07 13:51 UTC (permalink / raw)
To: notmuch
We only use h1 through h3, and David prefers smaller headers [1], so
shift over to the font sizes usually used for h2 through h4 [2,3,4].
I haven't bothered with the W3C's default margins, since a bit of
extra whitespace doesn't seem like a big deal.
[1]: id:87k2nl8r0k.fsf@zancas.localnet
http://article.gmane.org/gmane.mail.notmuch.general/21595
[2]: http://www.w3.org/TR/html-markup/h2.html
[3]: http://www.w3.org/TR/html-markup/h3.html
[4]: http://www.w3.org/TR/html-markup/h4.html
---
On Thu, Jan 07, 2016 at 09:20:59AM -0400, David Bremner wrote:
> W. Trevor King writes:
> > We can always add additional CSS if the default h1 formatting is
> > too intense.
>
> I'm pretty sure it will be, at least for me, since that's the reason
> I did it this way in the first place. I'm (obviously) not a web
> person, how about providing some CSS to roughly duplicate the
> current visuals?
Here you go :).
Cheers,
Trevor
devel/nmbug/nmbug-status | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index f33f660..0382919 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -327,6 +327,15 @@ header_template = config['meta'].get('header', '''<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset={encoding}" />
<title>{title}</title>
<style media="screen" type="text/css">
+ h1 {{
+ font-size: 1.5em;
+ }}
+ h2 {{
+ font-size: 1.17em;
+ }}
+ h3 {{
+ font-size: 100%;
+ }}
table {{
border-spacing: 0;
}}
--
2.1.0.60.g85f0837
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] nmbug-status: Style headers with smaller fonts
2016-01-07 13:51 ` [PATCH] nmbug-status: Style headers with smaller fonts W. Trevor King
@ 2016-01-07 21:58 ` Tomi Ollila
0 siblings, 0 replies; 12+ messages in thread
From: Tomi Ollila @ 2016-01-07 21:58 UTC (permalink / raw)
To: W. Trevor King, notmuch
On Thu, Jan 07 2016, "W. Trevor King" <wking@tremily.us> wrote:
> We only use h1 through h3, and David prefers smaller headers [1], so
> shift over to the font sizes usually used for h2 through h4 [2,3,4].
> I haven't bothered with the W3C's default margins, since a bit of
> extra whitespace doesn't seem like a big deal.
>
> [1]: id:87k2nl8r0k.fsf@zancas.localnet
> http://article.gmane.org/gmane.mail.notmuch.general/21595
> [2]: http://www.w3.org/TR/html-markup/h2.html
> [3]: http://www.w3.org/TR/html-markup/h3.html
> [4]: http://www.w3.org/TR/html-markup/h4.html
> ---
> On Thu, Jan 07, 2016 at 09:20:59AM -0400, David Bremner wrote:
>> W. Trevor King writes:
>> > We can always add additional CSS if the default h1 formatting is
>> > too intense.
>>
>> I'm pretty sure it will be, at least for me, since that's the reason
>> I did it this way in the first place. I'm (obviously) not a web
>> person, how about providing some CSS to roughly duplicate the
>> current visuals?
>
> Here you go :).
Looks good, matches the [2], [3], [4] (well enough, spacing differences
are so small) and applies.
Tomi
>
> Cheers,
> Trevor
>
> devel/nmbug/nmbug-status | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
> index f33f660..0382919 100755
> --- a/devel/nmbug/nmbug-status
> +++ b/devel/nmbug/nmbug-status
> @@ -327,6 +327,15 @@ header_template = config['meta'].get('header', '''<!DOCTYPE html>
> <meta http-equiv="Content-Type" content="text/html; charset={encoding}" />
> <title>{title}</title>
> <style media="screen" type="text/css">
> + h1 {{
> + font-size: 1.5em;
> + }}
> + h2 {{
> + font-size: 1.17em;
> + }}
> + h3 {{
> + font-size: 100%;
> + }}
> table {{
> border-spacing: 0;
> }}
> --
> 2.1.0.60.g85f0837
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] nmbug-status: Fix unbalanced <p> tags in default header/footer
2015-12-30 21:04 ` [PATCH 2/2] nmbug-status: Fix unbalanced <p> tags in default header/footer W. Trevor King
@ 2016-01-13 14:36 ` David Bremner
0 siblings, 0 replies; 12+ messages in thread
From: David Bremner @ 2016-01-13 14:36 UTC (permalink / raw)
To: W. Trevor King, notmuch
Cc: Tomi Ollila, Jani Nikula, Carl Worth, W. Trevor King
"W. Trevor King" <wking@tremily.us> writes:
> These were broken by b70386a4 (Move the generated date from the top of
> the page to the footer, 2014-05-31), which moved 'Generated ...' to
> the footer with the opening tag, but didn't replace the blurb opening
> tag or add a closing tag after 'Generated ...'.
Pushed all 3 of these 2 patches.
d
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-01-13 14:36 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-30 21:04 [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates W. Trevor King
2015-12-30 21:04 ` [PATCH 1/2] nmbug-status: Adjust headers to start with h1 W. Trevor King
2016-01-07 13:20 ` David Bremner
2016-01-07 13:51 ` [PATCH] nmbug-status: Style headers with smaller fonts W. Trevor King
2016-01-07 21:58 ` Tomi Ollila
2015-12-30 21:04 ` [PATCH 2/2] nmbug-status: Fix unbalanced <p> tags in default header/footer W. Trevor King
2016-01-13 14:36 ` David Bremner
2015-12-31 13:46 ` [PATCH 0/2] nmbug-status: h1 title and unbalanced <p> fixups to default templates Tomi Ollila
2015-12-31 16:43 ` W. Trevor King
2016-01-01 11:30 ` Tomi Ollila
2016-01-01 17:43 ` W. Trevor King
2016-01-01 19:33 ` Tomi Ollila
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).