Change PCS template icons

pull/1/head
yflory 7 years ago
parent 33fb48d59a
commit a65e083fca

@ -0,0 +1,12 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="cptools" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="template" horiz-adv-x="876" d="M804.244 960h-732.699c-39.513 0-71.545-32.032-71.545-71.545v0-880.909c0-39.513 32.032-71.545 71.545-71.545v0h732.699c39.513 0 71.545 32.032 71.545 71.545v0 880.909c0 39.513-32.032 71.545-71.545 71.545v0zM808.421 7.545c0-2.307-1.87-4.177-4.177-4.177v0h-732.699c-2.307 0-4.177 1.87-4.177 4.177v0 880.909c0 2.307 1.87 4.177 4.177 4.177v0h732.699c2.307 0 4.177-1.87 4.177-4.177v0zM107.789 852.211h660.211v-256h-660.211v256zM107.789 555.789h269.474v-256h-269.474v256zM417.684 70.737h350.316v-26.947h-350.316v26.947zM417.684 133.659h350.316v-26.947h-350.316v26.947zM417.684 196.446h350.316v-26.947h-350.316v26.947zM417.684 259.368h350.316v-26.947h-350.316v26.947zM417.684 555.789h350.316v-26.947h-350.316v26.947zM417.684 498.526h350.316v-26.947h-350.316v26.947zM417.684 441.263h350.316v-26.947h-350.316v26.947zM417.684 384h350.316v-26.947h-350.316v26.947zM417.684 326.737h350.316v-26.947h-350.316v26.947zM107.789 259.368h269.474v-215.579h-269.474v215.579z" />
<glyph unicode="&#xe901;" glyph-name="new-template" horiz-adv-x="920" d="M103.696 856.304h635.139v-246.278h-635.139v246.278zM103.696 571.139h259.241v-246.278h-259.241v246.278zM401.823 165.039h337.013v-25.924h-337.013v25.924zM401.823 225.442h337.013v-25.924h-337.013v25.924zM401.823 285.975h337.013v-25.924h-337.013v25.924zM401.823 571.139h337.013v-25.924h-337.013v25.924zM401.823 516.051h337.013v-25.924h-337.013v25.924zM401.823 460.962h337.013v-25.924h-337.013v25.924zM401.823 405.873h337.013v-25.924h-337.013v25.924zM401.823 350.785h337.013v-25.924h-337.013v25.924zM103.696 285.975h259.241v-207.392h-259.241v207.392zM842.532 140.152v751.020c0 38.013-30.816 68.828-68.828 68.828v0h-704.875c-38.013 0-68.828-30.816-68.828-68.828v0-847.457c0-38.013 30.816-68.828 68.828-68.828v0h666.896c19.163-23.765 48.277-38.841 80.912-38.841 57.27 0 103.696 46.426 103.696 103.696 0 48.068-32.706 88.497-77.078 100.248l-0.724 0.163zM68.828 39.696c-2.219 0-4.018 1.799-4.018 4.018v0 847.457c0 2.219 1.799 4.018 4.018 4.018v0h704.875c2.219 0 4.018-1.799 4.018-4.018v0-755.297c-16.886-6.977-31.013-17.69-41.84-31.166l-0.157-0.202h-333.902v-25.924h318.607c-4.743-11.511-7.504-24.874-7.518-38.881v-0.006zM816.608-51.038c-50.111 0-90.734 40.623-90.734 90.734v0c0 0.068 0 0.148 0 0.228 0 14.058 3.253 27.357 9.047 39.184l-0.233-0.526c1.324 3.018 2.711 5.571 4.28 7.995l-0.132-0.218c9.3 15.303 22.547 27.384 38.344 35.021l0.542 0.236c11.301 5.562 24.6 8.814 38.658 8.814 0.080 0 0.16 0 0.241 0h-0.012c50.111 0 90.734-40.623 90.734-90.734s-40.623-90.734-90.734-90.734v0zM861.975 52.658h-32.405v32.405c0 3.579-2.902 6.481-6.481 6.481v0h-12.962c-3.579 0-6.481-2.902-6.481-6.481v0-32.405h-32.405c-3.579 0-6.481-2.902-6.481-6.481v0-12.962c0-3.579 2.902-6.481 6.481-6.481v0h32.405v-32.405c0-3.579 2.902-6.481 6.481-6.481v0h12.962c3.579 0 6.481 2.902 6.481 6.481v0 32.405h32.405c3.579 0 6.481 2.902 6.481 6.481v0 12.962c0 3.579-2.902 6.481-6.481 6.481v0z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -0,0 +1,31 @@
@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');
font-weight: normal;
font-style: normal;
}
.cptools {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'cptools' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.cptools-template:before {
content: "\e900";
}
.cptools-new-template:before {
content: "\e901";
}

@ -279,12 +279,12 @@
color: black; color: black;
border: 1px solid transparent; border: 1px solid transparent;
&.cp-creation-template-selected { &.cp-creation-template-selected, &:hover {
color: @creation-color !important; color: @creation-color !important;
color: var(--creation-color) !important; color: var(--creation-color) !important;
background-color: @creation-bg-color !important; background-color: @creation-bg-color !important;
background-color: var(--creation-bg-color) !important; background-color: var(--creation-bg-color) !important;
.fa { .fa, .cptools {
color: @creation-color; color: @creation-color;
color: var(--creation-color); color: var(--creation-color);
} }
@ -292,12 +292,6 @@
transition: all 0.1s; transition: all 0.1s;
&:hover {
//color: @colortheme_modal-fg;
background-color: @colortheme_form-border;
box-shadow: none;
}
align-items: center; align-items: center;
img { img {
@ -317,7 +311,7 @@
margin-top: 5px; margin-top: 5px;
max-width: 100%; max-width: 100%;
} }
.fa { .fa, .cptools {
color: @creation-bg-color; color: @creation-bg-color;
color: var(--creation-bg-color); color: var(--creation-bg-color);
cursor: pointer; cursor: pointer;

@ -8,5 +8,11 @@
src: url("/customize/fonts/neuropolitical.ttf"); src: url("/customize/fonts/neuropolitical.ttf");
} }
// Fonts need to go on the global scope
@font-tools {
font-family: CryptPadTools;
src: url("/customize/fonts/cryptpadtools.ttf");
}
@import (once) '/customize/fonts/open-sans.less'; @import (once) '/customize/fonts/open-sans.less';

@ -13,6 +13,7 @@ define([
'/customize/messages.js', '/customize/messages.js',
'/customize/application_config.js', '/customize/application_config.js',
'/bower_components/nthen/index.js', '/bower_components/nthen/index.js',
'css!/customize/fonts/cptools/style.css'
], function ($, Config, Util, Hash, Language, UI, Constants, Feedback, h, MediaTag, Clipboard, ], function ($, Config, Util, Hash, Language, UI, Constants, Feedback, h, MediaTag, Clipboard,
Messages, AppConfig, NThen) { Messages, AppConfig, NThen) {
var UIElements = {}; var UIElements = {};
@ -2045,12 +2046,14 @@ define([
allData.unshift({ allData.unshift({
name: Messages.creation_newTemplate, name: Messages.creation_newTemplate,
id: -1, id: -1,
icon: h('span.fa.fa-bookmark') //icon: h('span.fa.fa-bookmark')
icon: h('span.cptools.cptools-new-template')
}); });
allData.unshift({ allData.unshift({
name: Messages.creation_noTemplate, name: Messages.creation_noTemplate,
id: 0, id: 0,
icon: h('span.fa.fa-file') //icon: h('span.fa.fa-file')
icon: UI.getFileIcon({type: type})
}); });
var redraw = function (index) { var redraw = function (index) {
if (index < 0) { i = 0; } if (index < 0) { i = 0; }
@ -2066,7 +2069,7 @@ define([
}).appendTo($container); }).appendTo($container);
$span.data('id', obj.id); $span.data('id', obj.id);
if (idx === selected) { $span.addClass('cp-creation-template-selected'); } if (idx === selected) { $span.addClass('cp-creation-template-selected'); }
$span.append(obj.icon || UI.getFileIcon({type: type})); $span.append(obj.icon || h('span.cptools.cptools-template'));
$('<span>', {'class': 'cp-creation-template-element-name'}).text(name) $('<span>', {'class': 'cp-creation-template-element-name'}).text(name)
.appendTo($span); .appendTo($span);
$span.click(function () { $span.click(function () {

Loading…
Cancel
Save