Compare commits

..

4 Commits

282 changed files with 2376 additions and 12618 deletions

1
.gitignore vendored
View File

@ -20,7 +20,6 @@
app/views/frontend
/public/uploads/*
public/assets/*
public/site_feeds/*
public/import_status.yml
public/announcement_link_widget_en.json
public/announcement_link_widget_zh_tw.json

View File

@ -31,8 +31,7 @@ gem 'nokogiri'
gem 'httparty'
#database
# gem 'mongoid', github: "mongoid/mongoid"
gem 'mongoid', '~> 4.0.2'
gem 'mongoid', github: "mongoid/mongoid"
#file uploading and carrierwave
gem "mini_magick", "3.5.0"
@ -85,7 +84,7 @@ end
#ask
gem 'gotcha'
#caching observers
#observers
gem 'mongoid-observers'
#desktop

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -138,7 +138,7 @@ var StoreManager = function(section){
"url" : "/admin/store/check_credentials"
}).done(function(status){
if(status.success == true){
authorizeAllModules();
resendEmail();
}else if(status.success == false){
waitForStoreResponseCount++;
if(waitForStoreResponseCount > 5){
@ -152,22 +152,6 @@ var StoreManager = function(section){
}).fail(showError);
}
var authorizeAllModules = function(){
loadingAreaStatus.text("Authorizing default modules.");
$.ajax({
"type" : "post",
"dataType" : "json",
"url" : "/admin/store/authorize_default_modules"
}).done(function(status){
if(status.success == true){
resendEmail();
}else if(status.success == false){
loadingArea.find("img").hide();
loadingAreaStatus.text(data.message);
}
}).fail(showError);
}
var resendEmail = function(){
loadingArea.find("img").show();
loadingAreaStatus.text("Sending verification email.");

View File

@ -291,7 +291,6 @@ if($.support.touch) {
$el.find('a').removeAttr('href');
};
$el.on(mouseenterEvent, function(e) {
$sidebar.addClass('on')
$block.siblings().removeClass('show').end().eq($(this).index()).addClass('show');
$arrow.stop(true, false).animate({
top: ($(this).position().top+$(this).height()/2)-$arrowHeightFormat+$('.scroller').position().top,
@ -347,7 +346,6 @@ if($.support.touch) {
$el.eq($blockIndex).hasClass('active') ? '':$el.eq($blockIndex).children('span').addClass('hover');
},
mouseleave: function() {
$sidebar.removeClass('on');
$block.removeClass('show');
if(!$sidebarState || !$el.hasClass('active')) {
$blockList.css({'width': 0});

View File

@ -5,14 +5,11 @@
CKEDITOR.editorConfig = function( config ) {
config.uiColor = '#e6e6e6';
config.defaultLanguage = "en";
config.language = '<%= (I18n.locale.to_s == "zh_tw" || I18n.locale.to_s == "zh_cn" ? "zh" : I18n.locale.to_s) %>';
config.language = 'zh';
config.height = 400;
config.resize_minHeight = 400;
config.toolbarCanCollapse = true;
config.allowedContent = true;
config.pasteFromWordRemoveFontStyles=false;
config.pasteFromWordRemoveStyles=false;
config.plugins = 'dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,image,fakeobjects,floatingspace,listblock,richcombo,font,format,horizontalrule,htmlwriter,iframe,wysiwygarea,indent,indentblock,indentlist,justify,menubutton,link,list,liststyle,magicline,maximize,newpage,pastetext,pastefromword,removeformat,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc,youtube,codemirror';

View File

@ -1,139 +0,0 @@
(function() {
"use strict";
// Commonly use variables
var doc = document;
var group = {
// Detect and change the top position of the cycle navs
cycleFix: function() {
if (doc.querySelectorAll(".group-show-post-banner-image").length >= 1) {
var imgs = doc.querySelectorAll(".group-show-post-banner-image"),
cycleNav = doc.querySelectorAll(".cycle-nav"),
len = cycleNav.length,
i = -1;
// Hide the navs when there's noly one slide
if (imgs.length <= 1) {
for (i = 0; i < len; i++) {
cycleNav[i].classList.add("hide");
}
}
} else if (doc.querySelectorAll(".group-show-post-banner-image").length === 0 && doc.querySelector(".group-show-post-image-wrap")) {
doc.querySelector(".group-show-post-image-wrap").classList.add("hide");
}
},
// Create scroll effect (with css)
scrollEffect: function(el) {
var wrap = doc.querySelector(el),
scrollClass = "scroll";
// Use pageYOffset to get the Y positoin and add scroll on it, the animation
// is done by css transition
if (el) {
window.addEventListener("scroll", function() {
if (window.pageYOffset > 0) {
wrap.classList.add(scrollClass);
} else {
wrap.classList.remove(scrollClass);
}
}, false);
}
},
// Equal height for card
equalHeight: function(el) {
var bigbrother = -1,
$el = $(el);
$el.each(function() {
bigbrother = bigbrother > $(this).height() ? bigbrother : $(this).height();
});
$el.each(function() {
$(this).height(bigbrother);
});
},
// We want to place a dropdown in group-post-item, but link cannot be nested, hance this fix
makePostClick: function() {
var postLink = doc.querySelectorAll('.group-post-link');
if (postLink) {
Array.prototype.forEach.call(postLink, function(item) {
item.parentNode.classList.add('clickable');
item.parentNode.addEventListener('click', function(e) {
window.location.href = item.href;
});
});
}
},
// Bootstrap dropdown is too much of a hassle, using this instead
makeDropdown: function(container, toggle, dropdown, kls) {
var $container = $(container),
$toggle = $container.find(toggle),
$dropdown = $container.find(dropdown),
klass = 'open';
$container.on('click', '.toggle', function(e) {
if ($(this).hasClass(klass)) {
$(toggle).removeClass(klass);
$(dropdown).removeClass(klass);
} else {
$(toggle).removeClass(klass);
$(dropdown).removeClass(klass);
$(this)
.addClass(klass)
.next(dropdown)
.addClass(klass)
}
return false;
});
$(document.body).on('click', function() {
$(toggle).removeClass(klass)
$(dropdown).removeClass(klass);
});
},
// Third-party plugin settings
plugins: function() {
// WOWjs
if (typeof window.WOW !== 'undefined') {
new WOW().init();
}
}
}
// When DOM is completely loaded, execute these functions
document.addEventListener("DOMContentLoaded", function(event) {
if (doc.querySelector('.group-post')) {
group.scrollEffect('.group-post');
group.makeDropdown('.group-post', '.group-post-dropdown-toggle', '.group-post-dropdown');
}
if (doc.querySelector('.group-card')) {
group.makeDropdown('.group-public', '.group-card-dropdown-toggle', '.group-card-dropdown');
}
if (doc.querySelector('.group-index')) {
group.makeDropdown('.group-index', '.group-card-dropdown-toggle', '.group-card-dropdown');
}
if (doc.querySelector('.group-show-post')) {
group.makeDropdown('.group-show-post', '.group-show-post-dropdown-toggle', '.group-show-post-dropdown');
}
if (doc.querySelector('.group-member')) {
group.scrollEffect('.group-member');
}
group.cycleFix();
group.equalHeight('.group-card-inner');
group.equalHeight('.group-admin-edit-image-item');
group.plugins();
});
})();

View File

@ -1,388 +0,0 @@
/*
* The MIT License
* Copyright (c) 2012 Matias Meno <m@tias.me>
*/
@-webkit-keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30%, 70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); }
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px); } }
@-moz-keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30%, 70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); }
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px); } }
@keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30%, 70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); }
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px); } }
@-webkit-keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); } }
@-moz-keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); } }
@keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px); }
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px); } }
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); }
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1); }
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); } }
@-moz-keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); }
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1); }
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); } }
@keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); }
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1); }
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1); } }
.dropzone, .dropzone * {
box-sizing: border-box; }
.dropzone {
min-height: 150px;
border: 2px solid rgba(0, 0, 0, 0.3);
background: white;
padding: 20px 20px; }
.dropzone.dz-clickable {
cursor: pointer; }
.dropzone.dz-clickable * {
cursor: default; }
.dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * {
cursor: pointer; }
.dropzone.dz-started .dz-message {
display: none; }
.dropzone.dz-drag-hover {
border-style: solid; }
.dropzone.dz-drag-hover .dz-message {
opacity: 0.5; }
.dropzone .dz-message {
text-align: center;
margin: 2em 0; }
.dropzone .dz-preview {
position: relative;
display: inline-block;
vertical-align: top;
margin: 16px;
min-height: 100px; }
.dropzone .dz-preview:hover {
z-index: 1000; }
.dropzone .dz-preview:hover .dz-details {
opacity: 1; }
.dropzone .dz-preview.dz-file-preview .dz-image {
border-radius: 20px;
background: #999;
background: linear-gradient(to bottom, #eee, #ddd); }
.dropzone .dz-preview.dz-file-preview .dz-details {
opacity: 1; }
.dropzone .dz-preview.dz-image-preview {
background: white; }
.dropzone .dz-preview.dz-image-preview .dz-details {
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
-ms-transition: opacity 0.2s linear;
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear; }
.dropzone .dz-preview .dz-remove {
font-size: 14px;
text-align: center;
display: block;
cursor: pointer;
border: none; }
.dropzone .dz-preview .dz-remove:hover {
text-decoration: underline; }
.dropzone .dz-preview:hover .dz-details {
opacity: 1; }
.dropzone .dz-preview .dz-details {
z-index: 20;
position: absolute;
top: 0;
left: 0;
opacity: 0;
font-size: 13px;
min-width: 100%;
max-width: 100%;
padding: 2em 1em;
text-align: center;
color: rgba(0, 0, 0, 0.9);
line-height: 150%; }
.dropzone .dz-preview .dz-details .dz-size {
margin-bottom: 1em;
font-size: 16px; }
.dropzone .dz-preview .dz-details .dz-filename {
white-space: nowrap; }
.dropzone .dz-preview .dz-details .dz-filename:hover span {
border: 1px solid rgba(200, 200, 200, 0.8);
background-color: rgba(255, 255, 255, 0.8); }
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) {
overflow: hidden;
text-overflow: ellipsis; }
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
border: 1px solid transparent; }
.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
background-color: rgba(255, 255, 255, 0.4);
padding: 0 0.4em;
border-radius: 3px; }
.dropzone .dz-preview:hover .dz-image img {
-webkit-transform: scale(1.05, 1.05);
-moz-transform: scale(1.05, 1.05);
-ms-transform: scale(1.05, 1.05);
-o-transform: scale(1.05, 1.05);
transform: scale(1.05, 1.05);
-webkit-filter: blur(8px);
filter: blur(8px); }
.dropzone .dz-preview .dz-image {
border-radius: 20px;
overflow: hidden;
width: 120px;
height: 120px;
position: relative;
display: block;
z-index: 10; }
.dropzone .dz-preview .dz-image img {
display: block; }
.dropzone .dz-preview.dz-success .dz-success-mark {
-webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); }
.dropzone .dz-preview.dz-error .dz-error-mark {
opacity: 1;
-webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); }
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
pointer-events: none;
opacity: 0;
z-index: 500;
position: absolute;
display: block;
top: 50%;
left: 50%;
margin-left: -27px;
margin-top: -27px; }
.dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {
display: block;
width: 54px;
height: 54px; }
.dropzone .dz-preview.dz-processing .dz-progress {
opacity: 1;
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-ms-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
transition: all 0.2s linear; }
.dropzone .dz-preview.dz-complete .dz-progress {
opacity: 0;
-webkit-transition: opacity 0.4s ease-in;
-moz-transition: opacity 0.4s ease-in;
-ms-transition: opacity 0.4s ease-in;
-o-transition: opacity 0.4s ease-in;
transition: opacity 0.4s ease-in; }
.dropzone .dz-preview:not(.dz-processing) .dz-progress {
-webkit-animation: pulse 6s ease infinite;
-moz-animation: pulse 6s ease infinite;
-ms-animation: pulse 6s ease infinite;
-o-animation: pulse 6s ease infinite;
animation: pulse 6s ease infinite; }
.dropzone .dz-preview .dz-progress {
opacity: 1;
z-index: 1000;
pointer-events: none;
position: absolute;
height: 16px;
left: 50%;
top: 50%;
margin-top: -8px;
width: 80px;
margin-left: -40px;
background: rgba(255, 255, 255, 0.9);
-webkit-transform: scale(1);
border-radius: 8px;
overflow: hidden; }
.dropzone .dz-preview .dz-progress .dz-upload {
background: #333;
background: linear-gradient(to bottom, #666, #444);
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 0;
-webkit-transition: width 300ms ease-in-out;
-moz-transition: width 300ms ease-in-out;
-ms-transition: width 300ms ease-in-out;
-o-transition: width 300ms ease-in-out;
transition: width 300ms ease-in-out; }
.dropzone .dz-preview.dz-error .dz-error-message {
display: block; }
.dropzone .dz-preview.dz-error:hover .dz-error-message {
opacity: 1;
pointer-events: auto; }
.dropzone .dz-preview .dz-error-message {
pointer-events: none;
z-index: 1000;
position: absolute;
display: block;
display: none;
opacity: 0;
-webkit-transition: opacity 0.3s ease;
-moz-transition: opacity 0.3s ease;
-ms-transition: opacity 0.3s ease;
-o-transition: opacity 0.3s ease;
transition: opacity 0.3s ease;
border-radius: 8px;
font-size: 13px;
top: 130px;
left: -10px;
width: 140px;
background: #be2626;
background: linear-gradient(to bottom, #be2626, #a92222);
padding: 0.5em 1.2em;
color: white; }
.dropzone .dz-preview .dz-error-message:after {
content: '';
position: absolute;
top: -6px;
left: 64px;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #be2626; }

File diff suppressed because it is too large Load Diff

View File

@ -318,7 +318,7 @@
if( e.type == "keyup" && e.keyCode != 27) return;
// Make sure it's visible, and we're not modal
if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) && !$("#modify_fields_to_show").is(":visible")) {
if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) ) {
$.pageslide.close();
}
});

View File

@ -1,2 +0,0 @@
/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */
!function(a){"use strict";function b(){try{this.playVideo()}catch(a){}}function c(){try{this.pauseVideo()}catch(a){}}var d='<div class=cycle-youtube><iframe width="640" height="360" frameborder="0" allowfullscreen="" data-yt-api-binded="0" src="{{url}}"></iframe></div>';a.extend(a.fn.cycle.defaults,{youtubeAllowFullScreen:!0,youtubeAutostart:!1,youtubeAutostop:!0}),a(document).on("cycle-bootstrap",function(e,f){f.youtube&&(f.hideNonActive=!1,f.container.find(f.slides).each(function(b){if(void 0!==a(this).attr("href")){var c,e=a(this),g=e.attr("href"),h=f.youtubeAllowFullScreen?"true":"false";g+=(/\?/.test(g)?"&":"?")+"enablejsapi=1",f.youtubeAutostart&&f.startingSlide===b&&(g+="&autoplay=1"),c=f.API.tmpl(d,{url:g,allowFullScreen:h}),e.replaceWith(c)}}),f.slides=f.slides.replace(/(\b>?a\b)/,"div.cycle-youtube"),f.youtubeAutostart&&f.container.on("cycle-initialized cycle-after",function(c,d){var e="cycle-initialized"==c.type?d.currSlide:d.nextSlide;a(d.slides[e]).find("object,embed").each(b)}),f.youtubeAutostop&&f.container.on("cycle-before",function(b,d){a(d.slides[d.currSlide]).find("object,embed").each(c)}))})}(jQuery);

View File

@ -31,25 +31,11 @@ var FormValidator = function(form){
email : function(value){
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(value);
},
url : function(value){
if(value == "#"){
return true;
}
var reg = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/);
return reg.test(value);
},
urlwithip : function(value){
if(value == "#"){
return true;
}
var reg = new RegExp(/^https?\:\/\/[^\/\s]+(\/.*)?$/);
return reg.test(value);
}
}
this.initialize = function(){
fv.elements = fv.form.find("*[data-fv-validation]");
fv.elements = form.find("*[data-fv-validation]");
_number_of_validators_++;
_putFieldsValidatorAndMessage();
_attachSubmitHandler();

View File

@ -14,8 +14,3 @@
*= require lib/filter
*= require lib/pageslide
*/
/* Hide ckeditor text, it's breaking the layout but we need to keep them for future use */
.ui-helper-hidden-accessible {
display: none;
}

View File

@ -49,7 +49,7 @@ input:focus::-webkit-input-placeholder {
color: transparent;
}
body {
background-color: #f3f3f3;
background-color: #F3F3F3;
font-family: 'Chivo';
}
body.modalBlur > nav,
@ -319,18 +319,6 @@ legend {
background-color: rgba(0, 136, 204, .6);
}
/* sidebar on */
#sidebar.on ~ #main-wrap .fc-border-separate {
table-layout: fixed;
}
#sidebar.on ~ #main-wrap .fc-view-month .fc-day-header {
width: auto !important;
}
#sidebar.on ~ #main-wrap .fc-view-agendaWeek .fc-widget-header.fc-last {
width: 15px !important;
}
/* Main Wrap */
#main-wrap {
@ -791,15 +779,6 @@ legend {
display: block;
}
.simple-date-picker input:first-child {
margin-right: 3px;
}
.simple-date-picker select {
margin-right: 3px;
}
/* IE go die */
:root #sidebar .sub-nav-block:before {
display: block\9;

View File

@ -3,7 +3,7 @@
left: -10px;
right: -10px;
height: 40px;
z-index: 1040;
z-index: 1041;
position: fixed;
margin-bottom: 0;
}
@ -16,7 +16,7 @@
background-repeat: no-repeat;
background-image: url('<%= asset_path 'orbit-logo.svg' %>');
/* For IE */
/* For Suck IE */
background-image: url('<%= asset_path 'orbit-logo.png' %>');
}
#orbit-bar.navbar .nav > li > a {
@ -318,12 +318,6 @@
}
}
@media (max-width: 640px) {
#orbit-bar .orbit-bar-search-sign-language #search input[type="search"] {
width: 100px;
}
}
@media (max-width: 430px) {
#orbit-bar #search{
display: none;

View File

@ -1,110 +0,0 @@
@charset "utf-8";
@import "group-variables";
// Group category page
.group-category {
margin-bottom: 16px;
}
.group-category-tab {
.group-category-tab-nav {
font-size: 0.8125rem;
padding: 10px 12px;
}
.active {
.group-category-tab-nav {
background-color: $blue;
&:hover {
background-color: lighten($blue, 5%);
}
}
}
}
.group-category-item {
float: left;
margin: 0 0.625rem 1rem 0;
background-color: $green;
&:hover {
background-color: lighten($green, 5%);
}
.group-category-tag-icon {
font-size: 1rem;
vertical-align: middle;
}
a {
font-size: 0.8125rem;
font-family: $sub-font;
color: $white;
}
}
.group-category-request {
.group-category-item {
background-color: darken($dark-gray, 25%);
}
}
.group-category-tab-content {
border-top: 1px solid #ddd;
padding: 16px 0;
overflow: visible;
}
.group-category-controls {
margin-left: 8px;
a {
padding: 2px 0.4rem;
color: $white;
display: inline-block;
border-radius: 50%;
}
.group-category-approve {
background-color: $green;
}
.group-category-reject {
background-color: $red;
}
}
.group-category-approve-tootip {
white-space: nowrap;
}
.card-ownership {
border-top: 6px solid darken($gray, 7%);
&:before {
border-top-left-radius: $general;
content: "";
height: 6px;
width: 80%;
position: absolute;
left: 0;
top: -6px;
}
}
.card-owner {
&:before {
background-color: lighten($blue, 10%);
}
}
.card-public {
&:before {
background-color: lighten($green, 10%);
}
}
.card-member {
&:before {
background-color: lighten($red, 20%);
}
}

View File

@ -1,306 +0,0 @@
@charset "utf-8";
@import "group-variables";
// Genernal classes and modules
.screen-reader {
position: absolute;
top: -9999px;
left: -9999px;
}
.img-reponsive {
max-width: 100%;
width: 100%;
height: auto;
}
.wrapper {
margin: auto;
max-width: $boundary;
}
.radius {
border-radius: $general;
}
// Buttons
.button {
padding: 8px .75rem;
color: $black;
border: none;
border-radius: 15rem;
background: $gray;
}
.button-default {
color: $blue;
background-color: transparent;
border: 2px solid $blue;
transition: $fast all;
&:hover {
color: $white;
background-color: $blue;
}
&.gray {
color: $dark-gray;
border: 2px solid $dark-gray;
&:hover {
color: $white;
background-color: $dark-gray;
}
}
}
.button-activated {
color: #fff;
background-color: $green;
}
.button-primary {
color: $white;
background-color: $blue;
transition: $fast all;
&:hover {
color: $white;
background-color: darken($blue, 15%);
}
}
.button-small {
padding: 4px 0.625rem;
font-size: 0.75rem;
}
.button-large {
padding: 14px 1.3rem;
}
// Button group
.button-group {
display: inline-block;
list-style: none;
> .button-group-common {
display: inline-block;
}
> .button:first-child {
border-radius: 15rem 0 0 15rem;
margin-right: -4px;
}
> .button:last-child {
border-radius: 0 15rem 15rem 0;
}
li {
color: $blue;
background-color: rgba($white, 0.2);
&:hover {
a {
color: $white;
}
}
}
> .active {
color: $white;
background-color: $blue;
a {
color: $white;
}
}
}
// Tool Tip
.tool-tip-parent {
position: relative;
&:hover {
.tool-tip {
display: block;
}
}
}
.tool-tip {
padding: 10px 0.75rem;
border-radius: .2rem;
color: $white;
background: rgba($black, 0.85);
position: absolute;
left: 0;
bottom: 100%;
z-index: 150;
display: none;
&:after {
border: 5px solid transparent;
border-top-color: rgba($black, 0.85);
content: "";
position: absolute;
left: 10px;
bottom: -10px;
}
&.right {
left: auto;
right: 0;
&:after {
left: auto;
right: 10px;
}
}
&.bottom {
top: 100%;
bottom: auto;
&:after {
top: -10px;
bottom: auto;
border-top-color: transparent;
border-bottom-color: rgba(0, 0, 0, 0.85);
}
}
&.nowrap {
white-space: nowrap;
}
}
.action {
position: relative;
.toggle {
border: none;
border-left: 1px solid darken($gray, 6%);
border-bottom: 1px solid darken($gray, 6%);
background: none;
padding: 2px 8px;
transition: $fast all;
&:hover, &.open {
border-color: $blue;
background: $blue;
.caret {
border-top-color: $white;
}
}
}
&:hover, &.open {
border-radius: $general;
background: $blue;
.caret {
border-top-color: $white;
}
}
.caret {
border-top-color: darken($gray, 30%);
vertical-align: middle;
}
.action-dropdown {
display: none;
position: absolute;
right: 0;
top: 102%;
list-style: none;
margin: 0;
padding: 0;
background: $white;
border: 1px solid darken($gray, 6%);
border-radius: $general;
box-shadow: 0 1px 3px 0 rgba($black, 0.2);
a {
display: block;
padding: 3px 12px;
white-space: nowrap;
&:hover {
color: $white;
background-color: $blue;
}
}
&.open {
display: block;
}
}
}
.card {
border-radius: $general;
background: $white;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
transition: $normal box-shadow;
&:hover {
box-shadow: 0 1px 25px 0 rgba(0, 0, 0, 0.2);
}
}
// responsive grid
.square {
float: left;
position: relative;
width: 20%;
padding-bottom: 20%;
margin: 1%;
background-color: $white;
overflow: hidden;
.content {
position: absolute;
height: 90%;
width: 90%;
padding: 5%;
.rs {
width: auto;
height: auto;
max-height: 90%;
max-width: 100%;
}
}
.table {
display: table;
width: 100%;
height: 100%;
}
.table-cell {
display: table-cell;
vertical-align: middle;
}
}
// avatar
.admin-avatar {
width: 60px;
height: 60px;
max-width: none;
border-radius: $round;
}
// breadcrumb
.breadcrumb {
padding-left: 0;
margin: 0;
background: none;
> li {
text-shadow: none;
font-size: 13px;
}
}

View File

@ -1,227 +0,0 @@
@charset "utf-8";
@import "group-variables";
// Group index and public
#main-wrap .wrap-inner {
padding: 80px 20px 20px;
}
.group-public,
.group-index {
margin: auto;
max-width: 1500px;
}
.group-card {
list-style: none;
margin-bottom: 20px;
}
.group-card-action {
position: absolute;
right: 12px;
top: 6px;
z-index: 200;
.group-card-dropdown-toggle {
border: 1px solid darken($gray, 6%);
border-radius: $general;
&:hover {
border-radius: $general;
}
}
.group-card-dropdown {}
}
.group-card-inner {
padding: 2.6rem 0.8rem;
position: relative;
min-height: 280px;
hr {
margin: 8px 0 10px 0;
}
}
.group-avatar {
position: relative;
width: 100%;
height: 200px;
overflow: hidden;
background: $dark-gray;
z-index: 100;
&:hover .action {
z-index: 600;
opacity: 1;
}
img {
width: 100%;
height: auto;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 500;
margin: auto;
}
.action {
opacity: 0;
background: rgba($blue, 0.9);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
.edit {
color: $white;
font-size: 25px;
position: absolute;
top: 50%;
left: 45%;
transform: translate(-50%, -50%);
margin: auto;
}
.trash {
color: $red;
font-size: 25px;
position: absolute;
top: 49%;
left: 60%;
transform: translate(-50%, -50%);
margin: auto;
}
}
.group-info {
overflow: hidden;
}
.group-mail {
color: $dark-gray;
font-family: $sub-font;
}
.group-roles {
list-style: none;
margin: 0;
padding: 0;
font-family: $sub-font;
.label {
font-family: $main-font;
text-transform: capitalize;
text-shadow: none;
}
.label.private {
background-color: $red;
}
.label.public {
background-color: #74c25d;
}
}
.group-privacy {
color: $dark-gray;
margin-bottom: 8px;
}
.group-description {
overflow: hidden;
max-height: 150px;
}
.group-name {
margin-bottom: 4px;
}
// 370px
@media screen and (min-width: 23.125rem) {
.group-index {
width: 90%;
}
.group-card {
width: 100%;
}
}
// 600px
@media screen and (min-width: 37.5rem) {
.group-index {
margin-top: 0;
width: 100%;
}
.group-card {
float: left;
padding: 0 0.5rem;
width: 50%;
&:nth-child(2n+1) {
clear: both;
padding-left: 0;
}
}
}
// 900px
@media screen and (min-width: 56.25rem) {
.group-card {
width: 33.3%;
&:nth-child(2n+1) {
clear: none;
padding-left: 0.5rem;
}
&:nth-child(3n+1) {
clear: both;
padding-left: 0;
}
}
}
// 1080px
@media screen and (min-width: 67.5rem) {
.group-card {
width: 25%;
&:nth-child(3n+1) {
clear: none;
padding-left: 0.5rem;
}
&:nth-child(4n+1) {
clear: both;
padding-left: 0;
}
}
}
// 1400px
@media screen and (min-width: 87.5rem) {
.group-card {
width: 20%;
&:nth-child(4n+1) {
clear: none;
padding-left: 0.5rem;
}
&:nth-child(5n+1) {
clear: both;
padding-left: 0;
}
}
}

View File

@ -1,154 +0,0 @@
@import "group-variables";
// Group page
#main-wrap {
padding-top: 0;
.wrap-inner {
// padding: 0;
}
}
.group-member-banner-wrap {
height: 280px;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
width: 100%;
transition: $fast all;
z-index: 500;
background: lighten($black, 25%);
}
.group-member-bar {
padding: 0 2rem 0 6rem;
background: rgba(25, 27, 29, 0.95);
width: 100%;
position: absolute;
left: 0;
bottom: 0;
}
.group-member-page-title {
margin-bottom: 12px;
padding: 6px 0;
color: $white;
font-family: $main-font;
font-weight: normal;
max-width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.group-member-dropdown {
margin: 12px 0;
> button {
padding: 8px 0.75rem;
}
.badge {
margin-left: 4px;
}
}
.group-member-section {
overflow: hidden;
padding: 220px 2rem 30px;
}
.group-member-list {
padding: 0;
margin: 0;
}
.group-member-item {
list-style: none;
padding: 16px 1rem;
margin: 8px 0 12px 0;
}
.group-member-photo-wrap {
display: inline-block;
vertical-align: top;
margin-right: 0.5rem;
}
.group-member-meta-wrap {
display: inline-block;
vertical-align: top;
width: 50%;
}
.group-member-name {
font-size: 0.8125rem;
}
.group-member-photo {
width: 60px;
height: 60px;
border-radius: $round;
}
// scroll view
.group-member.scroll {
padding-top: 2rem;
padding-bottom: 9rem;
.group-member-page-title {
margin-top: 0;
margin-bottom: 0;
font-size: 1.625rem;
line-height: 50px;
}
.group-member-banner-wrap {
height: 120px;
}
.group-member-page-title {
margin-bottom: 0;
font-size: 1.625rem;
line-height: 50px;
}
.group-member-section {
padding-top: 60px;
}
}
// 620
@media screen and (min-width: 38.75rem) {
.group-member-item {
float: left;
margin-right: 1rem;
width: 45%;
}
}
// 980px
@media screen and (min-width: 61.25rem) {
.group-member-content-wrap {
width: 70%;
}
.group-member-item {
width: 30%;
}
.group-member-page-title {
display: inline-block;
margin: 0;
padding: 0;
line-height: 70px;
transition: .6s all;
}
}
// 1400px
@media screen and (min-width: 87.5rem) {
.group-member-item {
width: 20%;
}
}

View File

@ -1,394 +0,0 @@
@charset "utf-8";
@import "group-variables";
// Group page
#main-wrap {
padding-top: 0;
}
.group-post-banner-wrap {
height: 280px;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
width: 100%;
transition: $fast all;
z-index: 500;
background: lighten($black, 25%);
}
.group-post-banner-image-wrap {
background-color: $black;
text-align: center;
}
.group-post-view-switch {
position: absolute;
top: 4rem;
right: 2rem;
}
.group-post-banner-image {
width: auto;
max-width: 100%;
height: auto;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
.group-post-bar {
padding: 0 2rem 0 6rem;
text-align: center;
background: rgba(25, 27, 29, 0.95);
width: 100%;
position: absolute;
left: 0;
bottom: 0;
}
.group-post-view-switch-in-bar {
display: none;
.button {
padding: 3px .75rem;
}
}
.group-post-page-title {
margin-bottom: 12px;
padding: 6px 0;
color: $white;
font-family: $main-font;
font-weight: normal;
max-width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.group-post-section {
overflow: hidden;
padding: 300px 2rem 30px;
}
.breadcrumb {
li {
overflow: hidden;
max-width: 150px;
display: inline-block;
vertical-align: middle;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.gorup-page-info-wrap {
font-size: .9rem;
padding: 6px 1rem;
display: block;
float: right;
cursor: pointer;
}
.group-post-description-wrap {
clear: both;
}
.gorup-page-info-wrap {
margin-bottom: 10px;
text-align: right;
}
.group-post-status-wrap {
font-size: .75rem;
float: right;
padding: 2px 0.5rem;
margin-bottom: 10px;
}
.group-post-status-wrap.close-eye {
margin-left: 5px;
background: $red;
}
.group-post-description-wrap {
margin-bottom: 15px;
padding: 16px 1.2rem 16px;
border-radius: .2rem;
box-shadow: inset 0 0 8px $dark-gray;
}
.group-post-description {
clear: both;
text-align: justify;
}
.group-post-member-count,
.group-post-no-member {
background: $blue;
color: $white;
padding: 6px 0.625rem;
border-radius: $general;
&:hover {
background: darken($blue, 10%);
color: $white;
}
}
.group-post-item {
position: relative;
clear: both;
margin-bottom: 40px;
padding: 28px 1.5rem;
text-align: center;
&.clickable {
cursor: pointer;
}
&:hover {
.group-post-title {
color: $blue;
}
}
}
.group-post-actions {
position: absolute;
right: 0;
top: 0;
}
.group-post-dropdown-toggle {
&:hover, &.open {
.caret {
}
}
.caret {
}
}
.group-post-dropdown {
a {
&:hover {
}
}
&.open {
}
}
.group-post-action-hint {
white-space: nowrap;
}
.group-post-image-wrap {
display: inline-block;
margin-bottom: 12px;
}
.group-post-image {
width: 100%;
max-width: 100%;
height: auto;
margin-top: 12px;
border: 2px solid $gray;
border-radius: $general;
}
.group-post-content {
margin-bottom: .5rem;
color: $dark-gray;
overflow: hidden;
}
.group-post-title {
font-size: 1.5rem;
font-weight: normal;
line-height: 1;
margin-bottom: 12px;
color: $light-black;
font-family: $paragraph-font;
}
.group-post-sub-wrap {
display: inline-block;
}
.group-post-meta-wrap {
color: $dark-gray;
}
.group-post-author,
.group-post-sub-wrap {
margin-right: .5rem;
}
.group-post-seen-by {
display: inline-block;
}
.group-post-seen-by-lead {
font-style: normal;
}
// scroll view
.group-post.scroll {
padding-top: 7rem;
padding-bottom: 6rem;
.group-post-banner-wrap {
height: 120px;
}
.group-post-page-title {
margin-bottom: 0;
font-size: 1.625rem;
line-height: 50px;
}
.group-post-new-post,
.group-post-join {
margin-top: 12px;
padding: 6px 10px;
}
.group-post-new-post {
display: inline-block;
vertical-align: top;
}
.group-post-view-switch {
position: static;
display: inline-block;
margin: 6px .5rem 0 0;
display: none;
}
.group-post-view-switch-in-bar {
display: inline-block;
margin-top: 12px;
.button {
padding: 4px .75rem;
}
}
.group-post-section {
padding-top: 60px;
}
.btn {
padding: 2px 5px;
}
}
.group-post li a {
text-decoration: none;
text-align: left;
}
.group-post-switch-btn {
color: $blue;
&:hover {
color: $white;
}
}
// 400px
@media screen and (min-width: 25rem) {
.group-post-new-post,
.group-post-join {
margin: 0 0.625rem 16px;
float: none;
display: inline-block;
}
.group-post-view-switch-in-bar {
float: none;
margin: 0;
.button {
padding: 6px .75rem;
}
}
}
// 600px
@media screen and (min-width: 37.5rem) {
.group-post-item {
margin-bottom: 35px;
text-align: left;
}
.group-post-image-wrap {
float: left;
width: 12%;
min-width: 100px;
margin-right: 4%;
max-height: 140px;
overflow: hidden;
}
.group-post-content-wrap {
float: left;
width: 70%;
font-family: $paragraph-font;
}
}
/* 760px */
@media screen and (min-width: 47.5rem) {
.group-post-content-wrap {
width: 70%;
}
.group-post-bar {
text-align: left;
}
.group-post-page-title {
display: inline-block;
margin: 0;
padding: 0;
line-height: 70px;
transition: .6s all;
max-width: 80%;
}
.group-post-new-post,
.group-post-join {
float: right;
margin: 18px 0 0 0;
}
.group-post-view-switch-in-bar {
margin: 18px 8px 0 0;
float: right;
li {
padding: 8px .75rem;
}
}
.group-post-view-switch {
float: right;
}
}
// 900px
@media screen and (min-width: 56.25rem) {
.group-post-content-wrap {
width: 80%;
}
}

View File

@ -1,38 +0,0 @@
@charset "utf-8";
@import "group-variables";
// General style
body {
background: $gray;
font-family: $main-font;
}
.group-show-post-respond-comment,
ul, li, div, img {
box-sizing: border-box;
}
h1, h2, h3, h4, h5, h6, label, legend {
font-family: $main-font;
}
img {
max-width: 100%;
height: auto;
}
a {
color: $blue;
text-decoration: none;
&:hover {
color: lighten($blue, 5%);
text-decoration: none;
}
}
a, button {
&:focus {
outline: none;
}
}

View File

@ -1,308 +0,0 @@
@charset "utf-8";
@import "group-variables";
// Group show post
.group-show-post {
padding: 0 2rem 30px;
}
.group-show-post-meta {
margin-bottom: 15px;
}
.group-show-post-title {
font-family: $main-font;
float: left;
width: 90%;
font-weight: normal;
line-height: 1;
}
.group-show-post-avatar-wrap {
float: right;
padding: 0 0.375rem 0 0;
}
.group-show-post-avatar-username-toggle {
display: block;
}
.group-show-post-avatar {
width: 60px;
height: 60px;
border-radius: 50%;
}
.group-show-post-username {
display: none;
top: 100%;
padding-bottom: 30px;
right: 0;
left: auto;
white-space: nowrap;
font-size: 0.75rem;
&:after {
border-top-color: transparent;
border-bottom-color: rgba(0, 0, 0, 0.85);
top: -10px;
left: auto;
right: 20px;
bottom: auto;
}
}
.group-show-post-postdate {
display: inline-block;
clear: both;
}
.group-show-post-image-wrap {
position: relative;
background: $black;
overflow: hidden;
&:hover {
.cycle-nav {
opacity: 1;
}
.group-show-post-cycle-prev {
left: 2rem;
}
.group-show-post-cycle-next {
right: 2rem;
}
}
}
.group-show-post-image-list {
margin: 0;
padding: 0;
list-style: none;
}
.cycle-nav {
font-size: 1.2rem;
position: absolute;
top: 50%;
margin-top: -1.25rem;
line-height: 1.5rem;
color: $white;
z-index: 500;
width: 2.5rem;
height: 2.5rem;
cursor: pointer;
-webkit-transition: $fast all;
transition: $fast all;
text-align: center;
background-color: rgba($black, 0.8);
border-radius: 50%;
opacity: 0;
&:hover {
background-color: $blue;
}
.group-show-post-cycle-nav-icon {
line-height: 2.6rem;
}
}
.group-show-post-cycle-prev {
left: 0;
}
.group-show-post-cycle-next {
right: 0;
}
.group-show-post-content {
font-family: $main-font;
font-size: .8125rem;
margin: 15px 0;
}
.group-show-post-attachment-wrap {
float: left;
width: 80%;
margin: 10px 0 25px;
.group-show-post-attachment-file-format {
margin-right: 8px;
vertical-align: middle;
font-size: 1rem;
}
}
.group-show-post-seen-by {
float: right;
cursor: pointer;
&:hover {
.group-show-post-seen-by-names {
display: block;
white-space: nowrap;
}
}
.group-show-post-seen-by-name {
display: block;
color: #fff;
white-space: nowrap;
}
}
.group-show-post-seen-by-lead {
margin-right: 4px;
font-style: normal;
}
.group-show-post-seen-by-names {
display: none;
}
.group-show-post-seen-by-count {
border-radius: 50%;
background: $gray;
display: inline-block;
}
// Comment section
.comments {
clear: both;
.group-show-post-respond-comment {
width: 100%;
height: 60px;
padding: 0 1rem;
box-shadow: none;
width: 100%;
}
.group-show-post-avatar {
display: none;
}
}
.group-show-post-actions {
position: absolute;
right: 0;
top: 0;
}
.group-no-permission {
padding-left: 2rem;
background: $red;
color: $white;
padding: 10px 0.75rem;
border-radius: $general;
i {
margin-right: 8px;
}
}
.group-show-post-respond-wrap {
margin-bottom: 16px;
}
.group-show-post-respond-submit {
font-size: 0.875rem;
}
.group-show-post-comment-list {
margin: 0;
padding: 0;
list-style: none;
}
.group-show-post-comment {
position: relative;
border-radius: 0;
box-shadow: none;
border-bottom: 2px solid $gray;
&:hover {
box-shadow: none;
}
}
.group-show-post-comment-wrap {
overflow: hidden;
padding: 16px 1.25rem;
}
.group-show-post-no-comment {
font-size: 0.8125rem;
}
.group-show-post-comment-avatar {
float: left;
width: 60px;
margin-right: 1rem;
img {
width: 60px;
height: 60px;
border-radius: 50%;
}
}
.group-show-post-comment-author {
font-size: .9375rem;
float: left;
margin-right: 0.5rem;
}
.group-show-post-comment-time {
float: left;
}
.group-show-post-comment-content {
clear: both;
}
.group-show-post-comment-body {
float: left;
width: 60%;
}
// 260px
@media screen and (min-width: 16.25rem) {
.group-show-post-attachments {
a {
display: inline-block;
text-overflow: ellipsis;
}
}
.group-show-post-attachments-file-name {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
vertical-align: middle;
width: 80px;
white-space: nowrap;
}
}
// 370px
@media screen and (min-width: 23.125rem) {
.group-show-post-comment-body {
width: 70%;
}
}
// 800px
@media screen and (min-width: 50rem) {
.group-show-post-comment-body {
width: 85%;
}
.comments {
.group-show-post-avatar {
float: left;
width: 10%;
max-width: 60px;
min-width: 60px;
display: block;
}
.group-show-post-respond-comment {
float: left;
width: 89%;
margin-left: 1%;
}
}
}
// 960px
@media screen and (min-width: 60rem) {
.group-show-post-comment-body {
width: 90%;
}
}

View File

@ -1,36 +0,0 @@
@charset "utf-8";
// Google fonts
@import url(http://fonts.googleapis.com/css?family=Maven+Pro);
@import url(http://fonts.googleapis.com/css?family=Roboto);
// Font stacks
$main-font: "Maven Pro", "微軟正黑體" sans-serif;
$sub-font: "Roboto", "微軟正黑體", sans-serif;
$paragraph-font: "Roboto", "微軟正黑體", sans-serif;
// Colors
$gray: #f3f3f3;
$dark-gray: #aaaaaa;
$light-gray: #cdcdcd;
$white: white;
$light-black: #353535;
$black: black;
$green: #74c25d;
$blue: #4171d5;
$red: #dd5933;
$blue-green: #00acee;
$group-page-bar-color: #171717;
// Transition units
$fast: 0.3s;
$normal: 0.6s;
$slow: 1s;
// Border radius units
$general: 0.25rem;
$round: 50%;
// Commonly use units
$boundary: 1150px;

View File

@ -1,270 +0,0 @@
@charset "utf-8";
@import "group-variables";
@import "group-classes";
@import "group-reset";
// General style
body {
background: $gray;
font-family: $main-font;
}
// dropzone
.dropzone-pool {
border: 2px dashed $blue;
margin-bottom: 16px;
font-family: $paragraph-font;
font-size: 0.9375rem;
color: $dark-gray;
margin-right: 1rem;
border-radius: $general;
}
// Override and resolve the conflict with main-form.css for that I need RWD support for this page
.main-forms fieldset .input-area .controls textarea {
max-width: none;
}
// Override Bootstrap modal
.modal.fade {
top: -65%;
}
// Override select2 styles, I need this evil power
#main-wrap {
.select2-container-multi {
margin-right: 0.9375rem;
min-width: 200px;
.select2-choices {
padding: 0;
border-radius: $general;
.select2-search-field {
input {
padding: 10px 5px;
}
}
}
.select2-search-choice {
padding: 10px 1.75rem 10px 0.7rem;
border-color: lighten($light-gray, 5%);
background: $white;
> div {
&:before {
content: "\F007";
font-family: FontAwesome;
display: inline-block;
font-size: 0.9375rem;
color: $blue;
margin: 0 0.5rem 0 0;
}
}
}
.select2-search-choice-close {
right: 15px;
left: auto;
&:before {
content: "\f057";
font-family: FontAwesome;
position: absolute;
cursor: pointer;
left: 6px;
top: 6px;
font-size: 0.9375rem;
color: $dark-gray;
}
&:hover {
&:before {
color: $red;
}
}
}
}
}
.select2-result-label {
> span {
white-space: nowrap;
}
}
.wrap-inner {
.upload-status-notice {
position: fixed;
right: 1rem;
top: 4rem;
color: $white;
padding: 16px 1.375rem;
background-color: $blue;
border-radius: $general;
font-size: 0.8125rem;
box-shadow: 0px 0px 16px 3px rgba(0, 0, 0, 0.2);
-webkit-animation-duration: .3s;
animation-duration: .3s;
z-index: 3000;
}
}
.fileupload {
.thumbnail {
max-width: 60%;
height: auto;
}
}
.img-avatar {
width: 50px;
height: 50px;
}
// members page
.existing-phone-avatar {
vertical-align: top;
margin: 0 0.5rem 0.5rem 0;
}
.existing-member-count {
width: 60px;
height: 60px;
display: inline-block;
box-sizing: border-box;
line-height: 40px;
text-align: center;
white-space: nowrap;
padding: 8px 0.45rem;
font-size: 0.8125rem;
}
.group-edit-button {
box-sizing: border-box;
vertical-align: top;
line-height: 40px;
width: 60px;
height: 60px;
display: inline-block;
text-align: center;
font-size: 0.8125rem;
}
.group-edit-avatar {
width: 60;
}
.group-member-edit-table {
width: 100%;
tr {
border-bottom: 1px solid $gray;
}
td {
padding: 8px 0.75rem;
&:first-child {
width: 60px;
}
}
.make-admin-checkbox {
display: inline-block;
vertical-align: top;
margin-right: 0.3125rem;
}
.group-member-permission {
display: inline-block;
vertical-align: text-top;
}
}
.group-admin-edit-image-wrap {
margin: 0 24px 1rem 0;
}
.group-admin-edit-image-item {
margin: 0 10px 16px 0;
padding: 16px 0.5rem;
}
.group-admin-edit-image-container {
max-width: 100px;
margin: 0 1rem 16px 0;
}
.group-admin-edit-checkbox-wrap {
color: $white;
font-size: 0.8125rem;
background: $blue;
padding: 2px 0.625rem;
border-radius: $general;
float: left;
}
.group-admin-edit-image-checkbox {
display: inline-block;
vertical-align: top;
}
.group-admin-edit-image-label {
display: inline-block;
vertical-align: text-top;
font-size: 0.75rem;
}
.group-admin-edit-image-item-inner {
padding: 16px 0.625rem;
background: $white;
border-radius: $general;
}
.group-admin-edit-file-wrap {
margin-bottom: 10px;
}
.group-admin-edit-file-item {
padding: 10px 16px;
float: left;
margin: 0 8px 0.5rem 0;
font-size: 0.8125rem;
.group-admin-edit-file-checkbox {
margin: 0;
}
}
.group-admin-edit-filename {
margin-right: 0.3125rem;
}
.group-admin-edit-file-delete {
padding-bottom: 4px;
border-bottom: 1px dotted $red;
vertical-align: top;
}
@media screen and (min-width: 700px) {
.group-admin-edit-image-item {
float: left;
width: 45%;
}
}
@media screen and (min-width: 960px) {
.group-admin-edit-image-item {
width: 30%;
}
}
@media screen and (min-width: 1150px) {
.group-admin-edit-image-item {
width: 20%;
}
}

View File

@ -1,15 +0,0 @@
@charset "utf-8";
@import "group-variables";
@import "group-classes";
@import "group-reset";
@import "group-index";
@import "group-post";
@import "group-show-post";
@import "group-category";
@import "group-members";
.topnav {
display: none;
}

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
color: #FFF;
font-family: 'Chivo';
i {
display: inline-block;
display: block;
width: 50px;
height: 40px;
line-height: 40px;
@ -51,13 +51,6 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
text-align: center;
}
}
.orbit-bar-language-icon {
width: 30px;
}
.orbit-bar-language-text {
display: inline-block;
vertical-align: top;
}
}
#orbit-bar {
position: fixed;
@ -66,7 +59,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
left: 0;
font-family: 'Chivo';
font-size: 16px;
z-index: 1040;
z-index: 1060;
-webkit-box-sizing: initial;
-moz-box-sizing: initial;
box-sizing: initial;
@ -203,7 +196,6 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
color: #fff;
&:hover {
color: #fff;
background-color: #d92b0e;
@ -311,25 +303,24 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
}
li {
min-width: 100px;
padding: 0;
padding: 0 0.8em;
&.divider {
height: 1px;
margin: 0.3em 0;
background-color: lighten($orbit-bar-bgc, 60%);
}
&:hover, &.active {
color: #fff;
background-color: #0095CF;
a {
color: #FFF;
}
}
}
a, .active {
a {
color: $orbit-bar-bgc-lighter;
font-size: 0.8em;
display: block;
padding: 0.5em 1.2em;
padding: 0.5em 0;
white-space: nowrap;
}
}
@ -347,6 +338,10 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
width: auto;
height: 85%;
}
// background-position: center;
// background-repeat: no-repeat;
// background-image: url('<%= asset_path 'orbit-logo.svg' %>');
// background-image: url('<%= asset_path 'orbit-logo.png' %>')\9;
& + ul {
left: 0;
}
@ -407,9 +402,6 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
}
}
}
#language {
padding-left: 0;
}
label {
padding: 0;
margin-bottom: 0;
@ -417,7 +409,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
}
}
@media (max-width: 540px) {
@media (max-width: 479px) {
#orbit-bar {
.login-window {
width: 90%;
@ -478,8 +470,6 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
}
.orbit-bar-title {
display: block;
height: 40px;
line-height: 40px;
}
ul.orbit-bar-search-sign-language {
display: none;

View File

@ -6,56 +6,4 @@
*/
.ui-helper-hidden-accessible{
display: none;
}
#form_for_attribs {
margin-bottom: 5px;
}
.current-roles {
list-style: none;
margin: 0 0 20px 0;
padding: 0;
}
.current-roles > li {
padding: 8px 10px;
margin-bottom: 8px;
border-radius: 4px;
border: 1px solid #eee;
background: #fff;
-webkit-box-shadow: 0 0 2px 0 rgba(0,0,0,.2);
box-shadow: 0 0 2px 0 rgba(0,0,0,.2);
cursor: move;
}
.role-value {
display: inline-block;
margin-right: 8px;
}
.remove-role {
cursor: pointer;
float: right;
padding-left: 16px;
border-left: 2px solid #e6e6e6;
}
.remove-role > i {
font-size: 1.125rem;
}
.remove-role:hover {
color: #ff4444;
}
.attr.control-label {
text-align: left;
width: 120px;
}
.attr.controls {
margin-left: 100px;
}
.link-to-show {
float: right;
margin-right: 16px;
}
.preloader-wrap {
text-align: center;
}

View File

@ -1,162 +1,29 @@
class Admin::GroupsController < OrbitGroupController
include Admin::GroupsHelper
class Admin::GroupsController < OrbitMemberController
def index
@groups = current_user.groups
end
def public_groups
@groups = Group.open
@groups = Group.all
end
def categories
old_categories = GroupCategory.where(:is_accepted.ne => false)
if old_categories.count > 0
old_categories.each do |oc|
oc.is_accepted = true
oc.save
end
end
@admin_categories = GroupCategory.by_admin
@requested_categories = GroupCategory.is_requested
end
def newpost
render_401 and return if !user_can_write?
@no_breadcrumb = true
@grouppost = GroupPost.new
end
def createpost
gp = GroupPost.new(post_params)
gp.group = @group
gp.save
redirect_to admin_group_path(@group)
end
def updatepost
@post = GroupPost.find(params[:id])
group = @post.group
@post.update_attributes(post_update_params)
@post.save
redirect_to admin_group_path(group)
end
def deletepost
gp = GroupPost.find(params[:id])
gp.destroy
render :json => {"success" => true}.to_json
end
def showpost
render_401 and return if !user_can_read?
if (current_user.id.to_s != @post.author.to_s) && (!@post.read_by.include?(current_user.id.to_s))
@post.read_by << current_user.id.to_s
@post.save
end
@read_by_names = @post.read_by.collect{|rb|
user = User.find(rb) rescue nil
author = (user.member_profile.name == nil ? user.user_name : user.member_profile.name rescue "") if !user.nil?
author
}
end
def editpost
render_401 and return if @post.author != current_user.id
@no_breadcrumb = true
@grouppost = @post
end
def show
@no_breadcrumb = true
@no_filter = true
if !user_can_read?
render_401 and return
end
end
def members
render_401 and return if !user_can_read?
@group_members = []
@group.users.each do |user|
mp = user.member_profile rescue nil
if !mp.nil?
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
@group_members << {
"id" => user.id.to_s,
"user_name" => (user.user_name rescue ""),
"avatar" => avatar,
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""}),
"admin" => @group.admins.include?(user.id.to_s)
}
end
end
@categories = GroupCategory.all
end
def create_category
gc = GroupCategory.new(category_params)
gc.save
if !current_user.is_admin?
@requested_categories = GroupCategory.is_requested
render :partial => "group_requested_categories"
else
@admin_categories = GroupCategory.by_admin
render :partial => "group_categories"
end
end
def update_category
gc = GroupCategory.find(params[:category_id])
gc.update_attributes(category_params)
gc.save
@admin_categories = GroupCategory.by_admin
@categories = GroupCategory.all
render :partial => "group_categories"
end
def upload_photo
photo = GroupPostImage.new(post_image_params)
photo.save
render :json => {"success" => true,"id" => photo.id.to_s}.to_json
end
def upload_file
file = GroupPostFile.new(post_file_params)
file.save
render :json => {"success" => true,"id" => file.id.to_s}.to_json
end
def download_file
file_id = params[:id]
file = GroupPostFile.find(file_id) rescue nil
if !file.nil?
redirect_to file.file.url and return
end
render :nothing => true
end
def create
group = Group.new(group_params)
group.save
redirect_to admin_groups_path
end
def update
@group = Group.find(params[:id])
@group.update_attributes(group_update_params)
@group.save
redirect_to admin_groups_path
end
def destroy
group = Group.find(params[:id])
group.destroy
render :json => {"success" => true}.to_json
end
def new
@group = Group.new
@no_breadcrumb = true
@categories = GroupCategory.by_admin.collect{|gc| [gc.title,gc.id]}
@categories = GroupCategory.all.collect{|gc| [gc.title,gc.id]}
@members = []
MemberProfile.all.each do |mp|
user = mp.user rescue nil
@ -172,188 +39,18 @@ class Admin::GroupsController < OrbitGroupController
end
end
def edit
render_401 and return if !is_user_group_admin?
@no_breadcrumb = true
@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" && !@group.users.include?(user)
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
@existing_members = []
@group.users.each do |user|
mp = user.member_profile rescue nil
if !mp.nil?
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
@existing_members << {
"id" => user.id.to_s,
"user_name" => (user.user_name rescue ""),
"avatar" => avatar,
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""}),
"admin" => @group.admins.include?(user.id.to_s)
}
end
end
end
def get_existing_member_template
g = params[:group_id]
group = Group.find(g)
@existing_members = []
group.users.each do |user|
mp = user.member_profile rescue nil
if !mp.nil?
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
@existing_members << {
"id" => user.id.to_s,
"user_name" => (user.user_name rescue ""),
"avatar" => avatar,
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""}),
"admin" => group.admins.include?(user.id.to_s)
}
end
end
render :partial => "group_existing_member"
end
def remove_user
group = Group.find(params[:group_id])
user_id = params[:user_id]
user = User.find(user_id)
group.users.delete(user)
group.admins.delete(user.id.to_s) if group.admins.include?(user.id.to_s)
group.save
render :json => {"success" => true}.to_json
end
def toggle_admin
group = Group.find(params[:group_id])
user_id = params[:user_id]
user = User.find(user_id)
if params[:admin] == "true"
group.admins << user.id.to_s
else
group.admins.delete(user.id.to_s)
end
group.save
render :json => {"success" => true}.to_json
end
def new_comment
gpc = GroupPostComment.new(comment_params)
gpc.save
render :partial => "post_comment", :collection => [gpc]
end
private
def category_params
p = params.require(:category).permit!
if p[:is_accepted].nil?
p[:is_accepted] = true
else
p[:is_accepted] = false
end
p
end
def comment_params
params.require(:group_post_comment).permit!
end
def post_params
p = params.require(:group_post).permit!
p["author"] = current_user.id
images = []
p[:group_post_images].each do |id|
gpi = GroupPostImage.find(id) rescue nil
if !gpi.nil?
images << gpi
end
end if !p[:group_post_images].nil?
files = []
p[:group_post_files].each do |id|
gpf = GroupPostFile.find(id) rescue nil
if !gpf.nil?
files << gpf
end
end if !p[:group_post_files].nil?
p[:group_post_images] = images
p[:group_post_files] = files
p
end
def post_update_params
p = params.require(:group_post).permit!
p["author"] = current_user.id
params[:images_to_destroy].each do |img|
gpi = GroupPostImage.find(img) rescue nil
gpi.destroy if !gpi.nil?
end if !params[:images_to_destroy].nil?
images = @post.group_post_images
p[:group_post_images].each do |id|
gpi = GroupPostImage.find(id) rescue nil
if !gpi.nil?
images << gpi
end
end if !p[:group_post_images].nil?
params[:files_to_destroy].each do |fil|
gpf = GroupPostFile.find(fil) rescue nil
gpf.destroy if !gpf.nil?
end if !params[:files_to_destroy].nil?
files = @post.group_post_files
p[:group_post_files].each do |id|
gpf = GroupPostFile.find(id) rescue nil
if !gpf.nil?
files << gpf
end
end if !p[:group_post_files].nil?
p[:group_post_images] = images
p[:group_post_files] = files
p
end
def post_image_params
params.require(:group_post_image).permit!
end
def post_file_params
params.require(:group_post_file).permit!
params.require(:category).permit!
end
def group_params
p = params.require(:group).permit!
p["user_ids"] = [] if p["user_ids"].nil?
p["user_ids"] << current_user.id.to_s
p["admins"] = []
p["admins"] << current_user.id.to_s
p
end
def group_update_params
p = params.require(:group).permit!
p["user_ids"] = [] if p["user_ids"].nil?
p["user_ids"].concat(@group.users.collect{|u| u.id.to_s})
p
end
end
end

