Add announcement iframe setting.
|
@ -0,0 +1,947 @@
|
||||||
|
//
|
||||||
|
// Mixins
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// Utilities
|
||||||
|
// -------------------------
|
||||||
|
|
||||||
|
// Clearfix
|
||||||
|
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
||||||
|
//
|
||||||
|
// For modern browsers
|
||||||
|
// 1. The space content is one way to avoid an Opera bug when the
|
||||||
|
// contenteditable attribute is included anywhere else in the document.
|
||||||
|
// Otherwise it causes space to appear at the top and bottom of elements
|
||||||
|
// that are clearfixed.
|
||||||
|
// 2. The use of `table` rather than `block` is only necessary if using
|
||||||
|
// `:before` to contain the top-margins of child elements.
|
||||||
|
@mixin clearfix() {
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
content: " "; // 1
|
||||||
|
display: table; // 2
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WebKit-style focus
|
||||||
|
@mixin tab-focus() {
|
||||||
|
// Default
|
||||||
|
outline: thin dotted;
|
||||||
|
// WebKit
|
||||||
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Center-align a block level element
|
||||||
|
@mixin center-block() {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sizing shortcuts
|
||||||
|
@mixin size($width, $height) {
|
||||||
|
width: $width;
|
||||||
|
height: $height;
|
||||||
|
}
|
||||||
|
@mixin square($size) {
|
||||||
|
@include size($size, $size);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Placeholder text
|
||||||
|
@mixin placeholder($color: $input-color-placeholder) {
|
||||||
|
&::-moz-placeholder { color: $color; // Firefox
|
||||||
|
opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
|
||||||
|
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
|
||||||
|
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
|
||||||
|
}
|
||||||
|
|
||||||
|
// Text overflow
|
||||||
|
// Requires inline-block or block for proper styling
|
||||||
|
@mixin text-overflow() {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CSS image replacement
|
||||||
|
//
|
||||||
|
// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
|
||||||
|
// mixins being reused as classes with the same name, this doesn't hold up. As
|
||||||
|
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
|
||||||
|
// that we cannot chain the mixins together in Less, so they are repeated.
|
||||||
|
//
|
||||||
|
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
|
||||||
|
|
||||||
|
// Deprecated as of v3.0.1 (will be removed in v4)
|
||||||
|
@mixin hide-text() {
|
||||||
|
font: #{0/0} a;
|
||||||
|
color: transparent;
|
||||||
|
text-shadow: none;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
// New mixin to use as of v3.0.1
|
||||||
|
@mixin text-hide() {
|
||||||
|
@include hide-text();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// CSS3 PROPERTIES
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
// Single side border-radius
|
||||||
|
@mixin border-top-radius($radius) {
|
||||||
|
border-top-right-radius: $radius;
|
||||||
|
border-top-left-radius: $radius;
|
||||||
|
}
|
||||||
|
@mixin border-right-radius($radius) {
|
||||||
|
border-bottom-right-radius: $radius;
|
||||||
|
border-top-right-radius: $radius;
|
||||||
|
}
|
||||||
|
@mixin border-bottom-radius($radius) {
|
||||||
|
border-bottom-right-radius: $radius;
|
||||||
|
border-bottom-left-radius: $radius;
|
||||||
|
}
|
||||||
|
@mixin border-left-radius($radius) {
|
||||||
|
border-bottom-left-radius: $radius;
|
||||||
|
border-top-left-radius: $radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Drop shadows
|
||||||
|
//
|
||||||
|
// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
|
||||||
|
// supported browsers that have box shadow capabilities now support the
|
||||||
|
// standard `box-shadow` property.
|
||||||
|
@mixin box-shadow($shadow...) {
|
||||||
|
-webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
|
||||||
|
box-shadow: $shadow;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transitions
|
||||||
|
@mixin transition($transition...) {
|
||||||
|
-webkit-transition: $transition;
|
||||||
|
transition: $transition;
|
||||||
|
}
|
||||||
|
@mixin transition-property($transition-property...) {
|
||||||
|
-webkit-transition-property: $transition-property;
|
||||||
|
transition-property: $transition-property;
|
||||||
|
}
|
||||||
|
@mixin transition-delay($transition-delay) {
|
||||||
|
-webkit-transition-delay: $transition-delay;
|
||||||
|
transition-delay: $transition-delay;
|
||||||
|
}
|
||||||
|
@mixin transition-duration($transition-duration...) {
|
||||||
|
-webkit-transition-duration: $transition-duration;
|
||||||
|
transition-duration: $transition-duration;
|
||||||
|
}
|
||||||
|
@mixin transition-transform($transition...) {
|
||||||
|
-webkit-transition: -webkit-transform $transition;
|
||||||
|
-moz-transition: -moz-transform $transition;
|
||||||
|
-o-transition: -o-transform $transition;
|
||||||
|
transition: transform $transition;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transformations
|
||||||
|
@mixin rotate($degrees) {
|
||||||
|
-webkit-transform: rotate($degrees);
|
||||||
|
-ms-transform: rotate($degrees); // IE9 only
|
||||||
|
transform: rotate($degrees);
|
||||||
|
}
|
||||||
|
@mixin scale($scale-args...) {
|
||||||
|
-webkit-transform: scale($scale-args);
|
||||||
|
-ms-transform: scale($scale-args); // IE9 only
|
||||||
|
transform: scale($scale-args);
|
||||||
|
}
|
||||||
|
@mixin translate($x, $y) {
|
||||||
|
-webkit-transform: translate($x, $y);
|
||||||
|
-ms-transform: translate($x, $y); // IE9 only
|
||||||
|
transform: translate($x, $y);
|
||||||
|
}
|
||||||
|
@mixin skew($x, $y) {
|
||||||
|
-webkit-transform: skew($x, $y);
|
||||||
|
-ms-transform: skewX($x) skewY($y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
|
||||||
|
transform: skew($x, $y);
|
||||||
|
}
|
||||||
|
@mixin translate3d($x, $y, $z) {
|
||||||
|
-webkit-transform: translate3d($x, $y, $z);
|
||||||
|
transform: translate3d($x, $y, $z);
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin rotateX($degrees) {
|
||||||
|
-webkit-transform: rotateX($degrees);
|
||||||
|
-ms-transform: rotateX($degrees); // IE9 only
|
||||||
|
transform: rotateX($degrees);
|
||||||
|
}
|
||||||
|
@mixin rotateY($degrees) {
|
||||||
|
-webkit-transform: rotateY($degrees);
|
||||||
|
-ms-transform: rotateY($degrees); // IE9 only
|
||||||
|
transform: rotateY($degrees);
|
||||||
|
}
|
||||||
|
@mixin perspective($perspective) {
|
||||||
|
-webkit-perspective: $perspective;
|
||||||
|
-moz-perspective: $perspective;
|
||||||
|
perspective: $perspective;
|
||||||
|
}
|
||||||
|
@mixin perspective-origin($perspective) {
|
||||||
|
-webkit-perspective-origin: $perspective;
|
||||||
|
-moz-perspective-origin: $perspective;
|
||||||
|
perspective-origin: $perspective;
|
||||||
|
}
|
||||||
|
@mixin transform-origin($origin) {
|
||||||
|
-webkit-transform-origin: $origin;
|
||||||
|
-moz-transform-origin: $origin;
|
||||||
|
-ms-transform-origin: $origin; // IE9 only
|
||||||
|
transform-origin: $origin;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Animations
|
||||||
|
@mixin animation($animation) {
|
||||||
|
-webkit-animation: $animation;
|
||||||
|
animation: $animation;
|
||||||
|
}
|
||||||
|
@mixin animation-name($name) {
|
||||||
|
-webkit-animation-name: $name;
|
||||||
|
animation-name: $name;
|
||||||
|
}
|
||||||
|
@mixin animation-duration($duration) {
|
||||||
|
-webkit-animation-duration: $duration;
|
||||||
|
animation-duration: $duration;
|
||||||
|
}
|
||||||
|
@mixin animation-timing-function($timing-function) {
|
||||||
|
-webkit-animation-timing-function: $timing-function;
|
||||||
|
animation-timing-function: $timing-function;
|
||||||
|
}
|
||||||
|
@mixin animation-delay($delay) {
|
||||||
|
-webkit-animation-delay: $delay;
|
||||||
|
animation-delay: $delay;
|
||||||
|
}
|
||||||
|
@mixin animation-iteration-count($iteration-count) {
|
||||||
|
-webkit-animation-iteration-count: $iteration-count;
|
||||||
|
animation-iteration-count: $iteration-count;
|
||||||
|
}
|
||||||
|
@mixin animation-direction($direction) {
|
||||||
|
-webkit-animation-direction: $direction;
|
||||||
|
animation-direction: $direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Backface visibility
|
||||||
|
// Prevent browsers from flickering when using CSS 3D transforms.
|
||||||
|
// Default value is `visible`, but can be changed to `hidden`
|
||||||
|
@mixin backface-visibility($visibility){
|
||||||
|
-webkit-backface-visibility: $visibility;
|
||||||
|
-moz-backface-visibility: $visibility;
|
||||||
|
backface-visibility: $visibility;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Box sizing
|
||||||
|
@mixin box-sizing($boxmodel) {
|
||||||
|
-webkit-box-sizing: $boxmodel;
|
||||||
|
-moz-box-sizing: $boxmodel;
|
||||||
|
box-sizing: $boxmodel;
|
||||||
|
}
|
||||||
|
|
||||||
|
// User select
|
||||||
|
// For selecting text on the page
|
||||||
|
@mixin user-select($select) {
|
||||||
|
-webkit-user-select: $select;
|
||||||
|
-moz-user-select: $select;
|
||||||
|
-ms-user-select: $select; // IE10+
|
||||||
|
user-select: $select;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resize anything
|
||||||
|
@mixin resizable($direction) {
|
||||||
|
resize: $direction; // Options: horizontal, vertical, both
|
||||||
|
overflow: auto; // Safari fix
|
||||||
|
}
|
||||||
|
|
||||||
|
// CSS3 Content Columns
|
||||||
|
@mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
|
||||||
|
-webkit-column-count: $column-count;
|
||||||
|
-moz-column-count: $column-count;
|
||||||
|
column-count: $column-count;
|
||||||
|
-webkit-column-gap: $column-gap;
|
||||||
|
-moz-column-gap: $column-gap;
|
||||||
|
column-gap: $column-gap;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional hyphenation
|
||||||
|
@mixin hyphens($mode: auto) {
|
||||||
|
word-wrap: break-word;
|
||||||
|
-webkit-hyphens: $mode;
|
||||||
|
-moz-hyphens: $mode;
|
||||||
|
-ms-hyphens: $mode; // IE10+
|
||||||
|
-o-hyphens: $mode;
|
||||||
|
hyphens: $mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Opacity
|
||||||
|
@mixin opacity($opacity) {
|
||||||
|
opacity: $opacity;
|
||||||
|
// IE8 filter
|
||||||
|
$opacity-ie: ($opacity * 100);
|
||||||
|
filter: #{alpha(opacity=$opacity-ie)};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// GRADIENTS
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Horizontal gradient, from left to right
|
||||||
|
//
|
||||||
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||||
|
// Color stops are not available in IE9 and below.
|
||||||
|
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
||||||
|
background-image: -webkit-linear-gradient(left, color-stop($start-color $start-percent), color-stop($end-color $end-percent)); // Safari 5.1-6, Chrome 10+
|
||||||
|
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vertical gradient, from top to bottom
|
||||||
|
//
|
||||||
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||||
|
// Color stops are not available in IE9 and below.
|
||||||
|
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
||||||
|
background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
||||||
|
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
|
||||||
|
background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
||||||
|
}
|
||||||
|
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
||||||
|
background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
|
||||||
|
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
|
||||||
|
}
|
||||||
|
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
||||||
|
background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
||||||
|
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
|
||||||
|
}
|
||||||
|
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
|
||||||
|
background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
|
||||||
|
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
|
||||||
|
background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset filters for IE
|
||||||
|
//
|
||||||
|
// When you need to remove a gradient background, do not forget to use this to reset
|
||||||
|
// the IE filter for IE9 and below.
|
||||||
|
@mixin reset-filter() {
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Retina images
|
||||||
|
//
|
||||||
|
// Short retina mixin for setting background-image and -size
|
||||||
|
|
||||||
|
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
|
||||||
|
background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
|
||||||
|
|
||||||
|
@media
|
||||||
|
only screen and (-webkit-min-device-pixel-ratio: 2),
|
||||||
|
only screen and ( min--moz-device-pixel-ratio: 2),
|
||||||
|
only screen and ( -o-min-device-pixel-ratio: 2/1),
|
||||||
|
only screen and ( min-device-pixel-ratio: 2),
|
||||||
|
only screen and ( min-resolution: 192dpi),
|
||||||
|
only screen and ( min-resolution: 2dppx) {
|
||||||
|
background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
|
||||||
|
background-size: $width-1x $height-1x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Responsive image
|
||||||
|
//
|
||||||
|
// Keep images from scaling beyond the width of their parents.
|
||||||
|
|
||||||
|
@mixin img-responsive($display: block) {
|
||||||
|
display: $display;
|
||||||
|
max-width: 100%; // Part 1: Set a maximum relative to the parent
|
||||||
|
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// COMPONENT MIXINS
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
// Horizontal dividers
|
||||||
|
// -------------------------
|
||||||
|
// Dividers (basically an hr) within dropdowns and nav lists
|
||||||
|
@mixin nav-divider($color: #e5e5e5) {
|
||||||
|
height: 1px;
|
||||||
|
margin: (($line-height-computed / 2) - 1) 0;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: $color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Panels
|
||||||
|
// -------------------------
|
||||||
|
@mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
|
||||||
|
border-color: $border;
|
||||||
|
|
||||||
|
& > .panel-heading {
|
||||||
|
color: $heading-text-color;
|
||||||
|
background-color: $heading-bg-color;
|
||||||
|
border-color: $heading-border;
|
||||||
|
|
||||||
|
+ .panel-collapse .panel-body {
|
||||||
|
border-top-color: $border;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > .panel-footer {
|
||||||
|
+ .panel-collapse .panel-body {
|
||||||
|
border-bottom-color: $border;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Alerts
|
||||||
|
// -------------------------
|
||||||
|
@mixin alert-variant($background, $border, $text-color) {
|
||||||
|
background-color: $background;
|
||||||
|
border-color: $border;
|
||||||
|
color: $text-color;
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top-color: darken($border, 5%);
|
||||||
|
}
|
||||||
|
.alert-link {
|
||||||
|
color: darken($text-color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tables
|
||||||
|
// -------------------------
|
||||||
|
@mixin table-row-variant($state, $background) {
|
||||||
|
// Exact selectors below required to override `.table-striped` and prevent
|
||||||
|
// inheritance to nested tables.
|
||||||
|
.table > thead > tr,
|
||||||
|
.table > tbody > tr,
|
||||||
|
.table > tfoot > tr {
|
||||||
|
> td.#{$state},
|
||||||
|
> th.#{$state},
|
||||||
|
&.#{$state} > td,
|
||||||
|
&.#{$state} > th {
|
||||||
|
background-color: $background;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hover states for `.table-hover`
|
||||||
|
// Note: this is not available for cells or rows within `thead` or `tfoot`.
|
||||||
|
.table-hover > tbody > tr {
|
||||||
|
> td.#{$state}:hover,
|
||||||
|
> th.#{$state}:hover,
|
||||||
|
&.#{$state}:hover > td,
|
||||||
|
&.#{$state}:hover > th {
|
||||||
|
background-color: darken($background, 5%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List Groups
|
||||||
|
// -------------------------
|
||||||
|
@mixin list-group-item-variant($state, $background, $color) {
|
||||||
|
.list-group-item-#{$state} {
|
||||||
|
color: $color;
|
||||||
|
background-color: $background;
|
||||||
|
|
||||||
|
// [converter] extracted a& to a.list-group-item-#{$state}
|
||||||
|
}
|
||||||
|
|
||||||
|
a.list-group-item-#{$state} {
|
||||||
|
color: $color;
|
||||||
|
|
||||||
|
.list-group-item-heading { color: inherit; }
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: $color;
|
||||||
|
background-color: darken($background, 5%);
|
||||||
|
}
|
||||||
|
&.active,
|
||||||
|
&.active:hover,
|
||||||
|
&.active:focus {
|
||||||
|
color: #fff;
|
||||||
|
background-color: $color;
|
||||||
|
border-color: $color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Button variants
|
||||||
|
// -------------------------
|
||||||
|
// Easily pump out default styles, as well as :hover, :focus, :active,
|
||||||
|
// and disabled options for all buttons
|
||||||
|
@mixin button-variant($color, $background, $border) {
|
||||||
|
color: $color;
|
||||||
|
background-color: $background;
|
||||||
|
border-color: $border;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&:active,
|
||||||
|
&.active {
|
||||||
|
color: $color;
|
||||||
|
background-color: darken($background, 8%);
|
||||||
|
border-color: darken($border, 12%);
|
||||||
|
}
|
||||||
|
.open & { &.dropdown-toggle {
|
||||||
|
color: $color;
|
||||||
|
background-color: darken($background, 8%);
|
||||||
|
border-color: darken($border, 12%);
|
||||||
|
} }
|
||||||
|
&:active,
|
||||||
|
&.active {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.open & { &.dropdown-toggle {
|
||||||
|
background-image: none;
|
||||||
|
} }
|
||||||
|
&.disabled,
|
||||||
|
&[disabled],
|
||||||
|
fieldset[disabled] & {
|
||||||
|
&,
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&:active,
|
||||||
|
&.active {
|
||||||
|
background-color: $background;
|
||||||
|
border-color: $border;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
color: $background;
|
||||||
|
background-color: $color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Button sizes
|
||||||
|
// -------------------------
|
||||||
|
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
||||||
|
padding: $padding-vertical $padding-horizontal;
|
||||||
|
font-size: $font-size;
|
||||||
|
line-height: $line-height;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pagination
|
||||||
|
// -------------------------
|
||||||
|
@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
|
||||||
|
> li {
|
||||||
|
> a,
|
||||||
|
> span {
|
||||||
|
padding: $padding-vertical $padding-horizontal;
|
||||||
|
font-size: $font-size;
|
||||||
|
}
|
||||||
|
&:first-child {
|
||||||
|
> a,
|
||||||
|
> span {
|
||||||
|
@include border-left-radius($border-radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
> a,
|
||||||
|
> span {
|
||||||
|
@include border-right-radius($border-radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Labels
|
||||||
|
// -------------------------
|
||||||
|
@mixin label-variant($color) {
|
||||||
|
background-color: $color;
|
||||||
|
&[href] {
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background-color: darken($color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contextual backgrounds
|
||||||
|
// -------------------------
|
||||||
|
// [converter] $parent hack
|
||||||
|
@mixin bg-variant($parent, $color) {
|
||||||
|
#{$parent} {
|
||||||
|
background-color: $color;
|
||||||
|
}
|
||||||
|
a#{$parent}:hover {
|
||||||
|
background-color: darken($color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Typography
|
||||||
|
// -------------------------
|
||||||
|
// [converter] $parent hack
|
||||||
|
@mixin text-emphasis-variant($parent, $color) {
|
||||||
|
#{$parent} {
|
||||||
|
color: $color;
|
||||||
|
}
|
||||||
|
a#{$parent}:hover {
|
||||||
|
color: darken($color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Navbar vertical align
|
||||||
|
// -------------------------
|
||||||
|
// Vertically center elements in the navbar.
|
||||||
|
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
|
||||||
|
@mixin navbar-vertical-align($element-height) {
|
||||||
|
margin-top: (($navbar-height - $element-height) / 2);
|
||||||
|
margin-bottom: (($navbar-height - $element-height) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Progress bars
|
||||||
|
// -------------------------
|
||||||
|
@mixin progress-bar-variant($color) {
|
||||||
|
background-color: $color;
|
||||||
|
.progress-striped & {
|
||||||
|
@include gradient-striped();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Responsive utilities
|
||||||
|
// -------------------------
|
||||||
|
// More easily include all the states for responsive-utilities.less.
|
||||||
|
// [converter] $parent hack
|
||||||
|
@mixin responsive-visibility($parent) {
|
||||||
|
#{$parent} {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
table#{$parent} { display: table; }
|
||||||
|
tr#{$parent} { display: table-row !important; }
|
||||||
|
th#{$parent},
|
||||||
|
td#{$parent} { display: table-cell !important; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// [converter] $parent hack
|
||||||
|
@mixin responsive-invisibility($parent) {
|
||||||
|
#{$parent} {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Grid System
|
||||||
|
// -----------
|
||||||
|
|
||||||
|
// Centered container element
|
||||||
|
@mixin container-fixed() {
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
padding-left: ($grid-gutter-width / 2);
|
||||||
|
padding-right: ($grid-gutter-width / 2);
|
||||||
|
@include clearfix();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a wrapper for a series of columns
|
||||||
|
@mixin make-row($gutter: $grid-gutter-width) {
|
||||||
|
margin-left: ($gutter / -2);
|
||||||
|
margin-right: ($gutter / -2);
|
||||||
|
@include clearfix();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate the extra small columns
|
||||||
|
@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
|
||||||
|
position: relative;
|
||||||
|
float: left;
|
||||||
|
width: percentage(($columns / $grid-columns));
|
||||||
|
min-height: 1px;
|
||||||
|
padding-left: ($gutter / 2);
|
||||||
|
padding-right: ($gutter / 2);
|
||||||
|
}
|
||||||
|
@mixin make-xs-column-offset($columns) {
|
||||||
|
@media (min-width: $screen-xs-min) {
|
||||||
|
margin-left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-xs-column-push($columns) {
|
||||||
|
@media (min-width: $screen-xs-min) {
|
||||||
|
left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-xs-column-pull($columns) {
|
||||||
|
@media (min-width: $screen-xs-min) {
|
||||||
|
right: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Generate the small columns
|
||||||
|
@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
|
||||||
|
position: relative;
|
||||||
|
min-height: 1px;
|
||||||
|
padding-left: ($gutter / 2);
|
||||||
|
padding-right: ($gutter / 2);
|
||||||
|
|
||||||
|
@media (min-width: $screen-sm-min) {
|
||||||
|
float: left;
|
||||||
|
width: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-sm-column-offset($columns) {
|
||||||
|
@media (min-width: $screen-sm-min) {
|
||||||
|
margin-left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-sm-column-push($columns) {
|
||||||
|
@media (min-width: $screen-sm-min) {
|
||||||
|
left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-sm-column-pull($columns) {
|
||||||
|
@media (min-width: $screen-sm-min) {
|
||||||
|
right: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Generate the medium columns
|
||||||
|
@mixin make-md-column($columns, $gutter: $grid-gutter-width) {
|
||||||
|
position: relative;
|
||||||
|
min-height: 1px;
|
||||||
|
padding-left: ($gutter / 2);
|
||||||
|
padding-right: ($gutter / 2);
|
||||||
|
|
||||||
|
@media (min-width: $screen-md-min) {
|
||||||
|
float: left;
|
||||||
|
width: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-md-column-offset($columns) {
|
||||||
|
@media (min-width: $screen-md-min) {
|
||||||
|
margin-left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-md-column-push($columns) {
|
||||||
|
@media (min-width: $screen-md-min) {
|
||||||
|
left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-md-column-pull($columns) {
|
||||||
|
@media (min-width: $screen-md-min) {
|
||||||
|
right: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Generate the large columns
|
||||||
|
@mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
|
||||||
|
position: relative;
|
||||||
|
min-height: 1px;
|
||||||
|
padding-left: ($gutter / 2);
|
||||||
|
padding-right: ($gutter / 2);
|
||||||
|
|
||||||
|
@media (min-width: $screen-lg-min) {
|
||||||
|
float: left;
|
||||||
|
width: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-lg-column-offset($columns) {
|
||||||
|
@media (min-width: $screen-lg-min) {
|
||||||
|
margin-left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-lg-column-push($columns) {
|
||||||
|
@media (min-width: $screen-lg-min) {
|
||||||
|
left: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin make-lg-column-pull($columns) {
|
||||||
|
@media (min-width: $screen-lg-min) {
|
||||||
|
right: percentage(($columns / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Framework grid generation
|
||||||
|
//
|
||||||
|
// Used only by Bootstrap to generate the correct number of grid classes given
|
||||||
|
// any value of `$grid-columns`.
|
||||||
|
|
||||||
|
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
||||||
|
@mixin make-grid-columns() {
|
||||||
|
$list: '';
|
||||||
|
$i: 1;
|
||||||
|
$list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
|
||||||
|
@for $i from (1 + 1) through $grid-columns {
|
||||||
|
$list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
|
||||||
|
}
|
||||||
|
#{$list} {
|
||||||
|
position: relative;
|
||||||
|
// Prevent columns from collapsing when empty
|
||||||
|
min-height: 1px;
|
||||||
|
// Inner gutter via padding
|
||||||
|
padding-left: ($grid-gutter-width / 2);
|
||||||
|
padding-right: ($grid-gutter-width / 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
||||||
|
@mixin float-grid-columns($class) {
|
||||||
|
$list: '';
|
||||||
|
$i: 1;
|
||||||
|
$list: ".col-#{$class}-#{$i}";
|
||||||
|
@for $i from (1 + 1) through $grid-columns {
|
||||||
|
$list: "#{$list}, .col-#{$class}-#{$i}";
|
||||||
|
}
|
||||||
|
#{$list} {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@mixin calc-grid-column($index, $class, $type) {
|
||||||
|
@if ($type == width) and ($index > 0) {
|
||||||
|
.col-#{$class}-#{$index} {
|
||||||
|
width: percentage(($index / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@if ($type == push) {
|
||||||
|
.col-#{$class}-push-#{$index} {
|
||||||
|
left: percentage(($index / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@if ($type == pull) {
|
||||||
|
.col-#{$class}-pull-#{$index} {
|
||||||
|
right: percentage(($index / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@if ($type == offset) {
|
||||||
|
.col-#{$class}-offset-#{$index} {
|
||||||
|
margin-left: percentage(($index / $grid-columns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// [converter] This is defined recursively in LESS, but Sass supports real loops
|
||||||
|
@mixin loop-grid-columns($columns, $class, $type) {
|
||||||
|
@for $i from 0 through $columns {
|
||||||
|
@include calc-grid-column($i, $class, $type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Create grid for specific class
|
||||||
|
@mixin make-grid($class) {
|
||||||
|
@include float-grid-columns($class);
|
||||||
|
@include loop-grid-columns($grid-columns, $class, width);
|
||||||
|
@include loop-grid-columns($grid-columns, $class, pull);
|
||||||
|
@include loop-grid-columns($grid-columns, $class, push);
|
||||||
|
@include loop-grid-columns($grid-columns, $class, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Form validation states
|
||||||
|
//
|
||||||
|
// Used in forms.less to generate the form validation CSS for warnings, errors,
|
||||||
|
// and successes.
|
||||||
|
|
||||||
|
@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
|
||||||
|
// Color the label and help text
|
||||||
|
.help-block,
|
||||||
|
.control-label,
|
||||||
|
.radio,
|
||||||
|
.checkbox,
|
||||||
|
.radio-inline,
|
||||||
|
.checkbox-inline {
|
||||||
|
color: $text-color;
|
||||||
|
}
|
||||||
|
// Set the border and box shadow on specific inputs to match
|
||||||
|
.form-control {
|
||||||
|
border-color: $border-color;
|
||||||
|
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
|
||||||
|
&:focus {
|
||||||
|
border-color: darken($border-color, 10%);
|
||||||
|
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
|
||||||
|
@include box-shadow($shadow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Set validation states also for addons
|
||||||
|
.input-group-addon {
|
||||||
|
color: $text-color;
|
||||||
|
border-color: $border-color;
|
||||||
|
background-color: $background-color;
|
||||||
|
}
|
||||||
|
// Optional feedback icon
|
||||||
|
.form-control-feedback {
|
||||||
|
color: $text-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Form control focus state
|
||||||
|
//
|
||||||
|
// Generate a customized focus state and for any input with the specified color,
|
||||||
|
// which defaults to the `$input-focus-border` variable.
|
||||||
|
//
|
||||||
|
// We highly encourage you to not customize the default value, but instead use
|
||||||
|
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
||||||
|
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
||||||
|
// usability and accessibility should be taken into account with any change.
|
||||||
|
//
|
||||||
|
// Example usage: change the default blue border and shadow to white for better
|
||||||
|
// contrast against a dark gray background.
|
||||||
|
|
||||||
|
@mixin form-control-focus($color: $input-border-focus) {
|
||||||
|
$color-rgba: rgba(red($color), green($color), blue($color), .6);
|
||||||
|
&:focus {
|
||||||
|
border-color: $color;
|
||||||
|
outline: 0;
|
||||||
|
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Form control sizing
|
||||||
|
//
|
||||||
|
// Relative text size, padding, and border-radii changes for form controls. For
|
||||||
|
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
|
||||||
|
// element gets special love because it's special, and that's a fact!
|
||||||
|
|
||||||
|
// [converter] $parent hack
|
||||||
|
@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
||||||
|
#{$parent} {
|
||||||
|
height: $input-height;
|
||||||
|
padding: $padding-vertical $padding-horizontal;
|
||||||
|
font-size: $font-size;
|
||||||
|
line-height: $line-height;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
select#{$parent} {
|
||||||
|
height: $input-height;
|
||||||
|
line-height: $input-height;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea#{$parent},
|
||||||
|
select[multiple]#{$parent} {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,833 @@
|
||||||
|
// a flag to toggle asset pipeline / compass integration
|
||||||
|
// defaults to true if twbs-font-path function is present (no function => twbs-font-path('') parsed as string == right side)
|
||||||
|
// in Sass 3.3 this can be improved with: function-exists(twbs-font-path)
|
||||||
|
$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default;
|
||||||
|
//
|
||||||
|
// Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
//== Colors
|
||||||
|
//
|
||||||
|
//## Gray and brand colors for use across Bootstrap.
|
||||||
|
|
||||||
|
$gray-darker: lighten(#000, 13.5%) !default; // #222
|
||||||
|
$gray-dark: lighten(#000, 20%) !default; // #333
|
||||||
|
$gray: lighten(#000, 33.5%) !default; // #555
|
||||||
|
$gray-light: lighten(#000, 60%) !default; // #999
|
||||||
|
$gray-lighter: lighten(#000, 93.5%) !default; // #eee
|
||||||
|
|
||||||
|
$brand-primary: #47bab5 !default;
|
||||||
|
$brand-success: #5cb85c !default;
|
||||||
|
$brand-info: #5bc0de !default;
|
||||||
|
$brand-warning: #f0ad4e !default;
|
||||||
|
$brand-danger: #ed4c43 !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Scaffolding
|
||||||
|
//
|
||||||
|
// ## Settings for some of the most global styles.
|
||||||
|
|
||||||
|
//** Background color for `<body>`.
|
||||||
|
$body-bg: #fff !default;
|
||||||
|
//** Global text color on `<body>`.
|
||||||
|
$text-color: $gray-dark !default;
|
||||||
|
|
||||||
|
//** Global textual link color.
|
||||||
|
$link-color: $brand-primary !default;
|
||||||
|
//** Link hover color set via `darken()` function.
|
||||||
|
$link-hover-color: darken($link-color, 15%) !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Typography
|
||||||
|
//
|
||||||
|
//## Font, line-height, and color for body text, headings, and more.
|
||||||
|
|
||||||
|
$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
|
||||||
|
$font-family-serif: Georgia, "Times New Roman", Times, serif !default;
|
||||||
|
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
|
||||||
|
$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
|
||||||
|
$font-family-base: $font-family-sans-serif !default;
|
||||||
|
|
||||||
|
$font-size-base: 14px !default;
|
||||||
|
$font-size-large: ceil(($font-size-base * 1.25)) !default; // ~18px
|
||||||
|
$font-size-small: ceil(($font-size-base * 0.85)) !default; // ~12px
|
||||||
|
|
||||||
|
$font-size-h1: floor(($font-size-base * 2.6)) !default; // ~36px
|
||||||
|
$font-size-h2: floor(($font-size-base * 2.15)) !default; // ~30px
|
||||||
|
$font-size-h3: ceil(($font-size-base * 1.7)) !default; // ~24px
|
||||||
|
$font-size-h4: ceil(($font-size-base * 1.25)) !default; // ~18px
|
||||||
|
$font-size-h5: $font-size-base !default;
|
||||||
|
$font-size-h6: ceil(($font-size-base * 0.85)) !default; // ~12px
|
||||||
|
|
||||||
|
//** Unit-less `line-height` for use in components like buttons.
|
||||||
|
$line-height-base: 1.428571429 !default; // 20/14
|
||||||
|
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
|
||||||
|
$line-height-computed: floor(($font-size-base * $line-height-base)) !default; // ~20px
|
||||||
|
|
||||||
|
//** By default, this inherits from the `<body>`.
|
||||||
|
$headings-font-family: inherit !default;
|
||||||
|
$headings-font-weight: 500 !default;
|
||||||
|
$headings-line-height: 1.1 !default;
|
||||||
|
$headings-color: inherit !default;
|
||||||
|
|
||||||
|
|
||||||
|
//-- Iconography
|
||||||
|
//
|
||||||
|
//## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.
|
||||||
|
|
||||||
|
$icon-font-path: "bootstrap/" !default;
|
||||||
|
$icon-font-name: "glyphicons-halflings-regular" !default;
|
||||||
|
$icon-font-svg-id: "glyphicons_halflingsregular" !default;
|
||||||
|
|
||||||
|
//== Components
|
||||||
|
//
|
||||||
|
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
|
||||||
|
|
||||||
|
$padding-base-vertical: 6px !default;
|
||||||
|
$padding-base-horizontal: 12px !default;
|
||||||
|
|
||||||
|
$padding-large-vertical: 10px !default;
|
||||||
|
$padding-large-horizontal: 16px !default;
|
||||||
|
|
||||||
|
$padding-small-vertical: 5px !default;
|
||||||
|
$padding-small-horizontal: 10px !default;
|
||||||
|
|
||||||
|
$padding-xs-vertical: 1px !default;
|
||||||
|
$padding-xs-horizontal: 5px !default;
|
||||||
|
|
||||||
|
$line-height-large: 1.33 !default;
|
||||||
|
$line-height-small: 1.5 !default;
|
||||||
|
|
||||||
|
$border-radius-base: 4px !default;
|
||||||
|
$border-radius-large: 6px !default;
|
||||||
|
$border-radius-small: 3px !default;
|
||||||
|
|
||||||
|
//** Global color for active items (e.g., navs or dropdowns).
|
||||||
|
$component-active-color: #fff !default;
|
||||||
|
//** Global background color for active items (e.g., navs or dropdowns).
|
||||||
|
$component-active-bg: $brand-primary !default;
|
||||||
|
|
||||||
|
//** Width of the `border` for generating carets that indicator dropdowns.
|
||||||
|
$caret-width-base: 4px !default;
|
||||||
|
//** Carets increase slightly in size for larger components.
|
||||||
|
$caret-width-large: 5px !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Tables
|
||||||
|
//
|
||||||
|
//## Customizes the `.table` component with basic values, each used across all table variations.
|
||||||
|
|
||||||
|
//** Padding for `<th>`s and `<td>`s.
|
||||||
|
$table-cell-padding: 8px !default;
|
||||||
|
//** Padding for cells in `.table-condensed`.
|
||||||
|
$table-condensed-cell-padding: 5px !default;
|
||||||
|
|
||||||
|
//** Default background color used for all tables.
|
||||||
|
$table-bg: transparent !default;
|
||||||
|
//** Background color used for `.table-striped`.
|
||||||
|
$table-bg-accent: #f9f9f9 !default;
|
||||||
|
//** Background color used for `.table-hover`.
|
||||||
|
$table-bg-hover: #f5f5f5 !default;
|
||||||
|
$table-bg-active: $table-bg-hover !default;
|
||||||
|
|
||||||
|
//** Border color for table and cell borders.
|
||||||
|
$table-border-color: #ddd !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Buttons
|
||||||
|
//
|
||||||
|
//## For each of Bootstrap's buttons, define text, background and border color.
|
||||||
|
|
||||||
|
$btn-font-weight: normal !default;
|
||||||
|
|
||||||
|
$btn-default-color: #333 !default;
|
||||||
|
$btn-default-bg: #fff !default;
|
||||||
|
$btn-default-border: #ccc !default;
|
||||||
|
|
||||||
|
$btn-primary-color: #fff !default;
|
||||||
|
$btn-primary-bg: $brand-primary !default;
|
||||||
|
$btn-primary-border: darken($btn-primary-bg, 5%) !default;
|
||||||
|
|
||||||
|
$btn-success-color: #fff !default;
|
||||||
|
$btn-success-bg: $brand-success !default;
|
||||||
|
$btn-success-border: darken($btn-success-bg, 5%) !default;
|
||||||
|
|
||||||
|
$btn-info-color: #fff !default;
|
||||||
|
$btn-info-bg: $brand-info !default;
|
||||||
|
$btn-info-border: darken($btn-info-bg, 5%) !default;
|
||||||
|
|
||||||
|
$btn-warning-color: #fff !default;
|
||||||
|
$btn-warning-bg: $brand-warning !default;
|
||||||
|
$btn-warning-border: darken($btn-warning-bg, 5%) !default;
|
||||||
|
|
||||||
|
$btn-danger-color: #fff !default;
|
||||||
|
$btn-danger-bg: $brand-danger !default;
|
||||||
|
$btn-danger-border: darken($btn-danger-bg, 5%) !default;
|
||||||
|
|
||||||
|
$btn-link-disabled-color: $gray-light !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Forms
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** `<input>` background color
|
||||||
|
$input-bg: #fff !default;
|
||||||
|
//** `<input disabled>` background color
|
||||||
|
$input-bg-disabled: $gray-lighter !default;
|
||||||
|
|
||||||
|
//** Text color for `<input>`s
|
||||||
|
$input-color: $gray !default;
|
||||||
|
//** `<input>` border color
|
||||||
|
$input-border: #ccc !default;
|
||||||
|
//** `<input>` border radius
|
||||||
|
$input-border-radius: $border-radius-base !default;
|
||||||
|
//** Border color for inputs on focus
|
||||||
|
$input-border-focus: #66afe9 !default;
|
||||||
|
|
||||||
|
//** Placeholder text color
|
||||||
|
$input-color-placeholder: $gray-light !default;
|
||||||
|
|
||||||
|
//** Default `.form-control` height
|
||||||
|
$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
|
||||||
|
//** Large `.form-control` height
|
||||||
|
$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
|
||||||
|
//** Small `.form-control` height
|
||||||
|
$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
|
||||||
|
|
||||||
|
$legend-color: $gray-dark !default;
|
||||||
|
$legend-border-color: #e5e5e5 !default;
|
||||||
|
|
||||||
|
//** Background color for textual input addons
|
||||||
|
$input-group-addon-bg: $gray-lighter !default;
|
||||||
|
//** Border color for textual input addons
|
||||||
|
$input-group-addon-border-color: $input-border !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Dropdowns
|
||||||
|
//
|
||||||
|
//## Dropdown menu container and contents.
|
||||||
|
|
||||||
|
//** Background for the dropdown menu.
|
||||||
|
$dropdown-bg: #fff !default;
|
||||||
|
//** Dropdown menu `border-color`.
|
||||||
|
$dropdown-border: rgba(0,0,0,.15) !default;
|
||||||
|
//** Dropdown menu `border-color` **for IE8**.
|
||||||
|
$dropdown-fallback-border: #ccc !default;
|
||||||
|
//** Divider color for between dropdown items.
|
||||||
|
$dropdown-divider-bg: #e5e5e5 !default;
|
||||||
|
|
||||||
|
//** Dropdown link text color.
|
||||||
|
$dropdown-link-color: $gray-dark !default;
|
||||||
|
//** Hover color for dropdown links.
|
||||||
|
$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
|
||||||
|
//** Hover background for dropdown links.
|
||||||
|
$dropdown-link-hover-bg: #f5f5f5 !default;
|
||||||
|
|
||||||
|
//** Active dropdown menu item text color.
|
||||||
|
$dropdown-link-active-color: $component-active-color !default;
|
||||||
|
//** Active dropdown menu item background color.
|
||||||
|
$dropdown-link-active-bg: $component-active-bg !default;
|
||||||
|
|
||||||
|
//** Disabled dropdown menu item background color.
|
||||||
|
$dropdown-link-disabled-color: $gray-light !default;
|
||||||
|
|
||||||
|
//** Text color for headers within dropdown menus.
|
||||||
|
$dropdown-header-color: $gray-light !default;
|
||||||
|
|
||||||
|
// Note: Deprecated $dropdown-caret-color as of v3.1.0
|
||||||
|
$dropdown-caret-color: #000 !default;
|
||||||
|
|
||||||
|
|
||||||
|
//-- Z-index master list
|
||||||
|
//
|
||||||
|
// Warning: Avoid customizing these values. They're used for a bird's eye view
|
||||||
|
// of components dependent on the z-axis and are designed to all work together.
|
||||||
|
//
|
||||||
|
// Note: These variables are not generated into the Customizer.
|
||||||
|
|
||||||
|
$zindex-navbar: 1000 !default;
|
||||||
|
$zindex-dropdown: 1000 !default;
|
||||||
|
$zindex-popover: 1010 !default;
|
||||||
|
$zindex-tooltip: 1030 !default;
|
||||||
|
$zindex-navbar-fixed: 1030 !default;
|
||||||
|
$zindex-modal-background: 1040 !default;
|
||||||
|
$zindex-modal: 1050 !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Media queries breakpoints
|
||||||
|
//
|
||||||
|
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
|
||||||
|
|
||||||
|
// Extra small screen / phone
|
||||||
|
// Note: Deprecated $screen-xs and $screen-phone as of v3.0.1
|
||||||
|
$screen-xs: 480px !default;
|
||||||
|
$screen-xs-min: $screen-xs !default;
|
||||||
|
$screen-phone: $screen-xs-min !default;
|
||||||
|
|
||||||
|
// Small screen / tablet
|
||||||
|
// Note: Deprecated $screen-sm and $screen-tablet as of v3.0.1
|
||||||
|
$screen-sm: 768px !default;
|
||||||
|
$screen-sm-min: $screen-sm !default;
|
||||||
|
$screen-tablet: $screen-sm-min !default;
|
||||||
|
|
||||||
|
// Medium screen / desktop
|
||||||
|
// Note: Deprecated $screen-md and $screen-desktop as of v3.0.1
|
||||||
|
$screen-md: 992px !default;
|
||||||
|
$screen-md-min: $screen-md !default;
|
||||||
|
$screen-desktop: $screen-md-min !default;
|
||||||
|
|
||||||
|
// Large screen / wide desktop
|
||||||
|
// Note: Deprecated $screen-lg and $screen-lg-desktop as of v3.0.1
|
||||||
|
$screen-lg: 1200px !default;
|
||||||
|
$screen-lg-min: $screen-lg !default;
|
||||||
|
$screen-lg-desktop: $screen-lg-min !default;
|
||||||
|
|
||||||
|
// So media queries don't overlap when required, provide a maximum
|
||||||
|
$screen-xs-max: ($screen-sm-min - 1) !default;
|
||||||
|
$screen-sm-max: ($screen-md-min - 1) !default;
|
||||||
|
$screen-md-max: ($screen-lg-min - 1) !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Grid system
|
||||||
|
//
|
||||||
|
//## Define your custom responsive grid.
|
||||||
|
|
||||||
|
//** Number of columns in the grid.
|
||||||
|
$grid-columns: 12 !default;
|
||||||
|
//** Padding between columns. Gets divided in half for the left and right.
|
||||||
|
$grid-gutter-width: 30px !default;
|
||||||
|
// Navbar collapse
|
||||||
|
//** Point at which the navbar becomes uncollapsed.
|
||||||
|
$grid-float-breakpoint: $screen-sm-min !default;
|
||||||
|
//** Point at which the navbar begins collapsing.
|
||||||
|
$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Container sizes
|
||||||
|
//
|
||||||
|
//## Define the maximum width of `.container` for different screen sizes.
|
||||||
|
|
||||||
|
// Small screen / tablet
|
||||||
|
$container-tablet: ((720px + $grid-gutter-width)) !default;
|
||||||
|
//** For `$screen-sm-min` and up.
|
||||||
|
$container-sm: $container-tablet !default;
|
||||||
|
|
||||||
|
// Medium screen / desktop
|
||||||
|
$container-desktop: ((940px + $grid-gutter-width)) !default;
|
||||||
|
//** For `$screen-md-min` and up.
|
||||||
|
$container-md: $container-desktop !default;
|
||||||
|
|
||||||
|
// Large screen / wide desktop
|
||||||
|
$container-large-desktop: ((1140px + $grid-gutter-width)) !default;
|
||||||
|
//** For `$screen-lg-min` and up.
|
||||||
|
$container-lg: $container-large-desktop !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Navbar
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
// Basics of a navbar
|
||||||
|
$navbar-height: 50px !default;
|
||||||
|
$navbar-margin-bottom: $line-height-computed !default;
|
||||||
|
$navbar-border-radius: $border-radius-base !default;
|
||||||
|
$navbar-padding-horizontal: floor(($grid-gutter-width / 2)) !default;
|
||||||
|
$navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2) !default;
|
||||||
|
$navbar-collapse-max-height: 340px !default;
|
||||||
|
|
||||||
|
$navbar-default-color: #777 !default;
|
||||||
|
$navbar-default-bg: #f8f8f8 !default;
|
||||||
|
$navbar-default-border: darken($navbar-default-bg, 6.5%) !default;
|
||||||
|
|
||||||
|
// Navbar links
|
||||||
|
$navbar-default-link-color: #777 !default;
|
||||||
|
$navbar-default-link-hover-color: #333 !default;
|
||||||
|
$navbar-default-link-hover-bg: transparent !default;
|
||||||
|
$navbar-default-link-active-color: #555 !default;
|
||||||
|
$navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%) !default;
|
||||||
|
$navbar-default-link-disabled-color: #ccc !default;
|
||||||
|
$navbar-default-link-disabled-bg: transparent !default;
|
||||||
|
|
||||||
|
// Navbar brand label
|
||||||
|
$navbar-default-brand-color: $navbar-default-link-color !default;
|
||||||
|
$navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%) !default;
|
||||||
|
$navbar-default-brand-hover-bg: transparent !default;
|
||||||
|
|
||||||
|
// Navbar toggle
|
||||||
|
$navbar-default-toggle-hover-bg: #ddd !default;
|
||||||
|
$navbar-default-toggle-icon-bar-bg: #888 !default;
|
||||||
|
$navbar-default-toggle-border-color: #ddd !default;
|
||||||
|
|
||||||
|
|
||||||
|
// Inverted navbar
|
||||||
|
// Reset inverted navbar basics
|
||||||
|
$navbar-inverse-color: $gray-light !default;
|
||||||
|
$navbar-inverse-bg: #222 !default;
|
||||||
|
$navbar-inverse-border: darken($navbar-inverse-bg, 10%) !default;
|
||||||
|
|
||||||
|
// Inverted navbar links
|
||||||
|
$navbar-inverse-link-color: $gray-light !default;
|
||||||
|
$navbar-inverse-link-hover-color: #fff !default;
|
||||||
|
$navbar-inverse-link-hover-bg: transparent !default;
|
||||||
|
$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color !default;
|
||||||
|
$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%) !default;
|
||||||
|
$navbar-inverse-link-disabled-color: #444 !default;
|
||||||
|
$navbar-inverse-link-disabled-bg: transparent !default;
|
||||||
|
|
||||||
|
// Inverted navbar brand label
|
||||||
|
$navbar-inverse-brand-color: $navbar-inverse-link-color !default;
|
||||||
|
$navbar-inverse-brand-hover-color: #fff !default;
|
||||||
|
$navbar-inverse-brand-hover-bg: transparent !default;
|
||||||
|
|
||||||
|
// Inverted navbar toggle
|
||||||
|
$navbar-inverse-toggle-hover-bg: #333 !default;
|
||||||
|
$navbar-inverse-toggle-icon-bar-bg: #fff !default;
|
||||||
|
$navbar-inverse-toggle-border-color: #333 !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Navs
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//=== Shared nav styles
|
||||||
|
$nav-link-padding: 10px 15px !default;
|
||||||
|
$nav-link-hover-bg: $gray-lighter !default;
|
||||||
|
|
||||||
|
$nav-disabled-link-color: $gray-light !default;
|
||||||
|
$nav-disabled-link-hover-color: $gray-light !default;
|
||||||
|
|
||||||
|
$nav-open-link-hover-color: #fff !default;
|
||||||
|
|
||||||
|
//== Tabs
|
||||||
|
$nav-tabs-border-color: #ddd !default;
|
||||||
|
|
||||||
|
$nav-tabs-link-hover-border-color: $gray-lighter !default;
|
||||||
|
|
||||||
|
$nav-tabs-active-link-hover-bg: $body-bg !default;
|
||||||
|
$nav-tabs-active-link-hover-color: $gray !default;
|
||||||
|
$nav-tabs-active-link-hover-border-color: #ddd !default;
|
||||||
|
|
||||||
|
$nav-tabs-justified-link-border-color: #ddd !default;
|
||||||
|
$nav-tabs-justified-active-link-border-color: $body-bg !default;
|
||||||
|
|
||||||
|
//== Pills
|
||||||
|
$nav-pills-border-radius: $border-radius-base !default;
|
||||||
|
$nav-pills-active-link-hover-bg: $component-active-bg !default;
|
||||||
|
$nav-pills-active-link-hover-color: $component-active-color !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Pagination
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$pagination-color: $link-color !default;
|
||||||
|
$pagination-bg: #fff !default;
|
||||||
|
$pagination-border: #ddd !default;
|
||||||
|
|
||||||
|
$pagination-hover-color: $link-hover-color !default;
|
||||||
|
$pagination-hover-bg: $gray-lighter !default;
|
||||||
|
$pagination-hover-border: #ddd !default;
|
||||||
|
|
||||||
|
$pagination-active-color: #fff !default;
|
||||||
|
$pagination-active-bg: $brand-primary !default;
|
||||||
|
$pagination-active-border: $brand-primary !default;
|
||||||
|
|
||||||
|
$pagination-disabled-color: $gray-light !default;
|
||||||
|
$pagination-disabled-bg: #fff !default;
|
||||||
|
$pagination-disabled-border: #ddd !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Pager
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$pager-bg: $pagination-bg !default;
|
||||||
|
$pager-border: $pagination-border !default;
|
||||||
|
$pager-border-radius: 15px !default;
|
||||||
|
|
||||||
|
$pager-hover-bg: $pagination-hover-bg !default;
|
||||||
|
|
||||||
|
$pager-active-bg: $pagination-active-bg !default;
|
||||||
|
$pager-active-color: $pagination-active-color !default;
|
||||||
|
|
||||||
|
$pager-disabled-color: $pagination-disabled-color !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Jumbotron
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$jumbotron-padding: 30px !default;
|
||||||
|
$jumbotron-color: inherit !default;
|
||||||
|
$jumbotron-bg: $gray-lighter !default;
|
||||||
|
$jumbotron-heading-color: inherit !default;
|
||||||
|
$jumbotron-font-size: ceil(($font-size-base * 1.5)) !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Form states and alerts
|
||||||
|
//
|
||||||
|
//## Define colors for form feedback states and, by default, alerts.
|
||||||
|
|
||||||
|
$state-success-text: #3c763d !default;
|
||||||
|
$state-success-bg: #dff0d8 !default;
|
||||||
|
$state-success-border: darken(adjust-hue($state-success-bg, -10), 5%) !default;
|
||||||
|
|
||||||
|
$state-info-text: #31708f !default;
|
||||||
|
$state-info-bg: #d9edf7 !default;
|
||||||
|
$state-info-border: darken(adjust-hue($state-info-bg, -10), 7%) !default;
|
||||||
|
|
||||||
|
$state-warning-text: #8a6d3b !default;
|
||||||
|
$state-warning-bg: #fcf8e3 !default;
|
||||||
|
$state-warning-border: darken(adjust-hue($state-warning-bg, -10), 5%) !default;
|
||||||
|
|
||||||
|
$state-danger-text: #a94442 !default;
|
||||||
|
$state-danger-bg: #f2dede !default;
|
||||||
|
$state-danger-border: darken(adjust-hue($state-danger-bg, -10), 5%) !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Tooltips
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Tooltip max width
|
||||||
|
$tooltip-max-width: 200px !default;
|
||||||
|
//** Tooltip text color
|
||||||
|
$tooltip-color: #fff !default;
|
||||||
|
//** Tooltip background color
|
||||||
|
$tooltip-bg: #000 !default;
|
||||||
|
$tooltip-opacity: .9 !default;
|
||||||
|
|
||||||
|
//** Tooltip arrow width
|
||||||
|
$tooltip-arrow-width: 5px !default;
|
||||||
|
//** Tooltip arrow color
|
||||||
|
$tooltip-arrow-color: $tooltip-bg !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Popovers
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Popover body background color
|
||||||
|
$popover-bg: #fff !default;
|
||||||
|
//** Popover maximum width
|
||||||
|
$popover-max-width: 276px !default;
|
||||||
|
//** Popover border color
|
||||||
|
$popover-border-color: rgba(0,0,0,.2) !default;
|
||||||
|
//** Popover fallback border color
|
||||||
|
$popover-fallback-border-color: #ccc !default;
|
||||||
|
|
||||||
|
//** Popover title background color
|
||||||
|
$popover-title-bg: darken($popover-bg, 3%) !default;
|
||||||
|
|
||||||
|
//** Popover arrow width
|
||||||
|
$popover-arrow-width: 10px !default;
|
||||||
|
//** Popover arrow color
|
||||||
|
$popover-arrow-color: #fff !default;
|
||||||
|
|
||||||
|
//** Popover outer arrow width
|
||||||
|
$popover-arrow-outer-width: ($popover-arrow-width + 1) !default;
|
||||||
|
//** Popover outer arrow color
|
||||||
|
$popover-arrow-outer-color: fadein($popover-border-color, 5%) !default;
|
||||||
|
//** Popover outer arrow fallback color
|
||||||
|
$popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%) !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Labels
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Default label background color
|
||||||
|
$label-default-bg: $gray-light !default;
|
||||||
|
//** Primary label background color
|
||||||
|
$label-primary-bg: $brand-primary !default;
|
||||||
|
//** Success label background color
|
||||||
|
$label-success-bg: $brand-success !default;
|
||||||
|
//** Info label background color
|
||||||
|
$label-info-bg: $brand-info !default;
|
||||||
|
//** Warning label background color
|
||||||
|
$label-warning-bg: $brand-warning !default;
|
||||||
|
//** Danger label background color
|
||||||
|
$label-danger-bg: $brand-danger !default;
|
||||||
|
|
||||||
|
//** Default label text color
|
||||||
|
$label-color: #fff !default;
|
||||||
|
//** Default text color of a linked label
|
||||||
|
$label-link-hover-color: #fff !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Modals
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Padding applied to the modal body
|
||||||
|
$modal-inner-padding: 20px !default;
|
||||||
|
|
||||||
|
//** Padding applied to the modal title
|
||||||
|
$modal-title-padding: 15px !default;
|
||||||
|
//** Modal title line-height
|
||||||
|
$modal-title-line-height: $line-height-base !default;
|
||||||
|
|
||||||
|
//** Background color of modal content area
|
||||||
|
$modal-content-bg: #fff !default;
|
||||||
|
//** Modal content border color
|
||||||
|
$modal-content-border-color: rgba(0,0,0,.2) !default;
|
||||||
|
//** Modal content border color **for IE8**
|
||||||
|
$modal-content-fallback-border-color: #999 !default;
|
||||||
|
|
||||||
|
//** Modal backdrop background color
|
||||||
|
$modal-backdrop-bg: #000 !default;
|
||||||
|
//** Modal backdrop opacity
|
||||||
|
$modal-backdrop-opacity: .5 !default;
|
||||||
|
//** Modal header border color
|
||||||
|
$modal-header-border-color: #e5e5e5 !default;
|
||||||
|
//** Modal footer border color
|
||||||
|
$modal-footer-border-color: $modal-header-border-color !default;
|
||||||
|
|
||||||
|
$modal-lg: 900px !default;
|
||||||
|
$modal-md: 600px !default;
|
||||||
|
$modal-sm: 300px !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Alerts
|
||||||
|
//
|
||||||
|
//## Define alert colors, border radius, and padding.
|
||||||
|
|
||||||
|
$alert-padding: 15px !default;
|
||||||
|
$alert-border-radius: $border-radius-base !default;
|
||||||
|
$alert-link-font-weight: bold !default;
|
||||||
|
|
||||||
|
$alert-success-bg: $state-success-bg !default;
|
||||||
|
$alert-success-text: $state-success-text !default;
|
||||||
|
$alert-success-border: $state-success-border !default;
|
||||||
|
|
||||||
|
$alert-info-bg: $state-info-bg !default;
|
||||||
|
$alert-info-text: $state-info-text !default;
|
||||||
|
$alert-info-border: $state-info-border !default;
|
||||||
|
|
||||||
|
$alert-warning-bg: $state-warning-bg !default;
|
||||||
|
$alert-warning-text: $state-warning-text !default;
|
||||||
|
$alert-warning-border: $state-warning-border !default;
|
||||||
|
|
||||||
|
$alert-danger-bg: $state-danger-bg !default;
|
||||||
|
$alert-danger-text: $state-danger-text !default;
|
||||||
|
$alert-danger-border: $state-danger-border !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Progress bars
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Background color of the whole progress component
|
||||||
|
$progress-bg: #f5f5f5 !default;
|
||||||
|
//** Progress bar text color
|
||||||
|
$progress-bar-color: #fff !default;
|
||||||
|
|
||||||
|
//** Default progress bar color
|
||||||
|
$progress-bar-bg: $brand-primary !default;
|
||||||
|
//** Success progress bar color
|
||||||
|
$progress-bar-success-bg: $brand-success !default;
|
||||||
|
//** Warning progress bar color
|
||||||
|
$progress-bar-warning-bg: $brand-warning !default;
|
||||||
|
//** Danger progress bar color
|
||||||
|
$progress-bar-danger-bg: $brand-danger !default;
|
||||||
|
//** Info progress bar color
|
||||||
|
$progress-bar-info-bg: $brand-info !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== List group
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Background color on `.list-group-item`
|
||||||
|
$list-group-bg: #fff !default;
|
||||||
|
//** `.list-group-item` border color
|
||||||
|
$list-group-border: #ddd !default;
|
||||||
|
//** List group border radius
|
||||||
|
$list-group-border-radius: $border-radius-base !default;
|
||||||
|
|
||||||
|
//** Background color of single list elements on hover
|
||||||
|
$list-group-hover-bg: #f5f5f5 !default;
|
||||||
|
//** Text color of active list elements
|
||||||
|
$list-group-active-color: $component-active-color !default;
|
||||||
|
//** Background color of active list elements
|
||||||
|
$list-group-active-bg: $component-active-bg !default;
|
||||||
|
//** Border color of active list elements
|
||||||
|
$list-group-active-border: $list-group-active-bg !default;
|
||||||
|
$list-group-active-text-color: lighten($list-group-active-bg, 40%) !default;
|
||||||
|
|
||||||
|
$list-group-link-color: #555 !default;
|
||||||
|
$list-group-link-heading-color: #333 !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Panels
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$panel-bg: #fff !default;
|
||||||
|
$panel-body-padding: 15px !default;
|
||||||
|
$panel-border-radius: $border-radius-base !default;
|
||||||
|
|
||||||
|
//** Border color for elements within panels
|
||||||
|
$panel-inner-border: #ddd !default;
|
||||||
|
$panel-footer-bg: #f5f5f5 !default;
|
||||||
|
|
||||||
|
$panel-default-text: $gray-dark !default;
|
||||||
|
$panel-default-border: #ddd !default;
|
||||||
|
$panel-default-heading-bg: #f5f5f5 !default;
|
||||||
|
|
||||||
|
$panel-primary-text: #fff !default;
|
||||||
|
$panel-primary-border: $brand-primary !default;
|
||||||
|
$panel-primary-heading-bg: $brand-primary !default;
|
||||||
|
|
||||||
|
$panel-success-text: $state-success-text !default;
|
||||||
|
$panel-success-border: $state-success-border !default;
|
||||||
|
$panel-success-heading-bg: $state-success-bg !default;
|
||||||
|
|
||||||
|
$panel-info-text: $state-info-text !default;
|
||||||
|
$panel-info-border: $state-info-border !default;
|
||||||
|
$panel-info-heading-bg: $state-info-bg !default;
|
||||||
|
|
||||||
|
$panel-warning-text: $state-warning-text !default;
|
||||||
|
$panel-warning-border: $state-warning-border !default;
|
||||||
|
$panel-warning-heading-bg: $state-warning-bg !default;
|
||||||
|
|
||||||
|
$panel-danger-text: $state-danger-text !default;
|
||||||
|
$panel-danger-border: $state-danger-border !default;
|
||||||
|
$panel-danger-heading-bg: $state-danger-bg !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Thumbnails
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Padding around the thumbnail image
|
||||||
|
$thumbnail-padding: 4px !default;
|
||||||
|
//** Thumbnail background color
|
||||||
|
$thumbnail-bg: $body-bg !default;
|
||||||
|
//** Thumbnail border color
|
||||||
|
$thumbnail-border: #ddd !default;
|
||||||
|
//** Thumbnail border radius
|
||||||
|
$thumbnail-border-radius: $border-radius-base !default;
|
||||||
|
|
||||||
|
//** Custom text color for thumbnail captions
|
||||||
|
$thumbnail-caption-color: $text-color !default;
|
||||||
|
//** Padding around the thumbnail caption
|
||||||
|
$thumbnail-caption-padding: 9px !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Wells
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$well-bg: #f5f5f5 !default;
|
||||||
|
$well-border: darken($well-bg, 7%) !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Badges
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$badge-color: #fff !default;
|
||||||
|
//** Linked badge text color on hover
|
||||||
|
$badge-link-hover-color: #fff !default;
|
||||||
|
$badge-bg: $gray-light !default;
|
||||||
|
|
||||||
|
//** Badge text color in active nav link
|
||||||
|
$badge-active-color: $link-color !default;
|
||||||
|
//** Badge background color in active nav link
|
||||||
|
$badge-active-bg: #fff !default;
|
||||||
|
|
||||||
|
$badge-font-weight: bold !default;
|
||||||
|
$badge-line-height: 1 !default;
|
||||||
|
$badge-border-radius: 10px !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Breadcrumbs
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$breadcrumb-padding-vertical: 8px !default;
|
||||||
|
$breadcrumb-padding-horizontal: 15px !default;
|
||||||
|
//** Breadcrumb background color
|
||||||
|
$breadcrumb-bg: #f5f5f5 !default;
|
||||||
|
//** Breadcrumb text color
|
||||||
|
$breadcrumb-color: #ccc !default;
|
||||||
|
//** Text color of current page in the breadcrumb
|
||||||
|
$breadcrumb-active-color: $gray-light !default;
|
||||||
|
//** Textual separator for between breadcrumb elements
|
||||||
|
$breadcrumb-separator: "/" !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Carousel
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6) !default;
|
||||||
|
|
||||||
|
$carousel-control-color: #fff !default;
|
||||||
|
$carousel-control-width: 15% !default;
|
||||||
|
$carousel-control-opacity: .5 !default;
|
||||||
|
$carousel-control-font-size: 20px !default;
|
||||||
|
|
||||||
|
$carousel-indicator-active-bg: #fff !default;
|
||||||
|
$carousel-indicator-border-color: #fff !default;
|
||||||
|
|
||||||
|
$carousel-caption-color: #fff !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Close
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$close-font-weight: bold !default;
|
||||||
|
$close-color: #000 !default;
|
||||||
|
$close-text-shadow: 0 1px 0 #fff !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Code
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
$code-color: #c7254e !default;
|
||||||
|
$code-bg: #f9f2f4 !default;
|
||||||
|
|
||||||
|
$kbd-color: #fff !default;
|
||||||
|
$kbd-bg: #333 !default;
|
||||||
|
|
||||||
|
$pre-bg: #f5f5f5 !default;
|
||||||
|
$pre-color: $gray-dark !default;
|
||||||
|
$pre-border-color: #ccc !default;
|
||||||
|
$pre-scrollable-max-height: 340px !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Type
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Text muted color
|
||||||
|
$text-muted: $gray-light !default;
|
||||||
|
//** Abbreviations and acronyms border color
|
||||||
|
$abbr-border-color: $gray-light !default;
|
||||||
|
//** Headings small color
|
||||||
|
$headings-small-color: $gray-light !default;
|
||||||
|
//** Blockquote small color
|
||||||
|
$blockquote-small-color: $gray-light !default;
|
||||||
|
//** Blockquote font size
|
||||||
|
$blockquote-font-size: ($font-size-base * 1.25) !default;
|
||||||
|
//** Blockquote border color
|
||||||
|
$blockquote-border-color: $gray-lighter !default;
|
||||||
|
//** Page header border color
|
||||||
|
$page-header-border-color: $gray-lighter !default;
|
||||||
|
|
||||||
|
|
||||||
|
//== Miscellaneous
|
||||||
|
//
|
||||||
|
//##
|
||||||
|
|
||||||
|
//** Horizontal line color.
|
||||||
|
$hr-border: $gray-lighter !default;
|
||||||
|
|
||||||
|
//** Horizontal offset for forms and lists.
|
||||||
|
$component-offset-horizontal: 180px !default;
|
|
@ -52,9 +52,23 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||||
@feeds = BulletinFeed.all.asc(:created_at)
|
@feeds = BulletinFeed.all.asc(:created_at)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
def generate_iframe_url
|
||||||
|
iframe_params = params.require(:iframe).permit!
|
||||||
|
uids = iframe_params['member_ids'].to_a.map{|m_id| MemberProfile.find(m_id).uid rescue nil}.select{|uid| !uid.nil?}
|
||||||
|
url_params = iframe_params.except(:member_ids)
|
||||||
|
url_params['uids'] = uids if uids != []
|
||||||
|
render :text => '/xhr/panel/announcement/widget/sync_data?'+url_params.to_param
|
||||||
|
end
|
||||||
def settings
|
def settings
|
||||||
@setting = @announcement_setting
|
@setting = @announcement_setting
|
||||||
|
roles = Role.all
|
||||||
|
@sorted_members = roles.inject({}) do |members,role|
|
||||||
|
members_for_role = role.member_profiles.select{|m| (m.user.nil? ? false : m.user.approved)}
|
||||||
|
members[role] = members_for_role
|
||||||
|
members
|
||||||
|
end
|
||||||
|
@sorted_members['no_role'] = MemberProfile.any_in(:role_ids=>[nil,[]]).select{|m| (m.user.nil? ? false : m.user.approved)}
|
||||||
|
@unapproved_members = User.where(:approved => false).map{|u| u.member_profile}
|
||||||
end
|
end
|
||||||
|
|
||||||
def import
|
def import
|
||||||
|
|
|
@ -23,6 +23,7 @@ class AnnouncementsController < ApplicationController
|
||||||
doc = Nokogiri::HTML(a.title)
|
doc = Nokogiri::HTML(a.title)
|
||||||
title = doc.text.empty? ? 'no content' : doc.text
|
title = doc.text.empty? ? 'no content' : doc.text
|
||||||
{
|
{
|
||||||
|
"department" => author,
|
||||||
"bulletin_links" => links,
|
"bulletin_links" => links,
|
||||||
"bulletin_files" => files,
|
"bulletin_files" => files,
|
||||||
"title" => a.title,
|
"title" => a.title,
|
||||||
|
@ -67,7 +68,8 @@ class AnnouncementsController < ApplicationController
|
||||||
"link-head" => t('announcement.table.link'),
|
"link-head" => t('announcement.table.link'),
|
||||||
"file-head" => t('announcement.table.file'),
|
"file-head" => t('announcement.table.file'),
|
||||||
"view-count-head" => t('announcement.table.view_count'),
|
"view-count-head" => t('announcement.table.view_count'),
|
||||||
"display" => display
|
"display" => display,
|
||||||
|
"department-head" => t('announcement.table.department')
|
||||||
},
|
},
|
||||||
"total_pages" => total_pages
|
"total_pages" => total_pages
|
||||||
}
|
}
|
||||||
|
@ -324,6 +326,96 @@ class AnnouncementsController < ApplicationController
|
||||||
show_local_announcement(uid, (params["preview"] == "true" ? true : false))
|
show_local_announcement(uid, (params["preview"] == "true" ? true : false))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
def show_widget
|
||||||
|
@type = "show_widget"
|
||||||
|
@show_page = params[:show_page]
|
||||||
|
if params[:tags].nil?
|
||||||
|
@tags = ModuleApp.where(:key => "announcement").first.tags.map{|t| t.id.to_s}
|
||||||
|
else
|
||||||
|
@tags = params[:tags]
|
||||||
|
end
|
||||||
|
if params[:categories].nil?
|
||||||
|
@categories = ModuleApp.where(:key => "announcement").first.categories.map{|c| c.id.to_s}
|
||||||
|
else
|
||||||
|
@categories = params[:categories]
|
||||||
|
end
|
||||||
|
OrbitHelper.set_current_widget_module("announcement")
|
||||||
|
OrbitHelper.set_params(params,current_user)
|
||||||
|
Bulletin.remove_expired_status
|
||||||
|
sorted,total_pages = get_sorted_annc
|
||||||
|
OrbitHelper.set_page_number(params[:page_no].to_i)
|
||||||
|
OrbitHelper.set_page_data_count((params[:data_count].blank? ? 10 : params[:data_count].to_i))
|
||||||
|
anns = sorted.collect do |a|
|
||||||
|
if a["source-site"].blank?
|
||||||
|
statuses = a.statuses_with_classname.collect do |status|
|
||||||
|
{
|
||||||
|
"status" => status["name"],
|
||||||
|
"status-class" => "status-#{status['classname']}"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
locale = I18n.locale.to_s
|
||||||
|
files = a.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => (file.title.blank? ? File.basename(file.file.path) : file.title rescue '') } if file.enabled_for?(locale) } rescue []
|
||||||
|
files.delete(nil)
|
||||||
|
links = a.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue []
|
||||||
|
author = User.find(a.create_user_id).member_profile.name rescue ""
|
||||||
|
desc = a.image_description
|
||||||
|
desc = (desc.blank? ? "announcement image" : desc)
|
||||||
|
link_to_show = (a.is_external_link ? a.external_link : OrbitHelper.url_to_show(a.to_param)) rescue ""
|
||||||
|
target = a.is_external_link ? "_blank" : "_self"
|
||||||
|
doc = Nokogiri::HTML(a.title)
|
||||||
|
title = doc.text.empty? ? 'no content' : doc.text
|
||||||
|
{
|
||||||
|
"department" => author,
|
||||||
|
"bulletin_links" => links,
|
||||||
|
"bulletin_files" => files,
|
||||||
|
"title" => a.title,
|
||||||
|
"source-site" => "",
|
||||||
|
"source-site-title" => "",
|
||||||
|
"source-site-link" => "",
|
||||||
|
"subtitle" => a.subtitle,
|
||||||
|
"statuses" => statuses,
|
||||||
|
"category" => a.category.title,
|
||||||
|
"postdate" => a.postdate,
|
||||||
|
"author" => author,
|
||||||
|
"is_top" => (a.is_top? ? 1 : 0),
|
||||||
|
"link_to_show" => link_to_show+"\" title=\"#{title}\"",
|
||||||
|
"target" => target,
|
||||||
|
"img_src" => a.image.thumb.url || "/assets/announcement-default.jpg",
|
||||||
|
"img_description" => desc,
|
||||||
|
"more" => t(:more_plus),
|
||||||
|
"view_count" => a.view_count
|
||||||
|
}
|
||||||
|
else
|
||||||
|
a
|
||||||
|
end
|
||||||
|
end
|
||||||
|
#If no data , hide title&table
|
||||||
|
if sorted.count == 0
|
||||||
|
display = "hide"
|
||||||
|
end
|
||||||
|
# anns = anns.concat(feeds_anns)
|
||||||
|
# total_pages = announcements.total_pages
|
||||||
|
|
||||||
|
|
||||||
|
@data = {
|
||||||
|
"announcements" => anns,
|
||||||
|
"extras" => {
|
||||||
|
"widget-title" =>t('announcement.announcement'),
|
||||||
|
"title-head" => t('announcement.table.title'),
|
||||||
|
"date-head" => t('announcement.table.date'),
|
||||||
|
"status-head" => t('announcement.table.status'),
|
||||||
|
"author-head" => t('announcement.table.author'),
|
||||||
|
"subtitle-head" => t('announcement.table.sub_title'),
|
||||||
|
"category-head" => t('announcement.table.category'),
|
||||||
|
"link-head" => t('announcement.table.link'),
|
||||||
|
"file-head" => t('announcement.table.file'),
|
||||||
|
"view-count-head" => t('announcement.table.view_count'),
|
||||||
|
"display" => display,
|
||||||
|
"department-head" => t('announcement.table.department')
|
||||||
|
},
|
||||||
|
"total_pages" => total_pages
|
||||||
|
}
|
||||||
|
render :layout => false
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,7 +36,7 @@ module AnnouncementsHelper
|
||||||
author = User.find(a.create_user_id).member_profile.name rescue ""
|
author = User.find(a.create_user_id).member_profile.name rescue ""
|
||||||
desc = a.image_description
|
desc = a.image_description
|
||||||
desc = (desc.nil? || desc == "" ? "announcement image" : desc)
|
desc = (desc.nil? || desc == "" ? "announcement image" : desc)
|
||||||
link_to_show = a.is_external_link? ? a.external_link : OrbitHelper.widget_item_url(a.to_param)
|
link_to_show = (a.is_external_link? ? a.external_link : OrbitHelper.widget_item_url(a.to_param)) rescue ""
|
||||||
target = a.is_external_link ? "_blank" : "_self"
|
target = a.is_external_link ? "_blank" : "_self"
|
||||||
if @image_version == 'thumb'
|
if @image_version == 'thumb'
|
||||||
image_url = a.image.thumb.url
|
image_url = a.image.thumb.url
|
||||||
|
@ -147,23 +147,50 @@ module AnnouncementsHelper
|
||||||
def get_sorted_annc(data_count=nil)
|
def get_sorted_annc(data_count=nil)
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
locale = OrbitHelper.get_site_locale.to_s
|
locale = OrbitHelper.get_site_locale.to_s
|
||||||
page = Page.where(url:params['url']).first
|
|
||||||
page_number = OrbitHelper.page_number.to_i
|
page_number = OrbitHelper.page_number.to_i
|
||||||
page_number = 1 if page_number == 0
|
page_number = 1 if page_number == 0
|
||||||
page_data_count = data_count || OrbitHelper.page_data_count.to_i
|
page_data_count = data_count || OrbitHelper.page_data_count.to_i
|
||||||
feeds_anns = []
|
feeds_anns = []
|
||||||
tags = page.tags
|
page = Page.where(url:params['url']).first
|
||||||
categories = params['category']=='all' ? (page.categories || []) : ([Category.find(params['category'])] rescue (page.categories || []))
|
if @type == "show_widget"
|
||||||
|
tags = @tags
|
||||||
|
categories = @categories
|
||||||
|
else
|
||||||
|
tags = page.tags
|
||||||
|
categories = params['category']=='all' ? (page.categories || []) : ([Category.find(params['category'])] rescue (page.categories || []))
|
||||||
|
end
|
||||||
if !params["source"].present?
|
if !params["source"].present?
|
||||||
announcements = Bulletin.where(:title.nin => ["",nil],:is_preview.in=>[false,nil])
|
if @type == "show_widget"
|
||||||
|
if params[:uids].blank?
|
||||||
|
announcements = Bulletin.where(:title.nin => ["",nil],:is_preview.in=>[false,nil])
|
||||||
.can_display_and_sorted.is_approved
|
.can_display_and_sorted.is_approved
|
||||||
.filter_by_categories(categories,false).filter_by_tags(tags).to_a
|
.filter_by_categories(categories,false).filter_by_tags(tags).to_a
|
||||||
|
else
|
||||||
|
member_prfile = MemberProfile.any_in(:uid=>params[:uids])
|
||||||
|
user_ids = member_prfile.map{|m| m.user.id rescue nil}.select{|id| !id.nil?}
|
||||||
|
announcements = Bulletin.where(:title.nin => ["",nil],:is_preview.in=>[false,nil],:create_user_id.in=>user_ids)
|
||||||
|
.can_display_and_sorted.is_approved
|
||||||
|
.filter_by_categories(categories,false).filter_by_tags(tags).to_a
|
||||||
|
end
|
||||||
|
else
|
||||||
|
announcements = Bulletin.where(:title.nin => ["",nil],:is_preview.in=>[false,nil])
|
||||||
|
.can_display_and_sorted.is_approved
|
||||||
|
.filter_by_categories(categories,false).filter_by_tags(tags).to_a
|
||||||
|
end
|
||||||
if !(defined? SiteFeed).nil?
|
if !(defined? SiteFeed).nil?
|
||||||
feeds_anns = get_feed_announcements("index")
|
if @type != "show_widget"
|
||||||
|
feeds_anns = get_feed_announcements("index")
|
||||||
|
else
|
||||||
|
feeds_anns = []
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
announcements = []
|
announcements = []
|
||||||
feeds_anns = get_feed_announcements("index",params["source"])
|
if @type != "show_widget"
|
||||||
|
feeds_anns = get_feed_announcements("index",params["source"])
|
||||||
|
else
|
||||||
|
feeds_anns = []
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if !feeds_anns.blank?
|
if !feeds_anns.blank?
|
||||||
if announcements.count != 0
|
if announcements.count != 0
|
||||||
|
@ -187,4 +214,206 @@ module AnnouncementsHelper
|
||||||
total_pages = page_data_count == 0 ? 1 : (annc_count.to_f / page_data_count).ceil
|
total_pages = page_data_count == 0 ? 1 : (annc_count.to_f / page_data_count).ceil
|
||||||
[sorted,total_pages]
|
[sorted,total_pages]
|
||||||
end
|
end
|
||||||
|
def render_view_for_annc(overridehtml=nil)
|
||||||
|
@key = Site.first.template
|
||||||
|
def render_link_to_edit(html, url_to_edit)
|
||||||
|
if html.scan("{{link_to_edit}}").length == 0
|
||||||
|
html = url_to_edit.blank? ? html : html + "<p class='admin-edit text-right'><a class='btn btn-primary' href='#{url_to_edit}'><i class='icon-edit'></i> #{t(:edit)}</a></p>"
|
||||||
|
else
|
||||||
|
html = url_to_edit.blank? ? html.gsub("{{link_to_edit}}","") : html.gsub("{{link_to_edit}}","<p class='admin-edit text-right'><a class='btn btn-primary' href='#{url_to_edit}'><i class='icon-edit'></i> #{t(:edit)}</a></p>")
|
||||||
|
end
|
||||||
|
return html
|
||||||
|
end
|
||||||
|
|
||||||
|
def parsing_repeats_again(elements,d,level)
|
||||||
|
newhtml = []
|
||||||
|
oldhtml = []
|
||||||
|
elements.each do |el|
|
||||||
|
html_to_render = ""
|
||||||
|
data_name = el.attr("data-list")
|
||||||
|
wrap_elements = el.css("*[data-list][data-level='#{level}']")
|
||||||
|
if d[data_name]
|
||||||
|
d[data_name].each_with_index do |item,i|
|
||||||
|
element = el.inner_html
|
||||||
|
if wrap_elements.count > 0
|
||||||
|
htmls = parsing_repeats_again(wrap_elements,d[data_name][i], level + 1)
|
||||||
|
htmls[0].each_with_index do |html,i|
|
||||||
|
element = element.gsub(html,htmls[1][i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
item.each do |key,value|
|
||||||
|
if !value.kind_of?(Array)
|
||||||
|
value = value.nil? ? "" : value
|
||||||
|
element = element.gsub("{{#{key}}}",value.to_s.html_safe)
|
||||||
|
element = element.gsub("%7B%7B#{key}%7D%7D",value.to_s.html_safe)
|
||||||
|
element = render_link_to_edit(element, value) if key.eql?("url_to_edit")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
html_to_render = html_to_render + element
|
||||||
|
end
|
||||||
|
temp = el.to_s
|
||||||
|
oldhtml << temp
|
||||||
|
temp = temp.gsub(el.inner_html, html_to_render)
|
||||||
|
newhtml << temp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
[oldhtml,newhtml]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if @target_action == "index"
|
||||||
|
filename = overridehtml.nil? ? params[:layout_type] : overridehtml
|
||||||
|
f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'announcement', "#{filename}.html.erb")
|
||||||
|
if !File.exists?f
|
||||||
|
f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'announcement', "index.html.erb")
|
||||||
|
if !File.exists?f
|
||||||
|
return "<div class='well'>Maybe the administrator has changed the theme, please select the index page design again from the page settings.</div>".html_safe
|
||||||
|
end
|
||||||
|
end
|
||||||
|
file = File.open(f)
|
||||||
|
doc = Nokogiri::HTML(file, nil, "UTF-8")
|
||||||
|
file.close
|
||||||
|
controller = AnnouncementsController.new
|
||||||
|
begin
|
||||||
|
data = @data# rescue nil
|
||||||
|
rescue Exception => e
|
||||||
|
write_debug_file(e,'announcements',@target_action) if Site::DEBUG
|
||||||
|
end
|
||||||
|
if !data.nil?
|
||||||
|
wrap_elements = doc.css("*[data-list][data-level='0']")
|
||||||
|
htmls = parsing_repeats_again(wrap_elements,data,1)
|
||||||
|
html = doc.to_s
|
||||||
|
htmls[0].each_with_index do |h,i|
|
||||||
|
html = html.gsub(h,htmls[1][i])
|
||||||
|
end
|
||||||
|
extras = data["extras"] || {}
|
||||||
|
extras["page-title"] = Page.find_by(:page_id => params[:page_id]).name rescue "" if !extras["page-title"]
|
||||||
|
extras.each do |key,value|
|
||||||
|
value = value.nil? ? "" : value
|
||||||
|
html = html.gsub("{{#{key}}}",value.to_s.html_safe)
|
||||||
|
html = html.gsub("%7B%7B#{key}%7D%7D",value.to_s.html_safe)
|
||||||
|
end
|
||||||
|
total_pages = data['total_pages'].to_i rescue 1
|
||||||
|
if total_pages > 1
|
||||||
|
html = html.gsub("{{pagination_goes_here}}",create_pagination(total_pages))
|
||||||
|
else
|
||||||
|
html = html.gsub("{{pagination_goes_here}}","");
|
||||||
|
end
|
||||||
|
html.html_safe
|
||||||
|
else
|
||||||
|
return "<div class='well'>No content to show.</div>".html_safe
|
||||||
|
end
|
||||||
|
else
|
||||||
|
filename = overridehtml.nil? ? @target_action : overridehtml
|
||||||
|
f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', 'announcement', "#{filename}.html.erb")
|
||||||
|
if File.exists?f
|
||||||
|
file = File.open(f)
|
||||||
|
doc = Nokogiri::HTML(file, nil, "UTF-8")
|
||||||
|
file.close
|
||||||
|
controller = AnnouncementsController.new
|
||||||
|
begin
|
||||||
|
data = @data# rescue nil
|
||||||
|
rescue Exception => e
|
||||||
|
write_debug_file(e,'announcements',@target_action) if Site::DEBUG
|
||||||
|
end
|
||||||
|
if data.nil?
|
||||||
|
return "<div class='well'> No content to show. </div>".html_safe
|
||||||
|
end
|
||||||
|
|
||||||
|
if data.blank? || data.empty?
|
||||||
|
file = File.open("#{Rails.root}/app/views/errors/404.html")
|
||||||
|
doc = Nokogiri::HTML(file, nil, "UTF-8")
|
||||||
|
file.close
|
||||||
|
doc.to_html.html_safe
|
||||||
|
else
|
||||||
|
unless data['impressionist'].blank?
|
||||||
|
Thread.new do
|
||||||
|
impression = data['impressionist'].impressions.create
|
||||||
|
impression.user_id = request.session['user_id']
|
||||||
|
impression.controller_name = 'announcements'
|
||||||
|
impression.action_name = @target_action
|
||||||
|
impression.ip_address = request.remote_ip
|
||||||
|
impression.session_hash = request.session.id
|
||||||
|
impression.request_hash = @impressionist_hash
|
||||||
|
impression.referrer = request.referrer
|
||||||
|
impression.save
|
||||||
|
end
|
||||||
|
data['impressionist'].inc(view_count: 1)
|
||||||
|
data["data"]["view_count"] = data["impressionist"].view_count if data["data"].present?
|
||||||
|
end
|
||||||
|
wrap_elements = doc.css("*[data-list][data-level='0']")
|
||||||
|
if wrap_elements.count == 0
|
||||||
|
wrap_element_html = doc.to_s
|
||||||
|
el = wrap_element_html
|
||||||
|
data.each do |key,value|
|
||||||
|
next if key.eql? 'impressionist'
|
||||||
|
value = value.nil? ? "" : value
|
||||||
|
el = el.gsub("{{#{key}}}",value.to_s.html_safe)
|
||||||
|
el = el.gsub("%7B%7B#{key}%7D%7D",value.to_s.html_safe)
|
||||||
|
end
|
||||||
|
el.html_safe
|
||||||
|
else
|
||||||
|
keys = data.keys
|
||||||
|
not_array_key = nil
|
||||||
|
data.keys.each do |key|
|
||||||
|
not_array_key = key if data["#{key}"].kind_of?(Hash)
|
||||||
|
end
|
||||||
|
htmls = parsing_repeats_again(wrap_elements,data,1)
|
||||||
|
html = doc.to_s
|
||||||
|
htmls[0].each_with_index do |h,i|
|
||||||
|
html = html.gsub(h,htmls[1][i])
|
||||||
|
end
|
||||||
|
extras = data["#{not_array_key}"] || {}
|
||||||
|
extras.each do |key,value|
|
||||||
|
next if key.eql? 'impressionist'
|
||||||
|
value = value.nil? ? "" : value
|
||||||
|
html = html.gsub("{{#{key}}}",value.to_s)
|
||||||
|
html = html.gsub("%7B%7B#{key}%7D%7D",value.to_s)
|
||||||
|
end
|
||||||
|
html = render_link_to_edit(html, data["url_to_edit"]) if !data["url_to_edit"].nil?
|
||||||
|
total_pages = data['total_pages'].to_i rescue 1
|
||||||
|
if @show_page == false
|
||||||
|
html = html.gsub("{{pagination_goes_here}}","")
|
||||||
|
else
|
||||||
|
if total_pages > 1
|
||||||
|
html = html.gsub("{{pagination_goes_here}}",create_pagination(total_pages))
|
||||||
|
else
|
||||||
|
html = html.gsub("{{pagination_goes_here}}","")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
html = Nokogiri::HTML.parse(html)
|
||||||
|
html.css('.i-annc__page-title').remove
|
||||||
|
html.css("body").to_html.html_safe
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return "<div class='well'>There is a problem with the design. We will try to fix it as soon as possible. Sorry for the inconvenience!! :(</div>".html_safe
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
def get_layouts(module_app)
|
||||||
|
layout_types = []
|
||||||
|
@key = Site.first.template
|
||||||
|
f = File.join("#{Rails.root}/app/templates/#{@key}/modules/#{module_app}/info.json")
|
||||||
|
if File.exists?f
|
||||||
|
info = File.read(f)
|
||||||
|
hash = JSON.parse(info) rescue {}
|
||||||
|
frontends = hash["frontend"] || []
|
||||||
|
frontends.each do |frontend|
|
||||||
|
frontend["thumbnail"] = "/assets/#{module_app}/thumbs/#{frontend["thumbnail"]}"
|
||||||
|
layout_types << frontend
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if layout_types.empty?
|
||||||
|
Dir.glob("#{Rails.root}/app/templates/#{@key}/modules/#{module_app}/*").each do |w|
|
||||||
|
next if File.ftype(w).eql?("directory")
|
||||||
|
w = File.basename(w, ".*")
|
||||||
|
w = File.basename(w, ".*")
|
||||||
|
if w[0,1] != "_" && w[0,1] != "s" && w != "info"
|
||||||
|
layout_types << w
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
layout_types
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
<%= stylesheet_link_tag "select2/select2" %>
|
||||||
|
<%= javascript_include_tag 'validator' %>
|
||||||
|
<%= javascript_include_tag "select2/select2.min" %>
|
||||||
|
<% content_for :page_specific_css do %>
|
||||||
|
<%= stylesheet_link_tag "lib/main-forms" %>
|
||||||
|
<% end %>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#notification{
|
#notification{
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
|
@ -216,6 +222,7 @@
|
||||||
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
<% if AnnouncementSetting.is_pro? %>
|
<% if AnnouncementSetting.is_pro? %>
|
||||||
<div id="approverModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="approverModalLabel" aria-hidden="true">
|
<div id="approverModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="approverModalLabel" aria-hidden="true">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -245,14 +252,137 @@
|
||||||
$("#notification").slideDown();
|
$("#notification").slideDown();
|
||||||
$(".badge-info").text($(".hidden-approver-list input").length);
|
$(".badge-info").text($(".hidden-approver-list input").length);
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%= fields_for :iframe do |f| %>
|
||||||
|
<div class="form-horizontal input-area">
|
||||||
|
<fieldset id="iframe_settings">
|
||||||
|
<legend><%=t('announcement.announcement_setting_for_iframe')%></legend>
|
||||||
|
<div class="control-group">
|
||||||
|
<%= f.label :layout_type, t("announcement.layout_type"), :class => "control-label muted" %>
|
||||||
|
<div class="controls">
|
||||||
|
<% @layout_types = get_layouts(@module_app.key) %>
|
||||||
|
<% if @layout_types.first.kind_of?(Hash) %>
|
||||||
|
<select name="iframe[layout_type]" id="page_layout" class="select2">
|
||||||
|
<% @layout_types.each do |lt| %>
|
||||||
|
<option value="<%= lt["filename"] %>" data-image="<%= lt["thumbnail"] %>"><%= (lt["name"].kind_of?(Hash) ? (lt["name"][I18n.locale.to_s] || lt["name"]['en']) : lt["name"]) %></option>
|
||||||
|
<% end %>
|
||||||
|
</select>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("select.select2").select2({
|
||||||
|
formatResult: function(el){
|
||||||
|
var $element = $(el.element),
|
||||||
|
image = $element.data("image");
|
||||||
|
return "<img class='thumbnail' src='" + image + "'/><span class='thumbnail-text'>" + el.text + "</span>";
|
||||||
|
},
|
||||||
|
minimumResultsForSearch: -1,
|
||||||
|
width : 250
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% else %>
|
||||||
|
<%= f.select(:layout, @layout_types) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<%= f.label :tags, t(:tags), :class => "control-label muted" %>
|
||||||
|
<div class="controls">
|
||||||
|
<% @module_app.tags.each_with_index do |t,index| %>
|
||||||
|
<label class="checkbox inline btn" for="<%="tags_#{index}"%>">
|
||||||
|
<input id="<%="tags_#{index}"%>" name="iframe[tags][]" type="checkbox" value="<%=t.id%>" style="opacity: 0;">
|
||||||
|
<%=t.name%>
|
||||||
|
</label>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label muted" ><%=t(:categories)%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<% @module_app.categories.each_with_index do |c,index| %>
|
||||||
|
<label class="checkbox inline btn" for="<%="categories_#{index}"%>">
|
||||||
|
<input id="<%="categories_#{index}"%>" name="iframe[categories][]" type="checkbox" value="<%=c.id%>" style="opacity: 0;">
|
||||||
|
<%=c.title%>
|
||||||
|
</label>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<%= f.label :authors, t('announcement.table.author'), :class => "control-label muted" %>
|
||||||
|
<div class="controls">
|
||||||
|
<%= render partial: 'admin/members/generate_modal_select' , locals: { :@sorted_members => @sorted_members ,:member_form_id => "card-list-members",:member_field_name=>"iframe[member_ids][]" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<%= f.label :show_page, t('announcement.show_page'), :class => "control-label muted" %>
|
||||||
|
<div class="controls">
|
||||||
|
<%=f.check_box :show_page ,{:checked=>'checked'},'true','false'%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<%= f.label :data_count, t(:data_count), :class => "control-label muted" %>
|
||||||
|
<div class="controls">
|
||||||
|
<%=f.number_field :data_count, {min: 0,:value=> 10} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<a class="btn btn-primary" title="<%= t("announcement.url_generate") %>" id="url_generate"><%= t("announcement.url_generate") %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function getparams(id){
|
||||||
|
var params_array = $("#"+id).serializeArray();
|
||||||
|
var params = {};
|
||||||
|
params_array.forEach(function(dict){
|
||||||
|
if(params[dict.name] == undefined)
|
||||||
|
if(dict.name.substr(dict.name.length-2,2) == "[]")
|
||||||
|
params[dict.name] = [dict.value]
|
||||||
|
else
|
||||||
|
params[dict.name] = dict.value
|
||||||
|
else
|
||||||
|
if(dict.name.substr(dict.name.length-2,2) == "[]")
|
||||||
|
params[dict.name].push(dict.value)
|
||||||
|
else
|
||||||
|
params[dict.name] = dict.value
|
||||||
|
})
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('label.checkbox input').click(function(){
|
||||||
|
if($(this).parent().hasClass('active'))
|
||||||
|
$(this).parent().removeClass('active');
|
||||||
|
else
|
||||||
|
$(this).parent().addClass('active');
|
||||||
|
})
|
||||||
|
$('#url_generate').off('click').on('click',function(){
|
||||||
|
var params = getparams('iframe_settings');
|
||||||
|
$.post("<%=admin_announcement_generate_iframe_url_path%>",params).done(function(url){
|
||||||
|
var real_url = window.location.href.split('/')[0]+"//"+window.location.host+url;
|
||||||
|
if($("#dialog-confirm").length == 0){
|
||||||
|
$("#url_generate").before("<div id='dialog-confirm' title='<%="iframe "+t('announcement.URL')%>'>"+
|
||||||
|
"<div style='clear:both;'></div><div id='info_texts'>"+"<label style='float:left;margin-right: 0.2em; line-height: 2em;' for='iframe_url'><%="iframe "+t('announcement.URL') %>:</label><input id= 'iframe_url' style='float:left;cursor:text;' type='text' readyonly value='"+real_url+"'><a class='btn btn-primary copy_text' style='color: white;'><%=t('announcement.copy')%></a>"+"</div>"+
|
||||||
|
"</div>");
|
||||||
|
}
|
||||||
|
$( "#dialog-confirm" ).dialog({
|
||||||
|
resizable: true,
|
||||||
|
minHeight: 100,
|
||||||
|
maxHeight: 400,
|
||||||
|
width: '80%',
|
||||||
|
modal: true,
|
||||||
|
buttons: {
|
||||||
|
"<%= t(:close) %>": function(){$( this ).dialog( "close" );}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('.copy_text').off('click').on('click',function(){
|
||||||
|
var copyText = document.getElementById("iframe_url");
|
||||||
|
copyText.select();
|
||||||
|
copyText.setSelectionRange(0, 99999);
|
||||||
|
document.execCommand("copy");
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><%= render_site_title %></title>
|
||||||
|
<%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"%>
|
||||||
|
<%= stylesheet_link_tag "bootstrap/bootstrap.min.css"%>
|
||||||
|
<%= stylesheet_link_tag "template/template"%>
|
||||||
|
<%= javascript_include_tag "bootstrap.min"%>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<% params = {:layout_type => 'annc_index1',:target_controller=>'announcements',:target_action=>'show_widget'} %>
|
||||||
|
<% @target_action = "show_widget" %>
|
||||||
|
<%=render_view_for_annc((params[:layout_type].blank? ? params[:layout_type] : 'annc_index1'))%>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -30,6 +30,7 @@ en:
|
||||||
link: Link
|
link: Link
|
||||||
file: File
|
file: File
|
||||||
view_count: View Count
|
view_count: View Count
|
||||||
|
department: Department
|
||||||
add_new: Add New
|
add_new: Add New
|
||||||
export_to_excel: Export to Excel
|
export_to_excel: Export to Excel
|
||||||
export_all_anns: Export all Announcement
|
export_all_anns: Export all Announcement
|
||||||
|
@ -115,3 +116,9 @@ en:
|
||||||
display_img: Display Cover Image in Content Page
|
display_img: Display Cover Image in Content Page
|
||||||
is_display_edit_only: Only display editable announcements
|
is_display_edit_only: Only display editable announcements
|
||||||
only_manager_can_edit_status: Only manager can edit status of announcements
|
only_manager_can_edit_status: Only manager can edit status of announcements
|
||||||
|
layout_type: Layout type
|
||||||
|
announcement_setting_for_iframe: Announcement settings for iframe
|
||||||
|
url_generate: Url Generate
|
||||||
|
show_page: Show pagination
|
||||||
|
URL: URL
|
||||||
|
copy: Copy
|
||||||
|
|
|
@ -30,6 +30,7 @@ zh_tw:
|
||||||
link: 超連結
|
link: 超連結
|
||||||
file: 檔案下載
|
file: 檔案下載
|
||||||
view_count: 瀏覽人次
|
view_count: 瀏覽人次
|
||||||
|
department: 單位
|
||||||
add_new: 新建
|
add_new: 新建
|
||||||
import: 匯入
|
import: 匯入
|
||||||
export_to_excel: 匯出至Excel檔
|
export_to_excel: 匯出至Excel檔
|
||||||
|
@ -119,3 +120,9 @@ zh_tw:
|
||||||
display_img: 內容頁顯示封面圖片
|
display_img: 內容頁顯示封面圖片
|
||||||
is_display_edit_only: 只顯示可更新的公告
|
is_display_edit_only: 只顯示可更新的公告
|
||||||
only_manager_can_edit_status: 只有管理者可更新公告狀態
|
only_manager_can_edit_status: 只有管理者可更新公告狀態
|
||||||
|
layout_type: 頁面樣式
|
||||||
|
announcement_setting_for_iframe: 公告iframe設定
|
||||||
|
url_generate: 網址生成
|
||||||
|
show_page: 顯示頁碼
|
||||||
|
URL: 網址
|
||||||
|
copy: 複製
|
|
@ -21,6 +21,7 @@ Rails.application.routes.draw do
|
||||||
post 'announcement/createsettings', to: 'announcements#createsettings'
|
post 'announcement/createsettings', to: 'announcements#createsettings'
|
||||||
patch 'announcement/updatesettings', to: 'announcements#updatesettings'
|
patch 'announcement/updatesettings', to: 'announcements#updatesettings'
|
||||||
post 'announcement/import_from_wp', to: 'announcements#import_from_wp'
|
post 'announcement/import_from_wp', to: 'announcements#import_from_wp'
|
||||||
|
post 'announcement/generate_iframe_url' => 'announcements#generate_iframe_url'
|
||||||
resources :announcements
|
resources :announcements
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -34,7 +35,7 @@ Rails.application.routes.draw do
|
||||||
get "/xhr/announcements/rssfeed/:uid" => "announcement_feeds#rssfeed"
|
get "/xhr/announcements/rssfeed/:uid" => "announcement_feeds#rssfeed"
|
||||||
get "/xhr/announcements/feeds" => "announcement_feeds#feeds"
|
get "/xhr/announcements/feeds" => "announcement_feeds#feeds"
|
||||||
get '/xhr/announcements/announcement.json', to: 'bulletins#get_bulletins'
|
get '/xhr/announcements/announcement.json', to: 'bulletins#get_bulletins'
|
||||||
|
get '/xhr/panel/announcement/widget/sync_data' => 'announcements#show_widget'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<div class="w-annc widget-announcement-1">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item">
|
||||||
|
<div class="w-annc__img-wrap bullseye">
|
||||||
|
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
<div class="w-annc__meta">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="w-annc__entry-title">
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="w-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="w-annc widget-announcement-10">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item row">
|
||||||
|
<h4 class="w-annc__entry-title col-sm-9">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="w-annc widget-announcement-11">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item row">
|
||||||
|
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<h4 class="w-annc__entry-title col-sm-9">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="w-annc widget-announcement-12">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<table class="w-annc__table table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="w-annc_content">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="w-annc widget-announcement-13">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<table class="w-annc__table table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
<td class="w-annc_content">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<div class="w-annc widget-announcement-14">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<div class="w-annc__inner row">
|
||||||
|
<div class="w-annc__img-wrap col-xs-4 bullseye">
|
||||||
|
<img class="w-annc__img" src="{{main_picture}}" alt="{{main_picture_description}}" title="{{main_picture_description}}">
|
||||||
|
</div>
|
||||||
|
<ul class="w-annc__list col-xs-8" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item">
|
||||||
|
<div class="w-annc__content row">
|
||||||
|
<h4 class="w-annc__entry-title col-xs-9">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<span class="w-annc__postdate-wrap col-xs-3" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,131 @@
|
||||||
|
<div class="w-annc widget-announcement-4 w-annc widget-announcement-15" style="position:relative;">
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<h2 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h2>
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
<div style="position: absolute;top: 50%;bottom: 50%;width:100%;">
|
||||||
|
<button class="btn-left" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>" style="float: left;height: 2.5em; width: 2.5em;background: url(/assets/left-01.png) no-repeat;border: 0;background-size: contain;position: absolute;transition:.3s; left: 0.6%;"></button>
|
||||||
|
<button class="btn-right" title = "<%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %>" style="float: right;;height: 2.5em; width: 2.5em;background: url(/assets/right-01.png) no-repeat;background-size: contain;border: 0;position: absolute;transition:.3s;right: 0.6%;"></button>
|
||||||
|
</div>
|
||||||
|
<ul class="w-annc__list row" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item col-md-4">
|
||||||
|
<div class="w-annc__img-wrap bullseye">
|
||||||
|
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
<div class="w-annc__content-wrap">
|
||||||
|
<div class="w-annc__meta">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="w-annc__entry-title">
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="w-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||||
|
<script>
|
||||||
|
function combineul(){
|
||||||
|
for(var i=1;i<$('.widget-announcement-4 ul.w-annc__list').length;i++)
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(0).find('>li').eq(-1).after($('.widget-announcement-4 ul.w-annc__list').eq(i).html());
|
||||||
|
var ullength = $('.widget-announcement-4 ul.w-annc__list').length;
|
||||||
|
for(var i = 1;i < ullength;i++)
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(-1).remove();
|
||||||
|
};
|
||||||
|
var lilength = $('.widget-announcement-4 li.w-annc__item').length;
|
||||||
|
var num;
|
||||||
|
function reorganize(num){
|
||||||
|
combineul();
|
||||||
|
for(var i=1;i< Math.ceil(lilength/num);i++){
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(-1).after('<ul class="w-annc__list row" data-level="0" data-list="announcements"></ul>')
|
||||||
|
var lihtml="";
|
||||||
|
//var liheight=new Array(num);
|
||||||
|
if(i != (Math.ceil(lilength/num)-1)){
|
||||||
|
for(var j=0;j<num;j++){
|
||||||
|
lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>"
|
||||||
|
//liheight[j] = $('.widget-announcement-4 li.w-annc__item').eq(i*num+j).height()+20;//20=>margin-top+margin-bottom
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
for(var j=0;j< lilength - num *(Math.ceil(lilength/num)-1) ;j++){
|
||||||
|
lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>"
|
||||||
|
//liheight[j] = $('.widget-announcement-4 li.w-annc__item').eq(i*num+j).height()+20;//20=>margin-top+margin-bottom
|
||||||
|
};
|
||||||
|
};
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(-1).html(lihtml);
|
||||||
|
};
|
||||||
|
if(Math.ceil(lilength/num) != 1 )
|
||||||
|
for(var i=0;i< lilength -num ; i++ )
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove();
|
||||||
|
for(var i=0;i< Math.ceil(lilength/num);i++)
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(i).attr("index",i);
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').css("display","none");
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(0).css("display","flex");
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(0).addClass("active");
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').css('padding','0 1.125em');
|
||||||
|
$('.widget-announcement-4 button').css('z-index','10');
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list >li').css('float','left');
|
||||||
|
};
|
||||||
|
$(window).resize(function(){
|
||||||
|
if($(window).width()>1024){
|
||||||
|
reorganize(3);
|
||||||
|
num=3;
|
||||||
|
}else if($(window).width()>576){
|
||||||
|
reorganize(2);
|
||||||
|
num=2;
|
||||||
|
}else{
|
||||||
|
reorganize(1);
|
||||||
|
num=1;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($(window).width()>1024){
|
||||||
|
reorganize(3);
|
||||||
|
num=3;
|
||||||
|
}else if($(window).width()>576){
|
||||||
|
reorganize(2);
|
||||||
|
num=2;
|
||||||
|
}else{
|
||||||
|
reorganize(1);
|
||||||
|
num=1;
|
||||||
|
}
|
||||||
|
var flag=false;
|
||||||
|
$('.btn-left').click(function(){
|
||||||
|
if(!flag){
|
||||||
|
var currentul = Number($('.widget-announcement-4 ul.w-annc__list.active').attr("index"));
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').css('display','none');
|
||||||
|
if(currentul - 1 < 0)
|
||||||
|
currentul += Math.ceil(lilength/num);
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').removeClass("active");
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(currentul-1).addClass("active");
|
||||||
|
flag=true;
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list.active').eq(0).effect("slide", { direction: "left", mode: 'show', duration: 500},function(){flag=false;});
|
||||||
|
};
|
||||||
|
});
|
||||||
|
$('.btn-right').click(function(){
|
||||||
|
if(!flag){
|
||||||
|
var currentul = Number($('.widget-announcement-4 ul.w-annc__list.active').attr("index"));
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').css("display","none");
|
||||||
|
if(currentul + 1 > Math.ceil(lilength/num) - 1)
|
||||||
|
currentul -= Math.ceil(lilength/num);
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').removeClass("active");
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(currentul+1).addClass("active");
|
||||||
|
flag=true;
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list.active').eq(0).effect("slide", { direction: "right", mode: 'show', duration: 500},function(){flag=false;});
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -0,0 +1,34 @@
|
||||||
|
<div class="w-annc widget-announcement-2">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item row">
|
||||||
|
<div class="w-annc__img-wrap col-sm-4 bullseye">
|
||||||
|
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
<div class="w-annc__content-wrap col-sm-8">
|
||||||
|
<div class="w-annc__meta">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="w-annc__entry-title">
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="w-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,34 @@
|
||||||
|
<div class="w-annc widget-announcement-3">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item row">
|
||||||
|
<div class="w-annc__content-wrap col-sm-8">
|
||||||
|
<div class="w-annc__meta">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="w-annc__entry-title">
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="w-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="w-annc__img-wrap col-sm-4 bullseye">
|
||||||
|
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,87 @@
|
||||||
|
<div class="w-annc widget-announcement-4">
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<h2 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h2>
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
<ul class="w-annc__list row" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item col-md-4">
|
||||||
|
<div class="w-annc__img-wrap bullseye">
|
||||||
|
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
<div class="w-annc__content-wrap">
|
||||||
|
<div class="w-annc__meta">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="w-annc__entry-title">
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="w-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var lilength = $('.widget-announcement-4 li.w-annc__item').length;
|
||||||
|
function combineul(){
|
||||||
|
for(var i=1;i<$('.widget-announcement-4 ul.w-annc__list').length;i++)
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(0).find('>li').eq(-1).after($('.widget-announcement-4 ul.w-annc__list').eq(i).html());
|
||||||
|
var ullength = $('.widget-announcement-4 ul.w-annc__list').length;
|
||||||
|
for(var i = 1;i < ullength;i++)
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(-1).remove();
|
||||||
|
};
|
||||||
|
function reorganize(num){
|
||||||
|
combineul();
|
||||||
|
for(var i=1;i< Math.ceil(lilength/num);i++){
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(-1).after('<ul class="w-annc__list row" data-level="0" data-list="announcements"></ul>')
|
||||||
|
var lihtml="";
|
||||||
|
if(i != (Math.ceil(lilength/num)-1)){
|
||||||
|
for(var j=0;j<num;j++)
|
||||||
|
lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>"
|
||||||
|
}else{
|
||||||
|
for(var j=0;j< lilength - num *(Math.ceil(lilength/num)-1) ;j++)
|
||||||
|
lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>"
|
||||||
|
};
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(-1).html(lihtml);
|
||||||
|
};
|
||||||
|
if(Math.ceil(lilength/num) != 1 )
|
||||||
|
for(var i=0;i< lilength -num ; i++ )
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove();
|
||||||
|
$('.widget-announcement-4 ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
|
||||||
|
};
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($(window).width()>1024){
|
||||||
|
reorganize(3);
|
||||||
|
num=3;
|
||||||
|
}else if($(window).width()>576){
|
||||||
|
reorganize(2);
|
||||||
|
num=2;
|
||||||
|
}else{
|
||||||
|
reorganize(1);
|
||||||
|
num=1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(window).resize(function(){
|
||||||
|
if($(window).width()>1024){
|
||||||
|
reorganize(3);
|
||||||
|
num=3;
|
||||||
|
}else if($(window).width()>576){
|
||||||
|
reorganize(2);
|
||||||
|
num=2;
|
||||||
|
}else{
|
||||||
|
reorganize(1);
|
||||||
|
num=1;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<div class="w-annc widget-announcement-5">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list row" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item">
|
||||||
|
<div class="w-annc__content-wrap">
|
||||||
|
<div class="w-annc__meta">
|
||||||
|
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="w-annc__entry-title">
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="w-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<div class="w-annc widget-announcement-6">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item row">
|
||||||
|
<span class="w-annc__category-wrap col-sm-2">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
<h4 class="w-annc__entry-title col-sm-8">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<span class="w-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<div class="w-annc widget-announcement-7">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<ul class="w-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="w-annc__item row">
|
||||||
|
<span class="w-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="w-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<h4 class="w-annc__entry-title col-sm-8">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<span class="w-annc__category-wrap col-sm-2">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="w-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<div class="w-annc widget-announcement-8">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<table class="w-annc__table table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-annc__th w-annc__th--category">{{category-head}}</th>
|
||||||
|
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="w-annc__category">{{category}}</td>
|
||||||
|
<td class="w-annc_content">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<div class="w-annc widget-announcement-9">
|
||||||
|
<h3 class="w-annc__widget-title">
|
||||||
|
<span>{{widget-title}}</span>
|
||||||
|
</h3>
|
||||||
|
<table class="w-annc__table table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="w-annc__th w-annc__th--category">{{category-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
<td class="w-annc_content">
|
||||||
|
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="w-annc__category">{{category}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="w-annc__more-wrap clearfix">
|
||||||
|
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="i-annc index-announcement-1 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__category">{{category}}</td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="i-annc index-announcement-10">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<ul class="i-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item row">
|
||||||
|
<span class="i-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<h4 class="i-annc__entry-title col-sm-8">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<span class="i-annc__category-wrap col-sm-2">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="i-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="i-annc index-announcement-11">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<ul class="i-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item row">
|
||||||
|
<h4 class="i-annc__entry-title col-sm-9">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<span class="i-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="i-annc index-announcement-12">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<ul class="i-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item row">
|
||||||
|
<span class="i-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<h4 class="i-annc__entry-title col-sm-9">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,23 @@
|
||||||
|
<div class="i-annc index-announcement-13 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,23 @@
|
||||||
|
<div class="i-annc index-announcement-14 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="i-annc index-announcement-15 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{view-count-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__view-count">{{view_count}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,39 @@
|
||||||
|
<div class="i-annc index-announcement-16 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{link-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{file-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__links">
|
||||||
|
<ul data-list="bulletin_links" data-level="1">
|
||||||
|
<li>
|
||||||
|
<a class="i-annc__title" href="{{link_url}}">{{link_title}}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__files">
|
||||||
|
<ul data-list="bulletin_files" data-level="1">
|
||||||
|
<li>
|
||||||
|
<a class="i-annc__title" href="{{file_url}}">{{file_title}}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="i-annc index-announcement-1 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--department">{{department-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__category">{{category}}</td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
|
||||||
|
<td class="i-annc__department"><span class="i-annc__department-content">{{department}}</span></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="i-annc index-announcement-2 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{view-count-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__category">{{category}}</td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
|
||||||
|
<td class="i-annc__view-count">{{view_count}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="i-annc index-announcement-3 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__category">{{category}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="i-annc index-announcement-4 {{display}}">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<table class="i-annc__table table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
|
||||||
|
<th class="i-annc__th i-annc__th--category">{{view-count-head}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-level="0" data-list="announcements">
|
||||||
|
<tr>
|
||||||
|
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
|
||||||
|
<td class="i-annc__content">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</td>
|
||||||
|
<td class="i-annc__category">{{category}}</td>
|
||||||
|
<td class="i-annc__view-count">{{view_count}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="i-annc index-announcement-5">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<ul class="i-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item row">
|
||||||
|
<div class="i-annc__img-wrap col-sm-4">
|
||||||
|
<img class="i-annc__img" src="{{img_src}}" alt="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
<div class="i-annc__content-wrap col-sm-8">
|
||||||
|
<div class="i-annc__meta">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="i-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="i-annc__entry-title">
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="i-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="i-annc index-announcement-6">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<ul class="i-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item row">
|
||||||
|
<div class="i-annc__content-wrap col-sm-8">
|
||||||
|
<div class="i-annc__meta">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="i-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="i-annc__entry-title">
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="i-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="i-annc__img-wrap col-sm-4">
|
||||||
|
<img class="i-annc__img" src="{{img_src}}" alt="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,83 @@
|
||||||
|
<div class="i-annc index-announcement-7">
|
||||||
|
<h3 class="i-annc__page-title">{{page-title}}</h3>
|
||||||
|
<ul class="i-annc__list row" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item col-md-4">
|
||||||
|
<div class="i-annc__img-wrap bullseye">
|
||||||
|
<img class="i-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
|
||||||
|
</div>
|
||||||
|
<div class="i-annc__content-wrap">
|
||||||
|
<div class="i-annc__meta">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="i-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="i-annc__entry-title">
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="i-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
||||||
|
<script>
|
||||||
|
var lilength = $('.i-annc.index-announcement-7 li.i-annc__item').length;
|
||||||
|
function combineul(){
|
||||||
|
for(var i=1;i<$('.i-annc.index-announcement-7 ul.i-annc__list').length;i++)
|
||||||
|
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(0).find('>li').eq(-1).after($('.i-annc.index-announcement-7 ul.i-annc__list').eq(i).html());
|
||||||
|
var ullength = $('.i-annc.index-announcement-7 ul.i-annc__list').length;
|
||||||
|
for(var i = 1;i < ullength;i++)
|
||||||
|
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(-1).remove();
|
||||||
|
};
|
||||||
|
function reorganize(num){
|
||||||
|
combineul();
|
||||||
|
for(var i=1;i< Math.ceil(lilength/num);i++){
|
||||||
|
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(-1).after('<ul class="i-annc__list row" data-level="0" data-list="announcements"></ul>')
|
||||||
|
var lihtml="";
|
||||||
|
if(i != (Math.ceil(lilength/num)-1)){
|
||||||
|
for(var j=0;j<num;j++)
|
||||||
|
lihtml += "<li class='i-annc__item col-md-4'>"+$('.i-annc.index-announcement-7 li.i-annc__item').eq(i*num+j).html()+"</li>"
|
||||||
|
}else{
|
||||||
|
for(var j=0;j< lilength - num *(Math.ceil(lilength/num)-1) ;j++)
|
||||||
|
lihtml += "<li class='i-annc__item col-md-4'>"+$('.i-annc.index-announcement-7 li.i-annc__item').eq(i*num+j).html()+"</li>"
|
||||||
|
};
|
||||||
|
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(-1).html(lihtml);
|
||||||
|
};
|
||||||
|
if(Math.ceil(lilength/num) != 1 )
|
||||||
|
for(var i=0;i< lilength -num ; i++ )
|
||||||
|
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(0).find("li.i-annc__item").eq(num).remove();
|
||||||
|
$('.i-annc.index-announcement-7 ul.i-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
|
||||||
|
};
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($(window).width()>1024){
|
||||||
|
reorganize(3);
|
||||||
|
num=3;
|
||||||
|
}else if($(window).width()>576){
|
||||||
|
reorganize(2);
|
||||||
|
num=2;
|
||||||
|
}else{
|
||||||
|
reorganize(1);
|
||||||
|
num=1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(window).resize(function(){
|
||||||
|
if($(window).width()>1024){
|
||||||
|
reorganize(3);
|
||||||
|
num=3;
|
||||||
|
}else if($(window).width()>576){
|
||||||
|
reorganize(2);
|
||||||
|
num=2;
|
||||||
|
}else{
|
||||||
|
reorganize(1);
|
||||||
|
num=1;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<div class="i-annc index-announcement-8">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<ul class="i-annc__list row" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item">
|
||||||
|
<div class="i-annc__content-wrap">
|
||||||
|
<div class="i-annc__meta">
|
||||||
|
<span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__category-wrap">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="i-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h4 class="i-annc__entry-title">
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<p class="i-annc__subtitle">{{subtitle}}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="i-annc index-announcement-9">
|
||||||
|
<h1 class="i-annc__page-title">{{page-title}}</h1>
|
||||||
|
<ul class="i-annc__list" data-level="0" data-list="announcements">
|
||||||
|
<li class="i-annc__item row">
|
||||||
|
<span class="i-annc__category-wrap col-sm-2">
|
||||||
|
<i class="fa fa-tasks"></i>
|
||||||
|
<span class="i-annc__category">{{category}}</span>
|
||||||
|
</span>
|
||||||
|
<h4 class="i-annc__entry-title col-sm-8">
|
||||||
|
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
|
||||||
|
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
|
||||||
|
</span>
|
||||||
|
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
|
||||||
|
</h4>
|
||||||
|
<span class="i-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="i-annc__postdate">{{postdate}}</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{pagination_goes_here}}
|
|
@ -0,0 +1,262 @@
|
||||||
|
{
|
||||||
|
"frontend": [
|
||||||
|
{
|
||||||
|
"filename" : "annc_index1",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "1. 標準標題列表-1A ( 模組標題, 類別, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "1. Standard Title List-1 (widget-title, category, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index1_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index2",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "2. 標準標題列表-1B ( 模組標題, 類別, 狀態, 標題, 日期, 瀏覽人次 )",
|
||||||
|
"en" : "2. Standard Title List-1B (widget-title, category, status, title, postdate, view-count)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index2_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index3",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "3. 標準表格列表-2A ( 模組標題, 日期, 狀態, 標題, 類別 )",
|
||||||
|
"en" : "3. Standard Table List-2 (widget-title, postdate, status, title, category)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index3_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index4",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "4. 標準表格列表-2B ( 模組標題, 日期, 狀態, 標題, 類別, 瀏覽人次 )",
|
||||||
|
"en" : "4. Standard Table List-2 (widget-title, postdate, status, title, category, view-count)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index4_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index5",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "5. 左圖右文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "5. Balanced Image + Text(Left) (widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index5_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index6",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "6. 右圖左文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "6. Balanced Image + Text(Right) (widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index6_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index7",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "7. 三欄圖文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "7. 3-Column Standard Image + Text (widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index7_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index8",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "8. 標準文字列表 ( 模組標題, 日期, 類別, 狀態, 標題, 副標題 )",
|
||||||
|
"en" : "8. Standard Text List (widget-title, postdate, category, status, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index8_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index9",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "9. 標準標題列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "9. Standard Title List-1 (widget-title, category, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index9_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index10",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "10. 標準標題列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
|
||||||
|
"en" : "10. Standard Title List-2 (widget-title, postdate, status, title, category)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index10_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index11",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "11. 精簡標題列表-1 ( 模組標題, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "11. Simple Title List-1 (widget-title, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index11_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index12",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "12. 精簡標題列表-2 ( 模組標題, 日期, 狀態, 標題 )",
|
||||||
|
"en" : "12. Simple Title List-2 (widget-title, postdate, status, title)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index12_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index13",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "13. 精簡表格列表-1 ( 模組標題, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "13. Simple Table List (widget-title, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index13_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index14",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "14. 精簡表格列表-2 ( 模組標題, 日期, 狀態, 標題 )",
|
||||||
|
"en" : "14. Simple Table List (widget-title, postdate, status, title)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index14_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index15",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "15. 精簡表格列表-3 ( 模組標題, 日期, 狀態, 標題, 瀏覽人次 )",
|
||||||
|
"en" : "15. Simple Table List (widget-title, postdate, status, title, view-count)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index15_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index16",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "16. 連結 + 附件表格列表 ( 模組標題, 類別, 狀態, 標題 )",
|
||||||
|
"en" : "16. Table List including Links and attachments (widget-title, category, status, title, view-count)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index16_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_index17",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "17. 標準標題列表-1A ( 類別, 標題, 日期, 張貼人 )",
|
||||||
|
"en" : "1. Standard Title List-1 ( category, title, postdate, department)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_index1_thumbs.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"widgets" : [
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget1",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "1. 標準圖文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "1. Standard Image + Text (widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget1_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget2",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "2. 左圖右文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "2. Balanced Image + Text(Left) (widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget2_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget3",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "3. 右圖左文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "3. Balanced Image + Text(Right) (widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget3_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget4",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "4. 三欄圖文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "4. 3-Column Standard Image + Text (widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget4_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget15",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "4.5. 三欄圖文-slide ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
|
||||||
|
"en" : "4.5. 3-Column Standard Image + Text -slide(widget-title, image, status, postdate, category, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget4_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget5",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "5. 標準文字列表 ( 模組標題, 日期, 類別, 狀態, 標題, 副標題 )",
|
||||||
|
"en" : "5. Standard Text List (widget-title, postdate, category, status, title, subtitle)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget5_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget6",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "6. 標準標題列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "6. Standard Title List-1 (widget-title, category, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget6_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget7",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "7. 標準標題列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
|
||||||
|
"en" : "7. Standard Title List-2 (widget-title, postdate, status, title, category)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget7_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget8",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "8. 標準表格列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "8. Standard Table List-1 (widget-title, category, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget8_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget9",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "9. 標準表格列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
|
||||||
|
"en" : "9. Standard Table List-2 (widget-title, postdate, status, title, category)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget9_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget10",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "10. 精簡標題列表-1 ( 模組標題, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "10. Simple Title List-1 (widget-title, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget10_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget11",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "11. 精簡標題列表-2 ( 模組標題, 日期, 狀態, 標題 )",
|
||||||
|
"en" : "11. Simple Title List-2 (widget-title, postdate, status, title)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget11_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget12",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "12. 精簡表格列表-1 ( 模組標題, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "12. Simple Table List (widget-title, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget12_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget13",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "13. 精簡表格列表-2 ( 模組標題, 日期, 狀態, 標題 )",
|
||||||
|
"en" : "13. Simple Table List (widget-title, postdate, status, title)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget13_thumbs.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "annc_widget14",
|
||||||
|
"name" : {
|
||||||
|
"zh_tw" : "14. 一圖 + 標題列表 ( 模組標題, 圖片, 狀態, 標題, 日期 )",
|
||||||
|
"en" : "14. 1 Image + Title List (widget-title, image, status, title, postdate)"
|
||||||
|
},
|
||||||
|
"thumbnail" : "annc_widget14_thumbs.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
<article class="s-annc show-announcement">
|
||||||
|
<h1 class="s-annc__show-title">{{title}}</h1>
|
||||||
|
|
||||||
|
<ul class="s-annc__meta-wrap list-unstyled no-print">
|
||||||
|
<li class="s-annc__date-wrap s-annc__meta--item">
|
||||||
|
<i class="fa fa-calendar-o"></i>
|
||||||
|
<span class="s-annc__date" date-format="%Y-%m-%d">{{updated_at}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="s-annc__author-wrap s-annc__meta--item">
|
||||||
|
<i class="fa fa-male"></i>
|
||||||
|
<span class="s-annc__author">{{update_user}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="s-annc__tag-wrap s-annc__meta--item ">
|
||||||
|
<i class="fa fa-tags"></i>
|
||||||
|
<span data-list="tags" data-level="0">
|
||||||
|
<a href="{{url}}"><span class="s-annc__tag label label-default">{{tag}}</span></a>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<section class="s-annc__post-wrap">
|
||||||
|
<p class="s-annc__post-body">{{body}}</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<ul class="s-annc__related-wrap list-unstyled no-print">
|
||||||
|
<li class="s-annc__related-file">
|
||||||
|
<i class="fa fa-fw fa-paperclip"></i>
|
||||||
|
<div class="s-annc__related-file-list" data-list="bulletin_files" data-level="0">
|
||||||
|
<a class="s-annc__flie-title btn btn-default btn-sm" href="{{file_url}}">{{file_title}}</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="s-annc__related-link">
|
||||||
|
<i class="fa fa-fw fa-link"></i>
|
||||||
|
<div class="s-annc__related-link-list" data-list="bulletin_links" data-level="0">
|
||||||
|
<a class="s-annc__link-title btn btn-default btn-sm" href="{{link_url}}" target="_blank">{{link_title}}</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
{{link_to_edit}}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
function hideEmptyEl(el, elParent) {
|
||||||
|
if( el.length === 0) {
|
||||||
|
elParent.addClass('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hiding parent element when children elements are not present
|
||||||
|
// Tags
|
||||||
|
hideEmptyEl($('.s-annc__tag'), $('.s-annc__tag-wrap'));
|
||||||
|
|
||||||
|
// Attachments
|
||||||
|
hideEmptyEl($('.s-annc__flie-title'), $('.s-annc__related-file'));
|
||||||
|
|
||||||
|
// Links
|
||||||
|
hideEmptyEl($('.s-annc__link-title'), $('.s-annc__related-link'));
|
||||||
|
|
||||||
|
}(jQuery));
|
||||||
|
</script>
|
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |