forked from saurabh/orbit4-5
Merge branch 'master' of gitlab.tp.rulingcom.com:saurabh/orbit4-5 into nccu
Conflicts: lib/orbit_model/impression.rb
This commit is contained in:
commit
3362601b1f
11
Gemfile
11
Gemfile
|
@ -87,8 +87,11 @@ end
|
|||
#ask
|
||||
gem 'gotcha'
|
||||
|
||||
#desktop
|
||||
gem 'angularjs-rails', '~> 1.2.20'
|
||||
gem 'angular-ui-bootstrap-rails', '~> 0.11.0'
|
||||
gem 'jquery_mousewheel_rails', '~> 3.1.11.3'
|
||||
#caching observers
|
||||
gem 'mongoid-observers'
|
||||
|
||||
#desktop
|
||||
# gem 'angularjs-rails', '~> 1.2.20'
|
||||
# gem 'angular-ui-bootstrap-rails', '~> 0.11.0'
|
||||
# gem 'jquery_mousewheel_rails', '~> 3.1.11.3'
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 110 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB |
|
@ -0,0 +1,249 @@
|
|||
@charset "utf-8";
|
||||
body {
|
||||
background: #f3f3f3;
|
||||
}
|
||||
|
||||
#main-wrap {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.group-page {}
|
||||
|
||||
.group-page-banner-image-wrap {
|
||||
position: relative;
|
||||
max-height: 280px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.group-page-view-switch {
|
||||
position: absolute;
|
||||
right: 2rem;
|
||||
top: 2rem;
|
||||
}
|
||||
|
||||
.group-page-banner-image {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.group-page-bar {
|
||||
overflow: hidden;
|
||||
background: #171717;
|
||||
padding: 20px 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.group-page-title {
|
||||
padding: 6px 0;
|
||||
color: #fff;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.group-page-setion {
|
||||
padding: 30px 2rem;
|
||||
overflow: hidden;
|
||||
max-width: 1350px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.gorup-page-info-wrap {
|
||||
display: block;
|
||||
font-size: .9rem;
|
||||
float: right;
|
||||
padding: 5px .5rem;
|
||||
border: 2px solid #cdcdcd;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.group-page-description-wrap {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.gorup-page-info-wrap {
|
||||
text-align: right;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.group-page-status-wrap {
|
||||
float: right;
|
||||
font-size: 0.75rem;
|
||||
color: #fff;
|
||||
background: #1d9e20;
|
||||
padding: 2px .4rem;
|
||||
border-radius: .2rem;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.group-page-status-wrap.close-eye{
|
||||
background: #c71932;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.group-page-description-wrap {
|
||||
padding: 16px 1.2rem 16px;
|
||||
margin-bottom: 15px;
|
||||
box-shadow: inset 0 0 8px #aaa;
|
||||
border-radius: .2rem;
|
||||
}
|
||||
|
||||
.group-page-description {
|
||||
clear: both;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.group-page-post {
|
||||
clear: both;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
margin-bottom: 40px;
|
||||
background: #fff;
|
||||
padding: 28px 1.5rem;
|
||||
border-radius: .2rem;
|
||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
.group-page-post-link{
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.group-page-post:hover {
|
||||
box-shadow: 0 1px 25px 0 rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
.group-page-post-link:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.group-page-post-image-wrap {
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.group-page-post-image {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
margin-top: 12px;
|
||||
/*border-radius: 50%;*/
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.group-page-post-content {
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
.group-page-post-title {
|
||||
font-weight: normal;
|
||||
font-size: 1.5rem;
|
||||
line-height: 1;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.group-page-post-meta-wrap {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.group-page-post-author,
|
||||
.group-page-post-postdate {
|
||||
margin-right: .5rem;
|
||||
}
|
||||
/* scroll view */
|
||||
.group-page.scroll {
|
||||
padding-top: 7rem;
|
||||
}
|
||||
.group-page.scroll .group-page-banner-image-wrap {
|
||||
height: 70px;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.group-page.scroll .group-page-title {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.group-page.scroll .group-page-title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.group-page.scroll .group-page-new-post {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.group-page.scroll .group-page-new-post {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.group-page.scroll .group-page-view-switch {
|
||||
position: static;
|
||||
display: inline-block;
|
||||
margin: 6px .5rem 0 0;
|
||||
}
|
||||
|
||||
.group-page.scroll .btn {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
.group-page li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.group-page .group-page-feed-view .active {
|
||||
color: #fff;
|
||||
}
|
||||
/* 600px */
|
||||
|
||||
@media screen and (min-width: 37.5rem) {
|
||||
.group-page-post {
|
||||
text-align: left;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.group-page-post-image-wrap {
|
||||
float: left;
|
||||
width: 12%;
|
||||
margin-right: 4%;
|
||||
min-width: 100px;
|
||||
}
|
||||
.group-page-post-content-wrap {
|
||||
float: left;
|
||||
width: 72%;
|
||||
}
|
||||
.group-page.scroll .group-page-view-switch {
|
||||
margin: 6px .5rem 0 0;
|
||||
}
|
||||
.group-page.scroll .group-page-bar {
|
||||
padding: 0 5rem 0 2rem;
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
/* 760px */
|
||||
|
||||
@media screen and (min-width: 47.5rem) {
|
||||
.group-page-post-content-wrap {
|
||||
width: 80%;
|
||||
}
|
||||
.group-page-bar {
|
||||
text-align: left;
|
||||
}
|
||||
.group-page-title {
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.group-page-new-post {
|
||||
float: right;
|
||||
}
|
||||
.group-page-view-switch {
|
||||
float: right;
|
||||
}
|
||||
}
|
|
@ -1,9 +1,93 @@
|
|||
class Admin::GroupsController < OrbitMemberController
|
||||
|
||||
def index
|
||||
@groups = current_user.groups
|
||||
end
|
||||
|
||||
def public_groups
|
||||
@groups = Group.open
|
||||
end
|
||||
|
||||
def categories
|
||||
@categories = GroupCategory.all
|
||||
end
|
||||
|
||||
def newpost
|
||||
@no_breadcrumb = true
|
||||
uid = params[:group_id].split("-").last
|
||||
@group = Group.find_by(:uid => uid)
|
||||
@grouppost = GroupPost.new
|
||||
end
|
||||
|
||||
def createpost
|
||||
uid = params[:group_id].split("-").last
|
||||
group = Group.find_by(:uid => uid)
|
||||
gp = GroupPost.new(post_params)
|
||||
gp.group = group
|
||||
gp.save
|
||||
redirect_to admin_group_path(group)
|
||||
end
|
||||
|
||||
def showpost
|
||||
|
||||
end
|
||||
|
||||
def show
|
||||
@no_breadcrumb = true
|
||||
@no_filter = true
|
||||
uid = params[:id].split("-").last
|
||||
@group = Group.find_by(:uid => uid)
|
||||
end
|
||||
|
||||
def create_category
|
||||
gc = GroupCategory.new(category_params)
|
||||
gc.save
|
||||
@categories = GroupCategory.all
|
||||
render :partial => "group_categories"
|
||||
end
|
||||
|
||||
def create
|
||||
group = Group.new(group_params)
|
||||
group.save
|
||||
redirect_to admin_groups_path
|
||||
end
|
||||
|
||||
def new
|
||||
@group = Group.new
|
||||
@categories = GroupCategory.all.collect{|gc| [gc.title,gc.id]}
|
||||
@members = []
|
||||
MemberProfile.all.each do |mp|
|
||||
user = mp.user rescue nil
|
||||
if !user.nil? && user.id.to_s != current_user.id.to_s && user.user_name != "rulingcom"
|
||||
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
|
||||
@members << {
|
||||
"id" => user.id.to_s,
|
||||
"user_name" => (user.user_name rescue ""),
|
||||
"avatar" => avatar,
|
||||
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""})
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def category_params
|
||||
params.require(:category).permit!
|
||||
end
|
||||
|
||||
def post_params
|
||||
p = params.require(:group_post).permit!
|
||||
p["author"] = current_user.id
|
||||
p
|
||||
end
|
||||
|
||||
def group_params
|
||||
p = params.require(:group).permit!
|
||||
p["user_ids"] << current_user.id.to_s
|
||||
p["admins"] = []
|
||||
p["admins"] << current_user.id.to_s
|
||||
p
|
||||
end
|
||||
|
||||
end
|
|
@ -27,7 +27,10 @@ class PagesController < ApplicationController
|
|||
def home
|
||||
@manifest = @key
|
||||
page = Page.first
|
||||
impressionist(page)
|
||||
Thread.new do
|
||||
impressionist(page)
|
||||
page.inc(view_count: 1)
|
||||
end
|
||||
OrbitHelper.set_params params,current_user
|
||||
OrbitHelper.set_site_locale locale
|
||||
render :html => render_final_page("home",page,true).html_safe
|
||||
|
@ -110,7 +113,10 @@ class PagesController < ApplicationController
|
|||
layout = true
|
||||
end
|
||||
|
||||
impressionist(page)
|
||||
Thread.new do
|
||||
impressionist(page)
|
||||
page.inc(view_count: 1)
|
||||
end
|
||||
render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe
|
||||
else
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
|
||||
|
@ -301,11 +307,11 @@ class PagesController < ApplicationController
|
|||
|
||||
def render_final_page(original_view=get_view,page,layout)
|
||||
final_html_for_render = ""
|
||||
|
||||
if layout
|
||||
parts = $mobile.blank? ? (page.page_parts rescue []) : (page.mobile_page_parts rescue [])
|
||||
|
||||
@part_partials = {}
|
||||
|
||||
parts.each do |part|
|
||||
subparts = part.sub_parts.asc(:created_at)
|
||||
partials = []
|
||||
|
@ -326,7 +332,10 @@ class PagesController < ApplicationController
|
|||
if @editmode
|
||||
partials << "<div class='editmode-ps' title='#{subpart.module}'> " + render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s) + "<a href='/page_parts/edit_sub_part?page_id=#{page.id.to_s}&part_id=#{part.id.to_s}&sub_part_id=#{subpart.id.to_s}#{(!$mobile.blank? ? '&mobile_view=1' : '')}'> </a></div>"
|
||||
else
|
||||
partials << render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s)
|
||||
widget_html = Rails.cache.fetch("subpart_#{subpart.module}_#{subpart.id.to_s}_"+I18n.locale.to_s,{ race_condition_ttl: 2, expires_in: 5.minutes}) do
|
||||
render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s)
|
||||
end
|
||||
partials << widget_html
|
||||
end
|
||||
elsif subpart.kind == "text"
|
||||
if @editmode
|
||||
|
|
|
@ -76,94 +76,98 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def render_menu
|
||||
# json_file = File.read(File.join(Rails.root, 'public', "menu.json"))
|
||||
# @items = JSON.parse(json_file)
|
||||
if $mobile.blank?
|
||||
@pages = Page.root.sorted_published_child_pages
|
||||
else
|
||||
@pages = Page.root.sorted_published_child_pages_for_mobile
|
||||
end
|
||||
menu_html = Rails.cache.fetch(['main_menu',request.original_fullpath, I18n.locale], race_condition_ttl: 2.seconds) do
|
||||
# json_file = File.read(File.join(Rails.root, 'public', "menu.json"))
|
||||
# @items = JSON.parse(json_file)
|
||||
if $mobile.blank?
|
||||
@pages = Page.root.sorted_published_child_pages
|
||||
else
|
||||
@pages = Page.root.sorted_published_child_pages_for_mobile
|
||||
end
|
||||
|
||||
def create_json(pages)
|
||||
item = {}
|
||||
pages.each do |page|
|
||||
if page.child_page.size > 0
|
||||
if page.page_type == "page"
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages), "target" => "_self"}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => "_self"}
|
||||
def create_json(pages)
|
||||
item = {}
|
||||
pages.each do |page|
|
||||
if page.child_page.size > 0
|
||||
if page.page_type == "page"
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages), "target" => "_self"}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => "_self"}
|
||||
end
|
||||
elsif page.page_type == "link"
|
||||
target = get_target(page.external_url)
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages), "target" => target}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => target}
|
||||
end
|
||||
end
|
||||
elsif page.page_type == "link"
|
||||
target = get_target(page.external_url)
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages), "target" => target}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => target}
|
||||
else
|
||||
if page.page_type == "page"
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "target" => "_self"}
|
||||
elsif page.page_type == "link"
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "target" => get_target(page.external_url)}
|
||||
end
|
||||
end
|
||||
else
|
||||
if page.page_type == "page"
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "target" => "_self"}
|
||||
elsif page.page_type == "link"
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "target" => get_target(page.external_url)}
|
||||
end
|
||||
item
|
||||
end
|
||||
@items = create_json(@pages)
|
||||
menu_file = File.open(File.join(Rails.root, 'app', 'templates', "#{@key}", "/home/menu.html.erb"))
|
||||
doc = Nokogiri::HTML(menu_file, nil, "UTF-8")
|
||||
menu_file.close
|
||||
|
||||
temp = []
|
||||
@menus = []
|
||||
@menus_items = []
|
||||
|
||||
temp << doc.css("*[data-menu-level='0']")
|
||||
temp << doc.css("*[data-menu-level='1']")
|
||||
temp << doc.css("*[data-menu-level='2']")
|
||||
|
||||
|
||||
temp[0] = temp[0].to_s.gsub(temp[1].to_s,"{{level}}")
|
||||
temp[1] = temp[1].to_s.gsub(temp[2].to_s,"{{level}}")
|
||||
temp[2] = temp[2].to_s
|
||||
|
||||
|
||||
temp.each_with_index do |menu,i|
|
||||
t = Nokogiri::HTML(menu, nil, "UTF-8")
|
||||
a = t.css("*[data-menu-link='true']")
|
||||
a[0]["href"] = "href_here"
|
||||
a[0]["target"] = "target_here"
|
||||
li = t.css("*[data-menu-level='#{i}'] > *")
|
||||
@menus_items << li.to_html
|
||||
ul = t.css("*[data-menu-level='#{i}']")
|
||||
ul[0].inner_html = "{{here}}"
|
||||
@menus << ul[0].to_html
|
||||
end
|
||||
|
||||
def create_menu(items,level)
|
||||
html = ""
|
||||
items.each do |key,item|
|
||||
li = @menus_items[level].gsub("href_here",(item["url"] || ""))
|
||||
li = li.gsub("{{link_name}}",(key || ""))
|
||||
li = li.gsub("target_here",(item["target"] || ""))
|
||||
li = request.original_fullpath == item['url'] ? li.gsub("{{active}}","active") : li.gsub("{{active}}","")
|
||||
|
||||
if item["children"] && !item["children"].empty?
|
||||
li = li.gsub("{{level}}",create_menu(item["children"],level + 1))
|
||||
else
|
||||
li = li.gsub("{{level}}","")
|
||||
end
|
||||
html = html + li
|
||||
end
|
||||
html = @menus[level].gsub("{{here}}",html)
|
||||
html = html.gsub("{{class_level}}",level.to_s)
|
||||
html
|
||||
end
|
||||
item
|
||||
end
|
||||
@items = create_json(@pages)
|
||||
menu_file = File.open(File.join(Rails.root, 'app', 'templates', "#{@key}", "/home/menu.html.erb"))
|
||||
doc = Nokogiri::HTML(menu_file, nil, "UTF-8")
|
||||
menu_file.close
|
||||
|
||||
temp = []
|
||||
@menus = []
|
||||
@menus_items = []
|
||||
|
||||
temp << doc.css("*[data-menu-level='0']")
|
||||
temp << doc.css("*[data-menu-level='1']")
|
||||
temp << doc.css("*[data-menu-level='2']")
|
||||
|
||||
|
||||
temp[0] = temp[0].to_s.gsub(temp[1].to_s,"{{level}}")
|
||||
temp[1] = temp[1].to_s.gsub(temp[2].to_s,"{{level}}")
|
||||
temp[2] = temp[2].to_s
|
||||
|
||||
|
||||
temp.each_with_index do |menu,i|
|
||||
t = Nokogiri::HTML(menu, nil, "UTF-8")
|
||||
a = t.css("*[data-menu-link='true']")
|
||||
a[0]["href"] = "href_here"
|
||||
a[0]["target"] = "target_here"
|
||||
li = t.css("*[data-menu-level='#{i}'] > *")
|
||||
@menus_items << li.to_html
|
||||
ul = t.css("*[data-menu-level='#{i}']")
|
||||
ul[0].inner_html = "{{here}}"
|
||||
@menus << ul[0].to_html
|
||||
h = create_menu(@items,0)
|
||||
h.html_safe
|
||||
end
|
||||
|
||||
def create_menu(items,level)
|
||||
html = ""
|
||||
items.each do |key,item|
|
||||
li = @menus_items[level].gsub("href_here",(item["url"] || ""))
|
||||
li = li.gsub("{{link_name}}",(key || ""))
|
||||
li = li.gsub("target_here",(item["target"] || ""))
|
||||
li = request.original_fullpath == item['url'] ? li.gsub("{{active}}","active") : li.gsub("{{active}}","")
|
||||
|
||||
if item["children"] && !item["children"].empty?
|
||||
li = li.gsub("{{level}}",create_menu(item["children"],level + 1))
|
||||
else
|
||||
li = li.gsub("{{level}}","")
|
||||
end
|
||||
html = html + li
|
||||
end
|
||||
html = @menus[level].gsub("{{here}}",html)
|
||||
html = html.gsub("{{class_level}}",level.to_s)
|
||||
html
|
||||
end
|
||||
h = create_menu(@items,0)
|
||||
h.html_safe
|
||||
menu_html
|
||||
end
|
||||
|
||||
def render_view
|
||||
|
@ -269,17 +273,18 @@ module ApplicationHelper
|
|||
doc.to_html.html_safe
|
||||
else
|
||||
unless data['impressionist'].blank?
|
||||
impression = data['impressionist'].impressions.create
|
||||
impression.user_id = request.session['user_id']
|
||||
impression.controller_name = params[:target_controller]
|
||||
impression.action_name = params[:target_action]
|
||||
impression.ip_address = request.remote_ip
|
||||
impression.session_hash = request.session.id
|
||||
impression.request_hash = @impressionist_hash
|
||||
impression.referrer = request.referrer
|
||||
impression.save
|
||||
data['impressionist'].view_count = data['impressionist'].impressions.count
|
||||
data['impressionist'].save
|
||||
Thread.new do
|
||||
impression = data['impressionist'].impressions.create
|
||||
impression.user_id = request.session['user_id']
|
||||
impression.controller_name = params[:target_controller]
|
||||
impression.action_name = params[:target_action]
|
||||
impression.ip_address = request.remote_ip
|
||||
impression.session_hash = request.session.id
|
||||
impression.request_hash = @impressionist_hash
|
||||
impression.referrer = request.referrer
|
||||
impression.save
|
||||
data['impressionist'].inc(view_count: 1)
|
||||
end
|
||||
end
|
||||
wrap_elements = doc.css("*[data-list][data-level='0']")
|
||||
if wrap_elements.count == 0
|
||||
|
|
|
@ -102,23 +102,29 @@ module OrbitBackendHelper
|
|||
end
|
||||
|
||||
def display_visitors(options={})
|
||||
Impression.where(options).distinct(:request_hash).count
|
||||
Impression.where(options).count
|
||||
end
|
||||
|
||||
def display_visitors_today
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_day, '$lte' => Time.now})
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_day})
|
||||
end
|
||||
|
||||
def display_visitors_this_week
|
||||
display_visitors(created_at: {'$gte' => Time.now-7.days, '$lte' => Time.now})
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_week})
|
||||
end
|
||||
|
||||
def display_visitors_this_month
|
||||
display_visitors(created_at: {'$gte' => Time.now-30.days, '$lte' => Time.now})
|
||||
visitors_this_month = Rails.cache.fetch("visitors_this_month", expires_in: 1.day) do
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_month})
|
||||
end
|
||||
visitors_this_month
|
||||
end
|
||||
|
||||
def display_visitors_this_year
|
||||
display_visitors(created_at: {'$gte' => Time.now-365.days, '$lte' => Time.now})
|
||||
visitors_this_year = Rails.cache.fetch("visitors_this_year", expires_in: 1.day) do
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_year})
|
||||
end
|
||||
visitors_this_year
|
||||
end
|
||||
|
||||
def get_month_traffic
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
class Group
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Slug
|
||||
|
||||
field :title, as: :slug_title, type: String, localize: true
|
||||
field :description, localize: true
|
||||
field :admins, type: Array, default: []
|
||||
field :privacy, default: "closed"
|
||||
mount_uploader :image, ImageUploader
|
||||
|
||||
belongs_to :group_category
|
||||
has_and_belongs_to_many :users
|
||||
has_many :group_posts
|
||||
|
||||
scope :closed, ->{ where(privacy: "closed") }
|
||||
scope :open, ->{ where(privacy: "open") }
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
class GroupCategory
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :title, localize: true
|
||||
|
||||
has_many :groups
|
||||
end
|
|
@ -0,0 +1,14 @@
|
|||
class GroupPost
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Slug
|
||||
|
||||
field :title, as: :slug_title, type: String
|
||||
field :content
|
||||
field :read_by, type: Array, default: []
|
||||
field :author, type: BSON::ObjectId
|
||||
mount_uploader :image, ImageUploader
|
||||
|
||||
belongs_to :group
|
||||
|
||||
end
|
|
@ -52,6 +52,13 @@ class MemberProfile
|
|||
end
|
||||
end
|
||||
|
||||
def name_translations
|
||||
{
|
||||
"en" => "#{self.first_name_translations["en"]} #{self.last_name_translations["zh_tw"]}",
|
||||
"zh_tw" => "#{self.last_name_translations["zh_tw"]} #{self.first_name_translations["zh_tw"]}"
|
||||
}
|
||||
end
|
||||
|
||||
def disable_role=(var)
|
||||
var[:id].each do |id,val|
|
||||
if (val=="true")
|
||||
|
|
|
@ -15,6 +15,7 @@ class ModuleApp
|
|||
field :desktop_enabled, type: Boolean, default: false
|
||||
field :widget_settings
|
||||
field :store_permission_granted, type: Boolean, default: false
|
||||
field :cache_models, type: Array, default: []
|
||||
|
||||
has_many :categories, dependent: :destroy, :autosave => true
|
||||
has_and_belongs_to_many :tags, dependent: :destroy, :autosave => true
|
||||
|
@ -34,6 +35,7 @@ class ModuleApp
|
|||
self[:widget_methods] = reg.get_widget_methods
|
||||
self[:widget_settings] = reg.get_widget_settings
|
||||
self[:desktop_enabled] = reg.is_desktop_enabled
|
||||
self[:cache_models] = reg.get_models_to_cache
|
||||
end
|
||||
|
||||
def sub_managers
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
class OrbitObserver < Mongoid::Observer
|
||||
models_to_cache = OrbitApp.get_models_for_caching
|
||||
observe models_to_cache.keys
|
||||
|
||||
def after_save(document)
|
||||
clear_cache(document)
|
||||
end
|
||||
|
||||
def after_destroy(document)
|
||||
clear_cache(document)
|
||||
end
|
||||
|
||||
def clear_cache(document)
|
||||
model_module_hash = OrbitApp.get_model_hash_for_caching
|
||||
case document.class.to_s
|
||||
when 'Tag'
|
||||
document.module_app.each do |module_app|
|
||||
Rails.cache.delete_matched( /#{ module_app.key }/ )
|
||||
end
|
||||
when 'Category'
|
||||
Rails.cache.delete_matched( /#{ document.module_app.key }/ )
|
||||
else
|
||||
Rails.cache.delete_matched( /#{model_module_hash[document.class.name.underscore.to_sym]}/ )
|
||||
end
|
||||
end
|
||||
end
|
|
@ -31,6 +31,15 @@ class Page
|
|||
belongs_to :parent_page, :class_name => 'Page', :inverse_of => :child_page
|
||||
|
||||
before_create :assign_page_number
|
||||
|
||||
after_save :clear_cache
|
||||
after_destroy :clear_cache
|
||||
|
||||
def clear_cache
|
||||
I18n.available_locales.each do |locale|
|
||||
Rails.cache.delete_matched( /main_menu/ )
|
||||
end
|
||||
end
|
||||
|
||||
def assign_page_number
|
||||
parent_page = self.parent_page
|
||||
|
|
|
@ -16,4 +16,11 @@ class SubPart
|
|||
|
||||
belongs_to :page_part
|
||||
belongs_to :mobile_page_part
|
||||
|
||||
after_save :clear_cache
|
||||
after_destroy :clear_cache
|
||||
|
||||
def clear_cache
|
||||
Rails.cache.delete_matched( /#{self.id.to_s}/ )
|
||||
end
|
||||
end
|
|
@ -20,6 +20,7 @@ class User
|
|||
belongs_to :workgroup
|
||||
has_many :authorizations
|
||||
belongs_to :member_profile
|
||||
has_and_belongs_to_many :groups
|
||||
has_one :facebook, :autosave => true, :dependent => :destroy
|
||||
has_one :google, :autosave => true, :dependent => :destroy
|
||||
# has_one :desktop, :dependent => :destroy
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 14 KiB |
|
@ -1,108 +1,131 @@
|
|||
(function($) {
|
||||
(function( $ ) {
|
||||
|
||||
"use strict"
|
||||
|
||||
function init() {
|
||||
var doc = document;
|
||||
var doc = document,
|
||||
lang = doc.documentElement.lang;
|
||||
|
||||
var orbit = {
|
||||
// Cross browser add class function
|
||||
addClass: function(el, className) {
|
||||
if (el.classList) {
|
||||
el.classList.add(className);
|
||||
} else {
|
||||
el.className += ' ' + className;
|
||||
}
|
||||
},
|
||||
// Cross browser has class function
|
||||
hasClass: function(el, cls) {
|
||||
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
||||
},
|
||||
// Add class name to the menu item when its children items are more than eight
|
||||
addMegaDropdownClass: function(el, len) {
|
||||
for (var i = 0; i < el.length; i++) {
|
||||
if (el[i].children.length > len) {
|
||||
orbit.addClass(el[i].parentNode, 'mega-dropdown');
|
||||
|
||||
helpers : {
|
||||
// Cross-browser class manipulation
|
||||
addClass: function( el, className ) {
|
||||
if ( el.classList ) {
|
||||
el.classList.add( className );
|
||||
} else {
|
||||
el.className += " " + className;
|
||||
}
|
||||
},
|
||||
hasClass: function( el, cls ) {
|
||||
return ( " " + el.className + " " ).indexOf( " " + cls + " " ) > -1;
|
||||
}
|
||||
}
|
||||
},
|
||||
// Append caret to menu item if it has dropdown
|
||||
addCaret: function() {
|
||||
var list = doc.querySelectorAll('.page_menu.level_2');
|
||||
for (var i = 0, len = list.length; i < len; i++) {
|
||||
var node = doc.createElement('span');
|
||||
node.className = 'caret';
|
||||
list[i].parentNode.appendChild(node);
|
||||
}
|
||||
},
|
||||
// Add link and cursor class name on element that has data-link attribute
|
||||
addLinkOnADBanner: function(els) {
|
||||
$.each(els, function(i) {
|
||||
if ($(this).data('link') !== "" && !$(this).hasClass('youtube')) {
|
||||
$(this).on('click', function() {
|
||||
var target = $(this).data('target'),
|
||||
link = $(this).data('link');
|
||||
if (target === '_blank') {
|
||||
window.open(link, target);
|
||||
} else {
|
||||
window.location.href = link;
|
||||
},
|
||||
|
||||
plugins : {
|
||||
// RWD image resize script
|
||||
bullEye: function() {
|
||||
$( ".bullseye" ).bullseye({
|
||||
fadeEffect: false
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
nav : {
|
||||
// Add class name to the menu item when its child items are more than 8 items
|
||||
addMegaDropdownClass: function( els, len, className ) {
|
||||
var els = doc.querySelectorAll( els ),
|
||||
elsLen = els.length,
|
||||
i = -1;
|
||||
|
||||
if( elsLen > 1 ) {
|
||||
for ( i = 0; i < elsLen; i++ ) {
|
||||
if ( els[ i ].children.length > len ) {
|
||||
this.helpers.addClass( els[ i ].parentNode, className || "mega-dropdown" );
|
||||
}
|
||||
}
|
||||
}).addClass('cursor');
|
||||
}
|
||||
},
|
||||
// Append caret to menu item if it has dropdown
|
||||
addCaret: function() {
|
||||
var els = doc.querySelectorAll( ".page_menu.level_2" ),
|
||||
len = els.length,
|
||||
i = -1;
|
||||
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
var node = doc.createElement( "span" );
|
||||
node.className = "caret";
|
||||
els[ i ].parentNode.appendChild( node );
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// Announcement text truncation
|
||||
truncation: function(el, len) {
|
||||
for (var i = 0; i < el.length; i++) {
|
||||
if (el[i].firstChild !== null) {
|
||||
if (el[i].firstChild.length > len) {
|
||||
var newStr = el[i].firstChild.nodeValue,
|
||||
newStr = newStr.substring(0, len) + '...'
|
||||
el
|
||||
.eq(i)
|
||||
.text(newStr);
|
||||
},
|
||||
|
||||
announcement: {
|
||||
// Announcement text truncation
|
||||
truncateAnnouncement: function( els, maxLen ) {
|
||||
var els = doc.querySelectorAll( els ),
|
||||
newTitle = "";
|
||||
i = -1,
|
||||
elsLen = els.length;
|
||||
|
||||
for( i = 0; i < elsLen; i ++ ) {
|
||||
if ( els[ i ].firstChild !== null ) {
|
||||
if( els[ i ].firstChild.length > maxLen ) {
|
||||
newTitle = els[ i ].firstChild.textContent;
|
||||
els[ i ].textContent = newTitle.substring( 0, maxLen ) + "...";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Add link and cursor class name on element that has data-link attribute
|
||||
addLinkOnADBanner: function( els ) {
|
||||
$.each( els, function() {
|
||||
if ( $( this ).data( "link" ) !== "" && !$( this ).hasClass( "youtube" ) ) {
|
||||
$( this ).on( "click", function() {
|
||||
var target = $( this ).data( "target" ),
|
||||
link = $( this ).data( "link" );
|
||||
if ( target === "_blank" ) {
|
||||
window.open( link, target );
|
||||
} else {
|
||||
window.location.href = link;
|
||||
}
|
||||
}).addClass( "cursor" );
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// Sitemenu dropdown
|
||||
sitemenuDropdown: function( els ) {
|
||||
var els = doc.querySelectorAll(".sitemenu__list.level-2"),
|
||||
len = els.length,
|
||||
i = -1;
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
if ( els[ i ].children.length ) {
|
||||
var caret = doc.createElement( "span" );
|
||||
caret.className = "sitemenu___dropdown-toggle fa fa-caret-down";
|
||||
caret.setAttribute( "data-toggle", "dropdown" );
|
||||
|
||||
els[ i ].parentNode.insertBefore( caret, els[ i ] );
|
||||
this.helpers.addClass( els[ i ], "dropdown-menu" );
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// Sitemenu dropdown
|
||||
sitemenuDropdown: function() {
|
||||
var el = doc.querySelectorAll('.sitemenu__list.level-2');
|
||||
for (var i = 0, len = el.length; i < len; i++) {
|
||||
if (el[i].hasChildNodes()) {
|
||||
var caret = doc.createElement('span');
|
||||
caret.className = 'sitemenu___dropdown-toggle fa fa-caret-down';
|
||||
caret.setAttribute('data-toggle', 'dropdown');
|
||||
|
||||
el[i].parentNode.insertBefore(caret, el[i]);
|
||||
orbit.addClass(el[i], 'dropdown-menu');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var plugin = {
|
||||
// RWD image resize script
|
||||
bullEye: function() {
|
||||
$(".bullseye").bullseye({
|
||||
fadeEffect: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Specific functions that will be running on homepage
|
||||
if (doc.body.getAttribute('data-module') === 'home') {
|
||||
if ( doc.body.getAttribute( "data-module" ) === "home" ) {
|
||||
|
||||
}
|
||||
|
||||
// Functions that will be running on every page
|
||||
orbit.sitemenuDropdown();
|
||||
plugin.bullEye();
|
||||
orbit.plugins.bullEye();
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function($) {
|
||||
$( document ).ready(function() {
|
||||
init();
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
}( jQuery ));
|
||||
|
|
|
@ -0,0 +1,947 @@
|
|||
//
|
||||
// Mixins
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Utilities
|
||||
// -------------------------
|
||||
|
||||
// Clearfix
|
||||
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
||||
//
|
||||
// For modern browsers
|
||||
// 1. The space content is one way to avoid an Opera bug when the
|
||||
// contenteditable attribute is included anywhere else in the document.
|
||||
// Otherwise it causes space to appear at the top and bottom of elements
|
||||
// that are clearfixed.
|
||||
// 2. The use of `table` rather than `block` is only necessary if using
|
||||
// `:before` to contain the top-margins of child elements.
|
||||
@mixin clearfix() {
|
||||
&:before,
|
||||
&:after {
|
||||
content: " "; // 1
|
||||
display: table; // 2
|
||||
}
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
// WebKit-style focus
|
||||
@mixin tab-focus() {
|
||||
// Default
|
||||
outline: thin dotted;
|
||||
// WebKit
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
// Center-align a block level element
|
||||
@mixin center-block() {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
// Sizing shortcuts
|
||||
@mixin size($width, $height) {
|
||||
width: $width;
|
||||
height: $height;
|
||||
}
|
||||
@mixin square($size) {
|
||||
@include size($size, $size);
|
||||
}
|
||||
|
||||
// Placeholder text
|
||||
@mixin placeholder($color: $input-color-placeholder) {
|
||||
&::-moz-placeholder { color: $color; // Firefox
|
||||
opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
|
||||
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
|
||||
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
|
||||
}
|
||||
|
||||
// Text overflow
|
||||
// Requires inline-block or block for proper styling
|
||||
@mixin text-overflow() {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// CSS image replacement
|
||||
//
|
||||
// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
|
||||
// mixins being reused as classes with the same name, this doesn't hold up. As
|
||||
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
|
||||
// that we cannot chain the mixins together in Less, so they are repeated.
|
||||
//
|
||||
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
|
||||
|
||||
// Deprecated as of v3.0.1 (will be removed in v4)
|
||||
@mixin hide-text() {
|
||||
font: #{0/0} a;
|
||||
color: transparent;
|
||||
text-shadow: none;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
// New mixin to use as of v3.0.1
|
||||
@mixin text-hide() {
|
||||
@include hide-text();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// CSS3 PROPERTIES
|
||||
// --------------------------------------------------
|
||||
|
||||
// Single side border-radius
|
||||
@mixin border-top-radius($radius) {
|
||||
border-top-right-radius: $radius;
|
||||
border-top-left-radius: $radius;
|
||||
}
|
||||
@mixin border-right-radius($radius) {
|
||||
border-bottom-right-radius: $radius;
|
||||
border-top-right-radius: $radius;
|
||||
}
|
||||
@mixin border-bottom-radius($radius) {
|
||||
border-bottom-right-radius: $radius;
|
||||
border-bottom-left-radius: $radius;
|
||||
}
|
||||
@mixin border-left-radius($radius) {
|
||||
border-bottom-left-radius: $radius;
|
||||
border-top-left-radius: $radius;
|
||||
}
|
||||
|
||||
// Drop shadows
|
||||
//
|
||||
// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
|
||||
// supported browsers that have box shadow capabilities now support the
|
||||
// standard `box-shadow` property.
|
||||
@mixin box-shadow($shadow...) {
|
||||
-webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
|
||||
box-shadow: $shadow;
|
||||
}
|
||||
|
||||
// Transitions
|
||||
@mixin transition($transition...) {
|
||||
-webkit-transition: $transition;
|
||||
transition: $transition;
|
||||
}
|
||||
@mixin transition-property($transition-property...) {
|
||||
-webkit-transition-property: $transition-property;
|
||||
transition-property: $transition-property;
|
||||
}
|
||||
@mixin transition-delay($transition-delay) {
|
||||
-webkit-transition-delay: $transition-delay;
|
||||
transition-delay: $transition-delay;
|
||||
}
|
||||
@mixin transition-duration($transition-duration...) {
|
||||
-webkit-transition-duration: $transition-duration;
|
||||
transition-duration: $transition-duration;
|
||||
}
|
||||
@mixin transition-transform($transition...) {
|
||||
-webkit-transition: -webkit-transform $transition;
|
||||
-moz-transition: -moz-transform $transition;
|
||||
-o-transition: -o-transform $transition;
|
||||
transition: transform $transition;
|
||||
}
|
||||
|
||||
// Transformations
|
||||
@mixin rotate($degrees) {
|
||||
-webkit-transform: rotate($degrees);
|
||||
-ms-transform: rotate($degrees); // IE9 only
|
||||
transform: rotate($degrees);
|
||||
}
|
||||
@mixin scale($scale-args...) {
|
||||
-webkit-transform: scale($scale-args);
|
||||
-ms-transform: scale($scale-args); // IE9 only
|
||||
transform: scale($scale-args);
|
||||
}
|
||||
@mixin translate($x, $y) {
|
||||
-webkit-transform: translate($x, $y);
|
||||
-ms-transform: translate($x, $y); // IE9 only
|
||||
transform: translate($x, $y);
|
||||
}
|
||||
@mixin skew($x, $y) {
|
||||
-webkit-transform: skew($x, $y);
|
||||
-ms-transform: skewX($x) skewY($y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
|
||||
transform: skew($x, $y);
|
||||
}
|
||||
@mixin translate3d($x, $y, $z) {
|
||||
-webkit-transform: translate3d($x, $y, $z);
|
||||
transform: translate3d($x, $y, $z);
|
||||
}
|
||||
|
||||
@mixin rotateX($degrees) {
|
||||
-webkit-transform: rotateX($degrees);
|
||||
-ms-transform: rotateX($degrees); // IE9 only
|
||||
transform: rotateX($degrees);
|
||||
}
|
||||
@mixin rotateY($degrees) {
|
||||
-webkit-transform: rotateY($degrees);
|
||||
-ms-transform: rotateY($degrees); // IE9 only
|
||||
transform: rotateY($degrees);
|
||||
}
|
||||
@mixin perspective($perspective) {
|
||||
-webkit-perspective: $perspective;
|
||||
-moz-perspective: $perspective;
|
||||
perspective: $perspective;
|
||||
}
|
||||
@mixin perspective-origin($perspective) {
|
||||
-webkit-perspective-origin: $perspective;
|
||||
-moz-perspective-origin: $perspective;
|
||||
perspective-origin: $perspective;
|
||||
}
|
||||
@mixin transform-origin($origin) {
|
||||
-webkit-transform-origin: $origin;
|
||||
-moz-transform-origin: $origin;
|
||||
-ms-transform-origin: $origin; // IE9 only
|
||||
transform-origin: $origin;
|
||||
}
|
||||
|
||||
// Animations
|
||||
@mixin animation($animation) {
|
||||
-webkit-animation: $animation;
|
||||
animation: $animation;
|
||||
}
|
||||
@mixin animation-name($name) {
|
||||
-webkit-animation-name: $name;
|
||||
animation-name: $name;
|
||||
}
|
||||
@mixin animation-duration($duration) {
|
||||
-webkit-animation-duration: $duration;
|
||||
animation-duration: $duration;
|
||||
}
|
||||
@mixin animation-timing-function($timing-function) {
|
||||
-webkit-animation-timing-function: $timing-function;
|
||||
animation-timing-function: $timing-function;
|
||||
}
|
||||
@mixin animation-delay($delay) {
|
||||
-webkit-animation-delay: $delay;
|
||||
animation-delay: $delay;
|
||||
}
|
||||
@mixin animation-iteration-count($iteration-count) {
|
||||
-webkit-animation-iteration-count: $iteration-count;
|
||||
animation-iteration-count: $iteration-count;
|
||||
}
|
||||
@mixin animation-direction($direction) {
|
||||
-webkit-animation-direction: $direction;
|
||||
animation-direction: $direction;
|
||||
}
|
||||
|
||||
// Backface visibility
|
||||
// Prevent browsers from flickering when using CSS 3D transforms.
|
||||
// Default value is `visible`, but can be changed to `hidden`
|
||||
@mixin backface-visibility($visibility){
|
||||
-webkit-backface-visibility: $visibility;
|
||||
-moz-backface-visibility: $visibility;
|
||||
backface-visibility: $visibility;
|
||||
}
|
||||
|
||||
// Box sizing
|
||||
@mixin box-sizing($boxmodel) {
|
||||
-webkit-box-sizing: $boxmodel;
|
||||
-moz-box-sizing: $boxmodel;
|
||||
box-sizing: $boxmodel;
|
||||
}
|
||||
|
||||
// User select
|
||||
// For selecting text on the page
|
||||
@mixin user-select($select) {
|
||||
-webkit-user-select: $select;
|
||||
-moz-user-select: $select;
|
||||
-ms-user-select: $select; // IE10+
|
||||
user-select: $select;
|
||||
}
|
||||
|
||||
// Resize anything
|
||||
@mixin resizable($direction) {
|
||||
resize: $direction; // Options: horizontal, vertical, both
|
||||
overflow: auto; // Safari fix
|
||||
}
|
||||
|
||||
// CSS3 Content Columns
|
||||
@mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
|
||||
-webkit-column-count: $column-count;
|
||||
-moz-column-count: $column-count;
|
||||
column-count: $column-count;
|
||||
-webkit-column-gap: $column-gap;
|
||||
-moz-column-gap: $column-gap;
|
||||
column-gap: $column-gap;
|
||||
}
|
||||
|
||||
// Optional hyphenation
|
||||
@mixin hyphens($mode: auto) {
|
||||
word-wrap: break-word;
|
||||
-webkit-hyphens: $mode;
|
||||
-moz-hyphens: $mode;
|
||||
-ms-hyphens: $mode; // IE10+
|
||||
-o-hyphens: $mode;
|
||||
hyphens: $mode;
|
||||
}
|
||||
|
||||
// Opacity
|
||||
@mixin opacity($opacity) {
|
||||
opacity: $opacity;
|
||||
// IE8 filter
|
||||
$opacity-ie: ($opacity * 100);
|
||||
filter: #{alpha(opacity=$opacity-ie)};
|
||||
}
|
||||
|
||||
|
||||
|
||||
// GRADIENTS
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// Horizontal gradient, from left to right
|
||||
//
|
||||
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||
// Color stops are not available in IE9 and below.
|
||||
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
||||
background-image: -webkit-linear-gradient(left, color-stop($start-color $start-percent), color-stop($end-color $end-percent)); // Safari 5.1-6, Chrome 10+
|
||||
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
|
||||
}
|
||||
|
||||
// Vertical gradient, from top to bottom
|
||||
//
|
||||
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||
// Color stops are not available in IE9 and below.
|
||||
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
||||
background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
||||
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
|
||||
}
|
||||
|
||||
@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
|
||||
background-repeat: repeat-x;
|
||||
background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
|
||||
background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
||||
}
|
||||
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
||||
background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
|
||||
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
||||
background-repeat: no-repeat;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
|
||||
}
|
||||
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
||||
background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
||||
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
||||
background-repeat: no-repeat;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
|
||||
}
|
||||
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
|
||||
background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
|
||||
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
|
||||
background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
||||
}
|
||||
|
||||
// Reset filters for IE
|
||||
//
|
||||
// When you need to remove a gradient background, do not forget to use this to reset
|
||||
// the IE filter for IE9 and below.
|
||||
@mixin reset-filter() {
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Retina images
|
||||
//
|
||||
// Short retina mixin for setting background-image and -size
|
||||
|
||||
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
|
||||
background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
|
||||
|
||||
@media
|
||||
only screen and (-webkit-min-device-pixel-ratio: 2),
|
||||
only screen and ( min--moz-device-pixel-ratio: 2),
|
||||
only screen and ( -o-min-device-pixel-ratio: 2/1),
|
||||
only screen and ( min-device-pixel-ratio: 2),
|
||||
only screen and ( min-resolution: 192dpi),
|
||||
only screen and ( min-resolution: 2dppx) {
|
||||
background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
|
||||
background-size: $width-1x $height-1x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Responsive image
|
||||
//
|
||||
// Keep images from scaling beyond the width of their parents.
|
||||
|
||||
@mixin img-responsive($display: block) {
|
||||
display: $display;
|
||||
max-width: 100%; // Part 1: Set a maximum relative to the parent
|
||||
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
|
||||
}
|
||||
|
||||
|
||||
// COMPONENT MIXINS
|
||||
// --------------------------------------------------
|
||||
|
||||
// Horizontal dividers
|
||||
// -------------------------
|
||||
// Dividers (basically an hr) within dropdowns and nav lists
|
||||
@mixin nav-divider($color: #e5e5e5) {
|
||||
height: 1px;
|
||||
margin: (($line-height-computed / 2) - 1) 0;
|
||||
overflow: hidden;
|
||||
background-color: $color;
|
||||
}
|
||||
|
||||
// Panels
|
||||
// -------------------------
|
||||
@mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
|
||||
border-color: $border;
|
||||
|
||||
& > .panel-heading {
|
||||
color: $heading-text-color;
|
||||
background-color: $heading-bg-color;
|
||||
border-color: $heading-border;
|
||||
|
||||
+ .panel-collapse .panel-body {
|
||||
border-top-color: $border;
|
||||
}
|
||||
}
|
||||
& > .panel-footer {
|
||||
+ .panel-collapse .panel-body {
|
||||
border-bottom-color: $border;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Alerts
|
||||
// -------------------------
|
||||
@mixin alert-variant($background, $border, $text-color) {
|
||||
background-color: $background;
|
||||
border-color: $border;
|
||||
color: $text-color;
|
||||
|
||||
hr {
|
||||
border-top-color: darken($border, 5%);
|
||||
}
|
||||
.alert-link {
|
||||
color: darken($text-color, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
// Tables
|
||||
// -------------------------
|
||||
@mixin table-row-variant($state, $background) {
|
||||
// Exact selectors below required to override `.table-striped` and prevent
|
||||
// inheritance to nested tables.
|
||||
.table > thead > tr,
|
||||
.table > tbody > tr,
|
||||
.table > tfoot > tr {
|
||||
> td.#{$state},
|
||||
> th.#{$state},
|
||||
&.#{$state} > td,
|
||||
&.#{$state} > th {
|
||||
background-color: $background;
|
||||
}
|
||||
}
|
||||
|
||||
// Hover states for `.table-hover`
|
||||
// Note: this is not available for cells or rows within `thead` or `tfoot`.
|
||||
.table-hover > tbody > tr {
|
||||
> td.#{$state}:hover,
|
||||
> th.#{$state}:hover,
|
||||
&.#{$state}:hover > td,
|
||||
&.#{$state}:hover > th {
|
||||
background-color: darken($background, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// List Groups
|
||||
// -------------------------
|
||||
@mixin list-group-item-variant($state, $background, $color) {
|
||||
.list-group-item-#{$state} {
|
||||
color: $color;
|
||||
background-color: $background;
|
||||
|
||||
// [converter] extracted a& to a.list-group-item-#{$state}
|
||||
}
|
||||
|
||||
a.list-group-item-#{$state} {
|
||||
color: $color;
|
||||
|
||||
.list-group-item-heading { color: inherit; }
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $color;
|
||||
background-color: darken($background, 5%);
|
||||
}
|
||||
&.active,
|
||||
&.active:hover,
|
||||
&.active:focus {
|
||||
color: #fff;
|
||||
background-color: $color;
|
||||
border-color: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Button variants
|
||||
// -------------------------
|
||||
// Easily pump out default styles, as well as :hover, :focus, :active,
|
||||
// and disabled options for all buttons
|
||||
@mixin button-variant($color, $background, $border) {
|
||||
color: $color;
|
||||
background-color: $background;
|
||||
border-color: $border;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
color: $color;
|
||||
background-color: darken($background, 8%);
|
||||
border-color: darken($border, 12%);
|
||||
}
|
||||
.open & { &.dropdown-toggle {
|
||||
color: $color;
|
||||
background-color: darken($background, 8%);
|
||||
border-color: darken($border, 12%);
|
||||
} }
|
||||
&:active,
|
||||
&.active {
|
||||
background-image: none;
|
||||
}
|
||||
.open & { &.dropdown-toggle {
|
||||
background-image: none;
|
||||
} }
|
||||
&.disabled,
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: $background;
|
||||
border-color: $border;
|
||||
}
|
||||
}
|
||||
|
||||
.badge {
|
||||
color: $background;
|
||||
background-color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
// Button sizes
|
||||
// -------------------------
|
||||
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
||||
padding: $padding-vertical $padding-horizontal;
|
||||
font-size: $font-size;
|
||||
line-height: $line-height;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
// Pagination
|
||||
// -------------------------
|
||||
@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
|
||||
> li {
|
||||
> a,
|
||||
> span {
|
||||
padding: $padding-vertical $padding-horizontal;
|
||||
font-size: $font-size;
|
||||
}
|
||||
&:first-child {
|
||||
> a,
|
||||
> span {
|
||||
@include border-left-radius($border-radius);
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
> a,
|
||||
> span {
|
||||
@include border-right-radius($border-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Labels
|
||||
// -------------------------
|
||||
@mixin label-variant($color) {
|
||||
background-color: $color;
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: darken($color, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Contextual backgrounds
|
||||
// -------------------------
|
||||
// [converter] $parent hack
|
||||
@mixin bg-variant($parent, $color) {
|
||||
#{$parent} {
|
||||
background-color: $color;
|
||||
}
|
||||
a#{$parent}:hover {
|
||||
background-color: darken($color, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
// Typography
|
||||
// -------------------------
|
||||
// [converter] $parent hack
|
||||
@mixin text-emphasis-variant($parent, $color) {
|
||||
#{$parent} {
|
||||
color: $color;
|
||||
}
|
||||
a#{$parent}:hover {
|
||||
color: darken($color, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
// Navbar vertical align
|
||||
// -------------------------
|
||||
// Vertically center elements in the navbar.
|
||||
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
|
||||
@mixin navbar-vertical-align($element-height) {
|
||||
margin-top: (($navbar-height - $element-height) / 2);
|
||||
margin-bottom: (($navbar-height - $element-height) / 2);
|
||||
}
|
||||
|
||||
// Progress bars
|
||||
// -------------------------
|
||||
@mixin progress-bar-variant($color) {
|
||||
background-color: $color;
|
||||
.progress-striped & {
|
||||
@include gradient-striped();
|
||||
}
|
||||
}
|
||||
|
||||
// Responsive utilities
|
||||
// -------------------------
|
||||
// More easily include all the states for responsive-utilities.less.
|
||||
// [converter] $parent hack
|
||||
@mixin responsive-visibility($parent) {
|
||||
#{$parent} {
|
||||
display: block !important;
|
||||
}
|
||||
table#{$parent} { display: table; }
|
||||
tr#{$parent} { display: table-row !important; }
|
||||
th#{$parent},
|
||||
td#{$parent} { display: table-cell !important; }
|
||||
}
|
||||
|
||||
// [converter] $parent hack
|
||||
@mixin responsive-invisibility($parent) {
|
||||
#{$parent} {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Grid System
|
||||
// -----------
|
||||
|
||||
// Centered container element
|
||||
@mixin container-fixed() {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
padding-left: ($grid-gutter-width / 2);
|
||||
padding-right: ($grid-gutter-width / 2);
|
||||
@include clearfix();
|
||||
}
|
||||
|
||||
// Creates a wrapper for a series of columns
|
||||
@mixin make-row($gutter: $grid-gutter-width) {
|
||||
margin-left: ($gutter / -2);
|
||||
margin-right: ($gutter / -2);
|
||||
@include clearfix();
|
||||
}
|
||||
|
||||
// Generate the extra small columns
|
||||
@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
|
||||
position: relative;
|
||||
float: left;
|
||||
width: percentage(($columns / $grid-columns));
|
||||
min-height: 1px;
|
||||
padding-left: ($gutter / 2);
|
||||
padding-right: ($gutter / 2);
|
||||
}
|
||||
@mixin make-xs-column-offset($columns) {
|
||||
@media (min-width: $screen-xs-min) {
|
||||
margin-left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-xs-column-push($columns) {
|
||||
@media (min-width: $screen-xs-min) {
|
||||
left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-xs-column-pull($columns) {
|
||||
@media (min-width: $screen-xs-min) {
|
||||
right: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Generate the small columns
|
||||
@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
padding-left: ($gutter / 2);
|
||||
padding-right: ($gutter / 2);
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
float: left;
|
||||
width: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-sm-column-offset($columns) {
|
||||
@media (min-width: $screen-sm-min) {
|
||||
margin-left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-sm-column-push($columns) {
|
||||
@media (min-width: $screen-sm-min) {
|
||||
left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-sm-column-pull($columns) {
|
||||
@media (min-width: $screen-sm-min) {
|
||||
right: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Generate the medium columns
|
||||
@mixin make-md-column($columns, $gutter: $grid-gutter-width) {
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
padding-left: ($gutter / 2);
|
||||
padding-right: ($gutter / 2);
|
||||
|
||||
@media (min-width: $screen-md-min) {
|
||||
float: left;
|
||||
width: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-md-column-offset($columns) {
|
||||
@media (min-width: $screen-md-min) {
|
||||
margin-left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-md-column-push($columns) {
|
||||
@media (min-width: $screen-md-min) {
|
||||
left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-md-column-pull($columns) {
|
||||
@media (min-width: $screen-md-min) {
|
||||
right: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Generate the large columns
|
||||
@mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
padding-left: ($gutter / 2);
|
||||
padding-right: ($gutter / 2);
|
||||
|
||||
@media (min-width: $screen-lg-min) {
|
||||
float: left;
|
||||
width: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-lg-column-offset($columns) {
|
||||
@media (min-width: $screen-lg-min) {
|
||||
margin-left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-lg-column-push($columns) {
|
||||
@media (min-width: $screen-lg-min) {
|
||||
left: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
@mixin make-lg-column-pull($columns) {
|
||||
@media (min-width: $screen-lg-min) {
|
||||
right: percentage(($columns / $grid-columns));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Framework grid generation
|
||||
//
|
||||
// Used only by Bootstrap to generate the correct number of grid classes given
|
||||
// any value of `$grid-columns`.
|
||||
|
||||
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
||||
@mixin make-grid-columns() {
|
||||
$list: '';
|
||||
$i: 1;
|
||||
$list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
|
||||
@for $i from (1 + 1) through $grid-columns {
|
||||
$list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
|
||||
}
|
||||
#{$list} {
|
||||
position: relative;
|
||||
// Prevent columns from collapsing when empty
|
||||
min-height: 1px;
|
||||
// Inner gutter via padding
|
||||
padding-left: ($grid-gutter-width / 2);
|
||||
padding-right: ($grid-gutter-width / 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
||||
@mixin float-grid-columns($class) {
|
||||
$list: '';
|
||||
$i: 1;
|
||||
$list: ".col-#{$class}-#{$i}";
|
||||
@for $i from (1 + 1) through $grid-columns {
|
||||
$list: "#{$list}, .col-#{$class}-#{$i}";
|
||||
}
|
||||
#{$list} {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@mixin calc-grid-column($index, $class, $type) {
|
||||
@if ($type == width) and ($index > 0) {
|
||||
.col-#{$class}-#{$index} {
|
||||
width: percentage(($index / $grid-columns));
|
||||
}
|
||||
}
|
||||
@if ($type == push) {
|
||||
.col-#{$class}-push-#{$index} {
|
||||
left: percentage(($index / $grid-columns));
|
||||
}
|
||||
}
|
||||
@if ($type == pull) {
|
||||
.col-#{$class}-pull-#{$index} {
|
||||
right: percentage(($index / $grid-columns));
|
||||
}
|
||||
}
|
||||
@if ($type == offset) {
|
||||
.col-#{$class}-offset-#{$index} {
|
||||
margin-left: percentage(($index / $grid-columns));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
||||
@mixin loop-grid-columns($columns, $class, $type) {
|
||||
@for $i from 0 through $columns {
|
||||
@include calc-grid-column($i, $class, $type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Create grid for specific class
|
||||
@mixin make-grid($class) {
|
||||
@include float-grid-columns($class);
|
||||
@include loop-grid-columns($grid-columns, $class, width);
|
||||
@include loop-grid-columns($grid-columns, $class, pull);
|
||||
@include loop-grid-columns($grid-columns, $class, push);
|
||||
@include loop-grid-columns($grid-columns, $class, offset);
|
||||
}
|
||||
|
||||
// Form validation states
|
||||
//
|
||||
// Used in forms.less to generate the form validation CSS for warnings, errors,
|
||||
// and successes.
|
||||
|
||||
@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
|
||||
// Color the label and help text
|
||||
.help-block,
|
||||
.control-label,
|
||||
.radio,
|
||||
.checkbox,
|
||||
.radio-inline,
|
||||
.checkbox-inline {
|
||||
color: $text-color;
|
||||
}
|
||||
// Set the border and box shadow on specific inputs to match
|
||||
.form-control {
|
||||
border-color: $border-color;
|
||||
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
|
||||
&:focus {
|
||||
border-color: darken($border-color, 10%);
|
||||
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
|
||||
@include box-shadow($shadow);
|
||||
}
|
||||
}
|
||||
// Set validation states also for addons
|
||||
.input-group-addon {
|
||||
color: $text-color;
|
||||
border-color: $border-color;
|
||||
background-color: $background-color;
|
||||
}
|
||||
// Optional feedback icon
|
||||
.form-control-feedback {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
// Form control focus state
|
||||
//
|
||||
// Generate a customized focus state and for any input with the specified color,
|
||||
// which defaults to the `$input-focus-border` variable.
|
||||
//
|
||||
// We highly encourage you to not customize the default value, but instead use
|
||||
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
||||
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
||||
// usability and accessibility should be taken into account with any change.
|
||||
//
|
||||
// Example usage: change the default blue border and shadow to white for better
|
||||
// contrast against a dark gray background.
|
||||
|
||||
@mixin form-control-focus($color: $input-border-focus) {
|
||||
$color-rgba: rgba(red($color), green($color), blue($color), .6);
|
||||
&:focus {
|
||||
border-color: $color;
|
||||
outline: 0;
|
||||
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
|
||||
}
|
||||
}
|
||||
|
||||
// Form control sizing
|
||||
//
|
||||
// Relative text size, padding, and border-radii changes for form controls. For
|
||||
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
|
||||
// element gets special love because it's special, and that's a fact!
|
||||
|
||||
// [converter] $parent hack
|
||||
@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
||||
#{$parent} {
|
||||
height: $input-height;
|
||||
padding: $padding-vertical $padding-horizontal;
|
||||
font-size: $font-size;
|
||||
line-height: $line-height;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
select#{$parent} {
|
||||
height: $input-height;
|
||||
line-height: $input-height;
|
||||
}
|
||||
|
||||
textarea#{$parent},
|
||||
select[multiple]#{$parent} {
|
||||
height: auto;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,833 @@
|
|||
// a flag to toggle asset pipeline / compass integration
|
||||
// defaults to true if twbs-font-path function is present (no function => twbs-font-path('') parsed as string == right side)
|
||||
// in Sass 3.3 this can be improved with: function-exists(twbs-font-path)
|
||||
$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default;
|
||||
//
|
||||
// Variables
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
//== Colors
|
||||
//
|
||||
//## Gray and brand colors for use across Bootstrap.
|
||||
|
||||
$gray-darker: lighten(#000, 13.5%) !default; // #222
|
||||
$gray-dark: lighten(#000, 20%) !default; // #333
|
||||
$gray: lighten(#000, 33.5%) !default; // #555
|
||||
$gray-light: lighten(#000, 60%) !default; // #999
|
||||
$gray-lighter: lighten(#000, 93.5%) !default; // #eee
|
||||
|
||||
$brand-primary: #47bab5 !default;
|
||||
$brand-success: #5cb85c !default;
|
||||
$brand-info: #5bc0de !default;
|
||||
$brand-warning: #f0ad4e !default;
|
||||
$brand-danger: #ed4c43 !default;
|
||||
|
||||
|
||||
//== Scaffolding
|
||||
//
|
||||
// ## Settings for some of the most global styles.
|
||||
|
||||
//** Background color for `<body>`.
|
||||
$body-bg: #fff !default;
|
||||
//** Global text color on `<body>`.
|
||||
$text-color: $gray-dark !default;
|
||||
|
||||
//** Global textual link color.
|
||||
$link-color: $brand-primary !default;
|
||||
//** Link hover color set via `darken()` function.
|
||||
$link-hover-color: darken($link-color, 15%) !default;
|
||||
|
||||
|
||||
//== Typography
|
||||
//
|
||||
//## Font, line-height, and color for body text, headings, and more.
|
||||
|
||||
$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
|
||||
$font-family-serif: Georgia, "Times New Roman", Times, serif !default;
|
||||
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
|
||||
$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
|
||||
$font-family-base: $font-family-sans-serif !default;
|
||||
|
||||
$font-size-base: 14px !default;
|
||||
$font-size-large: ceil(($font-size-base * 1.25)) !default; // ~18px
|
||||
$font-size-small: ceil(($font-size-base * 0.85)) !default; // ~12px
|
||||
|
||||
$font-size-h1: floor(($font-size-base * 2.6)) !default; // ~36px
|
||||
$font-size-h2: floor(($font-size-base * 2.15)) !default; // ~30px
|
||||
$font-size-h3: ceil(($font-size-base * 1.7)) !default; // ~24px
|
||||
$font-size-h4: ceil(($font-size-base * 1.25)) !default; // ~18px
|
||||
$font-size-h5: $font-size-base !default;
|
||||
$font-size-h6: ceil(($font-size-base * 0.85)) !default; // ~12px
|
||||
|
||||
//** Unit-less `line-height` for use in components like buttons.
|
||||
$line-height-base: 1.428571429 !default; // 20/14
|
||||
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
|
||||
$line-height-computed: floor(($font-size-base * $line-height-base)) !default; // ~20px
|
||||
|
||||
//** By default, this inherits from the `<body>`.
|
||||
$headings-font-family: inherit !default;
|
||||
$headings-font-weight: 500 !default;
|
||||
$headings-line-height: 1.1 !default;
|
||||
$headings-color: inherit !default;
|
||||
|
||||
|
||||
//-- Iconography
|
||||
//
|
||||
//## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.
|
||||
|
||||
$icon-font-path: "bootstrap/" !default;
|
||||
$icon-font-name: "glyphicons-halflings-regular" !default;
|
||||
$icon-font-svg-id: "glyphicons_halflingsregular" !default;
|
||||
|
||||
//== Components
|
||||
//
|
||||
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
|
||||
|
||||
$padding-base-vertical: 6px !default;
|
||||
$padding-base-horizontal: 12px !default;
|
||||
|
||||
$padding-large-vertical: 10px !default;
|
||||
$padding-large-horizontal: 16px !default;
|
||||
|
||||
$padding-small-vertical: 5px !default;
|
||||
$padding-small-horizontal: 10px !default;
|
||||
|
||||
$padding-xs-vertical: 1px !default;
|
||||
$padding-xs-horizontal: 5px !default;
|
||||
|
||||
$line-height-large: 1.33 !default;
|
||||
$line-height-small: 1.5 !default;
|
||||
|
||||
$border-radius-base: 4px !default;
|
||||
$border-radius-large: 6px !default;
|
||||
$border-radius-small: 3px !default;
|
||||
|
||||
//** Global color for active items (e.g., navs or dropdowns).
|
||||
$component-active-color: #fff !default;
|
||||
//** Global background color for active items (e.g., navs or dropdowns).
|
||||
$component-active-bg: $brand-primary !default;
|
||||
|
||||
//** Width of the `border` for generating carets that indicator dropdowns.
|
||||
$caret-width-base: 4px !default;
|
||||
//** Carets increase slightly in size for larger components.
|
||||
$caret-width-large: 5px !default;
|
||||
|
||||
|
||||
//== Tables
|
||||
//
|
||||
//## Customizes the `.table` component with basic values, each used across all table variations.
|
||||
|
||||
//** Padding for `<th>`s and `<td>`s.
|
||||
$table-cell-padding: 8px !default;
|
||||
//** Padding for cells in `.table-condensed`.
|
||||
$table-condensed-cell-padding: 5px !default;
|
||||
|
||||
//** Default background color used for all tables.
|
||||
$table-bg: transparent !default;
|
||||
//** Background color used for `.table-striped`.
|
||||
$table-bg-accent: #f9f9f9 !default;
|
||||
//** Background color used for `.table-hover`.
|
||||
$table-bg-hover: #f5f5f5 !default;
|
||||
$table-bg-active: $table-bg-hover !default;
|
||||
|
||||
//** Border color for table and cell borders.
|
||||
$table-border-color: #ddd !default;
|
||||
|
||||
|
||||
//== Buttons
|
||||
//
|
||||
//## For each of Bootstrap's buttons, define text, background and border color.
|
||||
|
||||
$btn-font-weight: normal !default;
|
||||
|
||||
$btn-default-color: #333 !default;
|
||||
$btn-default-bg: #fff !default;
|
||||
$btn-default-border: #ccc !default;
|
||||
|
||||
$btn-primary-color: #fff !default;
|
||||
$btn-primary-bg: $brand-primary !default;
|
||||
$btn-primary-border: darken($btn-primary-bg, 5%) !default;
|
||||
|
||||
$btn-success-color: #fff !default;
|
||||
$btn-success-bg: $brand-success !default;
|
||||
$btn-success-border: darken($btn-success-bg, 5%) !default;
|
||||
|
||||
$btn-info-color: #fff !default;
|
||||
$btn-info-bg: $brand-info !default;
|
||||
$btn-info-border: darken($btn-info-bg, 5%) !default;
|
||||
|
||||
$btn-warning-color: #fff !default;
|
||||
$btn-warning-bg: $brand-warning !default;
|
||||
$btn-warning-border: darken($btn-warning-bg, 5%) !default;
|
||||
|
||||
$btn-danger-color: #fff !default;
|
||||
$btn-danger-bg: $brand-danger !default;
|
||||
$btn-danger-border: darken($btn-danger-bg, 5%) !default;
|
||||
|
||||
$btn-link-disabled-color: $gray-light !default;
|
||||
|
||||
|
||||
//== Forms
|
||||
//
|
||||
//##
|
||||
|
||||
//** `<input>` background color
|
||||
$input-bg: #fff !default;
|
||||
//** `<input disabled>` background color
|
||||
$input-bg-disabled: $gray-lighter !default;
|
||||
|
||||
//** Text color for `<input>`s
|
||||
$input-color: $gray !default;
|
||||
//** `<input>` border color
|
||||
$input-border: #ccc !default;
|
||||
//** `<input>` border radius
|
||||
$input-border-radius: $border-radius-base !default;
|
||||
//** Border color for inputs on focus
|
||||
$input-border-focus: #66afe9 !default;
|
||||
|
||||
//** Placeholder text color
|
||||
$input-color-placeholder: $gray-light !default;
|
||||
|
||||
//** Default `.form-control` height
|
||||
$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
|
||||
//** Large `.form-control` height
|
||||
$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
|
||||
//** Small `.form-control` height
|
||||
$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
|
||||
|
||||
$legend-color: $gray-dark !default;
|
||||
$legend-border-color: #e5e5e5 !default;
|
||||
|
||||
//** Background color for textual input addons
|
||||
$input-group-addon-bg: $gray-lighter !default;
|
||||
//** Border color for textual input addons
|
||||
$input-group-addon-border-color: $input-border !default;
|
||||
|
||||
|
||||
//== Dropdowns
|
||||
//
|
||||
//## Dropdown menu container and contents.
|
||||
|
||||
//** Background for the dropdown menu.
|
||||
$dropdown-bg: #fff !default;
|
||||
//** Dropdown menu `border-color`.
|
||||
$dropdown-border: rgba(0,0,0,.15) !default;
|
||||
//** Dropdown menu `border-color` **for IE8**.
|
||||
$dropdown-fallback-border: #ccc !default;
|
||||
//** Divider color for between dropdown items.
|
||||
$dropdown-divider-bg: #e5e5e5 !default;
|
||||
|
||||
//** Dropdown link text color.
|
||||
$dropdown-link-color: $gray-dark !default;
|
||||
//** Hover color for dropdown links.
|
||||
$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
|
||||
//** Hover background for dropdown links.
|
||||
$dropdown-link-hover-bg: #f5f5f5 !default;
|
||||
|
||||
//** Active dropdown menu item text color.
|
||||
$dropdown-link-active-color: $component-active-color !default;
|
||||
//** Active dropdown menu item background color.
|
||||
$dropdown-link-active-bg: $component-active-bg !default;
|
||||
|
||||
//** Disabled dropdown menu item background color.
|
||||
$dropdown-link-disabled-color: $gray-light !default;
|
||||
|
||||
//** Text color for headers within dropdown menus.
|
||||
$dropdown-header-color: $gray-light !default;
|
||||
|
||||
// Note: Deprecated $dropdown-caret-color as of v3.1.0
|
||||
$dropdown-caret-color: #000 !default;
|
||||
|
||||
|
||||
//-- Z-index master list
|
||||
//
|
||||
// Warning: Avoid customizing these values. They're used for a bird's eye view
|
||||
// of components dependent on the z-axis and are designed to all work together.
|
||||
//
|
||||
// Note: These variables are not generated into the Customizer.
|
||||
|
||||
$zindex-navbar: 1000 !default;
|
||||
$zindex-dropdown: 1000 !default;
|
||||
$zindex-popover: 1010 !default;
|
||||
$zindex-tooltip: 1030 !default;
|
||||
$zindex-navbar-fixed: 1030 !default;
|
||||
$zindex-modal-background: 1040 !default;
|
||||
$zindex-modal: 1050 !default;
|
||||
|
||||
|
||||
//== Media queries breakpoints
|
||||
//
|
||||
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
|
||||
|
||||
// Extra small screen / phone
|
||||
// Note: Deprecated $screen-xs and $screen-phone as of v3.0.1
|
||||
$screen-xs: 480px !default;
|
||||
$screen-xs-min: $screen-xs !default;
|
||||
$screen-phone: $screen-xs-min !default;
|
||||
|
||||
// Small screen / tablet
|
||||
// Note: Deprecated $screen-sm and $screen-tablet as of v3.0.1
|
||||
$screen-sm: 768px !default;
|
||||
$screen-sm-min: $screen-sm !default;
|
||||
$screen-tablet: $screen-sm-min !default;
|
||||
|
||||
// Medium screen / desktop
|
||||
// Note: Deprecated $screen-md and $screen-desktop as of v3.0.1
|
||||
$screen-md: 992px !default;
|
||||
$screen-md-min: $screen-md !default;
|
||||
$screen-desktop: $screen-md-min !default;
|
||||
|
||||
// Large screen / wide desktop
|
||||
// Note: Deprecated $screen-lg and $screen-lg-desktop as of v3.0.1
|
||||
$screen-lg: 1200px !default;
|
||||
$screen-lg-min: $screen-lg !default;
|
||||
$screen-lg-desktop: $screen-lg-min !default;
|
||||
|
||||
// So media queries don't overlap when required, provide a maximum
|
||||
$screen-xs-max: ($screen-sm-min - 1) !default;
|
||||
$screen-sm-max: ($screen-md-min - 1) !default;
|
||||
$screen-md-max: ($screen-lg-min - 1) !default;
|
||||
|
||||
|
||||
//== Grid system
|
||||
//
|
||||
//## Define your custom responsive grid.
|
||||
|
||||
//** Number of columns in the grid.
|
||||
$grid-columns: 12 !default;
|
||||
//** Padding between columns. Gets divided in half for the left and right.
|
||||
$grid-gutter-width: 30px !default;
|
||||
// Navbar collapse
|
||||
//** Point at which the navbar becomes uncollapsed.
|
||||
$grid-float-breakpoint: $screen-sm-min !default;
|
||||
//** Point at which the navbar begins collapsing.
|
||||
$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
|
||||
|
||||
|
||||
//== Container sizes
|
||||
//
|
||||
//## Define the maximum width of `.container` for different screen sizes.
|
||||
|
||||
// Small screen / tablet
|
||||
$container-tablet: ((720px + $grid-gutter-width)) !default;
|
||||
//** For `$screen-sm-min` and up.
|
||||
$container-sm: $container-tablet !default;
|
||||
|
||||
// Medium screen / desktop
|
||||
$container-desktop: ((940px + $grid-gutter-width)) !default;
|
||||
//** For `$screen-md-min` and up.
|
||||
$container-md: $container-desktop !default;
|
||||
|
||||
// Large screen / wide desktop
|
||||
$container-large-desktop: ((1140px + $grid-gutter-width)) !default;
|
||||
//** For `$screen-lg-min` and up.
|
||||
$container-lg: $container-large-desktop !default;
|
||||
|
||||
|
||||
//== Navbar
|
||||
//
|
||||
//##
|
||||
|
||||
// Basics of a navbar
|
||||
$navbar-height: 50px !default;
|
||||
$navbar-margin-bottom: $line-height-computed !default;
|
||||
$navbar-border-radius: $border-radius-base !default;
|
||||
$navbar-padding-horizontal: floor(($grid-gutter-width / 2)) !default;
|
||||
$navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2) !default;
|
||||
$navbar-collapse-max-height: 340px !default;
|
||||
|
||||
$navbar-default-color: #777 !default;
|
||||
$navbar-default-bg: #f8f8f8 !default;
|
||||
$navbar-default-border: darken($navbar-default-bg, 6.5%) !default;
|
||||
|
||||
// Navbar links
|
||||
$navbar-default-link-color: #777 !default;
|
||||
$navbar-default-link-hover-color: #333 !default;
|
||||
$navbar-default-link-hover-bg: transparent !default;
|
||||
$navbar-default-link-active-color: #555 !default;
|
||||
$navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%) !default;
|
||||
$navbar-default-link-disabled-color: #ccc !default;
|
||||
$navbar-default-link-disabled-bg: transparent !default;
|
||||
|
||||
// Navbar brand label
|
||||
$navbar-default-brand-color: $navbar-default-link-color !default;
|
||||
$navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%) !default;
|
||||
$navbar-default-brand-hover-bg: transparent !default;
|
||||
|
||||
// Navbar toggle
|
||||
$navbar-default-toggle-hover-bg: #ddd !default;
|
||||
$navbar-default-toggle-icon-bar-bg: #888 !default;
|
||||
$navbar-default-toggle-border-color: #ddd !default;
|
||||
|
||||
|
||||
// Inverted navbar
|
||||
// Reset inverted navbar basics
|
||||
$navbar-inverse-color: $gray-light !default;
|
||||
$navbar-inverse-bg: #222 !default;
|
||||
$navbar-inverse-border: darken($navbar-inverse-bg, 10%) !default;
|
||||
|
||||
// Inverted navbar links
|
||||
$navbar-inverse-link-color: $gray-light !default;
|
||||
$navbar-inverse-link-hover-color: #fff !default;
|
||||
$navbar-inverse-link-hover-bg: transparent !default;
|
||||
$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color !default;
|
||||
$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%) !default;
|
||||
$navbar-inverse-link-disabled-color: #444 !default;
|
||||
$navbar-inverse-link-disabled-bg: transparent !default;
|
||||
|
||||
// Inverted navbar brand label
|
||||
$navbar-inverse-brand-color: $navbar-inverse-link-color !default;
|
||||
$navbar-inverse-brand-hover-color: #fff !default;
|
||||
$navbar-inverse-brand-hover-bg: transparent !default;
|
||||
|
||||
// Inverted navbar toggle
|
||||
$navbar-inverse-toggle-hover-bg: #333 !default;
|
||||
$navbar-inverse-toggle-icon-bar-bg: #fff !default;
|
||||
$navbar-inverse-toggle-border-color: #333 !default;
|
||||
|
||||
|
||||
//== Navs
|
||||
//
|
||||
//##
|
||||
|
||||
//=== Shared nav styles
|
||||
$nav-link-padding: 10px 15px !default;
|
||||
$nav-link-hover-bg: $gray-lighter !default;
|
||||
|
||||
$nav-disabled-link-color: $gray-light !default;
|
||||
$nav-disabled-link-hover-color: $gray-light !default;
|
||||
|
||||
$nav-open-link-hover-color: #fff !default;
|
||||
|
||||
//== Tabs
|
||||
$nav-tabs-border-color: #ddd !default;
|
||||
|
||||
$nav-tabs-link-hover-border-color: $gray-lighter !default;
|
||||
|
||||
$nav-tabs-active-link-hover-bg: $body-bg !default;
|
||||
$nav-tabs-active-link-hover-color: $gray !default;
|
||||
$nav-tabs-active-link-hover-border-color: #ddd !default;
|
||||
|
||||
$nav-tabs-justified-link-border-color: #ddd !default;
|
||||
$nav-tabs-justified-active-link-border-color: $body-bg !default;
|
||||
|
||||
//== Pills
|
||||
$nav-pills-border-radius: $border-radius-base !default;
|
||||
$nav-pills-active-link-hover-bg: $component-active-bg !default;
|
||||
$nav-pills-active-link-hover-color: $component-active-color !default;
|
||||
|
||||
|
||||
//== Pagination
|
||||
//
|
||||
//##
|
||||
|
||||
$pagination-color: $link-color !default;
|
||||
$pagination-bg: #fff !default;
|
||||
$pagination-border: #ddd !default;
|
||||
|
||||
$pagination-hover-color: $link-hover-color !default;
|
||||
$pagination-hover-bg: $gray-lighter !default;
|
||||
$pagination-hover-border: #ddd !default;
|
||||
|
||||
$pagination-active-color: #fff !default;
|
||||
$pagination-active-bg: $brand-primary !default;
|
||||
$pagination-active-border: $brand-primary !default;
|
||||
|
||||
$pagination-disabled-color: $gray-light !default;
|
||||
$pagination-disabled-bg: #fff !default;
|
||||
$pagination-disabled-border: #ddd !default;
|
||||
|
||||
|
||||
//== Pager
|
||||
//
|
||||
//##
|
||||
|
||||
$pager-bg: $pagination-bg !default;
|
||||
$pager-border: $pagination-border !default;
|
||||
$pager-border-radius: 15px !default;
|
||||
|
||||
$pager-hover-bg: $pagination-hover-bg !default;
|
||||
|
||||
$pager-active-bg: $pagination-active-bg !default;
|
||||
$pager-active-color: $pagination-active-color !default;
|
||||
|
||||
$pager-disabled-color: $pagination-disabled-color !default;
|
||||
|
||||
|
||||
//== Jumbotron
|
||||
//
|
||||
//##
|
||||
|
||||
$jumbotron-padding: 30px !default;
|
||||
$jumbotron-color: inherit !default;
|
||||
$jumbotron-bg: $gray-lighter !default;
|
||||
$jumbotron-heading-color: inherit !default;
|
||||
$jumbotron-font-size: ceil(($font-size-base * 1.5)) !default;
|
||||
|
||||
|
||||
//== Form states and alerts
|
||||
//
|
||||
//## Define colors for form feedback states and, by default, alerts.
|
||||
|
||||
$state-success-text: #3c763d !default;
|
||||
$state-success-bg: #dff0d8 !default;
|
||||
$state-success-border: darken(adjust-hue($state-success-bg, -10), 5%) !default;
|
||||
|
||||
$state-info-text: #31708f !default;
|
||||
$state-info-bg: #d9edf7 !default;
|
||||
$state-info-border: darken(adjust-hue($state-info-bg, -10), 7%) !default;
|
||||
|
||||
$state-warning-text: #8a6d3b !default;
|
||||
$state-warning-bg: #fcf8e3 !default;
|
||||
$state-warning-border: darken(adjust-hue($state-warning-bg, -10), 5%) !default;
|
||||
|
||||
$state-danger-text: #a94442 !default;
|
||||
$state-danger-bg: #f2dede !default;
|
||||
$state-danger-border: darken(adjust-hue($state-danger-bg, -10), 5%) !default;
|
||||
|
||||
|
||||
//== Tooltips
|
||||
//
|
||||
//##
|
||||
|
||||
//** Tooltip max width
|
||||
$tooltip-max-width: 200px !default;
|
||||
//** Tooltip text color
|
||||
$tooltip-color: #fff !default;
|
||||
//** Tooltip background color
|
||||
$tooltip-bg: #000 !default;
|
||||
$tooltip-opacity: .9 !default;
|
||||
|
||||
//** Tooltip arrow width
|
||||
$tooltip-arrow-width: 5px !default;
|
||||
//** Tooltip arrow color
|
||||
$tooltip-arrow-color: $tooltip-bg !default;
|
||||
|
||||
|
||||
//== Popovers
|
||||
//
|
||||
//##
|
||||
|
||||
//** Popover body background color
|
||||
$popover-bg: #fff !default;
|
||||
//** Popover maximum width
|
||||
$popover-max-width: 276px !default;
|
||||
//** Popover border color
|
||||
$popover-border-color: rgba(0,0,0,.2) !default;
|
||||
//** Popover fallback border color
|
||||
$popover-fallback-border-color: #ccc !default;
|
||||
|
||||
//** Popover title background color
|
||||
$popover-title-bg: darken($popover-bg, 3%) !default;
|
||||
|
||||
//** Popover arrow width
|
||||
$popover-arrow-width: 10px !default;
|
||||
//** Popover arrow color
|
||||
$popover-arrow-color: #fff !default;
|
||||
|
||||
//** Popover outer arrow width
|
||||
$popover-arrow-outer-width: ($popover-arrow-width + 1) !default;
|
||||
//** Popover outer arrow color
|
||||
$popover-arrow-outer-color: fadein($popover-border-color, 5%) !default;
|
||||
//** Popover outer arrow fallback color
|
||||
$popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%) !default;
|
||||
|
||||
|
||||
//== Labels
|
||||
//
|
||||
//##
|
||||
|
||||
//** Default label background color
|
||||
$label-default-bg: $gray-light !default;
|
||||
//** Primary label background color
|
||||
$label-primary-bg: $brand-primary !default;
|
||||
//** Success label background color
|
||||
$label-success-bg: $brand-success !default;
|
||||
//** Info label background color
|
||||
$label-info-bg: $brand-info !default;
|
||||
//** Warning label background color
|
||||
$label-warning-bg: $brand-warning !default;
|
||||
//** Danger label background color
|
||||
$label-danger-bg: $brand-danger !default;
|
||||
|
||||
//** Default label text color
|
||||
$label-color: #fff !default;
|
||||
//** Default text color of a linked label
|
||||
$label-link-hover-color: #fff !default;
|
||||
|
||||
|
||||
//== Modals
|
||||
//
|
||||
//##
|
||||
|
||||
//** Padding applied to the modal body
|
||||
$modal-inner-padding: 20px !default;
|
||||
|
||||
//** Padding applied to the modal title
|
||||
$modal-title-padding: 15px !default;
|
||||
//** Modal title line-height
|
||||
$modal-title-line-height: $line-height-base !default;
|
||||
|
||||
//** Background color of modal content area
|
||||
$modal-content-bg: #fff !default;
|
||||
//** Modal content border color
|
||||
$modal-content-border-color: rgba(0,0,0,.2) !default;
|
||||
//** Modal content border color **for IE8**
|
||||
$modal-content-fallback-border-color: #999 !default;
|
||||
|
||||
//** Modal backdrop background color
|
||||
$modal-backdrop-bg: #000 !default;
|
||||
//** Modal backdrop opacity
|
||||
$modal-backdrop-opacity: .5 !default;
|
||||
//** Modal header border color
|
||||
$modal-header-border-color: #e5e5e5 !default;
|
||||
//** Modal footer border color
|
||||
$modal-footer-border-color: $modal-header-border-color !default;
|
||||
|
||||
$modal-lg: 900px !default;
|
||||
$modal-md: 600px !default;
|
||||
$modal-sm: 300px !default;
|
||||
|
||||
|
||||
//== Alerts
|
||||
//
|
||||
//## Define alert colors, border radius, and padding.
|
||||
|
||||
$alert-padding: 15px !default;
|
||||
$alert-border-radius: $border-radius-base !default;
|
||||
$alert-link-font-weight: bold !default;
|
||||
|
||||
$alert-success-bg: $state-success-bg !default;
|
||||
$alert-success-text: $state-success-text !default;
|
||||
$alert-success-border: $state-success-border !default;
|
||||
|
||||
$alert-info-bg: $state-info-bg !default;
|
||||
$alert-info-text: $state-info-text !default;
|
||||
$alert-info-border: $state-info-border !default;
|
||||
|
||||
$alert-warning-bg: $state-warning-bg !default;
|
||||
$alert-warning-text: $state-warning-text !default;
|
||||
$alert-warning-border: $state-warning-border !default;
|
||||
|
||||
$alert-danger-bg: $state-danger-bg !default;
|
||||
$alert-danger-text: $state-danger-text !default;
|
||||
$alert-danger-border: $state-danger-border !default;
|
||||
|
||||
|
||||
//== Progress bars
|
||||
//
|
||||
//##
|
||||
|
||||
//** Background color of the whole progress component
|
||||
$progress-bg: #f5f5f5 !default;
|
||||
//** Progress bar text color
|
||||
$progress-bar-color: #fff !default;
|
||||
|
||||
//** Default progress bar color
|
||||
$progress-bar-bg: $brand-primary !default;
|
||||
//** Success progress bar color
|
||||
$progress-bar-success-bg: $brand-success !default;
|
||||
//** Warning progress bar color
|
||||
$progress-bar-warning-bg: $brand-warning !default;
|
||||
//** Danger progress bar color
|
||||
$progress-bar-danger-bg: $brand-danger !default;
|
||||
//** Info progress bar color
|
||||
$progress-bar-info-bg: $brand-info !default;
|
||||
|
||||
|
||||
//== List group
|
||||
//
|
||||
//##
|
||||
|
||||
//** Background color on `.list-group-item`
|
||||
$list-group-bg: #fff !default;
|
||||
//** `.list-group-item` border color
|
||||
$list-group-border: #ddd !default;
|
||||
//** List group border radius
|
||||
$list-group-border-radius: $border-radius-base !default;
|
||||
|
||||
//** Background color of single list elements on hover
|
||||
$list-group-hover-bg: #f5f5f5 !default;
|
||||
//** Text color of active list elements
|
||||
$list-group-active-color: $component-active-color !default;
|
||||
//** Background color of active list elements
|
||||
$list-group-active-bg: $component-active-bg !default;
|
||||
//** Border color of active list elements
|
||||
$list-group-active-border: $list-group-active-bg !default;
|
||||
$list-group-active-text-color: lighten($list-group-active-bg, 40%) !default;
|
||||
|
||||
$list-group-link-color: #555 !default;
|
||||
$list-group-link-heading-color: #333 !default;
|
||||
|
||||
|
||||
//== Panels
|
||||
//
|
||||
//##
|
||||
|
||||
$panel-bg: #fff !default;
|
||||
$panel-body-padding: 15px !default;
|
||||
$panel-border-radius: $border-radius-base !default;
|
||||
|
||||
//** Border color for elements within panels
|
||||
$panel-inner-border: #ddd !default;
|
||||
$panel-footer-bg: #f5f5f5 !default;
|
||||
|
||||
$panel-default-text: $gray-dark !default;
|
||||
$panel-default-border: #ddd !default;
|
||||
$panel-default-heading-bg: #f5f5f5 !default;
|
||||
|
||||
$panel-primary-text: #fff !default;
|
||||
$panel-primary-border: $brand-primary !default;
|
||||
$panel-primary-heading-bg: $brand-primary !default;
|
||||
|
||||
$panel-success-text: $state-success-text !default;
|
||||
$panel-success-border: $state-success-border !default;
|
||||
$panel-success-heading-bg: $state-success-bg !default;
|
||||
|
||||
$panel-info-text: $state-info-text !default;
|
||||
$panel-info-border: $state-info-border !default;
|
||||
$panel-info-heading-bg: $state-info-bg !default;
|
||||
|
||||
$panel-warning-text: $state-warning-text !default;
|
||||
$panel-warning-border: $state-warning-border !default;
|
||||
$panel-warning-heading-bg: $state-warning-bg !default;
|
||||
|
||||
$panel-danger-text: $state-danger-text !default;
|
||||
$panel-danger-border: $state-danger-border !default;
|
||||
$panel-danger-heading-bg: $state-danger-bg !default;
|
||||
|
||||
|
||||
//== Thumbnails
|
||||
//
|
||||
//##
|
||||
|
||||
//** Padding around the thumbnail image
|
||||
$thumbnail-padding: 4px !default;
|
||||
//** Thumbnail background color
|
||||
$thumbnail-bg: $body-bg !default;
|
||||
//** Thumbnail border color
|
||||
$thumbnail-border: #ddd !default;
|
||||
//** Thumbnail border radius
|
||||
$thumbnail-border-radius: $border-radius-base !default;
|
||||
|
||||
//** Custom text color for thumbnail captions
|
||||
$thumbnail-caption-color: $text-color !default;
|
||||
//** Padding around the thumbnail caption
|
||||
$thumbnail-caption-padding: 9px !default;
|
||||
|
||||
|
||||
//== Wells
|
||||
//
|
||||
//##
|
||||
|
||||
$well-bg: #f5f5f5 !default;
|
||||
$well-border: darken($well-bg, 7%) !default;
|
||||
|
||||
|
||||
//== Badges
|
||||
//
|
||||
//##
|
||||
|
||||
$badge-color: #fff !default;
|
||||
//** Linked badge text color on hover
|
||||
$badge-link-hover-color: #fff !default;
|
||||
$badge-bg: $gray-light !default;
|
||||
|
||||
//** Badge text color in active nav link
|
||||
$badge-active-color: $link-color !default;
|
||||
//** Badge background color in active nav link
|
||||
$badge-active-bg: #fff !default;
|
||||
|
||||
$badge-font-weight: bold !default;
|
||||
$badge-line-height: 1 !default;
|
||||
$badge-border-radius: 10px !default;
|
||||
|
||||
|
||||
//== Breadcrumbs
|
||||
//
|
||||
//##
|
||||
|
||||
$breadcrumb-padding-vertical: 8px !default;
|
||||
$breadcrumb-padding-horizontal: 15px !default;
|
||||
//** Breadcrumb background color
|
||||
$breadcrumb-bg: #f5f5f5 !default;
|
||||
//** Breadcrumb text color
|
||||
$breadcrumb-color: #ccc !default;
|
||||
//** Text color of current page in the breadcrumb
|
||||
$breadcrumb-active-color: $gray-light !default;
|
||||
//** Textual separator for between breadcrumb elements
|
||||
$breadcrumb-separator: "/" !default;
|
||||
|
||||
|
||||
//== Carousel
|
||||
//
|
||||
//##
|
||||
|
||||
$carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6) !default;
|
||||
|
||||
$carousel-control-color: #fff !default;
|
||||
$carousel-control-width: 15% !default;
|
||||
$carousel-control-opacity: .5 !default;
|
||||
$carousel-control-font-size: 20px !default;
|
||||
|
||||
$carousel-indicator-active-bg: #fff !default;
|
||||
$carousel-indicator-border-color: #fff !default;
|
||||
|
||||
$carousel-caption-color: #fff !default;
|
||||
|
||||
|
||||
//== Close
|
||||
//
|
||||
//##
|
||||
|
||||
$close-font-weight: bold !default;
|
||||
$close-color: #000 !default;
|
||||
$close-text-shadow: 0 1px 0 #fff !default;
|
||||
|
||||
|
||||
//== Code
|
||||
//
|
||||
//##
|
||||
|
||||
$code-color: #c7254e !default;
|
||||
$code-bg: #f9f2f4 !default;
|
||||
|
||||
$kbd-color: #fff !default;
|
||||
$kbd-bg: #333 !default;
|
||||
|
||||
$pre-bg: #f5f5f5 !default;
|
||||
$pre-color: $gray-dark !default;
|
||||
$pre-border-color: #ccc !default;
|
||||
$pre-scrollable-max-height: 340px !default;
|
||||
|
||||
|
||||
//== Type
|
||||
//
|
||||
//##
|
||||
|
||||
//** Text muted color
|
||||
$text-muted: $gray-light !default;
|
||||
//** Abbreviations and acronyms border color
|
||||
$abbr-border-color: $gray-light !default;
|
||||
//** Headings small color
|
||||
$headings-small-color: $gray-light !default;
|
||||
//** Blockquote small color
|
||||
$blockquote-small-color: $gray-light !default;
|
||||
//** Blockquote font size
|
||||
$blockquote-font-size: ($font-size-base * 1.25) !default;
|
||||
//** Blockquote border color
|
||||
$blockquote-border-color: $gray-lighter !default;
|
||||
//** Page header border color
|
||||
$page-header-border-color: $gray-lighter !default;
|
||||
|
||||
|
||||
//== Miscellaneous
|
||||
//
|
||||
//##
|
||||
|
||||
//** Horizontal line color.
|
||||
$hr-border: $gray-lighter !default;
|
||||
|
||||
//** Horizontal offset for forms and lists.
|
||||
$component-offset-horizontal: 180px !default;
|
|
@ -1,3 +1,7 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
@import "variables";
|
||||
|
||||
html {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// Set Triangle
|
||||
@import "variables";
|
||||
@mixin arrow($direction, $width, $height, $color) {
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
@import "variables";
|
||||
$theme-white: #fff;
|
||||
$orbit-bg-color: #333;
|
||||
$orbit-bg-hover-color: #0095CF;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
@import "variables";
|
||||
.pagination {
|
||||
li {
|
||||
a {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
@import "variables";
|
||||
// Title
|
||||
.unity-title {
|
||||
margin: 0.5em 0;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
@import "bootstrap/mixins";
|
||||
@import "bootstrap/variables";
|
||||
@import "base/mixins";
|
||||
@import "base/variables";
|
|
@ -0,0 +1,6 @@
|
|||
@import url("http://fonts.googleapis.com/css?family=Droid+Sans:400,700");
|
||||
@import "bootstrap/mixins";
|
||||
@import "bootstrap/variables";
|
||||
@import "base/mixins";
|
||||
@import "base/variables";
|
||||
@import "base/unity";
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
.layout-content {
|
||||
min-height: 600px;
|
||||
margin-bottom: 2em;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
.layout-footer {
|
||||
padding: 2em 0;
|
||||
color: #999999;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
.layout-header {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
.layout-slide {
|
||||
position: relative;
|
||||
margin-bottom: 2rem;
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
@charset 'utf-8';
|
||||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
//
|
||||
// Widget
|
||||
//
|
||||
|
||||
// Widget
|
||||
// ## gerenral styles
|
||||
.w-ad-banner {
|
||||
position: relative;
|
||||
|
||||
.cursor {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Widget 1
|
||||
.ad-banner-widget-1 {
|
||||
.w-ad-banner__wrap {
|
||||
|
@ -23,124 +29,138 @@
|
|||
height: auto;
|
||||
}
|
||||
.w-ad-banner__caption {
|
||||
z-index: 200;
|
||||
padding: .5em 1em;
|
||||
color: $theme-white;
|
||||
background: $theme-color-main;
|
||||
color: $theme-white;
|
||||
z-index: 200;
|
||||
padding: 0.5em 1em;
|
||||
|
||||
h2 {
|
||||
font-family: $main-font;
|
||||
font-size: $w-caption-font-size;
|
||||
margin: .5em 0;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-family: $main-font;
|
||||
font-size: $w-caption-desc;
|
||||
}
|
||||
|
||||
}
|
||||
.w-ad-banner__pager {
|
||||
@include list-reset();
|
||||
position: absolute;
|
||||
z-index: 120;
|
||||
right: 1em;
|
||||
top: 1em;
|
||||
right: 1em;
|
||||
@include list-reset();
|
||||
z-index: 200;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
width: .8em;
|
||||
height: .8em;
|
||||
margin-right: .25em;
|
||||
opacity: .5;
|
||||
border-radius: 50%;
|
||||
background: $theme-color-main;
|
||||
display: inline-block;
|
||||
margin-right: 0.25em;
|
||||
width: 0.8em;
|
||||
height: 0.8em;
|
||||
border-radius: 50%;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.active-slide a {
|
||||
|
||||
.active-slide a{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Widget 2
|
||||
.ad-banner-widget-2 {
|
||||
.w-ad-banner__wrap {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__slide {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.youtube,
|
||||
.cycle-youtube {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
object,
|
||||
embed {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.w-ad-banner__pager {
|
||||
position: absolute;
|
||||
z-index: 102;
|
||||
right: 1em;
|
||||
bottom: 1em;
|
||||
@include list-reset();
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
a {
|
||||
display: inline-block;
|
||||
width: .8em;
|
||||
height: .8em;
|
||||
margin-right: .25em;
|
||||
opacity: .5;
|
||||
border-radius: 50%;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.active-slide a {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Widget 3
|
||||
.ad-banner-widget-3 {
|
||||
.w-ad-banner__wrap {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__slide {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.w-ad-banner__pager {
|
||||
position: absolute;
|
||||
z-index: 120;
|
||||
right: 1em;
|
||||
bottom: 1em;
|
||||
@include list-reset();
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
a {
|
||||
display: inline-block;
|
||||
width: .8em;
|
||||
height: .8em;
|
||||
margin-right: .25em;
|
||||
opacity: .5;
|
||||
border-radius: 50%;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.active-slide a {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cycle-slide-active {
|
||||
z-index: 101 !important;
|
||||
}
|
||||
|
||||
// Widget 2
|
||||
.ad-banner-widget-2 {
|
||||
.w-ad-banner__wrap {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__slide {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.youtube {
|
||||
}
|
||||
.youtube, .cycle-youtube {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
object, embed{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.w-ad-banner__pager {
|
||||
@include list-reset();
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
bottom: 1em;
|
||||
z-index: 102;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
a {
|
||||
background: $theme-color-main;
|
||||
display: inline-block;
|
||||
margin-right: 0.25em;
|
||||
width: 0.8em;
|
||||
height: 0.8em;
|
||||
border-radius: 50%;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.active-slide a{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Widget 3
|
||||
.ad-banner-widget-3 {
|
||||
.w-ad-banner__wrap {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__slide {
|
||||
width: 100%;
|
||||
}
|
||||
.w-ad-banner__image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.w-ad-banner__pager {
|
||||
@include list-reset();
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
bottom: 1em;
|
||||
z-index: 200;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
a {
|
||||
background: $theme-color-main;
|
||||
display: inline-block;
|
||||
margin-right: 0.25em;
|
||||
width: 0.8em;
|
||||
height: 0.8em;
|
||||
border-radius: 50%;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.active-slide a{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cycle-slide-active{
|
||||
z-index: 101 !important;
|
||||
}
|
|
@ -1,352 +1,374 @@
|
|||
@charset 'utf-8';
|
||||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
//
|
||||
// Widget
|
||||
//
|
||||
|
||||
// Announcement widget
|
||||
// ## Gerneral styles for widgets
|
||||
.w-annc {
|
||||
.w-annc__widget-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
.w-annc__list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.w-annc__item {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.label {
|
||||
font-size: .75rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
.w-annc__meta {
|
||||
.w-annc__status-wrap, .w-annc__postdate-wrap, .w-annc__category-wrap {
|
||||
font-size: .8125em;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
margin-right: .2em;
|
||||
color: $theme-gray;
|
||||
.w-annc__widget-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
i {
|
||||
color: $theme-gray;
|
||||
.w-annc__list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
.status-top {
|
||||
background: $theme-color-second;
|
||||
}
|
||||
.status-hot {
|
||||
background: $theme-color-third;
|
||||
}
|
||||
.w-annc__subtitle {
|
||||
font-size: .8125em;
|
||||
color: $theme-gray;
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $sub-font;
|
||||
font-size: .8125rem;
|
||||
text-decoration: none;
|
||||
color: $theme-color-main;
|
||||
&:hover {
|
||||
color: darken($theme-color-main, 10%);
|
||||
.w-annc__item {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
.w-annc__meta {
|
||||
.w-annc__status-wrap,
|
||||
.w-annc__postdate-wrap,
|
||||
.w-annc__category-wrap {
|
||||
display: inline-block;
|
||||
margin-right: 0.2em;
|
||||
font-size: 0.8125em;
|
||||
color: $theme-gray;
|
||||
font-weight: normal;
|
||||
}
|
||||
i {
|
||||
color: $theme-gray;
|
||||
}
|
||||
}
|
||||
.status-top {
|
||||
background: $theme-color-second;
|
||||
}
|
||||
.status-hot {
|
||||
background: $theme-color-third;
|
||||
}
|
||||
.w-annc__subtitle {
|
||||
font-size: 0.8125em;
|
||||
color: $theme-gray;
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $sub-font;
|
||||
color: $theme-color-main;
|
||||
text-decoration: none;
|
||||
font-size: 0.8125rem;
|
||||
&:hover {
|
||||
color: darken($theme-color-main, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-1
|
||||
.widget-announcement-1 {
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
line-height: 1.3;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-2
|
||||
.widget-announcement-2 {
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
line-height: 1.3;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-3
|
||||
.widget-announcement-3 {
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
line-height: 1.3;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-4
|
||||
.widget-announcement-4 {
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.w-annc__list > .w-annc__item:nth-child(3n+1) {
|
||||
clear: both;
|
||||
}
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
line-height: 1.3;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
.w-annc__list > .w-annc__item:nth-child(3n+1) {
|
||||
clear: both;
|
||||
}
|
||||
.w-annc__img-wrap {
|
||||
height: 200px;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-5
|
||||
.widget-announcement-5 {
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.w-annc__item {
|
||||
margin-bottom: 1em;
|
||||
padding-bottom: 1em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__title {
|
||||
font-family: $main-font;
|
||||
line-height: 1.3;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
.w-annc__item {
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
padding-bottom: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-6
|
||||
.widget-announcement-6 {
|
||||
.w-annc__item {
|
||||
margin-bottom: .8em;
|
||||
padding-bottom: .8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0;
|
||||
}
|
||||
.w-annc__category-wrap,
|
||||
.w-annc__status,
|
||||
.w-annc__title,
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: .8125rem;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
}
|
||||
.w-annc__item {
|
||||
margin-bottom: 0.8em;
|
||||
padding-bottom: 0.8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0;
|
||||
}
|
||||
.w-annc__category-wrap,
|
||||
.w-annc__status,
|
||||
.w-annc__title,
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-7
|
||||
.widget-announcement-7 {
|
||||
.w-annc__item {
|
||||
margin-bottom: .8em;
|
||||
padding-bottom: .8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0;
|
||||
}
|
||||
.w-annc__category-wrap,
|
||||
.w-annc__status,
|
||||
.w-annc__title,
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: .75rem;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
}
|
||||
.w-annc__item {
|
||||
margin-bottom: 0.8em;
|
||||
padding-bottom: 0.8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0;
|
||||
}
|
||||
.w-annc__category-wrap,
|
||||
.w-annc__status,
|
||||
.w-annc__title,
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-8
|
||||
// ## Table
|
||||
.widget-announcement-8 {
|
||||
.w-annc__th {
|
||||
font-size: .8125em;
|
||||
color: $theme-white;
|
||||
border: 0;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.w-annc__status {
|
||||
font-size: .75rem;
|
||||
display: inline-block;
|
||||
}
|
||||
td {
|
||||
font-size: .8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.w-annc__th {
|
||||
color: #fff;
|
||||
background: $theme-color-main;
|
||||
font-size: 0.8125em;
|
||||
border: none;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
td {
|
||||
font-size: 0.8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-9
|
||||
// ## Table
|
||||
.widget-announcement-9 {
|
||||
.w-annc__th {
|
||||
font-size: .8125em;
|
||||
color: $theme-white;
|
||||
border: 0;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.w-annc__status {
|
||||
font-size: .75rem;
|
||||
display: inline-block;
|
||||
}
|
||||
td {
|
||||
font-size: .8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.w-annc__th {
|
||||
color: #fff;
|
||||
background: $theme-color-main;
|
||||
font-size: 0.8125em;
|
||||
border: none;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
td {
|
||||
font-size: 0.8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-10
|
||||
.widget-announcement-10 {
|
||||
.w-annc__item {
|
||||
margin-bottom: .8em;
|
||||
padding-bottom: .8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0;
|
||||
}
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: .8125em;
|
||||
}
|
||||
.w-annc__status {
|
||||
font-size: .75rem;
|
||||
display: inline-block;
|
||||
}
|
||||
.w-annc__item {
|
||||
margin-bottom: 0.8em;
|
||||
padding-bottom: 0.8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0;
|
||||
}
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: 0.8125em;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-11
|
||||
// ## Table
|
||||
.widget-announcement-11 {
|
||||
.w-annc__th {
|
||||
font-size: .8125em;
|
||||
color: $theme-white;
|
||||
border: 0;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.w-annc__status {
|
||||
font-size: .75rem;
|
||||
display: inline-block;
|
||||
}
|
||||
td {
|
||||
font-size: .8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.w-annc__th {
|
||||
color: #fff;
|
||||
background: $theme-color-main;
|
||||
font-size: 0.8125em;
|
||||
border: none;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
td {
|
||||
font-size: 0.8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget-12
|
||||
.widget-announcement-12 {
|
||||
.w-annc__list {
|
||||
padding: 0 15px;
|
||||
}
|
||||
.w-annc__img-wrap {
|
||||
height: 300px;
|
||||
margin-bottom: 15px;
|
||||
@media (min-width: $screen-md) {
|
||||
height: 200px;
|
||||
margin-bottom: 0;
|
||||
.w-annc__list {
|
||||
padding: 0 15px;
|
||||
}
|
||||
}
|
||||
.w-annc__item {
|
||||
margin-bottom: .8em;
|
||||
padding-bottom: .8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0 0 10px 0;
|
||||
@media (min-width: $screen-md) {
|
||||
margin-bottom: 0;
|
||||
.w-annc__img-wrap {
|
||||
height: 300px;
|
||||
margin-bottom: 15px;
|
||||
@media (min-width: $screen-md) {
|
||||
height: 200px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.w-annc__item {
|
||||
margin-bottom: 0.8em;
|
||||
padding-bottom: 0.8em;
|
||||
border-bottom: 1px dashed lighten($theme-gray, 65%);
|
||||
}
|
||||
.w-annc__entry-title {
|
||||
margin: 0 0 10px 0;
|
||||
@media (min-width: $screen-md) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: 0.8125em;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
}
|
||||
.w-annc__postdate {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
}
|
||||
.w-annc__postdate-wrap {
|
||||
font-size: .8125em;
|
||||
}
|
||||
.w-annc__status {
|
||||
display: inline-block;
|
||||
}
|
||||
.w-annc__postdate {
|
||||
font-size: .8125rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Announcement index
|
||||
// ## General style for index pages
|
||||
.i-annc {
|
||||
.i-annc__page-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
.i-annc__list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.status-top {
|
||||
background: $theme-color-second;
|
||||
}
|
||||
.status-hot {
|
||||
background: $theme-color-third;
|
||||
}
|
||||
.w-annc__widget-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
.i-annc__item {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.i-annc__img {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.label {
|
||||
font-size: .75rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
.i-annc__meta {
|
||||
.i-annc__status-wrap, .i-annc__postdate-wrap, .i-annc__category-wrap {
|
||||
font-size: .8125em;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
margin-right: .2em;
|
||||
color: $theme-gray;
|
||||
.i-annc__page-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
i {
|
||||
color: $theme-gray;
|
||||
.i-annc__list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
.i-annc__subtitle {
|
||||
font-size: .8125em;
|
||||
color: $theme-gray;
|
||||
}
|
||||
.i-annc__entry-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.i-annc__title {
|
||||
font-family: $sub-font;
|
||||
font-size: .8125rem;
|
||||
text-decoration: none;
|
||||
color: $theme-color-main;
|
||||
&:hover {
|
||||
color: darken($theme-color-main, 10%);
|
||||
.status-top {
|
||||
background: $theme-color-second;
|
||||
}
|
||||
.status-hot {
|
||||
background: $theme-color-third;
|
||||
}
|
||||
.w-annc__widget-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
.i-annc__item {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.i-annc__img {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
.i-annc__meta {
|
||||
.i-annc__status-wrap,
|
||||
.i-annc__postdate-wrap,
|
||||
.i-annc__category-wrap {
|
||||
display: inline-block;
|
||||
margin-right: 0.2em;
|
||||
font-size: 0.8125em;
|
||||
color: $theme-gray;
|
||||
font-weight: normal;
|
||||
}
|
||||
i {
|
||||
color: $theme-gray;
|
||||
}
|
||||
}
|
||||
.i-annc__subtitle {
|
||||
font-size: 0.8125em;
|
||||
color: $theme-gray;
|
||||
}
|
||||
.i-annc__entry-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.i-annc__title {
|
||||
font-family: $sub-font;
|
||||
color: $theme-color-main;
|
||||
text-decoration: none;
|
||||
font-size: 0.8125rem;
|
||||
&:hover {
|
||||
color: darken($theme-color-main, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Index-1
|
||||
.index-announcement-1 {
|
||||
.i-annc__th {
|
||||
font-size: .8125em;
|
||||
color: $theme-white;
|
||||
border: 0;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
td {
|
||||
font-size: .8125rem;
|
||||
}
|
||||
.i-annc__title:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.i-annc__th {
|
||||
color: #fff;
|
||||
background: $theme-color-main;
|
||||
font-size: 0.8125em;
|
||||
border: none;
|
||||
}
|
||||
td {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
.i-annc__title:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Index-2
|
||||
.index-announcement-2,
|
||||
.index-announcement-3 {
|
||||
|
@ -359,115 +381,74 @@
|
|||
line-height: 1.3;
|
||||
}
|
||||
}
|
||||
|
||||
// Announcement show
|
||||
.s-annc {
|
||||
.s-annc__show-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
.s-annc__meta-wrap {
|
||||
border-bottom: 1px solid $theme-gray-light;
|
||||
@include clearfix;
|
||||
.s-annc__meta--item {
|
||||
font-size: .875rem;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
margin-bottom: .6em;
|
||||
i {
|
||||
color: darken($theme-gray-light, 10%);
|
||||
}
|
||||
.s-annc__show-title {
|
||||
@extend .unity-title;
|
||||
}
|
||||
.s-annc__tag-wrap {
|
||||
position: relative;
|
||||
float: none;
|
||||
clear: both;
|
||||
margin-right: 0;
|
||||
padding-left: 1.6em;
|
||||
i {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
left: 0;
|
||||
}
|
||||
.s-annc__meta-wrap {
|
||||
border-bottom: 1px solid $theme-gray-light;
|
||||
@include clearfix;
|
||||
.s-annc__meta--item {
|
||||
font-size: 0.875rem;
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.6em;
|
||||
float: left;
|
||||
i {
|
||||
color: darken($theme-gray-light, 10%);
|
||||
}
|
||||
}
|
||||
.s-annc__tag-wrap {
|
||||
position: relative;
|
||||
margin-right: 0;
|
||||
padding-left: 1.6em;
|
||||
clear: both;
|
||||
float: none;
|
||||
i {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.s-annc__tag-wrap {
|
||||
.s-annc__tag {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
.s-annc__tag-wrap {
|
||||
.s-annc__tag {
|
||||
font-weight: normal;
|
||||
}
|
||||
.s-annc__post-wrap {
|
||||
@include clearfix;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
}
|
||||
.s-annc__post-wrap {
|
||||
margin-bottom: 2em;
|
||||
@include clearfix;
|
||||
}
|
||||
.s-annc__related-wrap {
|
||||
padding-top: 1em;
|
||||
border-top: 1px dotted $theme-gray-light;
|
||||
}
|
||||
.s-annc__related-file {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.s-annc__related-file,
|
||||
.s-annc__related-link {
|
||||
padding-bottom: 6px;
|
||||
padding-left: 1.6em;
|
||||
i {
|
||||
float: left;
|
||||
margin: 8px 0 0 -1.6em;
|
||||
color: darken($theme-gray-light, 10%);
|
||||
.s-annc__related-wrap {
|
||||
padding-top: 1em;
|
||||
border-top: 1px dotted $theme-gray-light;
|
||||
}
|
||||
}
|
||||
.s-annc__related-link-list,
|
||||
.s-annc__related-file-list {
|
||||
display: inline-block;
|
||||
}
|
||||
.s-annc__flie-title {
|
||||
overflow: hidden;
|
||||
max-width: 9.375rem;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Widget
|
||||
//
|
||||
// Admission widget
|
||||
// ## Gerneral styles for widgets
|
||||
// Widget-8
|
||||
// ## Table
|
||||
.widget-admission-1 {
|
||||
.w-adm__th {
|
||||
font-size: .8125em;
|
||||
color: $theme-white;
|
||||
border: 0;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.w-adm__status {
|
||||
font-size: .75rem;
|
||||
display: inline-block;
|
||||
}
|
||||
td {
|
||||
font-size: .8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
// ## Table
|
||||
.widget-admission-1 {
|
||||
.w-adm__th {
|
||||
font-size: .8125em;
|
||||
color: $theme-white;
|
||||
border: 0;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.w-adm__status {
|
||||
font-size: .75rem;
|
||||
display: inline-block;
|
||||
}
|
||||
td {
|
||||
font-size: .8125em;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
.s-annc__related-file {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.s-annc__related-file,
|
||||
.s-annc__related-link {
|
||||
padding-bottom: 6px;
|
||||
padding-left: 1.6em;
|
||||
i {
|
||||
margin: 8px 0 0 -1.6em;
|
||||
float: left;
|
||||
color: darken($theme-gray-light, 10%);
|
||||
}
|
||||
a {
|
||||
|
||||
}
|
||||
}
|
||||
.s-annc__related-link-list,
|
||||
.s-annc__related-file-list {
|
||||
display: inline-block;
|
||||
}
|
||||
.s-annc__flie-title {
|
||||
max-width: 9.375rem;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import "../initial";
|
||||
//
|
||||
// Widget
|
||||
//
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
// Faqs MODULES
|
||||
.widget-faqs {
|
||||
&.widget1 {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
// Gallery MODULES
|
||||
.widget-gallery {
|
||||
.widget-title {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
// Member index page
|
||||
.index-member {
|
||||
.index-title {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
.modules-menu {
|
||||
font-family: $sub-font;
|
||||
max-height: none;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.plugin-show-table th{
|
||||
text-align: right;
|
||||
min-width: 80px;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
// Link MODULES
|
||||
.widget-link {
|
||||
// 在 layout-content 下的樣式
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
// Base
|
||||
@import "bootstrap/mixins";
|
||||
@import "bootstrap/variables";
|
||||
@import "base/mixins";
|
||||
@import "base/variables";
|
||||
@import "base/unity";
|
||||
@import "base/pagination";
|
||||
@import "base/orbitbar-override";
|
||||
@import "base/global";
|
||||
|
||||
// Layout
|
||||
@import "layout/header";
|
||||
@import "layout/slide";
|
||||
@import "layout/content";
|
||||
@import "layout/footer";
|
||||
// // Modules
|
||||
|
||||
// Modules
|
||||
@import "modules/menu";
|
||||
@import "modules/ad_banner";
|
||||
@import "modules/announcement";
|
||||
|
@ -22,7 +19,7 @@
|
|||
@import "modules/archives";
|
||||
@import "modules/member";
|
||||
@import "modules/personal_plugin";
|
||||
|
||||
// Widget
|
||||
@import "widget/breadcrumb";
|
||||
@import "widget/sitemenu";
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
.widget-breadcrumb {
|
||||
&.widget1 {
|
||||
li {
|
||||
|
|
|
@ -1,53 +1,55 @@
|
|||
.sitemenu-wrap {
|
||||
padding: 10px 0;
|
||||
@include clearfix;
|
||||
.sitemenu__title {
|
||||
display: none;
|
||||
}
|
||||
.sitemenu__list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.sitemenu__item.level-1 {
|
||||
font-size: 0.8125rem;
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-right: 1%;
|
||||
margin-bottom: 12px;
|
||||
padding: 8px .8em;
|
||||
padding-bottom: 8px;
|
||||
color: $theme-white;
|
||||
border-radius: .2em;
|
||||
background: $theme-color-second;
|
||||
&:hover {
|
||||
background: darken($theme-color-second, 10%);
|
||||
}
|
||||
}
|
||||
.sitemenu__link.level-1 {
|
||||
margin-right: .25rem;
|
||||
color: $theme-white;
|
||||
}
|
||||
.sitemenu___dropdown-toggle {
|
||||
font-size: 0.75rem;
|
||||
padding: 2px .3125rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
// sitemenu dropdown
|
||||
.sitemenu__list.dropdown-menu {
|
||||
min-width: 100%;
|
||||
margin-top: 4px;
|
||||
border: none;
|
||||
border-radius: .2em;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.sitemenu__link.level-2 {
|
||||
color: $theme-white;
|
||||
font-size: 0.8125rem;
|
||||
padding: 4px 0.625rem;
|
||||
&:hover {
|
||||
background: lighten($theme-color-second, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
@charset "utf-8";
|
||||
@import "../initial";
|
||||
|
||||
.sitemenu-wrap {
|
||||
padding: 10px 0;
|
||||
@include clearfix;
|
||||
.sitemenu__title {
|
||||
display: none;
|
||||
}
|
||||
.sitemenu__list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.sitemenu__item.level-1 {
|
||||
font-size: 0.8125rem;
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-right: 1%;
|
||||
margin-bottom: 12px;
|
||||
padding: 8px .8em;
|
||||
padding-bottom: 8px;
|
||||
color: #fff;
|
||||
border-radius: .2em;
|
||||
background: $theme-color-second;
|
||||
&:hover {
|
||||
background: darken($theme-color-second, 10%);
|
||||
}
|
||||
}
|
||||
.sitemenu__link.level-1 {
|
||||
margin-right: .25rem;
|
||||
color: #fff;
|
||||
}
|
||||
.sitemenu___dropdown-toggle {
|
||||
font-size: 0.75rem;
|
||||
padding: 2px .3125rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
// sitemenu dropdown
|
||||
.sitemenu__list.dropdown-menu {
|
||||
min-width: 100%;
|
||||
margin-top: 4px;
|
||||
border: none;
|
||||
border-radius: .2em;
|
||||
background: $theme-color-main;
|
||||
}
|
||||
.sitemenu__link.level-2 {
|
||||
color: #fff;
|
||||
font-size: 0.8125rem;
|
||||
padding: 4px 0.625rem;
|
||||
&:hover {
|
||||
background: lighten($theme-color-second, 5%);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<footer class="layout-footer">
|
||||
<div class="container layout-footer-inner">
|
||||
<div class="layout-footer-content">{{footer-data}}</div>
|
||||
<div>{{site-counter}}</div>
|
||||
<div class="footer-counter">{{site-counter}}</div>
|
||||
</div>
|
||||
</footer>
|
|
@ -6,7 +6,7 @@
|
|||
<body class="page-home">
|
||||
<%= render_orbit_bar %>
|
||||
<%= render_header %>
|
||||
<section class="layout-slide" data-pp="4"></section>
|
||||
<section class="layout-slide" data-pp="300"></section>
|
||||
<div class="layout-content">
|
||||
<div class="layout-content-inner container">
|
||||
<section class="layout-content-box" data-pp="1"></section>
|
||||
|
|
|
@ -6,18 +6,20 @@
|
|||
<body class="internal-page">
|
||||
<%= render_orbit_bar %>
|
||||
<%= render_header %>
|
||||
<section class="layout-slide" data-pp="11"></section>
|
||||
<section class="layout-slide" data-pp="300"></section>
|
||||
<div class="layout-content">
|
||||
<div class="layout-content-inner container">
|
||||
<div class="site-menu" data-pp="12"></div>
|
||||
<div class="breadcrumb-wrap" data-pp="500"></div>
|
||||
<div class="sitemenu-wrap" data-pp="400"></div>
|
||||
<div class="row">
|
||||
<section class="layout-content-box col-sm-9">
|
||||
<section class="layout-content-box col-sm-9">
|
||||
<main id="main-content" data-content="true">
|
||||
<%= yield %>
|
||||
</main>
|
||||
</section>
|
||||
<aside class="layout-content-box aside col-sm-3" data-pp="13"></aside>
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra" data-pp="600"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render_footer %>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="w-annc widget-announcement-1">
|
||||
<div class="w-annc widget-announcement-1">
|
||||
<h3 class="w-annc__widget-title">
|
||||
<span>{{widget-title}}</span>
|
||||
</h3>
|
||||
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||
<li class="w-annc__item">
|
||||
<div class="w-annc__img-wrap bullseye">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}">
|
||||
<div class="w-annc__img-wrap bullseye">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||
</div>
|
||||
<div class="w-annc__meta">
|
||||
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<div class="w-annc widget-announcement-12">
|
||||
<div class="w-annc widget-announcement-12">
|
||||
<h3 class="w-annc__widget-title">
|
||||
<span>{{widget-title}}</span>
|
||||
</h3>
|
||||
<div class="w-annc__inner row">
|
||||
<div class="w-annc__img-wrap col-md-4 bullseye">
|
||||
<img class="w-annc__img" src="{{main_picture}}" alt="{{main_picture_description}}">
|
||||
<img class="w-annc__img" src="{{main_picture}}" alt="{{main_picture_description}}" title="{{main_picture_description}}">
|
||||
</div>
|
||||
<ul class="w-annc__list col-md-8" data-level="0" data-list="announcements">
|
||||
<ul class="w-annc__list col-md-8" data-level="0" data-list="announcements">
|
||||
<li class="w-annc__item">
|
||||
<div class="w-annc__content row">
|
||||
<h4 class="w-annc__entry-title col-md-9">
|
||||
<div class="w-annc__content row">
|
||||
<h4 class="w-annc__entry-title col-md-9">
|
||||
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||
<span class="w-annc__status label {{status-class}}">{{status}}</span>
|
||||
</span>
|
||||
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||
</h4>
|
||||
<span class="w-annc__postdate-wrap col-md-3" date-format="%Y-%m-%d">
|
||||
<span class="w-annc__postdate-wrap col-md-3" date-format="%Y-%m-%d">
|
||||
<i class="fa fa-calendar-o"></i>
|
||||
<span class="w-annc__postdate">{{postdate}}</span>
|
||||
</span>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
</h3>
|
||||
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||
<li class="w-annc__item row">
|
||||
<div class="w-annc__img-wrap col-sm-4 bullseye">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}">
|
||||
<div class="w-annc__img-wrap col-sm-4 bullseye">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||
</div>
|
||||
<div class="w-annc__content-wrap col-sm-8">
|
||||
<div class="w-annc__meta">
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
</h4>
|
||||
<p class="w-annc__subtitle">{{subtitle}}</p>
|
||||
</div>
|
||||
<div class="w-annc__img-wrap col-sm-4 bullseye">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}">
|
||||
<div class="w-annc__img-wrap col-sm-4 bullseye">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}"">
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="w-annc widget-announcement-4">
|
||||
<div class="w-annc widget-announcement-4">
|
||||
<h3 class="w-annc__widget-title">
|
||||
<span>{{widget-title}}</span>
|
||||
</h3>
|
||||
<ul class="w-annc__list row" data-level="0" data-list="announcements">
|
||||
<li class="w-annc__item col-md-4">
|
||||
<ul class="w-annc__list row" data-level="0" data-list="announcements">
|
||||
<li class="w-annc__item col-md-4">
|
||||
<div class="w-annc__img-wrap bullseye">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}">
|
||||
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||
</div>
|
||||
<div class="w-annc__content-wrap">
|
||||
<div class="w-annc__meta">
|
||||
|
|
|
@ -27,4 +27,4 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{pagination_goes_here}}
|
||||
{{pagination_goes_here}}
|
|
@ -11,7 +11,7 @@
|
|||
{
|
||||
"filename" : "annc_index2",
|
||||
"name" : {
|
||||
"zh_tw" : "2. 右圖左文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||
"zh_tw" : "2. 左圖右文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||
"en" : "2. Balanced Image + Text(Right) (widget-title, image, status, postdate, category, title, subtitle)"
|
||||
},
|
||||
"thumbnail" : "annc_index2_thumbs.png"
|
||||
|
@ -19,7 +19,7 @@
|
|||
{
|
||||
"filename" : "annc_index3",
|
||||
"name" : {
|
||||
"zh_tw" : "3. 右文左圖 ( 模組標題, 狀態, 日期, 類別, 標題, 副標題, 圖片 )",
|
||||
"zh_tw" : "3. 右圖左文 ( 模組標題, 狀態, 日期, 類別, 標題, 副標題, 圖片 )",
|
||||
"en" : "3. Balanced Image + Text(left) (widget-title, status, postdate, category, title, subtitle, image)"
|
||||
},
|
||||
"thumbnail" : "annc_index3_thumbs.png"
|
||||
|
@ -121,14 +121,6 @@
|
|||
"en" : "12. 1 Image + Title List (widget-title, status, title, postdate)"
|
||||
},
|
||||
"thumbnail" : "annc_widget12_thumbs.png"
|
||||
},
|
||||
{
|
||||
"filename" : "admission_widget1",
|
||||
"name" : {
|
||||
"zh_tw" : "招生模組: 1. 標準表格列表 ( 模組標題, 類別, 標題, 檔案下載, 超連結 )",
|
||||
"en" : "Admission: 1. Standard Table List (widget-title, category, title, attatchment, link)"
|
||||
},
|
||||
"thumbnail" : "admission_widget1_thumbs.png"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -3,11 +3,11 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||
<%= favicon_link_tag (current_site.favicon.blank? ? 'favicon.ico' : current_site.favicon.url) %>
|
||||
<title><%= render_site_title %></title>
|
||||
<%= stylesheet_link_tag "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css"%>
|
||||
<%= stylesheet_link_tag "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.min.css"%>
|
||||
<%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css"%>
|
||||
<%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.min.css"%>
|
||||
<%= stylesheet_link_tag "template/template"%>
|
||||
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"%>
|
||||
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"%>
|
||||
<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"%>
|
||||
<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"%>
|
||||
<%= javascript_include_tag "plugin/modernizr"%>
|
||||
<%= javascript_include_tag "plugin/jquery-bullseye-min"%>
|
||||
<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140415/jquery.cycle2.min.js"%>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<%
|
||||
current_user_is_group_admin = group.admins.include?(current_user.id.to_s) ? true : false
|
||||
if !current_user_is_group_admin
|
||||
current_user_is_group_member = group.users.include?(current_user) ? true : false
|
||||
else
|
||||
current_user_is_group_member = true
|
||||
end
|
||||
%>
|
||||
<li>
|
||||
<div class="member-avatar">
|
||||
|
||||
<p class="<%= current_user_is_group_admin ? "gender-man" : (current_user_is_group_member ? "gender-woman" : "gender-none") %>"></p>
|
||||
<div class="action">
|
||||
<%= link_to(content_tag(:i, nil, :class => 'icon-edit'),"#",:class=>"edit" ) if current_user_is_group_admin %>
|
||||
</div>
|
||||
<%= image_tag(group.image) %>
|
||||
</div>
|
||||
<div class="member-info">
|
||||
<h4 class="member-name"><%= link_to group.title, admin_group_path(group) %></h4>
|
||||
<%
|
||||
author = ""
|
||||
group.admins.each_with_index do |admin,i|
|
||||
user = User.find(admin) rescue nil
|
||||
if !user.nil?
|
||||
author = author + (user.member_profile.name == "" ? user.user_name : user.member_profile.name rescue "")
|
||||
author = author + ", " if i != group.admins.count - 1
|
||||
end
|
||||
end
|
||||
%>
|
||||
<div class="member-mail muted">Admin : <%= author %></div>
|
||||
<hr>
|
||||
<ul class="member-roles">
|
||||
<li>
|
||||
<span class="member-staturs muted">Privacy : </i>
|
||||
<span class="label <%= group.privacy == 'closed' ? "label-important" : "label-success" %>"><%= group.privacy %></span>
|
||||
</li>
|
||||
<li>
|
||||
<%= group.description %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
|
@ -0,0 +1,5 @@
|
|||
<% @categories.each do |cat| %>
|
||||
<div>
|
||||
<%= cat.title_translations["en"] %> / <%= cat.title_translations["zh_tw"] %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,164 @@
|
|||
<% content_for :page_specific_css do %>
|
||||
<%= stylesheet_link_tag "lib/main-forms" %>
|
||||
<%= stylesheet_link_tag "lib/fileupload" %>
|
||||
<%= stylesheet_link_tag "lib/main-list" %>
|
||||
<%= stylesheet_link_tag "select2/select2" %>
|
||||
<style>
|
||||
.select2-container{
|
||||
width : 600px;
|
||||
}
|
||||
.img-avatar{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
<% end %>
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
|
||||
<%= javascript_include_tag "lib/file-type" %>
|
||||
<%= javascript_include_tag "lib/module-area" %>
|
||||
<%= javascript_include_tag "select2/select2.min" %>
|
||||
<% end %>
|
||||
|
||||
<div class="input-area">
|
||||
|
||||
<!-- Module Tabs -->
|
||||
<ul class="nav nav-pills module-nav">
|
||||
<li class="active"><a href="#basic" data-toggle="tab"><%= t(:basic) %></a></li>
|
||||
</ul>
|
||||
<!-- Module -->
|
||||
<div class="tab-content module-area">
|
||||
|
||||
<!-- Basic Module -->
|
||||
<div class="tab-pane fade in active" id="basic">
|
||||
|
||||
<!-- Category -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:category) %></label>
|
||||
<div class="controls">
|
||||
<%= f.select :group_category_id, @categories %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- group banner image -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:image) %></label>
|
||||
<div class="controls">
|
||||
<div class="fileupload fileupload-new clearfix <%= 'fileupload-edit' if @group.image.file %>" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left">
|
||||
<% if @group.image.file %>
|
||||
<%= image_tag @group.image %>
|
||||
<% else %>
|
||||
<img src="http://www.placehold.it/50x50/EFEFEF/AAAAAA" />
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<span class="btn btn-file">
|
||||
<span class="fileupload-new"><%= t(:select_image) %></span>
|
||||
<span class="fileupload-exists"><%= t(:change) %></span>
|
||||
<%= f.file_field :image %>
|
||||
</span>
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
||||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<label class="checkbox inline btn btn-danger fileupload-remove">
|
||||
<%= f.check_box :remove_image %><%= t(:remove) %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- privacy settings -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Privacy</label>
|
||||
<div class="controls">
|
||||
<input type="radio" name="group[privacy]" value="open" /> Open
|
||||
<input type="radio" name="group[privacy]" value="closed" checked="checked" /> Closed
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:members) %></label>
|
||||
<div class="controls">
|
||||
<select class="member_selection" multiple="multiple" name="group[user_ids][]">
|
||||
<% @members.each do |member| %>
|
||||
<%
|
||||
name = member["name"][I18n.locale.to_s] == "" ? member["name"]["zh_tw"] : member["name"][I18n.locale.to_s]
|
||||
name = "" if name.nil?
|
||||
user_name = "(#{member["user_name"]})"
|
||||
text = "#{name} #{user_name}"
|
||||
%>
|
||||
<option value="<%= member["id"] %>" data-member="<%= member.to_json %>"><%= text %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Language Tabs -->
|
||||
<div class="nav-name"><strong><%= t(:language) %></strong></div>
|
||||
<ul class="nav nav-pills language-nav">
|
||||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||
<li class="<%= 'active' if i == 0 %>">
|
||||
<a data-toggle="tab" href=".<%= locale %>"><%= t(locale) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<!-- Language -->
|
||||
<div class="tab-content language-area">
|
||||
|
||||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||
|
||||
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
|
||||
<!-- Title-->
|
||||
<div class="control-group input-title">
|
||||
<label class="control-label muted"><%= t(:title) %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<%= f.text_field locale, class: "input-block-level", placeholder: t(:title), value: (@group.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sub Title -->
|
||||
<div class="control-group input-subtitle">
|
||||
<label class="control-label muted"><%= t(:description) %></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.fields_for :description_translations do |f| %>
|
||||
<%= f.text_area locale, rows: 2, class: "input-block-level", value: (@group.description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), admin_groups_path, :class=>"btn" %>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var locale = "<%= I18n.locale.to_s %>";
|
||||
$(".member_selection").select2({
|
||||
formatResult: function (el) {
|
||||
var $el = $(el.element),
|
||||
member = $el.data("member"),
|
||||
name = (member.name[locale] == "" ? member.name.zh_tw : member.name[locale]),
|
||||
user_name = "(" + member.user_name + ")",
|
||||
text = name + " " + user_name;
|
||||
if (!el.id) { return el.text; }
|
||||
var $state = $(
|
||||
'<span><img src="' + member.avatar + '" class="img-avatar" /> ' + text + '</span>'
|
||||
);
|
||||
return $state;
|
||||
},
|
||||
placeholder: "Add Members"
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<a href="/admin/posts/<%= post.to_param %>" class="group-page-post-link">
|
||||
<div class="group-page-post">
|
||||
<div class="group-page-post-image-wrap">
|
||||
<% if !post.image.nil? %>
|
||||
<img class="group-page-post-image" src="<%= post.image.url %>" alt="<%= post.title %>">
|
||||
<% else %>
|
||||
<img class="group-page-post-image" src="/assets/member-pic.png" alt="Post image">
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="group-page-post-content-wrap">
|
||||
<h3 class="group-page-post-title">
|
||||
<%= post.title %>
|
||||
</h3>
|
||||
<div class="group-page-post-content">
|
||||
<% content = strip_tags post.content %>
|
||||
<%= content[0..250] %>
|
||||
<%= "..." if content.length > 350 %>
|
||||
</div>
|
||||
<div class="group-page-post-meta-wrap">
|
||||
<span class="group-page-post-author">
|
||||
<%
|
||||
user = User.find(post.author) rescue nil
|
||||
if !user.nil?
|
||||
author = (user.member_profile.name == "" ? user.user_name : user.member_profile.name rescue "")
|
||||
%>
|
||||
<i class="group-page-post-author-icon icon-user"></i> <%= author %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="group-page-post-postdate">
|
||||
<% date = DateTime.parse(post.created_at.to_s).strftime("%d %B") %>
|
||||
<i class="group-page-post-postdate-icon icon-time"></i> <%= date %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
|
@ -0,0 +1,81 @@
|
|||
<% content_for :page_specific_css do %>
|
||||
<%= stylesheet_link_tag "lib/main-forms" %>
|
||||
<%= stylesheet_link_tag "lib/fileupload" %>
|
||||
<%= stylesheet_link_tag "lib/main-list" %>
|
||||
<% end %>
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
|
||||
<%= javascript_include_tag "lib/file-type" %>
|
||||
<%= javascript_include_tag "lib/module-area" %>
|
||||
<% end %>
|
||||
<div class="input-area">
|
||||
|
||||
<!-- Module Tabs -->
|
||||
<ul class="nav nav-pills module-nav">
|
||||
<li class="active"><a href="#basic" data-toggle="tab"><%= t(:basic) %></a></li>
|
||||
</ul>
|
||||
<!-- Module -->
|
||||
<div class="tab-content module-area">
|
||||
|
||||
<!-- Basic Module -->
|
||||
<div class="tab-pane fade in active" id="basic">
|
||||
<!-- group banner image -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:image) %></label>
|
||||
<div class="controls">
|
||||
<div class="fileupload fileupload-new clearfix <%= 'fileupload-edit' if @grouppost.image.file %>" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left">
|
||||
<% if @grouppost.image.file %>
|
||||
<%= image_tag @grouppost.image %>
|
||||
<% else %>
|
||||
<img src="http://www.placehold.it/50x50/EFEFEF/AAAAAA" />
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<span class="btn btn-file">
|
||||
<span class="fileupload-new"><%= t(:select_image) %></span>
|
||||
<span class="fileupload-exists"><%= t(:change) %></span>
|
||||
<%= f.file_field :image %>
|
||||
</span>
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
||||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<label class="checkbox inline btn btn-danger fileupload-remove">
|
||||
<%= f.check_box :remove_image %><%= t(:remove) %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Language -->
|
||||
<div class="tab-content language-area">
|
||||
|
||||
<!-- Title-->
|
||||
<div class="control-group input-title">
|
||||
<label class="control-label muted"><%= t(:title) %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :title, class: "input-block-level", placeholder: t(:title), value: (@grouppost.title rescue nil) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sub Title -->
|
||||
<div class="control-group input-subtitle">
|
||||
<label class="control-label muted"><%= t(:content) %></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.cktext_area :content, rows: 2, class: "input-block-level", value: (@grouppost.content rescue nil) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), admin_groups_path, :class=>"btn" %>
|
||||
</div>
|
|
@ -1 +1,83 @@
|
|||
this is category.
|
||||
<div id="group_categories">
|
||||
<%= render :partial => "group_categories" %>
|
||||
</div>
|
||||
<a href="" class="btn btn-primary" data-toggle="modal" data-target="#categoryModal">+</a>
|
||||
<div class="modal fade" id="categoryModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel"><%= t(:new_category) %></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= "#{t(:name)} (#{t(locale)})" %></label>
|
||||
<div class="controls">
|
||||
<input class="input-large" id="<%=locale%>" name="category[title_translations][<%=locale%>]" placeholder="<%=t(:name)%>" type="text">
|
||||
<span class="help-inline hide">Please enter category title</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="text-error text-center"><%= t(:category_notice) %></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><%= t(:close) %></button>
|
||||
<button type="button" class="btn btn-primary" id="add_category"><%= t(:add) %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#add_category").click(createCategory);
|
||||
|
||||
$("#categoryModal .modal-body").keypress(function(e) {
|
||||
if(e.which == 13) {
|
||||
createCategory();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$.each($('#categoryModal .input-large'),function(){
|
||||
$(this).blur(function(){
|
||||
if($(this).val()==""){
|
||||
$(this).parent().parent().addClass('error');
|
||||
$(this).next().removeClass('hide');
|
||||
}else{
|
||||
$(this).parent().parent().removeClass('error');
|
||||
$(this).next().addClass('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
var createCategory = function(){
|
||||
var valid = true;
|
||||
$.each($('#categoryModal .input-large'),function(){
|
||||
if($(this).val()==""){
|
||||
$(this).parent().parent().addClass('error');
|
||||
$(this).next().removeClass('hide');
|
||||
valid = false;
|
||||
}else{
|
||||
$(this).parent().parent().removeClass('error');
|
||||
$(this).next().addClass('hide');
|
||||
}
|
||||
});
|
||||
|
||||
if(valid){
|
||||
$.ajax({
|
||||
url : "/admin/groups/create_category",
|
||||
type : "post",
|
||||
data: $("input[name^='category']").serialize(),
|
||||
}).done(function(data){
|
||||
$.each($('#categoryModal .input-large'),function(){
|
||||
$(this).val("");
|
||||
});
|
||||
$("#group_categories").html(data);
|
||||
$('#categoryModal').modal('hide');
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1 +1,17 @@
|
|||
this is my group page
|
||||
<% content_for :page_specific_css do -%>
|
||||
|
||||
<%= stylesheet_link_tag "lib/wrap-nav" %>
|
||||
<%= stylesheet_link_tag "lib/main-list" %>
|
||||
<%= stylesheet_link_tag "lib/filter" %>
|
||||
<%= stylesheet_link_tag "lib/member" %>
|
||||
|
||||
<% end -%>
|
||||
<% content_for :page_specific_javascript do -%>
|
||||
<%= javascript_include_tag "lib/jquery.lite.image.resize.js" %>
|
||||
<%= javascript_include_tag "lib/member/list-view.js" %>
|
||||
<% end -%>
|
||||
<div id="list-view">
|
||||
<ul id="member-abstract" class="clearfix">
|
||||
<%= render :partial=>"group",:collection=> @groups %>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
<%= form_for @group, :url => admin_groups_path, :html => { :multipart => true , :class=>"form-horizontal main-forms"} do |f| %>
|
||||
<fieldset>
|
||||
<%= render :partial => "group_form", locals: {f: f} %>
|
||||
</fieldset>
|
||||
<% end %>
|
|
@ -0,0 +1,5 @@
|
|||
<%= form_for @grouppost, :url => admin_group_createpost_path(@group), :html => { :multipart => true , :class=>"form-horizontal main-forms"} do |f| %>
|
||||
<fieldset>
|
||||
<%= render :partial => "post_form", locals: {f: f} %>
|
||||
</fieldset>
|
||||
<% end %>
|
|
@ -0,0 +1,15 @@
|
|||
<% content_for :page_specific_css do -%>
|
||||
<%= stylesheet_link_tag "lib/wrap-nav" %>
|
||||
<%= stylesheet_link_tag "lib/main-list" %>
|
||||
<%= stylesheet_link_tag "lib/filter" %>
|
||||
<%= stylesheet_link_tag "lib/member" %>
|
||||
<% end -%>
|
||||
<% content_for :page_specific_javascript do -%>
|
||||
<%= javascript_include_tag "lib/jquery.lite.image.resize.js" %>
|
||||
<%= javascript_include_tag "lib/member/list-view.js" %>
|
||||
<% end -%>
|
||||
<div id="list-view">
|
||||
<ul id="member-abstract" class="clearfix">
|
||||
<%= render :partial=>"group",:collection=> @groups %>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,75 @@
|
|||
<% content_for :page_specific_css do -%>
|
||||
<%= stylesheet_link_tag "group_page" %>
|
||||
<% end -%>
|
||||
|
||||
<div class="group-page scroll">
|
||||
<div class="group-page-banner-image-wrap">
|
||||
<img class="group-page-banner-image" src="<%= @group.image.url %>" alt="<%= @group.title %>">
|
||||
<ul class="group-page-view-switch btn-group">
|
||||
<li class="group-page-feed-view btn btn-success"><a href="#" title="Feed" class="active"><i class="icon-list-ul"></i></a></li>
|
||||
<li class="group-page-grid-view btn"><a href="#" title="Grid"><i class="icon-th"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="group-page-bar">
|
||||
<h2 class="group-page-title"><%= @group.title %></h2>
|
||||
<a class="group-page-new-post btn btn-large btn-primary" href="<%= admin_group_newpost_path(@group) %>"><i class="icon-plus"></i> New Post</a>
|
||||
</div>
|
||||
|
||||
<div class="group-page-setion">
|
||||
<div class="group-page-detail">
|
||||
<span class="gorup-page-info-wrap" id="group_info_button">
|
||||
<i class="group-page-info-icon icon-info-sign muted"></i> <span class="muted">Info</span>
|
||||
</span>
|
||||
<div class="group-page-description-wrap" id="group_info_area" style="display:none;">
|
||||
<% if @group.privacy == "closed" %>
|
||||
<span class="group-page-status-wrap close-eye">
|
||||
<i class="group-page-status icon-eye-open"></i> Closed
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="group-page-status-wrap open-eye">
|
||||
<i class="group-page-status icon-eye-open"></i> Open
|
||||
</span>
|
||||
<% end %>
|
||||
<h4 class="muted">Group Description</h4>
|
||||
<p class="group-page-description"><%= @group.description %></p>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => "post", :collection => @group.group_posts.desc(:created_at) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
$( document ).ready( function() {
|
||||
|
||||
var doc = document,
|
||||
viewSwitch = doc.querySelector( ".group-page-view-switch" ),
|
||||
bar = doc.querySelector( ".group-page-bar" );
|
||||
|
||||
if( $( ".group-page" ).hasClass( "scroll" ) ) {
|
||||
$( ".group-page-new-post" ).removeClass( "btn-large" );
|
||||
bar.appendChild( viewSwitch );
|
||||
}
|
||||
});
|
||||
|
||||
var group_info_area = $("#group_info_area"),
|
||||
orbit_bar = $("#orbit-bar");
|
||||
$("#group_info_button").on("click",function(){
|
||||
if(!group_info_area.hasClass("expanded")){
|
||||
group_info_area.slideDown();
|
||||
group_info_area.addClass("expanded");
|
||||
}else{
|
||||
group_info_area.slideUp();
|
||||
group_info_area.removeClass("expanded");
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on("scroll",function(){
|
||||
orbit_bar.slideUp();
|
||||
})
|
||||
|
||||
}(jQuery));
|
||||
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
this is post for <%= params[:id] %>
|
|
@ -9,6 +9,9 @@
|
|||
<%= content_tag :li, :class => active_for_controllers('members','roles','member_infos') do -%>
|
||||
<%= link_to( ( content_tag(:span, content_tag(:i, nil, :class => 'icons-user'))), admin_members_path) %>
|
||||
<% end -%>
|
||||
<%= content_tag :li, :class => active_for_controllers('groups') do -%>
|
||||
<%= link_to( ( content_tag(:span, content_tag(:i, nil, :class => 'icons-layout'))), admin_groups_path) %>
|
||||
<% end -%>
|
||||
<% if (current_user.is_admin? rescue false) %>
|
||||
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
|
||||
<%= link_to( ( content_tag(:span, content_tag(:i, nil, :class => 'icons-graduation'))),admin_personal_plugins_path) %>
|
||||
|
@ -16,10 +19,8 @@
|
|||
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
|
||||
<%= link_to( ( content_tag(:span, content_tag(:i, nil, :class => 'icons-pie'))), '#') %>
|
||||
<% end -%>
|
||||
<%= content_tag :li, :class => active_for_controllers('groups') do -%>
|
||||
<%= link_to( ( content_tag(:span, content_tag(:i, nil, :class => 'icons-layout'))), admin_groups_path) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="sub-nav-arrow"></div>
|
||||
|
@ -36,6 +37,15 @@
|
|||
<%= content_tag :li, link_to((content_tag(:span, t(:unapproved_members) + " (" + User.unapproved.count.to_s + ")")), admin_members_unapproved_members_path), :class => active_for_action('members', 'unapproved_members') if (current_user.is_admin? rescue nil) %>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="sub-nav-block" data-icons="">
|
||||
<h4><%= t(:groups) %></h4>
|
||||
<%= content_tag :ul, :class => ("nav nav-list ") do -%>
|
||||
<%= content_tag :li, link_to((content_tag(:span, "My Groups")), admin_groups_path), :class => active_for_action('groups', 'index') %>
|
||||
<%= content_tag :li, link_to((content_tag(:span, "Public Groups")), admin_groups_public_path), :class => active_for_action('groups','public_groups') %>
|
||||
<%= content_tag :li, link_to((content_tag(:span, "Create New Group")), new_admin_group_path), :class => active_for_action('groups','new') %>
|
||||
<%= content_tag :li, link_to((content_tag(:span, "Categories")), admin_groups_categories_path), :class => active_for_action('groups','categories') if current_user.is_admin? %>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="sub-nav-block" data-icons="">
|
||||
<h4><%= t(:academic_info) %></h4>
|
||||
<%= content_tag :ul, :class => ("nav nav-list ") do -%>
|
||||
|
@ -47,13 +57,6 @@
|
|||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('members', 'roles','member_infos')) do -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="sub-nav-block" data-icons="">
|
||||
<h4><%= t(:groups) %></h4>
|
||||
<%= content_tag :ul, :class => ("nav nav-list ") do -%>
|
||||
<%= content_tag :li, link_to((content_tag(:span, "My Groups")), admin_groups_path), :class => active_for_action('groups', 'index') %>
|
||||
<%= content_tag :li, link_to((content_tag(:span, "Categories")), admin_groups_categories_path), :class => active_for_action('groups','categories') %>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
|
@ -15,8 +15,12 @@
|
|||
<%= render_orbit_bar unless @no_orbit_bar %>
|
||||
<%= render :partial => 'admin/members/side_bar' unless @no_side_bar %>
|
||||
<section id="main-wrap">
|
||||
<% unless @no_filter && @no_breadcrumb %>
|
||||
<div class="wrap-inner">
|
||||
<div id="filter" class="topnav clearfix">
|
||||
<% unless @no_filter %>
|
||||
<div id="filter" class="topnav clearfix">
|
||||
<% end %>
|
||||
<% unless @no_breadcrumb %>
|
||||
<ul class="breadcrumb text-info pull-left">
|
||||
<% if !@role.blank? %>
|
||||
<li><%= link_to( t("role"), admin_roles_path ) %> <span class="divider">/</span></li>
|
||||
|
@ -29,8 +33,10 @@
|
|||
<li class="active">All</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%= yield :right_nav %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
<%= javascript_include_tag "lib/pageslide.js" %>
|
||||
</div>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/members">
|
||||
<a href="/<%= locale.to_s %>/admin/members?at=thumbnail">
|
||||
<i class="icons-users"></i> <%= t(:member_) %>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -37,5 +37,7 @@ module Orbit
|
|||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
|
||||
config.mongoid.observers = :orbit_observer
|
||||
end
|
||||
end
|
||||
|
|
|
@ -122,9 +122,13 @@ Orbit::Application.routes.draw do
|
|||
|
||||
# GROUPS START HERE
|
||||
get "groups/categories" => 'groups#categories'
|
||||
post "groups/create_category" => 'groups#create_category'
|
||||
get "groups/public" => 'groups#public_groups'
|
||||
get "posts/:id" => 'groups#showpost'
|
||||
|
||||
resources :groups do
|
||||
|
||||
resources :groups do
|
||||
get "newpost" => 'groups#newpost'
|
||||
post "createpost" => 'groups#createpost'
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
GEM
|
||||
specs:
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
|
@ -40,7 +40,7 @@ module OrbitApp
|
|||
end
|
||||
|
||||
class RegisteredModule
|
||||
attr_reader :name,:key,:base_path, :module_label,:widget_methods,:authorizable_models,:is_authorizable, :data_count, :widget_settings, :icon_class_no_sidebar,:desktop_enabled
|
||||
attr_reader :name,:key,:base_path, :module_label,:widget_methods,:authorizable_models,:is_authorizable, :data_count, :widget_settings, :icon_class_no_sidebar,:desktop_enabled, :models_to_cache
|
||||
|
||||
def initialize(name,&block)
|
||||
@name = name
|
||||
|
@ -48,6 +48,7 @@ module OrbitApp
|
|||
@side_bar = nil
|
||||
@module_label = @name
|
||||
@widget_methods = []
|
||||
@models_to_cache = []
|
||||
@widget_settings = {}
|
||||
@is_taggable = false
|
||||
@authorizable_models = []
|
||||
|
@ -93,6 +94,14 @@ module OrbitApp
|
|||
@widget_settings = settings.first
|
||||
end
|
||||
|
||||
def models_to_cache(models)
|
||||
@models_to_cache = models
|
||||
end
|
||||
|
||||
def get_models_to_cache
|
||||
@models_to_cache
|
||||
end
|
||||
|
||||
def get_widget_settings
|
||||
@widget_settings
|
||||
end
|
||||
|
|
|
@ -21,6 +21,23 @@ module OrbitApp
|
|||
end
|
||||
end
|
||||
|
||||
def get_models_for_caching
|
||||
@models_for_caching = {}
|
||||
ModuleApp.all.each do |ma|
|
||||
# models.concat(ma.cache_models)
|
||||
ma.cache_models.each do |cm|
|
||||
@models_for_caching[cm] = ma.key
|
||||
end
|
||||
end
|
||||
@models_for_caching[:tag] = "Tag"
|
||||
@models_for_caching[:category] = "Category"
|
||||
return @models_for_caching
|
||||
end
|
||||
|
||||
def get_model_hash_for_caching
|
||||
@models_for_caching
|
||||
end
|
||||
|
||||
def check_module_permissions
|
||||
store_token = Site.first.store_token rescue nil
|
||||
module_apps = ModuleApp.all
|
||||
|
|
|
@ -4,7 +4,7 @@ module OrbitModel
|
|||
include Impressionist::Impressionable
|
||||
|
||||
base.extend ClassMethods
|
||||
base.is_impressionable :counter_cache => true, :column_name => :view_count, :unique => :all
|
||||
base.is_impressionable :counter_cache => false
|
||||
base.field :view_count, :type => Integer, :default => 0
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue