tehranjs 0.0.1.alpha → 0.0.2.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/tehranjs/cli/serve.rb +2 -0
- data/lib/tehranjs/identity.rb +1 -1
- data/lib/tehranjs/web/controller.rb +17 -2
- data/lib/tehranjs/web/helper.rb +30 -0
- data/lib/tehranjs/web/servlet.rb +5 -3
- data/lib/tehranjs/web/views/_layouts/application.html.erb +11 -4
- data/lib/tehranjs/web/views/_partials/_nav.html.erb +21 -0
- data/lib/tehranjs/web/views/about.html.erb +12 -0
- data/lib/tehranjs/web/views/index.html.erb +16 -3
- data/lib/tehranjs/web/views/locals/en.yml +6 -0
- data/lib/tehranjs/web/views/locals/fa.yml +6 -0
- data/lib/tehranjs/web/views/new_article.html.erb +64 -0
- data/lib/tehranjs/web/views/public/assets/css/application.css +0 -0
- data/lib/tehranjs/web/views/public/assets/css/normalize.css +461 -0
- data/lib/tehranjs/web/views/public/assets/img/logo.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/application.js +0 -0
- data/tehranjs.gemspec +1 -0
- metadata +25 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14b47b5b669b900ed3b7317f3bc4917a3badfa31
|
4
|
+
data.tar.gz: 68c6eb68ec03e9ea759e583482aff529ab3e47ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eba0ac10946a9d3865536ac717cc4efd810a01238cc140b99ba81c7be812f694ceca1152a520b4f1daad2e3a29cda5beddf1b3173f1c55f41560fa255fd8aba
|
7
|
+
data.tar.gz: a1ab5da44948b027bf52b0fa646ab0d24c35307c37e4b343f26c7d0c13e220a989a544a3c2def805c92a50bd0d581feba264dda78e5a8412317bc8563664599f
|
data/.gitignore
CHANGED
data/lib/tehranjs/cli/serve.rb
CHANGED
@@ -2,6 +2,7 @@ require "webrick"
|
|
2
2
|
require "tehranjs/web/controller"
|
3
3
|
require "tehranjs/web/servlet"
|
4
4
|
|
5
|
+
|
5
6
|
module Tehranjs
|
6
7
|
class CLI < Thor
|
7
8
|
class Serve < Thor::Group
|
@@ -21,6 +22,7 @@ module Tehranjs
|
|
21
22
|
|
22
23
|
server = WEBrick::HTTPServer.new(:Port => options[:port])
|
23
24
|
|
25
|
+
server.mount '/public', WEBrick::HTTPServlet::FileHandler,::File.join(::File.dirname(__FILE__),"..", 'web','views','public')
|
24
26
|
server.mount "/", Tehranjs::Web::Servlet
|
25
27
|
|
26
28
|
trap("INT") {
|
data/lib/tehranjs/identity.rb
CHANGED
@@ -1,14 +1,29 @@
|
|
1
1
|
require 'erb'
|
2
|
+
require_relative 'helper.rb'
|
3
|
+
require 'i18n'
|
4
|
+
|
5
|
+
I18n.load_path = Dir[::File.join(::File.dirname(__FILE__),"views", 'locals','*.yml')]
|
6
|
+
I18n.backend.load_translations
|
7
|
+
I18n.config.available_locales = :en
|
8
|
+
|
2
9
|
|
3
10
|
module Tehranjs
|
4
11
|
module Web
|
5
12
|
class Controller
|
6
|
-
|
13
|
+
|
7
14
|
def self.index
|
8
15
|
self.render 'index.html.erb'
|
9
16
|
end
|
10
|
-
|
17
|
+
def self.about
|
18
|
+
self.render 'about.html.erb'
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.new_article
|
22
|
+
self.render 'new_article.html.erb'
|
23
|
+
end
|
24
|
+
|
11
25
|
def self.render template
|
26
|
+
|
12
27
|
@layout = File.read(::File.join(::File.dirname(__FILE__),"views", '_layouts','application.html.erb'))
|
13
28
|
@template = File.read(::File.join(::File.dirname(__FILE__),"views", template))
|
14
29
|
templates = [@template, @layout]
|
@@ -0,0 +1,30 @@
|
|
1
|
+
def content_tag(element=:div,content=nil,single=false,attr={})
|
2
|
+
element = element.to_s.downcase
|
3
|
+
attrs= attr.map {|k, v| "#{k}='#{v}'" }.join(' ')
|
4
|
+
unless single
|
5
|
+
tag= "<#{element} #{attrs}>"
|
6
|
+
tag << content unless content.nil?
|
7
|
+
tag << "</#{element}>"
|
8
|
+
else
|
9
|
+
tag= "<#{element} #{attrs}/>"
|
10
|
+
end
|
11
|
+
return tag
|
12
|
+
end
|
13
|
+
|
14
|
+
def image_tag asset_path
|
15
|
+
return content_tag(:img,'',single=true,{src: "/public/assets/img/#{asset_path}",width: "65" })
|
16
|
+
end
|
17
|
+
|
18
|
+
def stylesheets_link_tag asset_path
|
19
|
+
return content_tag(:link,'',single=true,{href: "/public/assets/css/#{asset_path}" ,media: "all" ,rel: "stylesheet"})
|
20
|
+
end
|
21
|
+
|
22
|
+
def javascript_link_tag asset_path
|
23
|
+
return content_tag(:script,'',single=false,{src: "/public/assets/js/#{asset_path}"})
|
24
|
+
end
|
25
|
+
|
26
|
+
def partial template
|
27
|
+
template = ('_'+template.gsub('.html','')+'.html.erb')
|
28
|
+
template = File.read(::File.join(::File.dirname(__FILE__),"views","_partials", template))
|
29
|
+
return ERB.new(template).result( )
|
30
|
+
end
|
data/lib/tehranjs/web/servlet.rb
CHANGED
@@ -10,13 +10,15 @@ module Tehranjs
|
|
10
10
|
case request.path
|
11
11
|
when "/"
|
12
12
|
result = Tehranjs::Web::Controller.index
|
13
|
-
when "/
|
14
|
-
result =
|
13
|
+
when "/about"
|
14
|
+
result = Tehranjs::Web::Controller.about
|
15
|
+
when "/new_article"
|
16
|
+
result = Tehranjs::Web::Controller.new_article
|
15
17
|
else
|
16
18
|
result = "No such method"
|
17
19
|
end
|
18
20
|
|
19
|
-
response.body = result
|
21
|
+
response.body = result
|
20
22
|
|
21
23
|
end
|
22
24
|
end
|
@@ -1,11 +1,18 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>TehranJs | تهران جی
|
4
|
+
<title>TehranJs | <%= @title ||= ' تهران جی اس' %> </title>
|
5
|
+
<!-- Material Icons -->
|
6
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
7
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/css/materialize.min.css">
|
8
|
+
<%= stylesheets_link_tag 'application.css' %>
|
9
|
+
<meta charset="UTF-8">
|
5
10
|
</head>
|
6
11
|
<body>
|
7
|
-
|
12
|
+
<%= partial 'nav' %>
|
8
13
|
<%= yield %>
|
9
|
-
|
10
|
-
|
14
|
+
<script src="https://code.jquery.com/jquery-3.2.0.min.js" integrity="sha256-JAW99MJVpJBGcbzEuXk4Az05s/XyDdBomFqNlM3ic+I=" crossorigin="anonymous"></script>
|
15
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/js/materialize.min.js"></script>
|
16
|
+
<%= javascript_link_tag 'application.js' %>
|
17
|
+
</body>
|
11
18
|
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<nav class="light-blue lighten-1" role="navigation">
|
2
|
+
<div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo">
|
3
|
+
<%= image_tag "logo.png" %>
|
4
|
+
</a>
|
5
|
+
|
6
|
+
<ul class="right hide-on-med-and-down">
|
7
|
+
<% [[I18n.t('nav.IndexPage'),'/'],[I18n.t('nav.AboutPage'),'about'],[I18n.t('nav.NewArticlePage'),'/new_article']].each do |page| %>
|
8
|
+
<li><a href="<%= page[1] %>"><%= page[0] %></a></li>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<li><a href="#"><%= I18n.locale %></a></li>
|
12
|
+
|
13
|
+
|
14
|
+
</ul>
|
15
|
+
|
16
|
+
<ul id="nav-mobile" class="side-nav">
|
17
|
+
<li><a href="#">Navbar Link</a></li>
|
18
|
+
</ul>
|
19
|
+
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
|
20
|
+
</div>
|
21
|
+
</nav>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
<% @title=' تهران جی اس' %>
|
3
|
+
|
4
|
+
تِهران جِی اِس یه دورهمیه که از حدود یک سال پیش (اولین جلسهاش، ۱۱ اسفند ۹۴) تا حالا هر دو هفته یه بار توی شرکت رهنما برگزار شده و خواهد شد. توی این یک سال گذشته هم بیشتر دربارهی جاوااسکریپت صحبت کردیم. هر چند هدف اولیه برگزاری این نشستها بیشتر تبادل تجربیاتمون توی مدیریت، پیاده سازی و توسعهی نرم افزار و مفاهیم پایهی اون بوده که اگه ربطی هم به جاوااسکریپت داشتن چه بهتر.
|
5
|
+
|
6
|
+
تِهران جِی اِس یه دورهمیه که از حدود یک سال پیش (اولین جلسهاش، ۱۱ اسفند ۹۴) تا حالا هر دو هفته یه بار توی شرکت رهنما برگزار شده و خواهد شد. توی این یک سال گذشته هم بیشتر دربارهی جاوااسکریپت صحبت کردیم. هر چند هدف اولیه برگزاری این نشستها بیشتر تبادل تجربیاتمون توی مدیریت، پیاده سازی و توسعهی نرم افزار و مفاهیم پایهی اون بوده که اگه ربطی هم به جاوااسکریپت داشتن چه بهتر.
|
7
|
+
|
8
|
+
تِهران جِی اِس یه دورهمیه که از حدود یک سال پیش (اولین جلسهاش، ۱۱ اسفند ۹۴) تا حالا هر دو هفته یه بار توی شرکت رهنما برگزار شده و خواهد شد. توی این یک سال گذشته هم بیشتر دربارهی جاوااسکریپت صحبت کردیم. هر چند هدف اولیه برگزاری این نشستها بیشتر تبادل تجربیاتمون توی مدیریت، پیاده سازی و توسعهی نرم افزار و مفاهیم پایهی اون بوده که اگه ربطی هم به جاوااسکریپت داشتن چه بهتر.
|
9
|
+
|
10
|
+
تِهران جِی اِس یه دورهمیه که از حدود یک سال پیش (اولین جلسهاش، ۱۱ اسفند ۹۴) تا حالا هر دو هفته یه بار توی شرکت رهنما برگزار شده و خواهد شد. توی این یک سال گذشته هم بیشتر دربارهی جاوااسکریپت صحبت کردیم. هر چند هدف اولیه برگزاری این نشستها بیشتر تبادل تجربیاتمون توی مدیریت، پیاده سازی و توسعهی نرم افزار و مفاهیم پایهی اون بوده که اگه ربطی هم به جاوااسکریپت داشتن چه بهتر.
|
11
|
+
|
12
|
+
تِهران جِی اِس یه دورهمیه که از حدود یک سال پیش (اولین جلسهاش، ۱۱ اسفند ۹۴) تا حالا هر دو هفته یه بار توی شرکت رهنما برگزار شده و خواهد شد. توی این یک سال گذشته هم بیشتر دربارهی جاوااسکریپت صحبت کردیم. هر چند هدف اولیه برگزاری این نشستها بیشتر تبادل تجربیاتمون توی مدیریت، پیاده سازی و توسعهی نرم افزار و مفاهیم پایهی اون بوده که اگه ربطی هم به جاوااسکریپت داشتن چه بهتر.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Praesentium culpa odio iste atque illum facere laborum unde officiis eligendi. Dolore odit libero quae dicta architecto suscipit vitae nam numquam fugit!
|
@@ -1,4 +1,17 @@
|
|
1
|
-
<body>
|
2
|
-
<%= (3 * 2) %>
|
3
|
-
</body>
|
4
1
|
|
2
|
+
<% @title=' تهران جی اس' %>
|
3
|
+
|
4
|
+
<div class="section no-pad-bot" id="index-banner">
|
5
|
+
<div class="container">
|
6
|
+
<br><br>
|
7
|
+
<h1 class="header center orange-text"><%= I18n.t('site_name') %></h1>
|
8
|
+
<div class="row center">
|
9
|
+
<h5 class="header col s12 light">A modern responsive front-end framework based on Material Design</h5>
|
10
|
+
</div>
|
11
|
+
<div class="row center">
|
12
|
+
<a href="http://materializecss.com/getting-started.html" id="download-button" class="btn-large waves-effect waves-light orange">Get Started</a>
|
13
|
+
</div>
|
14
|
+
<br><br>
|
15
|
+
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
<% @title=' تهران جی اس' %>
|
3
|
+
|
4
|
+
|
5
|
+
<div class="row">
|
6
|
+
<div class="col s12 m11 offset-m2">
|
7
|
+
<div class="card-panel white container">
|
8
|
+
<span class="black-text">
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
<div class="row">
|
13
|
+
<form class="col s12">
|
14
|
+
<div class="row">
|
15
|
+
<div class="input-field col s6">
|
16
|
+
<input placeholder="Placeholder" id="first_name" type="text" class="validate">
|
17
|
+
<label for="first_name">First Name</label>
|
18
|
+
</div>
|
19
|
+
<div class="input-field col s6">
|
20
|
+
<input id="last_name" type="text" class="validate">
|
21
|
+
<label for="last_name">Last Name</label>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="row">
|
25
|
+
<div class="input-field col s12">
|
26
|
+
<input disabled value="I am not editable" id="disabled" type="text" class="validate">
|
27
|
+
<label for="disabled">Disabled</label>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<div class="row">
|
31
|
+
<div class="input-field col s12">
|
32
|
+
<input id="password" type="password" class="validate">
|
33
|
+
<label for="password">Password</label>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<div class="row">
|
37
|
+
<div class="input-field col s12">
|
38
|
+
<input id="email" type="email" class="validate">
|
39
|
+
<label for="email">Email</label>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
<div class="row">
|
43
|
+
<div class="col s12">
|
44
|
+
This is an inline input field:
|
45
|
+
<div class="input-field inline">
|
46
|
+
<input id="email" type="email" class="validate">
|
47
|
+
<label for="email" data-error="wrong" data-success="right">Email</label>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
</span>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
|
File without changes
|
@@ -0,0 +1,461 @@
|
|
1
|
+
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 1. Change the default font family in all browsers (opinionated).
|
5
|
+
* 2. Correct the line height in all browsers.
|
6
|
+
* 3. Prevent adjustments of font size after orientation changes in
|
7
|
+
* IE on Windows Phone and in iOS.
|
8
|
+
*/
|
9
|
+
|
10
|
+
/* Document
|
11
|
+
========================================================================== */
|
12
|
+
|
13
|
+
html {
|
14
|
+
font-family: sans-serif; /* 1 */
|
15
|
+
line-height: 1.15; /* 2 */
|
16
|
+
-ms-text-size-adjust: 100%; /* 3 */
|
17
|
+
-webkit-text-size-adjust: 100%; /* 3 */
|
18
|
+
}
|
19
|
+
|
20
|
+
/* Sections
|
21
|
+
========================================================================== */
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Remove the margin in all browsers (opinionated).
|
25
|
+
*/
|
26
|
+
|
27
|
+
body {
|
28
|
+
margin: 0;
|
29
|
+
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Add the correct display in IE 9-.
|
33
|
+
*/
|
34
|
+
|
35
|
+
article,
|
36
|
+
aside,
|
37
|
+
footer,
|
38
|
+
header,
|
39
|
+
nav,
|
40
|
+
section {
|
41
|
+
display: block;
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Correct the font size and margin on `h1` elements within `section` and
|
46
|
+
* `article` contexts in Chrome, Firefox, and Safari.
|
47
|
+
*/
|
48
|
+
|
49
|
+
h1 {
|
50
|
+
font-size: 2em;
|
51
|
+
margin: 0.67em 0;
|
52
|
+
}
|
53
|
+
|
54
|
+
/* Grouping content
|
55
|
+
========================================================================== */
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Add the correct display in IE 9-.
|
59
|
+
* 1. Add the correct display in IE.
|
60
|
+
*/
|
61
|
+
|
62
|
+
figcaption,
|
63
|
+
figure,
|
64
|
+
main { /* 1 */
|
65
|
+
display: block;
|
66
|
+
}
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Add the correct margin in IE 8.
|
70
|
+
*/
|
71
|
+
|
72
|
+
figure {
|
73
|
+
margin: 1em 40px;
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* 1. Add the correct box sizing in Firefox.
|
78
|
+
* 2. Show the overflow in Edge and IE.
|
79
|
+
*/
|
80
|
+
|
81
|
+
hr {
|
82
|
+
box-sizing: content-box; /* 1 */
|
83
|
+
height: 0; /* 1 */
|
84
|
+
overflow: visible; /* 2 */
|
85
|
+
}
|
86
|
+
|
87
|
+
/**
|
88
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
89
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
90
|
+
*/
|
91
|
+
|
92
|
+
pre {
|
93
|
+
font-family: monospace, monospace; /* 1 */
|
94
|
+
font-size: 1em; /* 2 */
|
95
|
+
}
|
96
|
+
|
97
|
+
/* Text-level semantics
|
98
|
+
========================================================================== */
|
99
|
+
|
100
|
+
/**
|
101
|
+
* 1. Remove the gray background on active links in IE 10.
|
102
|
+
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
103
|
+
*/
|
104
|
+
|
105
|
+
a {
|
106
|
+
background-color: transparent; /* 1 */
|
107
|
+
-webkit-text-decoration-skip: objects; /* 2 */
|
108
|
+
}
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Remove the outline on focused links when they are also active or hovered
|
112
|
+
* in all browsers (opinionated).
|
113
|
+
*/
|
114
|
+
|
115
|
+
a:active,
|
116
|
+
a:hover {
|
117
|
+
outline-width: 0;
|
118
|
+
}
|
119
|
+
|
120
|
+
/**
|
121
|
+
* 1. Remove the bottom border in Firefox 39-.
|
122
|
+
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
123
|
+
*/
|
124
|
+
|
125
|
+
abbr[title] {
|
126
|
+
border-bottom: none; /* 1 */
|
127
|
+
text-decoration: underline; /* 2 */
|
128
|
+
text-decoration: underline dotted; /* 2 */
|
129
|
+
}
|
130
|
+
|
131
|
+
/**
|
132
|
+
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
133
|
+
*/
|
134
|
+
|
135
|
+
b,
|
136
|
+
strong {
|
137
|
+
font-weight: inherit;
|
138
|
+
}
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Add the correct font weight in Chrome, Edge, and Safari.
|
142
|
+
*/
|
143
|
+
|
144
|
+
b,
|
145
|
+
strong {
|
146
|
+
font-weight: bolder;
|
147
|
+
}
|
148
|
+
|
149
|
+
/**
|
150
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
151
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
152
|
+
*/
|
153
|
+
|
154
|
+
code,
|
155
|
+
kbd,
|
156
|
+
samp {
|
157
|
+
font-family: monospace, monospace; /* 1 */
|
158
|
+
font-size: 1em; /* 2 */
|
159
|
+
}
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Add the correct font style in Android 4.3-.
|
163
|
+
*/
|
164
|
+
|
165
|
+
dfn {
|
166
|
+
font-style: italic;
|
167
|
+
}
|
168
|
+
|
169
|
+
/**
|
170
|
+
* Add the correct background and color in IE 9-.
|
171
|
+
*/
|
172
|
+
|
173
|
+
mark {
|
174
|
+
background-color: #ff0;
|
175
|
+
color: #000;
|
176
|
+
}
|
177
|
+
|
178
|
+
/**
|
179
|
+
* Add the correct font size in all browsers.
|
180
|
+
*/
|
181
|
+
|
182
|
+
small {
|
183
|
+
font-size: 80%;
|
184
|
+
}
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Prevent `sub` and `sup` elements from affecting the line height in
|
188
|
+
* all browsers.
|
189
|
+
*/
|
190
|
+
|
191
|
+
sub,
|
192
|
+
sup {
|
193
|
+
font-size: 75%;
|
194
|
+
line-height: 0;
|
195
|
+
position: relative;
|
196
|
+
vertical-align: baseline;
|
197
|
+
}
|
198
|
+
|
199
|
+
sub {
|
200
|
+
bottom: -0.25em;
|
201
|
+
}
|
202
|
+
|
203
|
+
sup {
|
204
|
+
top: -0.5em;
|
205
|
+
}
|
206
|
+
|
207
|
+
/* Embedded content
|
208
|
+
========================================================================== */
|
209
|
+
|
210
|
+
/**
|
211
|
+
* Add the correct display in IE 9-.
|
212
|
+
*/
|
213
|
+
|
214
|
+
audio,
|
215
|
+
video {
|
216
|
+
display: inline-block;
|
217
|
+
}
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Add the correct display in iOS 4-7.
|
221
|
+
*/
|
222
|
+
|
223
|
+
audio:not([controls]) {
|
224
|
+
display: none;
|
225
|
+
height: 0;
|
226
|
+
}
|
227
|
+
|
228
|
+
/**
|
229
|
+
* Remove the border on images inside links in IE 10-.
|
230
|
+
*/
|
231
|
+
|
232
|
+
img {
|
233
|
+
border-style: none;
|
234
|
+
}
|
235
|
+
|
236
|
+
/**
|
237
|
+
* Hide the overflow in IE.
|
238
|
+
*/
|
239
|
+
|
240
|
+
svg:not(:root) {
|
241
|
+
overflow: hidden;
|
242
|
+
}
|
243
|
+
|
244
|
+
/* Forms
|
245
|
+
========================================================================== */
|
246
|
+
|
247
|
+
/**
|
248
|
+
* 1. Change the font styles in all browsers (opinionated).
|
249
|
+
* 2. Remove the margin in Firefox and Safari.
|
250
|
+
*/
|
251
|
+
|
252
|
+
button,
|
253
|
+
input,
|
254
|
+
optgroup,
|
255
|
+
select,
|
256
|
+
textarea {
|
257
|
+
font-family: sans-serif; /* 1 */
|
258
|
+
font-size: 100%; /* 1 */
|
259
|
+
line-height: 1.15; /* 1 */
|
260
|
+
margin: 0; /* 2 */
|
261
|
+
}
|
262
|
+
|
263
|
+
/**
|
264
|
+
* Show the overflow in IE.
|
265
|
+
* 1. Show the overflow in Edge.
|
266
|
+
*/
|
267
|
+
|
268
|
+
button,
|
269
|
+
input { /* 1 */
|
270
|
+
overflow: visible;
|
271
|
+
}
|
272
|
+
|
273
|
+
/**
|
274
|
+
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
275
|
+
* 1. Remove the inheritance of text transform in Firefox.
|
276
|
+
*/
|
277
|
+
|
278
|
+
button,
|
279
|
+
select { /* 1 */
|
280
|
+
text-transform: none;
|
281
|
+
}
|
282
|
+
|
283
|
+
/**
|
284
|
+
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
285
|
+
* controls in Android 4.
|
286
|
+
* 2. Correct the inability to style clickable types in iOS and Safari.
|
287
|
+
*/
|
288
|
+
|
289
|
+
button,
|
290
|
+
html [type="button"], /* 1 */
|
291
|
+
[type="reset"],
|
292
|
+
[type="submit"] {
|
293
|
+
-webkit-appearance: button; /* 2 */
|
294
|
+
}
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Remove the inner border and padding in Firefox.
|
298
|
+
*/
|
299
|
+
|
300
|
+
button::-moz-focus-inner,
|
301
|
+
[type="button"]::-moz-focus-inner,
|
302
|
+
[type="reset"]::-moz-focus-inner,
|
303
|
+
[type="submit"]::-moz-focus-inner {
|
304
|
+
border-style: none;
|
305
|
+
padding: 0;
|
306
|
+
}
|
307
|
+
|
308
|
+
/**
|
309
|
+
* Restore the focus styles unset by the previous rule.
|
310
|
+
*/
|
311
|
+
|
312
|
+
button:-moz-focusring,
|
313
|
+
[type="button"]:-moz-focusring,
|
314
|
+
[type="reset"]:-moz-focusring,
|
315
|
+
[type="submit"]:-moz-focusring {
|
316
|
+
outline: 1px dotted ButtonText;
|
317
|
+
}
|
318
|
+
|
319
|
+
/**
|
320
|
+
* Change the border, margin, and padding in all browsers (opinionated).
|
321
|
+
*/
|
322
|
+
|
323
|
+
fieldset {
|
324
|
+
border: 1px solid #c0c0c0;
|
325
|
+
margin: 0 2px;
|
326
|
+
padding: 0.35em 0.625em 0.75em;
|
327
|
+
}
|
328
|
+
|
329
|
+
/**
|
330
|
+
* 1. Correct the text wrapping in Edge and IE.
|
331
|
+
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
332
|
+
* 3. Remove the padding so developers are not caught out when they zero out
|
333
|
+
* `fieldset` elements in all browsers.
|
334
|
+
*/
|
335
|
+
|
336
|
+
legend {
|
337
|
+
box-sizing: border-box; /* 1 */
|
338
|
+
color: inherit; /* 2 */
|
339
|
+
display: table; /* 1 */
|
340
|
+
max-width: 100%; /* 1 */
|
341
|
+
padding: 0; /* 3 */
|
342
|
+
white-space: normal; /* 1 */
|
343
|
+
}
|
344
|
+
|
345
|
+
/**
|
346
|
+
* 1. Add the correct display in IE 9-.
|
347
|
+
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
348
|
+
*/
|
349
|
+
|
350
|
+
progress {
|
351
|
+
display: inline-block; /* 1 */
|
352
|
+
vertical-align: baseline; /* 2 */
|
353
|
+
}
|
354
|
+
|
355
|
+
/**
|
356
|
+
* Remove the default vertical scrollbar in IE.
|
357
|
+
*/
|
358
|
+
|
359
|
+
textarea {
|
360
|
+
overflow: auto;
|
361
|
+
}
|
362
|
+
|
363
|
+
/**
|
364
|
+
* 1. Add the correct box sizing in IE 10-.
|
365
|
+
* 2. Remove the padding in IE 10-.
|
366
|
+
*/
|
367
|
+
|
368
|
+
[type="checkbox"],
|
369
|
+
[type="radio"] {
|
370
|
+
box-sizing: border-box; /* 1 */
|
371
|
+
padding: 0; /* 2 */
|
372
|
+
}
|
373
|
+
|
374
|
+
/**
|
375
|
+
* Correct the cursor style of increment and decrement buttons in Chrome.
|
376
|
+
*/
|
377
|
+
|
378
|
+
[type="number"]::-webkit-inner-spin-button,
|
379
|
+
[type="number"]::-webkit-outer-spin-button {
|
380
|
+
height: auto;
|
381
|
+
}
|
382
|
+
|
383
|
+
/**
|
384
|
+
* 1. Correct the odd appearance in Chrome and Safari.
|
385
|
+
* 2. Correct the outline style in Safari.
|
386
|
+
*/
|
387
|
+
|
388
|
+
[type="search"] {
|
389
|
+
-webkit-appearance: textfield; /* 1 */
|
390
|
+
outline-offset: -2px; /* 2 */
|
391
|
+
}
|
392
|
+
|
393
|
+
/**
|
394
|
+
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
395
|
+
*/
|
396
|
+
|
397
|
+
[type="search"]::-webkit-search-cancel-button,
|
398
|
+
[type="search"]::-webkit-search-decoration {
|
399
|
+
-webkit-appearance: none;
|
400
|
+
}
|
401
|
+
|
402
|
+
/**
|
403
|
+
* 1. Correct the inability to style clickable types in iOS and Safari.
|
404
|
+
* 2. Change font properties to `inherit` in Safari.
|
405
|
+
*/
|
406
|
+
|
407
|
+
::-webkit-file-upload-button {
|
408
|
+
-webkit-appearance: button; /* 1 */
|
409
|
+
font: inherit; /* 2 */
|
410
|
+
}
|
411
|
+
|
412
|
+
/* Interactive
|
413
|
+
========================================================================== */
|
414
|
+
|
415
|
+
/*
|
416
|
+
* Add the correct display in IE 9-.
|
417
|
+
* 1. Add the correct display in Edge, IE, and Firefox.
|
418
|
+
*/
|
419
|
+
|
420
|
+
details, /* 1 */
|
421
|
+
menu {
|
422
|
+
display: block;
|
423
|
+
}
|
424
|
+
|
425
|
+
/*
|
426
|
+
* Add the correct display in all browsers.
|
427
|
+
*/
|
428
|
+
|
429
|
+
summary {
|
430
|
+
display: list-item;
|
431
|
+
}
|
432
|
+
|
433
|
+
/* Scripting
|
434
|
+
========================================================================== */
|
435
|
+
|
436
|
+
/**
|
437
|
+
* Add the correct display in IE 9-.
|
438
|
+
*/
|
439
|
+
|
440
|
+
canvas {
|
441
|
+
display: inline-block;
|
442
|
+
}
|
443
|
+
|
444
|
+
/**
|
445
|
+
* Add the correct display in IE.
|
446
|
+
*/
|
447
|
+
|
448
|
+
template {
|
449
|
+
display: none;
|
450
|
+
}
|
451
|
+
|
452
|
+
/* Hidden
|
453
|
+
========================================================================== */
|
454
|
+
|
455
|
+
/**
|
456
|
+
* Add the correct display in IE 10-.
|
457
|
+
*/
|
458
|
+
|
459
|
+
[hidden] {
|
460
|
+
display: none;
|
461
|
+
}
|
Binary file
|
File without changes
|
data/tehranjs.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = "~> 2.0"
|
26
26
|
spec.add_dependency "thor", "~> 0.19"
|
27
27
|
spec.add_dependency "thor_plus", "~> 5.0"
|
28
|
+
spec.add_dependency "i18n"
|
28
29
|
|
29
30
|
spec.add_development_dependency "bundler", "~> 1.14"
|
30
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tehranjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mohammad mahmoudi
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '5.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: i18n
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -105,9 +119,19 @@ files:
|
|
105
119
|
- lib/tehranjs/cli/serve.rb
|
106
120
|
- lib/tehranjs/identity.rb
|
107
121
|
- lib/tehranjs/web/controller.rb
|
122
|
+
- lib/tehranjs/web/helper.rb
|
108
123
|
- lib/tehranjs/web/servlet.rb
|
109
124
|
- lib/tehranjs/web/views/_layouts/application.html.erb
|
125
|
+
- lib/tehranjs/web/views/_partials/_nav.html.erb
|
126
|
+
- lib/tehranjs/web/views/about.html.erb
|
110
127
|
- lib/tehranjs/web/views/index.html.erb
|
128
|
+
- lib/tehranjs/web/views/locals/en.yml
|
129
|
+
- lib/tehranjs/web/views/locals/fa.yml
|
130
|
+
- lib/tehranjs/web/views/new_article.html.erb
|
131
|
+
- lib/tehranjs/web/views/public/assets/css/application.css
|
132
|
+
- lib/tehranjs/web/views/public/assets/css/normalize.css
|
133
|
+
- lib/tehranjs/web/views/public/assets/img/logo.png
|
134
|
+
- lib/tehranjs/web/views/public/assets/js/application.js
|
111
135
|
- tehranjs.gemspec
|
112
136
|
homepage: https://github.com/mm580486/tehranjs-cli
|
113
137
|
licenses:
|