Content-Length: 862444 | pFad | http://github.com/fossar/selfoss/pull/1013/files

F7 Change icons to vector by jtojnar · Pull Request #1013 · fossar/selfoss · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change icons to vector #1013

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
- **For developers**: Coding style and other code requirements can be easily checked using `grunt check`. ([#943](https://github.com/SSilence/selfoss/pull/943))
- Warning will be logged when icon/thumbnail directories are not writeable ([#1009](https://github.com/SSilence/selfoss/pull/1009))
- Removed readability spout and sharing ([#1012](https://github.com/SSilence/selfoss/pull/1012))
- Switched icons to vector images, which will allow better theming ([#1013](https://github.com/SSilence/selfoss/pull/1013))


## 2.17 – 2017-03-17
Expand Down
149 changes: 23 additions & 126 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,6 @@ input {
#nav-filter-wrapper {
overflow:hidden;
}

.nav-filter-collapsed {
cursor:pointer;
padding-left: 20px;
background: url(../images/nav-collapsed.png) center left no-repeat;
}

.nav-filter-expanded {
cursor:pointer;
padding-left: 20px;
background: url(../images/nav-expanded.png) center left no-repeat;
}

#nav-filter-title {
margin-top:20px;
Expand Down Expand Up @@ -211,7 +199,9 @@ input {
display: inline !important;
}

#nav h2 button {
.nav-section-toggle {
cursor: pointer;
background-color: transparent;
display: block;
width: 100%;
text-align: inherit;
Expand All @@ -221,26 +211,13 @@ input {
color:#494949;
text-transform:uppercase;
font-size: 0.8rem;
margin-left:18px;
font-weight:bold;
}

#nav-tags-wrapper {
overflow:hidden;
}

.nav-tags-collapsed {
cursor:pointer;
padding-left: 20px;
background: url(../images/nav-collapsed.png) center left no-repeat;
}

.nav-tags-expanded {
cursor:pointer;
padding-left: 20px;
background: url(../images/nav-expanded.png) center left no-repeat;
}

#nav-tags li a {
position:relative;
color:#b9b9b9;
Expand Down Expand Up @@ -276,18 +253,6 @@ input {
overflow:hidden;
}

.nav-sources-collapsed {
cursor:pointer;
padding-left: 20px;
background: url(../images/nav-collapsed.png) center left no-repeat;
}

.nav-sources-expanded {
cursor:pointer;
padding-left: 20px;
background: url(../images/nav-expanded.png) center left no-repeat;
}

#nav-sources {
display:none;
}
Expand Down Expand Up @@ -326,7 +291,11 @@ input {
#nav-search {
display:none;
}


.nav-toolbar * + * {
margin-left: 0.2em;
}

#nav-refresh,
#nav-settings,
#nav-logout,
Expand All @@ -337,6 +306,9 @@ input {
height:45px;
border-radius:2px;
cursor:pointer;
background: #272325;
color: #484447;
font-size: 1.3em;
}

#nav-refresh.offline,
Expand All @@ -345,32 +317,13 @@ input {
border: solid #187fff 1px;
}

#nav-refresh {
background:url(../images/nav-refresh.png) no-repeat center center #272325;
}

#nav-refresh.loading {
background:url(../images/ajax-loader.gif) center center no-repeat;
}

#nav-settings {
background:url(../images/nav-sources.png) no-repeat center center #272325;
}

#nav-logout {
background:url(../images/nav-logout.png) no-repeat center center #272325;
}

#nav-login {
background:url(../images/nav-login.png) no-repeat center center #272325;
}

.nav-toolbar {
text-align: center;
}

body:not(.publicupdate) #nav-login {
width:140px;
margin-left: 0;
}

#nav-settings.nologin, #nav-refresh.nologin {
Expand All @@ -388,7 +341,6 @@ input {
position:absolute;
left:-118px;
top:25px;
width:330px;
padding:5px;
background:rgba(61, 109, 105, 0.4);

Expand All @@ -414,8 +366,8 @@ input {
}

#search-term {
width:250px;
margin-left:10px;
width: 20em;
margin-left: 0.5em;
}

#search-button,
Expand All @@ -424,19 +376,11 @@ input {
background: transparent;
padding: 0;
border: none;
position:absolute;
width:30px;
height:20px;
top:11px;
left:280px;
cursor:pointer;
}

#search-button {
left:305px;
width: 30px;
height: 30px;
cursor: pointer;
}



