npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@capsens/light_admin_assets

v1.0.6

Published

Simple, minimal theme for activeadmin.

Downloads

2

Readme

light_admin - A minimal theme for ActiveAdmin

Screenshot Screenshot

Design by Marie Ishihara
Gem by CapSens

Installation

  • Add this line to your application's Gemfile:
gem 'light_admin'
  • And then run:
$ bundle install
  • Make sure you have no other ActiveAdmin theme installed before installing this gem! (non-exhaustive list of themes you may have : https://github.com/paladini/activeadmin-themes, if you have some, don't forget to remove associated @import too)

Pre-requisites

  • This gem requires the activeadmin gem.

Set-up

  • In app/assets/javascripts/active_admin.js, add the line:
//= require light_admin/filters_toggle
  • In app/assets/stylesheets/active_admin.scss, add the line:
@import 'light_admin/base';
  • Your active_admin.scss file should look like this:
@import 'active_admin/mixins';
@import 'active_admin/base';
@import 'light_admin/base';

You are good to go !

Displaying a logo in the header

  • Import the image of your logo in app/assets/images
  • In config/initializers/active_admin.rb uncomment the following line:
# config.site_title_image = "logo.png"
  • In place of logo.png, specify the name of your image and its extension:
config.site_title_image = "name_of_your_image.png"

Restart your Rails server so the changes take effect.

Displaying a logo on the login page

  • Place your image in app/assets/images/devise/sessions.
  • Run:
$ rails generate light_admin:new_session
  • Edit the commented lines in app/views/active_admin/devise/sessions/new.html.erb

Customizing variables

  • By default, variables are stored within the gem. If you want to edit them:
$ rails generate light_admin:variables
  • Then you can edit the variables in the following files: app/assets/stylesheets/light_admin/custom_variables/_colors.scss
    app/assets/stylesheets/light_admin/custom_variables/_font.scss
    app/assets/stylesheets/light_admin/custom_variables/_borders.scss
    app/assets/stylesheets/light_admin/custom_variables/_shadows.scss

  • Then, import your changed variables in app/assets/stylesheets/active_admin.scss above the light admin base scss file, it should look like this if you have changed only colors:

@import 'active_admin/mixins';
@import 'active_admin/base';
@import 'light_admin/custom_variables/colors';
@import 'light_admin/base';

Panel with link

Screenshot panel_with_link behaves the same of ActiveAdmin's panel, except that it can also display links.

  • If you want to use panel_with_link, you only need to call the panel_with_link method where you need it (for example, in your show page) and define its attributes like usual with ActiveAdmin.

  • Here is the code for the above screenshot:

panel_with_link t('users'), 'Voir tous', admin_users_path do
  table_for user do
    column :id
    column :email do
      link_to user.email, admin_user_path
    end 
    column :created_at
    column :updated_at
    column :first_name
    column :last_name
  end
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/CapSens/light_admin

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the LightAdmin project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.