├── source ├── fonts │ ├── .gitkeep │ └── subset │ │ └── .gitkeep ├── images │ └── .gitkeep ├── styles │ ├── base │ │ ├── _media.scss │ │ ├── _layout.scss │ │ ├── _lists.scss │ │ ├── _tables.scss │ │ ├── _typography.scss │ │ └── _buttons.scss │ ├── vendor │ │ ├── bourbon │ │ │ └── bourbon │ │ │ │ ├── helpers │ │ │ │ ├── _buttons-list.scss │ │ │ │ ├── _text-inputs-list.scss │ │ │ │ └── _scales.scss │ │ │ │ ├── validators │ │ │ │ ├── _is-color.scss │ │ │ │ ├── _is-number.scss │ │ │ │ ├── _contains-falsy.scss │ │ │ │ ├── _is-length.scss │ │ │ │ ├── _is-size.scss │ │ │ │ └── _contains.scss │ │ │ │ ├── library │ │ │ │ ├── _strip-unit.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _hide-text.scss │ │ │ │ ├── _overflow-wrap.scss │ │ │ │ ├── _border-width.scss │ │ │ │ ├── _border-style.scss │ │ │ │ ├── _tint.scss │ │ │ │ ├── _shade.scss │ │ │ │ ├── _border-color.scss │ │ │ │ ├── _prefixer.scss │ │ │ │ ├── _value-prefixer.scss │ │ │ │ ├── _ellipsis.scss │ │ │ │ ├── _padding.scss │ │ │ │ ├── _margin.scss │ │ │ │ ├── _size.scss │ │ │ │ ├── _position.scss │ │ │ │ └── _timing-functions.scss │ │ │ │ └── utilities │ │ │ │ ├── _fetch-bourbon-setting.scss │ │ │ │ ├── _gamma.scss │ │ │ │ ├── _assign-inputs.scss │ │ │ │ ├── _lightness.scss │ │ │ │ ├── _contrast-ratio.scss │ │ │ │ ├── _unpack-shorthand.scss │ │ │ │ ├── _compact-shorthand.scss │ │ │ │ └── _font-source-declaration.scss │ │ └── neat │ │ │ ├── neat │ │ │ ├── functions │ │ │ │ ├── _neat-merge-defaults.scss │ │ │ │ ├── _neat-parse-media.scss │ │ │ │ ├── _neat-float-direction.scss │ │ │ │ ├── _neat-append-grid-visual.scss │ │ │ │ ├── _neat-opposite-direction.scss │ │ │ │ ├── _neat-column-default.scss │ │ │ │ ├── _retrieve-neat-settings.scss │ │ │ │ ├── _neat-parse-columns.scss │ │ │ │ ├── _neat-column-width.scss │ │ │ │ └── _neat-column-ratio.scss │ │ │ └── mixins │ │ │ │ ├── _grid-container.scss │ │ │ │ ├── _grid-shift.scss │ │ │ │ ├── _grid-collapse.scss │ │ │ │ ├── _grid-push.scss │ │ │ │ ├── _grid-visual.scss │ │ │ │ └── _grid-column.scss │ │ │ └── _neat.scss │ ├── main.scss │ └── utility │ │ ├── _reset.scss │ │ └── _settings.scss └── scripts │ ├── main.js │ └── partials │ └── featureDetection.js ├── content ├── home │ └── home.txt ├── site.txt └── error │ └── error.txt ├── kirby ├── views │ ├── snippets │ │ ├── footer.php │ │ └── header.php │ ├── php.php │ ├── fatal.php │ └── panel.php ├── config │ ├── blueprints │ │ ├── file.yml │ │ ├── page.yml │ │ └── site.yml │ ├── fields │ │ ├── hidden.php │ │ ├── gap.php │ │ ├── line.php │ │ ├── mixins │ │ │ ├── userpicker.php │ │ │ ├── filepicker.php │ │ │ ├── pagepicker.php │ │ │ ├── min.php │ │ │ └── options.php │ │ ├── range.php │ │ ├── select.php │ │ ├── info.php │ │ ├── tel.php │ │ ├── headline.php │ │ ├── radio.php │ │ ├── multiselect.php │ │ ├── url.php │ │ ├── email.php │ │ ├── number.php │ │ └── checkboxes.php │ ├── blueprints.php │ ├── sections │ │ ├── mixins │ │ │ ├── layout.php │ │ │ ├── min.php │ │ │ ├── empty.php │ │ │ ├── help.php │ │ │ ├── headline.php │ │ │ ├── max.php │ │ │ ├── pagination.php │ │ │ └── parent.php │ │ └── info.php │ ├── api │ │ ├── routes │ │ │ ├── translations.php │ │ │ ├── roles.php │ │ │ ├── languages.php │ │ │ └── auth.php │ │ ├── models │ │ │ ├── FileBlueprint.php │ │ │ ├── SiteBlueprint.php │ │ │ ├── UserBlueprint.php │ │ │ ├── Role.php │ │ │ ├── Translation.php │ │ │ ├── PageBlueprint.php │ │ │ └── Language.php │ │ ├── authentication.php │ │ ├── routes.php │ │ ├── models.php │ │ └── collections.php │ ├── presets │ │ ├── files.php │ │ └── pages.php │ ├── setup.php │ ├── urls.php │ └── fields.php ├── i18n │ └── rules │ │ ├── fi.json │ │ ├── nb.json │ │ ├── sv_SE.json │ │ ├── de.json │ │ ├── da.json │ │ ├── uk.json │ │ ├── hr.json │ │ ├── it.json │ │ ├── et.json │ │ ├── tr.json │ │ ├── eo.json │ │ ├── rm.json │ │ ├── az.json │ │ ├── lv.json │ │ ├── hu.json │ │ ├── cs.json │ │ ├── lt.json │ │ ├── pl.json │ │ ├── fr.json │ │ ├── ar.json │ │ ├── ka.json │ │ ├── fa.json │ │ ├── LICENSE │ │ ├── mk.json │ │ ├── bg.json │ │ ├── ru.json │ │ ├── hi.json │ │ ├── sr.json │ │ └── hy.json ├── panel │ └── dist │ │ ├── favicon.png │ │ ├── apple-touch-icon.png │ │ ├── favicon.svg │ │ └── js │ │ └── plugins.js ├── SECURITY.md ├── router.php ├── .editorconfig ├── src │ ├── Http │ │ ├── Exceptions │ │ │ └── NextRouteException.php │ │ ├── Request │ │ │ └── Auth │ │ │ │ ├── BearerAuth.php │ │ │ │ └── BasicAuth.php │ │ ├── Path.php │ │ ├── Query.php │ │ └── Idn.php │ ├── Cms │ │ ├── FilePermissions.php │ │ ├── SitePermissions.php │ │ ├── R.php │ │ ├── Visitor.php │ │ ├── S.php │ │ ├── Response.php │ │ ├── NestCollection.php │ │ ├── Html.php │ │ ├── NestObject.php │ │ ├── KirbyTags.php │ │ ├── Nest.php │ │ ├── UserBlueprint.php │ │ ├── KirbyTag.php │ │ ├── SiteBlueprint.php │ │ ├── UserPermissions.php │ │ ├── PagePermissions.php │ │ ├── SiteRules.php │ │ └── Search.php │ ├── Toolkit │ │ ├── Config.php │ │ ├── Facade.php │ │ ├── Tpl.php │ │ ├── Controller.php │ │ └── Silo.php │ ├── Exception │ │ ├── NotFoundException.php │ │ ├── LogicException.php │ │ ├── ErrorPageException.php │ │ ├── DuplicateException.php │ │ ├── PermissionException.php │ │ ├── BadMethodCallException.php │ │ └── InvalidArgumentException.php │ ├── Data │ │ ├── Json.php │ │ ├── Handler.php │ │ └── Xml.php │ ├── Form │ │ └── Fields.php │ ├── Cache │ │ └── NullCache.php │ ├── Database │ │ └── Sql │ │ │ └── Mysql.php │ └── Email │ │ └── Body.php ├── kirby.pub ├── bootstrap.php ├── assets │ └── whoops.css └── composer.json ├── site ├── plugins │ ├── kirby3-fingerprint │ │ ├── tests │ │ │ ├── content │ │ │ │ └── home │ │ │ │ │ ├── test.png.txt │ │ │ │ │ ├── home.txt │ │ │ │ │ └── test.png │ │ │ ├── assets │ │ │ │ ├── js │ │ │ │ │ ├── main.js │ │ │ │ │ └── templates │ │ │ │ │ │ └── default.js │ │ │ │ ├── css │ │ │ │ │ ├── main.css │ │ │ │ │ └── templates │ │ │ │ │ │ └── default.css │ │ │ │ └── asset.png │ │ │ ├── site │ │ │ │ ├── templates │ │ │ │ │ └── default.php │ │ │ │ └── plugins │ │ │ │ │ └── kirby3-fingerprint │ │ │ │ │ └── index.php │ │ │ ├── manifest.json │ │ │ └── bootstrap.php │ │ ├── .coveralls.yml │ │ ├── .php_cs.dist │ │ ├── .travis.yml │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ └── workflows │ │ │ │ └── test.yml │ │ ├── index.php │ │ ├── phpunit.xml │ │ └── LICENSE │ └── kirby-minify-html │ │ ├── .gitignore │ │ ├── composer.json │ │ ├── LICENSE │ │ └── index.php ├── blueprints │ ├── site.yml │ └── pages │ │ └── default.yml ├── templates │ └── default.php ├── config │ ├── config.example.com.php │ ├── config.localhost.php │ ├── thumbs.php │ └── routes.php ├── snippets │ ├── footer.php │ ├── sitemap.php │ └── header.php ├── models │ └── default.php └── controllers │ └── default.php ├── .gitattributes ├── .editorconfig ├── .gitignore ├── tasks ├── build.js ├── server.js └── watch.js ├── composer.json ├── Gulpfile.js ├── LICENSE └── index.php /source/fonts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/fonts/subset/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /content/home/home.txt: -------------------------------------------------------------------------------- 1 | Title: Home -------------------------------------------------------------------------------- /content/site.txt: -------------------------------------------------------------------------------- 1 | Title: Site Title -------------------------------------------------------------------------------- /content/error/error.txt: -------------------------------------------------------------------------------- 1 | Title: Error -------------------------------------------------------------------------------- /kirby/views/snippets/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /kirby/config/blueprints/file.yml: -------------------------------------------------------------------------------- 1 | name: File 2 | title: file 3 | -------------------------------------------------------------------------------- /kirby/config/fields/hidden.php: -------------------------------------------------------------------------------- 1 | false 5 | ]; 6 | -------------------------------------------------------------------------------- /kirby/config/fields/line.php: -------------------------------------------------------------------------------- 1 | false 5 | ]; 6 | -------------------------------------------------------------------------------- /site/plugins/kirby-minify-html/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | composer.lock 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/tests/assets/js/templates/default.js: -------------------------------------------------------------------------------- 1 | // @auto test 2 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/tests/assets/css/templates/default.css: -------------------------------------------------------------------------------- 1 | /* @auto test */ 2 | -------------------------------------------------------------------------------- /kirby/i18n/rules/fi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ä": "A", 3 | "Ö": "O", 4 | "ä": "a", 5 | "ö": "o" 6 | } 7 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/tests/manifest.json: -------------------------------------------------------------------------------- 1 | { "assets/css/main.css": "assets/css/main.1234567890.css" } 2 | -------------------------------------------------------------------------------- /kirby/panel/dist/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/S1SYPHOS/Gulp-Kirby-Starter-Kit/HEAD/kirby/panel/dist/favicon.png -------------------------------------------------------------------------------- /kirby/i18n/rules/nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "Æ": "AE", 3 | "Ø": "OE", 4 | "Å": "AA", 5 | "æ": "ae", 6 | "ø": "oe", 7 | "å": "aa" 8 | } 9 | -------------------------------------------------------------------------------- /kirby/config/blueprints/site.yml: -------------------------------------------------------------------------------- 1 | name: Site 2 | title: Site 3 | sections: 4 | pages: 5 | headline: Pages 6 | type: pages 7 | 8 | -------------------------------------------------------------------------------- /kirby/panel/dist/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/S1SYPHOS/Gulp-Kirby-Starter-Kit/HEAD/kirby/panel/dist/apple-touch-icon.png -------------------------------------------------------------------------------- /site/templates/default.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

title()->html() ?>

4 | 5 | 6 | -------------------------------------------------------------------------------- /kirby/i18n/rules/sv_SE.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ä": "A", 3 | "Å": "a", 4 | "Ö": "O", 5 | "ä": "a", 6 | "å": "a", 7 | "ö": "o" 8 | } 9 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/tests/site/plugins/kirby3-fingerprint/index.php: -------------------------------------------------------------------------------- 1 | render(); 6 | -------------------------------------------------------------------------------- /site/config/config.example.com.php: -------------------------------------------------------------------------------- 1 | 'production', 5 | 6 | # Deactivating debug mode 7 | 'debug' => false, 8 | ]; 9 | -------------------------------------------------------------------------------- /kirby/i18n/rules/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ä": "AE", 3 | "Ö": "OE", 4 | "Ü": "UE", 5 | "ß": "ss", 6 | "ä": "ae", 7 | "ö": "oe", 8 | "ü": "ue" 9 | } 10 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/tests/assets/asset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/S1SYPHOS/Gulp-Kirby-Starter-Kit/HEAD/site/plugins/kirby3-fingerprint/tests/assets/asset.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize line endings automatically 2 | * text=auto 3 | 4 | # Git stuff 5 | README.md export-ignore 6 | 7 | # PHP != Hacklang 8 | *.php linguist-language=PHP 9 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/tests/content/home/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/S1SYPHOS/Gulp-Kirby-Starter-Kit/HEAD/site/plugins/kirby3-fingerprint/tests/content/home/test.png -------------------------------------------------------------------------------- /kirby/i18n/rules/da.json: -------------------------------------------------------------------------------- 1 | { 2 | "Æ": "Ae", 3 | "æ": "ae", 4 | "Ø": "Oe", 5 | "ø": "oe", 6 | "Å": "Aa", 7 | "å": "aa", 8 | "É": "E", 9 | "é": "e" 10 | } 11 | -------------------------------------------------------------------------------- /kirby/i18n/rules/uk.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ґ": "G", 3 | "І": "I", 4 | "Ї": "Ji", 5 | "Є": "Ye", 6 | "ґ": "g", 7 | "і": "i", 8 | "ї": "ji", 9 | "є": "ye" 10 | } 11 | -------------------------------------------------------------------------------- /kirby/i18n/rules/hr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Č": "C", 3 | "Ć": "C", 4 | "Ž": "Z", 5 | "Š": "S", 6 | "Đ": "Dj", 7 | "č": "c", 8 | "ć": "c", 9 | "ž": "z", 10 | "š": "s", 11 | "đ": "dj" 12 | } -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/.coveralls.yml: -------------------------------------------------------------------------------- 1 | # https://github.com/php-coveralls/php-coveralls 2 | service_name: travis-ci 3 | coverage_clover: tests/logs/clover.xml 4 | json_path: tests/logs/coveralls-upload.json 5 | -------------------------------------------------------------------------------- /kirby/i18n/rules/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "À": "a", 3 | "È": "e", 4 | "Ì": "i", 5 | "Ò": "o", 6 | "Ù": "u", 7 | "à": "a", 8 | "é": "e", 9 | "è": "e", 10 | "ì": "i", 11 | "ò": "o", 12 | "ù": "u" 13 | } 14 | -------------------------------------------------------------------------------- /kirby/i18n/rules/et.json: -------------------------------------------------------------------------------- 1 | { 2 | "Š": "S", 3 | "Ž": "Z", 4 | "Õ": "O", 5 | "Ä": "A", 6 | "Ö": "O", 7 | "Ü": "U", 8 | "š": "s", 9 | "ž": "z", 10 | "õ": "o", 11 | "ä": "a", 12 | "ö": "o", 13 | "ü": "u" 14 | } -------------------------------------------------------------------------------- /kirby/config/blueprints.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/blueprints/file.yml', 5 | 'pages/default' => __DIR__ . '/blueprints/page.yml', 6 | 'site' => __DIR__ . '/blueprints/site.yml' 7 | ]; 8 | -------------------------------------------------------------------------------- /source/scripts/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * Importing functions .. 5 | */ 6 | 7 | import featureDetection from './partials/featureDetection'; 8 | 9 | 10 | /* 11 | * .. and executing them 12 | */ 13 | 14 | featureDetection(); 15 | -------------------------------------------------------------------------------- /source/styles/base/_layout.scss: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | } 4 | 5 | *, 6 | *::before, 7 | *::after { 8 | box-sizing: inherit; 9 | } 10 | 11 | html, 12 | body { 13 | height: 100%; 14 | } 15 | 16 | body { 17 | margin: 0; 18 | } 19 | -------------------------------------------------------------------------------- /kirby/i18n/rules/tr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ç": "C", 3 | "Ğ": "G", 4 | "İ": "I", 5 | "Ş": "S", 6 | "Ö": "O", 7 | "Ü": "U", 8 | "ç": "c", 9 | "ğ": "g", 10 | "ı": "i", 11 | "ş": "s", 12 | "ö": "o", 13 | "ü": "u" 14 | } 15 | -------------------------------------------------------------------------------- /source/styles/base/_lists.scss: -------------------------------------------------------------------------------- 1 | ul, 2 | ol { 3 | list-style-type: none; 4 | margin: 0; 5 | padding: 0; 6 | } 7 | 8 | dl { 9 | margin: 0; 10 | } 11 | 12 | dt { 13 | font-weight: 600; 14 | margin: 0; 15 | } 16 | 17 | dd { 18 | margin: 0; 19 | } 20 | -------------------------------------------------------------------------------- /kirby/i18n/rules/eo.json: -------------------------------------------------------------------------------- 1 | { 2 | "ĉ": "cx", 3 | "ĝ": "gx", 4 | "ĥ": "hx", 5 | "ĵ": "jx", 6 | "ŝ": "sx", 7 | "ŭ": "ux", 8 | "Ĉ": "CX", 9 | "Ĝ": "GX", 10 | "Ĥ": "HX", 11 | "Ĵ": "JX", 12 | "Ŝ": "SX", 13 | "Ŭ": "UX" 14 | } 15 | -------------------------------------------------------------------------------- /kirby/i18n/rules/rm.json: -------------------------------------------------------------------------------- 1 | { 2 | "ă": "a", 3 | "î": "i", 4 | "â": "a", 5 | "ş": "s", 6 | "ș": "s", 7 | "ţ": "t", 8 | "ț": "t", 9 | "Ă": "A", 10 | "Î": "I", 11 | "Â": "A", 12 | "Ş": "S", 13 | "Ș": "S", 14 | "Ţ": "T", 15 | "Ț": "T" 16 | } 17 | -------------------------------------------------------------------------------- /site/config/config.localhost.php: -------------------------------------------------------------------------------- 1 | 'development', 5 | 6 | # Activating debug mode 7 | 'debug' => true, 8 | 9 | # Disabling HTML minification 10 | 'afbora.kirby-minify-html.enabled' => false, 11 | ]; 12 | -------------------------------------------------------------------------------- /site/config/thumbs.php: -------------------------------------------------------------------------------- 1 | 'im', 8 | 'quality' => 85, 9 | 'interlace' => true, 10 | 11 | // Thumbnail presets 12 | 'presets' => [], 13 | ]; 14 | -------------------------------------------------------------------------------- /kirby/i18n/rules/az.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ə": "E", 3 | "Ç": "C", 4 | "Ğ": "G", 5 | "İ": "I", 6 | "Ş": "S", 7 | "Ö": "O", 8 | "Ü": "U", 9 | "ə": "e", 10 | "ç": "c", 11 | "ğ": "g", 12 | "ı": "i", 13 | "ş": "s", 14 | "ö": "o", 15 | "ü": "u" 16 | } 17 | -------------------------------------------------------------------------------- /source/scripts/partials/featureDetection.js: -------------------------------------------------------------------------------- 1 | // Simple JS feature detection 2 | export default function featureDetection() { 3 | let className = ''; 4 | let html = ''; 5 | html = document.documentElement; 6 | className = html.className.replace('no-js', 'js'); 7 | html.className = className; 8 | } 9 | -------------------------------------------------------------------------------- /kirby/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Please see the [Security Policy on the Kirby website](https://getkirby.com/security) for a list of the currently supported Kirby versions and of past security incidents as well as for information on how to report security vulnerabilities in the Kirby core or in the Panel. 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.yml] 13 | indent_size = 2 14 | 15 | [*.php] 16 | indent_size = 4 17 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/.php_cs.dist: -------------------------------------------------------------------------------- 1 | exclude('vendor') 5 | ->exclude('kirby') 6 | ->in(__DIR__) 7 | ; 8 | 9 | return PhpCsFixer\Config::create() 10 | ->setRules([ 11 | '@PSR2' => true, 12 | ]) 13 | ->setFinder($finder) 14 | ; -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/helpers/_buttons-list.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// A list of all HTML button elements. 4 | /// 5 | /// @type list 6 | /// 7 | /// @access private 8 | 9 | $_buttons-list: ( 10 | "button", 11 | "[type='button']", 12 | "[type='reset']", 13 | "[type='submit']", 14 | ); 15 | -------------------------------------------------------------------------------- /source/styles/main.scss: -------------------------------------------------------------------------------- 1 | @import 2 | 'vendor/bourbon/bourbon', 3 | 'vendor/neat/neat', 4 | 'utility/settings', 5 | 'utility/normalize', 6 | 'utility/reset', 7 | 'base/buttons', 8 | 'base/forms', 9 | 'base/layout', 10 | 'base/lists', 11 | 'base/media', 12 | 'base/tables', 13 | 'base/typography' 14 | ; 15 | -------------------------------------------------------------------------------- /kirby/i18n/rules/lv.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ā": "A", 3 | "Ē": "E", 4 | "Ģ": "G", 5 | "Ī": "I", 6 | "Ķ": "K", 7 | "Ļ": "L", 8 | "Ņ": "N", 9 | "Ū": "U", 10 | "ā": "a", 11 | "ē": "e", 12 | "ģ": "g", 13 | "ī": "i", 14 | "ķ": "k", 15 | "ļ": "l", 16 | "ņ": "n", 17 | "ū": "u" 18 | } 19 | -------------------------------------------------------------------------------- /kirby/i18n/rules/hu.json: -------------------------------------------------------------------------------- 1 | { 2 | "Á": "a", 3 | "É": "e", 4 | "Í": "i", 5 | "Ó": "o", 6 | "Ö": "o", 7 | "Ő": "o", 8 | "Ú": "u", 9 | "Ü": "u", 10 | "Ű": "u", 11 | "á": "a", 12 | "é": "e", 13 | "í": "i", 14 | "ó": "o", 15 | "ö": "o", 16 | "ő": "o", 17 | "ú": "u", 18 | "ü": "u", 19 | "ű": "u" 20 | } 21 | -------------------------------------------------------------------------------- /kirby/config/fields/mixins/userpicker.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'userpicker' => function (array $params = []) { 8 | $params['model'] = $this->model(); 9 | 10 | return (new UserPicker($params))->toArray(); 11 | } 12 | ] 13 | ]; 14 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/layout.php: -------------------------------------------------------------------------------- 1 | [ 5 | /** 6 | * Section layout. Available layout methods: `list`, `cards`. 7 | */ 8 | 'layout' => function (string $layout = 'list') { 9 | return $layout === 'cards' ? 'cards' : 'list'; 10 | } 11 | ] 12 | ]; 13 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/validators/_is-color.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid CSS color. 4 | /// 5 | /// @argument {string} $color 6 | /// 7 | /// @return {boolean} 8 | /// 9 | /// @access private 10 | 11 | @function _is-color($color) { 12 | @return (type-of($color) == color) or ($color == "currentColor"); 13 | } 14 | -------------------------------------------------------------------------------- /kirby/i18n/rules/cs.json: -------------------------------------------------------------------------------- 1 | { 2 | "Č": "C", 3 | "Ď": "D", 4 | "Ě": "E", 5 | "Ň": "N", 6 | "Ř": "R", 7 | "Š": "S", 8 | "Ť": "T", 9 | "Ů": "U", 10 | "Ž": "Z", 11 | "č": "c", 12 | "ď": "d", 13 | "ě": "e", 14 | "ň": "n", 15 | "ř": "r", 16 | "š": "s", 17 | "ť": "t", 18 | "ů": "u", 19 | "ž": "z" 20 | } 21 | -------------------------------------------------------------------------------- /kirby/i18n/rules/lt.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ą": "A", 3 | "Č": "C", 4 | "Ę": "E", 5 | "Ė": "E", 6 | "Į": "I", 7 | "Š": "S", 8 | "Ų": "U", 9 | "Ū": "U", 10 | "Ž": "Z", 11 | "ą": "a", 12 | "č": "c", 13 | "ę": "e", 14 | "ė": "e", 15 | "į": "i", 16 | "š": "s", 17 | "ų": "u", 18 | "ū": "u", 19 | "ž": "z" 20 | } 21 | -------------------------------------------------------------------------------- /kirby/i18n/rules/pl.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ą": "A", 3 | "Ć": "C", 4 | "Ę": "E", 5 | "Ł": "L", 6 | "Ń": "N", 7 | "Ó": "O", 8 | "Ś": "S", 9 | "Ź": "Z", 10 | "Ż": "Z", 11 | "ą": "a", 12 | "ć": "c", 13 | "ę": "e", 14 | "ł": "l", 15 | "ń": "n", 16 | "ó": "o", 17 | "ś": "s", 18 | "ź": "z", 19 | "ż": "z" 20 | } 21 | -------------------------------------------------------------------------------- /site/snippets/footer.php: -------------------------------------------------------------------------------- 1 | true]); 4 | } else { 5 | echo js('assets/scripts/main.js'); 6 | } 7 | ?> 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /kirby/config/fields/mixins/filepicker.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'filepicker' => function (array $params = []) { 8 | // fetch the parent model 9 | $params['model'] = $this->model(); 10 | 11 | return (new FilePicker($params))->toArray(); 12 | } 13 | ] 14 | ]; 15 | -------------------------------------------------------------------------------- /kirby/config/fields/mixins/pagepicker.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'pagepicker' => function (array $params = []) { 8 | // inject the current model 9 | $params['model'] = $this->model(); 10 | 11 | return (new PagePicker($params))->toArray(); 12 | } 13 | ] 14 | ]; 15 | -------------------------------------------------------------------------------- /kirby/router.php: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_strip-unit.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Strips the unit from a number. 4 | /// 5 | /// @argument {number} $value 6 | /// 7 | /// @return {number (unitless)} 8 | /// 9 | /// @example scss 10 | /// $dimension: strip-unit(10em); 11 | /// 12 | /// // Output 13 | /// $dimension: 10; 14 | 15 | @function strip-unit($value) { 16 | @return ($value / ($value * 0 + 1)); 17 | } 18 | -------------------------------------------------------------------------------- /kirby/src/Http/Exceptions/NextRouteException.php: -------------------------------------------------------------------------------- 1 | 10 | * @link https://getkirby.com 11 | * @copyright Bastian Allgeier GmbH 12 | * @license https://opensource.org/licenses/MIT 13 | */ 14 | class NextRouteException extends \Exception 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 7.2 3 | matrix: 4 | fast_finish: true 5 | install: composer install --no-interaction 6 | script: composer test 7 | after_success: travis_retry php vendor/bin/php-coveralls -v 8 | notifications: 9 | webhooks: 10 | on_success: change 11 | on_failure: always 12 | on_start: never 13 | urls: 14 | - https://webhooks.gitter.im/e/77d9949056dc0462d25d 15 | -------------------------------------------------------------------------------- /kirby/src/Cms/FilePermissions.php: -------------------------------------------------------------------------------- 1 | 10 | * @link https://getkirby.com 11 | * @copyright Bastian Allgeier GmbH 12 | * @license https://getkirby.com/license 13 | */ 14 | class FilePermissions extends ModelPermissions 15 | { 16 | protected $category = 'files'; 17 | } 18 | -------------------------------------------------------------------------------- /kirby/src/Cms/SitePermissions.php: -------------------------------------------------------------------------------- 1 | 10 | * @link https://getkirby.com 11 | * @copyright Bastian Allgeier GmbH 12 | * @license https://getkirby.com/license 13 | */ 14 | class SitePermissions extends ModelPermissions 15 | { 16 | protected $category = 'site'; 17 | } 18 | -------------------------------------------------------------------------------- /site/models/default.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | This page is currently offline. We are very sorry for the inconvenience and will fix it as soon as possible. 5 |

