From fb310b279ea683933f6276d490a593a19dc3d9f4 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Sat, 9 Mar 2024 11:27:10 +0100 Subject: [PATCH] untrack content dir --- .gitignore | 4 +- assets/css/src/article.css | 3 + assets/css/src/articles.css | 31 ----- assets/css/src/footer.css | 5 +- assets/css/src/generic.css | 8 ++ assets/css/src/home.css | 3 + assets/css/src/html.css | 4 + assets/css/src/tabs.css | 10 +- assets/css/src/texts.css | 35 +++++- assets/css/src/variables.css | 7 +- assets/css/style.css | 2 + assets/js/script.js | 14 ++- content/articles/1_1988/year.txt | 5 - content/articles/articles.txt | 9 -- content/error/error.txt | 5 - content/home/home.txt | 5 - content/site.txt | 9 -- site/blueprints/pages/article.yml | 36 ------ site/blueprints/pages/articles.yml | 1 + site/blueprints/pages/blocks.yml | 17 +++ site/blueprints/pages/linear.yml | 20 +++ site/blueprints/pages/year.yml | 6 +- site/blueprints/site.yml | 16 +-- site/blueprints/tabs/meta.yml | 20 +++ site/blueprints/users/admin.yml | 2 +- site/blueprints/users/author.yml | 30 +++++ site/collections/articles.php | 5 - site/collections/years.php | 5 + site/config/config.php | 21 +++- .../plugins/panel-text-comments/.editorconfig | 20 +++ .../panel-text-comments/.gitattributes | 11 ++ site/plugins/panel-text-comments/.gitignore | 14 +++ site/plugins/panel-text-comments/LICENSE.md | 21 ++++ site/plugins/panel-text-comments/README.md | 117 ++++++++++++++++++ site/plugins/panel-text-comments/SECURITY.md | 18 +++ .../plugins/panel-text-comments/composer.json | 21 ++++ .../plugins/panel-text-comments/composer.lock | 66 ++++++++++ site/plugins/panel-text-comments/index.css | 2 + site/plugins/panel-text-comments/index.js | 15 +++ site/plugins/panel-text-comments/index.php | 3 + site/plugins/panel-text-comments/package.json | 7 ++ site/plugins/panel-text-comments/src/index.js | 12 ++ site/snippets/footer.php | 8 +- site/snippets/header.php | 14 +-- site/snippets/tabs.php | 57 +++++++++ site/templates/home.php | 59 +++------ site/templates/linear.php | 20 +++ 47 files changed, 634 insertions(+), 189 deletions(-) create mode 100644 assets/css/src/article.css delete mode 100644 assets/css/src/articles.css create mode 100644 assets/css/src/home.css delete mode 100644 content/articles/1_1988/year.txt delete mode 100644 content/articles/articles.txt delete mode 100644 content/error/error.txt delete mode 100644 content/home/home.txt delete mode 100644 content/site.txt delete mode 100644 site/blueprints/pages/article.yml create mode 100644 site/blueprints/pages/blocks.yml create mode 100644 site/blueprints/pages/linear.yml create mode 100644 site/blueprints/tabs/meta.yml create mode 100644 site/blueprints/users/author.yml delete mode 100644 site/collections/articles.php create mode 100644 site/collections/years.php create mode 100644 site/plugins/panel-text-comments/.editorconfig create mode 100644 site/plugins/panel-text-comments/.gitattributes create mode 100644 site/plugins/panel-text-comments/.gitignore create mode 100755 site/plugins/panel-text-comments/LICENSE.md create mode 100755 site/plugins/panel-text-comments/README.md create mode 100644 site/plugins/panel-text-comments/SECURITY.md create mode 100755 site/plugins/panel-text-comments/composer.json create mode 100644 site/plugins/panel-text-comments/composer.lock create mode 100644 site/plugins/panel-text-comments/index.css create mode 100644 site/plugins/panel-text-comments/index.js create mode 100755 site/plugins/panel-text-comments/index.php create mode 100644 site/plugins/panel-text-comments/package.json create mode 100755 site/plugins/panel-text-comments/src/index.js create mode 100644 site/snippets/tabs.php create mode 100644 site/templates/linear.php diff --git a/.gitignore b/.gitignore index 37e1b44..32dd5b1 100644 --- a/.gitignore +++ b/.gitignore @@ -55,4 +55,6 @@ Icon /kirby /vendor -/node_modules \ No newline at end of file +/node_modules + +/content \ No newline at end of file diff --git a/assets/css/src/article.css b/assets/css/src/article.css new file mode 100644 index 0000000..189444a --- /dev/null +++ b/assets/css/src/article.css @@ -0,0 +1,3 @@ +main.article { + margin-top: 0; +} diff --git a/assets/css/src/articles.css b/assets/css/src/articles.css deleted file mode 100644 index 515c50d..0000000 --- a/assets/css/src/articles.css +++ /dev/null @@ -1,31 +0,0 @@ -#articles { - margin: 0 var(--unit--horizontal); -} -#organize { - margin-bottom: calc(var(--unit--vertical)); -} -.article { - position: relative; - margin-bottom: calc(var(--unit--vertical) * 2); - box-sizing: border-box; -} - -.article__infos, -.article__labels { - transform: translateY(calc(0rem - (var(--unit--vertical) * 0.1))); -} - -.article__infos { - display: flex; -} - -.article__labels { - display: flex; -} - -.article .label { - margin-right: var(--unit--horizontal); - text-decoration: underline; - text-decoration-style: dotted; - text-underline-offset: 6px; -} diff --git a/assets/css/src/footer.css b/assets/css/src/footer.css index aaec82a..afead59 100644 --- a/assets/css/src/footer.css +++ b/assets/css/src/footer.css @@ -1,5 +1,8 @@ #main-footer { - position: absolute; + position: fixed; left: 0; bottom: 0; + width: calc(18 * var(--unit--horizontal)); + padding: var(--unit--horizontal); + padding-top: var(); } diff --git a/assets/css/src/generic.css b/assets/css/src/generic.css index f4ca74a..3928074 100644 --- a/assets/css/src/generic.css +++ b/assets/css/src/generic.css @@ -64,3 +64,11 @@ .flex.column { flex-direction: column; } + +/* ================= COLORS ================= */ +.color { + color: var(--color); +} +.opacity { + opacity: var(--opacity); +} diff --git a/assets/css/src/home.css b/assets/css/src/home.css new file mode 100644 index 0000000..cfb02a4 --- /dev/null +++ b/assets/css/src/home.css @@ -0,0 +1,3 @@ +main#home .toggle-btns { + margin-top: calc(var(--unit--vertical) * 6); +} diff --git a/assets/css/src/html.css b/assets/css/src/html.css index 5f46e5d..7332e02 100644 --- a/assets/css/src/html.css +++ b/assets/css/src/html.css @@ -26,6 +26,10 @@ html { scroll-behavior: smooth; } +main { + margin-top: calc(6 * var(--unit--vertical)); +} + /* Works on Firefox */ * { diff --git a/assets/css/src/tabs.css b/assets/css/src/tabs.css index 9f1292c..4b83435 100644 --- a/assets/css/src/tabs.css +++ b/assets/css/src/tabs.css @@ -1,3 +1,6 @@ +.toggle-btns { + position: sticky; +} button.toggle.open { font-weight: bold; } @@ -22,6 +25,9 @@ button.toggle.right.open::before { content: "-"; } -.content { - margin-top: calc(var(--unit--vertical) * 2); +.active-tab { + margin-top: calc(var(--unit--vertical) * 0.5); + overflow: auto; + max-height: calc(100vh - 7.5 * var(--unit--vertical)); + margin-bottom: calc(2 * var(--unit--vertical)); } diff --git a/assets/css/src/texts.css b/assets/css/src/texts.css index f471329..17247fb 100644 --- a/assets/css/src/texts.css +++ b/assets/css/src/texts.css @@ -12,11 +12,16 @@ font-family: "Switzer-Variable", sans-serif; } -h1 { +#logo * { font-size: 25vw; line-height: 4rem; transform: translate(-2px, -13px); - font-weight: 550; + font-weight: var(--font-weight-extra-bold); +} + +h3 { + font-size: var(--font-size-l); + font-weight: var(--font-weight-bold); } p, @@ -27,6 +32,18 @@ button, font-size: var(--font-size-m); line-height: calc(var(--unit--vertical)); } + +.fs-xl { + font-size: var(--font-size-xl); +} + +.title-center { + font-size: var(--font-size-m); + font-weight: var(--font-weight-light); + text-align: center; + width: 100%; +} + p, li, button, @@ -34,6 +51,20 @@ button, font-weight: var(--font-weight-light); } +.fw-bold { + font-weight: var(--font-weight-bold); +} + +.fw-extra-bold { + font-weight: var(--font-weight-extra-bold); +} + +.f-inherit { + font-size: inherit; + line-height: inherit; + font-weight: inherit; +} + .ta-center { text-align: center; } diff --git a/assets/css/src/variables.css b/assets/css/src/variables.css index 39e3dbd..b8d2192 100644 --- a/assets/css/src/variables.css +++ b/assets/css/src/variables.css @@ -7,9 +7,14 @@ --color-secondary--x-light: rgb(119, 177, 157, 0.15); --unit--horizontal: 5vw; - --unit--vertical: 1.3rem; + --unit--vertical: 1.7rem; + --font-size-s: 0.8rem; --font-size-m: 1.2rem; + --font-size-l: 1.5rem; + --font-size-xl: 3.7rem; --font-weight-light: 200; + --font-weight-bold: 400; + --font-weight-extra-bold: 550; } diff --git a/assets/css/style.css b/assets/css/style.css index e3d8ed7..90046f8 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -5,4 +5,6 @@ @import url("src/texts.css"); @import url("src/header.css"); @import url("src/tabs.css"); +@import url("src/home.css"); +@import url("src/articles.css"); @import url("src/footer.css"); diff --git a/assets/js/script.js b/assets/js/script.js index 5059283..61d6095 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -1,13 +1,21 @@ const remFactor = 16; const verticalUnit = 1.3 * remFactor; -function openTab(data, tab) { - data.activeTab === tab ? (data.activeTab = "") : (data.activeTab = tab); +function toggleTab(data, tab) { + if (data.activeTab === tab) { + scrollToElem("body"); + setTimeout(() => { + data.activeTab = ""; + }, 200); + } else { + data.activeTab = tab; + scrollToElem(".active-tab"); + } } function scrollToElem(selector) { setTimeout(() => { - const yOffset = -9 * verticalUnit; + const yOffset = -7 * verticalUnit; const elem = document.querySelector(selector); const top = elem.getBoundingClientRect().top; window.scrollTo({ diff --git a/content/articles/1_1988/year.txt b/content/articles/1_1988/year.txt deleted file mode 100644 index 26e94c6..0000000 --- a/content/articles/1_1988/year.txt +++ /dev/null @@ -1,5 +0,0 @@ -Title: 1988 - ----- - -Uuid: QSTPXlaDnnN5uITb \ No newline at end of file diff --git a/content/articles/articles.txt b/content/articles/articles.txt deleted file mode 100644 index c9bea6b..0000000 --- a/content/articles/articles.txt +++ /dev/null @@ -1,9 +0,0 @@ -Title: Articles - ----- - -Categories: objet, texte, image, film, scène - ----- - -Uuid: IBp23Db7518Sg0V1 \ No newline at end of file diff --git a/content/error/error.txt b/content/error/error.txt deleted file mode 100644 index 13afef0..0000000 --- a/content/error/error.txt +++ /dev/null @@ -1,5 +0,0 @@ -Title: Error - ----- - -Uuid: atOcJYYJAw8Buk3z \ No newline at end of file diff --git a/content/home/home.txt b/content/home/home.txt deleted file mode 100644 index a06f769..0000000 --- a/content/home/home.txt +++ /dev/null @@ -1,5 +0,0 @@ -Title: Home - ----- - -Uuid: Ie9MrbnsQDy1oSUB \ No newline at end of file diff --git a/content/site.txt b/content/site.txt deleted file mode 100644 index c7740f5..0000000 --- a/content/site.txt +++ /dev/null @@ -1,9 +0,0 @@ -Title: actuel / inactuel - ----- - -Edito:

