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

Add FontAwesome Icons, re-order items #21

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rafihopkins
Copy link

Hey JP,
I've been manually overriding this file whenever I use QuickBar now for about a year, figured others might benefit. Let me know what you think.

  • Add FontAwesome icons for each button: Dashboard (fa-dashboard), Create Here (fa-plus), Edit Resource (fa-edit).
  • New button order: Dashboard, Create Here, Edit

New item order: Dashboard, Create Here, Edit
@jpdevries
Copy link
Owner

Hi @rafihopkins. Thanks for the PR. It looks like this assumes that font-awesome is being loaded on the front end pages of the site, which Quickbar does not assume. Therefore, for this to be merged, it would need to only output font-awesome icons in accordance with a System Setting that defaults to false.

@jpdevries
Copy link
Owner

I suppose another option could be to inline the icons (base64) rather than depend on a iconset like fontawesome. Then the icons could be included independently

@rafihopkins
Copy link
Author

What about a quickbar.chunk.tpl system setting in the quickbar namespace, part of the "theme" area, to allow users to provide their own tpl markup. This way quickbar theme developers could customize the markup in addition to the css.

@jpdevries
Copy link
Owner

@rafihopkins that's even better. that would work.

@rafihopkins
Copy link
Author

I like the idea of a chunk.tpl system setting, but in the meantime something like this achieves the desired result with just css:

/* requires FontAwesome 4.5.0, including fa-modx for dashboard */
.quickbar li a:before {
font-family: "FontAwesome";
font-size: 1.314em;
}
.quickbar li:first-of-type a:before {
content: "\f285";
}
.quickbar li:nth-of-type(2) a:before {
content: "\f067";
}
.quickbar li:nth-of-type(3) a:before {
content: "\f040";
}

@jpdevries jpdevries mentioned this pull request Jan 21, 2016
@jpdevries
Copy link
Owner

@rafihopkins I've added #23 to the roadmap I like the idea of keeping it custom because I think it is the "MODX way". I don't want to cater to heavily to one icon set or implementation than another.

I'll take a crack at #23 when I get a chance. Unless someone beats me to it of course ;)

@rafihopkins
Copy link
Author

Sounds good, @jpdevries! I started working on it but got confused when
it came to where to add the logic to look for the custom chunk.tpl (in
quickbar.class.php I'm assuming).

It would be nice if the tpl could be either a user-defined chunk from
the db or file-based/static so that it could be easily incorporated with
a theme's css file for portability's sake.

On 1/21/16 1:16 AM, JP DeVries wrote:

@rafihopkins https://github.com/rafihopkins I've added #23
#23 to the roadmap I
like the idea of keeping it custom because I think it is the "MODX
way". I don't want to cater to heavily to one icon set or
implementation than another.

I'll take a crack at #23
#23 when I get a chance.
Unless someone beats me to it of course ;)


Reply to this email directly or view it on GitHub
#21 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants