master 7839dfcb59e0 cached
14 files
16.3 KB
4.8k tokens
4 symbols
1 requests
Download .txt
Repository: vinhnglx/active_bootstrap_skin
Branch: master
Commit: 7839dfcb59e0
Files: 14
Total size: 16.3 KB

Directory structure:
gitextract_c_hwzelx/

├── .gitignore
├── CODE_OF_CONDUCT.md
├── Gemfile
├── LICENSE.txt
├── README.md
├── Rakefile
├── active_bootstrap_skin.gemspec
├── app/
│   └── assets/
│       ├── images/
│       │   └── .gitkeep
│       ├── javascripts/
│       │   └── active_bootstrap_skin.js
│       └── stylesheets/
│           └── active_bootstrap_skin.scss
├── bin/
│   ├── console
│   └── setup
└── lib/
    ├── active_bootstrap_skin/
    │   └── version.rb
    └── active_bootstrap_skin.rb

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
/.bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
  addresses, without explicit permission
* Other unethical or unprofessional conduct

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at TODO: Write your email address. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/

================================================
FILE: Gemfile
================================================
source 'https://rubygems.org'

# Specify your gem's dependencies in active_bootstrap_skin.gemspec
gemspec


================================================
FILE: LICENSE.txt
================================================
The MIT License (MIT)

Copyright (c) 2016 Vinh Nguyen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


================================================
FILE: README.md
================================================
# ActiveBootstrapSkin