Leo tortor nunc placerat adipiscing diam elementum facilisis nunc elit eget nisl suspendisse accumsan tincidunt nisi urna sit leo arcu suspendisse eu congue eget id.

Et sollicitudin massa sem commodo elementum phasellus arcu diam purus tempus ex mi condimentum interdum maecenas scelerisque sed elit sem eget elit vel et a.

Ac rutrum elementum purus cursus quisque aliquam scelerisque scelerisque metus eu bibendum et euismod ac quisque aliquam tortor amet sollicitudin sit lorem portaest adipiscing sollicitudin.

Commodo morbi magna bibendum ut sem arcu ipsum maecenas vivamus quis tempus lacus urna quis morbi enim tincidunt nisi placerat quisque euismod eget tristique nunc.

Molestie cursus ex tempus varius gravida phasellus placerat quam varius maecenas nisl nunc facilisis nunc condimentum et mi purus interdum orci quis sollicitudin enim dolor.

- ----- - -Categories: texte, scène, image, film, objet \ No newline at end of file diff --git a/site/blueprints/pages/article.yml b/site/blueprints/pages/article.yml deleted file mode 100644 index fdf4ecd..0000000 --- a/site/blueprints/pages/article.yml +++ /dev/null @@ -1,36 +0,0 @@ -title: Article -image: - back: black - -tabs: - contentTab: - label: Contenu - sections: - bodySection: - label: Corps - type: fields - fields: - body: - label: Corps - type: textarea - metaTab: - label: Métadonnées - sections: - metadata: - type: fields - fields: - published: - label: Date de publication - type: date - default: today - width: 1/3 - category: - label: Catégorie - type: select - options: query - query: site.categories.split - width: 1/3 - author: - label: Auteur - type: users - width: 1/3 diff --git a/site/blueprints/pages/articles.yml b/site/blueprints/pages/articles.yml index 9bd5358..992ea86 100644 --- a/site/blueprints/pages/articles.yml +++ b/site/blueprints/pages/articles.yml @@ -11,3 +11,4 @@ columns: label: Années type: pages template: year + sortBy: title desc diff --git a/site/blueprints/pages/blocks.yml b/site/blueprints/pages/blocks.yml new file mode 100644 index 0000000..0d66478 --- /dev/null +++ b/site/blueprints/pages/blocks.yml @@ -0,0 +1,17 @@ +title: Blocs +image: + back: black +icon: bars + +tabs: + contentTab: + label: Contenu + sections: + bodySection: + label: Corps + type: fields + fields: + body: + label: Corps + type: layout + metaTab: tabs/meta diff --git a/site/blueprints/pages/linear.yml b/site/blueprints/pages/linear.yml new file mode 100644 index 0000000..35b15b7 --- /dev/null +++ b/site/blueprints/pages/linear.yml @@ -0,0 +1,20 @@ +title: Linéaire +image: + back: black +icon: bars +create: + fields: + - category + +tabs: + contentTab: + label: Contenu + sections: + bodySection: + label: Corps + type: fields + fields: + body: + label: Corps + type: writer + metaTab: tabs/meta diff --git a/site/blueprints/pages/year.yml b/site/blueprints/pages/year.yml index 04de684..d484825 100644 --- a/site/blueprints/pages/year.yml +++ b/site/blueprints/pages/year.yml @@ -8,8 +8,10 @@ columns: sections: articles: type: pages - template: article + templates: + - linear + - blocks - width: 2/3 fields: edito: - type: textarea + type: writer diff --git a/site/blueprints/site.yml b/site/blueprints/site.yml index a4eb933..b2860f3 100644 --- a/site/blueprints/site.yml +++ b/site/blueprints/site.yml @@ -3,15 +3,7 @@ title: Site tabs: contentTab: label: Contenu - columns: - - width: 1/3 - sections: - informativePages: - label: Pages d'informations - type: pages - template: static - - width: 2/3 - fields: - edito: - label: Éditorial - type: writer + fields: + edito: + label: Éditorial + type: writer diff --git a/site/blueprints/tabs/meta.yml b/site/blueprints/tabs/meta.yml new file mode 100644 index 0000000..1cf3c4d --- /dev/null +++ b/site/blueprints/tabs/meta.yml @@ -0,0 +1,20 @@ +label: Métadonnées +sections: + metadata: + type: fields + fields: + published: + label: Date de publication + type: date + default: today + width: 1/3 + category: + label: Catégorie + type: select + options: query + query: site.categories.split + width: 1/3 + author: + label: Auteur + type: users + width: 1/3 diff --git a/site/blueprints/users/admin.yml b/site/blueprints/users/admin.yml index 25ed8d7..c72820a 100644 --- a/site/blueprints/users/admin.yml +++ b/site/blueprints/users/admin.yml @@ -1,4 +1,4 @@ -title: Adminitrateur +title: Adminitrateurs description: Un administrateur a tous les droits. image: icon: star-filled diff --git a/site/blueprints/users/author.yml b/site/blueprints/users/author.yml new file mode 100644 index 0000000..b1a581a --- /dev/null +++ b/site/blueprints/users/author.yml @@ -0,0 +1,30 @@ +title: Auteurs +description: Un auteur a tous les droits. +image: + icon: pen + +permissions: + access: + *: false + files: + *: false + languages: + *: false + pages: + *: false + site: + *: false + user: + *: false + users: + *: false + +columns: + - width: 1/2 + fields: + link: + label: Lien + - width: 1/2 + fields: + presentation: + type: writer diff --git a/site/collections/articles.php b/site/collections/articles.php deleted file mode 100644 index 058250f..0000000 --- a/site/collections/articles.php +++ /dev/null @@ -1,5 +0,0 @@ -index(); -}; \ No newline at end of file diff --git a/site/collections/years.php b/site/collections/years.php new file mode 100644 index 0000000..323c68c --- /dev/null +++ b/site/collections/years.php @@ -0,0 +1,5 @@ +find('articles')->children(); +}; \ No newline at end of file diff --git a/site/config/config.php b/site/config/config.php index a9fa6c9..98d300e 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -12,7 +12,7 @@ return [ } ], 'articles' => [ - 'icon' => 'folder', + 'icon' => 'pen', 'label' => 'Articles', 'link' => 'pages/articles', 'current' => function ($current) { @@ -21,6 +21,25 @@ return [ } ], '-', + 'infos' => [ + 'icon' => 'question', + 'label' => 'À propos', + 'link' => 'pages/a-propos', + 'current' => function ($current) { + $path = Kirby::instance()->request()->path()->toString(); + return Str::contains($path, 'pages/a-propos'); + } + ], + 'newsletter' => [ + 'icon' => 'email', + 'label' => 'Lettre', + 'link' => 'pages/lettre', + 'current' => function ($current) { + $path = Kirby::instance()->request()->path()->toString(); + return Str::contains($path, 'pages/lettre'); + } + ], + '-', 'users', 'system' ] diff --git a/site/plugins/panel-text-comments/.editorconfig b/site/plugins/panel-text-comments/.editorconfig new file mode 100644 index 0000000..3b762c9 --- /dev/null +++ b/site/plugins/panel-text-comments/.editorconfig @@ -0,0 +1,20 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.php] +indent_size = 4 + +[*.md,*.txt] +trim_trailing_whitespace = false +insert_final_newline = false + +[composer.json] +indent_size = 4 diff --git a/site/plugins/panel-text-comments/.gitattributes b/site/plugins/panel-text-comments/.gitattributes new file mode 100644 index 0000000..033ba13 --- /dev/null +++ b/site/plugins/panel-text-comments/.gitattributes @@ -0,0 +1,11 @@ +# Note: You need to uncomment the lines you want to use; the other lines can be deleted + +# Git +# .gitattributes export-ignore +# .gitignore export-ignore + +# Tests +# /.coveralls.yml export-ignore +# /.travis.yml export-ignore +# /phpunit.xml.dist export-ignore +# /tests/ export-ignore diff --git a/site/plugins/panel-text-comments/.gitignore b/site/plugins/panel-text-comments/.gitignore new file mode 100644 index 0000000..4d81cf5 --- /dev/null +++ b/site/plugins/panel-text-comments/.gitignore @@ -0,0 +1,14 @@ +# OS files +.DS_Store + +# npm modules +/node_modules + +# Parcel cache folder +.cache + +# Composer files +/vendor + +# kirbyup temp development entry +/index.dev.mjs diff --git a/site/plugins/panel-text-comments/LICENSE.md b/site/plugins/panel-text-comments/LICENSE.md new file mode 100755 index 0000000..8e663d7 --- /dev/null +++ b/site/plugins/panel-text-comments/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. diff --git a/site/plugins/panel-text-comments/README.md b/site/plugins/panel-text-comments/README.md new file mode 100755 index 0000000..ad2b202 --- /dev/null +++ b/site/plugins/panel-text-comments/README.md @@ -0,0 +1,117 @@ +# Kirby Pluginkit: Example plugin for Kirby + +> Variant "Panel plugin setup" + +This is a boilerplate for a Kirby Panel plugin that can be installed via all three [supported installation methods](https://getkirby.com/docs/guide/plugins/plugin-setup-basic#the-three-plugin-installation-methods). + +You can find a list of Pluginkit variants on the [`master` branch](https://github.com/getkirby/pluginkit/tree/master). + +**** + +## How to use the Pluginkit + +1. Fork this repository +2. Change the plugin name and description in the `composer.json` +3. Change the plugin name in the `index.php` and `src/index.js` +4. Change the license if you don't want to publish under MIT +5. Add your plugin code to the `index.php` and `src/index.js` +6. Update this `README` with instructions for your plugin + +### Install the development and build setup + +We use [kirbyup](https://github.com/johannschopplich/kirbyup) for the development and build setup. + +You can start developing directly. kirbyup will be fetched remotely with your first `npm run` command, which may take a short amount of time. + +### Development + +You can start the dev process with: + +```bash +npm run dev +``` + +This will automatically update the `index.js` and `index.css` of your plugin as soon as you make changes. +Reload the Panel to see your code changes reflected. + +With kirbyup 2.0.0+ and Kirby 3.7.4+ you can alternatively use hot module reloading (HMR): + +```bash +npm run serve +``` + +This will start a development server that updates the page as soon as you make changes. Some updates are instant, like CSS or Vue template changes, others require a reload of the page, which happens automatically. + +> [!NOTE] +> The live reload functionality requires top level await, [which is only supported in modern browsers](https://caniuse.com/mdn-javascript_operators_await_top_level). If you're developing in older browsers, use `npm run dev` and reload the page manually to see changes. + +### Production + +As soon as you are happy with your plugin, you should build the final version with: + +```bash +npm run build +``` + +This will automatically create a minified and optimized version of your `index.js` and `index.css` +which you can ship with your plugin. + +We have a tutorial on how to build your own plugin based on the Pluginkit [in the Kirby documentation](https://getkirby.com/docs/guide/plugins/plugin-setup-basic). + +### Build reproducibility + +While kirbyup will stay backwards compatible, exact build reproducibility may be of importance to you. If so, we recommend to target a specific package version, rather than using npx: + +```json +{ + "scripts": { + "dev": "kirbyup src/index.js --watch", + "build": "kirbyup src/index.js" + }, + "devDependencies": { + "kirbyup": "^3.1.0" + } +} +``` + +What follows is an example README for your plugin. + +**** + +## Installation + +### Download + +Download and copy this repository to `/site/plugins/{{ plugin-name }}`. + +### Git submodule + +```bash +git submodule add https://github.com/{{ your-name }}/{{ plugin-name }}.git site/plugins/{{ plugin-name }} +``` + +### Composer + +```bash +composer require {{ your-name }}/{{ plugin-name }} +``` + +## Setup + +*Additional instructions on how to configure the plugin (e.g. blueprint setup, config options, etc.)* + +## Options + +*Document the options and APIs that this plugin offers* + +## Development + +*Add instructions on how to help working on the plugin (e.g. npm setup, Composer dev dependencies, etc.)* + +## License + +MIT + +## Credits + +- [Your Name](https://github.com/ghost) diff --git a/site/plugins/panel-text-comments/SECURITY.md b/site/plugins/panel-text-comments/SECURITY.md new file mode 100644 index 0000000..3726336 --- /dev/null +++ b/site/plugins/panel-text-comments/SECURITY.md @@ -0,0 +1,18 @@ +# Security Policy + +## Supported Versions + +*Use this section to tell people about which versions of your project are currently being supported with security updates.* + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +*Use this section to tell people how to report a vulnerability.* + +*Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc.* diff --git a/site/plugins/panel-text-comments/composer.json b/site/plugins/panel-text-comments/composer.json new file mode 100755 index 0000000..fa07b14 --- /dev/null +++ b/site/plugins/panel-text-comments/composer.json @@ -0,0 +1,21 @@ +{ + "name": "getkirby/pluginkit", + "description": "Kirby Example Plugin", + "license": "MIT", + "type": "kirby-plugin", + "version": "1.0.0", + "authors": [ + { + "name": "Your Name", + "email": "you@example.com" + } + ], + "require": { + "getkirby/composer-installer": "^1.1" + }, + "config": { + "allow-plugins": { + "getkirby/composer-installer": true + } + } +} diff --git a/site/plugins/panel-text-comments/composer.lock b/site/plugins/panel-text-comments/composer.lock new file mode 100644 index 0000000..a5ae0fa --- /dev/null +++ b/site/plugins/panel-text-comments/composer.lock @@ -0,0 +1,66 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "37a8e61308b9b6f49cb9835f477f0c64", + "packages": [ + { + "name": "getkirby/composer-installer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/getkirby/composer-installer.git", + "reference": "c98ece30bfba45be7ce457e1102d1b169d922f3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getkirby/composer-installer/zipball/c98ece30bfba45be7ce457e1102d1b169d922f3d", + "reference": "c98ece30bfba45be7ce457e1102d1b169d922f3d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0" + }, + "require-dev": { + "composer/composer": "^1.8 || ^2.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Kirby\\ComposerInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "Kirby\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Kirby's custom Composer installer for the Kirby CMS and for Kirby plugins", + "homepage": "https://getkirby.com", + "support": { + "issues": "https://github.com/getkirby/composer-installer/issues", + "source": "https://github.com/getkirby/composer-installer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://getkirby.com/buy", + "type": "custom" + } + ], + "time": "2020-12-28T12:54:39+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/site/plugins/panel-text-comments/index.css b/site/plugins/panel-text-comments/index.css new file mode 100644 index 0000000..d9c4995 --- /dev/null +++ b/site/plugins/panel-text-comments/index.css @@ -0,0 +1,2 @@ + +/** Put your CSS here **/ diff --git a/site/plugins/panel-text-comments/index.js b/site/plugins/panel-text-comments/index.js new file mode 100644 index 0000000..3306d17 --- /dev/null +++ b/site/plugins/panel-text-comments/index.js @@ -0,0 +1,15 @@ +(function () { + "use strict"; + window.panel.plugin("adrienpayet/panel-text-comments", { + textareaButtons: { + highlight: { + label: "Highlight", + icon: "wand", + click: function () { + this.command("toggle", "", ""); + }, + shortcut: "m", + }, + }, + }); +})(); diff --git a/site/plugins/panel-text-comments/index.php b/site/plugins/panel-text-comments/index.php new file mode 100755 index 0000000..3c928b9 --- /dev/null +++ b/site/plugins/panel-text-comments/index.php @@ -0,0 +1,3 @@ +", ""); + }, + shortcut: "m", + }, + }, +}); diff --git a/site/snippets/footer.php b/site/snippets/footer.php index 72eeda2..975d7ed 100644 --- a/site/snippets/footer.php +++ b/site/snippets/footer.php @@ -1,10 +1,4 @@ -