Skip to content

Commit

Permalink
Accessibility ♿
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed Jun 25, 2018
1 parent ab266a7 commit 7781779
Show file tree
Hide file tree
Showing 39 changed files with 9,798 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# ignore all apps except core ones
/apps*/*
!/apps/accessibility
!/apps/comments
!/apps/dav
!/apps/files
Expand Down
12 changes: 12 additions & 0 deletions apps/accessibility/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"env",
{
"targets": {
"browsers": ["last 2 versions", "not ie <= 11"]
}
}
]
]
}
9 changes: 9 additions & 0 deletions apps/accessibility/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
16 changes: 16 additions & 0 deletions apps/accessibility/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
env: {
browser: true,
es6: true
},
extends: 'eslint:recommended',
parserOptions: {
sourceType: 'module'
},
rules: {
indent: ['error', 'tab'],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always']
}
};
12 changes: 12 additions & 0 deletions apps/accessibility/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
node_modules/
dist/
npm-debug.log
yarn-error.log

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
3 changes: 3 additions & 0 deletions apps/accessibility/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"esversion": 6
}
26 changes: 26 additions & 0 deletions apps/accessibility/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
all: dev-setup build-js-production

dev-setup: clean clean-dev npm-init

npm-init:
npm install

npm-update:
npm update

build-js:
npm run dev

build-js-production:
npm run build

watch-js:
npm run watch

clean:
rm -f js/accessibility.js
rm -f js/accessibility.js.map

clean-dev:
rm -rf node_modules

22 changes: 22 additions & 0 deletions apps/accessibility/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Accessibility ♿

> This app provide multiple features to ease the use of nextcloud.
## Build Setup

``` bash
# install dependencies
make dev-setup

# build for development
make build-js

# build for development and watch edits
make watch-js

# build for production with minification
make build-js-production

# clean output files
make clean
```
24 changes: 24 additions & 0 deletions apps/accessibility/appinfo/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* @copyright Copyright (c) 2018 John Molakvoæ <[email protected]>
*
* @author John Molakvoæ <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

$app = new \OCA\Accessibility\AppInfo\Application();
22 changes: 22 additions & 0 deletions apps/accessibility/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>accessibility</id>
<name>Accessibility</name>
<summary>Accessibility options for nextcloud</summary>
<description><![CDATA[Provides multiple accessibilities options to ease your use of nextcloud]]></description>
<version>1.0.0</version>
<licence>agpl</licence>
<author>John Molakvoæ</author>
<namespace>Accessibility</namespace>
<category>accessibility</category>
<dependencies>
<nextcloud min-version="14" max-version="14"/>
</dependencies>
<default_enable/>
<bugs>https://github.com/nextcloud/server/issues</bugs>
<settings>
<personal>OCA\Accessibility\Settings\Personal</personal>
<personal-section>OCA\Accessibility\Settings\PersonalSection</personal-section>
</settings>
</info>
28 changes: 28 additions & 0 deletions apps/accessibility/appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @copyright Copyright (c) 2018 John Molakvoæ <[email protected]>
*
* @author John Molakvoæ <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

return [
'routes' => [
['name' => 'accessibility#getCss', 'url' => '/css/user.css', 'verb' => 'GET'],
],
];
14 changes: 14 additions & 0 deletions apps/accessibility/css/dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Revert lighten/darken
@function nc-darken($color, $value) {
@return lighten($color, $value);
}

@function nc-lighten($color, $value) {
@return darken($color, $value);
}

// SCSS variables
$color-main-text: #d8d8d8;
$color-main-background: #181818;
$color-loading-light: #777;
$color-loading-dark: #ccc;
15 changes: 15 additions & 0 deletions apps/accessibility/css/dyslexic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@font-face {
font-family: 'OpenDyslexic';
font-style: normal;
font-weight: 300;
src: url('../fonts/OpenDyslexic-Regular.woff') format('woff');
}

@font-face {
font-family: 'OpenDyslexic';
font-style: normal;
font-weight: 600;
src: url('../fonts/OpenDyslexic-Bold.woff') format('woff');
}

$font-face: OpenDyslexic, 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;
Empty file.
39 changes: 39 additions & 0 deletions apps/accessibility/css/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.preview-list {
display: flex;
}
.preview {
display: flex;
flex-direction: column;
width: 300px;
border: 1px solid var(--color-border);
padding: 10px;
border-radius: var(--border-radius);
transition: all 200ms ease-in-out;
filter: drop-shadow(0 1px 2px var(--color-box-shadow));
background-color: var(--color-main-background);
opacity: 0.9;
&:not(:last-child) {
margin-right: 20px;
}
&,
* {
cursor: pointer;
user-select: none;
}
&:hover,
&.selected {
background-color: var(--color-background-dark);
filter: drop-shadow(0 1px 4px var(--color-box-shadow));
opacity: 1;
}
.preview-image {
width: 100%;
height: 150px;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
p {
text-align: justify;
}
}
Binary file added apps/accessibility/fonts/OpenDyslexic-Bold.ttf
Binary file not shown.
Binary file added apps/accessibility/fonts/OpenDyslexic-Bold.woff
Binary file not shown.
Binary file not shown.
Binary file not shown.
76 changes: 76 additions & 0 deletions apps/accessibility/img/app-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7781779

Please sign in to comment.