6 |

7 | Advice for developers and administrators:
8 | Change the PHP version to 7.2, 7.3 or 7.4 (PHP 7.3 or 7.4 are recommended) 9 |

10 | 11 | 12 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/validators/_contains-falsy.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks if a list does not contain any values. 4 | /// 5 | /// @argument {list} $list 6 | /// The list to check against. 7 | /// 8 | /// @return {boolean} 9 | /// 10 | /// @access private 11 | 12 | @function _contains-falsy($list) { 13 | @each $item in $list { 14 | @if not $item { 15 | @return true; 16 | } 17 | } 18 | 19 | @return false; 20 | } 21 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/validators/_is-length.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid CSS length. 4 | /// 5 | /// @argument {string} $value 6 | /// 7 | /// @return {boolean} 8 | /// 9 | /// @access private 10 | 11 | @function _is-length($value) { 12 | @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc" 13 | or index(auto inherit initial 0, $value) 14 | or (type-of($value) == "number" and not(unitless($value)))); 15 | } 16 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/validators/_is-size.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid CSS size. 4 | /// 5 | /// @argument {string} $value 6 | /// 7 | /// @return {boolean} 8 | /// 9 | /// @require {function} _contains 10 | /// 11 | /// @require {function} _is-length 12 | /// 13 | /// @access private 14 | 15 | @function _is-size($value) { 16 | @return _is-length($value) 17 | or _contains("fill" "fit-content" "min-content" "max-content", $value); 18 | } 19 | -------------------------------------------------------------------------------- /kirby/kirby.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Ux4q7LmQ5hfTYTtz3/a 3 | mohFJMWo/iCnxVcY84PZjLwWnT+G2DTKGaEWydB77TteJQnmsgtvO5734oj3Ga3r 4 | QCfwr2gxo/0WDEBq7C5HP+YNJiuZ/iD/tYV+gloF+Aaa3Mo8AK5DYH3dnjuyfHc1 5 | veIlYX1D2MXji2IRqdweAzVi1dfI4I3Ys8awhzv653vFLj5LvAtlwlYlmYeRwci7 6 | GkAOWw709CuKQNdPBXGFQQ/pEB5mnp8mI31j8og845u6v/Sk4+85gFORSufIRfnQ 7 | GFYrPOeavxfAWQGjh7JQjr/sbKSXaJ3nDlrYsOPIrC0Rwn/jsQPO7OLdVwkc9ofL 8 | GQIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_fetch-bourbon-setting.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Return a Bourbon setting. 4 | /// 5 | /// @argument {string} $setting 6 | /// 7 | /// @return {boolean | color | list | number | string} 8 | /// 9 | /// @example scss 10 | /// _fetch-bourbon-setting(rails-asset-pipeline) 11 | /// 12 | /// @access private 13 | 14 | @function _fetch-bourbon-setting($setting) { 15 | @return map-get(map-merge($_bourbon-defaults, $bourbon), $setting); 16 | } 17 | -------------------------------------------------------------------------------- /site/controllers/default.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://opensource.org/licenses/MIT 14 | */ 15 | class Config extends Silo 16 | { 17 | /** 18 | * @var array 19 | */ 20 | public static $data = []; 21 | } 22 | -------------------------------------------------------------------------------- /source/styles/base/_tables.scss: -------------------------------------------------------------------------------- 1 | table { 2 | border-collapse: collapse; 3 | margin: $base-spacing 0; 4 | table-layout: fixed; 5 | text-align: left; 6 | width: 100%; 7 | } 8 | 9 | thead { 10 | line-height: $heading-line-height; 11 | vertical-align: bottom; 12 | } 13 | 14 | tbody { 15 | vertical-align: top; 16 | } 17 | 18 | tr { 19 | border-bottom: $base-border; 20 | } 21 | 22 | th { 23 | font-weight: 600; 24 | } 25 | 26 | th, 27 | td { 28 | padding: $small-spacing $small-spacing $small-spacing 0; 29 | } 30 | -------------------------------------------------------------------------------- /site/snippets/sitemap.php: -------------------------------------------------------------------------------- 1 | '; ?> 2 | 3 | 4 | uri(), $ignore)) continue ?> 5 | 6 | url()) ?> 7 | modified('c', 'date') ?> 8 | isHomePage()) ? 1 : number_format(0.5 / $page->depth(), 1) ?> 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/min.php: -------------------------------------------------------------------------------- 1 | [ 5 | /** 6 | * Sets the minimum number of required entries in the section 7 | */ 8 | 'min' => function (int $min = null) { 9 | return $min; 10 | } 11 | ], 12 | 'methods' => [ 13 | 'validateMin' => function () { 14 | if ($this->min && $this->min > $this->total) { 15 | return false; 16 | } 17 | 18 | return true; 19 | } 20 | ] 21 | ]; 22 | -------------------------------------------------------------------------------- /kirby/views/fatal.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | This page is currently offline due to an unexpected error. We are very sorry for the inconvenience and will fix it as soon as possible. 5 |

6 |

7 | Advice for developers and administrators:
8 | Enable debug mode to get further information about the error. 9 |

