diff --git a/assets/css/src/grid.css b/assets/css/src/grid.css index 511370c..28594cf 100644 --- a/assets/css/src/grid.css +++ b/assets/css/src/grid.css @@ -25,7 +25,7 @@ body.full-width #main-content { margin-left: inherit; } -@media (max-width: 640px) { +@media screen and (max-width: 640px) { .grid .column:not(:last-child) { margin-bottom: calc(2 * var(--unit--vertical)); } @@ -35,11 +35,7 @@ body.full-width #main-content { [data-template="grid"] main #main-content { margin-left: calc(0px - calc(4 * var(--unit--horizontal))); } - [data-template="grid"] .grid { - column-gap: var(--unit--horizontal); - } -} -@media (min-width: 640px) { + [data-template="grid"] .grid { display: grid; grid-template-columns: repeat(39, 1fr); @@ -47,17 +43,3 @@ body.full-width #main-content { margin-bottom: calc(var(--unit--vertical) * 2); } } - -@media print{ - .grid .column { - grid-column: span 1; - } - [data-template="grid"] .grid { - column-gap: 20px; - grid-template-columns: repeat(2, 1fr); - } - - .blocks, .column { - page-break-inside: auto; /* autoriser la coupe si nécessaire */ - } -} \ No newline at end of file diff --git a/assets/css/src/print.css b/assets/css/src/print.css index 82f0271..c608b47 100644 --- a/assets/css/src/print.css +++ b/assets/css/src/print.css @@ -123,7 +123,6 @@ } main { padding-left: 0; - padding-right: 0; } /* .url{ position: absolute; diff --git a/assets/css/src/texts.css b/assets/css/src/texts.css index b86f747..6bdb636 100644 --- a/assets/css/src/texts.css +++ b/assets/css/src/texts.css @@ -64,7 +64,6 @@ article h2 { box-sizing: border-box; font-weight: var(--font-weight-light); margin-bottom: var(--unit--vertical); - font-size: var(--font-size-xl); } .text__title { diff --git a/assets/css/src/toggle-light-mode.css b/assets/css/src/toggle-light-mode.css index 0bcb7e3..d8d44ce 100644 --- a/assets/css/src/toggle-light-mode.css +++ b/assets/css/src/toggle-light-mode.css @@ -18,16 +18,10 @@ mask: var(--icon-theme-toggler) no-repeat center; -webkit-mask: var(--icon-theme-toggler) no-repeat center; } - -@media screen and (min-width: 641px) { - .theme-toggler-icon { - padding-bottom: calc(var(--unit--vertical) - (var(--unit--vertical) / 4)); - } +@media screen and (max-width: 640px) { +.theme-toggler-icon { + width: 1.1rem; + height: 1.1rem; } -@media screen and (max-width: 640px) { - .theme-toggler-icon { - width: 1.1rem; - height: 1.1rem; - } } \ No newline at end of file diff --git a/site/plugins/your-plugin/.editorconfig b/site/plugins/your-plugin/.editorconfig new file mode 100644 index 0000000..3b762c9 --- /dev/null +++ b/site/plugins/your-plugin/.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/your-plugin/.gitattributes b/site/plugins/your-plugin/.gitattributes new file mode 100644 index 0000000..033ba13 --- /dev/null +++ b/site/plugins/your-plugin/.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/your-plugin/.gitignore b/site/plugins/your-plugin/.gitignore new file mode 100644 index 0000000..4d81cf5 --- /dev/null +++ b/site/plugins/your-plugin/.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/your-plugin/LICENSE.md b/site/plugins/your-plugin/LICENSE.md new file mode 100644 index 0000000..8e663d7 --- /dev/null +++ b/site/plugins/your-plugin/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/your-plugin/README.md b/site/plugins/your-plugin/README.md new file mode 100644 index 0000000..ad2b202 --- /dev/null +++ b/site/plugins/your-plugin/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/your-plugin/SECURITY.md b/site/plugins/your-plugin/SECURITY.md new file mode 100644 index 0000000..3726336 --- /dev/null +++ b/site/plugins/your-plugin/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/your-plugin/composer.json b/site/plugins/your-plugin/composer.json new file mode 100644 index 0000000..fa07b14 --- /dev/null +++ b/site/plugins/your-plugin/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/your-plugin/composer.lock b/site/plugins/your-plugin/composer.lock new file mode 100644 index 0000000..a5ae0fa --- /dev/null +++ b/site/plugins/your-plugin/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/your-plugin/index.css b/site/plugins/your-plugin/index.css new file mode 100644 index 0000000..e69de29 diff --git a/site/plugins/your-plugin/index.js b/site/plugins/your-plugin/index.js new file mode 100644 index 0000000..a149249 --- /dev/null +++ b/site/plugins/your-plugin/index.js @@ -0,0 +1 @@ +(function(){"use strict";function d(n,t,o,c,s,r,i,a){var e=typeof n=="function"?n.options:n;return t&&(e.render=t,e.staticRenderFns=o,e._compiled=!0),{exports:n,options:e}}const l={__name:"Web2PrintBtn",props:{htmlPageString:String},setup(n){const{htmlPageString:t}=n;async function o(){const r=await fetch("https://web2print.studio-variable.com",{method:"POST","Content-Type":"application/pdf","X-API-Key":"25377ab6e2153b159d1d5fa22501228810b6aec9d63346bd0614045dc167061c",body:{html:t}});if(r.ok){const i=await r.blob(),a=window.URL.createObjectURL(i),e=document.createElement("a");e.href=a,e.download="document.pdf",e.click()}else{const i=await r.json();console.error("Erreur:",i)}}return{__sfc:!0,getPdf:o}}};var u=function(){var t=this,o=t._self._c,c=t._self._setupProxy;return o("k-button",{attrs:{variant:"filled"},on:{click:function(s){return c.getPdf()}}},[t._v("Button")])},f=[],_=d(l,u,f);const p=_.exports;window.panel.plugin("studio-variable/web2print",{fields:{web2print:p}})})(); diff --git a/site/plugins/your-plugin/index.php b/site/plugins/your-plugin/index.php new file mode 100644 index 0000000..2b8a31b --- /dev/null +++ b/site/plugins/your-plugin/index.php @@ -0,0 +1,16 @@ + [ + 'web2print' => [ + 'props' => [ + 'options' => function ($options = []) { + return $options; + }, + 'value' => function ($value = []) { + return $value; + } + ], + ], + ], +]); diff --git a/site/plugins/your-plugin/package.json b/site/plugins/your-plugin/package.json new file mode 100644 index 0000000..1913c34 --- /dev/null +++ b/site/plugins/your-plugin/package.json @@ -0,0 +1,12 @@ +{ + "name": "getkirby/pluginkit", + "description": "Kirby Example Plugin", + "license": "MIT", + "type": "kirby-plugin", + "version": "1.0.0", + "scripts": { + "dev": "npx -y kirbyup src/index.js --watch", + "serve": "npx -y kirbyup serve src/index.js", + "build": "npx -y kirbyup src/index.js" + } +} diff --git a/site/plugins/your-plugin/src/components/Web2printField.vue b/site/plugins/your-plugin/src/components/Web2printField.vue new file mode 100644 index 0000000..3d0d1af --- /dev/null +++ b/site/plugins/your-plugin/src/components/Web2printField.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/site/plugins/your-plugin/src/index.js b/site/plugins/your-plugin/src/index.js new file mode 100644 index 0000000..288e91c --- /dev/null +++ b/site/plugins/your-plugin/src/index.js @@ -0,0 +1,7 @@ +import ToggleGroup from "./components/Web2printField.vue"; + +window.panel.plugin("studio-variable/web2print", { + fields: { + web2print: ToggleGroup + } +}); diff --git a/site/snippets/footer.php b/site/snippets/footer.php index 129fcfd..87457ce 100644 --- a/site/snippets/footer.php +++ b/site/snippets/footer.php @@ -1,26 +1,24 @@ -
- +
+ \ No newline at end of file diff --git a/site/templates/author.php b/site/templates/author.php index 201c31b..d002cf9 100644 --- a/site/templates/author.php +++ b/site/templates/author.php @@ -4,7 +4,7 @@
-