[![Codewake](https://www.codewake.com/badges/ask_question_flat_square.svg)](https://www.codewake.com/p/active-bootstrap-skin)

Bootstrap skin for Active Admin.

## Installation

- Add the gem to your Gemfile:

```
# Note: The gem require the bootstrap-sass gem. So we need to add bootstrap-sass to Gemfile

gem 'bootstrap-sass'
gem 'active_bootstrap_skin'
```

## Usage

- Don't forget you have to config the [bootstraps-sass](https://github.com/twbs/bootstrap-sass#a-ruby-on-rails) first.

- In the `active_admin.scss` file, you include `active_bootstrap_skin`. **Note: You have to comment the active admin stylesheets.**

```css
// Active Admin's got SASS!
// @import "active_admin/mixins";
// @import "active_admin/base";

// Active Bootstrap
@import "active_bootstrap_skin";
```

- In the `active_admin.js` file, you require `active_bootstrap_skin`.

```javascript
//= require active_admin/base
//= require bootstrap-sprockets

//= require active_bootstrap_skin
```

## Screens

![Login](https://cloud.githubusercontent.com/assets/1997137/14111523/49c1e80c-f5f5-11e5-9fd4-d1700428b167.png)

![Admin](https://cloud.githubusercontent.com/assets/1997137/14111565/6f684bd2-f5f5-11e5-9c8c-afc0ac8ab05e.png)

![Admin Responsive](https://cloud.githubusercontent.com/assets/1997137/14111613/8fd64eb4-f5f5-11e5-9024-0d0dbf4c4b88.png)

![Admin viewport](https://cloud.githubusercontent.com/assets/1997137/15280259/d47272f4-1b58-11e6-86e8-b35836557890.png)

![Admin dropdown](https://cloud.githubusercontent.com/assets/1997137/15280303/57980aea-1b59-11e6-9cda-b58573a03f84.png)

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/vinhnglx/active_bootstrap_skin. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org/) code of conduct.


================================================
FILE: Rakefile
================================================
require "bundler/gem_tasks"
task :default => :spec


================================================
FILE: active_bootstrap_skin.gemspec
================================================
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'active_bootstrap_skin/version'

Gem::Specification.new do |spec|
  spec.name          = "active_bootstrap_skin"
  spec.version       = ActiveBootstrapSkin::VERSION
  spec.authors       = ["Vinh Nguyen"]
  spec.email         = ["vinh.nglx@gmail.com"]

  spec.summary       = %q{Bootstrap skin for ActiveAdmin.}
  spec.description   = %q{Bootstrap skin for ActiveAdmin.}
  spec.homepage      = "https://github.com/vinhnglx/active_bootstrap_skin"
  spec.license       = "MIT"

  spec.files         = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
  spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
  spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
  spec.require_paths = ["lib"]

  spec.add_development_dependency "bundler", "~> 1.11"
  spec.add_development_dependency "rake", "~> 10.0"

  spec.add_runtime_dependency "bootstrap-sass", "~> 3.4.1"
end


================================================
FILE: app/assets/images/.gitkeep
================================================


================================================
FILE: app/assets/javascripts/active_bootstrap_skin.js
================================================
$(document).ready(function() {
  // Add meta view port
  $('head').append('<meta name="viewport" content="width=device-width, initial-scale=1">');

  // Dropdown menus
  $(window).resize(function(){
    if ($(window).width() <= 768) {
      $('#tabs').addClass('collapse');
    } else {
      $('#tabs').removeClass('collapse');
    }
  });

  html_responsive = ' \
    <ul class="header-item tabs mobile"> \
      <li> \
        <button class="navbar-toggle button_mobile_burger" type="button" data-toggle="collapse" href="#tabs" aria-expanded="true" aria-controls="tabs"> \
          <span class="sr-only">Toggle navigation</span> \
          <span class="icon-bar"></span> \
          <span class="icon-bar"></span> \
          <span class="icon-bar"></span> \
        </button> \
      </li> \
    </ul> \
  '

  $(html_responsive).insertAfter('#site_title');
});


================================================
FILE: app/assets/stylesheets/active_bootstrap_skin.scss
================================================
@import 'bootstrap';

/* set horizontal padding on all content containers */
#title_bar, .flashes, .logged_out #content_wrapper, #footer {
  @include container-fixed;
}

#wrapper {
  @include container-fixed(0);
}

// apply bootstrap pagination style to .pagination
.pagination {
  > span {
    position: relative;
    float: left;
    padding: $padding-base-vertical $padding-base-horizontal;
    line-height: $line-height-base;
    background-color: $pagination-bg;
    border: 1px solid $pagination-border;
    margin-left: -1px;

    &:first-child {
      @include border-left-radius($border-radius-base);
    }

    &:last-child {
      @include border-right-radius($border-radius-base);
    }

    &:hover, &:focus {
      z-index: 2;
      color: $pagination-hover-color;
      background-color: $pagination-hover-bg;
      border-color: $pagination-hover-border;
    }

    &.current {
      &, &:hover, &:focus {
        z-index: 3;
        color: $pagination-active-color;
        background-color: $pagination-active-bg;
        border-color: $pagination-active-border;
        cursor: default;
      }
    }

    &.gap {
      &, &:hover, &:focus {
        color: $pagination-disabled-color;
        background-color: $pagination-disabled-bg;
        border-color: $pagination-disabled-border;
        cursor: $cursor-disabled;
      }
    }

    a {
      color: $pagination-color;

      &:hover, &:focus {
        text-decoration: none;
      }
    }
  }
}

//apply bootstrap panel style to .panel
.panel {
  @extend .panel-default;

  > h3 {
    @extend .panel-heading;

    padding-top: 7px;
    margin: 0;

    a {
      color: $panel-default-text;
    }
  }
}

.panel_contents {
  @extend .panel-body;
}

.flash {
  @extend .alert;
  margin-top: 30px;
}

.flash_alert {
  @extend .alert-danger;
}

.flash_notice {
  @extend .alert-success;
}

#error_explanation {
  color: $state-danger-text;
  h2 {
    font-size: 15px;
  }
}

.inline-errors {
  color: $state-danger-text;
}

#login {
  max-width: 400px;
  padding: 15px;
  margin: 0 auto;

  #admin_user_remember_me {
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-right: 10px;
  }

  #admin_user_submit_action, input[type="submit"] {
    @extend .btn-block;
  }
}

