{"id":15621962,"url":"https://github.com/fredericrous/cahuette","last_synced_at":"2025-08-28T02:42:18.403Z","repository":{"id":5097202,"uuid":"6260209","full_name":"fredericrous/Cahuette","owner":"fredericrous","description":"js gallery component + quick cms to manage it","archived":false,"fork":false,"pushed_at":"2013-03-26T15:08:06.000Z","size":67152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T03:29:19.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"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/fredericrous.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}},"created_at":"2012-10-17T11:30:25.000Z","updated_at":"2014-04-21T22:44:45.000Z","dependencies_parsed_at":"2022-08-28T10:51:42.248Z","dependency_job_id":null,"html_url":"https://github.com/fredericrous/Cahuette","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fredericrous/Cahuette","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredericrous%2FCahuette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredericrous%2FCahuette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredericrous%2FCahuette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredericrous%2FCahuette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fredericrous","download_url":"https://codeload.github.com/fredericrous/Cahuette/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredericrous%2FCahuette/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272424259,"owners_count":24932893,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-03T09:52:24.157Z","updated_at":"2025-08-28T02:42:18.383Z","avatar_url":"https://github.com/fredericrous.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cahuette #\n\nCahuette is a html5 javascript gallery component for websites and webapp.\n\n## Overview ##\n\nCahuette is:\n - Responsive : It has a \"smartphone view\": try to resize the page or just display it from a smartphone.\n - Adaptive : the gallery's height adapt to large screens (on normal view)\n - Manageable : Cahuette comes with a php API. It allows you to add/delete multiple images and add/delete sections from your navigator. You can also do it manually by editing a simple file. Cahuette doesn't use any database.\n - Configurable : The API is optional, the adaptive height can be disabled, the responsive behavior too, ... take a closer look at the documentation below\n - Lightweight : doesn't require any external library\n\nBy its design the gallery's images can't be saved with right click. Images are proportionally resized to fit in the gallery. (canvas)\n\nCahuette has been tested on Firefox, Chrome, Safari and Internet Explorer\n\nSummary:\n- installation\n- usage\n- how to contribute\n- license\n\n## Installation ##\n\n### Gallery ###\n\nThe gallery component work as a stand alone. It's full javascript.\nThe component requires the files : js/gallery.min.js, css/gallery.landscape.css, css/gallery.landscape.css, storage/gallery.json\n\nYour html must contain the links to the files Cahuette depends on.\n\nPut between your head tags the style files:\n\n```html\n\u003clink href=\"css/gallery.landscape.css\" rel=\"stylesheet\" type=\"text/css\" /\u003e\n\u003clink href=\"css/gallery.portrait.css\" rel=\"stylesheet\" type=\"text/css\" media=\"only screen and (max-width:480px)\" /\u003e\n```\n\nPut after the body tag:\n```html\n\u003cdiv id=\"gallery\"\u003e\u003c/div\u003e\u003c!-- Menu is of course optional but recommended --\u003e\n\u003cdiv id=\"menu\"\u003e\u003c/div\u003e \u003c!-- Menu is of course optional but recommended. it allows user to switch between sections --\u003e\n```\n\nPut after the end of body tag:\n```html\n\u003cscript src=\"js/gallery.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  //gallery component\n  gallery();\n\u003c/script\u003e\n```\nTo change the properties of the gallery, pass a javascript object to the function 'gallery(..);' with some of the following options:\n```javascript\ngallery({\n\tadmin: true, //enable the admin interface\n\tfullscreen: true, //tap on an image to display it fullscreen\n\tdrag: true, //allow user to scroll the gallery by dragging the images\n\tresponsive: true, //activate smartphone view (portrait)\n\tremember_scroll_position: true, //reset the scroll position after page reload or switch of section \n\tmin_height: 540, //minimum height of the gallery container\n\tmax_height: 0, //if defined, set a maximum resizement height for gallery container. (auto_fit must be enabled)\n\tauto_fit: true, //autofit option is enabled max_height = window.innerHeight\n\turi_api: 'api/' //default url of the api is 'api/'\n uri_storage: 'storage/gallery.json'//default url to get the images datas is 'storage/gallery.json'\n});\n```\nThe values on this example are the default ones.\n\nNote: To integrate the gallery to a local webapp (phonegap!?), you must keep the storage/gallery.json client-side. Otherwise \n\n### API ###\n\nA working installation of PHP is needed.\n\nMake sure \"storage/gallery.json\" is writable (chmod 666). Make sure the \"gallery\" folder is writable (chmod 777).\nEdit $def_login and $def_password in api/user/login.php\n\n```php\n$def_login = 'login';\n$def_password = 'password';\n```\n\nCahuete API has been tested on php 5.4.4\n\nNote: The API is written for a casual usage, not for heavy use. It doesn't require any database. It may present security issues.\nThis API is mostly a way to show an implementation client side of the management control.\n\n## USAGE ##\n\nWhen you land on the main page, the menu is generated and the images of the first category load.\nOnly few images are displayed, the rest continues to load. Every time you scroll the gallery, the next image is added to the display list.\n\nTo administrate the admin/management section, go to: http://your_website/?login\n \n- add section: fill the input \"new category\" and add images to this category (see section below).\nNote: if no image is added, the section will not be saved\n\n- add image(s): You can drag n drop your images from your computer to the gallery. If you prefer a more conventional way, choose the button upload at the bottom of the gallery. (On chrome it's called \"Choose files...\", on firefox \"Browse...\").\nNote: The images will be uploaded to the section you are viewing\n\n- remove image(s): select (with left click) one or more images. Click on the remove button\n\n- move image: select just one image, click on the button up or down to move it\n\n- remove section: Just click on the cross near the section name in the menu. Validate with ok when you are asked.\n\n## How to contribute ##\n\nI use the command 'make' to generate the gallery.min.js from gallery.js with 'uglifyjs'.\nFor any push request, please make the less change possible on the code syntax (I mean changing tabs, adding new lines), it makes the commit's relevant changes hard to find.\n\n## License ##\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredericrous%2Fcahuette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffredericrous%2Fcahuette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredericrous%2Fcahuette/lists"}