View File

@ -10,9 +10,7 @@ class Admin::MembersController < OrbitMemberController
def index
@roles = Role.excludes(disabled: true)
page_num = params[:page] || 1
param_temp = request.fullpath.split("?")
@edit_params = (param_temp.count > 1 ? "?" + param_temp.last : "") rescue ""
@filter = params[:filter]
@mq = params[:mq]
@new_filter = params[:new_filter]
@ -80,7 +78,7 @@ class Admin::MembersController < OrbitMemberController
end
def show
@custom_fields = @member.member_profile_field_values rescue []
@custom_fields = @member.member_profile_field_values rescue nil
@plugins = OrbitApp::Plugin::Registration.all rescue nil
@ppname = Array.new
@plugins.each do |aa|
@ -451,8 +449,6 @@ class Admin::MembersController < OrbitMemberController
end
def edit
param_temp = request.fullpath.split("?")
@edit_params = (param_temp.count > 1 ? "?" + param_temp.last : "") rescue ""
if has_access?
@form_index = 0
get_info_and_roles
@ -468,15 +464,12 @@ class Admin::MembersController < OrbitMemberController
def create
@member = MemberProfile.new(member_profile_params)
if user_params["user_name"] != ""
@user = User.new(user_params) rescue nil
@user.member_profile = @member
@user.save
end
if @member.save
if user_params["user_name"] != ""
@user = User.new(user_params) rescue nil
@user.member_profile = @member
if !@user.save
@member.destroy
render 'new' and return
end
end
if !params[:member_profile_field_values].nil?
params[:member_profile_field_values].each_with_index do |m,i|
@custom_field_value = @member.member_profile_field_values.build(value: m.second["value"], member_profile_field_id: m.second["member_profile_field_id"])
@ -498,8 +491,6 @@ class Admin::MembersController < OrbitMemberController
end
def update
param_temp = request.fullpath.split("?")
@edit_params = (param_temp.count > 1 ? "?" + param_temp.last : "") rescue ""
respond_to do |format|
if @member.user.present?
@user = @member.user
@ -538,7 +529,7 @@ class Admin::MembersController < OrbitMemberController
end
format.html { redirect_to admin_members_path() + @edit_params, notice: 'Successfully Updated the User' }
format.html { redirect_to admin_members_path, notice: 'Successfully Updated the User' }
format.json { head :no_content }
else
format.html { render action: 'edit' }
@ -594,7 +585,6 @@ class Admin::MembersController < OrbitMemberController
end
def edit_privilege
@edit_params = "?" + request.fullpath.split("?").last rescue ""
if current_user.is_admin?
@user = @member.user
@workgroup = Workgroup.find_by(key: 'admin')
@ -713,7 +703,7 @@ class Admin::MembersController < OrbitMemberController
protected
def get_info_and_roles
@roles = Role.excludes(disabled: true).asc(:key)
@roles = Role.excludes(disabled: true)
@infos = MemberProfileField.excludes(disabled: true)
end

View File

@ -1,8 +1,9 @@
class Admin::ModuleStoreController < OrbitAdminController
layout "structure"
include Admin::ModuleStoreHelper
def index
@extensions = []
@downloaded_extensions = []
# if current_site.site_token?
# if current_site.store_confirmation
# @extensions = get_extensions
@ -23,11 +24,6 @@ class Admin::ModuleStoreController < OrbitAdminController
@extension = get_extension(params[:id]) rescue nil
end
def modules_to_update
@built_in_extensions = get_built_in_extensions
render :partial => "modules_to_update"
end
def download
#get extension related values
extension = get_extension(params[:id]) rescue nil
@ -99,28 +95,11 @@ class Admin::ModuleStoreController < OrbitAdminController
end
def restart
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=built_in_extensions.rb bundle update && bundle` }
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update && bundle` }
@built_in_extensions = get_built_in_extensions
render :partial => "modules_to_update"
Bundler.with_clean_env { `cd #{Rails.root} && bundle install` }
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
sleep 5
end
def update_module
key = params["key"]
type = params["type"]
# if type == "built_in"
# Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=built_in_extensions.rb bundle update #{key}` }
# elsif type == "downloaded"
# Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update #{key}` }
# end
Bundler.with_clean_env { `cd #{Rails.root} && bundle update #{key}` }
render :nothing => true
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
sleep 5
end
protected
def get_extensions
@ -154,7 +133,21 @@ class Admin::ModuleStoreController < OrbitAdminController
store_session.get_extension(id)
end
def get_downloaded_extension
downloaded_extensions = []
extensions = File.new("#{Rails.root}/downloaded_extensions.rb", "r")
while (extension = extensions.gets)
status = !extension.start_with?("# ")
extension = extension.split(',')
downloaded_extensions << {'name' => extension[0].split(/[\'\"]/)[1], 'repo' => extension[1].split(/[\'\"]/)[1], 'tag' => extension[2].split(/[\'\"]/)[1], 'status' => status}
end
extensions.close
downloaded_extensions.to_json
end
def toggle_item(module_key, active)
if !module_key.nil?

View File

@ -3,7 +3,7 @@ class Admin::RoleStatusesController < OrbitMemberController
def index
@role = Role.find(params[:role_id]) rescue nil
@role_statuses = RoleStatus.where(role_id: @role.id).asc(:key) if @role
@role_statuses = RoleStatus.where(role_id: @role.id) if @role
respond_to do |format|
format.html # index.html.erb
@ -42,11 +42,8 @@ class Admin::RoleStatusesController < OrbitMemberController
end
def toggle
role_status = RoleStatus.find(params[:role_status_id]) rescue nil
if !role_status.nil?
role_status.disable = role_status.disable ? false : true
role_status.save!
end
@role_status.disable = @role_status.disable ? false : true
@role_status.save!
render action: :index
end

View File

@ -4,7 +4,7 @@ class Admin::RolesController < OrbitMemberController
helper Admin::AttributeValuesViewHelper
def index
@roles = Role.all.asc(:key).entries
@roles = Role.all.asc("_id").entries
end
def show

View File

@ -106,6 +106,9 @@ class Admin::SitesController < OrbitAdminController
else
result = "success"
# Bundler.with_clean_env { `cd #{Rails.root} && bundle update` }
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=built_in_extensions.rb bundle update && bundle` }
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update && bundle` }
end
render :text => result

View File

@ -35,35 +35,6 @@ class Admin::StoreController < OrbitAdminController
response = http.request(request)
data = JSON.parse(response.body)
render :json => data.to_json
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
sleep 5
end
def authorize_default_modules
modules = ModuleApp.all
ids = modules.collect{|ma| ma.key}
store_token = Site.first.store_token rescue nil
if !store_token.nil?
module_apps = ModuleApp.all
params_to_send = {'store_token' => store_token, "apps" => ids}
uri = URI.parse(OrbitStore::URL)
http = Net::HTTP.new(uri.host,uri.port)
request = Net::HTTP::Post.new("/store/register_old_sites_modules")
request.body = params_to_send.to_query
response = http.request(request) rescue nil
if response.nil?
render :json => {"success" => false, "message" => "Could not connect to the store."}.to_json
else
data = JSON.parse(response.body)
if data["success"]
render :json => {"success" => true}.to_json
elsif !data["success"]
render :json => {"success" => false, "message" => data["message"]}.to_json
end
end
else
render :json => {"success" => false, "message" => "Cannot register modules, site is not registered with store."}.to_json
end
end
def check_permissions

View File

@ -2,14 +2,12 @@ class MembersController < ApplicationController
def index
page_roles = OrbitHelper.page_categories
page_role_status = OrbitHelper.page_role_status
params = OrbitHelper.params
page = Page.where(:page_id => params[:page_id]).first rescue nil
fields_to_show = page.custom_array_field if !page.nil? rescue []
fields_to_show = [
{"key"=>"name", "type"=>"profile","sort_order"=>2,"link_to_show"=>true},
{"key"=>"discipline", "type"=>"role", "max_length"=>12},
{"key"=>"email", "type"=>"profile"},
{"key"=>"office_tel", "type"=>"profile"}
] if fields_to_show.blank?
]
if OrbitHelper.member_sort_position
sort = "data['list_order']"
@ -30,26 +28,29 @@ class MembersController < ApplicationController
page_role_status.each do |status_id|
page_roles << RoleStatus.find(status_id).role.id.to_s
end
roles = Role.find(page_roles.uniq).collect do |role|
{ "title" => role.title, "id" => role.id, "status" => RoleStatus.where(:role_id=>role, :_id.in=>page_role_status).asc(:key).to_a }
{ "title" => role.title, "id" => role.id, "status" => RoleStatus.where(:role_id=>role, :_id.in=>page_role_status).to_a }
end
end
role_list = []
roles.each do |role|
attribute_field = AttributeField.where(:key => 'job_title', :role_id => role['id']).first
role_fields_to_show = [{"id"=> attribute_field.id.to_s, "key"=>"job_title", "type"=>"role","sort_order"=>1}] + fields_to_show if !attribute_field.blank?
status_list = []
if !role['status'].blank?
role['status'].each do |status|
member_profiles = get_members_by_status(status, sort, fields_to_show)
member_profiles = get_members_by_status(status, sort, role_fields_to_show)
status_list << { "status-title" => status.title, "members" => member_profiles } if !member_profiles.blank?
end
else
# Members with status
role_status = RoleStatus.order_by(:key=>"asc").where(:role_id=>role['id'])
role_status = RoleStatus.order_by(:id=>"asc").where(:role_id=>role['id'])
role_status_ids = role_status.collect{|status| status.id.to_s}
role_status.each do |status|
member_profiles = get_members_by_status(status, sort, fields_to_show)
member_profiles = get_members_by_status(status, sort, role_fields_to_show)
next if member_profiles.blank?
status_list << { "status-title" => status.title, "members" => member_profiles }
end
@ -236,37 +237,9 @@ class MembersController < ApplicationController
end
when 'role'
if !field['id'].blank?
av = member.attribute_values.find_by(:attribute_field_id=>field['id'],:key=>field['key']) rescue nil
if !av.nil?
r = av.attribute_field.role rescue nil
if !r.nil?
if member.roles.include?(r)
field_data = av.get_field_value rescue {}
else
field_data = {}
end
else
field_data = {}
end
else
field_data = {}
end
field_data = member.attribute_values.find_by(:attribute_field_id=>field['id'],:key=>field['key']).get_field_value rescue {}
else
av = member.attribute_values.find_by(:key=>field['key']) rescue nil
if !av.nil?
r = av.attribute_field.role rescue nil
if !r.nil?
if member.roles.include?(r)
field_data = av.get_field_value rescue {}
else
field_data = {}
end
else
field_data = {}
end
else
field_data = {}
end
field_data = member.attribute_values.find_by(:key=>field['key']).get_field_value rescue {}
end
end
next if field_data.blank? or field_data['value'].blank?

View File

@ -1,43 +0,0 @@
class OrbitGroupController < ApplicationController
layout "member"
before_action :authenticate_user, :get_group, :set_access_rights
def get_group
case params[:action]
when "show","edit"
uid = params[:id].split("-").last
@group = Group.find_by(:uid => uid)
when "newpost", "createpost", "members"
uid = params[:group_id].split("-").last
@group = Group.find_by(:uid => uid)
when "showpost", "editpost"
uid = params[:id].split("-").last
@post = GroupPost.find_by(:uid => uid)
@group = @post.group
end
end
def set_access_rights
@access_right_level = "none"
read_or_write = @group.permission rescue "read"
case params[:action]
when "show", "showpost", "newpost", "edit", "members", "editpost"
is_member = @group.users.include?(current_user)
if @group.admins.include?(current_user.id.to_s)
@access_right_level = "admin"
elsif is_member
if read_or_write == "write"
@access_right_level = "write"
elsif read_or_write == "read"
@access_right_level = "read"
end
elsif !is_member && @group.privacy == "open"
@access_right_level = "read"
end
end
end
def render_401
render "public/401"
end
end

View File

@ -15,10 +15,8 @@ class OrbitMemberController < ApplicationController
visited_user = MemberProfile.find(params[:member_profile_id]).user.id if visited_user.nil? rescue nil
if (current_user.id == visited_user rescue false)
@user_has_privileges = true
elsif visited_user == nil && (params[:action] == "create" || params[:action] == "update")
@user_has_privileges = true
else
@user_has_privileges = false
else
@user_has_privileges = false
end
end
end

View File

@ -35,7 +35,7 @@ class PagePartsController < ApplicationController
def edit_sub_part
@part = part_model.find(params[:part_id])
@subpart = SubPart.find(params[:sub_part_id])
@select_number = @part.sub_parts.index{|sp| sp.id.to_s == @subpart.id.to_s}
@select_number = @part.sub_parts.index(@subpart)
@child_page_count = 0
@kind = @subpart.kind
@modules = ModuleApp.widget_enabled

View File

@ -31,18 +31,14 @@ class PagesController < ApplicationController
impressionist(page)
page.inc(view_count: 1)
end
params[:is_frontend_view] = "true"
OrbitHelper.set_params params,current_user
OrbitHelper.set_site_locale locale
OrbitHelper.set_request_object request
OrbitHelper.render_meta_tags []
render :html => render_final_page("home",page,true).html_safe
end
def show
display_type = ""
path = request.path.split('/')
params[:is_frontend_view] = "true"
if path.size <= 2
redirect_to root_path
else
@ -104,7 +100,6 @@ class PagesController < ApplicationController
end
@manifest = @key
OrbitHelper.set_params params,current_user
OrbitHelper.set_request_object request
OrbitHelper.set_site_locale locale
OrbitHelper.set_this_module_app module_app.singularize
OrbitHelper.set_page_categories categories || ["all"]
@ -124,11 +119,7 @@ class PagesController < ApplicationController
end
render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe
else
if Site.first.enable_redirect_index
redirect_to root_url
else
render :file => "#{Rails.root}/public/411.html", :layout => false, :status => :not_found
end
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
end
else
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
@ -136,17 +127,6 @@ class PagesController < ApplicationController
end
end
def update_child_pages_url(page)
page.child_page.each do |cp|
if !cp.child_page.blank?
update_child_pages_url(cp)
else
cp.url = page.url + "/#{cp.page_id}"
cp.save
end
end
end
def update_item_position
@page = Page.find(params[:id])
new_parent_page = Page.find(params[:parent_id])
@ -155,9 +135,6 @@ class PagesController < ApplicationController
if new_parent_page.id != old_parent_page_id
url = (new_parent_page.url == "/" ? "" : new_parent_page.url)
@page.url = url + "/#{@page.page_id}"
if !@page.child_page.blank?
update_child_pages_url(@page)
end
end
@page.save
params["children_ids"].each_with_index do |child,i|
@ -196,60 +173,6 @@ class PagesController < ApplicationController
end
end
def get_member_attributes
@page_id = params[:page_id]
@selected_attribs = Page.find(@page_id).custom_array_field
@selected_attribs = [
{"key"=>"name", "type"=>"profile","sort_order"=>2,"link_to_show"=>true, "human_readable" => I18n.t("users.name")},
{"key"=>"email", "type"=>"profile", "human_readable" => I18n.t("users.email")},
{"key"=>"office_tel", "type"=>"profile", "human_readable" => I18n.t("users.office_tel")}
] if @selected_attribs.blank?
personal_attribs = [
{"key" => "first_name", "human_readable" => I18n.t("users.first_name")},
{"key" => "last_name", "human_readable" => I18n.t("users.last_name")},
{"key" => "name", "human_readable" => I18n.t("users.name")},
{"key" => "sex", "human_readable" => I18n.t("users.sex")},
{"key" => "office_tel", "human_readable" => I18n.t("users.office_tel")},
{"key" => "birthday", "human_readable" => I18n.t("users.birthday")},
{"key" => "address", "human_readable" => I18n.t("users.address")},
{"key" => "personal_website", "human_readable" => I18n.t("users.personal_website")},
{"key" => "autobiography", "human_readable" => I18n.t("users.autobiography")},
{"key" => "email", "human_readable" => I18n.t("users.email")}
]
custom_attribs = MemberProfileField.all.asc(:created_at).collect do |mpf|
{"key" => mpf.key, "human_readable" => mpf.title}
end
role_attribs = AttributeField.all.asc(:created_at).collect do |af|
{"key" => af.key, "human_readable" => af.title}
end
@attribs = {
"profile" => personal_attribs,
"custom" => custom_attribs,
"role" => role_attribs,
"types" =>[
{"key" => "profile", "human_readable" => "Profile"},
{"key" => "custom", "human_readable" => "Custom"},
{"key" => "role", "human_readable" => "Role"}
]
}
render :partial => "member_frontend_field"
end
def save_member_frontend_fields
fields = params["fields"]
array = []
fields.each do |field|
array << field.last
end
page = Page.find(params[:page_id])
page.custom_array_field = array
page.save
render :json => {"success" => true}.to_json
end
def get_categories
module_app = ModuleApp.find_by_key(params[:module]);
if module_app.key.eql?("member")
@ -384,7 +307,7 @@ class PagesController < ApplicationController
def render_final_page(original_view=get_view,page,layout)
final_html_for_render = ""
OrbitHelper.set_css_to_render_to_empty
if layout
parts = $mobile.blank? ? (page.page_parts rescue []) : (page.mobile_page_parts rescue [])
@ -399,7 +322,6 @@ class PagesController < ApplicationController
OrbitHelper.set_widget_data_count subpart.data_count
OrbitHelper.set_widget_module_app subpart.module
OrbitHelper.set_widget_item_url subpart
OrbitHelper.render_meta_tags []
OrbitHelper.set_widget_title subpart.title
OrbitHelper.set_widget_categories subpart.categories || ["all"]
OrbitHelper.set_widget_tags subpart.tags || []
@ -410,10 +332,9 @@ 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
# 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
widget_html = 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"
@ -436,7 +357,7 @@ class PagesController < ApplicationController
end
@layout_html = render_to_string(@file)
doc = Nokogiri::HTML(@layout_html, nil, "UTF-8")
head = doc.css("head")
@part_partials.each do |key, partial|
html_string = ""
partial.each do |p|
@ -467,9 +388,7 @@ class PagesController < ApplicationController
if original_view != "home"
viewarea = doc.css("*[data-content='true']")[0]
viewarea.inner_html = render_to_string(original_view) rescue "<div></div>"
head[0].inner_html = OrbitHelper.meta_tags_html + head.inner_html
end
head[0].inner_html = head.inner_html + OrbitHelper.get_css_to_render_in_head
link = doc.css("link")[0]
link.attributes["href"].value = current_site.favicon.url.nil? ? "/assets/favicon.ico" : current_site.favicon.url
final_html_for_render = doc.to_html
@ -591,7 +510,7 @@ class PagesController < ApplicationController
def change_to_language(final_html)
if session[:zh_cn]
final_html = ZhConv.convert("zh-cn", final_html,false)
final_html = ZhConv.convert("zh-cn", final_html)
final_html.gsub!('/zh_tw/','/zh_cn/')
final_html.sub!('<a href="'+request.path+'">繁体中文</a>','<a href="'+(request.path.sub('/zh_cn/','/zh_tw/'))+'">繁体中文</a>')
end

View File

@ -50,24 +50,6 @@ class StoreApiController < ApplicationController
render :layout => "back_end"
end
# this is for feed module.
def get_channel_lists
apps = ModuleApp.where(:feeds_url.ne => nil)
channels = []
if apps.count > 0
apps.each do |app|
channel = {}
channel["title"] = app.title
channel["key"] = app.key
channel["url"] = app.feeds_url
channel["app_icon"] = app.get_registration.get_side_bar.get_icon_class
channels << channel
end
end
render :json => {"channels" => channels}.to_json
end
private
def bundle_install
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update && bundle` }

View File

@ -1,5 +1,6 @@
module Admin::AttributeValuesViewHelper
OPT = [
["YYYY / MM / DD hh : mm","format1"],
["YYYY / MM / DD","format2"],
["YYYY / MM","format3"],
["YYYY","format4"]

View File

@ -1,35 +0,0 @@
module Admin::GroupsHelper
def remote_file_exists?(url)
url = URI.parse(url)
Net::HTTP.start(url.host, url.port) do |http|
return http.head(url.request_uri)['Content-Type'].start_with? 'image'
end
end
def parse_for_images(content)
urls = URI.extract(content)
images = []
urls.each do |url|
images << url if !url.nil? && remote_file_exists?(url)
end if !urls.empty?
image_content = "<br />"
images.each do |img|
content = content.sub(img,"")
image_content = image_content + "<img src='#{img}' style='width:auto;' /><br />"
end if !images.empty?
return [content, image_content]
end
def is_user_group_admin?
return (@access_right_level == "admin" ? true : false)
end
def user_can_write?
return (@access_right_level == "admin" || @access_right_level == "write" ? true : false)
end
def user_can_read?
return (@access_right_level == "admin" || @access_right_level == "write" || @access_right_level == "read" ? true : false)
end
end

View File

@ -1,68 +0,0 @@
module Admin::ModuleStoreHelper
def get_built_in_extensions
built_in_extensions = []
extensions_to_update = get_extensions_to_update
@extensions_to_update_count = extensions_to_update.count
built_in_extensions = get_extension_from_file("built_in",extensions_to_update)
built_in_extensions.concat(get_extension_from_file("downloaded",extensions_to_update))
return built_in_extensions
end
def get_extension_from_file(type,extensions_to_update)
temp = []
extensions = File.new("#{Rails.root}/#{type}_extensions.rb", "r")
while (extension = extensions.gets)
is_extension = extension.start_with?("gem")
extension = extension.split(',')
if is_extension
key = extension[0].split(/[\'\"]/)[1]
ma = ModuleApp.find_by_key(key) rescue nil
if !ma.nil?
update_available = extensions_to_update.include?(key) ? true : false
temp << {'key' => key, 'name' => ma.title, 'repo' => extension[1].split(/[\'\"]/)[1], 'tag' => (extension[2].split(/[\'\"]/)[1] rescue ""), "update_available" => update_available, "type" => type}
end
end
end
return temp
end
def get_extensions_to_update
# if !File.exists?("#{Rails.root}/built_in_extensions.rb.lock") || !File.exists?("#{Rails.root}/downloaded_extensions.rb.lock")
# update_extension_file("built_in")
# update_extension_file("downloaded")
# return []
# else
# update_extensions = get_update_info_for_extensions("built_in")
# update_extensions.concat(get_update_info_for_extensions("downloaded"))
# return update_extensions
# end
update_extensions = get_update_info_for_extensions("built_in")
return update_extensions
end
def update_extension_file(type)
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=#{type}_extensions.rb bundle update && bundle` }
end
def get_update_info_for_extensions(type)
buffer = Bundler.with_clean_env { `cd #{Rails.root} && bundle outdated` }
buffer = buffer.split("\n")
if buffer.last == "Bundle up to date!"
return []
elsif buffer.first.start_with?("The git source")
update_extension_file(type)
return []
else
output = []
buffer.each do |b|
if b.start_with?(" * ")
temp = b.split(" ")
output << temp[1] if !temp[1].nil?
end
end
return output
end
end
end