/* Header and Nav */
#header {
  @extend .navbar;
  @extend .navbar-inverse;
  border-radius: 0;

  .mobile {
    display: none;
  }

  @media (max-width: 768px) {
    .button_mobile_burger {
      margin-top: 0;
    }

    #site_title {
      float: left;
    }

    #utility_nav {
      display: none;
    }

    #tabs {
      clear: both;
    }

    .mobile {
      display: block;
    }

    .header-item.tabs {
      margin: 7.5px 0;
    }

    #utility_nav {
      float: none;
    }
  }

  @media (min-width: 769px) {
    #utility_nav {
      float: right;
    }
  }

  #site_title {
    @extend .navbar-brand;
    margin-top:    0;
    margin-bottom: 0;
  }

  .header-item.tabs {
    @extend .nav;
    @extend .navbar-nav;

    li.current { @extend .active; }
  }

  .header-item.tab {
    @extend .col-sm-3;
  }
}

#title_bar {
  @extend .clearfix;
  margin-bottom: 10px;

  #titlebar_left {
    @extend .pull-left;
  }

  #titlebar_right {
    @extend .pull-right;
  }

  .action_item a {
    @extend .btn;
    @extend .btn-primary;
  }
}

/* Sidebar */
.filter_form {
  .filter_form_field {
    @extend .form-group;

    input,select { @extend .form-control; }

    select[multiple] {
      height: auto;
    }
  }

  .buttons {
    input, a { @extend .btn; @extend .btn-default; }
    input[type="submit"] { @extend .btn-primary; }
  }
}

/* Main Content */
#active_admin_content {
  @extend .row;
  margin: 0;
  padding-bottom: 30px;

  &.without_sidebar {
    #main_content_wrapper {
      @extend .col-md-6;
      width: auto;
      min-width: 100%;
    }
  }

  &.with_sidebar {
    #main_content_wrapper { @extend .col-md-9; }
    #sidebar { @extend .col-md-3; }
  }

  table {
    width: auto;
  }
}

#main_content_wrapper {
  padding-bottom: 40px;
  /* make extra wide content accessible */
  overflow-x: auto;

  .member_link {
    margin-right: 10px;
  }
  input[type="checkbox"] {
    display: inline-block;
    width: auto;
    height: auto;
    margin-right: 10px;
  }
}

#main_content table {
  @extend .table;
}

ul.scopes {
  li.scope {
    display: inline-block;
    list-style-type: none;
    margin-bottom: 4px;
  }
  li.scope a{ @extend .btn; @extend .btn-default; }
  li.scope.selected a { @extend .btn-primary; }
}

/* breadcrumb */
.breadcrumb {
  /* the typical bootstrap look for .breadcrumb does not fit in the active admin layout */
  padding: 0;
  border-radius: 0;
}

#ui-datepicker-div {
  background: white;
  padding: 5px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 5px;
  .ui-datepicker-calendar {
    th, td {
      width: 30px;
      height: 30px;
      text-align: center;
      &:hover {
        background: #eeeeee;
        cursor: pointer;
      }
    }
  }

  .ui-datepicker-prev {
    float: left;
  }

  .ui-datepicker-next {
    float: right;
  }

  .ui-datepicker-today {
    font-weight: bold;
  }

  .ui-datepicker-title {
    text-align: center;
    font-weight: bold;
  }
}

/* Tables */
.index_as_table { @extend .table-responsive; }
.index_table      { @extend .table; }
.attributes_table table { @extend .table; }

//turn .table_actions into buttons with icons

#main_content_wrapper .table_actions {
  @extend .btn-toolbar;
  min-width: 117px;

  > .member_link {
    margin: (-3px) 10px 0 0;

    &:last-child {
      margin-right: 0;
    }
  }
}

