add 3rd party assets into assets pipeline.

This commit is contained in:
2015-11-20 23:18:23 +08:00
parent 3216fd0363
commit d57d2fb148
9 changed files with 115 additions and 7 deletions
+2
View File
@@ -75,6 +75,8 @@ gem 'newrelic_rpm'
#group data by day, week, month
gem 'groupdate'
gem 'font-awesome-rails', '~> 4.4'
group :development do
gem 'capistrano'
gem 'capistrano-rails'
+3
View File
@@ -145,6 +145,8 @@ GEM
faraday (>= 0.7.4, < 0.10)
fastimage (1.7.0)
addressable (~> 2.3, >= 2.3.5)
font-awesome-rails (4.4.0.0)
railties (>= 3.2, < 5.0)
formtastic (3.1.3)
actionpack (>= 3.2.13)
formtastic_i18n (0.4.1)
@@ -412,6 +414,7 @@ DEPENDENCIES
coffee-rails (~> 4.1.0)
devise
devise-bootstrap-views
font-awesome-rails (~> 4.4)
groupdate
houston
htmlentities
+1 -1
View File
@@ -20,7 +20,7 @@ body {
}
@import "font-awesome";
@import "bootstrap-sprockets";
@import "bootstrap";
@import "devise_bootstrap_views";
@@ -2,6 +2,7 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
@import "font-awesome";
@import "bootstrap-sprockets";
@import "bootstrap";
@import "variables";
@@ -517,4 +518,4 @@ body {
}
}
}
}
-1
View File
@@ -10,7 +10,6 @@
<title>Libr - IT领域知识宝库与社交平台</title>
<%= csrf_meta_tags %>
<link href="https://cdn.jsdelivr.net/fontawesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
+4 -4
View File
@@ -12,10 +12,10 @@
<title><%= @post.try(:title) || '文章详情' %> - LibrX</title>
<!-- Custom CSS -->
<%= stylesheet_link_tag 'published_posts/published_post', 'data-turbolinks-track' => true %>
<%= stylesheet_link_tag "github" %>
<!-- Custom Fonts -->
<link href="https://cdn.jsdelivr.net/fontawesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/8.8.0/styles/solarized_light.min.css">
<%= stylesheet_link_tag "font-awesome" %>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -115,7 +115,7 @@
</div>
</div>
</footer>
<script src="//cdn.jsdelivr.net/highlight.js/8.8.0/highlight.min.js"></script>
<%= javascript_include_tag "highlight.min" %>
<%= javascript_include_tag "published_posts/post", 'data-turbolinks-track' => true %>
</body>
+3
View File
@@ -13,3 +13,6 @@ Rails.application.config.assets.version = '1.0'
Rails.application.config.assets.precompile += %w( published_posts/published_post.css )
Rails.application.config.assets.precompile += %w( published_posts/post.js )
Rails.application.config.assets.precompile += %w(github.css highlight.min.js)
File diff suppressed because one or more lines are too long
+98
View File
@@ -0,0 +1,98 @@
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}