├── LICENSE ├── letsee ├── letsee.css └── letsee.js └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Ilya Skriblovsky 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 | -------------------------------------------------------------------------------- /letsee/letsee.css: -------------------------------------------------------------------------------- 1 | body.letsee-active { 2 | margin-top: 40px; 3 | } 4 | 5 | #letsee-panel { 6 | position: fixed; 7 | display: none; 8 | top: 0; 9 | width: 100%; 10 | 11 | margin: 0; 12 | 13 | background: #e0e0e0; 14 | border-bottom: 1px solid #808080; 15 | 16 | font-size: 18px; 17 | line-height: 1.6; 18 | text-align: center; 19 | text-shadow: 0 1px 1px #fff; 20 | } 21 | body.letsee-active #letsee-panel { 22 | display: block; 23 | } 24 | 25 | #letsee-panel * { 26 | user-select: none; 27 | -webkit-user-select: none; 28 | -moz-user-select: none; 29 | 30 | vertical-align: middle; 31 | } 32 | 33 | #letsee-panel dl, #letsee-panel dt, #letsee-panel dd { 34 | display: inline-block; 35 | } 36 | 37 | #letsee-panel dl { 38 | margin: 0; 39 | } 40 | #letsee-panel dt { 41 | margin: 0 0px 0 25px; 42 | color: #444; 43 | } 44 | #letsee-panel dd { 45 | margin: 0 5px; 46 | } 47 | 48 | #letsee-panel input[type="checkbox"] { 49 | width: 18px; 50 | height: 18px; 51 | } 52 | 53 | .letsee-change-fontsize { 54 | padding: 0 0.25em; 55 | margin: 0 2px; 56 | border: 1px solid transparent; 57 | text-decoration: none !important; 58 | } 59 | .letsee-fontsize-small { font-size: 14px !important; } 60 | .letsee-fontsize-medium { font-size: 18px !important; } 61 | .letsee-fontsize-large { font-size: 24px !important; } 62 | .letsee-fontsize-active { 63 | border: 1px solid #777; 64 | border-radius: 4px; 65 | background: #ccc; 66 | box-shadow: 0 1px 2px rgba(0,0,0,0.2) inset 67 | } 68 | 69 | .letsee-colors span { 70 | padding: 0 5px; 71 | margin: 0 2px; 72 | font-size: 120%; 73 | border-radius: 4px; 74 | } 75 | .letsee-colors-bonw span { color: #000 !important; background: #fff; } 76 | .letsee-colors-wonb span { color: #fff !important; background: #000; } 77 | .letsee-colors { 78 | border: 1px solid transparent; 79 | padding: 5px 0; 80 | text-decoration: none !important; 81 | } 82 | .letsee-colors-active { 83 | border: 1px solid #777; 84 | border-radius: 4px; 85 | box-shadow: 0 1px 2px rgba(0,0,0,0.2) inset 86 | } 87 | 88 | 89 | .letsee-turn-off { 90 | margin-left: 60px; 91 | } 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `ПРОЕКТ УСТАРЕЛ И БОЛЬШЕ НЕ ПОДДЕРЖИВАЕТСЯ` 2 | 3 | Если вы ищете как добавить на ваш сайт режим для слабовидящих, рассмотрите эти альтернативы: 4 | 5 | * https://slabovid.ru/info/access/ 6 | * https://lidrekon.ru/slep/ 7 | * https://wp-lessons.com/comfortable-reading-premium 8 | 9 | --- 10 | 11 | # letsee — Режим для слабовидящих для любого сайта 12 | 13 | Letsee adapts any website for visually impaired people 14 | 15 | [English version is below](#install) 16 | 17 | ## Установка 18 | 19 | Разместите папку `letsee` там, где хранятся статические файлы (*.js, *.css) на вашем сайте. В шаблоне всех страниц сайта в блоке `
` разместите код подключения скрипта: 20 | ```html 21 | 22 | 23 | ``` 24 | Измените пути к css- и js-файлам, если необходимо. 25 | 26 | В нужном месте шаблона разместите ссылку «Режим для слабовидящих»: 27 | ```html 28 | Версия для слабовидящих 29 | ``` 30 | 31 | Всё готово! 32 | 33 | ## Настройка 34 | 35 | При необходимости можно задать собственные CSS-правила для разных режимов, которые пользователь может включить с помощью `letsee`. Для этого нужно разместить такой код *перед* тэгом ` 47 | ``` 48 | 49 | Например, такой код спрячет ссылку на режим для слабовидящих когда этот режим уже включен, а также спрячет блок слайдшоу если пользователь отключил картинки: 50 | ```html 51 | 57 | Версия для слабовидящих 58 | ``` 59 | 60 | 61 | ## Install 62 | 63 | Upload `letsee` folder to your website, preferrably into where other *.js and *.css files are stored. Put this code into toplevel site template inside `` block: 64 | ```html 65 | 66 | 67 | ``` 68 | Change paths to css- and js-file if needed. 69 | 70 | Use this code where you want to place a link on the mode for visually impaired people: 71 | ```html 72 | Accessibility mode 73 | ``` 74 | 75 | That's all! 76 | 77 | ## Configuration 78 | 79 | You may set additional CSS rules for different modes that user may select using `letsee` panel. Put this code *before* ` 91 | ``` 92 | 93 | For example, this code will hide accessibility mode link if the mode is enabeld and also will hide a slideshow if user choosed to disable images: 94 | ```html 95 | 101 | Accessibility mode 102 | ``` 103 | -------------------------------------------------------------------------------- /letsee/letsee.js: -------------------------------------------------------------------------------- 1 | ;(function ($) { 2 | 3 | var style_tag = $('