title() ?>

+

title() ?>

presentation() ?> @@ -32,6 +32,4 @@
- - - \ No newline at end of file + \ No newline at end of file diff --git a/site/templates/error.php b/site/templates/error.php index 780ff03..b930d26 100644 --- a/site/templates/error.php +++ b/site/templates/error.php @@ -3,7 +3,9 @@
true], slots: true) ?> -

title() ?>

+

+ title() ?>

diff --git a/site/templates/grid.php b/site/templates/grid.php index efd8f5e..2f0a22a 100644 --- a/site/templates/grid.php +++ b/site/templates/grid.php @@ -3,7 +3,9 @@
true], slots: true) ?> -

title() ?>

+

+ title() ?>

par category() ?>

-

- imprimé le format('d/m/Y'); ?>
- url() ?> -

diff --git a/site/templates/home.php b/site/templates/home.php index fc9dcaf..8b0d181 100644 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -9,12 +9,8 @@ class="no-underline home-baseline" title="lire l'éditorial" > -

subtitle()->inline() ?>

+

subtitle()->inline() ?>

-

- imprimé le format('d/m/Y'); ?>
- url() ?> -

true], slots: true) ?> -

title() ?>

+

+ title() ?>

body() ?>
diff --git a/site/templates/newsletter.php b/site/templates/newsletter.php index bafb26e..7e1e5b8 100644 --- a/site/templates/newsletter.php +++ b/site/templates/newsletter.php @@ -1,10 +1,9 @@ -
true), slots: true) ?> -

title() ?>

+

title() ?>

body() ?>
-
\ No newline at end of file + + + \ No newline at end of file