View File

@ -20,16 +20,12 @@ module ApplicationHelper
header_file = File.join('../templates', "#{@key}", "/home/header.html.erb")
header_file_html = render :file => header_file
header = Nokogiri::HTML(header_file_html, nil, "UTF-8")
site_logo = header.css("img[src='{{logo_url}}']")[0]
site_logo.remove if site.site_logo.url.nil?
sub_menu_html = site.sub_menu
html = header.to_s
t = site.title rescue ""
html = html.gsub("{{site_name}}",(site.display_title_in_frontend ? t : ""))
html = html.gsub("%7B%7Blogo_url%7D%7D",(site.site_logo.url.nil? ? "/assets/default-site-logo.png" : site.site_logo.url))
html = html.gsub("{{site_name}}",(site.title rescue ""))
html = html.gsub("%7B%7Blogo_url%7D%7D",(site.site_logo.url.nil? ? "/assets/site-logo.png" : site.site_logo.url))
if site.sitemap_menu_in_header
sitemap = Page.find_by_key(:sitemap).name rescue "Sitemap"
sub_menu_html = sub_menu_html + "<a href='/#{I18n.locale.to_s}#{site.site_map_link}'>#{sitemap}</a>"
sub_menu_html = sub_menu_html + "<a href='/#{I18n.locale.to_s}#{site.site_map_link}'>Sitemap</a>"
end
sub_menu_html = sub_menu_html.nil? ? "" : sub_menu_html
html = html.gsub("{{header-data}}",sub_menu_html)
@ -69,7 +65,6 @@ module ApplicationHelper
site_footer = site_footer.nil? ? "" : site_footer
html = html.gsub("{{footer-data}}",site_footer)
counter = Page.root.view_count.to_s rescue ""
counter = t(:visitors_count) + " : " + counter
html = html.gsub("{{site-counter}}",counter)
html.html_safe
end
@ -81,7 +76,7 @@ module ApplicationHelper
end
def render_menu
# menu_html = Rails.cache.fetch(['main_menu',request.original_fullpath, I18n.locale], race_condition_ttl: 2.seconds) do
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?
@ -170,9 +165,9 @@ module ApplicationHelper
end
h = create_menu(@items,0)
h.html_safe
# end
end
# menu_html
menu_html
end
def render_view
@ -234,11 +229,7 @@ module ApplicationHelper
doc = Nokogiri::HTML(file, nil, "UTF-8")
file.close
controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new
begin
data = controller.send("#{params[:target_action]}")# rescue nil
rescue Exception => e
write_debug_file(e,params[:target_controller],params[:target_action]) if Site::DEBUG
end
data = controller.send("#{params[:target_action]}") rescue nil
if !data.nil?
wrap_elements = doc.css("*[data-list][data-level='0']")
htmls = parsing_repeats_again(wrap_elements,data,1)
@ -270,11 +261,7 @@ module ApplicationHelper
doc = Nokogiri::HTML(file, nil, "UTF-8")
file.close
controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new
begin
data = controller.send("#{params[:target_action]}")# rescue nil
rescue Exception => e
write_debug_file(e,params[:target_controller],params[:target_action]) if Site::DEBUG
end
data = controller.send("#{params[:target_action]}") rescue nil
if data.nil?
return "<div class='well'> No content to show. </div>".html_safe
end
@ -356,12 +343,12 @@ module ApplicationHelper
((controller.controller_name.eql?(controller_name) || request.fullpath.eql?(controller_name)) && controller.action_name.eql?(action_name)) ? 'active' : nil
end
def link_back(custom_class=nil, params="")
def link_back(custom_class=nil)
case custom_class
when nil
link_to t('back'), get_go_back + params, :class => 'nav'
link_to t('back'), get_go_back, :class => 'nav'
else
link_to t('back'), get_go_back + params, :class => custom_class
link_to t('back'), get_go_back, :class => custom_class
end
end
@ -509,48 +496,4 @@ module ApplicationHelper
target
end
def write_debug_file(e,controller_name,action_name)
url_dir_name = request.fullpath.split("?")[0]
url_dir_name = URI.decode(url_dir_name)
url_dir_name = (url_dir_name == "/" ? "home" : url_dir_name.sub("/","").gsub("/","_").gsub("-","_").gsub(" ","_"))
directory_name = "tmp/debug/#{url_dir_name}"
FileUtils.mkdir_p(directory_name) unless File.exists?(directory_name)
fn = "#{directory_name}/#{controller_name}_#{action_name}.html"
error_trace_spans = ""
e.backtrace.each do |bt|
error_trace_spans = error_trace_spans + "<span>#{bt}</span><br />"
end
con = "#{controller_name.capitalize}_controller".classify.constantize
File.open(fn, "w"){ |file|
file.puts "<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
<meta charset=UTF-8'>
<title>Debug result</title>
</head>
<body>
<h3>Error Message</h3>
<div class='error-message'>
<h2><i>#{e.message}</i></h2>
</div>
<h3>Request Details</h3>
<div class='request-details'>
<span>Url : <b>#{URI.decode(request.url)}</b></span><br />
<span>Controller : <b>#{con.to_s}</b> </span><br />
<span>Action : <b>#{action_name.capitalize}</b> </span>
</div>
<h3>Error Trace</h3>
<div class='error-trace'>
#{error_trace_spans}
</div>
<h3>Params</h3>
<div class='params'>
#{OrbitHelper.params}
</div>
</body>
</html>"
}
end
end

View File

@ -20,7 +20,7 @@ module AttributeFieldsHelper
@new_attribute = @attribute_value.nil?
@attribute_value = @attribute_value || (attribute_type.eql?("role") ? @member.attribute_values.build(attribute_field_id: id) : @member.member_profile_field_values.build(member_profile_field: id))
@prefiled_value = @attribute_value.value rescue nil
return instance_eval("render_#{markup}") #rescue ""
return instance_eval("render_#{markup}") rescue ""
end
end
@ -101,17 +101,14 @@ module AttributeFieldsHelper
# @prefiled_value = @attribute_value.get_date
case self.typeC['format']
# when 'format1'
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d %H:%M")), 'yyyy/MM/dd hh:mm', true)
when 'format1','format2'
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), 'yyyy/MM/dd')
tmp = very_simple_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), self.typeC['format'])
when 'format1'
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d %H:%M")), 'yyyy/MM/dd hh:mm', true)
when 'format2'
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), 'yyyy/MM/dd')
when 'format3'
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), 'yyyy/MM')
tmp = very_simple_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), self.typeC['format'])
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), 'yyyy/MM')
when 'format4'
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), 'yyyy')
tmp = very_simple_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), self.typeC['format'])
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), 'yyyy')
end
control_group_wrapper{tmp}
@ -120,28 +117,6 @@ module AttributeFieldsHelper
end
end
def very_simple_picker(object_name, value, format)
id = object_name.gsub("[","_").gsub("]","")
values = value.split("/") rescue []
html = "<div class='simple-date-picker'>"
if format == "format1" || format == "format2"
html = html + "<input type='text' class='span1' #{(!values.blank? ? "value='#{values[2]}'" : "")} placeholder='Date' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) || event.keyCode == 9' onkeyup='this.value=(this.value.length <= 2 ? (parseInt(this.value) > 0 && parseInt(this.value) < 32 ? this.value : this.value.substring(0,this.value.length-1)) : this.value.substring(0,this.value.length-1))' onblur='var el = document.getElementById(\"#{id}\");var k = el.value.split(\"/\");if(this.value){k[2]=this.value; el.value = k.join(\"/\")};'>"
end
if format == "format1" || format == "format2" || format == "format3"
html = html + "<select class='span2' onchange='var el = document.getElementById(\"#{id}\");var k = el.value.split(\"/\");if(this.value){k[1]=this.value; el.value = k.join(\"/\")};'>"
["January","February","March","April","May","June","July","August","September","October","November","December"].each_with_index do |mon,index|
mon_value = "#{(index < 9 ? "0" : "")}#{(index + 1).to_s}"
html = html + "<option value='#{(index < 9 ? "0" : "")}#{(index + 1).to_s}' #{values[1] == mon_value ? 'selected="selected"' : ""}>#{mon}</option>"
end
html = html + "</select>"
end
html = html + "<input type='text' class='span1' #{(!values.blank? ? "value='#{values[0]}'" : "")} placeholder='Year' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) event.keyCode == 9' onkeyup='this.value=(this.value.length == 4 ? (parseInt(this.value) > 1900 && parseInt(this.value) < 3000 ? this.value : this.value.substring(0,this.value.length-1)) : (this.value.length > 4 ? this.value.substring(0,this.value.length-1) : this.value))' onblur='var el = document.getElementById(\"#{id}\");var k = el.value.split(\"/\");if(this.value){k[0]=this.value; el.value = k.join(\"/\")};'>"
html = html + hidden_field_tag(object_name, (value || "1901/01/01"))
html = html + "</div>"
html.html_safe
end
def datetime_picker(object_name, value, format, time=false)
content_tag :div, :class => "input-append datetimepick", "data-date-format"=>format, "data-picktime"=>"#{time}" do
concat text_field_tag(object_name, value, :placeholder=>format)
@ -175,7 +150,7 @@ module AttributeFieldsHelper
def render_text_area
control_group_wrapper do |key,value|
value = can_muti_lang_input? ? @prefiled_value[key] : @prefiled_value rescue nil
value = can_muti_lang_input? ? @prefiled_value[key] : @prefiled_value
key = can_muti_lang_input? ? "[#{key}]" : ""
place_holder= @panel_setting["placeholder"][I18n.locale.to_s] rescue ''
text_area_tag(get_field_name_base + key, value,@markup_options.merge(:placeholder=>place_holder))

View File

@ -22,7 +22,7 @@ module AttributeValuesHelper
end
def show_minguo_calendar(from_to=nil)
# get_minguo
get_minguo
case from_to
when :to
@ -96,14 +96,12 @@ module AttributeValuesHelper
def get_date_by_format(from_to = nil)
case I18n.locale
when :zh_tw
# case
# when self.member_profile_field["typeC"]["calendar"] == "west_calendar"
# show_west_calender(from_to)
# when self.member_profile_field["typeC"]["calendar"] == "tw_calendar"
# show_minguo_calendar(from_to)
# end #case self.member_profile_field["typeC"]["calendar"]
show_west_calender(from_to)
case
when self.member_profile_field["typeC"]["calendar"] == "west_calendar"
show_west_calender(from_to)
when self.member_profile_field["typeC"]["calendar"] == "tw_calendar"
show_minguo_calendar(from_to)
end #case self.member_profile_field["typeC"]["calendar"]
when :en
show_west_calender(from_to)
end

View File

@ -41,10 +41,6 @@ module OrbitBackendHelper
concat hidden_field(object_name, method, :value => options[:value])
concat separated_picker(object_name, method, options)
end
when 'simple'
content_tag :div, :id => options[:id], :class => options[:class] do
simple_picker(object_name, method, options)
end
else
content_tag :div, :id => options[:id], :class => options[:class] do
default_picker(object_name, method, options)

