user/dev discussion of public-inbox itself
 help / color / Atom feed
81a2a50273426ca5ad02be2c470f14b67bf4f4b0 blob 3676 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
 
# Copyright (C) 2019 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>

# Self-updating module containing a sample CSS for client-side
# customization by users of public-inbox.  Used by Makefile.PL
package PublicInbox::UserContent;
use strict;
use warnings;

# this sub is updated automatically:
sub CSS () {
	<<'_'
	/*
	 * CC0-1.0 <PI-LINK-13d3e5b8f77dcc2cc6ed0777c04d7c4e2185b283>
	 * Dark color scheme using 216 web-safe colors, inspired
	 * somewhat by the default color scheme in mutt.
	 * It reduces eyestrain for me, and energy usage for all:
	 * PI-LINK-98cda84d945bca21e8d42f3ce39b7ecba9000aea
	 */
	* { background:#000 !important; color:#ccc !important }

	/*
	 * Underlined links add visual noise which make them hard-to-read.
	 * Use colors to make them stand out, instead.
	 */
	a { color:#69f !important; text-decoration:none !important }
	a:visited { color:#96f !important }

	/* quoted text in emails gets a different color */
	*.q { color:#09f !important }

	/*
	 * these may be used with cgit <PI-LINK-583ebc1b9fd866998df0f207bfd2565726065d0f>, too.
	 * (cgit uses <div>, public-inbox uses <span>)
	 */
	*.add { color:#0ff !important } /* diff post-image lines */
	*.del { color:#f0f !important } /* diff pre-image lines */
	*.head { color:#fff !important } /* diff header (metainformation) */
	*.hunk { color:#c93 !important } /* diff hunk-header */

	/*
	 * highlight 3.x colors (tested 3.18) for displaying blobs.
	 * This doesn't use most of the colors available, as I find too
	 * many colors overwhelming, so the default is commented out.
	 */
	.hl.num { color:#f30 !important } /* number */
	.hl.esc { color:#f0f !important } /* escape character */
	.hl.str { color:#f30 !important } /* string */
	.hl.ppc { color:#f0f !important } /* preprocessor */
	.hl.pps { color:#f30 !important } /* preprocessor string */
	.hl.slc { color:#09f !important } /* single-line comment */
	.hl.com { color:#09f !important } /* multi-line comment */
	/* .hl.opt { color:#ccc !important } */ /* operator */
	/* .hl.ipl { color:#ccc !important } */ /* interpolation */

	/* keyword groups kw[a-z] */
	.hl.kwa { color:#ff0 !important }
	.hl.kwb { color:#0f0 !important }
	.hl.kwc { color:#ff0 !important }
	/* .hl.kwd { color:#ccc !important } */

	/* line-number (unused by public-inbox) */
	/* .hl.lin { color:#ccc !important } */
_
}
# end of auto-updated sub

# return a sample CSS
sub sample ($$) {
	my ($ibx, $env) = @_;
	my $url_prefix = $ibx->base_url($env);
	my $preamble = <<"";
/*
 * Firefox users: this goes in \$PROFILE_FOLDER/chrome/userContent.css
 * where \$PROFILE_FOLDER is platform-specific
 *
 * cf. http://kb.mozillazine.org/UserContent.css
 *     http://kb.mozillazine.org/Profile_folder_-_Firefox
 *
 * Users of dillo can remove the entire lines with "moz-only"
 * in them and place the resulting file in ~/.dillo/style.css
 */
\@-moz-document url-prefix($url_prefix) { /* moz-only */

	$preamble . CSS() . "\n} /* moz-only */\n";
}

# Auto-update this file based on the contents of a CSS file:
# usage: perl -I lib __FILE__ contrib/css/216dark.css
# (See Makefile.PL)
if (scalar(@ARGV) == 1 && -r __FILE__) {
	open my $ro, '<', $ARGV[0] or die $!;
	my $css = do { local $/; <$ro> } or die $!;

	# indent one level:
	$css =~ s/^([ \t]*\S)/\t$1/smg;

	# "!important" overrides whatever the BOFH sets:
	$css =~ s/;/ !important;/sg;
	$css =~ s/(\w) \}/$1 !important }/msg;

	open my $rw, '+<', __FILE__ or die $!;
	my $out = do { local $/; <$rw> } or die $!;
	$out =~ s/^sub CSS.*^_\n\}/sub CSS () {\n\t<<'_'\n${css}_\n}/sm;
	seek $rw, 0, 0;
	print $rw $out or die $!;
	close $rw or die $!;
}

1;
debug log:

solving 81a2a50 ...
found 81a2a50 in https://80x24.org/public-inbox.git

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git