Skip to content

Commit 04481de

Browse files
authored
chribel:1.1.0 (#3286)
1 parent afaeb94 commit 04481de

File tree

9 files changed

+1051
-0
lines changed

9 files changed

+1051
-0
lines changed
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
EUROPEAN UNION PUBLIC LICENCE v. 1.2
2+
EUPL © the European Union 2007, 2016
3+
4+
This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined below) which is provided under the
5+
terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such
6+
use is covered by a right of the copyright holder of the Work).
7+
The Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following
8+
notice immediately following the copyright notice for the Work:
9+
Licensed under the EUPL
10+
or has expressed by any other means his willingness to license under the EUPL.
11+
12+
1.Definitions
13+
In this Licence, the following terms have the following meaning:
14+
— ‘The Licence’:this Licence.
15+
— ‘The Original Work’:the work or software distributed or communicated by the Licensor under this Licence, available
16+
as Source Code and also as Executable Code as the case may be.
17+
— ‘Derivative Works’:the works or software that could be created by the Licensee, based upon the Original Work or
18+
modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work
19+
required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in
20+
the country mentioned in Article 15.
21+
— ‘The Work’:the Original Work or its Derivative Works.
22+
— ‘The Source Code’:the human-readable form of the Work which is the most convenient for people to study and
23+
modify.
24+
— ‘The Executable Code’:any code which has generally been compiled and which is meant to be interpreted by
25+
a computer as a program.
26+
— ‘The Licensor’:the natural or legal person that distributes or communicates the Work under the Licence.
27+
— ‘Contributor(s)’:any natural or legal person who modifies the Work under the Licence, or otherwise contributes to
28+
the creation of a Derivative Work.
29+
— ‘The Licensee’ or ‘You’:any natural or legal person who makes any usage of the Work under the terms of the
30+
Licence.
31+
— ‘Distribution’ or ‘Communication’:any act of selling, giving, lending, renting, distributing, communicating,
32+
transmitting, or otherwise making available, online or offline, copies of the Work or providing access to its essential
33+
functionalities at the disposal of any other natural or legal person.
34+
35+
2.Scope of the rights granted by the Licence
36+
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable licence to do the following, for
37+
the duration of copyright vested in the Original Work:
38+
— use the Work in any circumstance and for all usage,
39+
— reproduce the Work,
40+
— modify the Work, and make Derivative Works based upon the Work,
41+
— communicate to the public, including the right to make available or display the Work or copies thereof to the public
42+
and perform publicly, as the case may be, the Work,
43+
— distribute the Work or copies thereof,
44+
— lend and rent the Work or copies thereof,
45+
— sublicense rights in the Work or copies thereof.
46+
Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the
47+
applicable law permits so.
48+
In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed
49+
by law in order to make effective the licence of the economic rights here above listed.
50+
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to any patents held by the Licensor, to the
51+
extent necessary to make use of the rights granted on the Work under this Licence.
52+
53+
3.Communication of the Source Code
54+
The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as
55+
Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with
56+
each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to
57+
the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to
58+
distribute or communicate the Work.
59+
60+
4.Limitations on copyright
61+
Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the
62+
exclusive rights of the rights owners in the Work, of the exhaustion of those rights or of other applicable limitations
63+
thereto.
64+
65+
5.Obligations of the Licensee
66+
The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those
67+
obligations are the following:
68+
69+
Attribution right: The Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to
70+
the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the
71+
Licence with every copy of the Work he/she distributes or communicates. The Licensee must cause any Derivative Work
72+
to carry prominent notices stating that the Work has been modified and the date of modification.
73+
74+
Copyleft clause: If the Licensee distributes or communicates copies of the Original Works or Derivative Works, this
75+
Distribution or Communication will be done under the terms of this Licence or of a later version of this Licence unless
76+
the Original Work is expressly distributed only under this version of the Licence — for example by communicating
77+
‘EUPL v. 1.2 only’. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the
78+
Work or Derivative Work that alter or restrict the terms of the Licence.
79+
80+
Compatibility clause: If the Licensee Distributes or Communicates Derivative Works or copies thereof based upon both
81+
the Work and another work licensed under a Compatible Licence, this Distribution or Communication can be done
82+
under the terms of this Compatible Licence. For the sake of this clause, ‘Compatible Licence’ refers to the licences listed
83+
in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with
84+
his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail.
85+
86+
Provision of Source Code: When distributing or communicating copies of the Work, the Licensee will provide
87+
a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available
88+
for as long as the Licensee continues to distribute or communicate the Work.
89+
Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names
90+
of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and
91+
reproducing the content of the copyright notice.
92+
93+
6.Chain of Authorship
94+
The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or
95+
licensed to him/her and that he/she has the power and authority to grant the Licence.
96+
Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or
97+
licensed to him/her and that he/she has the power and authority to grant the Licence.
98+
Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions
99+
to the Work, under the terms of this Licence.
100+
101+
7.Disclaimer of Warranty
102+
The Work is a work in progress, which is continuously improved by numerous Contributors. It is not a finished work
103+
and may therefore contain defects or ‘bugs’ inherent to this type of development.
104+
For the above reason, the Work is provided under the Licence on an ‘as is’ basis and without warranties of any kind
105+
concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or
106+
errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this
107+
Licence.
108+
This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work.
109+
110+
8.Disclaimer of Liability
111+
Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be
112+
liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the
113+
Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss
114+
of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However,
115+
the Licensor will be liable under statutory product liability laws as far such laws apply to the Work.
116+
117+
9.Additional agreements
118+
While distributing the Work, You may choose to conclude an additional agreement, defining obligations or services
119+
consistent with this Licence. However, if accepting obligations, You may act only on your own behalf and on your sole
120+
responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify,
121+
defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by
122+
the fact You have accepted any warranty or additional liability.
123+
124+
10.Acceptance of the Licence
125+
The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ placed under the bottom of a window
126+
displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of
127+
applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms
128+
and conditions.
129+
Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You
130+
by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution
131+
or Communication by You of the Work or copies thereof.
132+
133+
11.Information to the public
134+
In case of any Distribution or Communication of the Work by means of electronic communication by You (for example,
135+
by offering to download the Work from a remote location) the distribution channel or media (for example, a website)
136+
must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence
137+
and the way it may be accessible, concluded, stored and reproduced by the Licensee.
138+
139+
12.Termination of the Licence
140+
The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms
141+
of the Licence.
142+
Such a termination will not terminate the licences of any person who has received the Work from the Licensee under
143+
the Licence, provided such persons remain in full compliance with the Licence.
144+
145+
13.Miscellaneous
146+
Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the
147+
Work.
148+
If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or
149+
enforceability of the Licence as a whole. Such provision will be construed or reformed so as necessary to make it valid
150+
and enforceable.
151+
The European Commission may publish other linguistic versions or new versions of this Licence or updated versions of
152+
the Appendix, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence.
153+
New versions of the Licence will be published with a unique version number.
154+
All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take
155+
advantage of the linguistic version of their choice.
156+
157+
14.Jurisdiction
158+
Without prejudice to specific agreement between parties,
159+
— any litigation resulting from the interpretation of this License, arising between the European Union institutions,
160+
bodies, offices or agencies, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice
161+
of the European Union, as laid down in article 272 of the Treaty on the Functioning of the European Union,
162+
— any litigation arising between other parties and resulting from the interpretation of this License, will be subject to
163+
the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business.
164+
165+
15.Applicable Law
166+
Without prejudice to specific agreement between parties,
167+
— this Licence shall be governed by the law of the European Union Member State where the Licensor has his seat,
168+
resides or has his registered office,
169+
— this licence shall be governed by Belgian law if the Licensor has no seat, residence or registered office inside
170+
a European Union Member State.
171+
172+
173+
Appendix
174+
175+
‘Compatible Licences’ according to Article 5 EUPL are:
176+
— GNU General Public License (GPL) v. 2, v. 3
177+
— GNU Affero General Public License (AGPL) v. 3
178+
— Open Software License (OSL) v. 2.1, v. 3.0
179+
— Eclipse Public License (EPL) v. 1.0
180+
— CeCILL v. 2.0, v. 2.1
181+
— Mozilla Public Licence (MPL) v. 2
182+
— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
183+
— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for works other than software
184+
— European Union Public Licence (EUPL) v. 1.1, v. 1.2
185+
— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity (LiLiQ-R+).
186+
187+
The European Commission may update this Appendix to later versions of the above licences without producing
188+
a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the
189+
covered Source Code from exclusive appropriation.
190+
All other changes or additions to this Appendix require the production of a new EUPL version.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Chribel
2+
3+
"Chribel" is a Swiss German word for a rough sketch (like crayon drawings drawn by babies).
4+
5+
![](docs/chribel-template.png)
6+
7+
This template can be used for summaries or, I don't know, technical documentation? It's a rather informal template.
8+
9+
**How to use the template** is described...
10+
11+
- ...in the [Manual](docs/manual.pdf)
12+
- ...when copying this template
13+
- ...when looking into the `template` folder in the repository
14+
15+
## Changelog
16+
17+
## 1.1.0
18+
19+
- Expanded `#callout` functions with support for custom render functions (via parameter `func: ..`)
20+
- Added `style` parameter to `#callout` with three options: `"minimal"`, `"quarto"` and `"compact"`
21+
- Added callou type `"caution"` and `"important"`.
22+
- Removed `sticky` parameter from raw blocks
23+
- Adjusted heading vertical spacing
24+
25+
## 1.0.0
26+
27+
- initial release -- added functions `#callout`\ `#chribel`, `#chribel-add-callout-template`
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
#import "@preview/tableau-icons:0.334.1": ti-icon
2+
3+
#let chribel-callout-templates = state("chribel-callout-templates", (
4+
// quarto based callouts
5+
info: (
6+
color: rgb("#2780e3"),
7+
icon: "info-circle",
8+
placeholder: context (de: "Information").at(text.lang, default: "Information"),
9+
),
10+
warning: (
11+
color: rgb("#ff7518"),
12+
icon: "alert-triangle",
13+
placeholder: context (de: "Warnung").at(text.lang, default: "Warning"),
14+
),
15+
important: (
16+
color: rgb("#ff0039"),
17+
icon: "exclamation-circle",
18+
placeholder: context (de: "Wichtig").at(text.lang, default: "Important"),
19+
),
20+
tip: (
21+
color: rgb("#3fb618"),
22+
icon: "bulb",
23+
placeholder: context (de: "Tipp").at(text.lang, default: "Tip"),
24+
),
25+
caution: (
26+
color: rgb("#f0ad4e"),
27+
icon: "traffic-cone",
28+
placeholder: context (de: "Vorsicht").at(text.lang, default: "Caution"),
29+
30+
),
31+
32+
// my callouts
33+
correct: (
34+
color: green.darken(5%),
35+
icon: "check",
36+
placeholder: context (de: "Korrekt").at(text.lang, default: "Correct"),
37+
),
38+
incorrect: (
39+
color: red.darken(5%),
40+
icon: "x",
41+
placeholder: context (de: "Inkorrekt").at(text.lang, default: "Incorrect"),
42+
),
43+
example: (
44+
color: rgb("#966FD6"),
45+
icon: "tools",
46+
placeholder: context (de: "Beispiel").at(text.lang, default: "Example"),
47+
),
48+
))
49+
50+
#let chribel-add-callout-template(name, config) = context {
51+
52+
if type(config) != dictionary {
53+
panic("given config is not a dictionary")
54+
}
55+
56+
if (config.keys().map(x => x not in ("color","icon","placeholder")).any(n => n)) {
57+
panic("config must have 'color', 'icon' and 'placeholder' keys and respective values")
58+
}
59+
60+
if type(name) != str {
61+
panic("template name must be a string")
62+
}
63+
64+
if ((type(config.at("color")) != color) or (type(config.at("icon")) != str) or (type(config.at("placeholder")) != str)) {
65+
panic("config values are not of correct type - expected (color: color, icon: str,placeholder: str)")
66+
}
67+
68+
chribel-callout-templates.update(old => {
69+
old.insert(name,config)
70+
old
71+
})
72+
}
73+
74+
75+
76+
#let callout(style: "minimal", type: "info", title: none, content, width: 100%, height: auto, icon: auto, paint: none, func: none) = context {
77+
let radius = 3pt
78+
let inset = (top: 8pt, rest: 6pt)
79+
80+
let config = chribel-callout-templates.final().at(type, default: (
81+
color: gray,
82+
icon: "question-mark",
83+
placeholder: context (de: "Kein Zugehöriger Titel").at(text.lang, default: "No Associated Title"),
84+
))
85+
86+
let paint = if paint == none { config.color } else { paint }
87+
let icon = if icon == auto { config.icon } else { icon }
88+
let title = if title == none { config.placeholder } else { title }
89+
90+
set text(0.9em)
91+
92+
if std.type(func) == function {
93+
return func(title,ti-icon(icon),content,paint,height,width)
94+
}
95+
96+
align(center,
97+
if style == "minimal" {
98+
block(
99+
above: 1.5em,
100+
below: 1.5em,
101+
width: width,
102+
height: height,
103+
stroke: paint + 0.5pt,
104+
inset: inset,
105+
radius: radius,
106+
{
107+
set align(left)
108+
// title block
109+
place(top + left, dy: -inset.top - 0.5em, dx: -1pt, box(
110+
fill: white,
111+
inset: if icon != none { (left: 1pt, right: 2pt) } else { (x: 2pt) },
112+
outset: (y: 1pt),
113+
114+
115+
grid(
116+
column-gutter: 2pt, align: center + horizon,
117+
columns: if icon == none {
118+
auto
119+
} else {
120+
(1em, auto)
121+
}, rows: 1em,
122+
..(
123+
if icon != none {
124+
(ti-icon(icon, fill: paint),)
125+
}
126+
+ (text(weight: "bold", paint, title),)
127+
)
128+
),
129+
))
130+
content
131+
},
132+
)
133+
} else if style == "quarto" {
134+
135+
block(
136+
width: width,
137+
height: height,
138+
stroke: (left: paint+2pt, rest: paint+0.5pt),
139+
radius: 3pt,
140+
clip: true,
141+
inset: (left: 1pt, right: 0.25pt),
142+
grid(rows: (1.5em,height),
143+
align: left+horizon,
144+
145+
block(
146+
inset: (left: 0.25em),
147+
fill: paint.lighten(85%),
148+
width: 100%,
149+
height: 100%)[#box(ti-icon(icon, fill:paint,baseline: -0.33em),height: 0pt) #text(strong(title), rgb("#343a40"))],
150+
block(content, inset: (0.5em))
151+
)
152+
)
153+
})
154+
if style == "compact" {
155+
box(outset: (y:0.3em), inset: (x: 0.2em), radius: 0.3em,fill: paint.lighten(85%),)[#box(ti-icon(icon, fill:paint,baseline: -0.825em),height: 0pt) #text(strong(title), rgb("#343a40"))] + h(0.4em, weak: true) + content
156+
}
157+
}

0 commit comments

Comments
 (0)