.member_link, .ui-sortable-handle {
  @extend .btn;
  @extend .btn-default;
  @extend .glyphicon;
  font-size: 0;
  text-align: center;
  padding: 3px 0;
  width: 28px;

  &:before {
    font-size: 14px;
  }
}

.ui-sortable-handle {
  @extend .glyphicon-sort;
  cursor: all-scroll;
}

.view_link {
  @extend .glyphicon-search;
}

.edit_link {
  @extend .glyphicon-pencil;
}

.delete_link {
  @extend .glyphicon-trash;
}

/* Forms */
form {
  //@extend form[role="form"];

  .inputs, .actions {
    ol {
      padding-left: 0;
      list-style: none;
    }
  }

  .inputs {
    li {
      @extend .form-group;

      input,select,textarea { @extend .form-control; }

      select[multiple] {
        height: auto;
      }
    }
  }

  .actions {
    li {
      display: inline-block;

      input, a { @extend .btn; @extend .btn-default; }
      input[type="submit"] { @extend .btn-primary; }
    }
  }

  .actions li {
    margin-right: 10px;
  }

  label.label {
    /* The label class has a different meaning in bootstrap */
    display: inline-block;
    font-weight: bold;

    padding: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    text-align: inherit;
    white-space: inherit;
    vertical-align: inherit;
    border-radius: inherit;
  }

  &.formtastic .errors {
    color: $state-danger-text;
  }
}

/* Footer */
#footer {
  padding-top: 30px;
  padding-bottom: 20px;
  background-color: #9da5a4;
}

legend.label {
  @extend legend;
  text-align: left;
  border-radius: 0;
  margin-bottom: 10px;
}

/* Display of checkboxes and radios */

.check_boxes {
  @extend .checkbox;
}

.check_boxes, .radio {
  label {
    font-weight: normal;
  }

  legend label {
    padding: 0;
  }
}

// style filter form
.filter_form {

  input {
    margin-top: 10px;
  }

  label input {
    margin-top: 5px;
  }

  .buttons {
    input, a {
      margin-right: 5px;
    }

    a {
      margin-top: 10px;
    }
  }

  .filter_form_field, form .inputs li {

    select[multiple] {
      height: auto;
    }

    input[type="radio"] {
      height: auto;
      width: auto;
    }
  }
}

/* table_tools */

.table_tools {
  overflow: hidden;
  margin-bottom: 10px;

  .batch_actions_selector {
    .dropdown_menu_button {
      @extend .btn;
      @extend .btn-default;
      @extend .dropdown-toggle;
      &:after {
        margin-left: 0.4em;
        content: "";
        @extend .caret;
      }
    }

    .dropdown_menu_list {
      @extend .dropdown-menu;
      display: block;
      top: auto;
      left: auto;
    }
  }

  .table_tools_segmented_control {
    @extend .btn-group;
    margin: 0 0 0 1px;
  }

  .index {
    @extend .btn;
    @extend .btn-default;

    a {
      color: $btn-default-color;

      &:hover, &:focus {
        text-decoration: none;
      }
    }

    &.selected {
      @extend .btn-default;
      @extend .active;
    }
  }
}


================================================
FILE: bin/console
================================================
#!/usr/bin/env ruby

require "bundler/setup"
require "active_bootstrap_skin"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start


================================================
FILE: bin/setup
================================================
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here


================================================
FILE: lib/active_bootstrap_skin/version.rb
================================================
module ActiveBootstrapSkin
  VERSION = "0.1.5"
end


================================================
FILE: lib/active_bootstrap_skin.rb
================================================
require "active_bootstrap_skin/version"

module ActiveBootstrapSkin
  module Rails
    class Engine < ::Rails::Engine
    end
  end
end
Download .txt
gitextract_c_hwzelx/

├── .gitignore
├── CODE_OF_CONDUCT.md
├── Gemfile
├── LICENSE.txt
├── README.md
├── Rakefile
├── active_bootstrap_skin.gemspec
├── app/
│   └── assets/
│       ├── images/
│       │   └── .gitkeep
│       ├── javascripts/
│       │   └── active_bootstrap_skin.js
│       └── stylesheets/
│           └── active_bootstrap_skin.scss
├── bin/
│   ├── console
│   └── setup
└── lib/
    ├── active_bootstrap_skin/
    │   └── version.rb
    └── active_bootstrap_skin.rb
Download .txt
SYMBOL INDEX (4 symbols across 2 files)

FILE: lib/active_bootstrap_skin.rb
  type ActiveBootstrapSkin (line 3) | module ActiveBootstrapSkin
    type Rails (line 4) | module Rails
      class Engine (line 5) | class Engine < ::Rails::Engine

FILE: lib/active_bootstrap_skin/version.rb
  type ActiveBootstrapSkin (line 1) | module ActiveBootstrapSkin
Condensed preview — 14 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (18K chars).
[
  {
    "path": ".gitignore",
    "chars": 87,
    "preview": "/.bundle/\n/.yardoc\n/Gemfile.lock\n/_yardoc/\n/coverage/\n/doc/\n/pkg/\n/spec/reports/\n/tmp/\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 2398,
    "preview": "# Contributor Code of Conduct\n\nAs contributors and maintainers of this project, and in the interest of\nfostering an open"
  },
  {
    "path": "Gemfile",
    "chars": 106,
    "preview": "source 'https://rubygems.org'\n\n# Specify your gem's dependencies in active_bootstrap_skin.gemspec\ngemspec\n"
  },
  {
    "path": "LICENSE.txt",
    "chars": 1078,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Vinh Nguyen\n\nPermission is hereby granted, free of charge, to any person obtai"
  },
  {
    "path": "README.md",
    "chars": 1913,
    "preview": "# ActiveBootstrapSkin\n\n[![Codewake](https://www.codewake.com/badges/ask_question_flat_square.svg)](https://www.codewake."
  },
  {
    "path": "Rakefile",
    "chars": 51,
    "preview": "require \"bundler/gem_tasks\"\ntask :default => :spec\n"
  },
  {
    "path": "active_bootstrap_skin.gemspec",
    "chars": 1048,
    "preview": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequi"
  },
  {
    "path": "app/assets/images/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/assets/javascripts/active_bootstrap_skin.js",
    "chars": 868,
    "preview": "$(document).ready(function() {\n  // Add meta view port\n  $('head').append('<meta name=\"viewport\" content=\"width=device-w"
  },
  {
    "path": "app/assets/stylesheets/active_bootstrap_skin.scss",
    "chars": 8481,
    "preview": "@import 'bootstrap';\n\n/* set horizontal padding on all content containers */\n#title_bar, .flashes, .logged_out #content_"
  },
  {
    "path": "bin/console",
    "chars": 346,
    "preview": "#!/usr/bin/env ruby\n\nrequire \"bundler/setup\"\nrequire \"active_bootstrap_skin\"\n\n# You can add fixtures and/or initializati"
  },
  {
    "path": "bin/setup",
    "chars": 131,
    "preview": "#!/usr/bin/env bash\nset -euo pipefail\nIFS=$'\\n\\t'\nset -vx\n\nbundle install\n\n# Do any other automated setup that you need "
  },
  {
    "path": "lib/active_bootstrap_skin/version.rb",
    "chars": 51,
    "preview": "module ActiveBootstrapSkin\n  VERSION = \"0.1.5\"\nend\n"
  },
  {
    "path": "lib/active_bootstrap_skin.rb",
    "chars": 136,
    "preview": "require \"active_bootstrap_skin/version\"\n\nmodule ActiveBootstrapSkin\n  module Rails\n    class Engine < ::Rails::Engine\n  "
  }
]

About this extraction

This page contains the full source code of the vinhnglx/active_bootstrap_skin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 14 files (16.3 KB), approximately 4.8k tokens, and a symbol index with 4 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!