View File

@ -32,19 +32,6 @@ module OrbitFormHelper
end
end
def simple_picker(object_name, method, options)
html = "<div class='simple-date-picker'>
<input type='text' class='span1' #{(options[:value] ? "value='#{options[:value].day}'" : "")} placeholder='Date' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) || event.keyCode == 9' onkeyup='this.value=(this.value.length <= 2 ? (parseInt(this.value) > 0 && parseInt(this.value) < 32 ? this.value : this.value.substring(0,this.value.length-1)) : this.value.substring(0,this.value.length-1))' onblur='var el = document.getElementById(\"#{object_name.to_s}_#{method.to_s}\");var k = el.value.split(\"-\");if(this.value){k[2]=this.value; el.value = k.join(\"-\")};'>
<select class='span2' onchange='var el = document.getElementById(\"#{object_name.to_s}_#{method.to_s}\");var k = el.value.split(\"-\");if(this.value){k[1]=this.value; el.value = k.join(\"-\")};'>"
["January","February","March","April","May","June","July","August","September","October","November","December"].each_with_index do |mon,index|
html = html + "<option value='#{(index < 9 ? "0" : "")}#{(index + 1).to_s}' #{(options[:value] && options[:value].month == (index + 1) ? "selected='selected'" : "")}>#{mon}</option>"
end
html = html + "</select><input type='text' class='span1' #{(options[:value] ? "value='#{options[:value].year}'" : "")} placeholder='Year' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) event.keyCode == 9' onkeyup='this.value=(this.value.length == 4 ? (parseInt(this.value) > 1900 && parseInt(this.value) < 3000 ? this.value : this.value.substring(0,this.value.length-1)) : (this.value.length > 4 ? this.value.substring(0,this.value.length-1) : this.value))' onblur='var el = document.getElementById(\"#{object_name.to_s}_#{method.to_s}\");var k = el.value.split(\"-\");if(this.value){k[0]=this.value; el.value = k.join(\"-\")};'>"
html = html + hidden_field(object_name, method, :value => options[:value] || "1901-01-01")
html = html + "</div>"
html.html_safe
end
def date_picker(object_name, method, options)
custom = {}
custom[:format] = options[:format] || 'yyyy/MM'

View File

@ -267,14 +267,6 @@ module OrbitHelper
"#{request.host_with_port}/#{locale}#{url}"
end
def self.set_request_object(request)
@site_request_object = request
end
def self.request
@site_request_object
end
def self.set_site_locale(locale)
@site_locale = locale
end
@ -347,113 +339,6 @@ module OrbitHelper
!$mobile.blank?
end
def self.set_css_to_render_to_empty
@css_to_render_in_head = []
end
def self.render_css_in_head(css=[])
@css_to_render_in_head.concat(css)
end
def self.get_css_to_render_in_head
css_html = ""
@css_to_render_in_head.each do |css|
css_html = css_html + "<link rel='stylesheet' media='screen' href='/assets/#{css}'>\n"
end
return css_html
end
def self.render_meta_tags(metas=[])
@page_meta_tags = metas
end
def self.meta_tags_html
html = ""
if !@page_meta_tags.nil?
@page_meta_tags.each do |meta|
html = html + "<meta "
meta.keys.each do |attrib|
html = html + "#{attrib}='#{self.strip_html_tags(meta[attrib])}' "
end
html = html + ">"
end
end
html
end
def self.strip_html_tags(string)
ActionView::Base.full_sanitizer.sanitize(string)
end
# get feeds for the module
def self.get_feed_for_module(type)
if ModuleApp.where(:key => "feed").count == 0
return []
end
categories = []
ma = nil
if type == "index"
categories = @categories if !@categories.nil?
ma = @module_app
elsif type == "widget"
categories = @widget_categories if !@widget_categories.nil?
ma = @widget_module_app
end
if categories.first == "all"
feeds = SiteFeed.where(:channel_key => ma.key).enabled
else
feeds = SiteFeed.where(:channel_key => ma.key, :merge_with_category.in => categories).enabled
end
data = []
if feeds.count > 0
temp_ids = []
feeds.each do |feed|
file = File.join(Rails.root,"public","site_feeds",feed.id.to_s,feed.feed_uid.to_s + ".json")
if File.exists?(file)
d = File.read(file)
d = JSON.parse(d)
cat = Category.find(feed.merge_with_category).title
final_d = []
d[ma.key.pluralize].each{|a|
a["category"] = cat
if !temp_ids.include?(a["id"])
temp_ids << a["id"]
a["params"] = a["params"] + "_" + feed.id.to_s + "h"
final_d << a
end
}
data.concat(final_d)
end
end
end
data
end
def self.is_object_from_feed?(uid)
return uid.ends_with?("h")
end
def self.get_from_feed(uidwithid)
temp = uidwithid.split("_")
feed_id = temp[1][0...-1]
uid = temp[0]
object = nil
feed = SiteFeed.find(feed_id) rescue nil
if !feed.nil?
file = File.join(Rails.root,"public","site_feeds",feed.id.to_s,feed.feed_uid.to_s + ".json")
if File.exists?(file)
d = File.read(file)
d = JSON.parse(d)
objects = d[@module_app.key.pluralize]
object = objects.select{|obj| obj["id"] == uid}.first
cat = Category.find(feed.merge_with_category)
object = {} if cat.disable
end
end
object
end
# ===============================================================
# Breadcrumbs
# ===============================================================

View File

@ -71,11 +71,7 @@ module PagesHelper
wrap_elements = doc.css("*[data-repeat]")
controller = "#{controller_name.capitalize.pluralize}_controller".classify.constantize.new
OrbitHelper.set_current_widget_module controller_name
begin
data = controller.send("#{widget_method}") #rescue nil
rescue Exception => e
write_widget_debug_file(e,controller_name,widget_method,subpart_id)
end
data = controller.send("#{widget_method}") rescue nil
if !data.nil?
wrap_elements = doc.css("*[data-list][data-level='0']")
htmls = widget_parsing_repeats_again(wrap_elements,data,1)
@ -95,50 +91,5 @@ module PagesHelper
end
end
def write_widget_debug_file(e,controller_name,action_name,sub_part)
url_dir_name = request.fullpath.split("?")[0]
url_dir_name = URI.decode(url_dir_name)
url_dir_name = (url_dir_name == "/" ? "home" : url_dir_name.sub("/","").gsub("/","_").gsub("-","_").gsub(" ","_"))
directory_name = "tmp/debug/#{url_dir_name}"
FileUtils.mkdir_p(directory_name) unless File.exists?(directory_name)
fn = "#{directory_name}/#{controller_name}_#{action_name}_#{(sub_part if !sub_part.nil?)}.html"
error_trace_spans = ""
e.backtrace.each do |bt|
error_trace_spans = error_trace_spans + "<span>#{bt}</span><br />"
end
con = "#{controller_name.capitalize.pluralize}_controller".classify.constantize
File.open(fn, "w"){ |file|
file.puts "<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
<meta charset=UTF-8'>
<title>Debug result</title>
</head>
<body>
<h3>Error Message</h3>
<div class='error-message'>
<h2><i>#{e.message}</i></h2>
</div>
<h3>Request Details</h3>
<div class='request-details'>
<span>Url : <b>#{URI.decode(request.url)}</b></span><br />
<span>Controller : <b>#{con.to_s}</b></span><br />
<span>Action : <b>#{action_name.capitalize}</b></span><br />
<span>SubPart Id : <b>#{sub_part}</b></span>
</div>
<h3>Error Trace</h3>
<div class='error-trace'>
#{error_trace_spans}
</div>
<h3>Params</h3>
<div class='params'>
#{OrbitHelper.params}
</div>
</body>
</html>"
}
end
end

View File

@ -46,7 +46,7 @@ class AttributeValue
def get_field_value
if (self.attribute_field.markup.eql?("text_field") || self.attribute_field.markup.eql?("text_area"))
field_value = self.value[I18n.locale].gsub("\r\n","<br>")
field_value = self.value[I18n.locale]
elsif (self.attribute_field.markup.eql?("select") || self.attribute_field.markup.eql?("radio_button"))
field_value = self.attribute_field.markup_value["#{self.value}"][I18n.locale] rescue nil
elsif self.attribute_field.markup.eql?("address")
@ -80,7 +80,7 @@ class AttributeValue
{
"key" => self.attribute_field.key,
"title" => self.attribute_field.title,
"value" => "&nbsp;",
"value" => "",
"val" => field_value = self.value
}
end

View File

@ -1,28 +1,16 @@
class Group
include Mongoid::Document
include Mongoid::Timestamps
include Slug
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"
field :permission, default: "write"
field :archive, type: Boolean, default: false
mount_uploader :image, ImageUploader
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, :dependent => :destroy
belongs_to :group_category
has_and_belongs_to_many :users
scope :closed, ->{ where(privacy: "closed") }
scope :open, ->{ where(privacy: "open") }
scope :archived, ->{ where(archive: true) }
scope :not_archived, ->{ where(archive: false) }
def privacy_name
return self.privacy == "closed" ? "private" : "public"
end
end

View File

@ -3,10 +3,6 @@ class GroupCategory
include Mongoid::Timestamps
field :title, localize: true
field :is_accepted, type: Boolean, :default => true
has_many :groups
scope :is_requested, ->{ where(is_accepted: false) }
scope :by_admin, ->{ where(is_accepted: true) }
end

View File

@ -1,16 +0,0 @@
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
belongs_to :group
has_many :group_post_images, :autosave => true, :dependent => :destroy
has_many :group_post_files, :autosave => true, :dependent => :destroy
has_many :group_post_comments, :autosave => true, :dependent => :destroy
end

View File

@ -1,9 +0,0 @@
class GroupPostComment
include Mongoid::Document
include Mongoid::Timestamps
field :comment
belongs_to :user
belongs_to :group_post
end

View File

@ -1,9 +0,0 @@
class GroupPostFile
include Mongoid::Document
include Mongoid::Timestamps
mount_uploader :file, AssetUploader
belongs_to :group_post
end

View File

@ -1,9 +0,0 @@
class GroupPostImage
include Mongoid::Document
include Mongoid::Timestamps
mount_uploader :image, ImageUploader
belongs_to :group_post
end

View File

@ -13,7 +13,7 @@ class MemberProfile
field :sex
field :sid
field :office_tel
field :birthday, type: Date
field :birthday, type: DateTime
field :address, type: String, localize: true
field :personal_website
field :autobiography, type: String, localize: true
@ -47,7 +47,7 @@ class MemberProfile
def name
if self.first_name != "" || self.last_name != ""
if self.first_name || self.last_name
I18n.locale.eql?(:zh_tw) ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}"
end
end
@ -135,7 +135,7 @@ class MemberProfile
data = self.send(field["key"]) rescue ""
data = (data =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href='#{data}' target='blank'>#{data}</a>" : data
data = (data =~ /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) ? "<a href='mailto:#{data}'>#{data}</a>" : data
field_data = data.blank? ? {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" => "&nbsp;"} : {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" =>data}
field_data = data.blank? ? {} : {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" =>data}
field_data
end

View File

@ -22,7 +22,7 @@ class MemberProfileFieldValue
index.nil? ? self["val"] : self["val"][index]
# self.member_profile_field.get_data[:cross_lang] ? Hash[VALID_LOCALES.collect{|lang| [lang,self[lang.to_sym]]}] : self["val"] #if !self.member_profile_field.get_data[:cross_lang]
else
self.member_profile_field.get_data["cross_lang"] =="true" ? self["val"].gsub("\r\n","<br>") : Hash[site.valid_locales.collect{|lang| [lang,self[lang.to_sym].gsub("\r\n","<br>")]}]
self.member_profile_field.get_data["cross_lang"] =="true" ? self["val"] : Hash[site.valid_locales.collect{|lang| [lang,self[lang.to_sym]]}]
end
when 'select','radio_button','address'
self["val"]
@ -151,7 +151,7 @@ class MemberProfileFieldValue
{
"key" => self.member_profile_field.key,
"title" => self.member_profile_field.title,
"value" => (field_value.blank? ? "&nbsp;" : field_value),
"value" => (field_value.blank? ? "" : field_value),
"val" => field_value = self.value
}
end

View File

@ -16,7 +16,6 @@ class ModuleApp
field :widget_settings
field :store_permission_granted, type: Boolean, default: false
field :cache_models, type: Array, default: []
field :feeds_url
has_many :categories, dependent: :destroy, :autosave => true
has_and_belongs_to_many :tags, dependent: :destroy, :autosave => true
@ -37,7 +36,6 @@ class ModuleApp
self[:widget_settings] = reg.get_widget_settings
self[:desktop_enabled] = reg.is_desktop_enabled
self[:cache_models] = reg.get_models_to_cache
self[:feeds_url] = reg.get_feeds_url
end
def sub_managers

View File

@ -22,8 +22,6 @@ class Page
field :member_sort_position, type: Boolean, :default => false
field :enabled_for_sitemap, type: Array, :default => []
field :rss2_id, type: String
field :custom_string_field, type: String
field :custom_array_field, type: Array, :default => []
has_many :page_parts, :autosave => true, :dependent => :destroy
has_many :mobile_page_parts, :autosave => true, :dependent => :destroy
@ -34,8 +32,8 @@ class Page
before_create :assign_page_number
# after_save :clear_cache
# after_destroy :clear_cache
after_save :clear_cache
after_destroy :clear_cache
def clear_cache
I18n.available_locales.each do |locale|

View File

@ -10,7 +10,7 @@ class Role
has_and_belongs_to_many :member_profiles
has_many :authorizations
has_many :attribute_fields, dependent: :destroy
has_many :attribute_fields
accepts_nested_attributes_for :attribute_fields
has_many :role_statuses, dependent: :destroy

View File

@ -3,8 +3,6 @@ class Site
include Mongoid::Timestamps
include Slug
DEBUG = false
field :title, as: :slug_title, type: String, localize: true
field :school, type: String
field :department, type: String
@ -23,16 +21,13 @@ class Site
field :mobile_api_openness_on, :type => Boolean, :default => false
field :desktop_closed, :type => Boolean, :default => false
field :enable_language_detection, :type => Boolean, :default => false
field :enable_redirect_index, :type => Boolean, :default => false
field :enable_zh_cn, :type => Boolean, :default => true
field :enable_language_options, :type => Boolean, :default => true
field :default_locale, :default => "zh_tw"
field :mobile_on, :type => Boolean, :default => false
field :announcement_category, :type => Array, :default=>[]
field :mobile_bar_color, :type => Array, :default=>[]
field :phone_number, :type => Array,:default=>[]
field :title_always_on, :type => Boolean, :default => false
field :display_title_in_frontend, :type => Boolean, :default => true
field :sitemap_menu_in_header, :type => Boolean, :default => false
field :enable_terms_of_use, :type => Boolean, :default => false
field :search,:type => Hash

View File

@ -10,15 +10,15 @@ class SubPart
field :content, localize: true
field :data_count, type: Integer, default: 10
field :categories, type: Array, :default => []
field :tags, type: Array, :default => []
field :tags, type: Array, :default => []
field :custom_string_field, type: String
field :custom_array_field, type: Array, :default => []
belongs_to :page_part
belongs_to :mobile_page_part
# after_save :clear_cache
# after_destroy :clear_cache
after_save :clear_cache
after_destroy :clear_cache
def clear_cache
Rails.cache.delete_matched( /#{self.id.to_s}/ )

View File

@ -21,7 +21,6 @@ class User
has_many :authorizations
belongs_to :member_profile
has_and_belongs_to_many :groups
has_many :group_post_comments
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: 14 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,189 +1,108 @@
(function($) {
'use strict';
"use strict"
function init() {
var doc = document,
lang = doc.documentElement.lang,
pageModule = doc.body.getAttribute('data-module');
function init() {
var doc = document;
var orbit = {
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;
}
},
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');
}
}
}
},
// 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: {
// 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) + '...';
}
}
}
}
},
member: {
equalHeight: function() {
var bigbrother = -1;
$('.i-member-item').each(function() {
bigbrother = bigbrother > $('.i-member-item').height() ? bigbrother : $('.i-member-item').height();
});
$('.i-member-item').each(function() {
$('.i-member-item').height(bigbrother);
});
},
// Remove table row, list item if it only has sigle title or value not in pair
removeEmptyRow: function() {
// Remove index page empty item
$('.i-member-profile-item .i-member-value').each(function() {
if ($(this).text().trim() === '' || $(this).text().trim() === ':') {
$(this).parent().addClass('hide');
}
});
// Remove empty table cell on show page
$('.show-member th, .show-member td').each(function() {
if ($(this).text().trim() === '') {
$(this).parent('tr').addClass('hide');
}
});
},
},
// 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');
}
}
},
// Go back top button
goBackTop: function(txt, speed) {
var top = document.createElement('div');
top.className = 'go-back-top';
top.textContent = txt;
doc.body.appendChild(top);
$(window).scroll(function() {
if($(this).scrollTop() != 0) {
$('.go-back-top').fadeIn();
} else {
$('.go-back-top').fadeOut();
}
});
$('.go-back-top').click(function() {
$('body, html').animate({scrollTop:0}, speed);
return false;
});
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');
}
}
},
// 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;
}
}).addClass('cursor');
}
});
},
// 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);
}
};
// Specific functions that will be running on homepage
if (pageModule === 'home') {
}
if (pageModule === 'member') {
orbit.member.removeEmptyRow();
}
}
},
// 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');
// Functions that will be running on every page
orbit.sitemenuDropdown();
orbit.goBackTop('top', 800);
orbit.plugins.bullEye();
el[i].parentNode.insertBefore(caret, el[i]);
orbit.addClass(el[i], 'dropdown-menu');
}
}
}
}
// Run the init function when DOM is ready
$(document).ready(function() {
init();
});
var plugin = {
// RWD image resize script
bullEye: function() {
$(".bullseye").bullseye({
fadeEffect: false
});
}
}
}(jQuery));
// Specific functions that will be running on homepage
if (doc.body.getAttribute('data-module') === 'home') {
}
// Functions that will be running on every page
orbit.sitemenuDropdown();
plugin.bullEye();
}
$(document).ready(function($) {
init();
});
}(jQuery));

View File

@ -1,947 +0,0 @@
//
// 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;
}
}

View File

@ -1,833 +0,0 @@
// 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;

