locastyle-rails 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -0
- data/README.md +32 -0
- data/Rakefile +1 -0
- data/lib/generators/locastyle/install_generator.rb +26 -0
- data/lib/generators/locastyle/templates/application.html.erb +28 -0
- data/lib/generators/locastyle/templates/shared/_sidebar.html.erb +26 -0
- data/lib/generators/locastyle/templates/shared/_sidebar_notifications.html.erb +46 -0
- data/lib/generators/locastyle/templates/shared/_topbar.html.erb +45 -0
- data/lib/locastyle/rails/engine.rb +7 -0
- data/lib/locastyle/rails/version.rb +5 -0
- data/lib/locastyle/rails.rb +2 -0
- data/lib/locastyle-rails.rb +1 -0
- data/locastyle.gemspec +28 -0
- data/spec/features/generator_spec.rb +8 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/support/helpers.rb +9 -0
- data/vendor/assets/images/locastyle/logo-locaweb.jpg +0 -0
- data/vendor/assets/javascripts/locastyle.js +73 -0
- data/vendor/assets/javascripts/templates.js +1 -0
- data/vendor/assets/stylesheets/locastyle/_locastyle.css +5 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-docs.eot +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-docs.json +116 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-docs.svg +13 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-docs.ttf +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-docs.woff +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-panel-icons.eot +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-panel-icons.json +301 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-panel-icons.svg +18 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-panel-icons.ttf +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle-panel-icons.woff +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle.eot +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle.svg +127 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle.ttf +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/locastyle.woff +0 -0
- data/vendor/assets/stylesheets/locastyle/fonts/selection.json +2844 -0
- metadata +176 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bcbd3cb53bea031ef90bf7e43998154f6fd00bfb
|
4
|
+
data.tar.gz: 3ed28664fdc956cc01a9afdf86b48a42d5fb9e5c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 84188a7b33c3e94f5bd0d3e375dbc23faf1258b05cce5ccf7bb2cab1a765d8132151128524ce7fd15426800ab7dd42c7136d74d569f83c27a12ba301c9ccedfd
|
7
|
+
data.tar.gz: 32f4f15dcef4da43bc072e7655220eb828fa1a1ed94cd4e1cac9c9d2d7fed48c84ae416a671a7b07f0fa0d384dcb493a177c4086cca76e2b52ad3ee343372286
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.2
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Locastyle Gem
|
2
|
+
|
3
|
+
This GEM build a first application structure from your rails project.
|
4
|
+
|
5
|
+
### Install
|
6
|
+
|
7
|
+
`gem 'locastyle'`
|
8
|
+
|
9
|
+
### Usage
|
10
|
+
|
11
|
+
`rails g locastyle:install`
|
12
|
+
|
13
|
+
> This command made a shared folder inside your `app/views/layouts`, overwrite your `application.html.erb` with boilerplate structure from locastyle.
|
14
|
+
|
15
|
+
|
16
|
+
Use `bin/rails generate` to create your models and controllers
|
17
|
+
To see all available options, run it without parameters.
|
18
|
+
|
19
|
+
Set up a root route to replace this page
|
20
|
+
You're seeing this page because you're running in development mode and you haven't set a root route yet.
|
21
|
+
|
22
|
+
Routes are set up in `config/routes.rb`
|
23
|
+
|
24
|
+
<pre>
|
25
|
+
.
|
26
|
+
+-- app/views/layouts
|
27
|
+
| +-- application.html.erb
|
28
|
+
| +-- shared
|
29
|
+
| +-- +-- _sidebar.html.erb
|
30
|
+
| +-- +-- _sidebar_notifications.html.erb
|
31
|
+
| +-- +-- _topbar.html.erb
|
32
|
+
</pre>
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/setup'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Locastyle
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
6
|
+
SHARED_PATH = File.expand_path("app/views/layouts/shared")
|
7
|
+
TEMPLATE_PATH = File.expand_path("app/views/layouts/application.html.erb")
|
8
|
+
|
9
|
+
source_root File.join(File.dirname(__FILE__), 'templates')
|
10
|
+
|
11
|
+
def copy_files
|
12
|
+
directory "shared", SHARED_PATH
|
13
|
+
end
|
14
|
+
|
15
|
+
def create_layout
|
16
|
+
template "application.html.erb", TEMPLATE_PATH
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def file_name
|
22
|
+
layout_name.underscore.downcase
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html class="ls-theme-green">
|
3
|
+
<head>
|
4
|
+
<title>Página com a estrutura inicial</title>
|
5
|
+
|
6
|
+
<%%= stylesheet_link_tag "application", "//assets.locaweb.com.br/locastyle/3.8.2/stylesheets/locastyle.css" %>
|
7
|
+
<%%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%%= render "layouts/shared/topbar" %>
|
12
|
+
|
13
|
+
<%%= render "layouts/shared/sidebar" %>
|
14
|
+
|
15
|
+
<main class="ls-main ">
|
16
|
+
<div class="container-fluid">
|
17
|
+
<h1 class="ls-title-intro ls-ico-home">Página inicial</h1>
|
18
|
+
<%%= yield %>
|
19
|
+
</div>
|
20
|
+
</main>
|
21
|
+
|
22
|
+
<%%= render "layouts/shared/sidebar_notifications" %>
|
23
|
+
|
24
|
+
<!-- We recommended use jQuery 1.10 or up -->
|
25
|
+
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
|
26
|
+
<%%= javascript_include_tag "application", "//assets.locaweb.com.br/locastyle/3.8.2/javascripts/locastyle.js" %>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<aside class="ls-sidebar">
|
2
|
+
|
3
|
+
<div class="ls-sidebar-inner">
|
4
|
+
<a href="/locawebstyle/documentacao/exemplos//pre-painel" class="ls-go-prev"><span class="ls-text">Voltar à lista de serviços</span></a>
|
5
|
+
|
6
|
+
<nav class="ls-menu">
|
7
|
+
<ul>
|
8
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/home" class="ls-ico-dashboard" title="Dashboard">Dashboard</a></li>
|
9
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/clients" class="ls-ico-users" title="Clientes">Clientes</a></li>
|
10
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/stats" class="ls-ico-stats" title="Relatórios da revenda">Relatórios da revenda</a></li>
|
11
|
+
<li>
|
12
|
+
<a href="#" class="ls-ico-cog" title="Configurações">Configurações</a>
|
13
|
+
<ul>
|
14
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/config-domain">Domínios da Revenda</a></li>
|
15
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/config-email">E-mail de Remetente</a></li>
|
16
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/config-aspect">Aparência</a></li>
|
17
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/config-answer">Atendimento</a></li>
|
18
|
+
<li><a href="/locawebstyle/documentacao/exemplos/painel1/config-api">Chave de acesso para API</a></li>
|
19
|
+
</ul>
|
20
|
+
</li>
|
21
|
+
</ul>
|
22
|
+
</nav>
|
23
|
+
|
24
|
+
|
25
|
+
</div>
|
26
|
+
</aside>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<aside class="ls-notification">
|
2
|
+
<nav class="ls-notification-list" id="ls-notification-curtain" style="left: 1716px;">
|
3
|
+
<h3 class="ls-title-2">Notificações</h3>
|
4
|
+
<ul>
|
5
|
+
<li class="ls-dismissable">
|
6
|
+
<a href="#">Blanditiis est est dolorem iure voluptatem eos deleniti repellat et laborum consequatur</a>
|
7
|
+
<a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
|
8
|
+
</li>
|
9
|
+
<li class="ls-dismissable">
|
10
|
+
<a href="#">Similique eos rerum perferendis voluptatibus</a>
|
11
|
+
<a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
|
12
|
+
</li>
|
13
|
+
<li class="ls-dismissable">
|
14
|
+
<a href="#">Qui numquam iusto suscipit nisi qui unde</a>
|
15
|
+
<a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
|
16
|
+
</li>
|
17
|
+
<li class="ls-dismissable">
|
18
|
+
<a href="#">Nisi aut assumenda dignissimos qui ea in deserunt quo deleniti dolorum quo et consequatur</a>
|
19
|
+
<a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
|
20
|
+
</li>
|
21
|
+
<li class="ls-dismissable">
|
22
|
+
<a href="#">Sunt consequuntur aut aut a molestiae veritatis assumenda voluptas nam placeat eius ad</a>
|
23
|
+
<a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
|
24
|
+
</li>
|
25
|
+
</ul>
|
26
|
+
</nav>
|
27
|
+
|
28
|
+
<nav class="ls-notification-list" id="ls-help-curtain" style="left: 1756px;">
|
29
|
+
<h3 class="ls-title-2">Feedback</h3>
|
30
|
+
<ul>
|
31
|
+
<li><a href="#">> quo fugiat facilis nulla perspiciatis consequatur</a></li>
|
32
|
+
<li><a href="#">> enim et labore repellat enim debitis</a></li>
|
33
|
+
</ul>
|
34
|
+
</nav>
|
35
|
+
|
36
|
+
<nav class="ls-notification-list" id="ls-feedback-curtain" style="left: 1796px;">
|
37
|
+
<h3 class="ls-title-2">Ajuda</h3>
|
38
|
+
<ul>
|
39
|
+
<li class="ls-txt-center hidden-xs">
|
40
|
+
<a href="#" class="ls-btn-dark ls-btn-tour">Fazer um Tour</a>
|
41
|
+
</li>
|
42
|
+
<li><a href="#">> Guia</a></li>
|
43
|
+
<li><a href="#">> Wiki</a></li>
|
44
|
+
</ul>
|
45
|
+
</nav>
|
46
|
+
</aside>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<div class="ls-topbar ">
|
2
|
+
|
3
|
+
<!-- Barra de Notificações -->
|
4
|
+
<div class="ls-notification-topbar">
|
5
|
+
|
6
|
+
<!-- Links de apoio -->
|
7
|
+
<div class="ls-alerts-list">
|
8
|
+
<a href="#" class="ls-ico-bell-o" data-counter="8" data-ls-module="topbarCurtain" data-target="#ls-notification-curtain"><span>Notificações</span></a>
|
9
|
+
<a href="#" class="ls-ico-bullhorn" data-ls-module="topbarCurtain" data-target="#ls-help-curtain"><span>Ajuda</span></a>
|
10
|
+
<a href="#" class="ls-ico-question" data-ls-module="topbarCurtain" data-target="#ls-feedback-curtain"><span>Sugestões</span></a>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<!-- Dropdown com detalhes da conta de usuário -->
|
14
|
+
<div data-ls-module="dropdown" class="ls-dropdown ls-user-account">
|
15
|
+
<a href="#" class="ls-ico-user">
|
16
|
+
<img src="/locawebstyle/assets/images/locastyle/avatar-example.jpg" alt="" />
|
17
|
+
<span class="ls-name">João Kennedy</span>
|
18
|
+
(johnkennedy)
|
19
|
+
</a>
|
20
|
+
|
21
|
+
<nav class="ls-dropdown-nav ls-user-menu">
|
22
|
+
<ul>
|
23
|
+
<li><a href="#">Meus dados</a></li>
|
24
|
+
<li><a href="#">Faturas</a></li>
|
25
|
+
<li><a href="#">Planos</a></li>
|
26
|
+
<li><a href="#">Sair</a></li>
|
27
|
+
</ul>
|
28
|
+
</nav>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<span class="ls-show-sidebar ls-ico-menu"></span>
|
33
|
+
|
34
|
+
<a href="/locawebstyle/documentacao/exemplos//pre-painel" class="ls-go-next"><span class="ls-text">Voltar à lista de serviços</span></a>
|
35
|
+
|
36
|
+
<!-- Nome do produto/marca com sidebar -->
|
37
|
+
<h1 class="ls-brand-name">
|
38
|
+
<a href="home" class="ls-ico-earth">
|
39
|
+
<small>Uma descrição ou outro nome</small>
|
40
|
+
O nome do Produto
|
41
|
+
</a>
|
42
|
+
</h1>
|
43
|
+
|
44
|
+
<!-- Nome do produto/marca sem sidebar quando for o pre-painel -->
|
45
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'locastyle/rails'
|
data/locastyle.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'locastyle/rails/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "locastyle-rails"
|
8
|
+
spec.version = Locastyle::Rails::VERSION
|
9
|
+
spec.authors = ["Flavio Muniz"]
|
10
|
+
spec.email = ["flavio.muniz@locaweb.com.br"]
|
11
|
+
spec.description = %q{Locaweb Style - A framework with CSS and JS patterns to build products admin interface}
|
12
|
+
spec.summary = %q{Locaweb Style - A framework with CSS and JS patterns to build products admin interface}
|
13
|
+
spec.homepage = "http://locaweb.github.io/locawebstyle/"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "sass", [">= 3.3.0", "< 3.5"]
|
22
|
+
spec.add_dependency "railties", [">= 3.1.0"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rails"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.2"
|
28
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'capybara/rspec'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
Bundler.require(:default, :test)
|
5
|
+
|
6
|
+
Dir['./spec/support/**/*.rb'].each { |file| require file }
|
7
|
+
|
8
|
+
RSpec.configure do |config|
|
9
|
+
config.include LocastyleRailsTestHelpers
|
10
|
+
|
11
|
+
config.before(:all) do
|
12
|
+
install_locastyle
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
Binary file
|