diff --git a/app/assets/images/google-account.png b/app/assets/images/google-account.png new file mode 100755 index 0000000..2c677dd Binary files /dev/null and b/app/assets/images/google-account.png differ diff --git a/app/assets/images/google-message-background.jpg b/app/assets/images/google-message-background.jpg new file mode 100755 index 0000000..efb11ce Binary files /dev/null and b/app/assets/images/google-message-background.jpg differ diff --git a/app/assets/images/spin.gif b/app/assets/images/spin.gif new file mode 100644 index 0000000..22db6b3 Binary files /dev/null and b/app/assets/images/spin.gif differ diff --git a/app/assets/stylesheets/google_oauth.css b/app/assets/stylesheets/google_oauth.css new file mode 100755 index 0000000..fd6c9fe --- /dev/null +++ b/app/assets/stylesheets/google_oauth.css @@ -0,0 +1,65 @@ +@charset "utf-8"; +@import url(http://fonts.googleapis.com/css?family=Ubuntu:400,400italic); +body { + font-family: "Ubuntu", sans-serif; + font-size: 100%; + padding: 8rem 0 0 0; + background: url(/assets/google-message-background.jpg) center center fixed; + background-size: cover; +} +.message-wrap { + width: 80%; + max-width: 366px; + margin: auto; + padding: 2rem; + text-align: center; + border: 2px solid rgba(255, 255, 255, .1); + border-radius: 4px; + background: rgba(255, 255, 255, .1); +} +.message-image-wrap { + position: relative; + display: inline-block; + width: 100px; +} +.message-image { + width: 100px; + height: 100px; + margin: 3rem 0 1.875rem 0; + border-radius: 50%; +} +.message-body .message-icon { + font-size: 1.2rem; + line-height: 50px; + position: absolute; + right: -1.625rem; + bottom: 1rem; + display: block; + width: 50px; + height: 50px; + color: #fff; + border-radius: 50%; +} +.message-heading { + font-size: 1.75rem; + font-weight: normal; + margin-bottom: .5rem; + text-transform: uppercase; + color: #fff; +} +.message-paragraph { + font-size: .9rem; + font-style: italic; + margin-bottom: 1rem; + color: rgba(255, 255, 255, .8); +} +.success-skin { + background: #37be1c; +} +.fail-skin { + background: #cc1c1c; +} +.info-skin { + background: #1cadcc; +} + diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index b9d4471..2ce1493 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -36,6 +36,10 @@ class SessionsController < ApplicationController end def google_callback + error = params[:error] rescue nil + if error == "access_denied" + redirect_to auth_failure_path and return + end auth = env["omniauth.auth"] user = Google.find_by("google_uid" => auth.uid).user rescue nil if user.nil? && current_user.nil? @@ -69,6 +73,11 @@ class SessionsController < ApplicationController redirect_to admin_member_path(current_user.member_profile.to_param) and return end + def google_faliure + @code = 2 + render "google_result" + end + def connect_account(auth) if !current_user.nil? google = Google.new diff --git a/app/models/user.rb b/app/models/user.rb index 4095204..ff28e94 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -12,7 +12,7 @@ class User has_many :assets has_many :user_actions, :dependent => :destroy - index({ confirmation_token: 1}, { unique: true }) + # index({ confirmation_token: 1}, { unique: true }) scope :unapproved, ->{ where(approved: false) } has_secure_password diff --git a/app/templates/orbit_bootstrap/assets/javascripts/app.js b/app/templates/orbit_bootstrap/assets/javascripts/app.js index 276189f..f806c79 100644 --- a/app/templates/orbit_bootstrap/assets/javascripts/app.js +++ b/app/templates/orbit_bootstrap/assets/javascripts/app.js @@ -1,108 +1,108 @@ (function($) { - "use strict" - - function init () { - var doc = document; + "use strict" - 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'); - } + function init() { + var doc = document; + + 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; } - }, - // 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); - } - } - } - }, - // Sitemenu dropdown - sitemenuDropdown : function() { - var el = doc.querySelectorAll('.sitemenu__list.level-2'); - for( var i = 0, len = el.length; i < len; i++ ) { - if( el[i].hasChildNodes() ) { - var caret = doc.createElement('span'); - caret.className = 'sitemenu___dropdown-toggle fa fa-caret-down'; - caret.setAttribute('data-toggle', 'dropdown'); - - el[i].parentNode.insertBefore(caret, el[i]); - orbit.addClass(el[i], 'dropdown-menu'); - } - } + }).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); } + } } + }, + // 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'); - var plugin = { - // RWD image resize script - bullEye : function() { - $(".bullseye").bullseye({ - fadeEffect: false - }); - } + el[i].parentNode.insertBefore(caret, el[i]); + orbit.addClass(el[i], 'dropdown-menu'); + } } - - // 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(); + } } + var plugin = { + // RWD image resize script + bullEye: function() { + $(".bullseye").bullseye({ + fadeEffect: false + }); + } + } - $(document).ready(function($) { - init(); - }); + // 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)); diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_global.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_global.scss index 1c08947..1e49ba3 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_global.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_global.scss @@ -1,26 +1,20 @@ -html { - font-size: 100%; -} - -body { - font-family: $sub-font; - margin-top: 40px; // needed for Orbit bar - font-size: inherit; -} - -a {} - -a:hover, a:focus { - text-decoration: none; -} - -a:focus {} - -img { - max-width: 100%; - height: auto; -} - -.admin-edit { - clear: both; -} \ No newline at end of file +html { + font-size: 100%; +} +body { + font-family: $sub-font; + margin-top: 40px; // needed for Orbit bar + font-size: inherit; +} +a {} a:hover, +a:focus { + text-decoration: none; +} +a:focus {} img { + max-width: 100%; + height: auto; +} +.admin-edit { + clear: both; +} + diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss index fbe663b..0ffcda1 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/ad_banner.scss @@ -1,20 +1,15 @@ -@charset "utf-8"; - +@charset 'utf-8'; // // Widget // - // Widget // ## gerenral styles .w-ad-banner { position: relative; - .cursor { cursor: pointer; } } - - // Widget 1 .ad-banner-widget-1 { .w-ad-banner__wrap { @@ -28,53 +23,46 @@ 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 { - @include list-reset(); position: absolute; - right: 1em; + z-index: 120; top: 1em; - z-index: 100; - + right: 1em; + @include list-reset(); li { display: inline-block; } - a { - background: $theme-color-main; display: inline-block; - margin-right: 0.25em; - width: 0.8em; - height: 0.8em; + width: .8em; + height: .8em; + margin-right: .25em; + opacity: .5; border-radius: 50%; - opacity: 0.5; + background: $theme-color-main; } - - .active-slide a{ + .active-slide a { opacity: 1; } } } - // Widget 2 .ad-banner-widget-2 { - .w-ad-banner__wrap { + .w-ad-banner__wrap { width: 100%; } .w-ad-banner__slide { @@ -84,47 +72,42 @@ width: 100%; height: auto; } - .youtube { - } - .youtube, .cycle-youtube { + .youtube, + .cycle-youtube { width: 100%; height: 100%; } - object, embed{ - width: 100%; - height: 100%; + object, + embed { + width: 100%; + height: 100%; } .w-ad-banner__pager { - @include list-reset(); position: absolute; + z-index: 102; right: 1em; bottom: 1em; - z-index: 102; - + @include list-reset(); li { display: inline-block; } - a { - background: $theme-color-main; display: inline-block; - margin-right: 0.25em; - width: 0.8em; - height: 0.8em; + width: .8em; + height: .8em; + margin-right: .25em; + opacity: .5; border-radius: 50%; - opacity: 0.5; + background: $theme-color-main; } - - .active-slide a{ + .active-slide a { opacity: 1; } } } - - // Widget 3 .ad-banner-widget-3 { - .w-ad-banner__wrap { + .w-ad-banner__wrap { width: 100%; } .w-ad-banner__slide { @@ -135,31 +118,29 @@ height: auto; } .w-ad-banner__pager { - @include list-reset(); position: absolute; + z-index: 120; right: 1em; bottom: 1em; - z-index: 100; - + @include list-reset(); li { display: inline-block; } - a { - background: $theme-color-main; display: inline-block; - margin-right: 0.25em; - width: 0.8em; - height: 0.8em; + width: .8em; + height: .8em; + margin-right: .25em; + opacity: .5; border-radius: 50%; - opacity: 0.5; + background: $theme-color-main; } - .active-slide a{ + .active-slide a { opacity: 1; } } } - -.cycle-slide-active{ +.cycle-slide-active { z-index: 101 !important; -} \ No newline at end of file +} + diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/announcement.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/announcement.scss index 66cae13..75e1c19 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/announcement.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/announcement.scss @@ -1,448 +1,473 @@ -@charset "utf-8"; - +@charset 'utf-8'; // // Widget // - // Announcement widget // ## Gerneral styles for widgets .w-annc { - .w-annc__widget-title { - @extend .unity-title; + .w-annc__widget-title { + @extend .unity-title; + } + .w-annc__list { + margin: 0; + padding: 0; + list-style: none; + } + .w-annc__item { + margin-bottom: 30px; + } + .label { + font-size: .75rem; + font-weight: normal; + } + .w-annc__meta { + .w-annc__status-wrap, .w-annc__postdate-wrap, .w-annc__category-wrap { + font-size: .8125em; + font-weight: normal; + display: inline-block; + margin-right: .2em; + color: $theme-gray; } - .w-annc__list { - margin: 0; - padding: 0; - list-style: none; + i { + color: $theme-gray; } - .w-annc__item { - margin-bottom: 30px; - } - .label { - font-size: 0.75rem; - font-weight: normal; - } - .w-annc__meta { - .w-annc__status-wrap, - .w-annc__postdate-wrap, - .w-annc__category-wrap { - display: inline-block; - margin-right: 0.2em; - font-size: 0.8125em; - color: $theme-gray; - font-weight: normal; - } - i { - color: $theme-gray; - } - } - .status-top { - background: $theme-color-second; - } - .status-hot { - background: $theme-color-third; - } - .w-annc__subtitle { - font-size: 0.8125em; - color: $theme-gray; - } - .w-annc__entry-title { - margin-bottom: 10px; - } - .w-annc__title { - font-family: $sub-font; - color: $theme-color-main; - text-decoration: none; - font-size: 0.8125rem; - &:hover { - color: darken($theme-color-main, 10%); - } + } + .status-top { + background: $theme-color-second; + } + .status-hot { + background: $theme-color-third; + } + .w-annc__subtitle { + font-size: .8125em; + color: $theme-gray; + } + .w-annc__entry-title { + margin-bottom: 10px; + } + .w-annc__title { + font-family: $sub-font; + font-size: .8125rem; + text-decoration: none; + color: $theme-color-main; + &:hover { + color: darken($theme-color-main, 10%); } + } } - // 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; - } + .w-annc__img-wrap { + height: 200px; + margin: 0 0 1em 0; + } + .w-annc__title { + font-family: $main-font; + font-size: 1.2rem; + line-height: 1.3; + } } - // 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; - } + .w-annc__img-wrap { + height: 200px; + margin: 0 0 1em 0; + } + .w-annc__title { + font-family: $main-font; + font-size: 1.2rem; + line-height: 1.3; + } } - // Widget-3 .widget-announcement-3 { - .w-annc__img-wrap { - height: 200px; - margin: 0 0 1em 0; - } - .w-annc__title { - font-family: $main-font; - line-height: 1.3; - font-size: 1.2rem; - } + .w-annc__img-wrap { + height: 200px; + margin: 0 0 1em; + } + .w-annc__title { + font-family: $main-font; + font-size: 1.2rem; + line-height: 1.3; + } } - // Widget-4 .widget-announcement-4 { - .w-annc__title { - font-family: $main-font; - line-height: 1.3; - font-size: 1.2rem; - } - .w-annc__list > .w-annc__item:nth-child(3n+1) { - clear: both; - } - .w-annc__img-wrap { - height: 200px; - margin: 0 0 1em 0; - } + .w-annc__title { + font-family: $main-font; + font-size: 1.2rem; + line-height: 1.3; + } + .w-annc__list > .w-annc__item:nth-child(3n+1) { + clear: both; + } + .w-annc__img-wrap { + height: 200px; + margin: 0 0 1em; + } } - // Widget-5 .widget-announcement-5 { - .w-annc__title { - font-family: $main-font; - line-height: 1.3; - font-size: 1.2rem; - } - .w-annc__item { - border-bottom: 1px dashed lighten($theme-gray, 65%); - padding-bottom: 1em; - margin-bottom: 1em; - } + .w-annc__title { + font-family: $main-font; + font-size: 1.2rem; + line-height: 1.3; + } + .w-annc__item { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px dashed lighten($theme-gray, 65%); + } } - // Widget-6 .widget-announcement-6 { - .w-annc__item { - margin-bottom: 0.8em; - padding-bottom: 0.8em; - border-bottom: 1px dashed lighten($theme-gray, 65%); - } - .w-annc__entry-title { - margin: 0; - } - .w-annc__category-wrap, - .w-annc__status, - .w-annc__title, - .w-annc__postdate-wrap { - font-size: 0.8125rem; - } - .w-annc__status { - display: inline-block; - } + .w-annc__item { + margin-bottom: .8em; + padding-bottom: .8em; + border-bottom: 1px dashed lighten($theme-gray, 65%); + } + .w-annc__entry-title { + margin: 0; + } + .w-annc__category-wrap, + .w-annc__status, + .w-annc__title, + .w-annc__postdate-wrap { + font-size: .8125rem; + } + .w-annc__status { + display: inline-block; + } } - // Widget-7 .widget-announcement-7 { - .w-annc__item { - margin-bottom: 0.8em; - padding-bottom: 0.8em; - border-bottom: 1px dashed lighten($theme-gray, 65%); - } - .w-annc__entry-title { - margin: 0; - } - .w-annc__category-wrap, - .w-annc__status, - .w-annc__title, - .w-annc__postdate-wrap { - font-size: 0.75rem; - } - .w-annc__status { - display: inline-block; - } + .w-annc__item { + margin-bottom: .8em; + padding-bottom: .8em; + border-bottom: 1px dashed lighten($theme-gray, 65%); + } + .w-annc__entry-title { + margin: 0; + } + .w-annc__category-wrap, + .w-annc__status, + .w-annc__title, + .w-annc__postdate-wrap { + font-size: .75rem; + } + .w-annc__status { + display: inline-block; + } } - // Widget-8 // ## Table .widget-announcement-8 { - .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; - } + .w-annc__th { + font-size: .8125em; + color: $theme-white; + border: 0; + background: $theme-color-main; + } + .w-annc__status { + font-size: .75rem; + display: inline-block; + } + td { + font-size: .8125em; + } + a:hover { + text-decoration: none; + } } - // Widget-9 // ## Table .widget-announcement-9 { - .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; - } + .w-annc__th { + font-size: .8125em; + color: $theme-white; + border: 0; + background: $theme-color-main; + } + .w-annc__status { + font-size: .75rem; + display: inline-block; + } + td { + font-size: .8125em; + } + a:hover { + text-decoration: none; + } } - // Widget-10 .widget-announcement-10 { - .w-annc__item { - margin-bottom: 0.8em; - padding-bottom: 0.8em; - border-bottom: 1px dashed lighten($theme-gray, 65%); - } - .w-annc__entry-title { - margin: 0; - } - .w-annc__postdate-wrap { - font-size: 0.8125em; - } - .w-annc__status { - display: inline-block; - font-size: 0.75rem; - } + .w-annc__item { + margin-bottom: .8em; + padding-bottom: .8em; + border-bottom: 1px dashed lighten($theme-gray, 65%); + } + .w-annc__entry-title { + margin: 0; + } + .w-annc__postdate-wrap { + font-size: .8125em; + } + .w-annc__status { + font-size: .75rem; + display: inline-block; + } } - // Widget-11 // ## Table .widget-announcement-11 { - .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; - } + .w-annc__th { + font-size: .8125em; + color: $theme-white; + border: 0; + background: $theme-color-main; + } + .w-annc__status { + font-size: .75rem; + display: inline-block; + } + td { + font-size: .8125em; + } + a:hover { + text-decoration: none; + } } - // Widget-12 .widget-announcement-12 { - .w-annc__list { - padding: 0 15px; + .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__img-wrap { - height: 300px; - margin-bottom: 15px; - @media (min-width: $screen-md) { - height: 200px; - margin-bottom: 0; - } - } - .w-annc__item { - margin-bottom: 0.8em; - padding-bottom: 0.8em; - border-bottom: 1px dashed lighten($theme-gray, 65%); - } - .w-annc__entry-title { - margin: 0 0 10px 0; - @media (min-width: $screen-md) { - margin-bottom: 0; - } - } - .w-annc__postdate-wrap { - font-size: 0.8125em; - } - .w-annc__status { - display: inline-block; - } - .w-annc__postdate { - font-size: 0.8125rem; + } + .w-annc__item { + margin-bottom: .8em; + padding-bottom: .8em; + border-bottom: 1px dashed lighten($theme-gray, 65%); + } + .w-annc__entry-title { + margin: 0 0 10px 0; + @media (min-width: $screen-md) { + margin-bottom: 0; } + } + .w-annc__postdate-wrap { + font-size: .8125em; + } + .w-annc__status { + display: inline-block; + } + .w-annc__postdate { + font-size: .8125rem; + } } - // Announcement index // ## General style for index pages .i-annc { - .i-annc__page-title { - @extend .unity-title; + .i-annc__page-title { + @extend .unity-title; + } + .i-annc__list { + margin: 0; + padding: 0; + list-style: none; + } + .status-top { + background: $theme-color-second; + } + .status-hot { + background: $theme-color-third; + } + .w-annc__widget-title { + @extend .unity-title; + } + .i-annc__item { + margin-bottom: 30px; + } + .i-annc__img { + width: 100%; + max-width: 100%; + height: auto; + } + .label { + font-size: .75rem; + font-weight: normal; + } + .i-annc__meta { + .i-annc__status-wrap, .i-annc__postdate-wrap, .i-annc__category-wrap { + font-size: .8125em; + font-weight: normal; + display: inline-block; + margin-right: .2em; + color: $theme-gray; } - .i-annc__list { - margin: 0; - padding: 0; - list-style: none; + i { + color: $theme-gray; } - .status-top { - background: $theme-color-second; - } - .status-hot { - background: $theme-color-third; - } - .w-annc__widget-title { - @extend .unity-title; - } - .i-annc__item { - margin-bottom: 30px; - } - .label { - font-size: 0.75rem; - font-weight: normal; - } - .i-annc__meta { - .i-annc__status-wrap, - .i-annc__postdate-wrap, - .i-annc__category-wrap { - display: inline-block; - margin-right: 0.2em; - font-size: 0.8125em; - color: $theme-gray; - font-weight: normal; - } - i { - color: $theme-gray; - } - } - .i-annc__subtitle { - font-size: 0.8125em; - color: $theme-gray; - } - .i-annc__entry-title { - margin-bottom: 10px; - } - .i-annc__title { - font-family: $sub-font; - color: $theme-color-main; - text-decoration: none; - font-size: 0.8125rem; - &:hover { - color: darken($theme-color-main, 10%); - } + } + .i-annc__subtitle { + font-size: .8125em; + color: $theme-gray; + } + .i-annc__entry-title { + margin-bottom: 10px; + } + .i-annc__title { + font-family: $sub-font; + font-size: .8125rem; + text-decoration: none; + color: $theme-color-main; + &:hover { + color: darken($theme-color-main, 10%); } + } } - // Index-1 .index-announcement-1 { - .i-annc__th { - color: #fff; - background: $theme-color-main; - font-size: 0.8125em; - border: none; - } - td { - font-size: 0.8125rem; - } - .i-annc__title:hover { - text-decoration: none; - } + .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 -.i-announcement-2 { - .i-annc__img-wrap { - height: 200px; - margin: 0 0 1em 0; - } - .i-annc__title { - font-family: $main-font; - line-height: 1.3; - font-size: 1.2rem; - } +.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; + } } - // Announcement show .s-annc { - .s-annc__show-title { - @extend .unity-title; + .s-annc__show-title { + @extend .unity-title; + } + .s-annc__meta-wrap { + border-bottom: 1px solid $theme-gray-light; + @include clearfix; + .s-annc__meta--item { + font-size: .875rem; + float: left; + margin-right: 1em; + margin-bottom: .6em; + i { + color: darken($theme-gray-light, 10%); + } } - .s-annc__meta-wrap { - border-bottom: 1px solid $theme-gray-light; - @include clearfix; - .s-annc__meta--item { - font-size: 0.875rem; - margin-right: 1em; - margin-bottom: 0.6em; - float: left; - i { - color: darken($theme-gray-light, 10%); - } - } - .s-annc__tag-wrap { - position: relative; - margin-right: 0; - padding-left: 1.6em; - clear: both; - float: none; - i { - position: absolute; - top: 7px; - left: 0; - } - } - .s-annc__tag-wrap { - .s-annc__tag { - font-weight: normal; - } - } + .s-annc__tag-wrap { + position: relative; + float: none; + clear: both; + margin-right: 0; + padding-left: 1.6em; + i { + position: absolute; + top: 7px; + left: 0; + } } - .s-annc__post-wrap { - @include clearfix; - margin-bottom: 2em; + .s-annc__tag-wrap { + .s-annc__tag { + font-weight: normal; + } } - .s-annc__related-wrap { - padding-top: 1em; - border-top: 1px dotted $theme-gray-light; + } + .s-annc__post-wrap { + margin-bottom: 2em; + @include clearfix; + } + .s-annc__related-wrap { + padding-top: 1em; + border-top: 1px dotted $theme-gray-light; + } + .s-annc__related-file { + margin-bottom: 15px; + } + .s-annc__related-file, + .s-annc__related-link { + padding-bottom: 6px; + padding-left: 1.6em; + i { + float: left; + margin: 8px 0 0 -1.6em; + color: darken($theme-gray-light, 10%); } - .s-annc__related-file { - margin-bottom: 15px; - } - .s-annc__related-file, - .s-annc__related-link { - padding-bottom: 6px; - padding-left: 1.6em; - i { - margin: 8px 0 0 -1.6em; - float: left; - color: darken($theme-gray-light, 10%); - } - a { + } + .s-annc__related-link-list, + .s-annc__related-file-list { + display: inline-block; + } + .s-annc__flie-title { + overflow: hidden; + max-width: 9.375rem; + white-space: nowrap; + text-overflow: ellipsis; + } +} +// +// Widget +// +// Admission widget +// ## Gerneral styles for widgets +// Widget-8 +// ## Table +.widget-admission-1 { + .w-adm__th { + font-size: .8125em; + color: $theme-white; + border: 0; + background: $theme-color-main; + } + .w-adm__status { + font-size: .75rem; + display: inline-block; + } + td { + font-size: .8125em; + } + a:hover { + text-decoration: none; + } +} +// ## Table +.widget-admission-1 { + .w-adm__th { + font-size: .8125em; + color: $theme-white; + border: 0; + background: $theme-color-main; + } + .w-adm__status { + font-size: .75rem; + display: inline-block; + } + td { + font-size: .8125em; + } + a:hover { + text-decoration: none; + } +} - } - } - .s-annc__related-link-list, - .s-annc__related-file-list { - display: inline-block; - } - .s-annc__flie-title { - max-width: 9.375rem; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } -} \ No newline at end of file diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss index da62bb5..446566c 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss @@ -7,13 +7,11 @@ @import "base/pagination"; @import "base/orbitbar-override"; @import "base/global"; - // Layout @import "layout/header"; @import "layout/slide"; @import "layout/content"; @import "layout/footer"; - // // Modules @import "modules/menu"; @import "modules/ad_banner"; @@ -24,7 +22,7 @@ @import "modules/archives"; @import "modules/member"; @import "modules/personal_plugin"; - // Widget @import "widget/breadcrumb"; @import "widget/sitemenu"; + diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/breadcrumb.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/breadcrumb.scss index e9a2f78..eb4a2fc 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/breadcrumb.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/breadcrumb.scss @@ -9,4 +9,5 @@ } } } -} \ No newline at end of file +} + diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/sitemenu.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/sitemenu.scss index 693db3f..3cbae28 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/sitemenu.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/widget/sitemenu.scss @@ -1,52 +1,53 @@ .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%); - } - } -} \ No newline at end of file + } +} + diff --git a/app/templates/orbit_bootstrap/modules/active/index.html.erb b/app/templates/orbit_bootstrap/modules/active/index.html.erb index 5bda937..58150a2 100644 --- a/app/templates/orbit_bootstrap/modules/active/index.html.erb +++ b/app/templates/orbit_bootstrap/modules/active/index.html.erb @@ -1,24 +1,27 @@
{{th_category}} | -{{th_act_time_range}} | -{{th_title}} | -{{th_sign_up_time_range}} | -{{th_sign_up}} | -
---|---|---|---|---|
{{category}} | -{{act_start_date}} ~ {{act_end_date}} |
- {{title}} | -{{sign_start_date}} ~ {{sign_end_date}} |
- {{sign_up}} | -
{{th_category}} | +{{th_act_time_range}} | +{{th_title}} | +{{th_sign_up_time_range}} | +{{th_sign_up}} | +
{{category}} | +{{act_start_date}} ~
+ {{act_end_date}} |
+ {{title}} | +{{sign_start_date}} ~
+ {{sign_end_date}} |
+ {{sign_up}} + | +