View File

@ -1,7 +0,0 @@
@charset "utf-8";
a[accesskey] {
position: absolute;
margin-left: -15px;
color: transparent !important;
}

View File

@ -1,81 +1,24 @@
@charset "utf-8";
@import "../initial";
@import "variables";
html {
font-size: 100%;
font-size: 100%;
}
body {
font-family: $sub-font;
font-size: inherit;
margin-top: 40px;
font-family: $sub-font;
font-size: inherit;
margin-top: 40px; // needed for Orbit bar
}
a:link,
a:visited {
color: $brand-primary;
}
a:hover,
a:focus {
color: lighten($brand-primary, 10%);
text-decoration: none;
text-decoration: none;
}
img {
max-width: 100%;
height: auto;
max-width: 100%;
height: auto;
}
.admin-edit {
clear: both;
clear: both;
}
// override bootsrap settings
th,
td {
padding: 8px .5rem;
padding: 8px .5rem;
}
.borderless > tbody > tr > td,
.borderless > tbody > tr > th,
.borderless > tfoot > tr > td,
.borderless > tfoot > tr > th,
.borderless > thead > tr > td,
.borderless > thead > tr > th {
border: none !important;
}
a.btn-primary {
color: $theme-white;
border-color: $theme-color-main;
background-color: $theme-color-main;
font-size: 0.8125rem;
&:hover {
background-color: darken($theme-color-main, 10%);
border-color: darken($theme-color-main, 10%);
}
}
// Page heading
.page-module-title {
@extend .unity-title;
margin-bottom: 18px;
}
.view-count {
font-size: 0.75rem;
}
.view_count {
> i {
font-size: 0.75rem;
&:before {
margin-right: 8px;
}
}
}

View File

@ -1,21 +0,0 @@
@charset "utf-8";
@import "variables";
.go-back-top {
background: rgba($theme-color-main, .9);
text-align: center;
padding: 10px 12px;
position: fixed;
bottom: 15px;
right: 15px;
cursor: pointer;
display: none;
color: $theme-white;
font-size: 12px;
border-radius: 2px;
z-index: 1050;
&:hover {
background: rgba($theme-color-main, 1);
}
}

View File

