From 35cc041d6e90bd7d3f5cafaadf196a54e1b02464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mekina?= Date: Fri, 26 Sep 2025 11:17:10 +0200 Subject: [PATCH] classic: add disclaimer for bp --- template/lang.json | 16 +++++++++++--- template/template_classic.typ | 41 +++++++++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/template/lang.json b/template/lang.json index 13d7471..9363df3 100644 --- a/template/lang.json +++ b/template/lang.json @@ -8,11 +8,16 @@ "dp": "Diplomová práce", "dis": "Disertační práce", - "city": "Liberec" + "city": "Liberec", + + "disclaimer": "Prohlášení", + "disclaimer_bp": "Prohlašuji, že svou bakalářskou práci jsem vypracoval samostatně jako původní dílo s použitím uvedené literatury a na základě konzultací s vedoucím mé bakalářské práce a konzultantem.\n\nJsem si vědom toho, že na mou bakalářskou práci se plně vztahuje zákon č. 121/2000 Sb., o právu autorském, zejména § 60 – školní dílo.\n\nBeru na vědomí, že Technická univerzita v Liberci nezasahuje do mých autorských práv užitím mé bakalářské práce pro vnitřní potřebu Technické univerzity v Liberci.\n\nUžiji-li bakalářskou práci nebo poskytnu-li licenci k jejímu využití, jsem si vědom povinnosti informovat o této skutečnosti Technic-kou univerzitu v Liberci; v tomto případě má Technická univerzita v Liberci právo ode mne požadovat úhradu nákladů, které vynaložila na vytvoření díla, až do jejich skutečné výše.\n\nSoučasně čestně prohlašuji, že text elektronické podoby práce vložený do IS/STAG se shoduje s textem tištěné podoby práce.\n\nBeru na vědomí, že má bakalářská práce bude zveřejněna Tech- nickou univerzitou v Liberci v souladu s § 47b zákona č. 111/1998 Sb., o vysokých školách a o změně a doplnění dalších zákonů (zá- kon o vysokých školách), ve znění pozdějších předpisů.\n\nJsem si vědom následků, které podle zákona o vysokých školách mohou vyplývat z porušení tohoto prohlášení.", + + "date": "[day]. [month]. [year]" }, "en": { - "author": "Autor", + "author": "Author", "supervisor": "Supervisor", "study_programme": "Study programme", @@ -20,6 +25,11 @@ "dp": "Diploma thesis", "dis": "Dissertation thesis", - "city": "Liberec" + "city": "Liberec", + + "disclaimer": "Declaration", + "disclaimer_bp": "I hereby certify, I, myself, have written my bachelor thesis as an original and primary work using the literature listed below and consulting it with my thesis supervisor and my thesis counsellor.\n\nI acknowledge that my bachelor thesis is fully governed by Act No. 121/2000 Coll., the Copyright Act, in particular Article 60 – School Work.\n\nI acknowledge that the Technical University of Liberec does not infringe my copyrights by using my bachelor thesis for internal purposes of the Technical University of Liberec.\n\nI am aware of my obligation to inform the Technical University of Liberec on having used or granted license to use the results of my bachelor thesis; in such a case the Technical University of Liberec may require reimbursement of the costs incurred for creating the result up to their actual amount.\n\nAt the same time, I honestly declare that the text of the printed version of my bachelor thesis is identical with the text of the electronic version uploaded into the IS STAG.\n\nI acknowledge that the Technical University of Liberec will make my bachelor thesis public in accordance with paragraph 47b of Act No. 111/1998 Coll., on Higher Education Institutions and on Amendment to Other Acts (the Higher Education Act), as amended.\n\nI am aware of the consequences which may under the Higher Education Act result from a breach of this declaration.", + + "date": "[year]-[month]-[day]" } } diff --git a/template/template_classic.typ b/template/template_classic.typ index f8fce14..5a3f2f5 100644 --- a/template/template_classic.typ +++ b/template/template_classic.typ @@ -99,6 +99,24 @@ }, margin: 2cm); } +#let disclaimer(language, faculty_id, disclaimer_type, author) = { + let disclaimers_for = ("bp"); + if type(disclaimer_type) == type(none) or disclaimer_type not in disclaimers_for { + return; + } + heading(get_lang_item(language, "disclaimer"), numbering: none, outlined: false); + par( + text(get_lang_item(language, "disclaimer_" + disclaimer_type)) + ); + v(5em); + grid( + columns: 2, + gutter: 1em, + block(text(datetime.today().display(get_lang_item(language, "date")), lang: "cs"), width: 100%), + text(author), + ); +} + #let abbrlist(language) = { import "abbreviations.typ": abbrlist context { @@ -129,6 +147,12 @@ citation_file, content, ) = { + let flip_bonding = if document_type == "bp" { + false + } else { + true + }; + // main page classic_mainpage(faculty_id, language, document_type, title, author, supervisor, study_programme); @@ -136,10 +160,20 @@ let faculty_color = faculty_color(faculty_id); set par(justify: true); set heading(numbering: "1.1.1 "); - set page(margin: (outside: 4cm, top: 3cm, bottom: 3cm), numbering: "1", footer: { + set page( + margin: if flip_bonding { + (inside: 4cm, top: 3cm, bottom: 3cm) + } else { + (left: 4cm, top: 3cm, bottom: 3cm) + }, + numbering: "1", footer: { context { let page = counter(page).get().at(0); - align(str(page), if calc.rem(page, 2) == 0 { right } else { left }) + if flip_bonding { + align(str(page), if calc.rem(page, 2) == 1 { right } else { left }); + } else { + align(str(page), right); + } } }); set text(font: serif_font); @@ -163,6 +197,9 @@ set highlight(fill: faculty_color.lighten(90%)); set image(width: 80%); + // disclaimer + disclaimer(language, faculty_id, document_type, author); + let language = lang_id(language); // toc