diff --git a/customize.dist/fonts/cptools/fonts/cptools.svg b/customize.dist/fonts/cptools/fonts/cptools.svg index 2ea458f12..bfa30f3ad 100644 --- a/customize.dist/fonts/cptools/fonts/cptools.svg +++ b/customize.dist/fonts/cptools/fonts/cptools.svg @@ -7,6 +7,20 @@ - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/customize.dist/fonts/cptools/fonts/cptools.ttf b/customize.dist/fonts/cptools/fonts/cptools.ttf index 179ba4d98..a4483404e 100644 Binary files a/customize.dist/fonts/cptools/fonts/cptools.ttf and b/customize.dist/fonts/cptools/fonts/cptools.ttf differ diff --git a/customize.dist/fonts/cptools/fonts/cptools.woff b/customize.dist/fonts/cptools/fonts/cptools.woff index 04cd47172..c020177a7 100644 Binary files a/customize.dist/fonts/cptools/fonts/cptools.woff and b/customize.dist/fonts/cptools/fonts/cptools.woff differ diff --git a/customize.dist/fonts/cptools/style.css b/customize.dist/fonts/cptools/style.css index 83c233e62..9a99fd5b6 100644 --- a/customize.dist/fonts/cptools/style.css +++ b/customize.dist/fonts/cptools/style.css @@ -1,9 +1,9 @@ @font-face { font-family: 'cptools'; src: - url('fonts/cptools.ttf?dysqmo') format('truetype'), - url('fonts/cptools.woff?dysqmo') format('woff'), - url('fonts/cptools.svg?dysqmo#cptools') format('svg'); + url('fonts/cptools.ttf?qzfl7l') format('truetype'), + url('fonts/cptools.woff?qzfl7l') format('woff'), + url('fonts/cptools.svg?qzfl7l#cptools') format('svg'); font-weight: normal; font-style: normal; } @@ -11,6 +11,7 @@ .cptools { /* use !important to prevent issues with browser extensions that change fonts */ font-family: 'cptools' !important; + display: inline-block; speak: none; font-style: normal; font-weight: normal; @@ -23,6 +24,48 @@ -moz-osx-font-smoothing: grayscale; } +.cptools-slide:before { + content: "\e902"; +} +.cptools-shared-folder:before { + content: "\e903"; +} +.cptools-poll:before { + content: "\e904"; +} +.cptools-file-upload:before { + content: "\e905"; +} +.cptools-whiteboard:before { + content: "\e906"; +} +.cptools-todo:before { + content: "\e907"; +} +.cptools-pad:before { + content: "\e908"; +} +.cptools-folder-open:before { + content: "\e909"; +} +.cptools-kanban:before { + content: "\e90a"; +} +.cptools-folder:before { + content: "\e90b"; +} +.cptools-shared-folder-open:before { + content: "\e90c"; +} +.cptools-file:before { + content: "\e90d"; +} +.cptools-contacts:before { + content: "\e90e"; +} +.cptools-code:before { + content: "\e90f"; +} .cptools-template:before { content: "\e900"; } diff --git a/customize.dist/pages/index.js b/customize.dist/pages/index.js index 6c574a9dd..f1fdfb108 100644 --- a/customize.dist/pages/index.js +++ b/customize.dist/pages/index.js @@ -4,8 +4,9 @@ define([ '/common/hyperscript.js', '/customize/messages.js', '/customize/application_config.js', + '/common/outer/local-store.js', '/customize/pages.js' -], function ($, Config, h, Msg, AppConfig, Pages) { +], function ($, Config, h, Msg, AppConfig, LocalStore, Pages) { var urlArgs = Config.requireConf.urlArgs; var isAvailableType = function (x) { @@ -25,17 +26,19 @@ define([ [ 'poll', '/poll/', Msg.main_pollPad, 'poll' ], [ 'kanban', '/kanban/', Msg.main_kanbanPad, 'kanban' ], [ 'whiteboard', '/whiteboard/', Msg.main_whiteboardPad, 'whiteboard' ], - [ 'recent', '/drive/', Msg.main_localPads, 'drive' ] + [ 'recent', '/drive/', LocalStore.isLoggedIn() ? Msg.main_yourCryptDrive : Msg.main_localPads, 'drive' ] ].filter(function (x) { return isAvailableType(x[1]); }) .map(function (x, i) { var s = 'div.bs-callout.cp-callout-' + x[0]; if (i > 2) { s += '.cp-more.cp-hidden'; } + var icon = AppConfig.applicationsIcon[x[3]]; + var font = icon.indexOf('cptools') === 0 ? 'cptools' : 'fa'; return h('a', [ { href: x[1] }, h(s, [ - h('i.fa.' + AppConfig.applicationsIcon[x[3]]), + h('i.' + font + '.' + icon), h('div.pad-button-text', [ h('h4', x[2]) ]) ]) ]); diff --git a/customize.dist/src/less2/include/dropdown.less b/customize.dist/src/less2/include/dropdown.less index ac393fe3a..e937142e3 100644 --- a/customize.dist/src/less2/include/dropdown.less +++ b/customize.dist/src/less2/include/dropdown.less @@ -64,7 +64,7 @@ &:not(.fa) { font: @dropdown_font; } - &.fa { + &.fa, &.cptools { font-size: 18px; &::before { width: 40px; @@ -76,7 +76,7 @@ } } - .fa { + .fa, .cptools { width: 20px; text-align: center; margin-right: 5px !important; diff --git a/customize.dist/src/less2/include/icons.less b/customize.dist/src/less2/include/icons.less index c2ddfef32..ebadf5185 100644 --- a/customize.dist/src/less2/include/icons.less +++ b/customize.dist/src/less2/include/icons.less @@ -28,7 +28,7 @@ background-color: rgba(0,0,0,0.2); color: #666; } - .fa { + .fa, .cptools { display: block; font-size: 64px; margin: 18px 0; diff --git a/customize.dist/src/less2/include/leftside-menu.less b/customize.dist/src/less2/include/leftside-menu.less index baca3ac4d..1c0b828dd 100644 --- a/customize.dist/src/less2/include/leftside-menu.less +++ b/customize.dist/src/less2/include/leftside-menu.less @@ -11,7 +11,7 @@ cursor: pointer; height: @variables_bar-height; line-height: @variables_bar-height - 10px; - .fa { + .fa, .cptools { width: 25px; } &:hover { diff --git a/customize.dist/src/less2/pages/page-index.less b/customize.dist/src/less2/pages/page-index.less index 9c900bcef..ad92531c0 100644 --- a/customize.dist/src/less2/pages/page-index.less +++ b/customize.dist/src/less2/pages/page-index.less @@ -149,21 +149,23 @@ .bs-callout:hover.cp-callout-more { transform: none !important; } - .bs-callout .fa { - display: flex; - align-items: center; - font-size: 2em; - padding-left: 0.57em; - width: 2em; - transition: width 0.1s; - color: #fff; + .bs-callout { + .fa, .cptools { + display: flex; + align-items: center; + font-size: 2.5em; + justify-content: center; + width: 1.3em; + transition: width 0.1s; + color: #fff; + } } - .cp-callout-pad .fa { background-color: @colortheme_pad-bg; } - .cp-callout-code .fa { background-color: @colortheme_code-bg; } - .cp-callout-slide .fa { background-color: @colortheme_slide-bg; } - .cp-callout-poll .fa { background-color: @colortheme_poll-bg; } - .cp-callout-kanban .fa { background-color: @colortheme_kanban-bg; } - .cp-callout-whiteboard .fa { background-color: @colortheme_whiteboard-bg; } + .cp-callout-pad .cptools { background-color: @colortheme_pad-bg; } + .cp-callout-code .cptools { background-color: @colortheme_code-bg; } + .cp-callout-slide .cptools { background-color: @colortheme_slide-bg; } + .cp-callout-poll .cptools { background-color: @colortheme_poll-bg; } + .cp-callout-kanban .cptools { background-color: @colortheme_kanban-bg; } + .cp-callout-whiteboard .cptools { background-color: @colortheme_whiteboard-bg; } .cp-callout-recent .fa { background-color: @colortheme_drive-bg; } .cp-hidden { display: none !important; } .cp-callout-more { @@ -179,7 +181,7 @@ div { .infopages_link(); color: #fff; - .fa { + .fa, .cptools { font-size: inherit; padding: 0; width: 1em; diff --git a/customize.dist/template.js b/customize.dist/template.js index b7bb57513..e53772041 100644 --- a/customize.dist/template.js +++ b/customize.dist/template.js @@ -38,7 +38,8 @@ $(function () { }).nThen(function () { require([ 'less!/customize/src/less2/pages/page-' + pageName + '.less', - 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css' + 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', + 'css!/customize/fonts/cptools/style.css' ], function () { var $main = $(infoPage()); diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index afd4fc540..f9d73debc 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -73,15 +73,16 @@ define(function() { // Customize the icon used for each application. // You can update the colors by making a copy of /customize.dist/src/less2/include/colortheme.less config.applicationsIcon = { - file: 'fa-file-text-o', - pad: 'fa-file-word-o', - code: 'fa-file-code-o', - slide: 'fa-file-powerpoint-o', - poll: 'fa-calendar', - whiteboard: 'fa-paint-brush', - todo: 'fa-tasks', - contacts: 'fa-users', - kanban: 'fa-columns', + file: 'cptools-file', + fileupload: 'cptools-file-upload', + pad: 'cptools-pad', + code: 'cptools-code', + slide: 'cptools-slide', + poll: 'cptools-poll', + whiteboard: 'cptools-whiteboard', + todo: 'cptools-todo', + contacts: 'cptools-contacts', + kanban: 'cptools-kanban', drive: 'fa-hdd-o', }; diff --git a/www/common/common-interface.js b/www/common/common-interface.js index acee76dac..56e2d8d3a 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -765,8 +765,11 @@ define([ var $icon = $defaultIcon.clone(); if (AppConfig.applicationsIcon && AppConfig.applicationsIcon[type]) { + var icon = AppConfig.applicationsIcon[type]; + var font = icon.indexOf('cptools') === 0 ? 'cptools' : 'fa'; + if (type === 'fileupload') { type = 'file'; } var appClass = ' cp-icon cp-icon-color-'+type; - $icon = $('', {'class': 'fa ' + AppConfig.applicationsIcon[type] + appClass}); + $icon = $('', {'class': font + ' ' + icon + appClass}); } return $icon; diff --git a/www/drive/app-drive.less b/www/drive/app-drive.less index a2841adfa..d67c7d171 100644 --- a/www/drive/app-drive.less +++ b/www/drive/app-drive.less @@ -83,7 +83,7 @@ max-width: none; margin: 8px 0; } - .fa { + .fa, .cptools { display: block; margin: auto; font-size: 64px; @@ -134,6 +134,9 @@ .fa { font-family: FontAwesome; } + .cptools { + font-family: cptools; + } ul { list-style: none; @@ -172,13 +175,6 @@ } } - span { - &.fa-folder, &.fa-folder-open { - //color: #FEDE8B; - //text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; - } - } - /* TREE */ @@ -247,7 +243,7 @@ margin: 0; margin-top: 15px; .cp-app-drive-tree-root { - &> .fa { + .fa, .cptools { min-width: 30px; cursor: pointer; } @@ -259,9 +255,6 @@ padding-left: 20px; .leftside-menu-category_main(); margin: 0; - .fa { - width: 25px; - } } } } @@ -523,7 +516,7 @@ position: absolute; top: 3px; right: 3px; - .fa { + .fa, .cptools { margin:0; font-size: 18px; } @@ -531,7 +524,7 @@ .cp-app-drive-element-thumbnail { max-width: 100px; max-height: 100px; - & ~ .fa { + & ~ .fa, & ~ .cptools { display: inline; font-size: 17px; position: absolute; @@ -555,7 +548,7 @@ &:hover { opacity: 0.7; } - .fa { + .fa, .cptools { cursor: pointer; font-size: 90px; margin-top: 5px; @@ -594,7 +587,7 @@ cursor: default; color: @drive_table-header-fg; span { - &:not(.fa) { + &:not(.fa):not(.cptools) { text-align: left; } &.sortasc, &.sortdesc { @@ -621,8 +614,10 @@ white-space: nowrap; box-sizing: border-box; &.cp-app-drive-element-state { - .fa:not(:last-child) { - margin-right: 5px; + .fa, .cptools { + &:not(:last-child) { + margin-right: 5px; + } } } &.cp-app-drive-content-icon, &.cp-app-drive-element-state, &.cp-icon { @@ -661,7 +656,7 @@ .cp-modal { display: flex; flex-flow: column; - li, li .fa { + li, li .fa, li .cptools { cursor: pointer; } &> p { @@ -699,7 +694,7 @@ display: flex; align-items: center; align-content: unset; - .fa { + .fa, .cptools { font-size: 32px; min-width: 50px; } @@ -748,7 +743,7 @@ display: inline-block; margin: 0; padding: 0; - .fa { + .fa, .cptools { margin: 0; } button { @@ -764,7 +759,7 @@ .drawer { display: none; } - .fa, span { + .fa, .cptools, span { font-size: @colortheme_app-font-size; } &:hover { @@ -794,14 +789,14 @@ } button { padding: 0 10px; - .fa { + .fa, .cptools { margin-right: 5px; } .cp-dropdown-button-title { display: inline-flex; height: @variables_bar-height; align-items: center; - span:not(.fa) { + span:not(.fa):not(.cptools) { line-height: 23px; } } @@ -816,6 +811,9 @@ .fa, &.fa { font-family: FontAwesome; } + .cptools, &.cptools { + font-family: cptools; + } } /* The container
- needed to position the dropdown content */ .cp-dropdown-container { diff --git a/www/drive/inner.js b/www/drive/inner.js index 71bd21d2f..9fe6a15a1 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -71,9 +71,10 @@ define([ var SHARED_FOLDER_NAME = Messages.fm_sharedFolderName; // Icons - var faFolder = 'fa-folder'; - var faFolderOpen = 'fa-folder-open'; - var faSharedFolder = 'fa-folder-o'; + var faFolder = 'cptools-folder'; + var faFolderOpen = 'cptools-folder-open'; + var faSharedFolder = 'cptools-shared-folder'; + var faSharedFolderOpen = 'cptools-shared-folder-open'; var faShared = 'fa-shhare-alt'; var faReadOnly = 'fa-eye'; var faRename = 'fa-pencil'; @@ -85,15 +86,15 @@ define([ var faRestore = 'fa-repeat'; var faShowParent = 'fa-location-arrow'; var $folderIcon = $('', { - "class": faFolder + " fa cp-app-drive-icon-folder cp-app-drive-content-icon" + "class": faFolder + " cptools cp-app-drive-icon-folder cp-app-drive-content-icon" }); //var $folderIcon = $('', {src: "/customize/images/icons/folder.svg", "class": "folder icon"}); var $folderEmptyIcon = $folderIcon.clone(); - var $folderOpenedIcon = $('', {"class": faFolderOpen + " fa cp-app-drive-icon-folder"}); + var $folderOpenedIcon = $('', {"class": faFolderOpen + " cptools cp-app-drive-icon-folder"}); //var $folderOpenedIcon = $('', {src: "/customize/images/icons/folderOpen.svg", "class": "folder icon"}); var $folderOpenedEmptyIcon = $folderOpenedIcon.clone(); - var $sharedFolderIcon = $('', {"class": faSharedFolder + " fa cp-app-drive-icon-folder"}); - //var $sharedFolderOpenedIcon = $sharedFolderIcon.clone(); + var $sharedFolderIcon = $('', {"class": faSharedFolder + " cptools cp-app-drive-icon-folder"}); + var $sharedFolderOpenedIcon = $('', {"class": faSharedFolderOpen + " cptools cp-app-drive-icon-folder"}); //var $upIcon = $('', {"class": "fa fa-arrow-circle-up"}); var $unsortedIcon = $('', {"class": "fa fa-files-o"}); var $templateIcon = $('', {"class": "fa fa-cubes"}); @@ -1889,7 +1890,7 @@ define([ options.push({ tag: 'a', attributes: {'class': 'cp-app-drive-new-upload'}, - content: $('
').append(getIcon('file')).html() + Messages.uploadButton + content: $('
').append(getIcon('fileupload')).html() + Messages.uploadButton }); options.push({tag: 'hr'}); } @@ -2169,7 +2170,7 @@ define([ var $element2 = $('
  • ', { 'class': 'cp-app-drive-new-upload cp-app-drive-element-row ' + 'cp-app-drive-element-grid' - }).prepend(getIcon('file')).appendTo($container); + }).prepend(getIcon('fileupload')).appendTo($container); $element2.append($('', {'class': 'cp-app-drive-new-name'}) .text(Messages.uploadButton)); } @@ -2868,7 +2869,7 @@ define([ // Fix name key = manager.getSharedFolderData(fId).title; // Fix icon - $icon = $sharedFolderIcon; + $icon = isCurrentFolder ? $sharedFolderOpenedIcon : $sharedFolderIcon; } else { var isEmpty = manager.isFolderEmpty(root[key]); subfolder = manager.hasSubfolder(root[key]); diff --git a/www/filepicker/app-filepicker.less b/www/filepicker/app-filepicker.less index 03780c796..d31b4ddb1 100644 --- a/www/filepicker/app-filepicker.less +++ b/www/filepicker/app-filepicker.less @@ -71,7 +71,7 @@ margin-top: 5px; max-width: 100%; } - .fa { + .fa, .cptools { cursor: pointer; width: 100px; height: 100px; @@ -82,4 +82,4 @@ } } } -} \ No newline at end of file +}