aboutsummaryrefslogtreecommitdiff
path: root/contrib/gns/gns-bcd-simple.tex
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2021-10-14 21:22:40 +0200
committerAlessio Vanni <vannilla@firemail.cc>2021-11-21 15:23:26 +0100
commit48ccb35c9aea178d7103c3f198946c1bcbcc080c (patch)
treeefa23246d4b5a657d2a311a326346483ff1a5e54 /contrib/gns/gns-bcd-simple.tex
parent5cbf93d3c6c7a058d9a7893e2a3583a2b5b30d0e (diff)
downloadgnunet-48ccb35c9aea178d7103c3f198946c1bcbcc080c.tar.gz
gnunet-48ccb35c9aea178d7103c3f198946c1bcbcc080c.zip
Improve gnunet-bcd and update logo used in generated cards
The HTML forms now use a custom CSS instead of importing Bootstrap 4. This new CSS is basd on Bootstrap 5 with some minimal differences to make it look a bit like the older theme. Bootstrap was removed because these pages don't need its full power and also because it was difficult for some text editors to handle the one-long-line minified CSS embedded in the HTML. Since the forms are just a series of label + input elements, using a specific set of directives doesn't add any significant maintenance cost while making editing easiers. A new form to generate a simplified card was added. This card is desgined to reduce the leftover whitespace when some optional entries are left blank in the "full" form, while at the same time giving importance to the QR code containing the GNS address. Its layout can be improved. The simplified form can also be used to generate a PNG picture of the QR code, so that it can be included in other graphical media other than a business card, for example on a flyer or in the signature of a HTML-based e-mail. Generally, the gnunet-bcd service should provide a slightly better user experience, even if it's just to provide different pages for different errors but with a unified style. The logo used in the cards has been changed from the previous "gnu in front of a spiderweb" illustration to the new "gnu-shaped network of peers" image. It is also now a pure TikZ picture instead of being made using PSTricks, because, apparently, there is an incompatibility between the two packages in recent versions which made it impossible to compile the file. As a consequence of the incompatibility between TikZ and PSTricks, the QR code is now generated using the 'qrcode' package. This commit contains some changes to FCFS, but they're just some minor fixes and are unrelated to the changes to BCD.
Diffstat (limited to 'contrib/gns/gns-bcd-simple.tex')
-rw-r--r--contrib/gns/gns-bcd-simple.tex160
1 files changed, 160 insertions, 0 deletions
diff --git a/contrib/gns/gns-bcd-simple.tex b/contrib/gns/gns-bcd-simple.tex
new file mode 100644
index 000000000..453fd6c47
--- /dev/null
+++ b/contrib/gns/gns-bcd-simple.tex
@@ -0,0 +1,160 @@
1\documentclass[a4paper,oneside]{scrartcl}
2\usepackage[utf8]{inputenc}
3\usepackage[T1]{fontenc}
4\usepackage{tikz}
5\usepackage{ifthen}
6\usepackage{qrcode}
7\usepackage[newdimens]{labels}
8
9\LabelCols=2
10\LabelRows=5
11\LeftPageMargin=17.0mm
12\RightPageMargin=17.0mm
13\TopPageMargin=10.0mm
14\BottomPageMargin=10.0mm
15\InterLabelColumn=3.5mm
16\InterLabelRow=3.0mm
17\numberoflabels=10
18\LabelGridtrue
19
20\renewcommand{\rmdefault}{phv}
21\renewcommand{\seriesdefault}{m}
22\renewcommand{\shapedefault}{n}
23
24\input{def.tex}
25
26\setlength\parindent{0pt}
27
28\newcommand{\logo}{
29 \begin{tikzpicture}
30 [every node/.style={circle,fill=black!73,inner sep=0pt,minimum size=2.2mm},
31 every edge/.style={draw,semithick},
32 x=1pt,y=1pt]
33 \node (p1) at (21.57,-219.43) {};
34 \node (p2) at (41.44,-168.86) {}
35 edge (p1);
36 \node (p3) at (54.16,-130.86) {}
37 edge (p2);
38 \node (p4) at (-21.62,-219.43) {}
39 edge (p1);
40 \node (p5) at (10.41,-158.90) {}
41 edge (p2);
42 \node (p6) at (-22.20,-173.21) {}
43 edge (p4);
44 \node (p9) at (-147.32,-37.53) {};
45 \node (p10) at (-97.30,-18.50) {}
46 edge (p9);
47 \node (p11) at (74.95,-89.64) {}
48 edge (p3);
49 \node (p12) at (-0.20,-182.48) {}
50 edge (p1)
51 edge (p4)
52 edge (p5)
53 edge (p6)
54 edge (p3);
55 \node (p13) at (18.79,-190.31) {}
56 edge (p2)
57 edge (p1)
58 edge (p5)
59 edge (p4);
60 \node (p14) at (-46.77,-141.82) {}
61 edge (p6)
62 edge (p4);
63 \node (p15) at (-14.08,-141.91) {}
64 edge (p5)
65 edge (p6)
66 edge (p12);
67 \node (p16) at (-96.66,-90.02) {};
68 \node (p17) at (-71.34,-90.78) {}
69 edge (p16)
70 edge (p14);
71 \node (p18) at (-25.92,-109.84) {}
72 edge (p15)
73 edge (p17)
74 edge (p14);
75 \node (p19) at (-46.78,-94.06) {}
76 edge (p18)
77 edge (p17)
78 edge (p14)
79 edge (p15);
80 \node (p20) at (51.95,-67.01) {}
81 edge (p3)
82 edge (p11);
83 \node (p21) at (29.21,-103.63) {}
84 edge (p11)
85 edge (p20)
86 edge (p3)
87 edge (p5)
88 edge (p2);
89 \node (p22) at (-116.84,-55.89) {}
90 edge (p10)
91 edge (p9);
92 \node (p23) at (-61.14,-62.16) {}
93 edge (p18)
94 edge (p19)
95 edge (p17)
96 edge (p16);
97 \node (p24) at (107.08,-62.78) {}
98 edge (p20)
99 edge (p11);
100 \node (p25) at (131.66,-76.41) {}
101 edge (p24)
102 edge (p11)
103 edge (p20);
104 \node (p26) at (29.59,-139.18) {}
105 edge (p3)
106 edge (p21)
107 edge (p2)
108 edge (p5);
109 \node (p28) at (-137.12,-66.58) {}
110 edge (p22)
111 edge (p9)
112 edge (p10)
113 edge (p16);
114 \node (p29) at (-84.94,-72.38) {}
115 edge (p23)
116 edge (p22)
117 edge (p16)
118 edge (p28);
119 \node (p30) at (145.17,-37.49) {}
120 edge (p25)
121 edge (p24);
122 \node (p31) at (102.20,-18.50) {}
123 edge (p30)
124 edge (p25);
125 \end{tikzpicture}
126}
127
128\newcommand{\card}{
129 \begin{tikzpicture}
130 [every node/.style={rectangle,fill=white,minimum height=7pt,inner sep=0pt},
131 medium text/.style={text width=37.5mm},
132 slight text/.style={text width=30mm},
133 important text/.style={text width=41mm},
134 font=\tiny]
135 \begin{scope}[xshift=10mm]
136 \node[important text] (prefix) at (0, 4mm) {
137 \ifthenelse{\equal{\prefix}{}}{}{\tiny \prefix}
138 };
139 \node[important text] (name) at (0,0mm) {
140 \fontsize{9pt}{9pt}\selectfont
141 \textbf{\name}\ifthenelse{\equal{\suffix}{}}{}{, \tiny \suffix}
142 };
143 \node[important text] (jobtitle) at (0, -4mm) {\jobtitle};
144 \end{scope}
145 \begin{scope}[xshift=8.5mm,yshift=-1.23mm]
146 \node[medium text] (mail) at (0, -10mm) {\email};
147 \node[medium text] (homepage) at (0, -13.25mm) {\homepage};
148 \end{scope}
149 \begin{scope}[xshift=53.5mm]
150 \node (qrcode) at (0,-9mm) {
151 \qrcode[height=24.2mm,level=Q]{gnunet://gns/\gns}
152 };
153 \node[scale=0.16] (logo) at (0,13mm) {\logo};
154 \end{scope}
155 \end{tikzpicture}
156}
157
158\begin{document}
159\addresslabel{\card}
160\end{document}