{"id":20547580,"url":"https://github.com/kunstmaan/kunstmaancookiebundle","last_synced_at":"2025-04-14T10:34:07.782Z","repository":{"id":46183564,"uuid":"134373317","full_name":"Kunstmaan/KunstmaanCookieBundle","owner":"Kunstmaan","description":"[READ-ONLY] Subtree split of the Kunstmaan CookieBundle -- master at Kunstmaan/KunstmaanBundlesCMS","archived":false,"fork":false,"pushed_at":"2024-04-13T14:41:01.000Z","size":789,"stargazers_count":0,"open_issues_count":0,"forks_count":11,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-04-14T04:39:43.123Z","etag":null,"topics":["cms","cookie","gdpr","kunstmaan"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kunstmaan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-05-22T06:54:27.000Z","updated_at":"2024-04-20T20:26:36.570Z","dependencies_parsed_at":"2023-12-21T01:01:27.711Z","dependency_job_id":"ba447b58-a1f1-4739-bd20-9462b7642b66","html_url":"https://github.com/Kunstmaan/KunstmaanCookieBundle","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunstmaan%2FKunstmaanCookieBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunstmaan%2FKunstmaanCookieBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunstmaan%2FKunstmaanCookieBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunstmaan%2FKunstmaanCookieBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kunstmaan","download_url":"https://codeload.github.com/Kunstmaan/KunstmaanCookieBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248863114,"owners_count":21173937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms","cookie","gdpr","kunstmaan"],"created_at":"2024-11-16T02:09:04.672Z","updated_at":"2025-04-14T10:34:07.746Z","avatar_url":"https://github.com/Kunstmaan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"KunstmaanCookieBundle\n=====================\n\nThe Kunstmaan Cookie Bundle provides a cookie bar; \ndetailed pop-up window and a similar page \nexplaining each type of cookie used on the website.\n\nAll provide the ability to accept or decline certain cookies.\n\n# Original Contributors\n\n| Username        | Avatar\n| :--------------:|:-----:\n| [@sandergo90](https://github.com/sandergo90) | ![sandergo90](https://github.com/sandergo90.png?size=100)\n| [@diskwriter](https://github.com/diskwriter) | ![diskwriter](https://github.com/diskwriter.png?size=100)\n| [@indrikenens](https://github.com/indrikenens) | ![indrikenens](https://github.com/indrikenens.png?size=100)\n| [@FVKVN](https://github.com/FVKVN) | ![FVKVN](https://github.com/FVKVN.png?size=100)\n| [@dbeerten](https://github.com/dbeerten) | ![dbeerten](https://github.com/dbeerten.png?size=100)\n| [@treeleaf](https://github.com/treeleaf) | ![treeleaf](https://github.com/treeleaf.png?size=100)\n| [@KMBenjaminSchodts](https://github.com/KMBenjaminSchodts) | ![KMBenjaminSchodts](https://github.com/KMBenjaminSchodts.png?size=100)\n| [@sector32](https://github.com/sector32) | ![treeleaf](https://github.com/sector32.png?size=100)\n\n# Enabling the bundle\n\n## Add to Appkernel.php\n## Add to routing.yml\n\n```\nKunstmaanCookieBundle:\n    resource: \"@KunstmaanCookieBundle/Resources/config/routing.yml\"\n    prefix:   /{_locale}/\n    requirements:\n      _locale: \"%requiredlocales%\"\n```\n\n## Two ways to view the cookie implementation\n\n1: Login into the CMS\n\n2: enable the cookie bundle under Settings -\u003e Cookie configuration \n\n# Importing the cookie bundle\n\n## Show cookie on page\nAdd following block to the main layout of your website\n\n```\n{# Kuma Cookie Bar #}\n{% block kumacookiebar %}\n    \u003ckuma-cookie-bar\u003e\u003c/kuma-cookie-bar\u003e\n{% endblock %}\n```\n\n## CSS: First Method\nApply all CSS by importing the legal.scss file \ninto the vendors file of your project\n\n```\n@import \"vendor/kunstmaan/cookie-bundle/src/Resources/ui/scss/legal\";\n``` \n\n## CSS: Second method\nImport the Kunstmaan Cookie Bundle variables and imports to be overridden. \nCopy the files at the following path to your project folder.\n\nvendor/kunstmaan/cookie-bundle/Resources/ui/scss/config/_variables.scss\nvender/kunstmaan/cookie-bundle/Resources/ui/scss/config/_legal-imports.scss\n\nAlter variables and comment imports to fit the project's styling.\n\n## Javascript\n### Via ES Module pattern\n```\nimport '../../../../../../vendor/kunstmaan/cookie-bundle/bin/';\n```\n### Via buildtool\nYou can include the compiled version in your buildtool - or directly in a template - via the following URL:\n```\nvendor/kunstmaan/cookie-bundle/src/Resources/ui/bin/index.js\n```\n\n### Global methods\nThe CookieBundle exposes some utility methods that you can include in your project.\n```\nimport {getKmccCookies} from '\u003cVENDOR_LOCATION\u003e/kunstmaan/cookie-bundle/bin/'; // Returns the settings of all the cookies.\nimport {hasAllowedDatalayers} from '\u003cVENDOR_LOCATION\u003e/kunstmaan/cookie-bundle/bin/'; // Shorthand to check if you're allowed to use dataLayers in this\n project.\nimport {asyncDomInitiator} from '\u003cVENDOR_LOCATION/kunstmaan/cookie-bundle/bin/'; // This is to initialize async inserted Cookie Bundle Components. Expects 1 param: an object like the following: {nodeTree: \u003cHTMLElement\u003e}\n``` \n\nBoth these methods are also available on the global scope for projects that do not have bundlers:\n```\nwindow.kmcc.getKmccCookies(); \nwindow.kmcc.hasAllowedDatalayers(); \nwindow.kmcc.asyncDomInitiator({\n    nodeTree: \u003cHTMLElement\u003e\n});\n```\n\n# Commands\n\n## Copy Cookiebar Resources to your project\n\nDefault command:\n```\nphp bin/console kuma:generate:legal --prefix foo_ --demosite\n``` \nor, if you have previously generated files and wish to override them:\nphp bin/console kuma:generate:legal --prefix will_ --demosite --overrideFiles\n\n\n## Migrate\n\n```\nphp bin/console doctrine:migrations:diff\nphp bin/console doctrine:migrations:migrate\n``` \n\n\n## Generate fixtures\n \n```\nphp bin/console d:f:l --fixtures src/foo/AppBundle/DataFixtures/ORM/LegalGenerator/DefaultFixtures.php --append\n``` \n\n## Add the optin pagepart to your form pages. \nWe added an extra LegalOptInPagePart that behaves like a checkbox but adds the extra of a link to the privacy policy directly.\n\nThe pagepart will be generated in your bundle and you will have to include it in your pagepart configuration yaml file.\n\n```\n    - { name: 'Opt In', class: Foo\\WebsiteBundle\\Entity\\PageParts\\LegalOptInPagePart }\n```\n\n## Easily generate links for your project that open the cookie modal:\n\nAdd by using this snippet you can easily add the necessary links to your project in custom places like a footer:\n\n```\n{% if is_granted_for_cookie_bundle(app.request) %}\n    {% set legalLinks = ['legal_privacy_policy', 'legal_cookie_preferences', 'legal_contact'] %}\n    {% for internalName in legalLinks %}\n        {% set node = nodemenu.getNodeByInternalName(internalName) %}\n        {% if (node is not null) %}\n            -\n            \u003ca data-target=\"{{ internalName }}\" data-url=\"{{ path('kunstmaancookiebundle_legal_modal', {'internal_name': internalName}) }}\"\n                class=\"sub-footer__info__link js-kmcc-extended-modal-button\"\u003e\n                {{ node.title }}\n            \u003c/a\u003e\n        {% endif %}\n    {% endfor %}\n{% endif %}\n```\n\n## Overriding translations\n\nIf you want to override the translations of the cookie bundle, you need to add the following configuration in your config.yml \nbeneath the existing kunstmaan_translator config.\n\n```\nkunstmaan_translator:\n    default_bundle: custom\n    bundles:\n      - KunstmaanCookieBundle\n      - YourOwnBundle\n```\n\n## Add visitor type to google analytics\n\nWe added the possibility to push a datalayer to google analytics with the type of visitor viewing your website. A new Config entity has been added \nwhere you can add the ip-addresses of clients or internal. Those ip's will be checked on request and a datalayer will be pushed.\n\nIf you want to use this functionality, please read the documentation for the Config Bundle to setup. When you did this, add the following snippet to your config.yml.\n\n```\nkunstmaan_config:\n    entities:\n        - Kunstmaan\\CookieBundle\\Entity\\CookieConfig\n```\n\nFollowing input field should be added to your layout.html.twig. You can add in beneath the kuma-cookie-bar element.\n\n```\n\u003cinput type=\"hidden\" value=\"{{ get_visitor_type(app.request) }}\" id=\"kmcc-visitor-type\"/\u003e\n```\n\n## Increase version number when adding cookies/types or changing stuff the requires new cookie consent.\n\nIn the cookie configuration, there is a version number available. This version number can be increased in the CMS.\n\n### Contributing\n\nWe love contributions!\nIf you're submitting a pull request, please follow the guidelines in the [Submitting pull requests](docs/pull-requests.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunstmaan%2Fkunstmaancookiebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkunstmaan%2Fkunstmaancookiebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunstmaan%2Fkunstmaancookiebundle/lists"}