@ -1,5 +1,4 @@
// Set Triangle
@import "variables";
@mixin arrow($direction, $width, $height, $color) {
width: 0px;
height: 0px;

View File

@ -1,5 +1,3 @@
@charset "utf-8";
@import "variables";
$theme-white: #fff;
$orbit-bg-color: #333;
$orbit-bg-hover-color: #0095CF;
@ -35,7 +33,7 @@ body {
}
}
@media (max-width: 540px) {
@media (max-width: 479px) {
body {
#orbit-bar ul.orbit-bar-search-sign-language > li + li:hover > a,
#orbit-bar ul.orbit-bar-search-sign-language > li + li:hover > span {

View File

@ -1,20 +1,8 @@
@charset "utf-8";
@import "variables";
.pagination {
li {
a {
font-size: 0.8125rem;
margin: 0 0.2em;
color: $theme-color-main;
}
}
.active {
a {
background-color: $theme-color-main;
border-color: $theme-color-main;
}
}
}

View File

@ -1,11 +1,8 @@
@charset "utf-8";
@import "variables";
// Title
.unity-title {
margin: 0.5em 0;
line-height: 1.5;
font-family: $main-font;
font-size: 1.5rem;
.layout-footer & {
margin-bottom: 10px;
border-bottom: none;

View File

@ -1,8 +1,10 @@
@charset "utf-8";
// Google fonts
@import url(http://fonts.googleapis.com/css?family=Roboto);
// Base Color
$theme-gray: #495054;
$theme-gray-subtle: #ddd;
$theme-gray-light: #cecece;
$theme-gray-lighter: #f3f3f3;
$theme-gray-dark: #363636;
@ -15,13 +17,11 @@ $theme-color-main: #47bab5;
$theme-color-second: #5bc0de;
$theme-color-third: #ed4c43;
// Font stacks
$main-font: 'Roboto', "微軟正黑體", "Helvetica Neue", Helvetica, sans-serif;
$sub-font: 'Roboto', "新細明體", "Helvetica Neue", Helvetica, sans-serif;
// Font sizes
$font-15: 0.9375rem;
$font-13: 0.8125rem;
//
// Modules
@ -71,10 +71,3 @@ $table-th-bgcolor: $theme-color-main;
// Font sizes
$w-item-heading-font-size: 0.85rem;
//
// Member Module
// --------------------------------------------------
$border-width: 4px;

View File

@ -1,5 +0,0 @@
@import "bootstrap/mixins";
@import "bootstrap/variables";
@import "base/mixins";
@import "base/variables";
@import "base/unity";

View File

@ -1,6 +1,3 @@
@charset "utf-8";
@import "../initial";
.layout-content {
min-height: 600px;
margin-bottom: 2em;

View File

@ -1,6 +1,3 @@
@charset "utf-8";
@import "../initial";
.layout-footer {
padding: 2em 0;
color: #999999;

View File

@ -1,6 +1,3 @@
@charset "utf-8";
@import "../initial";
.layout-header {
position: relative;
margin-bottom: 0;
@ -12,7 +9,7 @@
@extend .response-content;
}
.header-nav {
padding: 16px 0;
padding-top: 0.5rem;
color: #FFF;
& > * {
display: inline-block;

View File

@ -1,13 +1,5 @@
@charset "utf-8";
@import "../initial";
.layout-slide {
position: relative;
margin-bottom: 2rem;
z-index: 0;
background: $theme-gray;
.w-ad-banner {
max-width: 1200px;
margin: auto;
}
}

View File

@ -1,121 +1,146 @@
@charset "utf-8";
@import "../initial";
@charset 'utf-8';
//
// Widget
//
//
// Widget
// ## gerenral styles
.w-ad-banner {
position: relative;
.cursor {
cursor: pointer;
}
}
.w-ad-banner__wrap {
width: 100%;
}
.w-ad-banner__slide {
width: 100%;
}
.banner-pager {
@include list-reset;
position: absolute;
right: 1em;
top: 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: .5;
}
.active-slide a {
opacity: 1;
}
}
.banner-responsive {
width: 100%;
}
// Widget 1
// Widget 1
.ad-banner-widget-1 {
.w-ad-banner__wrap {
width: 100%;
}
.w-ad-banner__slide {
width: 100%;
}
.w-ad-banner__image {
width: 100%;
height: auto;
}
.w-ad-banner__caption {
background: $theme-color-main;
color: $theme-white;
z-index: 200;
padding: 0.5em 1em;
padding: .5em 1em;
color: $theme-white;
background: $theme-color-main;
h2 {
font-family: $main-font;
font-size: $w-caption-font-size;
margin: 0.5em 0;
margin: .5em 0;
}
p {
font-family: $main-font;
font-size: $w-caption-desc;
}
}
.w-ad-banner__pager {
position: absolute;
z-index: 120;
top: 1em;
right: 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 2
// 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 {
.youtube,
.cycle-youtube {
width: 100%;
height: 100%;
}
object, embed {
object,
embed {
width: 100%;
height: 100%;
}
.banner-pager {
.w-ad-banner__pager {
position: absolute;
z-index: 102;
right: 1em;
bottom: 1em;
z-index: 102;
@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%;
}
.banner-pager {
top: auto;
.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;
}
}

View File

@ -1,678 +1,473 @@
@charset "utf-8";
@import "../initial";
@charset 'utf-8';
//
// 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: 0.75rem;
font-size: .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;
.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;
}
i {
color: $theme-gray;
}
}
.status-top {
background: $theme-color-second;
}
.status-hot {
background: $theme-color-third;
}
.w-annc__subtitle {
font-size: 0.8125em;
font-size: .8125em;
color: $theme-gray;
}
.w-annc__entry-title {
margin-bottom: 10px;
}
.w-annc__title {
font-family: $sub-font;
color: $theme-color-main;
font-size: .8125rem;
text-decoration: none;
font-size: 0.8125rem;
color: $theme-color-main;
&: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;
line-height: 1.3;
font-size: 1.2rem;
line-height: 1.3;
}
}
// Widget-2
.widget-announcement-2 {
.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;
line-height: 1.3;
}
}
// Widget-3
.widget-announcement-3 {
.w-annc__img-wrap {
height: 200px;
margin: 0 0 1em 0;
margin: 0 0 1em;
}
.w-annc__title {
font-family: $main-font;
line-height: 1.3;
font-size: 1.2rem;
line-height: 1.3;
}
}
// Widget-4
.widget-announcement-4 {
.w-annc__title {
font-family: $main-font;
line-height: 1.3;
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 0;
margin: 0 0 1em;
}
}
// Widget-5
.widget-announcement-5 {
.w-annc__title {
font-family: $main-font;
line-height: 1.3;
font-size: 1.2rem;
line-height: 1.3;
}
.w-annc__item {
border-bottom: 1px dashed lighten($theme-gray, 65%);
padding-bottom: 1em;
margin-bottom: 1em;
padding-bottom: 1em;
border-bottom: 1px dashed lighten($theme-gray, 65%);
}
}
// Widget-6
.widget-announcement-6 {
.w-annc__item {
margin-bottom: 0.8em;
padding-bottom: 0.8em;
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: 0.8125rem;
font-size: .8125rem;
}
.w-annc__status {
display: inline-block;
}
}
// Widget-7
.widget-announcement-7 {
.w-annc__item {
margin-bottom: 0.8em;
padding-bottom: 0.8em;
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: 0.75rem;
font-size: .75rem;
}
.w-annc__status {
display: inline-block;
}
}
// Widget-8
// ## Table
.widget-announcement-8 {
.w-annc__th {
color: #fff;
font-size: .8125em;
color: $theme-white;
border: 0;
background: $theme-color-main;
font-size: 0.8125em;
border: none;
}
.w-annc__status {
font-size: .75rem;
display: inline-block;
font-size: 0.75rem;
}
td {
font-size: 0.8125em;
font-size: .8125em;
}
a:hover {
text-decoration: none;
}
}
// Widget-9
// ## Table
.widget-announcement-9 {
.w-annc__th {
color: #fff;
font-size: .8125em;
color: $theme-white;
border: 0;
background: $theme-color-main;
font-size: 0.8125em;
border: none;
}
.w-annc__status {
font-size: .75rem;
display: inline-block;
font-size: 0.75rem;
}
td {
font-size: 0.8125em;
font-size: .8125em;
}
a:hover {
text-decoration: none;
}
}
// Widget-10
.widget-announcement-10 {
.w-annc__item {
margin-bottom: 0.8em;
padding-bottom: 0.8em;
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: 0.8125em;
font-size: .8125em;
}
.w-annc__status {
font-size: .75rem;
display: inline-block;
font-size: 0.75rem;
}
}
// Widget-11
// ## Table
.widget-announcement-11 {
.w-annc__item {
margin-bottom: 0.8em;
padding-bottom: 0.8em;
border-bottom: 1px dashed lighten($theme-gray, 65%);
.w-annc__th {
font-size: .8125em;
color: $theme-white;
border: 0;
background: $theme-color-main;
}
.w-annc__entry-title {
margin: 0;
}
.w-annc__postdate-wrap {
font-size: 0.8125em;
}
.w-annc__status {
font-size: .75rem;
display: inline-block;
font-size: 0.75rem;
}
td {
font-size: .8125em;
}
a:hover {
text-decoration: none;
}
}
// Widget-12
// ## Table
.widget-announcement-12 {
.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-13
// ## Table
.widget-announcement-13 {
.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-14
.widget-announcement-14 {
.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__item {
margin-bottom: 0.8em;
padding-bottom: 0.8em;
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__postdate-wrap {
font-size: 0.8125em;
font-size: .8125em;
}
.w-annc__status {
display: inline-block;
}
.w-annc__postdate {
font-size: 0.8125rem;
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;
}
.i-annc__widget-title {
.w-annc__widget-title {
@extend .unity-title;
}
.i-annc__item {
margin-bottom: 30px;
}
.i-annc__img {
width: 100%;
max-width: 100%;
height: auto;
}
.i-annc__th {
color: #fff;
background: $theme-color-main;
font-size: 0.8125em;
border: none;
white-space: nowrap;
}
.i-annc__status-wrap {
span {
display: inline-block;
padding: .2em .6em .3em;
&:last-child {
margin: 0 5px 3px 0;
display: inline-block;
}
}
}
td {
font-size: 0.8125rem;
}
.i-annc__title:hover {
text-decoration: none;
}
.label {
font-size: 0.75rem;
font-size: .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;
.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 {
color: $theme-gray;
}
}
.i-annc__subtitle {
font-size: 0.8125em;
font-size: .8125em;
color: $theme-gray;
}
.i-annc__entry-title {
margin-bottom: 10px;
}
.i-annc__title {
font-family: $sub-font;
color: $theme-color-main;
font-size: .8125rem;
text-decoration: none;
font-size: 0.8125rem;
color: $theme-color-main;
&:hover {
color: darken($theme-color-main, 10%);
}
}
}
// Index-1
.index-announcement-1 {}
// Index-5
// Index-6
.index-announcement-5,
.index-announcement-6 {
.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;
}
}
// Index-2
.index-announcement-2,
.index-announcement-3 {
.i-annc__img-wrap {
margin: 0 0 1em;
}
.i-annc__title {
font-family: $main-font;
font-size: 1.2rem;
line-height: 1.3;
}
}
// Index-7
.index-announcement-7 {
.i-annc__title {
font-family: $main-font;
line-height: 1.3;
font-size: 1.2rem;
}
.i-annc__list > .i-annc__item:nth-child(3n+1) {
clear: both;
}
.i-annc__img-wrap {
height: 200px;
margin: 0 0 1em 0;
}
}
// Index-8
.index-announcement-8 {
.i-annc__title {
font-family: $main-font;
line-height: 1.3;
font-size: 1.2rem;
}
.i-annc__item {
border-bottom: 1px dashed lighten($theme-gray, 65%);
padding-bottom: 1em;
margin-bottom: 1em;
}
}
// Index-9
// Index-10
.index-announcement-9,
.index-announcement-10 {
.i-annc__item {
margin-bottom: 0.8em;
padding-bottom: 0.8em;
border-bottom: 1px dashed lighten($theme-gray, 65%);
}
.i-annc__entry-title {
margin: 0;
}
.i-annc__category-wrap,
.i-annc__status,
.i-annc__title,
.i-annc__postdate-wrap {
font-size: 0.8125rem;
}
.i-annc__status {
display: inline-block;
}
}
// Index-11
// Index-12
.index-announcement-11,
.index-announcement-12 {
.i-annc__item {
margin-bottom: 0.8em;
padding-bottom: 0.8em;
border-bottom: 1px dashed lighten($theme-gray, 65%);
}
.i-annc__entry-title {
margin: 0;
}
.i-annc__postdate-wrap {
font-size: 0.8125em;
}
.i-annc__status {
display: inline-block;
font-size: 0.75rem;
}
}
// Index-16
.index-announcement-16 {
td ul {
margin: 0;
padding: 0;
list-style: none;
}
}
// 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: 0.875rem;
margin-right: 1em;
margin-bottom: 0.6em;
font-size: .875rem;
float: left;
margin-right: 1em;
margin-bottom: .6em;
i {
color: darken($theme-gray-light, 10%);
}
}
.s-annc__tag-wrap {
position: relative;
float: none;
clear: both;
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__post-wrap {
@include clearfix;
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 {
margin: 8px 0 0 -1.6em;
float: left;
margin: 8px 0 0 -1.6em;
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;
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;
}
}

View File

@ -1,5 +1,5 @@
@charset "utf-8";
@import "../initial";
//
// Widget
//

View File

@ -1,52 +0,0 @@
@charset "utf-8";
.w-calendar {
width: 100%;
position: relative;
.widget-title {
text-align: center;
border: 1px solid $theme-gray-subtle;
margin: 0;
padding: 8px 0;
}
th {
background: $theme-color-main;
color: $theme-white;
text-align: center;
font-size: 0.8125rem;
}
td {
border: 1px solid $theme-gray-subtle;
text-align: center;
font-size: 0.8125rem;
}
}
.w-calendar-table {
margin-bottom: 0;
.w-calendar-today {
background: $theme-color-main;
color: $theme-white;
}
.w-calendar-event {
background: $theme-color-third;
color: $theme-white;
cursor: pointer;
}
}
.w-calendar-nav {
a {
position: absolute;
top: 8px;
left: 10px;
color: $theme-color-main;
}
.w-calendar-nav-next {
left: auto;
right: 10px;
}
}

View File

@ -1,54 +1,46 @@
@charset "utf-8";
@import "../initial";
// Faqs MODULES
.widget-faqs {
&.widget1 {
.widget-content {
padding-bottom: 10px;
& + .widget-content {
border-top: 1px dotted $theme-gray-light;
}
.widget-content-title {
display: inline-block;
padding: 5px 0;
}
}
// layout-content 下的樣式
.layout-content & {
.widget-title {
@extend .unity-title;
}
}
// layout-footer 下的樣式
.layout-footer & {
.widget-content {
line-height: 2em;
border-top-color: $theme-gray;
}
}
&.widget1 {
.widget-content {
padding-bottom: 10px;
& + .widget-content {
border-top: 1px dotted $theme-gray-light;
}
.widget-content-title {
display: inline-block;
padding: 5px 0;
}
}
// layout-content 下的樣式
.layout-content & {
.widget-title {
@extend .unity-title;
}
}
// layout-footer 下的樣式
.layout-footer & {
.widget-content {
line-height: 2em;
border-top-color: $theme-gray;
}
}
}
}
// Faqs INDEX
.index-faqs {
.index-title {
@extend .unity-title;
}
&.index1 {
.index-content {
list-style-type: decimal-leading-zero;
list-style-position: inside;
& + .index-content {
border-top: 1px dotted $theme-gray-light;
}
}
.index-title {
@extend .unity-title;
}
&.index1 {
.index-content {
list-style-type: decimal-leading-zero;
list-style-position: inside;
& + .index-content {
border-top: 1px dotted $theme-gray-light;
}
}
}
}

View File

@ -1,144 +1,121 @@
@charset "utf-8";
@import "../initial";
// Gallery MODULES
.widget-gallery {
.widget-title {
@extend .unity-title;
}
.widget-title {
@extend .unity-title;
}
.widget-content {
position: relative;
}
&.widget1 {
.widget-content {
position: relative;
}
&.widget1 {
.widget-content {
overflow: hidden;
.widget-pic {
display: inline-block;
padding: 1px;
text-align: center;
@include size(33.3333%, auto);
img {
@include size(100%, 100%);
}
}
overflow: hidden;
.widget-pic {
display: inline-block;
padding: 1px;
text-align: center;
@include size(33.3333%, auto);
img {
@include size(100%, 100%);
}
}
}
&.widget2 {
.widget-content {
margin-left: -5px;
margin-right: -5px;
.widget-pic {
margin-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
img {
@include size(100%, auto);
}
}
}
&.widget2 {
.widget-content {
margin-left: -5px;
margin-right: -5px;
.widget-pic {
margin-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
img {
@include size(100%, auto);
}
}
}
}
}
.index-gallery {
.index-title {
@extend .unity-title;
}
&.index1 {
.index-content {
.index-content-inner {
position: relative;
}
.index-part {
position: absolute;
top: 4px;
right: 4px;
bottom: 4px;
left: 4px;
overflow: hidden;
background-color: rgba($theme-color-main, 0.8);
@include transition(all 0.5s ease);
@include opacity(0);
.index-content-title {
@include transition(all 0.3s ease);
@include transition-delay(0.1s);
@include scale(0);
}
&:hover {
@include opacity(1);
.index-content-title {
@include scale(1);
}
}
}
.index-content-title {
display: table;
margin: 0;
@include size(100%, 100%);
a {
display: table-cell;
color: #FFF;
text-decoration: none;
text-align: center;
vertical-align: middle;
}
}
.index-title {
@extend .unity-title;
}
&.index1 {
.index-content {
.index-content-inner {
position: relative;
}
.index-part {
position: absolute;
top: 4px;
right: 4px;
bottom: 4px;
left: 4px;
overflow: hidden;
background-color: rgba($theme-color-main, 0.8);
@include transition(all 0.5s ease);
@include opacity(0);
.index-content-title {
@include transition(all 0.3s ease);
@include transition-delay(0.1s);
@include scale(0);
}
&:hover {
@include opacity(1);
.index-content-title {
@include scale(1);
}
}
}
.index-content-title {
display: table;
margin: 0;
@include size(100%, 100%);
a {
display: table-cell;
color: #FFF;
text-decoration: none;
text-align: center;
vertical-align: middle;
}
}
}
}
}
.show-gallery {
.show-title {
@extend .unity-title;
.show-title {
@extend .unity-title;
}
.show-content {
padding-right: 0;
padding-left: 0;
.img {
display: inline-block;
width: 100%;
height: auto;
opacity: (0.8);
-webkit-filter: grayscale(100%) brightness(1.2);
-moz-filter: grayscale(100%) brightness(1.2);
filter: grayscale(100%) brightness(1.2);
@include transition(all 0.2s ease);
}
.show-content {
padding-right: 0;
padding-left: 0;
.show-content-inner {
position: relative;
padding: 2px;
z-index: 0;
@include scale(1);
@include transition(all 0.2s ease);
&:hover {
z-index: 1;
@include scale(1.1);
.img {
display: inline-block;
width: 100%;
height: auto;
opacity: 0.8;
-webkit-filter: grayscale(100%) brightness(1.2);
-moz-filter: grayscale(100%) brightness(1.2);
filter: grayscale(100%) brightness(1.2);
@include transition(all 0.2s ease);
}
.show-content-inner {
position: relative;
padding: 2px;
z-index: 0;
@include scale(1);
@include transition(all 0.2s ease);
&:hover {
z-index: 1;
@include scale(1.1);
.img {
opacity: 1;
-webkit-filter: grayscale(0%) brightness(1);
-moz-filter: grayscale(0%) brightness(1);
filter: grayscale(0%) brightness(1);
}
}
opacity: (1);
-webkit-filter: grayscale(0%) brightness(1);
-moz-filter: grayscale(0%) brightness(1);
filter: grayscale(0%) brightness(1);
}
}
}
}
}

View File

@ -1,133 +1,61 @@
@charset "utf-8";
@import "../initial";
//
// Index
//
// Member Index
// ## Gerneral styles for Index
// Index 1
.index-member-1 {
.i-member-tr-head {
&:nth-child(1n+2) {
display: none;
}
th {
background: $theme-color-main;
color: #fff;
}
}
}
// Index 2
.index-member-2 {
.i-member-section {
max-width: 500px;
margin: auto;
}
.i-member-status-title {
@extend .unity-title;
}
.i-member-item-inner {
background: none;
border-radius: 0.25rem;
padding: 24px 1rem;
margin-bottom: 16px;
}
.i-member-pic-wrap {
height: auto;
margin-bottom: 16px;
}
.i-member-pic {
width: 100%;
}
.i-member-profile-list {
@include list-reset;
}
.i-member-profile-item {
margin-bottom: 8px;
font-size: $font-13;
}
// RWD
@media screen and (min-width: $screen-sm) {
.i-member-section {
max-width: 100%;
}
.i-member-item-inner {
background: $theme-gray-lighter;
}
}
}
// // Index 3
.index-member-3 {
.i-member-section {
max-width: 500px;
margin: auto;
}
.i-member-status-title {
@extend .unity-title;
}
.i-member-item-inner {
background: none;
border-radius: 0.25rem;
padding: 24px 1rem;
margin-bottom: 16px;
}
.i-member-pic-wrap {
height: auto;
margin-bottom: 16px;
}
.i-member-pic {
width: 100%;
}
.i-member-profile-list {
@include list-reset;
}
.i-member-profile-item {
margin-bottom: 8px;
font-size: $font-13;
}
.i-member-item:nth-child(odd) {
clear: both;
}
.i-member-item-inner {}
.i-member-pic-wrap {
padding: 0;
}
// RWD
@media screen and (min-width: $screen-sm) {
.i-member-section {
max-width: 100%;
}
.i-member-item-inner {
background: $theme-gray-lighter;
}
}
@media screen and (min-width: $screen-md) {
.i-member-pic-wrap {
position: relative;
overflow: hidden;
height: 125px;
}
.i-member-pic {
}
}
}
// Show page
.show-member {
// Member index page
.index-member {
.index-title {
@extend .unity-title;
}
th,
td {
font-family: $sub-font;
th, td {
font-size: .8125rem;
font-size: .8125rem;
}
th[class^="member-data-title"] {
white-space: nowrap;
}
.index-member-item {
min-height: 200px;
margin-bottom: 20px;
}
.index-member-item:nth-child(2n+1) {
clear: both;
}
.member-data-title-job-title:before,
.member-data-title-name:before,
.member-data-title-email:before,
.member-data-title-office-tel:before {
font-family: "fontAwesome";
font-size: .75rem;
display: inline-block;
min-width: 15px;
margin-right: .3125rem;
content: "\f007";
color: gray;
}
.member-data-title-job-title:before {
content: "\f19d";
}
.member-data-title-email:before {
content: "\f0e0";
}
.member-data-title-office-tel:before {
content: "\f098";
}
.member-profile-data-wrap {
overflow: hidden;
}
.member-pic {
border-radius: .25rem;
}
}
// Member show page
.show-member {
font-family: $sub-font;
th, td {
font-size: .8125rem;
}
.member-plugins {
margin-bottom: 20px;
a {
font-size: .8125rem;
}
.member-plugins {
margin: 20px 0;
a {
font-size: .8125rem;
}
}
}
}
}

View File

@ -1,271 +1,222 @@
@charset "utf-8";
@import "../initial";
.modules-menu {
font-family: $sub-font;
max-height: none;
li {
white-space: nowrap;
& > a, & > .fa {
color: #ffffff;
font-family: $sub-font;
max-height: none;
li {
white-space: nowrap;
& > a, & > .fa {
color: #ffffff;
}
&:hover {
& > a, & > .fa {
color: $brand-primary;
text-decoration: none;
}
}
}
.modules-menu-level-0 {
margin: 0;
padding: 0;
list-style: none;
& > li {
margin: 0 -15px;
padding: 0 15px;
border-bottom: 1px solid lighten($theme-gray, 5%);
& > a {
display: inline-block;
padding: 1rem 0;
}
& > .fa {
position: absolute;
right: 10px;
@include size(45px, 45px);
cursor: pointer;
line-height: 45px;
font-size: 1.5em;
text-align: center;
}
&:hover {
& > a {
background-color: transparent;
}
}
@media (min-width: $screen-sm) {
position: relative;
margin: 0 10px;
padding: 0;
border-bottom: none;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
.modules-menu-level-1 {
right: 15px;
left: auto;
&:before {
right: 10px;
left: auto;
}
& > li {
padding-right: 15px;
padding-left: 15px;
& > a {
padding-left: 0;
}
}
.modules-menu-level-2 {
right: 100%;
left: auto;
&:before {
right: -6px;
left: auto;
@include arrow('left', 6px, 6px, $theme-gray-darker);
}
}
}
}
& > a {
padding: 2rem 0;
border-bottom: 0.5rem solid transparent;
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
line-height: 1;
font-size: 1em;
cursor: default;
}
&:hover {
& > a, & > .fa {
color: $brand-primary;
text-decoration: none;
}
& > a {
padding: 2rem 0;
border-bottom-color: $brand-primary;
}
.modules-menu-level-1 {
display: block;
}
}
}
}
.modules-menu-level-0 {
margin: 0;
padding: 0;
list-style: none;
& > li {
margin: 0 -15px;
padding: 0 15px;
border-bottom: 1px solid lighten($theme-gray, 5%);
& > a {
display: inline-block;
padding: 1rem 0;
}
& > .fa {
position: absolute;
right: 10px;
@include size(45px, 45px);
cursor: pointer;
line-height: 45px;
font-size: 1.5em;
text-align: center;
}
&:hover {
& > a {
background-color: transparent;
}
}
@media (min-width: $screen-sm) {
position: relative;
margin: 0 10px;
padding: 0;
border-bottom: none;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
.modules-menu-level-1 {
right: 15px;
left: auto;
&:before {
right: 10px;
left: auto;
}
& > li {
padding-right: 15px;
padding-left: 15px;
& > a {
padding-left: 0;
}
}
.modules-menu-level-2 {
right: 100%;
left: auto;
&:before {
right: -6px;
left: auto;
@include arrow("left", 6px, 6px, $theme-gray-darker);
}
}
}
}
& > a {
padding: 2rem 0;
border-bottom: 0.5rem solid transparent;
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
line-height: 1;
font-size: 1em;
cursor: default;
}
&:hover {
& > a {
padding: 2rem 0;
border-bottom-color: $brand-primary;
}
.modules-menu-level-1 {
display: block;
}
}
}
}
.modules-menu-level-1 {
display: none;
min-width: 100%;
margin: 0 -15px;
padding: 0;
background-color: $theme-gray-dark;
list-style: none;
z-index: 1;
& > li {
position: relative;
& + li {
border-top: 1px solid lighten($theme-gray-dark, 5%);
}
& > a {
display: inline-block;
padding: 0.7em 0 0.7em 30px;
}
& > .fa {
position: absolute;
right: 15px;
@include size(38px, 38px);
line-height: 38px;
font-size: 1.2em;
text-align: center;
cursor: pointer;
}
&:hover {
background-color: darken($brand-primary, 10%);
& > a, & > .fa {
color: #FFF;
}
}
}
.modules-menu-level-1 {
display: none;
min-width: 100%;
margin: 0 -15px;
padding: 0;
background-color: $theme-gray-dark;
list-style: none;
z-index: 1;
& > li {
position: relative;
& + li {
border-top: 1px solid lighten($theme-gray-dark, 5%);
}
& > a {
display: inline-block;
padding: 0.7em 0 0.7em 30px;
}
& > .fa {
position: absolute;
right: 15px;
@include size(38px, 38px);
line-height: 38px;
font-size: 1.2em;
text-align: center;
cursor: pointer;
}
&:hover {
background-color: darken($brand-primary, 10%);
& > a, & > .fa {
color: #FFF;
}
}
@media (min-width: $screen-sm) {
position: absolute;
left: 15px;
margin-top: -0.5rem;
border-top: 0.5rem solid $brand-primary;
&:before {
content: "";
display: block;
position: absolute;
top: -16px;
left: 10px;
@include arrow('bottom', 10px, 8px, $brand-primary);
}
& > li {
padding-right: 30px;
& > a {
padding-left: 15px;
}
@media (min-width: $screen-sm) {
position: absolute;
left: 15px;
margin-top: -0.5rem;
border-top: 0.5rem solid $brand-primary;
&:before {
content: "";
display: block;
position: absolute;
top: -16px;
left: 10px;
@include arrow("bottom", 10px, 8px, $brand-primary);
}
& > li {
padding-right: 30px;
& > a {
padding-left: 15px;
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
margin-right: 0;
line-height: 1;
float: none;
font-size: 1em;
cursor: default;
}
&:hover {
.modules-menu-level-2 {
display: block;
}
}
}
.fa {
&:before {
content: "\f105";
}
}
& > .fa {
position: static;
@include size(auto, auto);
padding: 0;
margin-right: 0;
line-height: 1;
float: none;
font-size: 1em;
cursor: default;
}
&:hover {
.modules-menu-level-2 {
display: block;
}
}
}
.fa {
&:before {
content: "\f105";
}
}
}
.modules-menu-level-2 {
display: none;
margin: 0;
padding: 0;
background-color: $theme-gray-darker;
list-style: none;
& > li {
& + li {
border-top: 1px solid lighten($theme-gray-darker, 5%);
}
& > a {
display: inline-block;
padding: 0.5em 0 0.5em 45px;
}
&:hover {
background-color: darken($brand-primary, 20%);
& > a {
color: #FFF;
}
}
}
@media (min-width: $screen-sm) {
position: absolute;
top: 0;
left: 100%;
&:before {
content: "";
display: block;
position: absolute;
top: 13px;
left: -6px;
@include arrow("right", 6px, 6px, $theme-gray-darker);
}
& > li {
padding-right: 15px;
& > a {
padding-left: 15px;
padding: 0.7em 0 0.7em 15px;
}
}
.fa {
&:before {
content: "\f105";
}
}
}
.modules-menu-level-2 {
display: none;
margin: 0;
padding: 0;
background-color: $theme-gray-darker;
list-style: none;
& > li {
& + li {
border-top: 1px solid lighten($theme-gray-darker, 5%);
}
& > a {
display: inline-block;
padding: 0.5em 0 0.5em 45px;
}
&:hover {
background-color: darken($brand-primary, 20%);
& > a {
color: #FFF;
}
}
}
@media (min-width: $screen-sm) {
position: absolute;
top: 0;
left: 100%;
&:before {
content: "";
display: block;
position: absolute;
top: 13px;
left: -6px;
@include arrow('right', 6px, 6px, $theme-gray-darker);
}
& > li {
padding-right: 15px;
& > a {
padding-left: 15px;
padding: 0.7em 0 0.7em 15px;
}
}
.fa {
&:before {
content: "\f105";
}
}
}
}
}

View File

@ -1,5 +1,3 @@
@charset "utf-8";
.plugin-show-table th{
text-align: right;
min-width: 80px;

View File

@ -1,57 +1,47 @@
@charset "utf-8";
@import "../initial";
// Link MODULES
.widget-link {
// layout-content 下的樣式
.widget-title {
@extend .unity-title;
// layout-content 下的樣式
.widget-title {
@extend .unity-title;
}
&.widget1 {
.widget-content {
line-height: 2.5em;
& + .widget-content {
border-top: 1px dotted $theme-gray-light;
}
.widget-content-title {
display: inline-block;
}
}
&.widget1 {
.widget-content {
line-height: 2.5em;
& + .widget-content {
border-top: 1px dotted $theme-gray-light;
}
.widget-content-title {
display: inline-block;
}
}
// layout-footer 下的樣式
.layout-footer & {
.widget-content {
line-height: 2em;
border-top-color: $theme-gray;
}
}
// layout-footer 下的樣式
.layout-footer & {
.widget-content {
line-height: 2em;
border-top-color: $theme-gray;
}
}
}
}
// Link INDEX
.index-link {
.index-title {
@extend .unity-title;
}
&.index1 {
.index-content {
list-style-type: decimal-leading-zero;
list-style-position: inside;
& + .index-content {
border-top: 1px dotted $theme-gray-light;
}
.index-context {
display: inline-block;
margin: 0 0 10px 2em;
color: darken($theme-gray-light, 20%);
}
}
.index-title {
@extend .unity-title;
}
&.index1 {
.index-content {
list-style-type: decimal-leading-zero;
list-style-position: inside;
& + .index-content {
border-top: 1px dotted $theme-gray-light;
}
.index-context {
display: inline-block;
margin: 0 0 10px 2em;
color: darken($theme-gray-light, 20%);
}
}
}
}

View File

@ -1,25 +1,28 @@
@import url("http://fonts.googleapis.com/css?family=Droid+Sans:400,700");
// 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";
@import "base/accesskey";
@import "base/go_back_top";
// Layout
@import "layout/header";
@import "layout/slide";
@import "layout/content";
@import "layout/footer";
// Modules
@import "modules/*";
// // Modules
@import "modules/menu";
@import "modules/ad_banner";
@import "modules/announcement";
@import "modules/faq";
@import "modules/web_resource";
@import "modules/gallery";
@import "modules/archives";
@import "modules/member";
@import "modules/personal_plugin";
// Widget
@import "widget/breadcrumb";
@import "widget/sitemenu";
.container {
width: 980px !important;
}

View File

@ -1,20 +1,13 @@
@charset "utf-8";
@import "../initial";
.widget-breadcrumb {
&.widget1 {
li {
a {
font-size: 0.8125rem;
}
&:last-child {
a {
color: $theme-gray-dark;
pointer-events: none;
}
}
&.widget1 {
li {
&:last-child {
a {
color: $theme-gray-dark;
pointer-events: none;
}
}
}
}
}
}

View File

@ -1,65 +1,53 @@
@charset "utf-8";
@import "../initial";
.sitemenu-wrap {
padding: 10px 0;
@include clearfix;
.sitemenu-title {
display: none;
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-list {
margin: 0;
padding: 0;
list-style: none;
}
.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%);
}
}
}
.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%);
}
}
}

View File

@ -1,6 +1,6 @@
<footer class="layout-footer">
<div class="container layout-footer-inner">
<div class="layout-footer-content">{{footer-data}}</div>
<div class="footer-counter">{{site-counter}}</div>
<div>{{site-counter}}</div>
</div>
</footer>

Some files were not shown because too many files have changed in this diff Show More