Skip to content

Commit d511901

Browse files
author
Mattia Roccoberton
committed
Version 0.4.0 🎉
1 parent f01f25c commit d511901

6 files changed

Lines changed: 107 additions & 63 deletions

File tree

README.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Features:
66

77
- CSS only theme with clean UI
88
- compact nested forms
9-
- [customizable](#customize): colors, sidebar position, compact title bar, scroll on cells
9+
- [customizable](#customize): colors, sidebar position, scroll on cells
1010
- custom boolean input: [toggle](#toggle)
1111
- Blaze CSS [widgets](#blaze-widgets)
1212

@@ -27,31 +27,35 @@ Features:
2727
- To change colors add before your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
2828

2929
```css
30-
/* blaze colors */
30+
// blaze colors
3131
$color-brand: #2C3E50;
3232
$color-info: #4dabf5;
3333
$color-warning: #ff9800;
3434
$color-success: #4caf50;
3535
$color-error: #f44336;
36-
/* main variables */
37-
$bg-form1: #f4f4f4; // bg 1st level forms
38-
$bg-form2: darken($bg-form1, 3%); // bg 2nd level forms (nested)
39-
$bg-form3: darken($bg-form1, 6%); // bg 3rd level forms (nested)
40-
$bg-form4: darken($bg-form1, 9%); // bg 4th level forms (nested)
41-
$bg-form-sub-headings: #d4d4d4; // bg nested forms title
42-
$bg-header: $color-brand; // bg header bar
43-
$bg-inputs: #fff; // bg forms inputs
44-
$bg-menu-active: #7b929e; // bg menu item current / hover
45-
$fg-box-title: #fff;
46-
$fg-button-link: #fff;
47-
$fg-menu-items: #f8f8f8;
48-
$fg-table-borders: #e4e4e4;
49-
$fg-table-link: #eee;
50-
/* other variables */
51-
$form-padding: 10px;
52-
$inputs-spacing: 10px;
53-
$height-inputs: 28px;
54-
$text-shadow: #000;
36+
// main variables
37+
$bg-footer: #dfdfdf !default; // bg footer bar
38+
$bg-form1: #f4f4f4 !default; // bg 1st level forms
39+
$bg-form2: darken($bg-form1, 3%) !default; // bg 2nd level forms (nested)
40+
$bg-form3: darken($bg-form1, 6%) !default; // bg 3rd level forms (nested)
41+
$bg-form4: darken($bg-form1, 9%) !default; // bg 4th level forms (nested)
42+
$bg-form-sub-headings: lighten( $color-brand, 64% ) !default; // bg nested forms title
43+
$bg-header: $color-brand !default; // bg header bar
44+
$bg-inputs: #fff !default; // bg forms inputs
45+
$bg-menu-active: #7b929e !default; // bg menu item current / hover
46+
$bg-sidebar: #efefef; // bg sidebar
47+
$fg-box-title: #fff !default;
48+
$fg-button-link: #fff !default;
49+
$fg-menu-items: #f8f8f8 !default;
50+
$fg-table-borders: #e4e4e4 !default;
51+
$fg-table-link: #eee !default;
52+
// other variables
53+
$form-padding: 10px !default;
54+
$inputs-spacing: 10px !default;
55+
$height-inputs: 26px !default;
56+
$height-topbar: 40px !default;
57+
$height-titlebar: 38px !default;
58+
$text-shadow: #000 !default;
5559
```
5660

5761
- To move sidebar on the left add to your ActiveAdmin styles (after blaze theme import):
@@ -65,11 +69,6 @@ $text-shadow: #000;
6569
- More options:
6670

6771
```css
68-
// compact title bar
69-
#title_bar {
70-
@extend .compact_titlebar;
71-
}
72-
7372
// scrollable table cells
7473
.index_content table {
7574
@extend .scoll_cells;

app/assets/stylesheets/activeadmin_blaze_theme/theme.scss

Lines changed: 81 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@import url('https://fonts.googleapis.com/css?family=Roboto');
33

44
// main variables
5+
$bg-footer: #dfdfdf !default; // bg footer bar
56
$bg-form1: #f4f4f4 !default; // bg 1st level forms
67
$bg-form2: darken($bg-form1, 3%) !default; // bg 2nd level forms (nested)
78
$bg-form3: darken($bg-form1, 6%) !default; // bg 3rd level forms (nested)
@@ -10,6 +11,7 @@ $bg-form-sub-headings: lighten( $color-brand, 64% ) !default; // bg nested form
1011
$bg-header: $color-brand !default; // bg header bar
1112
$bg-inputs: #fff !default; // bg forms inputs
1213
$bg-menu-active: #7b929e !default; // bg menu item current / hover
14+
$bg-sidebar: #efefef; // bg sidebar
1315
$fg-box-title: #fff !default;
1416
$fg-button-link: #fff !default;
1517
$fg-menu-items: #f8f8f8 !default;
@@ -20,11 +22,15 @@ $fg-table-link: #eee !default;
2022
$form-padding: 10px !default;
2123
$inputs-spacing: 10px !default;
2224
$height-inputs: 26px !default;
25+
$height-topbar: 40px !default;
26+
$height-titlebar: 38px !default;
2327
$text-shadow: #000 !default;
2428

2529
// active_admin theme styles
2630
body.active_admin {
2731
font-family: 'Roboto', sans-serif;
32+
font-size: 12px;
33+
min-height: 100vh;
2834

2935
// generics
3036
.button-base {
@@ -106,6 +112,9 @@ body.active_admin {
106112
fieldset.actions li.cancel a:hover {
107113
background-image: none;
108114
}
115+
> .actions {
116+
margin: 5px 0 0 0;
117+
}
109118

110119
// submits
111120
input[type='submit'] {
@@ -281,8 +290,7 @@ body.active_admin {
281290
@extend .c-card__item;
282291
// @extend .c-card__item--info;
283292
background: $bg-form-sub-headings;
284-
margin-bottom: 0;
285-
padding-left: 10px;
293+
padding: 10px;
286294
}
287295
.inputs {
288296
padding: $form-padding;
@@ -323,16 +331,24 @@ body.active_admin {
323331
}
324332
.site_title {
325333
color: $fg-menu-items;
334+
padding-top: 0;
335+
padding-bottom: 0;
326336
img {
327-
max-height: 36px;
337+
max-height: $height-topbar;
328338
max-width: 250px;
329-
top: -1px;
339+
// top: -1px;
330340
vertical-align: middle;
331341
}
332342
}
333343
ul.tabs {
344+
li {
345+
height: $height-topbar;
346+
line-height: $height-topbar;
347+
}
334348
li > a {
335349
color: $fg-menu-items;
350+
height: $height-topbar;
351+
line-height: $height-topbar;
336352
}
337353
li:hover, li.current {
338354
background: $bg-menu-active;
@@ -403,6 +419,14 @@ body.active_admin {
403419
&.current:hover {
404420
background-image: none;
405421
}
422+
&.gap {
423+
border: 0 none;
424+
}
425+
&.gap:hover {
426+
background-color: transparent;
427+
color: initial;
428+
cursor: default;
429+
}
406430
}
407431
}
408432

@@ -441,12 +465,16 @@ body.active_admin {
441465

442466
// sidebars
443467
#sidebar {
444-
background: #efefef;
468+
background: $bg-sidebar;
469+
min-height: calc(100vh - #{$height-topbar + $height-titlebar + 2 + 40});
445470
padding: 0 15px;
446471
.sidebar_section {
447472
margin-bottom: 20px;
448473
}
449474
}
475+
#active_admin_content > #sidebar, #active_admin_content > #main_content_wrapper {
476+
float: none;
477+
}
450478
.sidebar_section {
451479
@extend .c-card;
452480
@extend .u-high;
@@ -564,6 +592,18 @@ body.active_admin {
564592
#title_bar {
565593
background-image: none;
566594
box-shadow: none;
595+
padding-top: 0;
596+
padding-bottom: 0;
597+
.breadcrumb {
598+
float: left;
599+
font-size: 1em;
600+
line-height: initial;
601+
margin: 0;
602+
padding: 0;
603+
> a, > a:link, > a:visited, > a:active {
604+
opacity: 0.7;
605+
}
606+
}
567607
.action_items span.action_item {
568608
> a,
569609
> .dropdown_menu > a {
@@ -578,11 +618,24 @@ body.active_admin {
578618
@extend .c-button--error;
579619
}
580620
}
621+
#page_title {
622+
display: inline-block;
623+
float: left;
624+
font-size: 1em;
625+
// font-size: 2em;
626+
line-height: initial;
627+
margin-left: 5px;
628+
}
629+
#titlebar_left, #titlebar_right {
630+
height: $height-titlebar;
631+
}
581632
}
582633

583634
// main content
584635
#main_content {
585-
padding: 30px 0 15px 20px;
636+
margin: 0;
637+
padding: 25px 20px;
638+
width: calc(100% - 270px);
586639
> .panel {
587640
@extend .c-card;
588641
@extend .u-high;
@@ -606,6 +659,7 @@ body.active_admin {
606659

607660
// admin content
608661
#active_admin_content {
662+
display: flex;
609663
padding: 0;
610664
}
611665

@@ -620,8 +674,11 @@ body.active_admin {
620674

621675
// footer
622676
#footer {
623-
// bottom: 0;
624-
// position: absolute;
677+
bottom: 0;
678+
position: absolute;
679+
background-color: $bg-footer;
680+
line-height: 20px;
681+
padding: 10px;
625682
text-align: center;
626683
width: 100%;
627684
> p {
@@ -631,6 +688,11 @@ body.active_admin {
631688
}
632689

633690
// misc
691+
.download_links > a {
692+
@extend .c-button;
693+
@extend .c-button--info;
694+
@extend .u-small;
695+
}
634696
.ui-datepicker {
635697
> .ui-datepicker-header {
636698
border-bottom: 0 none;
@@ -658,40 +720,18 @@ body.active_admin {
658720

659721
// optional customizations
660722
.compact_titlebar {
661-
padding-top: 0;
662-
padding-bottom: 0;
663-
.breadcrumb {
664-
float: left;
665-
font-size: 1em;
666-
line-height: initial;
667-
margin: 0;
668-
padding: 0;
669-
> a, > a:link, > a:visited, > a:active {
670-
opacity: 0.5;
671-
}
672-
}
673-
#page_title {
674-
display: inline-block;
675-
float: left;
676-
font-size: 1em;
677-
// font-size: 2em;
678-
line-height: initial;
679-
margin-left: 5px;
680-
}
681-
#titlebar_left, #titlebar_right {
682-
height: 36px;
683-
}
723+
white-space: initial;
684724
}
685725
.sidebar_left {
686726
#main_content_wrapper {
687-
float: right;
688-
width: calc( 100% - 300px );
727+
order: 2;
728+
width: calc( 100% - 270px );
689729
#main_content {
690-
margin-right: 0;
691-
padding: 35px 30px 35px 0;
730+
width: 100%;
692731
}
693732
}
694733
#sidebar {
734+
order: 1;
695735
margin-left: 0;
696736
}
697737
}
@@ -703,6 +743,11 @@ body.active_admin {
703743
}
704744

705745
#active_admin_content.without_sidebar #main_content_wrapper #main_content {
706-
padding: 20px 15px;
746+
width: 100%;
747+
}
748+
#wrapper {
749+
min-height: 100vh;
750+
padding-bottom: 40px; // footer height
751+
position: relative;
707752
}
708753
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module ActiveAdminBlazeTheme
2-
VERSION = '0.3.0'
2+
VERSION = '0.4.0'
33
end

screenshot1.jpg

296 KB
Loading

screenshot2.jpg

93.9 KB
Loading

screenshot3.jpg

246 KB
Loading

0 commit comments

Comments
 (0)