arctic_admin
Advanced tools
Comparing version
@@ -42,10 +42,12 @@ document.addEventListener('DOMContentLoaded', () => { | ||
// toggle of nested menu items | ||
const nestedMenuItem = document.querySelector('#tabs .has_nested') | ||
if (nestedMenuItem) { | ||
nestedMenuItem.addEventListener('click', (e) => { | ||
e.stopPropagation() | ||
nestedMenuItem.classList.toggle('open') | ||
}) | ||
} | ||
const nestedMenuItems = document.querySelectorAll('#tabs .has_nested') | ||
nestedMenuItems.forEach( | ||
(nestedMenuItem) => { | ||
nestedMenuItem.addEventListener('click', (e) => { | ||
e.stopPropagation() | ||
nestedMenuItem.classList.toggle('open') | ||
}) | ||
} | ||
) | ||
}) |
{ | ||
"name": "arctic_admin", | ||
"version": "3.2.2", | ||
"version": "4.0.1", | ||
"description": "Responsive Theme for ActiveAdmin", | ||
@@ -5,0 +5,0 @@ "main": "app/assets/javascripts/arctic_admin/main.js", |
@@ -17,2 +17,4 @@ # ArcticAdmin | ||
>**⚠️ If you are using webpacker (Standard with Rails 6) look below** | ||
- Add this to your Gemfile: | ||
@@ -83,6 +85,6 @@ | ||
Install the assets from npm or yarn | ||
Install the needed assets with npm or yarn: | ||
``` | ||
yarn add arctic_admin | ||
yarn add arctic_admin @fortawesome/fontawesome-free | ||
``` | ||
@@ -108,5 +110,6 @@ | ||
In your `app/javascript/packs/active_admin.js`, add the line: | ||
Search for `app/javascript/packs/active_admin.js` in your rails project and add the following lines: | ||
```js | ||
import "@fortawesome/fontawesome-free/css/all.css"; | ||
import 'arctic_admin' | ||
@@ -118,13 +121,10 @@ ``` | ||
For this, you need to use sass to custom the theme. | ||
For this, you need to use SASS to customize the theming. | ||
You can even change basic color of the theme by placing some other variables: | ||
Right now you can change the primary color of the theme by placing the following variable in your `active_admin.scss` file: | ||
If you use the [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your | ||
`active_admin.scss` file: | ||
```scss | ||
$primary-color: #2dbb43; | ||
@import "arctic_admin/base"; | ||
@import "~arctic_admin/src/scss/main"; | ||
``` | ||
@@ -139,3 +139,3 @@ | ||
@import arctic_admin/base | ||
@import ~arctic_admin/src/scss/main | ||
``` | ||
@@ -142,0 +142,0 @@ |
@@ -42,10 +42,12 @@ document.addEventListener('DOMContentLoaded', () => { | ||
// toggle of nested menu items | ||
const nestedMenuItem = document.querySelector('#tabs .has_nested') | ||
if (nestedMenuItem) { | ||
nestedMenuItem.addEventListener('click', (e) => { | ||
e.stopPropagation() | ||
nestedMenuItem.classList.toggle('open') | ||
}) | ||
} | ||
const nestedMenuItems = document.querySelectorAll('#tabs .has_nested') | ||
nestedMenuItems.forEach( | ||
(nestedMenuItem) => { | ||
nestedMenuItem.addEventListener('click', (e) => { | ||
e.stopPropagation() | ||
nestedMenuItem.classList.toggle('open') | ||
}) | ||
} | ||
) | ||
}) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5586254
0.01%96
4.35%0
-100%