"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Tracey Emery <tracey@traceyemery.net>
Subject:
Re: gotwebd css: fix hscroll on error
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 3 Jan 2023 12:29:08 -0700

Download raw body.

Thread
On Tue, Jan 03, 2023 at 05:48:14PM +0100, Omar Polo wrote:
> This removes the horizontal scrolling bar when an error occurs.  An
> error may be rendered for various reason, one of which is viewing the
> summary for a repo that doesn't have any tags, or for a genuine error
> condition.
> 
> I've tested diff below both against repos without tags and with
> artificial errors injected like this:
> 
>     --- gotwebd/gotweb.c
>     +++ gotwebd/gotweb.c
>     @@ -156,6 +156,11 @@ gotweb_process_request(struct request *c)
>      		goto render;
>      	}
>      
>     +	if (1) {
>     +		error2 = got_error(GOT_ERR_QUERYSTRING);
>     +		goto render;
>     +	}
>     +
>      	if (qs->action != INDEX) {
>      		error = gotweb_init_repo_dir(&repo_dir, qs->path);
>      		if (error)
> 
> the page seems to be rendered fine in either case.  Make sure to clear
> the browser cache when testing.
> 
> ok?

yup, ok.

> 
> 
> diff /home/op/w/got
> commit - 3bf00f2542ea6e7825f52c155e5f3f5fecb136e3
> path + /home/op/w/got
> blob - 7ee40c3b69dbf14194f2d61478622267175c57c1
> file + gotwebd/files/htdocs/gotwebd/gotweb.css
> --- gotwebd/files/htdocs/gotwebd/gotweb.css
> +++ gotwebd/files/htdocs/gotwebd/gotweb.css
> @@ -301,7 +301,6 @@ body {
>  #err_content {
>  	clear: left;
>  	float: left;
> -	width: 100%;
>  	padding-left: 20px;
>  	padding-top: 20px;
>  	padding-bottom: 20px;
> 

-- 

Tracey Emery