10 | 11 | 12 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/empty.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * Sets the text for the empty state box 9 | */ 10 | 'empty' => function ($empty = null) { 11 | return I18n::translate($empty, $empty); 12 | } 13 | ], 14 | 'computed' => [ 15 | 'empty' => function () { 16 | if ($this->empty) { 17 | return $this->model()->toString($this->empty); 18 | } 19 | } 20 | ] 21 | ]; 22 | -------------------------------------------------------------------------------- /kirby/i18n/rules/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "À": "A", 3 | "Â": "A", 4 | "Æ": "AE", 5 | "Ç": "C", 6 | "É": "E", 7 | "È": "E", 8 | "Ê": "E", 9 | "Ë": "E", 10 | "Ï": "I", 11 | "Î": "I", 12 | "Ô": "O", 13 | "Œ": "OE", 14 | "Ù": "U", 15 | "Û": "U", 16 | "Ü": "U", 17 | "à": "a", 18 | "â": "a", 19 | "æ": "ae", 20 | "ç": "c", 21 | "é": "e", 22 | "è": "e", 23 | "ê": "e", 24 | "ë": "e", 25 | "ï": "i", 26 | "î": "i", 27 | "ô": "o", 28 | "œ": "oe", 29 | "ù": "u", 30 | "û": "u", 31 | "ü": "u", 32 | "ÿ": "y", 33 | "Ÿ": "Y" 34 | } 35 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides an easy way to include a clearfix for containing floats. 4 | /// 5 | /// @link https://goo.gl/yP5hiZ 6 | /// 7 | /// @example scss 8 | /// .element { 9 | /// @include clearfix; 10 | /// } 11 | /// 12 | /// // CSS Output 13 | /// .element::after { 14 | /// clear: both; 15 | /// content: ""; 16 | /// display: block; 17 | /// } 18 | 19 | @mixin clearfix { 20 | &::after { 21 | clear: both; 22 | content: ""; 23 | display: block; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kirby/i18n/rules/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "أ" : "a", 3 | "ب" : "b", 4 | "ت" : "t", 5 | "ث" : "th", 6 | "ج" : "g", 7 | "ح" : "h", 8 | "خ" : "kh", 9 | "د" : "d", 10 | "ذ" : "th", 11 | "ر" : "r", 12 | "ز" : "z", 13 | "س" : "s", 14 | "ش" : "sh", 15 | "ص" : "s", 16 | "ض" : "d", 17 | "ط" : "t", 18 | "ظ" : "th", 19 | "ع" : "aa", 20 | "غ" : "gh", 21 | "ف" : "f", 22 | "ق" : "k", 23 | "ك" : "k", 24 | "ل" : "l", 25 | "م" : "m", 26 | "ن" : "n", 27 | "ه" : "h", 28 | "و" : "o", 29 | "ي" : "y" 30 | } 31 | -------------------------------------------------------------------------------- /kirby/src/Cms/R.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://getkirby.com/license 15 | */ 16 | class R extends Facade 17 | { 18 | /** 19 | * @return \Kirby\Http\Request 20 | */ 21 | public static function instance() 22 | { 23 | return App::instance()->request(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kirby/config/fields/mixins/min.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'min' => function () { 6 | // set min to at least 1, if required 7 | if ($this->required === true) { 8 | return $this->min ?? 1; 9 | } 10 | 11 | return $this->min; 12 | }, 13 | 'required' => function () { 14 | // set required to true if min is set 15 | if ($this->min) { 16 | return true; 17 | } 18 | 19 | return $this->required; 20 | } 21 | ] 22 | ]; 23 | -------------------------------------------------------------------------------- /kirby/src/Cms/Visitor.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://getkirby.com/license 15 | */ 16 | class Visitor extends Facade 17 | { 18 | /** 19 | * @return \Kirby\Http\Visitor 20 | */ 21 | public static function instance() 22 | { 23 | return App::instance()->visitor(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-merge-defaults.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Apply Neat's default properties to undefined values within a map. 3 | /// 4 | /// @argument {map} $grid 5 | /// 6 | /// @return {map} 7 | /// 8 | /// @example scss 9 | /// _retrieve-neat-setting($neat-grid) 10 | /// 11 | /// @access private 12 | 13 | @function _neat-merge-defaults($grid) { 14 | $_merged-grid: map-merge(( 15 | columns: 12, 16 | gutter: 20px, 17 | media: null, 18 | color: rgba(#00d4ff, 0.25), 19 | direction: ltr, 20 | ), $grid); 21 | 22 | @return $_merged-grid; 23 | } 24 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_gamma.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Performs gamma correction on a single color channel. 4 | /// 5 | /// Note that Sass does not have a `pow()` function, so the calculation 6 | /// is approximate. 7 | /// 8 | /// @argument {number (0-1)} $channel 9 | /// 10 | /// @return {number (0-1)} 11 | /// 12 | /// @access private 13 | 14 | @function _gamma($channel) { 15 | @if $channel < 0.03928 { 16 | @return $channel / 12.92; 17 | } @else { 18 | $c: ($channel + 0.055) / 1.055; 19 | @return (133 * $c * $c * $c + 155 * $c * $c) / 288; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/validators/_contains.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks if a list contains a value(s). 4 | /// 5 | /// @argument {list} $list 6 | /// The list to check against. 7 | /// 8 | /// @argument {list} $values 9 | /// A single value or list of values to check for. 10 | /// 11 | /// @return {boolean} 12 | /// 13 | /// @access private 14 | 15 | @function _contains( 16 | $list, 17 | $values... 18 | ) { 19 | @each $value in $values { 20 | @if type-of(index($list, $value)) != "number" { 21 | @return false; 22 | } 23 | } 24 | 25 | @return true; 26 | } 27 | -------------------------------------------------------------------------------- /kirby/src/Exception/NotFoundException.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://opensource.org/licenses/MIT 14 | */ 15 | class NotFoundException extends Exception 16 | { 17 | protected static $defaultKey = 'notFound'; 18 | protected static $defaultFallback = 'Not found'; 19 | protected static $defaultHttpCode = 404; 20 | } 21 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/help.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * Sets the help text 9 | */ 10 | 'help' => function ($help = null) { 11 | return I18n::translate($help, $help); 12 | } 13 | ], 14 | 'computed' => [ 15 | 'help' => function () { 16 | if ($this->help) { 17 | $help = $this->model()->toString($this->help); 18 | $help = $this->kirby()->kirbytext($help); 19 | return $help; 20 | } 21 | } 22 | ] 23 | ]; 24 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{css,scss,less,js,json,ts,sass,html,hbs,mustache,phtml,html.twig,md,yml}] 2 | charset = utf-8 3 | indent_style = space 4 | indent_size = 2 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | indent_size = 4 12 | trim_trailing_whitespace = false 13 | 14 | [site/templates/**.php] 15 | indent_size = 2 16 | 17 | [site/snippets/**.php] 18 | indent_size = 2 19 | 20 | [package.json,.{babelrc,editorconfig,eslintrc,lintstagedrc,stylelintrc}] 21 | indent_style = space 22 | indent_size = 2 23 | -------------------------------------------------------------------------------- /kirby/config/api/routes/translations.php: -------------------------------------------------------------------------------- 1 | 'translations', 9 | 'method' => 'GET', 10 | 'auth' => false, 11 | 'action' => function () { 12 | return $this->kirby()->translations(); 13 | } 14 | ], 15 | [ 16 | 'pattern' => 'translations/(:any)', 17 | 'method' => 'GET', 18 | 'auth' => false, 19 | 'action' => function (string $code) { 20 | return $this->kirby()->translations()->find($code); 21 | } 22 | ] 23 | 24 | ]; 25 | -------------------------------------------------------------------------------- /kirby/config/fields/range.php: -------------------------------------------------------------------------------- 1 | 'number', 5 | 'props' => [ 6 | /** 7 | * Unset inherited props 8 | */ 9 | 'placeholder' => null, 10 | 11 | /** 12 | * The maximum value on the slider 13 | */ 14 | 'max' => function (float $max = 100) { 15 | return $max; 16 | }, 17 | /** 18 | * Enables/disables the tooltip and set the before and after values 19 | */ 20 | 'tooltip' => function ($tooltip = true) { 21 | return $tooltip; 22 | }, 23 | ] 24 | ]; 25 | -------------------------------------------------------------------------------- /kirby/src/Cms/S.php: -------------------------------------------------------------------------------- 1 | 13 | * @link https://getkirby.com 14 | * @copyright Bastian Allgeier GmbH 15 | * @license https://getkirby.com/license 16 | */ 17 | class S extends Facade 18 | { 19 | /** 20 | * @return \Kirby\Session\Session 21 | */ 22 | public static function instance() 23 | { 24 | return App::instance()->session(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kirby/config/fields/select.php: -------------------------------------------------------------------------------- 1 | 'radio', 5 | 'props' => [ 6 | /** 7 | * Unset inherited props 8 | */ 9 | 'columns' => null, 10 | 11 | /** 12 | * Custom icon to replace the arrow down. 13 | */ 14 | 'icon' => function (string $icon = null) { 15 | return $icon; 16 | }, 17 | /** 18 | * Custom placeholder string for empty option. 19 | */ 20 | 'placeholder' => function (string $placeholder = '—') { 21 | return $placeholder; 22 | }, 23 | ] 24 | ]; 25 | -------------------------------------------------------------------------------- /kirby/src/Exception/LogicException.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://opensource.org/licenses/MIT 14 | */ 15 | class LogicException extends Exception 16 | { 17 | protected static $defaultKey = 'logic'; 18 | protected static $defaultFallback = 'This task cannot be finished'; 19 | protected static $defaultHttpCode = 400; 20 | } 21 | -------------------------------------------------------------------------------- /site/snippets/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <?= $site->title() ?> | <?= $page->title() ?> 8 | 9 | true]); 12 | } else { 13 | echo css('assets/styles/main.css'); 14 | } 15 | ?> 16 | 17 | 18 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/helpers/_text-inputs-list.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// A list of all _text-based_ HTML inputs. 4 | /// 5 | /// @type list 6 | /// 7 | /// @access private 8 | 9 | $_text-inputs-list: ( 10 | "[type='color']", 11 | "[type='date']", 12 | "[type='datetime']", 13 | "[type='datetime-local']", 14 | "[type='email']", 15 | "[type='month']", 16 | "[type='number']", 17 | "[type='password']", 18 | "[type='search']", 19 | "[type='tel']", 20 | "[type='text']", 21 | "[type='time']", 22 | "[type='url']", 23 | "[type='week']", 24 | "input:not([type])", 25 | "textarea", 26 | ); 27 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_hide-text.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Hides the text in an element, commonly used to show an image instead. Some 4 | /// elements will need block-level styles applied. 5 | /// 6 | /// @link https://goo.gl/EvLRIu 7 | /// 8 | /// @example scss 9 | /// .element { 10 | /// @include hide-text; 11 | /// } 12 | /// 13 | /// // CSS Output 14 | /// .element { 15 | /// overflow: hidden; 16 | /// text-indent: 101%; 17 | /// white-space: nowrap; 18 | /// } 19 | 20 | @mixin hide-text { 21 | overflow: hidden; 22 | text-indent: 101%; 23 | white-space: nowrap; 24 | } 25 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-parse-media.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Parse media types. If the property is a string then return it, otherwise 3 | /// assume screen and min-width. 4 | /// 5 | /// @argument {string | number (with unit)} $media 6 | /// 7 | /// @return {number} 8 | /// 9 | /// @example scss 10 | /// _neat-parse-media($grid, 1000px) 11 | /// 12 | /// @access private 13 | 14 | @function _neat-parse-media($media) { 15 | @if type-of($media) == number { 16 | @return "only screen and (min-width: #{$media})"; 17 | } @else if type-of($media) == string { 18 | @return "#{$media}"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # System files 2 | # ------------ 3 | 4 | Icon 5 | .DS_Store 6 | 7 | # Development 8 | # ----- 9 | 10 | /node_modules 11 | /vendor 12 | 13 | # Temporary files 14 | # --------------- 15 | 16 | /package-lock.json 17 | /composer.lock 18 | /yarn.lock 19 | 20 | /media 21 | /assets 22 | /source/images/favicons 23 | /site/snippets/generated 24 | 25 | # -------------SECURITY------------- 26 | # NEVER publish these files via Git! 27 | # -------------SECURITY------------- 28 | 29 | # Accounts + Cache Files + Sessions 30 | # --------------- 31 | 32 | /storage 33 | 34 | # License 35 | # --------------- 36 | /site/config/.license 37 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-float-direction.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Return the float direction of the grid. 3 | /// 4 | /// @argument {map} $grid 5 | /// 6 | /// @return {string} 7 | /// 8 | /// @example scss 9 | /// _neat-float-direction($neat-grid) 10 | /// 11 | /// @access private 12 | 13 | @function _neat-float-direction($grid) { 14 | $_direction: _retrieve-neat-setting($grid, direction); 15 | $_float-direction: null; 16 | @if $_direction == "ltr" { 17 | $_float-direction: left; 18 | } @else if $_direction == "rtl" { 19 | $_float-direction: right; 20 | } 21 | @return $_float-direction; 22 | } 23 | -------------------------------------------------------------------------------- /kirby/config/fields/info.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * Text to be displayed 9 | */ 10 | 'text' => function ($value = null) { 11 | return I18n::translate($value, $value); 12 | }, 13 | ], 14 | 'computed' => [ 15 | 'text' => function () { 16 | if ($text = $this->text) { 17 | $text = $this->model()->toString($text); 18 | $text = $this->kirby()->kirbytext($text); 19 | return $text; 20 | } 21 | } 22 | ], 23 | 'save' => false, 24 | ]; 25 | -------------------------------------------------------------------------------- /kirby/i18n/rules/ka.json: -------------------------------------------------------------------------------- 1 | { 2 | "ა": "a", 3 | "ბ": "b", 4 | "გ": "g", 5 | "დ": "d", 6 | "ე": "e", 7 | "ვ": "v", 8 | "ზ": "z", 9 | "თ": "t", 10 | "ი": "i", 11 | "კ": "k", 12 | "ლ": "l", 13 | "მ": "m", 14 | "ნ": "n", 15 | "ო": "o", 16 | "პ": "p", 17 | "ჟ": "zh", 18 | "რ": "r", 19 | "ს": "s", 20 | "ტ": "t", 21 | "უ": "u", 22 | "ფ": "f", 23 | "ქ": "k", 24 | "ღ": "gh", 25 | "ყ": "q", 26 | "შ": "sh", 27 | "ჩ": "ch", 28 | "ც": "ts", 29 | "ძ": "dz", 30 | "წ": "ts", 31 | "ჭ": "ch", 32 | "ხ": "kh", 33 | "ჯ": "j", 34 | "ჰ": "h" 35 | } 36 | -------------------------------------------------------------------------------- /kirby/src/Exception/ErrorPageException.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://opensource.org/licenses/MIT 15 | */ 16 | class ErrorPageException extends Exception 17 | { 18 | protected static $defaultKey = 'errorPage'; 19 | protected static $defaultFallback = 'Triggered error page'; 20 | protected static $defaultHttpCode = 404; 21 | } 22 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-append-grid-visual.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Append attributes to a the `$_grid-visual` variable in `grid-visual` mixin 3 | /// 4 | /// @argument {map} $grid 5 | /// 6 | /// @argument {number (unitless) | null} $columns 7 | /// 8 | /// @return {number} 9 | /// 10 | /// @example scss 11 | /// _neat-column-default($neat-grid, 4) 12 | /// 13 | /// @access private 14 | 15 | @function _neat-append-grid-visual($grid-visual-list, $attributes) { 16 | @each $attribute in $attributes { 17 | $grid-visual-list: append($grid-visual-list, $attribute, comma); 18 | } 19 | 20 | @return $grid-visual-list; 21 | } 22 | -------------------------------------------------------------------------------- /kirby/src/Exception/DuplicateException.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://opensource.org/licenses/MIT 15 | */ 16 | class DuplicateException extends Exception 17 | { 18 | protected static $defaultKey = 'duplicate'; 19 | protected static $defaultFallback = 'The entry exists'; 20 | protected static $defaultHttpCode = 400; 21 | } 22 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-opposite-direction.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Return the oppoite of the float direction of the grid. 3 | /// 4 | /// @argument {map} $grid 5 | /// 6 | /// @return {string} 7 | /// 8 | /// @example scss 9 | /// _neat-opposite-direction($neat-grid) 10 | /// 11 | /// @access private 12 | 13 | @function _neat-opposite-direction($grid) { 14 | $_direction: _retrieve-neat-setting($grid, direction); 15 | $_float-direction: null; 16 | @if $_direction == "ltr" { 17 | $_float-direction: right; 18 | } @else if $_direction == "rtl" { 19 | $_float-direction: left; 20 | } 21 | @return $_float-direction; 22 | } 23 | -------------------------------------------------------------------------------- /kirby/config/fields/tel.php: -------------------------------------------------------------------------------- 1 | 'text', 5 | 'props' => [ 6 | /** 7 | * Unset inherited props 8 | */ 9 | 'converter' => null, 10 | 'counter' => null, 11 | 'spellcheck' => null, 12 | 13 | /** 14 | * Sets the HTML5 autocomplete attribute 15 | */ 16 | 'autocomplete' => function (string $autocomplete = 'tel') { 17 | return $autocomplete; 18 | }, 19 | 20 | /** 21 | * Changes the phone icon 22 | */ 23 | 'icon' => function (string $icon = 'phone') { 24 | return $icon; 25 | } 26 | ] 27 | ]; 28 | -------------------------------------------------------------------------------- /kirby/src/Exception/PermissionException.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://opensource.org/licenses/MIT 15 | */ 16 | class PermissionException extends Exception 17 | { 18 | protected static $defaultKey = 'permission'; 19 | protected static $defaultFallback = 'You are not allowed to do this'; 20 | protected static $defaultHttpCode = 403; 21 | } 22 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-column-default.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Determine if a column count has been given. 3 | /// If no columns have been given return the grid's total column count. 4 | /// 5 | /// @argument {map} $grid 6 | /// 7 | /// @argument {number (unitless) | null} $columns 8 | /// 9 | /// @return {number} 10 | /// 11 | /// @example scss 12 | /// _neat-column-default($neat-grid, 4) 13 | /// 14 | /// @access private 15 | 16 | @function _neat-column-default($grid, $columns) { 17 | @if $columns == null { 18 | $_grid-columns: _retrieve-neat-setting($grid, columns); 19 | @return $_grid-columns; 20 | } @else { 21 | @return $columns; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_retrieve-neat-settings.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// This function recives a grid map and merges it with Neat's defauls. 3 | /// It then returns the value of the property that has been passed to it. 4 | /// 5 | /// @argument {map} $grid 6 | /// 7 | /// @argument {string} $setting 8 | /// 9 | /// @return {boolean | color | list | number | string} 10 | /// 11 | /// @example scss 12 | /// _retrieve-neat-setting($neat-grid, columns) 13 | /// 14 | /// @access private 15 | 16 | @function _retrieve-neat-setting($grid, $setting) { 17 | $_grid-settings: map-merge(_neat-merge-defaults($neat-grid), $grid); 18 | @return map-get($_grid-settings, $setting); 19 | } 20 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/headline.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * The headline for the section. This can be a simple string or a template with additional info from the parent page. 9 | */ 10 | 'headline' => function ($headline = null) { 11 | return I18n::translate($headline, $headline); 12 | } 13 | ], 14 | 'computed' => [ 15 | 'headline' => function () { 16 | if ($this->headline) { 17 | return $this->model()->toString($this->headline); 18 | } 19 | 20 | return ucfirst($this->name); 21 | } 22 | ] 23 | ]; 24 | -------------------------------------------------------------------------------- /kirby/i18n/rules/fa.json: -------------------------------------------------------------------------------- 1 | { 2 | "آ" : "A", 3 | "ا" : "a", 4 | "ب" : "b", 5 | "پ" : "p", 6 | "ت" : "t", 7 | "ث" : "th", 8 | "ج" : "j", 9 | "چ" : "ch", 10 | "ح" : "h", 11 | "خ" : "kh", 12 | "د" : "d", 13 | "ذ" : "th", 14 | "ر" : "r", 15 | "ز" : "z", 16 | "ژ" : "zh", 17 | "س" : "s", 18 | "ش" : "sh", 19 | "ص" : "s", 20 | "ض" : "z", 21 | "ط" : "t", 22 | "ظ" : "z", 23 | "ع" : "a", 24 | "غ" : "gh", 25 | "ف" : "f", 26 | "ق" : "g", 27 | "ك" : "k", 28 | "ک" : "k", 29 | "گ" : "g", 30 | "ل" : "l", 31 | "م" : "m", 32 | "ن" : "n", 33 | "و" : "o", 34 | "ه" : "h", 35 | "ی" : "y" 36 | } 37 | -------------------------------------------------------------------------------- /kirby/config/presets/files.php: -------------------------------------------------------------------------------- 1 | [ 6 | 'headline' => $props['headline'] ?? t('files'), 7 | 'type' => 'files', 8 | 'layout' => $props['layout'] ?? 'cards', 9 | 'template' => $props['template'] ?? null, 10 | 'image' => $props['image'] ?? null, 11 | 'info' => '{{ file.dimensions }}' 12 | ] 13 | ]; 14 | 15 | // remove global options 16 | unset( 17 | $props['headline'], 18 | $props['layout'], 19 | $props['template'], 20 | $props['image'] 21 | ); 22 | 23 | return $props; 24 | }; 25 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-parse-columns.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Parse a column count like `3 of 5` and retur the total coloumn count. 3 | /// This is to allow a shorthand for custom grids without using a settings map. 4 | /// 5 | /// 6 | /// @argument {list} $span 7 | /// 8 | /// @return {number} 9 | /// 10 | /// @example scss 11 | /// _neat-parse-columns(3 of 5) 12 | /// 13 | /// @access private 14 | 15 | @function _neat-parse-columns($span) { 16 | @if length($span) == 3 { 17 | $_total-columns: nth($span, 3); 18 | @return $_total-columns; 19 | } @else if length($span) == 2 or if length($span) >= 3 { 20 | @error "`$column` should contain 2 values, seperated by an `of`"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_overflow-wrap.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Outputs the `overflow-wrap` property and its legacy name `word-wrap` to 4 | /// support browsers that do not yet use `overflow-wrap`. 5 | /// 6 | /// @argument {string} $wrap [break-word] 7 | /// Accepted CSS values are `normal`, `break-word`, `inherit`, `initial`, 8 | /// or `unset`. 9 | /// 10 | /// @example scss 11 | /// .wrapper { 12 | /// @include overflow-wrap; 13 | /// } 14 | /// 15 | /// // CSS Output 16 | /// .wrapper { 17 | /// word-wrap: break-word; 18 | /// overflow-wrap: break-word; 19 | /// } 20 | 21 | @mixin overflow-wrap($wrap: break-word) { 22 | word-wrap: $wrap; 23 | overflow-wrap: $wrap; 24 | } 25 | -------------------------------------------------------------------------------- /kirby/config/api/models/FileBlueprint.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'name' => function (FileBlueprint $blueprint) { 11 | return $blueprint->name(); 12 | }, 13 | 'options' => function (FileBlueprint $blueprint) { 14 | return $blueprint->options(); 15 | }, 16 | 'tabs' => function (FileBlueprint $blueprint) { 17 | return $blueprint->tabs(); 18 | }, 19 | 'title' => function (FileBlueprint $blueprint) { 20 | return $blueprint->title(); 21 | }, 22 | ], 23 | 'type' => 'Kirby\Cms\FileBlueprint', 24 | 'views' => [ 25 | ], 26 | ]; 27 | -------------------------------------------------------------------------------- /kirby/config/api/models/SiteBlueprint.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'name' => function (SiteBlueprint $blueprint) { 11 | return $blueprint->name(); 12 | }, 13 | 'options' => function (SiteBlueprint $blueprint) { 14 | return $blueprint->options(); 15 | }, 16 | 'tabs' => function (SiteBlueprint $blueprint) { 17 | return $blueprint->tabs(); 18 | }, 19 | 'title' => function (SiteBlueprint $blueprint) { 20 | return $blueprint->title(); 21 | }, 22 | ], 23 | 'type' => 'Kirby\Cms\SiteBlueprint', 24 | 'views' => [ 25 | ], 26 | ]; 27 | -------------------------------------------------------------------------------- /kirby/config/api/models/UserBlueprint.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'name' => function (UserBlueprint $blueprint) { 11 | return $blueprint->name(); 12 | }, 13 | 'options' => function (UserBlueprint $blueprint) { 14 | return $blueprint->options(); 15 | }, 16 | 'tabs' => function (UserBlueprint $blueprint) { 17 | return $blueprint->tabs(); 18 | }, 19 | 'title' => function (UserBlueprint $blueprint) { 20 | return $blueprint->title(); 21 | }, 22 | ], 23 | 'type' => 'Kirby\Cms\UserBlueprint', 24 | 'views' => [ 25 | ], 26 | ]; 27 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/max.php: -------------------------------------------------------------------------------- 1 | [ 5 | /** 6 | * Sets the maximum number of allowed entries in the section 7 | */ 8 | 'max' => function (int $max = null) { 9 | return $max; 10 | } 11 | ], 12 | 'methods' => [ 13 | 'isFull' => function () { 14 | if ($this->max) { 15 | return $this->total >= $this->max; 16 | } 17 | 18 | return false; 19 | }, 20 | 'validateMax' => function () { 21 | if ($this->max && $this->total > $this->max) { 22 | return false; 23 | } 24 | 25 | return true; 26 | } 27 | ] 28 | ]; 29 | -------------------------------------------------------------------------------- /kirby/src/Exception/BadMethodCallException.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://opensource.org/licenses/MIT 14 | */ 15 | class BadMethodCallException extends Exception 16 | { 17 | protected static $defaultKey = 'invalidMethod'; 18 | protected static $defaultFallback = 'The method "{ method }" does not exist'; 19 | protected static $defaultHttpCode = 400; 20 | protected static $defaultData = ['method' => null]; 21 | } 22 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/.gitignore: -------------------------------------------------------------------------------- 1 | # OS files 2 | .DS_Store 3 | .idea 4 | *.cache 5 | 6 | /tests/kirby 7 | /tests/logs 8 | /tests/media 9 | /tests/site/accounts 10 | /tests/site/cache 11 | 12 | # files of Composer dependencies that are not needed for the plugin 13 | /vendor/**/.* 14 | /vendor/**/*.json 15 | /vendor/**/*.txt 16 | /vendor/**/*.md 17 | /vendor/**/*.yml 18 | /vendor/**/*.yaml 19 | /vendor/**/*.xml 20 | /vendor/**/*.dist 21 | /vendor/**/readme.php 22 | /vendor/**/LICENSE 23 | /vendor/**/COPYING 24 | /vendor/**/VERSION 25 | /vendor/**/docs/* 26 | /vendor/**/example/* 27 | /vendor/**/examples/* 28 | /vendor/**/test/* 29 | /vendor/**/tests/* 30 | /vendor/**/php4/* 31 | /vendor/getkirby/composer-installer 32 | coverage.xml 33 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_assign-inputs.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Append pseudo-classes to a selector(s). 4 | /// 5 | /// @argument {list | string} $inputs 6 | /// A selector, or list of selectors, to apply the pseudo-class to. 7 | /// 8 | /// @argument {pseudo-class} $pseudo [null] 9 | /// The pseudo-class to be appended. 10 | /// 11 | /// @return {list} 12 | /// 13 | /// @access private 14 | 15 | @function _assign-inputs( 16 | $inputs, 17 | $pseudo: null 18 | ) { 19 | $list: (); 20 | 21 | @each $input in $inputs { 22 | $input: unquote($input); 23 | $input: if($pseudo, $input + ":" + $pseudo, $input); 24 | $list: append($list, $input, comma); 25 | } 26 | 27 | @return $list; 28 | } 29 | -------------------------------------------------------------------------------- /kirby/config/fields/headline.php: -------------------------------------------------------------------------------- 1 | false, 5 | 'props' => [ 6 | /** 7 | * Unset inherited props 8 | */ 9 | 'after' => null, 10 | 'autofocus' => null, 11 | 'before' => null, 12 | 'default' => null, 13 | 'disabled' => null, 14 | 'help' => null, 15 | 'icon' => null, 16 | 'placeholder' => null, 17 | 'required' => null, 18 | 'translate' => null, 19 | 20 | /** 21 | * If `false`, the prepended number will be hidden 22 | */ 23 | 'numbered' => function (bool $numbered = true) { 24 | return $numbered; 25 | } 26 | ] 27 | ]; 28 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/helpers/_scales.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | //// 4 | /// Pre-defined scales for use with the `modular-scale` function. 5 | /// 6 | /// @type number (unitless) 7 | /// 8 | /// @see {function} modular-scale 9 | //// 10 | 11 | $minor-second: 1.067; 12 | $major-second: 1.125; 13 | $minor-third: 1.2; 14 | $major-third: 1.25; 15 | $perfect-fourth: 1.333; 16 | $augmented-fourth: 1.414; 17 | $perfect-fifth: 1.5; 18 | $minor-sixth: 1.6; 19 | $golden: 1.618; 20 | $major-sixth: 1.667; 21 | $minor-seventh: 1.778; 22 | $major-seventh: 1.875; 23 | $octave: 2; 24 | $major-tenth: 2.5; 25 | $major-eleventh: 2.667; 26 | $major-twelfth: 3; 27 | $double-octave: 4; 28 | -------------------------------------------------------------------------------- /tasks/build.js: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------- 3 | Assets - Build 4 | --------------------------------------- 5 | */ 6 | 7 | const 8 | {series, parallel} = require('gulp'), 9 | conf = require('../config'), 10 | 11 | {styles} = require('./styles.js'), 12 | {scripts} = require('./scripts.js'), 13 | {images} = require('./images.js'), 14 | {fonts} = require('./fonts.js'), 15 | 16 | del = require('del') 17 | ; 18 | 19 | 20 | /* 21 | * Cleans assets folder 22 | */ 23 | 24 | function clean() { 25 | return del(Object.values(conf.dist)); 26 | } 27 | 28 | 29 | /* 30 | * Exports 31 | */ 32 | 33 | exports.build = series( 34 | clean, parallel( 35 | styles, 36 | scripts, 37 | images, 38 | fonts 39 | ) 40 | ); 41 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/mixins/_grid-container.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Creates a grid container with clearfix. 3 | /// 4 | /// @group features 5 | /// 6 | /// @name Grid container 7 | /// 8 | /// @example scss 9 | /// .element { 10 | /// @include grid-container; 11 | /// } 12 | /// 13 | /// @example css 14 | /// .element::after { 15 | /// clear: both; 16 | /// content: ""; 17 | /// display: block; 18 | /// } 19 | 20 | @mixin grid-container($grid: $neat-grid) { 21 | @if $grid != $neat-grid { 22 | @warn "`grid-container` does not use grid propertes. 23 | Custom grids do not need to be passed in to this mixin."; 24 | } 25 | 26 | &::after { 27 | clear: both; 28 | content: ""; 29 | display: block; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kirby/src/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://opensource.org/licenses/MIT 14 | */ 15 | class InvalidArgumentException extends Exception 16 | { 17 | protected static $defaultKey = 'invalidArgument'; 18 | protected static $defaultFallback = 'Invalid argument "{ argument }" in method "{ method }"'; 19 | protected static $defaultHttpCode = 400; 20 | protected static $defaultData = ['argument' => null, 'method' => null]; 21 | } 22 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_lightness.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Programatically determines the lightness of a color. 4 | /// 5 | /// @argument {color (hex)} $hex-color 6 | /// 7 | /// @return {number (0-1)} 8 | /// 9 | /// @example scss 10 | /// _lightness($color) 11 | /// 12 | /// @access private 13 | 14 | @function _lightness($hex-color) { 15 | $-local-red-raw: red(rgba($hex-color, 1)); 16 | $-local-green-raw: green(rgba($hex-color, 1)); 17 | $-local-blue-raw: blue(rgba($hex-color, 1)); 18 | 19 | $-local-red: _gamma($-local-red-raw / 255); 20 | $-local-green: _gamma($-local-green-raw / 255); 21 | $-local-blue: _gamma($-local-blue-raw / 255); 22 | 23 | @return $-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722; 24 | } 25 | -------------------------------------------------------------------------------- /kirby/config/api/models/Role.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'description' => function (Role $role) { 11 | return $role->description(); 12 | }, 13 | 'name' => function (Role $role) { 14 | return $role->name(); 15 | }, 16 | 'permissions' => function (Role $role) { 17 | return $role->permissions()->toArray(); 18 | }, 19 | 'title' => function (Role $role) { 20 | return $role->title(); 21 | }, 22 | ], 23 | 'type' => 'Kirby\Cms\Role', 24 | 'views' => [ 25 | 'compact' => [ 26 | 'description', 27 | 'name', 28 | 'title' 29 | ] 30 | ] 31 | ]; 32 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_border-width.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a concise, one-line method for setting `border-width` on specific 4 | /// edges of a box. Use a `null` value to “skip” edges of the box with standard 5 | /// CSS shorthand. 6 | /// 7 | /// @argument {list} $values 8 | /// List of border widths; accepts CSS shorthand. 9 | /// 10 | /// @example scss 11 | /// .element { 12 | /// @include border-width(1em null 20px); 13 | /// } 14 | /// 15 | /// // CSS Output 16 | /// .element { 17 | /// border-bottom-width: 20px; 18 | /// border-top-width: 1em; 19 | /// } 20 | /// 21 | /// @require {mixin} _directional-property 22 | 23 | @mixin border-width($values) { 24 | @include _directional-property(border, width, $values); 25 | } 26 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_border-style.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a concise, one-line method for setting `border-style` on specific 4 | /// edges of a box. Use a `null` value to “skip” edges of the box with standard 5 | /// CSS shorthand. 6 | /// 7 | /// @argument {list} $values 8 | /// List of border styles; accepts CSS shorthand. 9 | /// 10 | /// @example scss 11 | /// .element { 12 | /// @include border-style(dashed null solid); 13 | /// } 14 | /// 15 | /// // CSS Output 16 | /// .element { 17 | /// border-bottom-style: solid; 18 | /// border-top-style: dashed; 19 | /// } 20 | /// 21 | /// @require {mixin} _directional-property 22 | 23 | @mixin border-style($values) { 24 | @include _directional-property(border, style, $values); 25 | } 26 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: bnomei # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_tint.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Mixes a color with white. 4 | /// 5 | /// @argument {color} $color 6 | /// 7 | /// @argument {number (percentage)} $percent 8 | /// The amount of white to be mixed in. 9 | /// 10 | /// @return {color} 11 | /// 12 | /// @example scss 13 | /// .element { 14 | /// background-color: tint(#6ecaa6, 40%); 15 | /// } 16 | /// 17 | /// // CSS Output 18 | /// .element { 19 | /// background-color: #a8dfc9; 20 | /// } 21 | 22 | @function tint( 23 | $color, 24 | $percent 25 | ) { 26 | @if not _is-color($color) { 27 | @error "`#{$color}` is not a valid color for the `$color` argument in " + 28 | "the `tint` mixin."; 29 | } @else { 30 | @return mix(#fff, $color, $percent); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_shade.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Mixes a color with black. 4 | /// 5 | /// @argument {color} $color 6 | /// 7 | /// @argument {number (percentage)} $percent 8 | /// The amount of black to be mixed in. 9 | /// 10 | /// @return {color} 11 | /// 12 | /// @example scss 13 | /// .element { 14 | /// background-color: shade(#ffbb52, 60%); 15 | /// } 16 | /// 17 | /// // CSS Output 18 | /// .element { 19 | /// background-color: #664a20; 20 | /// } 21 | 22 | @function shade( 23 | $color, 24 | $percent 25 | ) { 26 | @if not _is-color($color) { 27 | @error "`#{$color}` is not a valid color for the `$color` argument in " + 28 | "the `shade` mixin."; 29 | } @else { 30 | @return mix(#000, $color, $percent); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /kirby/config/fields/radio.php: -------------------------------------------------------------------------------- 1 | ['options'], 5 | 'props' => [ 6 | /** 7 | * Unset inherited props 8 | */ 9 | 'after' => null, 10 | 'before' => null, 11 | 'icon' => null, 12 | 'placeholder' => null, 13 | 14 | /** 15 | * Arranges the radio buttons in the given number of columns 16 | */ 17 | 'columns' => function (int $columns = 1) { 18 | return $columns; 19 | }, 20 | ], 21 | 'computed' => [ 22 | 'default' => function () { 23 | return $this->sanitizeOption($this->default); 24 | }, 25 | 'value' => function () { 26 | return $this->sanitizeOption($this->value) ?? ''; 27 | } 28 | ] 29 | ]; 30 | -------------------------------------------------------------------------------- /kirby/config/api/routes/roles.php: -------------------------------------------------------------------------------- 1 | 'roles', 9 | 'method' => 'GET', 10 | 'action' => function () { 11 | switch (get('canBe')) { 12 | case 'changed': 13 | return $this->kirby()->roles()->canBeChanged(); 14 | case 'created': 15 | return $this->kirby()->roles()->canBeCreated(); 16 | default: 17 | return $this->kirby()->roles(); 18 | } 19 | } 20 | ], 21 | [ 22 | 'pattern' => 'roles/(:any)', 23 | 'method' => 'GET', 24 | 'action' => function (string $name) { 25 | return $this->kirby()->roles()->find($name); 26 | } 27 | ] 28 | ]; 29 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-column-width.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Return a calulated column width that can then be passed in to a `calc()`. 3 | /// 4 | /// @argument {map} $grid 5 | /// 6 | /// @argument {number} $columns 7 | /// 8 | /// @return {string} 9 | /// 10 | /// @example scss 11 | /// _neat-column-width($neat-grid, 4) 12 | /// 13 | /// @access private 14 | 15 | @function _neat-column-width($grid, $columns) { 16 | $_column-ratio: _neat-column-ratio($grid, $columns); 17 | $_gutter: _retrieve-neat-setting($grid, gutter); 18 | 19 | @if $_gutter == 0 { 20 | @return unquote("#{percentage($_column-ratio)}"); 21 | } @else { 22 | $_gutter-affordance: $_gutter + ($_gutter * $_column-ratio); 23 | @return unquote("#{percentage($_column-ratio)} - #{$_gutter-affordance}"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/functions/_neat-column-ratio.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Determine the ratio of `$columns` to the total column count. 3 | /// If `$columns` is more than one value, they are handed to 4 | /// `_neat-parse-columns()` which will determine the total columns and use this 5 | /// value instead of `total-columns`. 6 | /// 7 | /// @argument {map} $grid 8 | /// 9 | /// @argument {number | list} $columns 10 | /// 11 | /// @return {number} 12 | /// 13 | /// @example scss 14 | /// _neat-column-ratio($grid, 3) 15 | /// 16 | /// @access private 17 | 18 | @function _neat-column-ratio($grid, $columns) { 19 | @if length($columns) > 1 { 20 | @return nth($columns, 1) / _neat-parse-columns($columns); 21 | } @else if $columns { 22 | @return $columns / _retrieve-neat-setting($grid, columns); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_border-color.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a concise, one-line method for setting `border-color` on specific 4 | /// edges of a box. Use a `null` value to “skip” edges of the box with standard 5 | /// CSS shorthand. 6 | /// 7 | /// @argument {list} $values 8 | /// List of colors; accepts CSS shorthand. 9 | /// 10 | /// @example scss 11 | /// .element { 12 | /// @include border-color(#a60b55 #76cd9c null #e8ae1a); 13 | /// } 14 | /// 15 | /// // CSS Output 16 | /// .element { 17 | /// border-left-color: #e8ae1a; 18 | /// border-right-color: #76cd9c; 19 | /// border-top-color: #a60b55; 20 | /// } 21 | /// 22 | /// @require {mixin} _directional-property 23 | 24 | @mixin border-color($values) { 25 | @include _directional-property(border, color, $values); 26 | } 27 | -------------------------------------------------------------------------------- /kirby/config/api/authentication.php: -------------------------------------------------------------------------------- 1 | kirby()->auth(); 7 | $allowImpersonation = $this->kirby()->option('api.allowImpersonation') ?? false; 8 | 9 | // csrf token check 10 | if ($auth->type($allowImpersonation) === 'session' && $auth->csrf() === false) { 11 | throw new PermissionException('Unauthenticated'); 12 | } 13 | 14 | // get user from session or basic auth 15 | if ($user = $auth->user(null, $allowImpersonation)) { 16 | if ($user->role()->permissions()->for('access', 'panel') === false) { 17 | throw new PermissionException(['key' => 'access.panel']); 18 | } 19 | 20 | return $user; 21 | } 22 | 23 | throw new PermissionException('Unauthenticated'); 24 | }; 25 | -------------------------------------------------------------------------------- /tasks/server.js: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------- 3 | Development / Deployment 4 | --------------------------------------- 5 | */ 6 | 7 | const 8 | {parallel} = require('gulp'), 9 | conf = require('../config'), 10 | 11 | browserSync = require('browser-sync').init, 12 | php = require('gulp-connect-php') 13 | ; 14 | 15 | 16 | /* 17 | * Starts a local development server (using PHP) 18 | */ 19 | 20 | function connect() { 21 | php.server(conf.server.connect); 22 | } 23 | 24 | 25 | /* 26 | * Starts a live reload proxy via Browsersync 27 | */ 28 | 29 | function livereload() { 30 | browserSync.init(conf.browsersync); 31 | } 32 | 33 | 34 | /* 35 | * Exports 36 | */ 37 | 38 | if (conf.server.enable) { 39 | exports.server = parallel( 40 | connect, 41 | livereload 42 | ); 43 | } else { 44 | exports.server = livereload; 45 | } 46 | -------------------------------------------------------------------------------- /kirby/src/Cms/Response.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://getkirby.com/license 14 | */ 15 | class Response extends \Kirby\Http\Response 16 | { 17 | /** 18 | * Adjusted redirect creation which 19 | * parses locations with the Url::to method 20 | * first. 21 | * 22 | * @param string|null $location 23 | * @param int|null $code 24 | * @return self 25 | */ 26 | public static function redirect(?string $location = null, ?int $code = null) 27 | { 28 | return parent::redirect(Url::to($location ?? '/'), $code); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_prefixer.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Generates vendor prefixes. 4 | /// 5 | /// @argument {string} $property 6 | /// Property to prefix. 7 | /// 8 | /// @argument {string} $value 9 | /// Value to use. 10 | /// 11 | /// @argument {list} $prefixes 12 | /// Vendor prefixes to output. 13 | /// 14 | /// @example scss 15 | /// .element { 16 | /// @include prefixer(appearance, none, ("webkit", "moz")); 17 | /// } 18 | /// 19 | /// // CSS Output 20 | /// .element { 21 | /// -webkit-appearance: none; 22 | /// -moz-appearance: none; 23 | /// appearance: none; 24 | /// } 25 | /// 26 | /// @author Hugo Giraudel 27 | 28 | @mixin prefixer( 29 | $property, 30 | $value, 31 | $prefixes: () 32 | ) { 33 | @each $prefix in $prefixes { 34 | #{"-" + $prefix + "-" + $property}: $value; 35 | } 36 | #{$property}: $value; 37 | } 38 | -------------------------------------------------------------------------------- /source/styles/utility/_reset.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A very simple reset that sits on top of Normalize.css. 3 | * Inspired by github.com/inuitcss 4 | */ 5 | 6 | body, 7 | h1, 8 | h2, 9 | h3, 10 | h4, 11 | h5, 12 | h6, 13 | blockquote, 14 | p, 15 | pre, 16 | dl, 17 | dd, 18 | ol, 19 | ul, 20 | figure, 21 | hr, 22 | fieldset, 23 | legend { 24 | margin: 0; 25 | padding: 0; 26 | } 27 | 28 | 29 | /** 30 | * Remove trailing margins from nested lists. 31 | */ 32 | 33 | li > { 34 | ol, 35 | ul { 36 | margin-bottom: 0; 37 | } 38 | 39 | } 40 | 41 | 42 | /** 43 | * Remove default table spacing. 44 | */ 45 | 46 | table { 47 | border-collapse: collapse; 48 | border-spacing: 0; 49 | } 50 | 51 | 52 | /** 53 | * 1. Reset Chrome and Firefox behaviour which sets a `min-width: min-content;` 54 | * on fieldsets. 55 | */ 56 | 57 | fieldset { 58 | border: 0; 59 | min-width: 0; /* [1] */ 60 | } 61 | -------------------------------------------------------------------------------- /kirby/config/api/routes.php: -------------------------------------------------------------------------------- 1 | option('languages', false) !== false) { 22 | $routes = array_merge($routes, include __DIR__ . '/routes/languages.php'); 23 | } 24 | 25 | return $routes; 26 | }; 27 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_value-prefixer.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Generates vendor prefixes for values. 4 | /// 5 | /// @argument {string} $property 6 | /// Property to use. 7 | /// 8 | /// @argument {string} $value 9 | /// Value to prefix. 10 | /// 11 | /// @argument {list} $prefixes 12 | /// Vendor prefixes to output. 13 | /// 14 | /// @example scss 15 | /// .element { 16 | /// @include value-prefixer(cursor, grab, ("webkit", "moz")); 17 | /// } 18 | /// 19 | /// // CSS Output 20 | /// .element { 21 | /// cursor: -webkit-grab; 22 | /// cursor: -moz-grab; 23 | /// cursor: grab; 24 | /// } 25 | /// 26 | /// @author Matthew Tobiasz 27 | 28 | @mixin value-prefixer( 29 | $property, 30 | $value, 31 | $prefixes: () 32 | ) { 33 | @each $prefix in $prefixes { 34 | #{$property}: #{"-" + $prefix + "-" + $value}; 35 | } 36 | #{$property}: $value; 37 | } 38 | -------------------------------------------------------------------------------- /site/plugins/kirby-minify-html/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "afbora/kirby-minify-html", 3 | "description": "Enable minify HTML output for Kirby 3", 4 | "keywords": [ 5 | "kirby", 6 | "kirby-3", 7 | "kirby-cms", 8 | "kirby3-plugin", 9 | "kirby-plugin" 10 | ], 11 | "version": "1.2.0", 12 | "type": "kirby-plugin", 13 | "license": "MIT", 14 | "authors": [ 15 | { 16 | "name": "Ahmet Bora", 17 | "email": "ahmet.bora@pixelturk.net" 18 | } 19 | ], 20 | "require": { 21 | "php": "^7.1.3", 22 | "getkirby/composer-installer": "^1.1.4", 23 | "voku/html-min": "^4.0" 24 | }, 25 | "config": { 26 | "optimize-autoloader": true, 27 | "preferred-install": "dist", 28 | "sort-packages": true 29 | }, 30 | "minimum-stability": "dev", 31 | "prefer-stable": true 32 | } 33 | -------------------------------------------------------------------------------- /source/styles/base/_typography.scss: -------------------------------------------------------------------------------- 1 | html { 2 | color: $base-font-color; 3 | font-family: $base-font-family; 4 | font-size: 100%; 5 | line-height: $base-line-height; 6 | } 7 | 8 | h1, 9 | h2, 10 | h3, 11 | h4, 12 | h5, 13 | h6 { 14 | font-family: $heading-font-family; 15 | font-size: modular-scale(1); 16 | line-height: $heading-line-height; 17 | margin: 0 0 $small-spacing; 18 | } 19 | 20 | p { 21 | margin: 0 0 $small-spacing; 22 | } 23 | 24 | a { 25 | color: $action-color; 26 | text-decoration-skip: ink; 27 | transition: color $base-duration $base-timing; 28 | 29 | &:hover { 30 | color: shade($action-color, 25%); 31 | } 32 | 33 | &:focus { 34 | outline: $focus-outline; 35 | outline-offset: $focus-outline-offset; 36 | } 37 | } 38 | 39 | hr { 40 | border-bottom: $base-border; 41 | border-left: 0; 42 | border-right: 0; 43 | border-top: 0; 44 | margin: $base-spacing 0; 45 | } 46 | -------------------------------------------------------------------------------- /kirby/src/Cms/NestCollection.php: -------------------------------------------------------------------------------- 1 | 13 | * @link https://getkirby.com 14 | * @copyright Bastian Allgeier GmbH 15 | * @license https://getkirby.com/license 16 | */ 17 | class NestCollection extends BaseCollection 18 | { 19 | /** 20 | * Converts all objects in the collection 21 | * to an array. This can also take a callback 22 | * function to further modify the array result. 23 | * 24 | * @param \Closure|null $map 25 | * @return array 26 | */ 27 | public function toArray(Closure $map = null): array 28 | { 29 | return parent::toArray($map ?? function ($object) { 30 | return $object->toArray(); 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_contrast-ratio.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Programatically determines the contrast ratio between two colors. 4 | /// 5 | /// Note that the alpha channel is ignored. 6 | /// 7 | /// @link https://goo.gl/54htLV 8 | /// 9 | /// @argument {color (hex)} $color-1 10 | /// 11 | /// @argument {color (hex)} $color-2 12 | /// 13 | /// @return {number (1-21)} 14 | /// 15 | /// @example scss 16 | /// _contrast-ratio(black, white) 17 | /// 18 | /// @require {function} _lightness 19 | /// 20 | /// @access private 21 | 22 | @function _contrast-ratio($color-1, $color-2) { 23 | $-local-lightness-1: _lightness($color-1) + 0.05; 24 | $-local-lightness-2: _lightness($color-2) + 0.05; 25 | 26 | @if $-local-lightness-1 > $-local-lightness-2 { 27 | @return $-local-lightness-1 / $-local-lightness-2; 28 | } @else { 29 | @return $-local-lightness-2 / $-local-lightness-1; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /site/config/routes.php: -------------------------------------------------------------------------------- 1 | 'sitemap.xml', 8 | 'action' => function() { 9 | $pages = site()->pages()->index(); 10 | 11 | // fetch the pages to ignore from the config settings, 12 | // if nothing is set, we ignore the error page 13 | $ignore = kirby()->option('sitemap.ignore', ['error']); 14 | 15 | $content = snippet('sitemap', compact('pages', 'ignore'), true); 16 | 17 | // return response with correct header type 18 | return new Kirby\Cms\Response($content, 'application/xml'); 19 | } 20 | ], 21 | [ 22 | 'pattern' => 'sitemap', 23 | 'action' => function() { 24 | return go('sitemap.xml', 301); 25 | } 26 | ] 27 | ]; 28 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "s1syphos/gulp-kirby-starter-kit", 3 | "description": "Gulp+Kirby Starterkit", 4 | "type": "project", 5 | "keywords": ["gulp", "kirby", "cms", "starterkit"], 6 | "homepage": "https://github.com/S1SYPHOS/Gulp-Kirby-Starter-Kit#readme", 7 | "authors": [ 8 | { 9 | "name": "S1SYPHOS", 10 | "email": "hello@twobrain.io", 11 | "homepage": "https://twobrain.io" 12 | } 13 | ], 14 | "support": { 15 | "email": "support@twobrain.io", 16 | "issues": "https://github.com/S1SYPHOS/Gulp-Kirby-Starter-Kit/issues", 17 | "forum": "https://forum.getkirby.com", 18 | "source": "https://github.com/S1SYPHOS/Gulp-Kirby-Starter-Kit" 19 | }, 20 | "require": { 21 | "php": ">=7.2.0", 22 | "getkirby/cms": "^3.4", 23 | "afbora/kirby-minify-html": "^1.2", 24 | "bnomei/kirby3-fingerprint": "^3.0" 25 | }, 26 | "config": { 27 | "optimize-autoloader": true 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kirby/src/Toolkit/Facade.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://opensource.org/licenses/MIT 14 | */ 15 | abstract class Facade 16 | { 17 | /** 18 | * Returns the instance that should be 19 | * available statically 20 | * 21 | * @return mixed 22 | */ 23 | abstract public static function instance(); 24 | 25 | /** 26 | * Proxy for all public instance calls 27 | * 28 | * @param string $method 29 | * @param array $args 30 | * @return mixed 31 | */ 32 | public static function __callStatic(string $method, array $args = null) 33 | { 34 | return static::instance()->$method(...$args); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/index.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'cache' => true, 8 | 'query' => true, 9 | 'https' => function () { 10 | return kirby()->system()->isLocal() === false; 11 | }, 12 | 'hash' => function ($file, $query = true) { 13 | return (new \Bnomei\FingerprintFile($file))->hash($query); 14 | }, 15 | 'integrity' => function ($file) { 16 | return (new \Bnomei\FingerprintFile($file))->integrity(); 17 | }, 18 | ], 19 | 'fileMethods' => [ 20 | 'fingerprint' => function () { 21 | return (new \Bnomei\Fingerprint())->process($this)['hash']; 22 | }, 23 | 'integrity' => function () { 24 | return (new \Bnomei\Fingerprint())->process($this)['integrity']; 25 | }, 26 | ], 27 | ]); 28 | -------------------------------------------------------------------------------- /Gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | --------------------------------------- 5 | I. Prerequisites 6 | --------------------------------------- 7 | */ 8 | 9 | const 10 | {series, parallel} = require('gulp'), 11 | 12 | {styles} = require('./tasks/styles'), 13 | {scripts} = require('./tasks/scripts'), 14 | {images} = require('./tasks/images'), 15 | {fonts} = require('./tasks/fonts'), 16 | {server} = require('./tasks/server'), 17 | {watch} = require('./tasks/watch'), 18 | {build} = require('./tasks/build') 19 | ; 20 | 21 | 22 | /* 23 | --------------------------------------- 24 | II. Bringing together the best of all possible worlds 25 | --------------------------------------- 26 | */ 27 | 28 | module.exports = { 29 | styles: styles, 30 | scripts: scripts, 31 | images: images, 32 | fonts: fonts, 33 | build: build, 34 | 35 | default: series( 36 | build, parallel( 37 | watch, 38 | server 39 | ) 40 | ), 41 | }; 42 | -------------------------------------------------------------------------------- /kirby/views/snippets/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Error 8 | 9 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Unit Tests 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | schedule: 9 | - cron: '0 2 * * *' # run at 2 AM UTC 10 | 11 | jobs: 12 | test: 13 | runs-on: ubuntu-latest 14 | name: Tests 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Setup PHP 20 | uses: shivammathur/setup-php@v2 21 | with: 22 | php-version: '7.2' 23 | tools: composer 24 | 25 | - name: Install 26 | run: composer install 27 | 28 | # update kirby to latest release of version 3 (includes release candidates!) 29 | # https://semver.mwl.be/#!?package=getkirby%2Fcms&version=3.*&minimum-stability=RC 30 | - name: Update Kirby Core 31 | run: composer require getkirby/cms:"3.*@RC" 32 | 33 | - name: Run Tests 34 | run: composer test 35 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_unpack-shorthand.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Transforms shorthand that can range from 1-to-4 values to be 4 values. 4 | /// 5 | /// @argument {list} $shorthand 6 | /// 7 | /// @example scss 8 | /// .element { 9 | /// margin: _unpack-shorthand(1em 2em); 10 | /// } 11 | /// 12 | /// // CSS Output 13 | /// .element { 14 | /// margin: 1em 2em 1em 2em; 15 | /// } 16 | /// 17 | /// @access private 18 | 19 | @function _unpack-shorthand($shorthand) { 20 | @if length($shorthand) == 1 { 21 | @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1); 22 | } @else if length($shorthand) == 2 { 23 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2); 24 | } @else if length($shorthand) == 3 { 25 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2); 26 | } @else { 27 | @return $shorthand; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kirby/config/fields/multiselect.php: -------------------------------------------------------------------------------- 1 | 'tags', 5 | 'props' => [ 6 | /** 7 | * Unset inherited props 8 | */ 9 | 'accept' => null, 10 | /** 11 | * Custom icon to replace the arrow down. 12 | */ 13 | 'icon' => function (string $icon = null) { 14 | return $icon; 15 | }, 16 | /** 17 | * Enable/disable the search in the dropdown 18 | * Also limit displayed items (display: 20) 19 | * and set minimum number of characters to search (min: 3) 20 | */ 21 | 'search' => function ($search = true) { 22 | return $search; 23 | }, 24 | /** 25 | * If `true`, selected entries will be sorted 26 | * according to their position in the dropdown 27 | */ 28 | 'sort' => function (bool $sort = false) { 29 | return $sort; 30 | }, 31 | ] 32 | ]; 33 | -------------------------------------------------------------------------------- /kirby/config/sections/info.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'headline', 8 | ], 9 | 'props' => [ 10 | 'text' => function ($text = null) { 11 | return I18n::translate($text, $text); 12 | }, 13 | 'theme' => function (string $theme = null) { 14 | return $theme; 15 | } 16 | ], 17 | 'computed' => [ 18 | 'text' => function () { 19 | if ($this->text) { 20 | $text = $this->model()->toString($this->text); 21 | $text = $this->kirby()->kirbytext($text); 22 | return $text; 23 | } 24 | }, 25 | ], 26 | 'toArray' => function () { 27 | return [ 28 | 'options' => [ 29 | 'headline' => $this->headline, 30 | 'text' => $this->text, 31 | 'theme' => $this->theme 32 | ] 33 | ]; 34 | } 35 | ]; 36 | -------------------------------------------------------------------------------- /kirby/config/setup.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'author' => function (Translation $translation) { 11 | return $translation->author(); 12 | }, 13 | 'data' => function (Translation $translation) { 14 | return $translation->dataWithFallback(); 15 | }, 16 | 'direction' => function (Translation $translation) { 17 | return $translation->direction(); 18 | }, 19 | 'id' => function (Translation $translation) { 20 | return $translation->id(); 21 | }, 22 | 'name' => function (Translation $translation) { 23 | return $translation->name(); 24 | }, 25 | ], 26 | 'type' => 'Kirby\Cms\Translation', 27 | 'views' => [ 28 | 'compact' => [ 29 | 'direction', 30 | 'id', 31 | 'name' 32 | ] 33 | ] 34 | ]; 35 | -------------------------------------------------------------------------------- /kirby/config/api/models.php: -------------------------------------------------------------------------------- 1 | include __DIR__ . '/models/File.php', 8 | 'FileBlueprint' => include __DIR__ . '/models/FileBlueprint.php', 9 | 'FileVersion' => include __DIR__ . '/models/FileVersion.php', 10 | 'Language' => include __DIR__ . '/models/Language.php', 11 | 'Page' => include __DIR__ . '/models/Page.php', 12 | 'PageBlueprint' => include __DIR__ . '/models/PageBlueprint.php', 13 | 'Role' => include __DIR__ . '/models/Role.php', 14 | 'Site' => include __DIR__ . '/models/Site.php', 15 | 'SiteBlueprint' => include __DIR__ . '/models/SiteBlueprint.php', 16 | 'System' => include __DIR__ . '/models/System.php', 17 | 'Translation' => include __DIR__ . '/models/Translation.php', 18 | 'User' => include __DIR__ . '/models/User.php', 19 | 'UserBlueprint' => include __DIR__ . '/models/UserBlueprint.php', 20 | ]; 21 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_padding.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a concise method for targeting `padding` on specific sides of a 4 | /// box. Use a `null` value to “skip” a side. 5 | /// 6 | /// @argument {list} $values 7 | /// List of padding values; accepts CSS shorthand. 8 | /// 9 | /// @example scss 10 | /// .element-one { 11 | /// @include padding(null 1rem); 12 | /// } 13 | /// 14 | /// // CSS Output 15 | /// .element-one { 16 | /// padding-left: 1rem; 17 | /// padding-right: 1rem; 18 | /// } 19 | /// 20 | /// @example scss 21 | /// .element-two { 22 | /// @include padding(10vh null 10px 5%); 23 | /// } 24 | /// 25 | /// // CSS Output 26 | /// .element-two { 27 | /// padding-bottom: 10px; 28 | /// padding-left: 5%; 29 | /// padding-top: 10vh; 30 | /// } 31 | /// 32 | /// @require {mixin} _directional-property 33 | 34 | @mixin padding($values) { 35 | @include _directional-property(padding, null, $values); 36 | } 37 | -------------------------------------------------------------------------------- /kirby/config/urls.php: -------------------------------------------------------------------------------- 1 | function () { 7 | return Url::index(); 8 | }, 9 | 'base' => function (array $urls) { 10 | return rtrim($urls['index'], '/'); 11 | }, 12 | 'current' => function (array $urls) { 13 | $path = trim($this->path(), '/'); 14 | 15 | if (empty($path) === true) { 16 | return $urls['index']; 17 | } else { 18 | return $urls['base'] . '/' . $path; 19 | } 20 | }, 21 | 'assets' => function (array $urls) { 22 | return $urls['base'] . '/assets'; 23 | }, 24 | 'api' => function (array $urls) { 25 | return $urls['base'] . '/' . ($this->options['api']['slug'] ?? 'api'); 26 | }, 27 | 'media' => function (array $urls) { 28 | return $urls['base'] . '/media'; 29 | }, 30 | 'panel' => function (array $urls) { 31 | return $urls['base'] . '/' . ($this->options['panel']['slug'] ?? 'panel'); 32 | } 33 | ]; 34 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_margin.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a concise, one-line method for setting `margin` on specific edges 4 | /// of a box. Use a `null` value to “skip” edges of the box with standard 5 | /// CSS shorthand. 6 | /// 7 | /// @argument {list} $values 8 | /// List of margin values; accepts CSS shorthand. 9 | /// 10 | /// @example scss 11 | /// .element { 12 | /// @include margin(null auto); 13 | /// } 14 | /// 15 | /// // CSS Output 16 | /// .element { 17 | /// margin-left: auto; 18 | /// margin-right: auto; 19 | /// } 20 | /// 21 | /// @example scss 22 | /// .element { 23 | /// @include margin(10px 3em 20vh null); 24 | /// } 25 | /// 26 | /// // CSS Output 27 | /// .element { 28 | /// margin-bottom: 20vh; 29 | /// margin-right: 3em; 30 | /// margin-top: 10px; 31 | /// } 32 | /// 33 | /// @require {mixin} _directional-property 34 | 35 | @mixin margin($values) { 36 | @include _directional-property(margin, null, $values); 37 | } 38 | -------------------------------------------------------------------------------- /kirby/bootstrap.php: -------------------------------------------------------------------------------- 1 | =') === false || 9 | version_compare(PHP_VERSION, '7.5.0', '<') === false 10 | ) { 11 | die(include __DIR__ . '/views/php.php'); 12 | } 13 | 14 | if (is_file($autoloader = dirname(__DIR__) . '/vendor/autoload.php')) { 15 | 16 | /** 17 | * Always prefer a site-wide Composer autoloader 18 | * if it exists, it means that the user has probably 19 | * installed additional packages 20 | */ 21 | include $autoloader; 22 | } elseif (is_file($autoloader = __DIR__ . '/vendor/autoload.php')) { 23 | 24 | /** 25 | * Fall back to the local autoloader if that exists 26 | */ 27 | include $autoloader; 28 | } else { 29 | 30 | /** 31 | * If neither one exists, don't bother searching; 32 | * it's a custom directory setup and the users need to 33 | * load the autoloader themselves 34 | */ 35 | } 36 | -------------------------------------------------------------------------------- /kirby/src/Cms/Html.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://getkirby.com/license 15 | */ 16 | class Html extends \Kirby\Toolkit\Html 17 | { 18 | /** 19 | * Generates an `a` tag with an absolute Url 20 | * 21 | * @param string|null $href Relative or absolute Url 22 | * @param string|array|null $text If `null`, the link will be used as link text. If an array is passed, each element will be added unencoded 23 | * @param array $attr Additional attributes for the a tag. 24 | * @return string 25 | */ 26 | public static function link(string $href = null, $text = null, array $attr = []): string 27 | { 28 | return parent::link(Url::to($href), $text, $attr); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/styles/utility/_settings.scss: -------------------------------------------------------------------------------- 1 | // Typography 2 | $base-font-family: $font-stack-system; 3 | $heading-font-family: $base-font-family; 4 | 5 | // Line height 6 | $base-line-height: 1.5; 7 | $heading-line-height: 1.2; 8 | 9 | // Other Sizes 10 | $base-border-radius: 3px; 11 | $base-spacing: 1.5em; 12 | $small-spacing: $base-spacing / 2; 13 | $base-z-index: 0; 14 | 15 | // Colors 16 | $blue: #1565c0; 17 | $dark-gray: #333; 18 | $medium-gray: #999; 19 | $light-gray: #ddd; 20 | 21 | // Font Colors 22 | $base-font-color: $dark-gray; 23 | $action-color: $blue; 24 | 25 | // Border 26 | $base-border-color: $light-gray; 27 | $base-border: 1px solid $base-border-color; 28 | 29 | // Background Colors 30 | $base-background-color: #fff; 31 | $secondary-background-color: tint($base-border-color, 75%); 32 | 33 | // Focus 34 | $focus-outline-color: transparentize($action-color, 0.4); 35 | $focus-outline-width: 3px; 36 | $focus-outline: $focus-outline-width solid $focus-outline-color; 37 | $focus-outline-offset: 2px; 38 | 39 | // Animations 40 | $base-duration: 150ms; 41 | $base-timing: ease; 42 | -------------------------------------------------------------------------------- /kirby/config/fields/url.php: -------------------------------------------------------------------------------- 1 | 'text', 7 | 'props' => [ 8 | /** 9 | * Unset inherited props 10 | */ 11 | 'converter' => null, 12 | 'counter' => null, 13 | 'spellcheck' => null, 14 | 15 | /** 16 | * Sets the HTML5 autocomplete attribute 17 | */ 18 | 'autocomplete' => function (string $autocomplete = 'url') { 19 | return $autocomplete; 20 | }, 21 | 22 | /** 23 | * Changes the link icon 24 | */ 25 | 'icon' => function (string $icon = 'url') { 26 | return $icon; 27 | }, 28 | 29 | /** 30 | * Sets custom placeholder text, when the field is empty 31 | */ 32 | 'placeholder' => function ($value = null) { 33 | return I18n::translate($value, $value) ?? 'https://example.com'; 34 | } 35 | ], 36 | 'validations' => [ 37 | 'minlength', 38 | 'maxlength', 39 | 'url' 40 | ], 41 | ]; 42 | -------------------------------------------------------------------------------- /kirby/config/fields/email.php: -------------------------------------------------------------------------------- 1 | 'text', 7 | 'props' => [ 8 | /** 9 | * Unset inherited props 10 | */ 11 | 'converter' => null, 12 | 'counter' => null, 13 | 14 | /** 15 | * Sets the HTML5 autocomplete mode for the input 16 | */ 17 | 'autocomplete' => function (string $autocomplete = 'email') { 18 | return $autocomplete; 19 | }, 20 | 21 | /** 22 | * Changes the email icon to something custom 23 | */ 24 | 'icon' => function (string $icon = 'email') { 25 | return $icon; 26 | }, 27 | 28 | /** 29 | * Custom placeholder text, when the field is empty. 30 | */ 31 | 'placeholder' => function ($value = null) { 32 | return I18n::translate($value, $value) ?? I18n::translate('email.placeholder'); 33 | } 34 | ], 35 | 'validations' => [ 36 | 'minlength', 37 | 'maxlength', 38 | 'email' 39 | ] 40 | ]; 41 | -------------------------------------------------------------------------------- /kirby/config/api/models/PageBlueprint.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'name' => function (PageBlueprint $blueprint) { 11 | return $blueprint->name(); 12 | }, 13 | 'num' => function (PageBlueprint $blueprint) { 14 | return $blueprint->num(); 15 | }, 16 | 'options' => function (PageBlueprint $blueprint) { 17 | return $blueprint->options(); 18 | }, 19 | 'preview' => function (PageBlueprint $blueprint) { 20 | return $blueprint->preview(); 21 | }, 22 | 'status' => function (PageBlueprint $blueprint) { 23 | return $blueprint->status(); 24 | }, 25 | 'tabs' => function (PageBlueprint $blueprint) { 26 | return $blueprint->tabs(); 27 | }, 28 | 'title' => function (PageBlueprint $blueprint) { 29 | return $blueprint->title(); 30 | }, 31 | ], 32 | 'type' => 'Kirby\Cms\PageBlueprint', 33 | 'views' => [ 34 | ], 35 | ]; 36 | -------------------------------------------------------------------------------- /kirby/src/Cms/NestObject.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://getkirby.com/license 15 | */ 16 | class NestObject extends Obj 17 | { 18 | /** 19 | * Converts the object to an array 20 | * 21 | * @return array 22 | */ 23 | public function toArray(): array 24 | { 25 | $result = []; 26 | 27 | foreach ((array)$this as $key => $value) { 28 | if (is_a($value, 'Kirby\Cms\Field') === true) { 29 | $result[$key] = $value->value(); 30 | continue; 31 | } 32 | 33 | if (is_object($value) === true && method_exists($value, 'toArray')) { 34 | $result[$key] = $value->toArray(); 35 | continue; 36 | } 37 | 38 | $result[$key] = $value; 39 | } 40 | 41 | return $result; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /kirby/src/Http/Request/Auth/BearerAuth.php: -------------------------------------------------------------------------------- 1 | token = $token; 23 | } 24 | 25 | /** 26 | * Converts the object to a string 27 | * 28 | * @return string 29 | */ 30 | public function __toString(): string 31 | { 32 | return ucfirst($this->type()) . ' ' . $this->token(); 33 | } 34 | 35 | /** 36 | * Returns the authentication token 37 | * 38 | * @return string 39 | */ 40 | public function token(): string 41 | { 42 | return $this->token; 43 | } 44 | 45 | /** 46 | * Returns the auth type 47 | * 48 | * @return string 49 | */ 50 | public function type(): string 51 | { 52 | return 'bearer'; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /kirby/i18n/rules/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-217 Florian Eckerstorfer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | ./tests/kirby 15 | 16 | 17 | 18 | 19 | ./classes 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/mixins/_grid-shift.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Shift columns and reorder them within their container using relative 3 | /// positioning. 4 | /// 5 | /// @group features 6 | /// 7 | /// @name Grid shift 8 | /// 9 | /// @argument {number (unitless)} $shift [false] 10 | /// The number of columns to shift the column. 11 | /// 12 | /// @argument {map} $grid [$neat-grid] 13 | /// The grid to be used to determine how far to shift the column. 14 | /// By default, the global `$neat-grid` will be used. 15 | /// 16 | /// @example scss 17 | /// .element { 18 | /// @include grid-shift(3); 19 | /// } 20 | /// 21 | /// @example css 22 | /// .element { 23 | /// left: calc(25% - 25px + 20px); 24 | /// position: relative; 25 | /// } 26 | 27 | @mixin grid-shift($shift: false, $grid: $neat-grid) { 28 | @if $shift { 29 | $_shift-value: calc(#{_neat-column-width($grid, $shift)} + #{_retrieve-neat-setting($grid, gutter)}); 30 | #{_neat-float-direction($grid)}: $_shift-value; 31 | } @else { 32 | #{_neat-float-direction($grid)}: auto; 33 | } 34 | 35 | position: relative; 36 | } 37 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/mixins/_grid-collapse.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Creates collapsed grid object that consumes the gutters of its container, 3 | /// for use in nested layouts. 4 | /// 5 | /// @group features 6 | /// 7 | /// @name Grid collapse 8 | /// 9 | /// @argument {map} $grid [$neat-grid] 10 | /// The grid to be used to generate the collapsed container. 11 | /// By default, the global `$neat-grid` will be used. 12 | /// 13 | /// @example scss 14 | /// .element { 15 | /// @include grid-collapse; 16 | /// } 17 | /// 18 | /// @example css 19 | /// .element { 20 | /// margin-left: -20px; 21 | /// margin-right: -20px; 22 | /// width: calc(100% + 40px); 23 | /// } 24 | 25 | @mixin grid-collapse($grid: $neat-grid) { 26 | $_grid-gutter: _retrieve-neat-setting($grid, gutter); 27 | 28 | @if unit($_grid-gutter) == "%" { 29 | @warn "`grid-collapse` is not compatible with percentage based gutters."; 30 | } 31 | 32 | margin-#{_neat-float-direction($grid)}: -($_grid-gutter); 33 | margin-#{_neat-opposite-direction($grid)}: -($_grid-gutter); 34 | width: calc(100% + #{($_grid-gutter * 2)}); 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Martin Folkers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /site/plugins/kirby-minify-html/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Ahmet Bora 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /kirby/src/Toolkit/Tpl.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://opensource.org/licenses/MIT 15 | */ 16 | class Tpl 17 | { 18 | /** 19 | * Renders the template 20 | * 21 | * @param string $file 22 | * @param array $data 23 | * @return string 24 | */ 25 | public static function load(string $file = null, array $data = []): string 26 | { 27 | if (is_file($file) === false) { 28 | return ''; 29 | } 30 | 31 | ob_start(); 32 | 33 | $exception = null; 34 | try { 35 | F::load($file, null, $data); 36 | } catch (Throwable $e) { 37 | $exception = $e; 38 | } 39 | 40 | $content = ob_get_contents(); 41 | ob_end_clean(); 42 | 43 | if ($exception === null) { 44 | return $content; 45 | } 46 | 47 | throw $exception; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /site/plugins/kirby3-fingerprint/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Bruno Meilick 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /kirby/i18n/rules/mk.json: -------------------------------------------------------------------------------- 1 | { 2 | "А": "A", 3 | "Б": "B", 4 | "В": "V", 5 | "Г": "G", 6 | "Д": "D", 7 | "Ѓ": "Gj", 8 | "Е": "E", 9 | "Ж": "Zh", 10 | "З": "Z", 11 | "Ѕ": "Dz", 12 | "И": "I", 13 | "Ј": "J", 14 | "К": "K", 15 | "Л": "L", 16 | "Љ": "Lj", 17 | "М": "M", 18 | "Н": "N", 19 | "Њ": "Nj", 20 | "О": "O", 21 | "П": "P", 22 | "Р": "R", 23 | "С": "S", 24 | "Т": "T", 25 | "Ќ": "Kj", 26 | "У": "U", 27 | "Ф": "F", 28 | "Х": "H", 29 | "Ц": "C", 30 | "Ч": "Ch", 31 | "Џ": "Dj", 32 | "Ш": "Sh", 33 | "а": "a", 34 | "б": "b", 35 | "в": "v", 36 | "г": "g", 37 | "д": "d", 38 | "ѓ": "gj", 39 | "е": "e", 40 | "ж": "zh", 41 | "з": "z", 42 | "ѕ": "dz", 43 | "и": "i", 44 | "ј": "j", 45 | "к": "k", 46 | "л": "l", 47 | "љ": "lj", 48 | "м": "m", 49 | "н": "n", 50 | "њ": "nj", 51 | "о": "o", 52 | "п": "p", 53 | "р": "r", 54 | "с": "s", 55 | "т": "t", 56 | "ќ": "kj", 57 | "у": "u", 58 | "ф": "f", 59 | "х": "h", 60 | "ц": "c", 61 | "ч": "ch", 62 | "џ": "dj", 63 | "ш": "sh" 64 | } 65 | -------------------------------------------------------------------------------- /kirby/i18n/rules/bg.json: -------------------------------------------------------------------------------- 1 | { 2 | "А": "A", 3 | "Б": "B", 4 | "В": "V", 5 | "Г": "G", 6 | "Д": "D", 7 | "Е": "E", 8 | "Ж": "J", 9 | "З": "Z", 10 | "И": "I", 11 | "Й": "Y", 12 | "К": "K", 13 | "Л": "L", 14 | "М": "M", 15 | "Н": "N", 16 | "О": "O", 17 | "П": "P", 18 | "Р": "R", 19 | "С": "S", 20 | "Т": "T", 21 | "У": "U", 22 | "Ф": "F", 23 | "Х": "H", 24 | "Ц": "Ts", 25 | "Ч": "Ch", 26 | "Ш": "Sh", 27 | "Щ": "Sht", 28 | "Ъ": "A", 29 | "Ь": "I", 30 | "Ю": "Iu", 31 | "Я": "Ia", 32 | "а": "a", 33 | "б": "b", 34 | "в": "v", 35 | "г": "g", 36 | "д": "d", 37 | "е": "e", 38 | "ж": "j", 39 | "з": "z", 40 | "и": "i", 41 | "й": "y", 42 | "к": "k", 43 | "л": "l", 44 | "м": "m", 45 | "н": "n", 46 | "о": "o", 47 | "п": "p", 48 | "р": "r", 49 | "с": "s", 50 | "т": "t", 51 | "у": "u", 52 | "ф": "f", 53 | "х": "h", 54 | "ц": "ts", 55 | "ч": "ch", 56 | "ш": "sh", 57 | "щ": "sht", 58 | "ъ": "a", 59 | "ь": "i", 60 | "ю": "iu", 61 | "я": "ia", 62 | "ия": "ia", 63 | "йо": "iо", 64 | "ьо": "io" 65 | } 66 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/pagination.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * Sets the number of items per page. If there are more items the pagination navigation will be shown at the bottom of the section. 9 | */ 10 | 'limit' => function (int $limit = 20) { 11 | return $limit; 12 | }, 13 | /** 14 | * Sets the default page for the pagination. This will overwrite default pagination. 15 | */ 16 | 'page' => function (int $page = null) { 17 | return get('page', $page); 18 | }, 19 | ], 20 | 'methods' => [ 21 | 'pagination' => function () { 22 | $pagination = new Pagination([ 23 | 'limit' => $this->limit, 24 | 'page' => $this->page, 25 | 'total' => $this->total 26 | ]); 27 | 28 | return [ 29 | 'limit' => $pagination->limit(), 30 | 'offset' => $pagination->offset(), 31 | 'page' => $pagination->page(), 32 | 'total' => $pagination->total(), 33 | ]; 34 | }, 35 | ] 36 | ]; 37 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_compact-shorthand.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | // scss-lint:disable ElsePlacement 4 | 5 | /// Transforms shorthand to its shortest possible form. 6 | /// 7 | /// @argument {list} $values 8 | /// List of directional values. 9 | /// 10 | /// @example scss 11 | /// $values: _compact-shorthand(10px 20px 10px 20px); 12 | /// 13 | /// // Output 14 | /// $values: 10px 20px; 15 | /// 16 | /// @return {list} 17 | /// 18 | /// @access private 19 | 20 | @function _compact-shorthand($values) { 21 | $output: null; 22 | 23 | $a: nth($values, 1); 24 | $b: if(length($values) < 2, $a, nth($values, 2)); 25 | $c: if(length($values) < 3, $a, nth($values, 3)); 26 | $d: if(length($values) < 2, $a, nth($values, if(length($values) < 4, 2, 4))); 27 | 28 | @if $a == 0 { $a: 0; } 29 | @if $b == 0 { $b: 0; } 30 | @if $c == 0 { $c: 0; } 31 | @if $d == 0 { $d: 0; } 32 | 33 | @if $a == $b and $a == $c and $a == $d { $output: $a; } 34 | @else if $a == $c and $b == $d { $output: $a $b; } 35 | @else if $b == $d { $output: $a $b $c; } 36 | @else { $output: $a $b $c $d; } 37 | 38 | @return $output; 39 | } 40 | -------------------------------------------------------------------------------- /source/styles/base/_buttons.scss: -------------------------------------------------------------------------------- 1 | $_button-background-color: $action-color; 2 | $_button-background-color-hover: shade($action-color, 20%); 3 | 4 | #{$all-buttons} { 5 | appearance: none; 6 | background-color: $_button-background-color; 7 | border: 0; 8 | border-radius: $base-border-radius; 9 | color: contrast-switch($_button-background-color); 10 | cursor: pointer; 11 | display: inline-block; 12 | font-family: $base-font-family; 13 | font-size: 16px; 14 | -webkit-font-smoothing: antialiased; 15 | font-weight: 600; 16 | line-height: 1; 17 | padding: $small-spacing $base-spacing; 18 | text-align: center; 19 | text-decoration: none; 20 | transition: background-color $base-duration $base-timing; 21 | user-select: none; 22 | vertical-align: middle; 23 | white-space: nowrap; 24 | 25 | &:hover { 26 | background-color: $_button-background-color-hover; 27 | color: contrast-switch($_button-background-color-hover); 28 | } 29 | 30 | &:focus { 31 | outline: $focus-outline; 32 | outline-offset: $focus-outline-offset; 33 | } 34 | 35 | &:disabled { 36 | cursor: not-allowed; 37 | opacity: 0.5; 38 | 39 | &:hover { 40 | background-color: $_button-background-color; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /kirby/config/api/models/Language.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'code' => function (Language $language) { 11 | return $language->code(); 12 | }, 13 | 'default' => function (Language $language) { 14 | return $language->isDefault(); 15 | }, 16 | 'direction' => function (Language $language) { 17 | return $language->direction(); 18 | }, 19 | 'locale' => function (Language $language) { 20 | return $language->locale(); 21 | }, 22 | 'name' => function (Language $language) { 23 | return $language->name(); 24 | }, 25 | 'rules' => function (Language $language) { 26 | return $language->rules(); 27 | }, 28 | 'url' => function (Language $language) { 29 | return $language->url(); 30 | }, 31 | ], 32 | 'type' => 'Kirby\Cms\Language', 33 | 'views' => [ 34 | 'default' => [ 35 | 'code', 36 | 'default', 37 | 'direction', 38 | 'locale', 39 | 'name', 40 | 'rules', 41 | 'url' 42 | ] 43 | ] 44 | ]; 45 | -------------------------------------------------------------------------------- /kirby/i18n/rules/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ъ": "", 3 | "Ь": "", 4 | "А": "A", 5 | "Б": "B", 6 | "Ц": "C", 7 | "Ч": "Ch", 8 | "Д": "D", 9 | "Е": "E", 10 | "Ё": "E", 11 | "Э": "E", 12 | "Ф": "F", 13 | "Г": "G", 14 | "Х": "H", 15 | "И": "I", 16 | "Й": "Y", 17 | "Я": "Ya", 18 | "Ю": "Yu", 19 | "К": "K", 20 | "Л": "L", 21 | "М": "M", 22 | "Н": "N", 23 | "О": "O", 24 | "П": "P", 25 | "Р": "R", 26 | "С": "S", 27 | "Ш": "Sh", 28 | "Щ": "Shch", 29 | "Т": "T", 30 | "У": "U", 31 | "В": "V", 32 | "Ы": "Y", 33 | "З": "Z", 34 | "Ж": "Zh", 35 | "ъ": "", 36 | "ь": "", 37 | "а": "a", 38 | "б": "b", 39 | "ц": "c", 40 | "ч": "ch", 41 | "д": "d", 42 | "е": "e", 43 | "ё": "e", 44 | "э": "e", 45 | "ф": "f", 46 | "г": "g", 47 | "х": "h", 48 | "и": "i", 49 | "й": "y", 50 | "я": "ya", 51 | "ю": "yu", 52 | "к": "k", 53 | "л": "l", 54 | "м": "m", 55 | "н": "n", 56 | "о": "o", 57 | "п": "p", 58 | "р": "r", 59 | "с": "s", 60 | "ш": "sh", 61 | "щ": "shch", 62 | "т": "t", 63 | "у": "u", 64 | "в": "v", 65 | "ы": "y", 66 | "з": "z", 67 | "ж": "zh" 68 | } 69 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_size.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Sets the `width` and `height` of the element in one statement. 4 | /// 5 | /// @argument {number (with unit) | string} $width 6 | /// 7 | /// @argument {number (with unit) | string} $height [$width] 8 | /// 9 | /// @example scss 10 | /// .first-element { 11 | /// @include size(2em); 12 | /// } 13 | /// 14 | /// // CSS Output 15 | /// .first-element { 16 | /// width: 2em; 17 | /// height: 2em; 18 | /// } 19 | /// 20 | /// @example scss 21 | /// .second-element { 22 | /// @include size(auto, 10em); 23 | /// } 24 | /// 25 | /// // CSS Output 26 | /// .second-element { 27 | /// width: auto; 28 | /// height: 10em; 29 | /// } 30 | /// 31 | /// @require {function} _is-size 32 | 33 | @mixin size( 34 | $width, 35 | $height: $width 36 | ) { 37 | @if _is-size($height) { 38 | height: $height; 39 | } @else { 40 | @error "`#{$height}` is not a valid length for the `$height` argument " + 41 | "in the `size` mixin."; 42 | } 43 | 44 | @if _is-size($width) { 45 | width: $width; 46 | } @else { 47 | @error "`#{$width}` is not a valid length for the `$width` argument " + 48 | "in the `size` mixin."; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/mixins/_grid-push.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Push or pull a grid column by manipulating its left margin. 3 | /// 4 | /// @group features 5 | /// 6 | /// @name Grid push 7 | /// 8 | /// @argument {number (unitless)} $push [false] 9 | /// The number of columns to push the column. 10 | /// 11 | /// @argument {map} $grid [$neat-grid] 12 | /// The grid to be used to determine how far to push the column. 13 | /// By default, the global `$neat-grid` will be used. 14 | /// 15 | /// @example scss 16 | /// .element { 17 | /// @include grid-push(3); 18 | /// } 19 | /// 20 | /// @example css 21 | /// .element { 22 | /// margin-left: calc(25% - 25px + 40px); 23 | /// } 24 | 25 | @mixin grid-push($push: false, $grid: $neat-grid) { 26 | $_grid-columns: _retrieve-neat-setting($grid, columns); 27 | $_grid-gutter: _retrieve-neat-setting($grid, gutter); 28 | 29 | @if $push { 30 | $_gutter-affordance: $_grid-gutter * 2; 31 | $_margin-value: calc(#{_neat-column-width($grid, $push)} + #{$_gutter-affordance}); 32 | margin-#{_neat-float-direction($grid)}: $_margin-value; 33 | } @else { 34 | $_margin-value: _retrieve-neat-setting($grid, gutter); 35 | margin-#{_neat-float-direction($grid)}: $_margin-value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | [ 27 | /* 1 */ 28 | 'index' => $base = __DIR__, 29 | 30 | /* 2 */ 31 | // 'index' => __DIR__, 32 | // 'base' => $base = dirname(__DIR__), 33 | // 'content' => $base . '/content', 34 | // 'site' => $base . '/site', 35 | 36 | /* 1 & 2 */ 37 | 'storage' => $storage = $base . '/storage', 38 | 'accounts' => $storage . '/accounts', 39 | 'cache' => $storage . '/cache', 40 | 'sessions' => $storage . '/sessions', 41 | ] 42 | ]); 43 | 44 | echo $kirby->render(); 45 | -------------------------------------------------------------------------------- /site/plugins/kirby-minify-html/index.php: -------------------------------------------------------------------------------- 1 | file(), $data); 15 | 16 | if (option('afbora.kirby-minify-html.enabled') === true) { 17 | $htmlMin = new HtmlMin(); 18 | 19 | $options = option('afbora.kirby-minify-html.options', []); 20 | 21 | foreach ($options as $option => $status) { 22 | if (method_exists($htmlMin, $option)) { 23 | $htmlMin->{$option}((bool)$status); 24 | } 25 | } 26 | 27 | return $htmlMin->minify($html); 28 | } 29 | 30 | return $html; 31 | } 32 | } 33 | 34 | Kirby::plugin('afbora/kirby-minify-html', [ 35 | 'options' => [ 36 | 'enabled' => true, 37 | 'options' => [] 38 | ], 39 | 'components' => [ 40 | 'template' => function (Kirby $kirby, string $name, string $contentType = null) { 41 | return new MinifyHTML($name, $contentType); 42 | } 43 | ] 44 | ]); 45 | -------------------------------------------------------------------------------- /kirby/i18n/rules/hi.json: -------------------------------------------------------------------------------- 1 | { 2 | "अ": "a", 3 | "आ": "aa", 4 | "ए": "e", 5 | "ई": "ii", 6 | "ऍ": "ei", 7 | "ऎ": "ae", 8 | "ऐ": "ai", 9 | "इ": "i", 10 | "ओ": "o", 11 | "ऑ": "oi", 12 | "ऒ": "oii", 13 | "ऊ": "uu", 14 | "औ": "ou", 15 | "उ": "u", 16 | "ब": "B", 17 | "भ": "Bha", 18 | "च": "Ca", 19 | "छ": "Chha", 20 | "ड": "Da", 21 | "ढ": "Dha", 22 | "फ": "Fa", 23 | "फ़": "Fi", 24 | "ग": "Ga", 25 | "घ": "Gha", 26 | "ग़": "Ghi", 27 | "ह": "Ha", 28 | "ज": "Ja", 29 | "झ": "Jha", 30 | "क": "Ka", 31 | "ख": "Kha", 32 | "ख़": "Khi", 33 | "ल": "L", 34 | "ळ": "Li", 35 | "ऌ": "Li", 36 | "ऴ": "Lii", 37 | "ॡ": "Lii", 38 | "म": "Ma", 39 | "न": "Na", 40 | "ङ": "Na", 41 | "ञ": "Nia", 42 | "ण": "Nae", 43 | "ऩ": "Ni", 44 | "ॐ": "oms", 45 | "प": "Pa", 46 | "क़": "Qi", 47 | "र": "Ra", 48 | "ऋ": "Ri", 49 | "ॠ": "Ri", 50 | "ऱ": "Ri", 51 | "स": "Sa", 52 | "श": "Sha", 53 | "ष": "Shha", 54 | "ट": "Ta", 55 | "त": "Ta", 56 | "ठ": "Tha", 57 | "द": "Tha", 58 | "थ": "Tha", 59 | "ध": "Thha", 60 | "ड़": "ugDha", 61 | "ढ़": "ugDhha", 62 | "व": "Va", 63 | "य": "Ya", 64 | "य़": "Yi", 65 | "ज़": "Za" 66 | } 67 | -------------------------------------------------------------------------------- /kirby/src/Http/Path.php: -------------------------------------------------------------------------------- 1 | 14 | * @link https://getkirby.com 15 | * @copyright Bastian Allgeier GmbH 16 | * @license https://opensource.org/licenses/MIT 17 | */ 18 | class Path extends Collection 19 | { 20 | public function __construct($items) 21 | { 22 | if (is_string($items) === true) { 23 | $items = Str::split($items, '/'); 24 | } 25 | 26 | parent::__construct($items ?? []); 27 | } 28 | 29 | public function __toString(): string 30 | { 31 | return $this->toString(); 32 | } 33 | 34 | public function toString(bool $leadingSlash = false, bool $trailingSlash = false): string 35 | { 36 | if (empty($this->data) === true) { 37 | return ''; 38 | } 39 | 40 | $path = implode('/', $this->data); 41 | 42 | $leadingSlash = $leadingSlash === true ? '/' : null; 43 | $trailingSlash = $trailingSlash === true ? '/' : null; 44 | 45 | return $leadingSlash . $path . $trailingSlash; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/mixins/_grid-visual.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Creates a series of guide lines using the `background-image` property on a 3 | /// grid container to visualise the columns and gutters of the grid. 4 | /// 5 | /// @group features 6 | /// 7 | /// @name Grid visual 8 | /// 9 | /// @argument {color} $color 10 | /// The color of the guide lines created. 11 | /// 12 | /// @argument {map} $grid [$neat-grid] 13 | /// The grid used to determine the guides 14 | /// 15 | /// @example scss 16 | /// .element { 17 | /// @include grid-visual; 18 | /// } 19 | /// 20 | /// @example css 21 | /// .element { 22 | /// background-image: repeating-linear-gradient( … ) ; 23 | /// } 24 | 25 | @mixin grid-visual($color: null, $grid: $neat-grid) { 26 | @if not $color { 27 | $color: _retrieve-neat-setting($grid, color); 28 | } 29 | 30 | $_grid-columns: _retrieve-neat-setting($grid, columns); 31 | $_grid-gutter: _retrieve-neat-setting($grid, gutter); 32 | $_grid-visual-column: "#{_neat-column-width($grid, 1)} + #{$_grid-gutter}"; 33 | $_grid-visual: 34 | transparent, 35 | transparent $_grid-gutter, 36 | $color $_grid-gutter, 37 | $color calc(#{$_grid-visual-column}), 38 | ; 39 | 40 | background-image: repeating-linear-gradient(to right, $_grid-visual); 41 | } 42 | -------------------------------------------------------------------------------- /kirby/i18n/rules/sr.json: -------------------------------------------------------------------------------- 1 | { 2 | "а": "a", 3 | "б": "b", 4 | "в": "v", 5 | "г": "g", 6 | "д": "d", 7 | "ђ": "dj", 8 | "е": "e", 9 | "ж": "z", 10 | "з": "z", 11 | "и": "i", 12 | "ј": "j", 13 | "к": "k", 14 | "л": "l", 15 | "љ": "lj", 16 | "м": "m", 17 | "н": "n", 18 | "њ": "nj", 19 | "о": "o", 20 | "п": "p", 21 | "р": "r", 22 | "с": "s", 23 | "т": "t", 24 | "ћ": "c", 25 | "у": "u", 26 | "ф": "f", 27 | "х": "h", 28 | "ц": "c", 29 | "ч": "c", 30 | "џ": "dz", 31 | "ш": "s", 32 | "А": "A", 33 | "Б": "B", 34 | "В": "V", 35 | "Г": "G", 36 | "Д": "D", 37 | "Ђ": "Dj", 38 | "Е": "E", 39 | "Ж": "Z", 40 | "З": "Z", 41 | "И": "I", 42 | "Ј": "J", 43 | "К": "K", 44 | "Л": "L", 45 | "Љ": "Lj", 46 | "М": "M", 47 | "Н": "N", 48 | "Њ": "Nj", 49 | "О": "O", 50 | "П": "P", 51 | "Р": "R", 52 | "С": "S", 53 | "Т": "T", 54 | "Ћ": "C", 55 | "У": "U", 56 | "Ф": "F", 57 | "Х": "H", 58 | "Ц": "C", 59 | "Ч": "C", 60 | "Џ": "Dz", 61 | "Ш": "S", 62 | "š": "s", 63 | "đ": "dj", 64 | "ž": "z", 65 | "ć": "c", 66 | "č": "c", 67 | "Š": "S", 68 | "Đ": "DJ", 69 | "Ž": "Z", 70 | "Ć": "C", 71 | "Č": "C" 72 | } -------------------------------------------------------------------------------- /source/styles/vendor/neat/neat/mixins/_grid-column.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /// Creates a grid column of requested size. 3 | /// 4 | /// @group features 5 | /// 6 | /// @name Grid column 7 | /// 8 | /// @argument {number (unitless)} $columns [null] 9 | /// Specifies the number of columns an element should span based on the total 10 | /// columns of the grid. 11 | /// 12 | /// This can also be defined in a shorthand syntaxt which also contains the 13 | /// total column count such as `3 of 5`. 14 | /// 15 | /// @argument {map} $grid [$neat-grid] 16 | /// The grid to be used to generate the column. 17 | /// By default, the global `$neat-grid` will be used. 18 | /// 19 | /// @example scss 20 | /// .element { 21 | /// @include grid-column(3); 22 | /// } 23 | /// 24 | /// @example css 25 | /// .element { 26 | /// width: calc(25% - 25px); 27 | /// float: left; 28 | /// margin-left: 20px; 29 | /// } 30 | 31 | @mixin grid-column($columns: null, $grid: $neat-grid) { 32 | $columns: _neat-column-default($grid, $columns); 33 | $_grid-columns: _retrieve-neat-setting($grid, columns); 34 | $_grid-gutter: _retrieve-neat-setting($grid, gutter); 35 | 36 | width: calc(#{_neat-column-width($grid, $columns)}); 37 | float: _neat-float-direction($grid); 38 | margin-#{_neat-float-direction($grid)}: $_grid-gutter; 39 | } 40 | -------------------------------------------------------------------------------- /tasks/watch.js: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------- 3 | Monitoring 4 | --------------------------------------- 5 | */ 6 | 7 | const 8 | {watch, parallel} = require('gulp'), 9 | conf = require('../config'), 10 | 11 | {styles} = require('./styles.js'), 12 | {scripts} = require('./scripts.js'), 13 | {images} = require('./images.js'), 14 | {fonts} = require('./fonts.js'), 15 | 16 | browserSync = require('browser-sync').init 17 | ; 18 | 19 | 20 | /* 21 | * See https://github.com/BrowserSync/browser-sync/issues/711 22 | */ 23 | 24 | function reload(done) { 25 | browserSync.reload(); 26 | done(); 27 | } 28 | 29 | 30 | /* 31 | * Watches for changes, recompiles & injects assets 32 | */ 33 | 34 | function watchStyles() { 35 | watch(conf.src.styles + '/**/*.scss', styles); 36 | } 37 | 38 | function watchScripts() { 39 | watch(conf.src.scripts + '/**/*.js', scripts); 40 | } 41 | 42 | function watchImages() { 43 | watch(conf.src.images + '/**/*', images); 44 | } 45 | 46 | function watchFonts() { 47 | watch(conf.src.fonts + '/**/*', fonts); 48 | } 49 | 50 | function watchCode() { 51 | watch(conf.watch.code, reload); 52 | } 53 | 54 | 55 | /* 56 | * Exports 57 | */ 58 | 59 | exports.watch = parallel( 60 | watchStyles, 61 | watchScripts, 62 | watchImages, 63 | watchFonts, 64 | watchCode 65 | ); 66 | -------------------------------------------------------------------------------- /kirby/src/Cms/KirbyTags.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://getkirby.com/license 14 | */ 15 | class KirbyTags extends \Kirby\Text\KirbyTags 16 | { 17 | /** 18 | * The KirbyTag rendering class 19 | * 20 | * @var string 21 | */ 22 | protected static $tagClass = 'Kirby\Cms\KirbyTag'; 23 | 24 | /** 25 | * @param string|null $text 26 | * @param array $data 27 | * @param array $options 28 | * @param \Kirby\Cms\App|null $app 29 | * @return string 30 | */ 31 | public static function parse(string $text = null, array $data = [], array $options = [], ?App $app = null): string 32 | { 33 | if ($app !== null) { 34 | $text = $app->apply('kirbytags:before', compact('text', 'data', 'options'), 'text'); 35 | } 36 | 37 | $text = parent::parse($text, $data, $options); 38 | 39 | if ($app !== null) { 40 | $text = $app->apply('kirbytags:after', compact('text', 'data', 'options'), 'text'); 41 | } 42 | 43 | return $text; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /kirby/config/api/routes/languages.php: -------------------------------------------------------------------------------- 1 | 'languages', 9 | 'method' => 'GET', 10 | 'action' => function () { 11 | return $this->kirby()->languages(); 12 | } 13 | ], 14 | [ 15 | 'pattern' => 'languages', 16 | 'method' => 'POST', 17 | 'action' => function () { 18 | return $this->kirby()->languages()->create($this->requestBody()); 19 | } 20 | ], 21 | [ 22 | 'pattern' => 'languages/(:any)', 23 | 'method' => 'GET', 24 | 'action' => function (string $code) { 25 | return $this->kirby()->languages()->find($code); 26 | } 27 | ], 28 | [ 29 | 'pattern' => 'languages/(:any)', 30 | 'method' => 'PATCH', 31 | 'action' => function (string $code) { 32 | if ($language = $this->kirby()->languages()->find($code)) { 33 | return $language->update($this->requestBody()); 34 | } 35 | } 36 | ], 37 | [ 38 | 'pattern' => 'languages/(:any)', 39 | 'method' => 'DELETE', 40 | 'action' => function (string $code) { 41 | if ($language = $this->kirby()->languages()->find($code)) { 42 | return $language->delete(); 43 | } 44 | } 45 | ] 46 | ]; 47 | -------------------------------------------------------------------------------- /kirby/config/fields.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/fields/checkboxes.php', 5 | 'date' => __DIR__ . '/fields/date.php', 6 | 'email' => __DIR__ . '/fields/email.php', 7 | 'files' => __DIR__ . '/fields/files.php', 8 | 'gap' => __DIR__ . '/fields/gap.php', 9 | 'headline' => __DIR__ . '/fields/headline.php', 10 | 'hidden' => __DIR__ . '/fields/hidden.php', 11 | 'info' => __DIR__ . '/fields/info.php', 12 | 'line' => __DIR__ . '/fields/line.php', 13 | 'multiselect' => __DIR__ . '/fields/multiselect.php', 14 | 'number' => __DIR__ . '/fields/number.php', 15 | 'pages' => __DIR__ . '/fields/pages.php', 16 | 'radio' => __DIR__ . '/fields/radio.php', 17 | 'range' => __DIR__ . '/fields/range.php', 18 | 'select' => __DIR__ . '/fields/select.php', 19 | 'structure' => __DIR__ . '/fields/structure.php', 20 | 'tags' => __DIR__ . '/fields/tags.php', 21 | 'tel' => __DIR__ . '/fields/tel.php', 22 | 'text' => __DIR__ . '/fields/text.php', 23 | 'textarea' => __DIR__ . '/fields/textarea.php', 24 | 'time' => __DIR__ . '/fields/time.php', 25 | 'toggle' => __DIR__ . '/fields/toggle.php', 26 | 'url' => __DIR__ . '/fields/url.php', 27 | 'users' => __DIR__ . '/fields/users.php' 28 | ]; 29 | -------------------------------------------------------------------------------- /kirby/config/fields/number.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * Default number that will be saved when a new page/user/file is created 9 | */ 10 | 'default' => function ($default = null) { 11 | return $this->toNumber($default); 12 | }, 13 | /** 14 | * The lowest allowed number 15 | */ 16 | 'min' => function (float $min = null) { 17 | return $min; 18 | }, 19 | /** 20 | * The highest allowed number 21 | */ 22 | 'max' => function (float $max = null) { 23 | return $max; 24 | }, 25 | /** 26 | * Allowed incremental steps between numbers (i.e `0.5`) 27 | */ 28 | 'step' => function ($step = null) { 29 | return $this->toNumber($step); 30 | }, 31 | 'value' => function ($value = null) { 32 | return $this->toNumber($value); 33 | } 34 | ], 35 | 'methods' => [ 36 | 'toNumber' => function ($value) { 37 | if ($this->isEmpty($value) === true) { 38 | return null; 39 | } 40 | 41 | return is_float($value) === true ? $value : (float)Str::float($value); 42 | } 43 | ], 44 | 'validations' => [ 45 | 'min', 46 | 'max' 47 | ] 48 | ]; 49 | -------------------------------------------------------------------------------- /kirby/src/Cms/Nest.php: -------------------------------------------------------------------------------- 1 | 15 | * @link https://getkirby.com 16 | * @copyright Bastian Allgeier GmbH 17 | * @license https://getkirby.com/license 18 | */ 19 | class Nest 20 | { 21 | /** 22 | * @param $data 23 | * @param null $parent 24 | * @return mixed 25 | */ 26 | public static function create($data, $parent = null) 27 | { 28 | if (is_scalar($data) === true) { 29 | return new Field($parent, $data, $data); 30 | } 31 | 32 | $result = []; 33 | 34 | foreach ($data as $key => $value) { 35 | if (is_array($value) === true) { 36 | $result[$key] = static::create($value, $parent); 37 | } elseif (is_scalar($value) === true) { 38 | $result[$key] = new Field($parent, $key, $value); 39 | } 40 | } 41 | 42 | if (is_int(key($data))) { 43 | return new NestCollection($result); 44 | } else { 45 | return new NestObject($result); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/utilities/_font-source-declaration.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Builds the `src` list for an `@font-face` declaration. 4 | /// 5 | /// @link https://goo.gl/Ru1bKP 6 | /// 7 | /// @argument {string} $font-family 8 | /// 9 | /// @argument {string} $file-path 10 | /// 11 | /// @argument {boolean} $asset-pipeline 12 | /// 13 | /// @argument {list} $file-formats 14 | /// 15 | /// @return {list} 16 | /// 17 | /// @require {function} _contains 18 | /// 19 | /// @access private 20 | 21 | @function _font-source-declaration( 22 | $font-family, 23 | $file-path, 24 | $asset-pipeline, 25 | $file-formats 26 | ) { 27 | $src: (); 28 | 29 | $formats-map: ( 30 | eot: "#{$file-path}.eot?#iefix" format("embedded-opentype"), 31 | woff2: "#{$file-path}.woff2" format("woff2"), 32 | woff: "#{$file-path}.woff" format("woff"), 33 | ttf: "#{$file-path}.ttf" format("truetype"), 34 | svg: "#{$file-path}.svg##{$font-family}" format("svg"), 35 | ); 36 | 37 | @each $key, $values in $formats-map { 38 | @if _contains($file-formats, $key) { 39 | $file-path: nth($values, 1); 40 | $font-format: nth($values, 2); 41 | 42 | @if $asset-pipeline == true { 43 | $src: append($src, font-url($file-path) $font-format, comma); 44 | } @else { 45 | $src: append($src, url($file-path) $font-format, comma); 46 | } 47 | } 48 | } 49 | 50 | @return $src; 51 | } 52 | -------------------------------------------------------------------------------- /kirby/src/Http/Query.php: -------------------------------------------------------------------------------- 1 | 14 | * @link https://getkirby.com 15 | * @copyright Bastian Allgeier GmbH 16 | * @license https://opensource.org/licenses/MIT 17 | */ 18 | class Query extends Obj 19 | { 20 | public function __construct($query) 21 | { 22 | if (is_string($query) === true) { 23 | parse_str(ltrim($query, '?'), $query); 24 | } 25 | 26 | parent::__construct($query ?? []); 27 | } 28 | 29 | public function isEmpty(): bool 30 | { 31 | return empty((array)$this) === true; 32 | } 33 | 34 | public function isNotEmpty(): bool 35 | { 36 | return empty((array)$this) === false; 37 | } 38 | 39 | public function __toString(): string 40 | { 41 | return $this->toString(); 42 | } 43 | 44 | public function toString($questionMark = false): string 45 | { 46 | $query = http_build_query($this); 47 | 48 | if (empty($query) === true) { 49 | return ''; 50 | } 51 | 52 | if ($questionMark === true) { 53 | $query = '?' . $query; 54 | } 55 | 56 | return $query; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /kirby/i18n/rules/hy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Ա": "A", 3 | "Բ": "B", 4 | "Գ": "G", 5 | "Դ": "D", 6 | "Ե": "E", 7 | "Զ": "Z", 8 | "Է": "E", 9 | "Ը": "Y", 10 | "Թ": "Th", 11 | "Ժ": "Zh", 12 | "Ի": "I", 13 | "Լ": "L", 14 | "Խ": "Kh", 15 | "Ծ": "Ts", 16 | "Կ": "K", 17 | "Հ": "H", 18 | "Ձ": "Dz", 19 | "Ղ": "Gh", 20 | "Ճ": "Tch", 21 | "Մ": "M", 22 | "Յ": "Y", 23 | "Ն": "N", 24 | "Շ": "Sh", 25 | "Ո": "Vo", 26 | "Չ": "Ch", 27 | "Պ": "P", 28 | "Ջ": "J", 29 | "Ռ": "R", 30 | "Ս": "S", 31 | "Վ": "V", 32 | "Տ": "T", 33 | "Ր": "R", 34 | "Ց": "C", 35 | "Ւ": "u", 36 | "Փ": "Ph", 37 | "Ք": "Q", 38 | "և": "ev", 39 | "Օ": "O", 40 | "Ֆ": "F", 41 | "ա": "a", 42 | "բ": "b", 43 | "գ": "g", 44 | "դ": "d", 45 | "ե": "e", 46 | "զ": "z", 47 | "է": "e", 48 | "ը": "y", 49 | "թ": "th", 50 | "ժ": "zh", 51 | "ի": "i", 52 | "լ": "l", 53 | "խ": "kh", 54 | "ծ": "ts", 55 | "կ": "k", 56 | "հ": "h", 57 | "ձ": "dz", 58 | "ղ": "gh", 59 | "ճ": "tch", 60 | "մ": "m", 61 | "յ": "y", 62 | "ն": "n", 63 | "շ": "sh", 64 | "ո": "vo", 65 | "չ": "ch", 66 | "պ": "p", 67 | "ջ": "j", 68 | "ռ": "r", 69 | "ս": "s", 70 | "վ": "v", 71 | "տ": "t", 72 | "ր": "r", 73 | "ց": "c", 74 | "ւ": "u", 75 | "փ": "ph", 76 | "ք": "q", 77 | "օ": "o", 78 | "ֆ": "f" 79 | } 80 | -------------------------------------------------------------------------------- /kirby/config/sections/mixins/parent.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * Sets the query to a parent to find items for the list 9 | */ 10 | 'parent' => function (string $parent = null) { 11 | return $parent; 12 | } 13 | ], 14 | 'methods' => [ 15 | 'parentModel' => function () { 16 | $parent = $this->parent; 17 | 18 | if (is_string($parent) === true) { 19 | $query = $parent; 20 | $parent = $this->model->query($query); 21 | 22 | if (!$parent) { 23 | throw new Exception('The parent for the query "' . $query . '" cannot be found in the section "' . $this->name() . '"'); 24 | } 25 | 26 | if ( 27 | is_a($parent, 'Kirby\Cms\Page') === false && 28 | is_a($parent, 'Kirby\Cms\Site') === false && 29 | is_a($parent, 'Kirby\Cms\File') === false && 30 | is_a($parent, 'Kirby\Cms\User') === false 31 | ) { 32 | throw new Exception('The parent for the section "' . $this->name() . '" has to be a page, site or user object'); 33 | } 34 | } 35 | 36 | if ($parent === null) { 37 | return $this->model; 38 | } 39 | 40 | return $parent; 41 | } 42 | ] 43 | ]; 44 | -------------------------------------------------------------------------------- /kirby/config/api/collections.php: -------------------------------------------------------------------------------- 1 | [ 12 | 'model' => 'page', 13 | 'type' => 'Kirby\Cms\Pages', 14 | 'view' => 'compact' 15 | ], 16 | 17 | /** 18 | * Files 19 | */ 20 | 'files' => [ 21 | 'model' => 'file', 22 | 'type' => 'Kirby\Cms\Files' 23 | ], 24 | 25 | /** 26 | * Languages 27 | */ 28 | 'languages' => [ 29 | 'model' => 'language', 30 | 'type' => 'Kirby\Cms\Languages' 31 | ], 32 | 33 | /** 34 | * Pages 35 | */ 36 | 'pages' => [ 37 | 'model' => 'page', 38 | 'type' => 'Kirby\Cms\Pages', 39 | 'view' => 'compact' 40 | ], 41 | 42 | /** 43 | * Roles 44 | */ 45 | 'roles' => [ 46 | 'model' => 'role', 47 | 'type' => 'Kirby\Cms\Roles', 48 | 'view' => 'compact' 49 | ], 50 | 51 | /** 52 | * Translations 53 | */ 54 | 'translations' => [ 55 | 'model' => 'translation', 56 | 'type' => 'Kirby\Cms\Translations', 57 | 'view' => 'compact' 58 | ], 59 | 60 | /** 61 | * Users 62 | */ 63 | 'users' => [ 64 | 'default' => function () { 65 | return $this->users(); 66 | }, 67 | 'model' => 'user', 68 | 'type' => 'Kirby\Cms\Users', 69 | 'view' => 'compact' 70 | ] 71 | 72 | ]; 73 | -------------------------------------------------------------------------------- /kirby/src/Cms/UserBlueprint.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://getkirby.com/license 14 | */ 15 | class UserBlueprint extends Blueprint 16 | { 17 | /** 18 | * UserBlueprint constructor. 19 | * 20 | * @param array $props 21 | * @throws \Kirby\Exception\InvalidArgumentException 22 | */ 23 | public function __construct(array $props) 24 | { 25 | // normalize and translate the description 26 | $props['description'] = $this->i18n($props['description'] ?? null); 27 | 28 | // register the other props 29 | parent::__construct($props); 30 | 31 | // normalize all available page options 32 | $this->props['options'] = $this->normalizeOptions( 33 | $props['options'] ?? true, 34 | // defaults 35 | [ 36 | 'create' => null, 37 | 'changeEmail' => null, 38 | 'changeLanguage' => null, 39 | 'changeName' => null, 40 | 'changePassword' => null, 41 | 'changeRole' => null, 42 | 'delete' => null, 43 | 'update' => null, 44 | ] 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /kirby/assets/whoops.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #efefef; 3 | font: normal normal 400 12px/1.5 -apple-system, BlinkMacSystemFont, Segoe UI, 4 | Roboto, Helvetica, Arial, sans-serif; 5 | } 6 | 7 | .left-panel { 8 | background: transparent; 9 | } 10 | 11 | header { 12 | background-color: #313740; 13 | } 14 | 15 | .exc-title-primary { 16 | color: hsl(0, 71%, 55%); 17 | } 18 | 19 | .frame.active { 20 | color: hsl(0, 71%, 55%); 21 | box-shadow: inset -5px 0 0 0 #d16464; 22 | } 23 | 24 | .frame:not(.active):hover { 25 | background: rgba(203, 215, 229, 0.5); 26 | } 27 | 28 | .rightButton { 29 | color: #999; 30 | box-shadow: inset 0 0 0 1px #777; 31 | border-radius: 0; 32 | } 33 | 34 | .rightButton:hover { 35 | box-shadow: inset 0 0 0 1px #555; 36 | color: #777; 37 | } 38 | 39 | .details-heading { 40 | color: #7e9abf; 41 | font-weight: 500; 42 | } 43 | 44 | .frame-code { 45 | background: #000; 46 | } 47 | 48 | pre.code-block, 49 | code.code-block, 50 | .frame-args.code-block, 51 | .frame-args.code-block samp { 52 | background: #16171a; 53 | } 54 | 55 | .linenums li.current { 56 | background: transparent; 57 | } 58 | 59 | .linenums li.current.active { 60 | background: rgba(209, 100, 100, 0.3); 61 | } 62 | 63 | pre .atv, 64 | code .atv, 65 | pre .str, 66 | code .str { 67 | color: #a7bd68; 68 | } 69 | 70 | pre .tag, 71 | code .tag { 72 | color: #d16464; 73 | } 74 | 75 | pre .kwd, 76 | code .kwd { 77 | color: #8abeb7; 78 | } 79 | 80 | pre .atn, 81 | code .atn { 82 | color: #de935f; 83 | } 84 | -------------------------------------------------------------------------------- /kirby/config/fields/mixins/options.php: -------------------------------------------------------------------------------- 1 | [ 7 | /** 8 | * API settings for options requests. This will only take affect when `options` is set to `api`. 9 | */ 10 | 'api' => function ($api = null) { 11 | return $api; 12 | }, 13 | /** 14 | * An array with options 15 | */ 16 | 'options' => function ($options = []) { 17 | return $options; 18 | }, 19 | /** 20 | * Query settings for options queries. This will only take affect when `options` is set to `query`. 21 | */ 22 | 'query' => function ($query = null) { 23 | return $query; 24 | }, 25 | ], 26 | 'computed' => [ 27 | 'options' => function (): array { 28 | return $this->getOptions(); 29 | } 30 | ], 31 | 'methods' => [ 32 | 'getOptions' => function () { 33 | return Options::factory( 34 | $this->options(), 35 | $this->props, 36 | $this->model() 37 | ); 38 | }, 39 | 'sanitizeOption' => function ($option) { 40 | $allowed = array_column($this->options(), 'value'); 41 | return in_array($option, $allowed, true) === true ? $option : null; 42 | }, 43 | 'sanitizeOptions' => function ($options) { 44 | $allowed = array_column($this->options(), 'value'); 45 | return array_intersect($options, $allowed); 46 | }, 47 | ] 48 | ]; 49 | -------------------------------------------------------------------------------- /kirby/src/Data/Json.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://opensource.org/licenses/MIT 15 | */ 16 | class Json extends Handler 17 | { 18 | /** 19 | * Converts an array to an encoded JSON string 20 | * 21 | * @param mixed $data 22 | * @return string 23 | */ 24 | public static function encode($data): string 25 | { 26 | return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); 27 | } 28 | 29 | /** 30 | * Parses an encoded JSON string and returns a multi-dimensional array 31 | * 32 | * @param mixed $string 33 | * @return array 34 | */ 35 | public static function decode($string): array 36 | { 37 | if ($string === null) { 38 | return []; 39 | } 40 | 41 | if (is_array($string) === true) { 42 | return $string; 43 | } 44 | 45 | if (is_string($string) === false) { 46 | throw new InvalidArgumentException('Invalid JSON data; please pass a string'); 47 | } 48 | 49 | $result = json_decode($string, true); 50 | 51 | if (is_array($result) === true) { 52 | return $result; 53 | } else { 54 | throw new InvalidArgumentException('JSON string is invalid'); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /kirby/src/Form/Fields.php: -------------------------------------------------------------------------------- 1 | 13 | * @link https://getkirby.com 14 | * @copyright Bastian Allgeier GmbH 15 | * @license https://opensource.org/licenses/MIT 16 | */ 17 | class Fields extends Collection 18 | { 19 | /** 20 | * Internal setter for each object in the Collection. 21 | * This takes care of validation and of setting 22 | * the collection prop on each object correctly. 23 | * 24 | * @param string $name 25 | * @param object|array $field 26 | * @return self 27 | */ 28 | public function __set(string $name, $field) 29 | { 30 | if (is_array($field) === true) { 31 | // use the array key as name if the name is not set 32 | $field['name'] = $field['name'] ?? $name; 33 | $field = new Field($field['type'], $field); 34 | } 35 | 36 | return parent::__set($field->name(), $field); 37 | } 38 | 39 | /** 40 | * Converts the fields collection to an 41 | * array and also does that for every 42 | * included field. 43 | * 44 | * @param \Closure|null $map 45 | * @return array 46 | */ 47 | public function toArray(Closure $map = null): array 48 | { 49 | $array = []; 50 | 51 | foreach ($this as $field) { 52 | $array[$field->name()] = $field->toArray(); 53 | } 54 | 55 | return $array; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_position.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a concise, one-line method for setting an element’s positioning 4 | /// properties: `position`, `top`, `right`, `bottom` and `left`. Use a `null` 5 | /// value to “skip” an edge of the box. 6 | /// 7 | /// @argument {string} $position 8 | /// A CSS position value. 9 | /// 10 | /// @argument {list} $box-edge-values 11 | /// List of lengths; accepts CSS shorthand. 12 | /// 13 | /// @example scss 14 | /// .element { 15 | /// @include position(relative, 0 null null 10em); 16 | /// } 17 | /// 18 | /// // CSS Output 19 | /// .element { 20 | /// left: 10em; 21 | /// position: relative; 22 | /// top: 0; 23 | /// } 24 | /// 25 | /// @example scss 26 | /// .element { 27 | /// @include position(absolute, 0); 28 | /// } 29 | /// 30 | /// // CSS Output 31 | /// .element { 32 | /// position: absolute; 33 | /// top: 0; 34 | /// right: 0; 35 | /// bottom: 0; 36 | /// left: 0; 37 | /// } 38 | /// 39 | /// @require {function} _is-length 40 | /// 41 | /// @require {function} _unpack-shorthand 42 | 43 | @mixin position( 44 | $position, 45 | $box-edge-values 46 | ) { 47 | $box-edge-values: _unpack-shorthand($box-edge-values); 48 | $offsets: ( 49 | top: nth($box-edge-values, 1), 50 | right: nth($box-edge-values, 2), 51 | bottom: nth($box-edge-values, 3), 52 | left: nth($box-edge-values, 4), 53 | ); 54 | 55 | position: $position; 56 | 57 | @each $offset, $value in $offsets { 58 | @if _is-length($value) { 59 | #{$offset}: $value; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /kirby/src/Cms/KirbyTag.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://getkirby.com/license 14 | */ 15 | class KirbyTag extends \Kirby\Text\KirbyTag 16 | { 17 | /** 18 | * Finds a file for the given path. 19 | * The method first searches the file 20 | * in the current parent, if it's a page. 21 | * Afterwards it uses Kirby's global file finder. 22 | * 23 | * @param string $path 24 | * @return \Kirby\Cms\File|null 25 | */ 26 | public function file(string $path) 27 | { 28 | $parent = $this->parent(); 29 | 30 | if (method_exists($parent, 'file') === true && $file = $parent->file($path)) { 31 | return $file; 32 | } 33 | 34 | if (is_a($parent, 'Kirby\Cms\File') === true && $file = $parent->page()->file($path)) { 35 | return $file; 36 | } 37 | 38 | return $this->kirby()->file($path, null, true); 39 | } 40 | 41 | /** 42 | * Returns the current Kirby instance 43 | * 44 | * @return \Kirby\Cms\App 45 | */ 46 | public function kirby() 47 | { 48 | return $this->data['kirby'] ?? App::instance(); 49 | } 50 | 51 | /** 52 | * Returns the parent model 53 | * 54 | * @return \Kirby\Cms\Model|null 55 | */ 56 | public function parent() 57 | { 58 | return $this->data['parent']; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /kirby/src/Cms/SiteBlueprint.php: -------------------------------------------------------------------------------- 1 | 11 | * @link https://getkirby.com 12 | * @copyright Bastian Allgeier GmbH 13 | * @license https://getkirby.com/license 14 | */ 15 | class SiteBlueprint extends Blueprint 16 | { 17 | /** 18 | * Creates a new page blueprint object 19 | * with the given props 20 | * 21 | * @param array $props 22 | */ 23 | public function __construct(array $props) 24 | { 25 | parent::__construct($props); 26 | 27 | // normalize all available page options 28 | $this->props['options'] = $this->normalizeOptions( 29 | $props['options'] ?? true, 30 | // defaults 31 | [ 32 | 'changeTitle' => null, 33 | 'update' => null, 34 | ], 35 | // aliases 36 | [ 37 | 'title' => 'changeTitle', 38 | ] 39 | ); 40 | } 41 | 42 | /** 43 | * Returns the preview settings 44 | * The preview setting controls the "Open" 45 | * button in the panel and redirects it to a 46 | * different URL if necessary. 47 | * 48 | * @return string|bool 49 | */ 50 | public function preview() 51 | { 52 | $preview = $this->props['options']['preview'] ?? true; 53 | 54 | if (is_string($preview) === true) { 55 | return $this->model->toString($preview); 56 | } 57 | 58 | return $preview; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /kirby/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getkirby/cms", 3 | "description": "The Kirby 3 core", 4 | "version": "3.4.4", 5 | "license": "proprietary", 6 | "keywords": ["kirby", "cms", "core"], 7 | "homepage": "https://getkirby.com", 8 | "type": "kirby-cms", 9 | "authors": [ 10 | { 11 | "name": "Kirby Team", 12 | "email": "support@getkirby.com", 13 | "homepage": "https://getkirby.com" 14 | } 15 | ], 16 | "support": { 17 | "email": "support@getkirby.com", 18 | "issues": "https://github.com/getkirby/kirby/issues", 19 | "forum": "https://forum.getkirby.com", 20 | "source": "https://github.com/getkirby/kirby" 21 | }, 22 | "require": { 23 | "php": ">=7.2.0 <7.5.0", 24 | "ext-mbstring": "*", 25 | "ext-ctype": "*", 26 | "getkirby/composer-installer": "^1.0", 27 | "mustangostang/spyc": "0.6.3", 28 | "michelf/php-smartypants": "1.8.1", 29 | "claviska/simpleimage": "3.3.4", 30 | "phpmailer/phpmailer": "6.1.6", 31 | "filp/whoops": "2.7.2", 32 | "true/punycode": "2.1.1", 33 | "laminas/laminas-escaper": "2.6.1" 34 | }, 35 | "autoload": { 36 | "files": ["config/setup.php"], 37 | "classmap": ["dependencies/"], 38 | "psr-4": { 39 | "Kirby\\": "src/" 40 | } 41 | }, 42 | "scripts": { 43 | "analyze": "phpstan analyse", 44 | "build": "./scripts/build", 45 | "fix": "php-cs-fixer fix --config .php_cs", 46 | "post-update-cmd": "curl -o cacert.pem https://curl.haxx.se/ca/cacert.pem", 47 | "test": "phpunit --stderr --coverage-html=tests/coverage", 48 | "zip": "composer archive --format=zip --file=dist" 49 | }, 50 | "config": { 51 | "optimize-autoloader": true 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /kirby/src/Http/Request/Auth/BasicAuth.php: -------------------------------------------------------------------------------- 1 | credentials = base64_decode($token); 35 | $this->username = Str::before($this->credentials, ':'); 36 | $this->password = Str::after($this->credentials, ':'); 37 | } 38 | 39 | /** 40 | * Returns the entire unencoded credentials string 41 | * 42 | * @return string 43 | */ 44 | public function credentials(): string 45 | { 46 | return $this->credentials; 47 | } 48 | 49 | /** 50 | * Returns the password 51 | * 52 | * @return string|null 53 | */ 54 | public function password(): ?string 55 | { 56 | return $this->password; 57 | } 58 | 59 | /** 60 | * Returns the authentication type 61 | * 62 | * @return string 63 | */ 64 | public function type(): string 65 | { 66 | return 'basic'; 67 | } 68 | 69 | /** 70 | * Returns the username 71 | * 72 | * @return string|null 73 | */ 74 | public function username(): ?string 75 | { 76 | return $this->username; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /kirby/src/Cms/UserPermissions.php: -------------------------------------------------------------------------------- 1 | 10 | * @link https://getkirby.com 11 | * @copyright Bastian Allgeier GmbH 12 | * @license https://getkirby.com/license 13 | */ 14 | class UserPermissions extends ModelPermissions 15 | { 16 | /** 17 | * @var string 18 | */ 19 | protected $category = 'users'; 20 | 21 | /** 22 | * UserPermissions constructor 23 | * 24 | * @param \Kirby\Cms\Model $model 25 | */ 26 | public function __construct(Model $model) 27 | { 28 | parent::__construct($model); 29 | 30 | // change the scope of the permissions, when the current user is this user 31 | $this->category = $this->user && $this->user->is($model) ? 'user' : 'users'; 32 | } 33 | 34 | /** 35 | * @return bool 36 | */ 37 | protected function canChangeRole(): bool 38 | { 39 | return $this->model->roles()->count() > 1; 40 | } 41 | 42 | /** 43 | * @return bool 44 | */ 45 | protected function canCreate(): bool 46 | { 47 | // the admin can always create new users 48 | if ($this->user->isAdmin() === true) { 49 | return true; 50 | } 51 | 52 | // users who are not admins cannot create admins 53 | if ($this->model->isAdmin() === false) { 54 | return false; 55 | } 56 | 57 | return true; 58 | } 59 | 60 | /** 61 | * @return bool 62 | */ 63 | protected function canDelete(): bool 64 | { 65 | return $this->model->isLastAdmin() !== true; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /kirby/config/api/routes/auth.php: -------------------------------------------------------------------------------- 1 | 'auth', 12 | 'method' => 'GET', 13 | 'action' => function () { 14 | if ($user = $this->kirby()->auth()->user()) { 15 | return $this->resolve($user)->view('auth'); 16 | } 17 | 18 | throw new NotFoundException('The user cannot be found'); 19 | } 20 | ], 21 | [ 22 | 'pattern' => 'auth/login', 23 | 'method' => 'POST', 24 | 'auth' => false, 25 | 'action' => function () { 26 | $auth = $this->kirby()->auth(); 27 | 28 | // csrf token check 29 | if ($auth->type() === 'session' && $auth->csrf() === false) { 30 | throw new InvalidArgumentException('Invalid CSRF token'); 31 | } 32 | 33 | $email = $this->requestBody('email'); 34 | $long = $this->requestBody('long'); 35 | $password = $this->requestBody('password'); 36 | 37 | $user = $this->kirby()->auth()->login($email, $password, $long); 38 | 39 | return [ 40 | 'code' => 200, 41 | 'status' => 'ok', 42 | 'user' => $this->resolve($user)->view('auth')->toArray() 43 | ]; 44 | } 45 | ], 46 | [ 47 | 'pattern' => 'auth/logout', 48 | 'method' => 'POST', 49 | 'auth' => false, 50 | 'action' => function () { 51 | $this->kirby()->auth()->logout(); 52 | return true; 53 | } 54 | ], 55 | ]; 56 | -------------------------------------------------------------------------------- /kirby/src/Toolkit/Controller.php: -------------------------------------------------------------------------------- 1 | 15 | * @link https://getkirby.com 16 | * @copyright Bastian Allgeier GmbH 17 | * @license https://opensource.org/licenses/MIT 18 | */ 19 | class Controller 20 | { 21 | protected $function; 22 | 23 | public function __construct(Closure $function) 24 | { 25 | $this->function = $function; 26 | } 27 | 28 | public function arguments(array $data = []): array 29 | { 30 | $info = new ReflectionFunction($this->function); 31 | $args = []; 32 | 33 | foreach ($info->getParameters() as $parameter) { 34 | $name = $parameter->getName(); 35 | $args[] = $data[$name] ?? null; 36 | } 37 | 38 | return $args; 39 | } 40 | 41 | public function call($bind = null, $data = []) 42 | { 43 | $args = $this->arguments($data); 44 | 45 | if ($bind === null) { 46 | return call_user_func($this->function, ...$args); 47 | } 48 | 49 | return $this->function->call($bind, ...$args); 50 | } 51 | 52 | public static function load(string $file) 53 | { 54 | if (is_file($file) === false) { 55 | return null; 56 | } 57 | 58 | $function = F::load($file); 59 | 60 | if (is_a($function, 'Closure') === false) { 61 | return null; 62 | } 63 | 64 | return new static($function); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /kirby/src/Data/Handler.php: -------------------------------------------------------------------------------- 1 | 15 | * @link https://getkirby.com 16 | * @copyright Bastian Allgeier GmbH 17 | * @license https://opensource.org/licenses/MIT 18 | */ 19 | abstract class Handler 20 | { 21 | /** 22 | * Parses an encoded string and returns a multi-dimensional array 23 | * 24 | * Needs to throw an Exception if the file can't be parsed. 25 | * 26 | * @param mixed $string 27 | * @return array 28 | */ 29 | abstract public static function decode($string): array; 30 | 31 | /** 32 | * Converts an array to an encoded string 33 | * 34 | * @param mixed $data 35 | * @return string 36 | */ 37 | abstract public static function encode($data): string; 38 | 39 | /** 40 | * Reads data from a file 41 | * 42 | * @param string $file 43 | * @return array 44 | */ 45 | public static function read(string $file): array 46 | { 47 | if (is_file($file) !== true) { 48 | throw new Exception('The file "' . $file . '" does not exist'); 49 | } 50 | 51 | return static::decode(F::read($file)); 52 | } 53 | 54 | /** 55 | * Writes data to a file 56 | * 57 | * @param string $file 58 | * @param mixed $data 59 | * @return bool 60 | */ 61 | public static function write(string $file = null, $data = []): bool 62 | { 63 | return F::write($file, static::encode($data)); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /kirby/config/presets/pages.php: -------------------------------------------------------------------------------- 1 | $headline, 11 | 'type' => 'pages', 12 | 'layout' => 'list', 13 | 'status' => $status 14 | ]; 15 | 16 | if ($props === true) { 17 | $props = []; 18 | } 19 | 20 | if (is_string($props) === true) { 21 | $props = [ 22 | 'headline' => $props 23 | ]; 24 | } 25 | 26 | // inject the global templates definition 27 | if (empty($templates) === false) { 28 | $props['templates'] = $props['templates'] ?? $templates; 29 | } 30 | 31 | return array_replace_recursive($defaults, $props); 32 | }; 33 | 34 | $sections = []; 35 | 36 | $drafts = $props['drafts'] ?? []; 37 | $unlisted = $props['unlisted'] ?? false; 38 | $listed = $props['listed'] ?? []; 39 | 40 | 41 | if ($drafts !== false) { 42 | $sections['drafts'] = $section(t('pages.status.draft'), 'drafts', $drafts); 43 | } 44 | 45 | if ($unlisted !== false) { 46 | $sections['unlisted'] = $section(t('pages.status.unlisted'), 'unlisted', $unlisted); 47 | } 48 | 49 | if ($listed !== false) { 50 | $sections['listed'] = $section(t('pages.status.listed'), 'listed', $listed); 51 | } 52 | 53 | // cleaning up 54 | unset($props['drafts'], $props['unlisted'], $props['listed'], $props['templates']); 55 | 56 | return array_merge($props, ['sections' => $sections]); 57 | }; 58 | -------------------------------------------------------------------------------- /kirby/config/fields/checkboxes.php: -------------------------------------------------------------------------------- 1 | ['min', 'options'], 8 | 'props' => [ 9 | /** 10 | * Unset inherited props 11 | */ 12 | 'after' => null, 13 | 'before' => null, 14 | 'icon' => null, 15 | 'placeholder' => null, 16 | 17 | /** 18 | * Arranges the checkboxes in the given number of columns 19 | */ 20 | 'columns' => function (int $columns = 1) { 21 | return $columns; 22 | }, 23 | /** 24 | * Default value for the field, which will be used when a page/file/user is created 25 | */ 26 | 'default' => function ($default = null) { 27 | return Str::split($default, ','); 28 | }, 29 | /** 30 | * Maximum number of checked boxes 31 | */ 32 | 'max' => function (int $max = null) { 33 | return $max; 34 | }, 35 | /** 36 | * Minimum number of checked boxes 37 | */ 38 | 'min' => function (int $min = null) { 39 | return $min; 40 | }, 41 | 'value' => function ($value = null) { 42 | return Str::split($value, ','); 43 | }, 44 | ], 45 | 'computed' => [ 46 | 'default' => function () { 47 | return $this->sanitizeOptions($this->default); 48 | }, 49 | 'value' => function () { 50 | return $this->sanitizeOptions($this->value); 51 | }, 52 | ], 53 | 'save' => function ($value): string { 54 | return A::join($value, ', '); 55 | }, 56 | 'validations' => [ 57 | 'options', 58 | 'max', 59 | 'min' 60 | ] 61 | ]; 62 | -------------------------------------------------------------------------------- /kirby/src/Http/Idn.php: -------------------------------------------------------------------------------- 1 | 13 | * @link https://getkirby.com 14 | * @copyright Bastian Allgeier GmbH 15 | * @license https://opensource.org/licenses/MIT 16 | */ 17 | class Idn 18 | { 19 | public static function decode(string $domain) 20 | { 21 | return (new Punycode())->decode($domain); 22 | } 23 | 24 | public static function encode(string $domain) 25 | { 26 | return (new Punycode())->encode($domain); 27 | } 28 | 29 | /** 30 | * Decodes a email address to the Unicode format 31 | * 32 | * @param string $email 33 | * @return string 34 | */ 35 | public static function decodeEmail(string $email): string 36 | { 37 | if (Str::contains($email, 'xn--') === true) { 38 | $parts = Str::split($email, '@'); 39 | $address = $parts[0]; 40 | $domain = Idn::decode($parts[1] ?? ''); 41 | $email = $address . '@' . $domain; 42 | } 43 | 44 | return $email; 45 | } 46 | 47 | /** 48 | * Encodes a email address to the Punycode format 49 | * 50 | * @param string $email 51 | * @return string 52 | */ 53 | public static function encodeEmail(string $email): string 54 | { 55 | if (mb_detect_encoding($email, 'ASCII', true) === false) { 56 | $parts = Str::split($email, '@'); 57 | $address = $parts[0]; 58 | $domain = Idn::encode($parts[1] ?? ''); 59 | $email = $address . '@' . $domain; 60 | } 61 | 62 | return $email; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /kirby/src/Cache/NullCache.php: -------------------------------------------------------------------------------- 1 | 10 | * @link https://getkirby.com 11 | * @copyright Bastian Allgeier GmbH 12 | * @license https://opensource.org/licenses/MIT 13 | */ 14 | class NullCache extends Cache 15 | { 16 | /** 17 | * Writes an item to the cache for a given number of minutes and 18 | * returns whether the operation was successful 19 | * 20 | * 21 | * // put an item in the cache for 15 minutes 22 | * $cache->set('value', 'my value', 15); 23 | * 24 | * 25 | * @param string $key 26 | * @param mixed $value 27 | * @param int $minutes 28 | * @return bool 29 | */ 30 | public function set(string $key, $value, int $minutes = 0): bool 31 | { 32 | return true; 33 | } 34 | 35 | /** 36 | * Internal method to retrieve the raw cache value; 37 | * needs to return a Value object or null if not found 38 | * 39 | * @param string $key 40 | * @return \Kirby\Cache\Value|null 41 | */ 42 | public function retrieve(string $key) 43 | { 44 | return null; 45 | } 46 | 47 | /** 48 | * Removes an item from the cache and returns 49 | * whether the operation was successful 50 | * 51 | * @param string $key 52 | * @return bool 53 | */ 54 | public function remove(string $key): bool 55 | { 56 | return true; 57 | } 58 | 59 | /** 60 | * Flushes the entire cache and returns 61 | * whether the operation was successful 62 | * 63 | * @return bool 64 | */ 65 | public function flush(): bool 66 | { 67 | return true; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /kirby/views/panel.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Kirby Panel 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 |
30 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /kirby/src/Cms/PagePermissions.php: -------------------------------------------------------------------------------- 1 | 10 | * @link https://getkirby.com 11 | * @copyright Bastian Allgeier GmbH 12 | * @license https://getkirby.com/license 13 | */ 14 | class PagePermissions extends ModelPermissions 15 | { 16 | /** 17 | * @var string 18 | */ 19 | protected $category = 'pages'; 20 | 21 | /** 22 | * @return bool 23 | */ 24 | protected function canChangeSlug(): bool 25 | { 26 | return $this->model->isHomeOrErrorPage() !== true; 27 | } 28 | 29 | /** 30 | * @return bool 31 | */ 32 | protected function canChangeStatus(): bool 33 | { 34 | return $this->model->isErrorPage() !== true; 35 | } 36 | 37 | /** 38 | * @return bool 39 | */ 40 | protected function canChangeTemplate(): bool 41 | { 42 | if ($this->model->isHomeOrErrorPage() === true) { 43 | return false; 44 | } 45 | 46 | if (count($this->model->blueprints()) <= 1) { 47 | return false; 48 | } 49 | 50 | return true; 51 | } 52 | 53 | /** 54 | * @return bool 55 | */ 56 | protected function canDelete(): bool 57 | { 58 | return $this->model->isHomeOrErrorPage() !== true; 59 | } 60 | 61 | /** 62 | * @return bool 63 | */ 64 | protected function canSort(): bool 65 | { 66 | if ($this->model->isErrorPage() === true) { 67 | return false; 68 | } 69 | 70 | if ($this->model->isListed() !== true) { 71 | return false; 72 | } 73 | 74 | if ($this->model->blueprint()->num() !== 'default') { 75 | return false; 76 | } 77 | 78 | return true; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /kirby/src/Database/Sql/Mysql.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://opensource.org/licenses/MIT 15 | */ 16 | class Mysql extends Sql 17 | { 18 | /** 19 | * Returns a query to list the columns of a specified table; 20 | * the query needs to return rows with a column `name` 21 | * 22 | * @param string $table Table name 23 | * @return array 24 | */ 25 | public function columns(string $table): array 26 | { 27 | $databaseBinding = $this->bindingName('database'); 28 | $tableBinding = $this->bindingName('table'); 29 | 30 | $query = 'SELECT COLUMN_NAME AS name FROM INFORMATION_SCHEMA.COLUMNS '; 31 | $query .= 'WHERE TABLE_SCHEMA = ' . $databaseBinding . ' AND TABLE_NAME = ' . $tableBinding; 32 | 33 | return [ 34 | 'query' => $query, 35 | 'bindings' => [ 36 | $databaseBinding => $this->database->name(), 37 | $tableBinding => $table, 38 | ] 39 | ]; 40 | } 41 | 42 | /** 43 | * Returns a query to list the tables of the current database; 44 | * the query needs to return rows with a column `name` 45 | * 46 | * @return array 47 | */ 48 | public function tables(): array 49 | { 50 | $binding = $this->bindingName('database'); 51 | 52 | return [ 53 | 'query' => 'SELECT TABLE_NAME AS name FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ' . $binding, 54 | 'bindings' => [ 55 | $binding => $this->database->name() 56 | ] 57 | ]; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /kirby/src/Cms/SiteRules.php: -------------------------------------------------------------------------------- 1 | 14 | * @link https://getkirby.com 15 | * @copyright Bastian Allgeier GmbH 16 | * @license https://getkirby.com/license 17 | */ 18 | class SiteRules 19 | { 20 | /** 21 | * Validates if the site title can be changed 22 | * 23 | * @param \Kirby\Cms\Site $site 24 | * @param string $title 25 | * @return bool 26 | * @throws \Kirby\Exception\InvalidArgumentException If the title is empty 27 | * @throws \Kirby\Exception\PermissionException If the user is not allowed to change the title 28 | */ 29 | public static function changeTitle(Site $site, string $title): bool 30 | { 31 | if ($site->permissions()->changeTitle() !== true) { 32 | throw new PermissionException(['key' => 'site.changeTitle.permission']); 33 | } 34 | 35 | if (Str::length($title) === 0) { 36 | throw new InvalidArgumentException(['key' => 'site.changeTitle.empty']); 37 | } 38 | 39 | return true; 40 | } 41 | 42 | /** 43 | * Validates if the site can be updated 44 | * 45 | * @param \Kirby\Cms\Site $site 46 | * @param array $content 47 | * @return bool 48 | * @throws \Kirby\Exception\PermissionException If the user is not allowed to update the site 49 | */ 50 | public static function update(Site $site, array $content = []): bool 51 | { 52 | if ($site->permissions()->update() !== true) { 53 | throw new PermissionException(['key' => 'site.update.permission']); 54 | } 55 | 56 | return true; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /kirby/src/Data/Xml.php: -------------------------------------------------------------------------------- 1 | 13 | * @link https://getkirby.com 14 | * @copyright Bastian Allgeier GmbH 15 | * @license https://opensource.org/licenses/MIT 16 | */ 17 | class Xml extends Handler 18 | { 19 | /** 20 | * Converts an array to an encoded XML string 21 | * 22 | * @param mixed $data 23 | * @return string 24 | */ 25 | public static function encode($data): string 26 | { 27 | return XmlConverter::create($data, 'data'); 28 | } 29 | 30 | /** 31 | * Parses an encoded XML string and returns a multi-dimensional array 32 | * 33 | * @param mixed $string 34 | * @return array 35 | */ 36 | public static function decode($string): array 37 | { 38 | if ($string === null) { 39 | return []; 40 | } 41 | 42 | if (is_array($string) === true) { 43 | return $string; 44 | } 45 | 46 | if (is_string($string) === false) { 47 | throw new InvalidArgumentException('Invalid XML data; please pass a string'); 48 | } 49 | 50 | $result = XmlConverter::parse($string); 51 | 52 | if (is_array($result) === true) { 53 | // remove the root's name if it is the default to ensure that 54 | // the decoded data is the same as the input to the encode() method 55 | if ($result['@name'] === 'data') { 56 | unset($result['@name']); 57 | } 58 | 59 | return $result; 60 | } else { 61 | throw new InvalidArgumentException('XML string is invalid'); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /source/styles/vendor/bourbon/bourbon/library/_timing-functions.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | // scss-lint:disable SpaceAfterComma, UnnecessaryMantissa, TrailingZero 4 | 5 | //// 6 | /// CSS cubic-bezier timing functions. 7 | /// 8 | /// @link https://goo.gl/p8u6SK 9 | /// 10 | /// @type string 11 | //// 12 | 13 | $ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); 14 | $ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); 15 | $ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); 16 | $ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); 17 | $ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); 18 | $ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); 19 | $ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335); 20 | $ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); 21 | 22 | $ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940); 23 | $ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000); 24 | $ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000); 25 | $ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000); 26 | $ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000); 27 | $ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000); 28 | $ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000); 29 | $ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275); 30 | 31 | $ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955); 32 | $ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000); 33 | $ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000); 34 | $ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000); 35 | $ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); 36 | $ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000); 37 | $ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860); 38 | $ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550); 39 | -------------------------------------------------------------------------------- /kirby/src/Cms/Search.php: -------------------------------------------------------------------------------- 1 | 13 | * @link https://getkirby.com 14 | * @copyright Bastian Allgeier GmbH 15 | * @license https://getkirby.com/license 16 | */ 17 | class Search 18 | { 19 | /** 20 | * @param string|null $query 21 | * @param array $params 22 | * @return \Kirby\Cms\Files 23 | */ 24 | public static function files(string $query = null, $params = []) 25 | { 26 | return App::instance()->site()->index()->files()->search($query, $params); 27 | } 28 | 29 | /** 30 | * Native search method to search for anything within the collection 31 | * 32 | * @param \Kirby\Cms\Collection $collection 33 | * @param string|null $query 34 | * @param mixed $params 35 | * @return \Kirby\Cms\Collection|bool 36 | */ 37 | public static function collection(Collection $collection, string $query = null, $params = []) 38 | { 39 | $kirby = App::instance(); 40 | return $kirby->component('search')($kirby, $collection, $query, $params); 41 | } 42 | 43 | /** 44 | * @param string|null $query 45 | * @param array $params 46 | * @return \Kirby\Cms\Pages 47 | */ 48 | public static function pages(string $query = null, $params = []) 49 | { 50 | return App::instance()->site()->index()->search($query, $params); 51 | } 52 | 53 | /** 54 | * @param string|null $query 55 | * @param array $params 56 | * @return \Kirby\Cms\Users 57 | */ 58 | public static function users(string $query = null, $params = []) 59 | { 60 | return App::instance()->users()->search($query, $params); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /kirby/panel/dist/js/plugins.js: -------------------------------------------------------------------------------- 1 | 2 | window.panel = window.panel || {}; 3 | window.panel.plugins = { 4 | components: {}, 5 | created: [], 6 | fields: {}, 7 | icons: {}, 8 | sections: {}, 9 | routes: [], 10 | use: [], 11 | views: {}, 12 | thirdParty: {} 13 | }; 14 | 15 | window.panel.plugin = function (plugin, parts) { 16 | // Components 17 | resolve(parts, "components", function (name, options) { 18 | window.panel.plugins["components"][name] = options; 19 | }); 20 | 21 | // Fields 22 | resolve(parts, "fields", function (name, options) { 23 | window.panel.plugins["fields"][`k-${name}-field`] = options; 24 | }); 25 | 26 | // Icons 27 | resolve(parts, "icons", function (name, options) { 28 | window.panel.plugins["icons"][name] = options; 29 | }); 30 | 31 | // Sections 32 | resolve(parts, "sections", function (name, options) { 33 | window.panel.plugins["sections"][`k-${name}-section`] = options; 34 | }); 35 | 36 | // Vue.use 37 | resolve(parts, "use", function (name, options) { 38 | window.panel.plugins["use"].push(options); 39 | }); 40 | 41 | // created callback 42 | if (parts["created"]) { 43 | window.panel.plugins["created"].push(parts["created"]); 44 | } 45 | 46 | // Views 47 | resolve(parts, "views", function (name, options) { 48 | window.panel.plugins["views"][name] = options; 49 | }); 50 | 51 | // Login 52 | if (parts.login) { 53 | window.panel.plugins.login = parts.login; 54 | } 55 | 56 | // Third-party plugins 57 | resolve(parts, "thirdParty", function(name, options) { 58 | window.panel.plugins["thirdParty"][name] = options; 59 | }); 60 | 61 | }; 62 | 63 | function resolve(object, type, callback) { 64 | if (object[type]) { 65 | 66 | if (Object.entries) { 67 | Object.entries(object[type]).forEach(function ([name, options]) { 68 | callback(name, options); 69 | }); 70 | } 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /kirby/src/Toolkit/Silo.php: -------------------------------------------------------------------------------- 1 | 12 | * @link https://getkirby.com 13 | * @copyright Bastian Allgeier GmbH 14 | * @license https://opensource.org/licenses/MIT 15 | */ 16 | class Silo 17 | { 18 | /** 19 | * @var array 20 | */ 21 | public static $data = []; 22 | 23 | /** 24 | * Setter for new data. 25 | * 26 | * @param string|array $key 27 | * @param mixed $value 28 | * @return array 29 | */ 30 | public static function set($key, $value = null): array 31 | { 32 | if (is_array($key) === true) { 33 | return static::$data = array_merge(static::$data, $key); 34 | } else { 35 | static::$data[$key] = $value; 36 | return static::$data; 37 | } 38 | } 39 | 40 | /** 41 | * @param string|array $key 42 | * @param mixed $default 43 | * @return mixed 44 | */ 45 | public static function get($key = null, $default = null) 46 | { 47 | if ($key === null) { 48 | return static::$data; 49 | } 50 | 51 | return A::get(static::$data, $key, $default); 52 | } 53 | 54 | /** 55 | * Removes an item from the data array 56 | * 57 | * @param string|null $key 58 | * @return array 59 | */ 60 | public static function remove(string $key = null): array 61 | { 62 | // reset the entire array 63 | if ($key === null) { 64 | return static::$data = []; 65 | } 66 | 67 | // unset a single key 68 | unset(static::$data[$key]); 69 | 70 | // return the array without the removed key 71 | return static::$data; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /kirby/src/Email/Body.php: -------------------------------------------------------------------------------- 1 | , 13 | * Nico Hoffmann 14 | * @link https://getkirby.com 15 | * @copyright Bastian Allgeier GmbH 16 | * @license https://opensource.org/licenses/MIT 17 | */ 18 | class Body 19 | { 20 | use Properties; 21 | 22 | /** 23 | * @var string|null 24 | */ 25 | protected $html; 26 | 27 | /** 28 | * @var string|null 29 | */ 30 | protected $text; 31 | 32 | /** 33 | * Email body constructor 34 | * 35 | * @param array $props 36 | */ 37 | public function __construct(array $props = []) 38 | { 39 | $this->setProperties($props); 40 | } 41 | 42 | /** 43 | * Returns the HTML content of the email body 44 | * 45 | * @return string|null 46 | */ 47 | public function html() 48 | { 49 | return $this->html; 50 | } 51 | 52 | /** 53 | * Returns the plain text content of the email body 54 | * 55 | * @return string|null 56 | */ 57 | public function text() 58 | { 59 | return $this->text; 60 | } 61 | 62 | /** 63 | * Sets the HTML content for the email body 64 | * 65 | * @param string|null $html 66 | * @return self 67 | */ 68 | protected function setHtml(string $html = null) 69 | { 70 | $this->html = $html; 71 | return $this; 72 | } 73 | 74 | /** 75 | * Sets the plain text content for the email body 76 | * 77 | * @param string|null $text 78 | * @return self 79 | */ 80 | protected function setText(string $text = null) 81 | { 82 | $this->text = $text; 83 | return $this; 84 | } 85 | } 86 | --------------------------------------------------------------------------------