jap_mag 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -20,6 +20,10 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
+ In your CSS manifest (application.css in default):
24
+
25
+ *= require jap_mag
26
+
23
27
  Documentation is one the way. Stay tuned!
24
28
 
25
29
  ## Contributing
@@ -53,11 +53,15 @@ h1 {
53
53
  }
54
54
 
55
55
  h2 {
56
- font-size: 1.4em;
56
+ font-size: 1.6em;
57
57
  }
58
58
 
59
59
  h3 {
60
- font-size: 1.2em;
60
+ font-size: 1.4em;
61
+ }
62
+
63
+ p {
64
+ margin: 1em 0;
61
65
  }
62
66
 
63
67
  blockquote {
@@ -10,9 +10,7 @@
10
10
  *
11
11
  *= require_self
12
12
  *= require reset
13
- *= require_tree ./vendors
14
13
  *= require variables
15
14
  *= require widgets
16
15
  *= require base
17
- *= require_tree ./modules
18
16
  */
@@ -1,3 +1,10 @@
1
+ @mixin rounded($radius: 5px) {
2
+ border-radius: $radius;
3
+ -moz-border-radius: $radius;
4
+ -webkit-border-radius: $radius;
5
+ }
6
+
7
+
1
8
  @mixin box-shadow($effect: 1px 0px 5px black) {
2
9
  box-shadow: $effect;
3
10
  -moz-box-shadow: $effect;
@@ -91,7 +91,7 @@ table.basic {
91
91
  td {
92
92
  border-top: 1px solid #ccc;
93
93
 
94
- .actions a {
94
+ &.actions a {
95
95
  margin-right: 10px;
96
96
  }
97
97
 
@@ -219,18 +219,6 @@ div.tab {
219
219
  }
220
220
  /* @end */
221
221
 
222
- .toolbar {
223
- overflow: hidden;
224
-
225
- .left {
226
- float: left;
227
- }
228
-
229
- .right {
230
- float: right;
231
- }
232
- }
233
-
234
222
  /* @form.basic */
235
223
  form.basic {
236
224
  input[type=text], input[type=search], input[type=email], input[type=password], textarea {
@@ -315,40 +303,8 @@ img.avatar {
315
303
  text-transform: uppercase;
316
304
  white-space: nowrap;
317
305
  background-color: #BFBFBF;
318
- -webkit-border-radius: 3px;
319
- -moz-border-radius: 3px;
320
- border-radius: 3px;
306
+ @include rounded(3px);
321
307
  line-height: 18px;
322
-
323
- &.finished {
324
- background-color: $color_green;
325
- }
326
-
327
- &.wishlist {
328
- background-color: $color_pink;
329
- }
330
-
331
- &.reading {
332
- background-color: $color_yellow;
333
- }
334
-
335
- &.rank {
336
- background-color: transparent;
337
- border: 1px solid #999;
338
- color: #999;
339
- }
340
- }
341
-
342
- .tag {
343
- border: 0px solid;
344
- padding: 0 5px 0 13px;
345
- margin: 0 3px 3px 0;
346
- float: left;
347
- background: url(asset_path("tag.png", image)) no-repeat 0;
348
-
349
- &.current:hover {
350
- text-decoration: none;
351
- }
352
308
  }
353
309
 
354
310
  /* scope button */
@@ -480,28 +436,16 @@ ul.scopes {
480
436
 
481
437
  .left {
482
438
  float: left;
439
+ margin-right: 10px;
483
440
  }
484
441
 
485
442
  .right {
486
443
  float: right;
444
+ margin-left: 10px;
487
445
  }
488
446
  }
489
447
 
490
448
  .list {
491
449
  list-style: disc;
492
450
  margin: 0 0 9px 3em;
493
- }
494
-
495
-
496
- .block {
497
- margin: 0 0 20px;
498
-
499
- h3 {
500
- @include h3;
501
- }
502
-
503
- table.basic th {
504
- background: none;
505
- font-weight: bold;
506
- }
507
451
  }
@@ -0,0 +1,11 @@
1
+ class ApplicationController < ActionController::Base
2
+
3
+ # i18N
4
+ def _ key, options={}
5
+ key = (key[0] == "/") ? key.gsub("/", "") : "#{params[:controller]}.#{params[:action]}.#{key}"
6
+ t(key, options)
7
+ end
8
+
9
+ helper_method :_
10
+
11
+ end
@@ -107,8 +107,7 @@ module WidgetsHelper
107
107
  # call to action
108
108
  #
109
109
  def cta text, url, html_options={}
110
- default_html_options = {:class => "cta"}
111
- html_options = default_html_options.merge(html_options)
110
+
112
111
  html_options[:class] = (html_options[:class].to_s + " cta").strip
113
112
 
114
113
  link_to content_tag(:span, text), url, html_options
@@ -0,0 +1,12 @@
1
+ <div id="flash">
2
+ <% if flash[:notice] %>
3
+ <div class="notice"><%= flash[:notice] %></div>
4
+ <% elsif flash[:error] %>
5
+ <div class="error"><%= flash[:error] %></div>
6
+ <% elsif flash[:alert] %>
7
+ <div class="warning"><%= flash[:alert] %></div>
8
+ <% elsif flash[:warning] %>
9
+ <div class="warning"><%= flash[:warning] %></div>
10
+ <% end %>
11
+ <% flash[:notice] = flash[:error] = flash[:warning] = nil %>
12
+ </div>
@@ -0,0 +1,11 @@
1
+ <div id="footer">
2
+ <p><%= t :copyright %></p>
3
+ <%= clearfix %>
4
+ <ul class="languages">
5
+ <%
6
+ p = params.dup.delete_if{|key| %w(action controller locale).include?(key)}
7
+ %>
8
+ <li class="en"><%= link_to_unless_current t(:english), locale: :en, params: p %></li>
9
+ <li class="zh-CN"><%= link_to_unless_current t(:chinese), locale: "zh-CN", params: p %></li>
10
+ </ul>
11
+ </div>
File without changes
@@ -0,0 +1,5 @@
1
+ <div id="header">
2
+ <h1><%= link_to t("logo"), root_path %></h1>
3
+ <p class="slogan"><%= t("slogan") %></p>
4
+ <%= render "layouts/navigation" %>
5
+ </div>
@@ -0,0 +1,3 @@
1
+ <ul class="navigation">
2
+ <li><%= link_to_unless_current t("navigation.home"), root_path %></li>
3
+ </ul>
@@ -0,0 +1,33 @@
1
+ <!doctype html>
2
+ <!--[if lt IE 9]><html class="ie"><![endif]-->
3
+ <!--[if gte IE 9]><!--><html><!--<![endif]-->
4
+ <head>
5
+ <meta charset="utf-8"/>
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
7
+ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1, minimum-scale=1,user-scalable=yes" />
8
+
9
+ <title><%= content_for(:title) %></title>
10
+
11
+ <%= stylesheet_link_tag "application", :media => "all" %>
12
+ <%= csrf_meta_tags %>
13
+ </head>
14
+
15
+ <body class="<%= controller.controller_name.titleize.gsub(/\s/, "") %>"<%= raw " id=\"#{content_for(:id).to_s.titleize.gsub(/\s/, "")}\"" unless content_for(:id).blank? %>>
16
+ <div class="<%= (controller.action_name).titleize.gsub(/\s/, "") %>" id="body">
17
+ <%= render :partial => "/layouts/header" %>
18
+
19
+ <div id="wrapper">
20
+ <%= render :partial => "/layouts/flash", :locals => {:flash => flash} %>
21
+ <%= yield %>
22
+ </div>
23
+
24
+ <%= render :partial => "/layouts/footer" %>
25
+ </div>
26
+ <%= render "/layouts/ga" if Rails.env.production? %>
27
+ <!-- layout:application -->
28
+ <%= javascript_include_tag "application" %>
29
+ <!--[if lt IE 9]>
30
+ <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
31
+ <![endif]-->
32
+ </body>
33
+ </html>
data/jap_mag.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["felixding@gmail.com"]
7
7
  gem.description = %q{JapMag is the design language created by Felix Ding. This gem helps designers start a project that follows JapMag.}
8
8
  gem.summary = "jap_mag-#{gem.version}"
9
- gem.homepage = "http://dingyu.me"
9
+ gem.homepage = "https://github.com/felixding/JapMag"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -1,3 +1,3 @@
1
1
  module JapMag
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jap_mag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-08 00:00:00.000000000 Z
12
+ date: 2012-09-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: JapMag is the design language created by Felix Ding. This gem helps designers
15
15
  start a project that follows JapMag.
@@ -25,16 +25,23 @@ files:
25
25
  - README.md
26
26
  - Rakefile
27
27
  - app/assets/stylesheets/base.scss
28
- - app/assets/stylesheets/index.css
28
+ - app/assets/stylesheets/jap_mag.css
29
29
  - app/assets/stylesheets/mixins.scss
30
30
  - app/assets/stylesheets/reset.scss
31
31
  - app/assets/stylesheets/variables.scss
32
32
  - app/assets/stylesheets/widgets.scss
33
+ - app/controllers/application_controller.rb
33
34
  - app/helpers/widgets_helper.rb
35
+ - app/views/layouts/_flash.erb
36
+ - app/views/layouts/_footer.erb
37
+ - app/views/layouts/_ga.erb
38
+ - app/views/layouts/_header.erb
39
+ - app/views/layouts/_navigation.erb
40
+ - app/views/layouts/application.erb
34
41
  - jap_mag.gemspec
35
42
  - lib/jap_mag.rb
36
43
  - lib/jap_mag/version.rb
37
- homepage: http://dingyu.me
44
+ homepage: https://github.com/felixding/JapMag
38
45
  licenses: []
39
46
  post_install_message:
40
47
  rdoc_options: []