Formadmin
Modern and responsive theme for Active Admin used by Formaweb.
Installation
Please make sure that you are using Active Admin:
gem 'activeadmin'
Add this gem in your Gemfile
:
gem 'formadmin'
So, bundle...
$ bundle install
Usage
All you have to do is change your assets/stylesheets/active_admin.scss
:
Remove the loading defaults...
@import 'active_admin/mixins';
@import 'active_admin/base';
Replace with Formadmin:
@import 'formadmin/formadmin';
Overriding colors
You can override the default colors (as defined in app/assets/stylesheets/formadmin/core/_settings.scss
) by setting the color variable in your assets/stylesheets/active_admin.scss
before formadmin
is loaded.
For example, to change the primary color, use:
$primary-color: #c0ffee;
@import 'formadmin/formadmin';
Video
Donating
- Bitcoin (BTC): 1QDoa2Cr8Lbt15mSDQwQc1vRxH9HHT8AC
- Ethereum (ETH): 0x9d55a96d00B70FF9c23B05D610261E61e398f5BF
- Litecoin (LTC): LVu6cTKF1VDVVFBxQPKpRUmbcshEeeWy8H
Contributing
- Fork it ( https://github.com/formaweb/formadmin/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am "Add some feature"
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Testing
All you need to do is set the local path on your project Gemfile
, like this:
gem 'formadmin', path: '/path/to/formadmin'
How to override font
Hi, I am using formadmin theme for one of my application. There no hit on how to override the default font. I am thinking of overriding the default font with a google font.
Can't adjust width of columns
I tried setting the following:
However, I still cannot remove all the space on the left column or right column.
Font-size configurable?
We found that the default of 16px is pretty high and makes it hard to show a lot of columns on the index page. Is there a chance you'd be interested in having configurable font-size? Thanks
Long header on desktop mode
Hi guys! I'm trying formadmin and I discovered that the header breaks on desktop when you have many models.
So, is missing the last part of the header. The logout option and the user currently logged.
On mobile seems perfect! Many thanks! And GREAT JOB by the way!i
RoutingError: No route matches [GET] "/active_admin/datepicker/datepicker-input-icon.png"
I'm using activeadmin 1.1.0 with formadmin 0.2.0 and it's throwing this error:
How to reproduce
I have a this where
created_at
is a date:The date_picker itself works. The image was there in the branch 0-6-stable but was removed in version 1.1 by this pull request
Workaround
As a workaround I downloaded the image from 6-0-stable and added it to my app at
assets/images/active_admin/datepicker/datepicker-input-icon.png
_form.scss
is asking for the image hereLong one word title breaks responsive header
If the page title one long word (in my case it was the user email) then this happens on mobile:
The header and the title bar no longer fit in the screen, the rest of the content does.
If it's more than one word it works great:
Add screenshots
I was also curious on what's the design of the theme, so I had to download and install myself. But this is just a quick work to fix it. I like it since it's just a plug and play.
Remove datepicker input icon no longer available since activeadmin v1.1
Fix for issue #18
The image was removed in activeadmin v1.1 and hasn't replaced for anything yet.
Another possible fix would be to include the image in the assets folder but according to this activeadmin pull request the idea was that it "should be stripped of anything outdated and to simplify" and "A new PR can decide some icons we like as a default theme that would be consistent and make sure they are easy to configure/change".
So I feel removing it is the best choice.
Before
After
Support overriding color variables
I wanted to be able to use
formadmin
with custom colors so I needed a way to override the color variables as defined inapp/assets/stylesheets/formadmin/core/_settings.scss
. By using!default
on these, if these are already defined,formadmin
won't redefine them, meaning you can set these variables before importingformadmin
.I've also updated the readme to provide details about overriding colors.
Please let me know any feedback you've got, happy to make fixes to the change.
Thanks!
atoms/* not found
Hi!
I'm trying to get your theme running on an Active Admin setup using Rails 5 and I get the error that Formadmin cannot find the folder or any files in atoms/*.
Any thoughts?
My admin.scss file:
The error in detail:
My Gemfile.lock:
Improvement in responsible tables
I feel like the current behaviour of the tables on mobile isn't ideal.
Normal:
Mobile
This makes it really hard to read, especially if the column values aren't as obvious as this example.
I feel something like this will make a lot more sense (taken form here):
Or just showing the column name next to the value could be enough.