{"id":17557543,"url":"https://github.com/blaknite/pure-admin-rails","last_synced_at":"2025-04-24T04:51:04.560Z","repository":{"id":19017885,"uuid":"22241016","full_name":"blaknite/pure-admin-rails","owner":"blaknite","description":"Pure CSS Admin Template","archived":false,"fork":false,"pushed_at":"2018-08-10T01:05:17.000Z","size":1294,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T07:05:53.092Z","etag":null,"topics":["admin-template","pure-css","rails"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blaknite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-25T01:52:11.000Z","updated_at":"2018-05-10T00:12:50.000Z","dependencies_parsed_at":"2022-09-25T06:01:27.624Z","dependency_job_id":null,"html_url":"https://github.com/blaknite/pure-admin-rails","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaknite%2Fpure-admin-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaknite%2Fpure-admin-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaknite%2Fpure-admin-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaknite%2Fpure-admin-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blaknite","download_url":"https://codeload.github.com/blaknite/pure-admin-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566445,"owners_count":21451230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-template","pure-css","rails"],"created_at":"2024-10-21T09:08:22.408Z","updated_at":"2025-04-24T04:51:04.533Z","avatar_url":"https://github.com/blaknite.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pure-admin-rails\n\n[![Build Status](https://travis-ci.org/blaknite/pure-admin-rails.svg?branch=master)](https://travis-ci.org/blaknite/pure-admin-rails)\n\nPure CSS Admin Template for Rails 4+.\n\nForms work with SimpleForm, breadcrumbs with crumpet.\n\n## Installation\n\nAdd these lines to your Gemfile\n```ruby\n# Admin theme + dependencies\ngem 'pure-admin-rails', github: 'blaknite/pure-admin-rails', branch: 'master'\ngem 'pure-css-reset-rails', github: 'blaknite/pure-css-reset-rails', branch: 'master'\ngem 'exo2-rails', github: 'blaknite/exo2-rails', branch: 'master'\ngem 'crummy', github: 'blaknite/crummy', branch: 'master'\ngem 'font-awesome-rails'\ngem 'select2-rails'\ngem 'pure-css-rails'\ngem 'simple_form'\n```\n\nRun\n```console\nrails generate pure_admin:layout\nrails generate pure_admin:simple_form\n```\n\nThen edit ```app/views/layouts/admin.html.erb``` to your liking.\n\n## Dependencies\n\n- Pure CSS\n- jQuery\n- waypoints.js\n- [Select2](https://select2.github.io/)\n\n## Usage\n\n### Portlets\n\nPortlets are optionally collapsable containers that can be passed a block, or a source URL.\n\n#### Simple Portlets\n\nThe simplest incarnation of a portlet is,\n```erb\n\u003c%= portlet do %\u003e\n  \u003cp\u003eHello, world\u003c/p\u003e\n\u003c% end %\u003e\n```\n\u003cimg src=\"readme-assets/simple-portlet.png\" width=\"100%\"\u003e\n\nYou may also give a title to portlets.\n```erb\n\u003c%= portlet 'Greeting' do %\u003e\n  \u003cp\u003eHello, world\u003c/p\u003e\n\u003c% end %\u003e\n```\n\u003cimg src=\"readme-assets/simple-portlet-with-title.png\" width=\"100%\"\u003e\n\nTitles can have [icons](https://fortawesome.github.io/Font-Awesome/icons/), too.\n```erb\n\u003c%= portlet 'Greeting', icon: 'hand-peace-o' do %\u003e\n  \u003cp\u003eHello, world\u003c/p\u003e\n\u003c% end %\u003e\n```\n\u003cimg src=\"readme-assets/simple-portlet-with-icon.png\" width=\"100%\"\u003e\n\nTo make a portlet collapsable, add the `expand: true` option to the `portlet` method.\n```erb\n\u003c%= portlet 'Greeting', icon: 'hand-peace-o', expand: true do %\u003e\n  \u003cp\u003eHello, world\u003c/p\u003e\n\u003c% end %\u003e\n```\n\u003cimg src=\"readme-assets/simple-portlet-expanded.png\" width=\"100%\"\u003e\n\nIf you want the portlet to be collapsed by default, simply add `expand: false` instead.\n\u003cimg src=\"readme-assets/simple-portlet-collapsed.png\" width=\"100%\"\u003e\n\nAny other options that can be passed to Rails' `content_tag` are respected on the portlet too, for example:\n\n```erb\n\u003c%= portlet 'Greeting', class: 'is-supported' do %\u003e\n...\n\u003c%= portlet 'Greeting', data: { attributes: 'are-too' } do %\u003e\n...\n```\n\n#### Source Portlets\n\nSource portlets are given a source URL which, when expanded, will fetch the content at this URL and display it within the portlet body.\n\nSource portlets require a title be given, to give the user somewhere to click to expand.\n\nFor this example, the following file was created:\n```html\n\u003c!-- public/test.html --\u003e\n\u003ch2\u003eCongratulations!\u003c/h2\u003e\n\u003cp\u003eThis page was loaded via AJAX.\u003c/p\u003e\n```\n\n```erb\n\u003c%= portlet 'Source Portlet', source: '/test' %\u003e\n```\n\u003cimg src=\"readme-assets/source-portlet.png\" width=\"100%\"\u003e\n\nWhen the portlet is clicked, the content at the source URL will be retrieved and displayed in the body.\n\u003cimg src=\"readme-assets/source-portlet-expanded.png\" width=\"100%\"\u003e\n\nIf the AJAX request begins to take too long, the portlet will assume a loading state.\n\u003cimg src=\"readme-assets/source-portlet-loading.png\" width=\"100%\"\u003e\n\nLike Simple Portlets, Source Portlets can be expanded by default.\nThe difference however, is that this loading happens when the document is ready.\nTo enable this, simply add the familiar `expand: true` to the options.\n```erb\n\u003c%= portlet 'Source Portlet', source: '/test', expand: true %\u003e\n```\n\nYou can additionally expand a portlet via the URL string.\nIf you add a class to the portlet you can then target this with a hash at the end of your URL.\nWhen this is loaded, a portlet with a class that is the same as the hash will be expanded.\n\n```erb\n\u003c%= portlet 'Source Portlet', source: '/test', class: 'source-test' %\u003e\n```\n\n```console\nhttp://localhost:3000/{page}#source-test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaknite%2Fpure-admin-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaknite%2Fpure-admin-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaknite%2Fpure-admin-rails/lists"}