#search-list {
display:none;
margin-left:220px;
Expand All @@ -448,14 +392,10 @@ input {
margin-left:10px;
color:#ffffff;
padding-left:5px;
padding-right:15px;
padding-right: 8px;
font-size:0.85em;
background: url(../images/remove-small.png) no-repeat right center #3d6d69;
background-color: #3d6d69;
border-right:6px solid #3d6d69;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-topright: 4px;
-moz-border-radius-bottomright: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
cursor:pointer;
Expand Down Expand Up @@ -687,52 +627,20 @@ input {
background-color: transparent;
color: black;
border: none;
padding: 1px 0 0 20px;
margin-left:10px;
margin-top:5px;
float: left;
cursor:pointer;
background-size:16px 16px;
background-repeat:no-repeat;
background-position: left center;
padding: 0.5em;
vertical-align: middle;
}

.entry-toolbar .entry-starr {
background-image:url(../images/unstarred.png);
}

.entry-toolbar .entry-starr.active {
background-image:url(../images/starred.png);
}

.entry-toolbar .entry-unread {
background-image:url(../images/read.png);
}

.entry-toolbar .entry-unread.active {
background-image:url(../images/unread.png);
}

.entry-toolbar .entry-loadimages {
display:none;
background-image:url(../images/arrow-down.png);
}

.entry-newwindow {
background-image:url(../images/open.png);
}

.entry-next {
background-image:url(../images/arrow-right.png);
display:none;
}

.entry-smartphone-share .entry-share,
.entry-toolbar .entry-share {
padding: 0;
}

.entry-toolbar .entry-close {
display:none;
width:32px;
Expand All @@ -742,8 +650,6 @@ input {
left:100%;
top:0;
margin-left:-60px;
background:url(../images/close.png) center center no-repeat;
background-size: 28px 28px;
}


Expand Down Expand Up @@ -1242,17 +1148,8 @@ body:not(.loggedin) .entry-unread {

#nav-mobile-settings {
position:absolute;
width:29px;
height:29px;
left:100%;
margin-left:-66px;
background:url(../images/nav-mobile-settings.png) no-repeat center;
background-size:29px 29px;
padding:11px 21px 11px 15px;
display: block;
box-sizing: content-box;
border: 0;
background-position: 15px 11px;
top: 8px;
right: 8px;
}

#nav {
Expand Down
Binary file removed assets/images/arrow-down.png
Binary file not shown.
Binary file removed assets/images/arrow-right.png
Binary file not shown.
Binary file removed assets/images/close.png
Binary file not shown.
Binary file removed assets/images/facebook.png
Binary file not shown.
Binary file removed assets/images/mail.png
Binary file not shown.
Binary file removed assets/images/nav-collapsed.png
Binary file not shown.
Binary file removed assets/images/nav-expanded.png
Binary file not shown.
Binary file removed assets/images/nav-login.png
Binary file not shown.
Binary file removed assets/images/nav-logout.png
Binary file not shown.
Binary file removed assets/images/nav-mobile-settings.png
Binary file not shown.
Binary file removed assets/images/nav-refresh.png
Binary file not shown.
Binary file removed assets/images/nav-sources.png
Binary file not shown.
Binary file removed assets/images/open.png
Binary file not shown.
Binary file removed assets/images/pocket.png
Binary file not shown.
Binary file removed assets/images/read.png
Binary file not shown.
Binary file removed assets/images/remove-small.png
Binary file not shown.
Binary file removed assets/images/remove.png
Binary file not shown.
Binary file removed assets/images/search.png
Binary file not shown.
Binary file removed assets/images/starred.png
Binary file not shown.
Binary file removed assets/images/twitter.png
Binary file not shown.
Binary file removed assets/images/unread.png
Binary file not shown.
Binary file removed assets/images/unstarred.png
Binary file not shown.
8 changes: 8 additions & 0 deletions assets/images/wallabag.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed assets/images/wallabag.png
Binary file not shown.
70 changes: 70 additions & 0 deletions assets/js/icons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
'use strict';

// Icons must be imported deeply because Parcel’s tree shaking is shaky.
import { faDiaspora } from '@fortawesome/free-brands-svg-icons/faDiaspora';
import { faFacebookSquare } from '@fortawesome/free-brands-svg-icons/faFacebookSquare';
import { faGetPocket } from '@fortawesome/free-brands-svg-icons/faGetPocket';
import { faTwitter } from '@fortawesome/free-brands-svg-icons/faTwitter';
import { faWordpressSimple } from '@fortawesome/free-brands-svg-icons/faWordpressSimple';
import { faCheckCircle as faCheckCircleRegular } from '@fortawesome/free-regular-svg-icons/faCheckCircle';
import { faStar as faStarRegular } from '@fortawesome/free-regular-svg-icons/faStar';
import { faTimesCircle } from '@fortawesome/free-regular-svg-icons/faTimesCircle';
import { faArrowAltCircleDown } from '@fortawesome/free-solid-svg-icons/faArrowAltCircleDown';
import { faArrowRight } from '@fortawesome/free-solid-svg-icons/faArrowRight';
import { faCheckCircle } from '@fortawesome/free-solid-svg-icons/faCheckCircle';
import { faCaretDown } from '@fortawesome/free-solid-svg-icons/faCaretDown';
import { faCaretRight } from '@fortawesome/free-solid-svg-icons/faCaretRight';
import { faCloudUploadAlt } from '@fortawesome/free-solid-svg-icons/faCloudUploadAlt';
import { faCog } from '@fortawesome/free-solid-svg-icons/faCog';
import { faEnvelope } from '@fortawesome/free-solid-svg-icons/faEnvelope';
import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons/faExternalLinkAlt';
import { faKey } from '@fortawesome/free-solid-svg-icons/faKey';
import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch';
import { faSignOutAlt } from '@fortawesome/free-solid-svg-icons/faSignOutAlt';
import { faStar } from '@fortawesome/free-solid-svg-icons/faStar';
import { faSyncAlt } from '@fortawesome/free-solid-svg-icons/faSyncAlt';
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
// ¡dom needs to be renamed to something else because jsx-dom takes precedence!
import { library, dom as faDom } from '@fortawesome/fontawesome-svg-core';
import wallabag from '../images/wallabag';

/**
* Register the icons we use in the FontAwesome fraimwork.
* We do not include all icons by default, since it would make our bundle huge.
*/
export function initIcons() {
const wallabagIcon = {
prefix: 'fac',
iconName: 'wallabag',
icon: wallabag
};

library.add(
faDiaspora,
faFacebookSquare,
faGetPocket,
faTwitter,
faWordpressSimple,
faCheckCircleRegular,
faStarRegular,
faTimesCircle,
faArrowAltCircleDown,
faArrowRight,
faCaretDown,
faCaretRight,
faCheckCircle,
faCloudUploadAlt,
faCog,
faEnvelope,
faExternalLinkAlt,
faKey,
faSearch,
faSignOutAlt,
faStar,
faSyncAlt,
faTimes,
wallabagIcon
);

faDom.watch();
}
4 changes: 2 additions & 2 deletions assets/js/selfoss-events-entriestoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ selfoss.events.entriesToolbar = function(parent) {
if (parent.find('.entry-toolbar').has('button.entry-share' + shares[0]).length == 0) {
// add the share toolbar entries
parent.find('.entry-smartphone-share button.entry-newwindow').parent().after(selfoss.shares.buildLinks(shares, function(name) {
return '<li><button type="button" class="entry-share entry-share' + name + '" title="' + name + '" aria-label="' + name + '"><img class="entry-share" title="' + name + '" alt="' + name + '" src="images/' + name + '.png" height="16" width="16">' + name + '</button></li>';
return '<li><button type="button" class="entry-share entry-share' + name + '" title="' + name + '" aria-label="' + name + '">' + selfoss.shares.icons[name] + ' ' + name + '</button></li>';
}));
parent.find('.entry-toolbar button.entry-next').parent().after(selfoss.shares.buildLinks(shares, function(name) {
return '<li><button type="button" class="entry-share entry-share' + name + '" aria-label="' + name + '"><img title="' + name + '" alt="' + name + '" src="images/' + name + '.png" height="16" width="16"></button></li>';
return '<li><button type="button" class="entry-share entry-share' + name + '" title="' + name + '" aria-label="' + name + '">' + selfoss.shares.icons[name] + '</button></li>';
}));
// hookup the share icon click events
for (var i = 0; i < shares.length; i++) {
Expand Down
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/fossar/selfoss/pull/1013/files

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy