Skip to content

Commit

Permalink
Merge pull request ckan#8643 from aleeexgreeen/midnight_blue-tables-btns
Browse files Browse the repository at this point in the history
[Midnight blue] Tables and buttons
  • Loading branch information
amercader authored Feb 12, 2025
2 parents cbf0fd8 + 633c37c commit 6fa5599
Show file tree
Hide file tree
Showing 11 changed files with 353 additions and 274 deletions.
267 changes: 160 additions & 107 deletions ckan/public-midnight-blue/base/css/main-rtl.css

Large diffs are not rendered by default.

267 changes: 160 additions & 107 deletions ckan/public-midnight-blue/base/css/main.css

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,13 @@ this.ckan.module('table-toggle-more', function($) {
var template_more = [
'<tr class="toggle-show toggle-show-more">',
'<td colspan="'+cols+'">',
'<small>',
'<a href="#" class="show-more">' + this._('Show more') + '</a>',
'<a href="#" class="show-less">' + this._('Hide') + '</a>',
'</small>',
'</td>',
'</tr>'
].join('\n');
var template_seperator = [
'<tr class="toggle-seperator">',
'<td colspan="'+cols+'">',
'</td>',
'</tr>'
].join('\n');

var seperator = $(template_seperator).insertAfter($('.toggle-more:last-child', this.el));
$(template_more).insertAfter(seperator);
$(template_more).insertAfter($('.toggle-more:last-child', this.el));

$('.show-more', this.el).on('click', this._onShowMore);
$('.show-less', this.el).on('click', this._onShowLess);
Expand Down
10 changes: 5 additions & 5 deletions ckan/public-midnight-blue/base/scss/_bootstrap-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ $brand-900: #000312;

// scss-docs-start theme-color-variables
$primary: $brand-600 !default;
$secondary: $gray-600 !default;
$secondary: $gray-500 !default;
$success: $green !default;
$info: $cyan !default;
$warning: $yellow !default;
$danger: darken($red, 5%) !default;
$light: $white !default;
$light: $gray-100 !default;
$dark: $gray-900 !default;
// scss-docs-end theme-color-variables

Expand Down Expand Up @@ -563,14 +563,14 @@ $table-cell-padding-x-sm: .25rem !default;
$table-cell-vertical-align: top !default;

$table-color: $body-color !default;
$table-bg: transparent !default;
$table-bg: $gray-100 !default;
$table-accent-bg: transparent !default;

$table-th-font-weight: null !default;

$table-striped-color: $table-color !default;
$table-striped-bg-factor: .05 !default;
$table-striped-bg: rgba($black, $table-striped-bg-factor) !default;
$table-striped-bg: $white !default;

$table-active-color: $table-color !default;
$table-active-bg-factor: .1 !default;
Expand All @@ -581,7 +581,7 @@ $table-hover-bg-factor: .075 !default;
$table-hover-bg: rgba($black, $table-hover-bg-factor) !default;

$table-border-factor: .1 !default;
$table-border-width: $border-width !default;
$table-border-width: 0 !default;
$table-border-color: $border-color !default;

$table-striped-order: odd !default;
Expand Down
40 changes: 18 additions & 22 deletions ckan/public-midnight-blue/base/scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,32 @@
@include box-shadow(none);
}

.btn-primary {
color: $white;
&:hover {
background-color: $brand-700;
@each $name, $color in $theme-colors {
.btn-#{$name}-outline {
border: solid 2px $color;
background-color: $white;
color: $color;
&:hover {
background-color: $color;
color: $white
}
}
}

.btn-outline {
border: $brand-500 solid 2px;
background-color: $white !important;
color: $brand-500;
.btn-primary {
color: $white;
&:hover {
background-color: $gray-100 !important;
color: $brand-500;
background-color: $brand-700;
}
}

.btn-default {
border: $table-border-color solid 1px;
.btn-secondary {
background-color: transparent;
color: $gray-800;
border: $table-border-color solid 2px;
&:hover {
background-color: $gray-300 !important;
border: $gray-300 solid 2px;
color: $gray-800;
}
}

.btn-light {
background-color: $gray-50;
color: $gray-800;
border: $gray-50 solid 2px;
&:hover {
background-color: $gray-100 !important;
border: $gray-100 solid 2px;
}
}
9 changes: 0 additions & 9 deletions ckan/public-midnight-blue/base/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
color: $white;
}

.btn-light, .btn-secondary {
@extend .btn-light;
border: $table-border-color solid 1px;
&:hover {
background-color: $gray-300 !important;
border-color: $gray-300;
}
}

.alert {
border: unset;
border-left: map-get($map: $border-widths, $key: "4") solid;
Expand Down
17 changes: 6 additions & 11 deletions ckan/public-midnight-blue/base/scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
}
}

.table-bordered > :not(caption) > * > * {
border-bottom-width: 1px;
}
.table-bordered thead {
border-bottom: 2px solid $black;
}
.table-header thead th {
background-color: $moduleHeadingBackgroundColor;
}
Expand All @@ -43,14 +49,6 @@
.show-less {
display: none;
}
.toggle-seperator {
display: table-row;
td {
height: 11px;
padding: 0;
background-image: url("#{$imagePath}/table-seperator.png");
}
}
}
.table .toggle-show td {
background: none;
Expand All @@ -63,8 +61,5 @@
.show-more {
display: none;
}
.toggle-seperator {
display: none;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>{{ _("Groups") }}</h2>
{% endfor %}
</ul>
<div>
<a class="btn btn-outline pull-right" href="{{ h.url_for('group.index') }}">
<a class="btn btn-primary-outline pull-right" href="{{ h.url_for('group.index') }}">
{{ _('View all groups') }}
</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ <h2>{{ _("Organizations") }}</h2>
{% endfor %}
</ul>
<div>
<a class="btn btn-outline pull-right" href="{{ h.url_for('organization.index') }}">{{ _('View all organizations') }}</a>
<a class="btn btn-primary-outline pull-right" href="{{ h.url_for('organization.index') }}">{{ _('View all organizations') }}</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ <h2>{{ _("Recent Datasets") }}</h2>
</ul>
</div>
<div>
<a class="btn btn-outline pull-right" href="{{ h.url_for('dataset.search') }}">{{ _('View all datasets') }}</a>
<a class="btn btn-primary-outline pull-right" href="{{ h.url_for('dataset.search') }}">{{ _('View all datasets') }}</a>
</div>

0 comments on commit 6fa5599

Please sign in to comment.