.
9 |
10 | .list-group {
11 | // No need to set list-style: none; since .list-group-item is block level
12 | margin-bottom: 20px;
13 | padding-left: 0; // reset padding because ul and ol
14 | }
15 |
16 |
17 | // Individual list items
18 | //
19 | // Use on `li`s or `div`s within the `.list-group` parent.
20 |
21 | .list-group-item {
22 | position: relative;
23 | display: block;
24 | padding: 10px 15px;
25 | // Place the border on the list items and negative margin up for better styling
26 | margin-bottom: -1px;
27 | background-color: $list-group-bg;
28 | border: 1px solid $list-group-border;
29 |
30 | // Round the first and last items
31 | &:first-child {
32 | @include border-top-radius($list-group-border-radius);
33 | }
34 | &:last-child {
35 | margin-bottom: 0;
36 | @include border-bottom-radius($list-group-border-radius);
37 | }
38 | }
39 |
40 |
41 | // Linked list items
42 | //
43 | // Use anchor elements instead of `li`s or `div`s to create linked list items.
44 | // Includes an extra `.active` modifier class for showing selected items.
45 |
46 | a.list-group-item {
47 | color: $list-group-link-color;
48 |
49 | .list-group-item-heading {
50 | color: $list-group-link-heading-color;
51 | }
52 |
53 | // Hover state
54 | &:hover,
55 | &:focus {
56 | text-decoration: none;
57 | color: $list-group-link-hover-color;
58 | background-color: $list-group-hover-bg;
59 | }
60 | }
61 |
62 | .list-group-item {
63 | // Disabled state
64 | &.disabled,
65 | &.disabled:hover,
66 | &.disabled:focus {
67 | background-color: $list-group-disabled-bg;
68 | color: $list-group-disabled-color;
69 | cursor: $cursor-disabled;
70 |
71 | // Force color to inherit for custom content
72 | .list-group-item-heading {
73 | color: inherit;
74 | }
75 | .list-group-item-text {
76 | color: $list-group-disabled-text-color;
77 | }
78 | }
79 |
80 | // Active class on item itself, not parent
81 | &.active,
82 | &.active:hover,
83 | &.active:focus {
84 | z-index: 2; // Place active items above their siblings for proper border styling
85 | color: $list-group-active-color;
86 | background-color: $list-group-active-bg;
87 | border-color: $list-group-active-border;
88 |
89 | // Force color to inherit for custom content
90 | .list-group-item-heading,
91 | .list-group-item-heading > small,
92 | .list-group-item-heading > .small {
93 | color: inherit;
94 | }
95 | .list-group-item-text {
96 | color: $list-group-active-text-color;
97 | }
98 | }
99 | }
100 |
101 |
102 | // Contextual variants
103 | //
104 | // Add modifier classes to change text and background color on individual items.
105 | // Organizationally, this must come after the `:hover` states.
106 |
107 | @include list-group-item-variant(success, $state-success-bg, $state-success-text);
108 | @include list-group-item-variant(info, $state-info-bg, $state-info-text);
109 | @include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
110 | @include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
111 |
112 |
113 | // Custom content options
114 | //
115 | // Extra classes for creating well-formatted content within `.list-group-item`s.
116 |
117 | .list-group-item-heading {
118 | margin-top: 0;
119 | margin-bottom: 5px;
120 | }
121 | .list-group-item-text {
122 | margin-bottom: 0;
123 | line-height: 1.3;
124 | }
125 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_media.scss:
--------------------------------------------------------------------------------
1 | .media {
2 | // Proper spacing between instances of .media
3 | margin-top: 15px;
4 |
5 | &:first-child {
6 | margin-top: 0;
7 | }
8 | }
9 |
10 | .media,
11 | .media-body {
12 | zoom: 1;
13 | overflow: hidden;
14 | }
15 |
16 | .media-body {
17 | width: 10000px;
18 | }
19 |
20 | .media-object {
21 | display: block;
22 | }
23 |
24 | .media-right,
25 | .media > .pull-right {
26 | padding-left: 10px;
27 | }
28 |
29 | .media-left,
30 | .media > .pull-left {
31 | padding-right: 10px;
32 | }
33 |
34 | .media-left,
35 | .media-right,
36 | .media-body {
37 | display: table-cell;
38 | vertical-align: top;
39 | }
40 |
41 | .media-middle {
42 | vertical-align: middle;
43 | }
44 |
45 | .media-bottom {
46 | vertical-align: bottom;
47 | }
48 |
49 | // Reset margins on headings for tighter default spacing
50 | .media-heading {
51 | margin-top: 0;
52 | margin-bottom: 5px;
53 | }
54 |
55 | // Media list variation
56 | //
57 | // Undo default ul/ol styles
58 | .media-list {
59 | padding-left: 0;
60 | list-style: none;
61 | }
62 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 |
4 | // Utilities
5 | @import "mixins/hide-text";
6 | @import "mixins/opacity";
7 | @import "mixins/image";
8 | @import "mixins/labels";
9 | @import "mixins/reset-filter";
10 | @import "mixins/resize";
11 | @import "mixins/responsive-visibility";
12 | @import "mixins/size";
13 | @import "mixins/tab-focus";
14 | @import "mixins/text-emphasis";
15 | @import "mixins/text-overflow";
16 | @import "mixins/vendor-prefixes";
17 |
18 | // Components
19 | @import "mixins/alerts";
20 | @import "mixins/buttons";
21 | @import "mixins/panels";
22 | @import "mixins/pagination";
23 | @import "mixins/list-group";
24 | @import "mixins/nav-divider";
25 | @import "mixins/forms";
26 | @import "mixins/progress-bar";
27 | @import "mixins/table-row";
28 |
29 | // Skins
30 | @import "mixins/background-variant";
31 | @import "mixins/border-radius";
32 | @import "mixins/gradients";
33 |
34 | // Layout
35 | @import "mixins/clearfix";
36 | @import "mixins/center-block";
37 | @import "mixins/nav-vertical-align";
38 | @import "mixins/grid-framework";
39 | @import "mixins/grid";
40 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_modals.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Modals
3 | // --------------------------------------------------
4 |
5 | // .modal-open - body class for killing the scroll
6 | // .modal - container to scroll within
7 | // .modal-dialog - positioning shell for the actual modal
8 | // .modal-content - actual modal w/ bg and corners and shit
9 |
10 | // Kill the scroll on the body
11 | .modal-open {
12 | overflow: hidden;
13 | }
14 |
15 | // Container that the modal scrolls within
16 | .modal {
17 | display: none;
18 | overflow: hidden;
19 | position: fixed;
20 | top: 0;
21 | right: 0;
22 | bottom: 0;
23 | left: 0;
24 | z-index: $zindex-modal;
25 | -webkit-overflow-scrolling: touch;
26 |
27 | // Prevent Chrome on Windows from adding a focus outline. For details, see
28 | // https://github.com/twbs/bootstrap/pull/10951.
29 | outline: 0;
30 |
31 | // When fading in the modal, animate it to slide down
32 | &.fade .modal-dialog {
33 | @include translate(0, -25%);
34 | @include transition-transform(0.3s ease-out);
35 | }
36 | &.in .modal-dialog { @include translate(0, 0) }
37 | }
38 | .modal-open .modal {
39 | overflow-x: hidden;
40 | overflow-y: auto;
41 | }
42 |
43 | // Shell div to position the modal with bottom padding
44 | .modal-dialog {
45 | position: relative;
46 | width: auto;
47 | margin: 10px;
48 | }
49 |
50 | // Actual modal
51 | .modal-content {
52 | position: relative;
53 | background-color: $modal-content-bg;
54 | border: 1px solid $modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
55 | border: 1px solid $modal-content-border-color;
56 | border-radius: $border-radius-large;
57 | @include box-shadow(0 3px 9px rgba(0,0,0,.5));
58 | background-clip: padding-box;
59 | // Remove focus outline from opened modal
60 | outline: 0;
61 | }
62 |
63 | // Modal background
64 | .modal-backdrop {
65 | position: fixed;
66 | top: 0;
67 | right: 0;
68 | bottom: 0;
69 | left: 0;
70 | z-index: $zindex-modal-background;
71 | background-color: $modal-backdrop-bg;
72 | // Fade for backdrop
73 | &.fade { @include opacity(0); }
74 | &.in { @include opacity($modal-backdrop-opacity); }
75 | }
76 |
77 | // Modal header
78 | // Top section of the modal w/ title and dismiss
79 | .modal-header {
80 | padding: $modal-title-padding;
81 | border-bottom: 1px solid $modal-header-border-color;
82 | min-height: ($modal-title-padding + $modal-title-line-height);
83 | }
84 | // Close icon
85 | .modal-header .close {
86 | margin-top: -2px;
87 | }
88 |
89 | // Title text within header
90 | .modal-title {
91 | margin: 0;
92 | line-height: $modal-title-line-height;
93 | }
94 |
95 | // Modal body
96 | // Where all modal content resides (sibling of .modal-header and .modal-footer)
97 | .modal-body {
98 | position: relative;
99 | padding: $modal-inner-padding;
100 | }
101 |
102 | // Footer (for actions)
103 | .modal-footer {
104 | padding: $modal-inner-padding;
105 | text-align: right; // right align buttons
106 | border-top: 1px solid $modal-footer-border-color;
107 | @include clearfix; // clear it in case folks use .pull-* classes on buttons
108 |
109 | // Properly space out buttons
110 | .btn + .btn {
111 | margin-left: 5px;
112 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
113 | }
114 | // but override that for button groups
115 | .btn-group .btn + .btn {
116 | margin-left: -1px;
117 | }
118 | // and override it for block buttons as well
119 | .btn-block + .btn-block {
120 | margin-left: 0;
121 | }
122 | }
123 |
124 | // Measure scrollbar width for padding body during modal show/hide
125 | .modal-scrollbar-measure {
126 | position: absolute;
127 | top: -9999px;
128 | width: 50px;
129 | height: 50px;
130 | overflow: scroll;
131 | }
132 |
133 | // Scale up the modal
134 | @media (min-width: $screen-sm-min) {
135 | // Automatically set modal's width for larger viewports
136 | .modal-dialog {
137 | width: $modal-md;
138 | margin: 30px auto;
139 | }
140 | .modal-content {
141 | @include box-shadow(0 5px 15px rgba(0,0,0,.5));
142 | }
143 |
144 | // Modal sizes
145 | .modal-sm { width: $modal-sm; }
146 | }
147 |
148 | @media (min-width: $screen-md-min) {
149 | .modal-lg { width: $modal-lg; }
150 | }
151 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_pager.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Pager pagination
3 | // --------------------------------------------------
4 |
5 |
6 | .pager {
7 | padding-left: 0;
8 | margin: $line-height-computed 0;
9 | list-style: none;
10 | text-align: center;
11 | @include clearfix;
12 | li {
13 | display: inline;
14 | > a,
15 | > span {
16 | display: inline-block;
17 | padding: 5px 14px;
18 | background-color: $pager-bg;
19 | border: 1px solid $pager-border;
20 | border-radius: $pager-border-radius;
21 | }
22 |
23 | > a:hover,
24 | > a:focus {
25 | text-decoration: none;
26 | background-color: $pager-hover-bg;
27 | }
28 | }
29 |
30 | .next {
31 | > a,
32 | > span {
33 | float: right;
34 | }
35 | }
36 |
37 | .previous {
38 | > a,
39 | > span {
40 | float: left;
41 | }
42 | }
43 |
44 | .disabled {
45 | > a,
46 | > a:hover,
47 | > a:focus,
48 | > span {
49 | color: $pager-disabled-color;
50 | background-color: $pager-bg;
51 | cursor: $cursor-disabled;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_pagination.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Pagination (multiple pages)
3 | // --------------------------------------------------
4 | .pagination {
5 | display: inline-block;
6 | padding-left: 0;
7 | margin: $line-height-computed 0;
8 | border-radius: $border-radius-base;
9 |
10 | > li {
11 | display: inline; // Remove list-style and block-level defaults
12 | > a,
13 | > span {
14 | position: relative;
15 | float: left; // Collapse white-space
16 | padding: $padding-base-vertical $padding-base-horizontal;
17 | line-height: $line-height-base;
18 | text-decoration: none;
19 | color: $pagination-color;
20 | background-color: $pagination-bg;
21 | border: 1px solid $pagination-border;
22 | margin-left: -1px;
23 | }
24 | &:first-child {
25 | > a,
26 | > span {
27 | margin-left: 0;
28 | @include border-left-radius($border-radius-base);
29 | }
30 | }
31 | &:last-child {
32 | > a,
33 | > span {
34 | @include border-right-radius($border-radius-base);
35 | }
36 | }
37 | }
38 |
39 | > li > a,
40 | > li > span {
41 | &:hover,
42 | &:focus {
43 | color: $pagination-hover-color;
44 | background-color: $pagination-hover-bg;
45 | border-color: $pagination-hover-border;
46 | }
47 | }
48 |
49 | > .active > a,
50 | > .active > span {
51 | &,
52 | &:hover,
53 | &:focus {
54 | z-index: 2;
55 | color: $pagination-active-color;
56 | background-color: $pagination-active-bg;
57 | border-color: $pagination-active-border;
58 | cursor: default;
59 | }
60 | }
61 |
62 | > .disabled {
63 | > span,
64 | > span:hover,
65 | > span:focus,
66 | > a,
67 | > a:hover,
68 | > a:focus {
69 | color: $pagination-disabled-color;
70 | background-color: $pagination-disabled-bg;
71 | border-color: $pagination-disabled-border;
72 | cursor: $cursor-disabled;
73 | }
74 | }
75 | }
76 |
77 | // Sizing
78 | // --------------------------------------------------
79 |
80 | // Large
81 | .pagination-lg {
82 | @include pagination-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $border-radius-large);
83 | }
84 |
85 | // Small
86 | .pagination-sm {
87 | @include pagination-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $border-radius-small);
88 | }
89 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_popovers.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Popovers
3 | // --------------------------------------------------
4 |
5 |
6 | .popover {
7 | position: absolute;
8 | top: 0;
9 | left: 0;
10 | z-index: $zindex-popover;
11 | display: none;
12 | max-width: $popover-max-width;
13 | padding: 1px;
14 | // Reset font and text properties given new insertion method
15 | font-family: $font-family-base;
16 | font-size: $font-size-base;
17 | font-weight: normal;
18 | line-height: $line-height-base;
19 | text-align: left;
20 | background-color: $popover-bg;
21 | background-clip: padding-box;
22 | border: 1px solid $popover-fallback-border-color;
23 | border: 1px solid $popover-border-color;
24 | border-radius: $border-radius-large;
25 | @include box-shadow(0 5px 10px rgba(0,0,0,.2));
26 |
27 | // Overrides for proper insertion
28 | white-space: normal;
29 |
30 | // Offset the popover to account for the popover arrow
31 | &.top { margin-top: -$popover-arrow-width; }
32 | &.right { margin-left: $popover-arrow-width; }
33 | &.bottom { margin-top: $popover-arrow-width; }
34 | &.left { margin-left: -$popover-arrow-width; }
35 | }
36 |
37 | .popover-title {
38 | margin: 0; // reset heading margin
39 | padding: 8px 14px;
40 | font-size: $font-size-base;
41 | background-color: $popover-title-bg;
42 | border-bottom: 1px solid darken($popover-title-bg, 5%);
43 | border-radius: ($border-radius-large - 1) ($border-radius-large - 1) 0 0;
44 | }
45 |
46 | .popover-content {
47 | padding: 9px 14px;
48 | }
49 |
50 | // Arrows
51 | //
52 | // .arrow is outer, .arrow:after is inner
53 |
54 | .popover > .arrow {
55 | &,
56 | &:after {
57 | position: absolute;
58 | display: block;
59 | width: 0;
60 | height: 0;
61 | border-color: transparent;
62 | border-style: solid;
63 | }
64 | }
65 | .popover > .arrow {
66 | border-width: $popover-arrow-outer-width;
67 | }
68 | .popover > .arrow:after {
69 | border-width: $popover-arrow-width;
70 | content: "";
71 | }
72 |
73 | .popover {
74 | &.top > .arrow {
75 | left: 50%;
76 | margin-left: -$popover-arrow-outer-width;
77 | border-bottom-width: 0;
78 | border-top-color: $popover-arrow-outer-fallback-color; // IE8 fallback
79 | border-top-color: $popover-arrow-outer-color;
80 | bottom: -$popover-arrow-outer-width;
81 | &:after {
82 | content: " ";
83 | bottom: 1px;
84 | margin-left: -$popover-arrow-width;
85 | border-bottom-width: 0;
86 | border-top-color: $popover-arrow-color;
87 | }
88 | }
89 | &.right > .arrow {
90 | top: 50%;
91 | left: -$popover-arrow-outer-width;
92 | margin-top: -$popover-arrow-outer-width;
93 | border-left-width: 0;
94 | border-right-color: $popover-arrow-outer-fallback-color; // IE8 fallback
95 | border-right-color: $popover-arrow-outer-color;
96 | &:after {
97 | content: " ";
98 | left: 1px;
99 | bottom: -$popover-arrow-width;
100 | border-left-width: 0;
101 | border-right-color: $popover-arrow-color;
102 | }
103 | }
104 | &.bottom > .arrow {
105 | left: 50%;
106 | margin-left: -$popover-arrow-outer-width;
107 | border-top-width: 0;
108 | border-bottom-color: $popover-arrow-outer-fallback-color; // IE8 fallback
109 | border-bottom-color: $popover-arrow-outer-color;
110 | top: -$popover-arrow-outer-width;
111 | &:after {
112 | content: " ";
113 | top: 1px;
114 | margin-left: -$popover-arrow-width;
115 | border-top-width: 0;
116 | border-bottom-color: $popover-arrow-color;
117 | }
118 | }
119 |
120 | &.left > .arrow {
121 | top: 50%;
122 | right: -$popover-arrow-outer-width;
123 | margin-top: -$popover-arrow-outer-width;
124 | border-right-width: 0;
125 | border-left-color: $popover-arrow-outer-fallback-color; // IE8 fallback
126 | border-left-color: $popover-arrow-outer-color;
127 | &:after {
128 | content: " ";
129 | right: 1px;
130 | border-right-width: 0;
131 | border-left-color: $popover-arrow-color;
132 | bottom: -$popover-arrow-width;
133 | }
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_print.scss:
--------------------------------------------------------------------------------
1 | /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
2 |
3 | // ==========================================================================
4 | // Print styles.
5 | // Inlined to avoid the additional HTTP request: h5bp.com/r
6 | // ==========================================================================
7 |
8 | @media print {
9 | *,
10 | *:before,
11 | *:after {
12 | background: transparent !important;
13 | color: #000 !important; // Black prints faster: h5bp.com/s
14 | box-shadow: none !important;
15 | text-shadow: none !important;
16 | }
17 |
18 | a,
19 | a:visited {
20 | text-decoration: underline;
21 | }
22 |
23 | a[href]:after {
24 | content: " (" attr(href) ")";
25 | }
26 |
27 | abbr[title]:after {
28 | content: " (" attr(title) ")";
29 | }
30 |
31 | // Don't show links that are fragment identifiers,
32 | // or use the `javascript:` pseudo protocol
33 | a[href^="#"]:after,
34 | a[href^="javascript:"]:after {
35 | content: "";
36 | }
37 |
38 | pre,
39 | blockquote {
40 | border: 1px solid #999;
41 | page-break-inside: avoid;
42 | }
43 |
44 | thead {
45 | display: table-header-group; // h5bp.com/t
46 | }
47 |
48 | tr,
49 | img {
50 | page-break-inside: avoid;
51 | }
52 |
53 | img {
54 | max-width: 100% !important;
55 | }
56 |
57 | p,
58 | h2,
59 | h3 {
60 | orphans: 3;
61 | widows: 3;
62 | }
63 |
64 | h2,
65 | h3 {
66 | page-break-after: avoid;
67 | }
68 |
69 | // Bootstrap specific changes start
70 | //
71 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
72 | // Once fixed, we can just straight up remove this.
73 | select {
74 | background: #fff !important;
75 | }
76 |
77 | // Bootstrap components
78 | .navbar {
79 | display: none;
80 | }
81 | .btn,
82 | .dropup > .btn {
83 | > .caret {
84 | border-top-color: #000 !important;
85 | }
86 | }
87 | .label {
88 | border: 1px solid #000;
89 | }
90 |
91 | .table {
92 | border-collapse: collapse !important;
93 |
94 | td,
95 | th {
96 | background-color: #fff !important;
97 | }
98 | }
99 | .table-bordered {
100 | th,
101 | td {
102 | border: 1px solid #ddd !important;
103 | }
104 | }
105 |
106 | // Bootstrap specific changes end
107 | }
108 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_progress-bars.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Progress bars
3 | // --------------------------------------------------
4 |
5 |
6 | // Bar animations
7 | // -------------------------
8 |
9 | // WebKit
10 | @-webkit-keyframes progress-bar-stripes {
11 | from { background-position: 40px 0; }
12 | to { background-position: 0 0; }
13 | }
14 |
15 | // Spec and IE10+
16 | @keyframes progress-bar-stripes {
17 | from { background-position: 40px 0; }
18 | to { background-position: 0 0; }
19 | }
20 |
21 |
22 | // Bar itself
23 | // -------------------------
24 |
25 | // Outer container
26 | .progress {
27 | overflow: hidden;
28 | height: $line-height-computed;
29 | margin-bottom: $line-height-computed;
30 | background-color: $progress-bg;
31 | border-radius: $progress-border-radius;
32 | @include box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
33 | }
34 |
35 | // Bar of progress
36 | .progress-bar {
37 | float: left;
38 | width: 0%;
39 | height: 100%;
40 | font-size: $font-size-small;
41 | line-height: $line-height-computed;
42 | color: $progress-bar-color;
43 | text-align: center;
44 | background-color: $progress-bar-bg;
45 | @include box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
46 | @include transition(width .6s ease);
47 | }
48 |
49 | // Striped bars
50 | //
51 | // `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
52 | // `.progress-bar-striped` class, which you just add to an existing
53 | // `.progress-bar`.
54 | .progress-striped .progress-bar,
55 | .progress-bar-striped {
56 | @include gradient-striped;
57 | background-size: 40px 40px;
58 | }
59 |
60 | // Call animation for the active one
61 | //
62 | // `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
63 | // `.progress-bar.active` approach.
64 | .progress.active .progress-bar,
65 | .progress-bar.active {
66 | @include animation(progress-bar-stripes 2s linear infinite);
67 | }
68 |
69 |
70 | // Variations
71 | // -------------------------
72 |
73 | .progress-bar-success {
74 | @include progress-bar-variant($progress-bar-success-bg);
75 | }
76 |
77 | .progress-bar-info {
78 | @include progress-bar-variant($progress-bar-info-bg);
79 | }
80 |
81 | .progress-bar-warning {
82 | @include progress-bar-variant($progress-bar-warning-bg);
83 | }
84 |
85 | .progress-bar-danger {
86 | @include progress-bar-variant($progress-bar-danger-bg);
87 | }
88 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_responsive-embed.scss:
--------------------------------------------------------------------------------
1 | // Embeds responsive
2 | //
3 | // Credit: Nicolas Gallagher and SUIT CSS.
4 |
5 | .embed-responsive {
6 | position: relative;
7 | display: block;
8 | height: 0;
9 | padding: 0;
10 | overflow: hidden;
11 |
12 | .embed-responsive-item,
13 | iframe,
14 | embed,
15 | object,
16 | video {
17 | position: absolute;
18 | top: 0;
19 | left: 0;
20 | bottom: 0;
21 | height: 100%;
22 | width: 100%;
23 | border: 0;
24 | }
25 | }
26 |
27 | // Modifier class for 16:9 aspect ratio
28 | .embed-responsive-16by9 {
29 | padding-bottom: 56.25%;
30 | }
31 |
32 | // Modifier class for 4:3 aspect ratio
33 | .embed-responsive-4by3 {
34 | padding-bottom: 75%;
35 | }
36 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_responsive-utilities.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Responsive: Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // IE10 in Windows (Phone) 8
7 | //
8 | // Support for responsive views via media queries is kind of borked in IE10, for
9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix
10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and
11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12 | // our Getting Started page for more information on this bug.
13 | //
14 | // For more information, see the following:
15 | //
16 | // Issue: https://github.com/twbs/bootstrap/issues/10497
17 | // Docs: http://getbootstrap.com/getting-started/#support-ie10-width
18 | // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
19 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
20 |
21 | @-ms-viewport {
22 | width: device-width;
23 | }
24 |
25 |
26 | // Visibility utilities
27 | // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
28 |
29 | @include responsive-invisibility('.visible-xs');
30 | @include responsive-invisibility('.visible-sm');
31 | @include responsive-invisibility('.visible-md');
32 | @include responsive-invisibility('.visible-lg');
33 |
34 | .visible-xs-block,
35 | .visible-xs-inline,
36 | .visible-xs-inline-block,
37 | .visible-sm-block,
38 | .visible-sm-inline,
39 | .visible-sm-inline-block,
40 | .visible-md-block,
41 | .visible-md-inline,
42 | .visible-md-inline-block,
43 | .visible-lg-block,
44 | .visible-lg-inline,
45 | .visible-lg-inline-block {
46 | display: none !important;
47 | }
48 |
49 | @media (max-width: $screen-xs-max) {
50 | @include responsive-visibility('.visible-xs');
51 | }
52 | .visible-xs-block {
53 | @media (max-width: $screen-xs-max) {
54 | display: block !important;
55 | }
56 | }
57 | .visible-xs-inline {
58 | @media (max-width: $screen-xs-max) {
59 | display: inline !important;
60 | }
61 | }
62 | .visible-xs-inline-block {
63 | @media (max-width: $screen-xs-max) {
64 | display: inline-block !important;
65 | }
66 | }
67 |
68 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
69 | @include responsive-visibility('.visible-sm');
70 | }
71 | .visible-sm-block {
72 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
73 | display: block !important;
74 | }
75 | }
76 | .visible-sm-inline {
77 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
78 | display: inline !important;
79 | }
80 | }
81 | .visible-sm-inline-block {
82 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
83 | display: inline-block !important;
84 | }
85 | }
86 |
87 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
88 | @include responsive-visibility('.visible-md');
89 | }
90 | .visible-md-block {
91 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
92 | display: block !important;
93 | }
94 | }
95 | .visible-md-inline {
96 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
97 | display: inline !important;
98 | }
99 | }
100 | .visible-md-inline-block {
101 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
102 | display: inline-block !important;
103 | }
104 | }
105 |
106 | @media (min-width: $screen-lg-min) {
107 | @include responsive-visibility('.visible-lg');
108 | }
109 | .visible-lg-block {
110 | @media (min-width: $screen-lg-min) {
111 | display: block !important;
112 | }
113 | }
114 | .visible-lg-inline {
115 | @media (min-width: $screen-lg-min) {
116 | display: inline !important;
117 | }
118 | }
119 | .visible-lg-inline-block {
120 | @media (min-width: $screen-lg-min) {
121 | display: inline-block !important;
122 | }
123 | }
124 |
125 | @media (max-width: $screen-xs-max) {
126 | @include responsive-invisibility('.hidden-xs');
127 | }
128 |
129 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
130 | @include responsive-invisibility('.hidden-sm');
131 | }
132 |
133 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
134 | @include responsive-invisibility('.hidden-md');
135 | }
136 |
137 | @media (min-width: $screen-lg-min) {
138 | @include responsive-invisibility('.hidden-lg');
139 | }
140 |
141 |
142 | // Print utilities
143 | //
144 | // Media queries are placed on the inside to be mixin-friendly.
145 |
146 | // Note: Deprecated .visible-print as of v3.2.0
147 |
148 | @include responsive-invisibility('.visible-print');
149 |
150 | @media print {
151 | @include responsive-visibility('.visible-print');
152 | }
153 | .visible-print-block {
154 | display: none !important;
155 |
156 | @media print {
157 | display: block !important;
158 | }
159 | }
160 | .visible-print-inline {
161 | display: none !important;
162 |
163 | @media print {
164 | display: inline !important;
165 | }
166 | }
167 | .visible-print-inline-block {
168 | display: none !important;
169 |
170 | @media print {
171 | display: inline-block !important;
172 | }
173 | }
174 |
175 | @media print {
176 | @include responsive-invisibility('.hidden-print');
177 | }
178 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_scaffolding.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Scaffolding
3 | // --------------------------------------------------
4 |
5 |
6 | // Reset the box-sizing
7 | //
8 | // Heads up! This reset may cause conflicts with some third-party widgets.
9 | // For recommendations on resolving such conflicts, see
10 | // http://getbootstrap.com/getting-started/#third-box-sizing
11 | * {
12 | @include box-sizing(border-box);
13 | }
14 | *:before,
15 | *:after {
16 | @include box-sizing(border-box);
17 | }
18 |
19 |
20 | // Body reset
21 |
22 | html {
23 | font-size: 10px;
24 | -webkit-tap-highlight-color: rgba(0,0,0,0);
25 | }
26 |
27 | body {
28 | font-family: $font-family-base;
29 | font-size: $font-size-base;
30 | line-height: $line-height-base;
31 | color: $text-color;
32 | background-color: $body-bg;
33 | }
34 |
35 | // Reset fonts for relevant elements
36 | input,
37 | button,
38 | select,
39 | textarea {
40 | font-family: inherit;
41 | font-size: inherit;
42 | line-height: inherit;
43 | }
44 |
45 |
46 | // Links
47 |
48 | a {
49 | color: $link-color;
50 | text-decoration: none;
51 |
52 | &:hover,
53 | &:focus {
54 | color: $link-hover-color;
55 | text-decoration: $link-hover-decoration;
56 | }
57 |
58 | &:focus {
59 | @include tab-focus;
60 | }
61 | }
62 |
63 |
64 | // Figures
65 | //
66 | // We reset this here because previously Normalize had no `figure` margins. This
67 | // ensures we don't break anyone's use of the element.
68 |
69 | figure {
70 | margin: 0;
71 | }
72 |
73 |
74 | // Images
75 |
76 | img {
77 | vertical-align: middle;
78 | }
79 |
80 | // Responsive images (ensure images don't scale beyond their parents)
81 | .img-responsive {
82 | @include img-responsive;
83 | }
84 |
85 | // Rounded corners
86 | .img-rounded {
87 | border-radius: $border-radius-large;
88 | }
89 |
90 | // Image thumbnails
91 | //
92 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
93 | .img-thumbnail {
94 | padding: $thumbnail-padding;
95 | line-height: $line-height-base;
96 | background-color: $thumbnail-bg;
97 | border: 1px solid $thumbnail-border;
98 | border-radius: $thumbnail-border-radius;
99 | @include transition(all .2s ease-in-out);
100 |
101 | // Keep them at most 100% wide
102 | @include img-responsive(inline-block);
103 | }
104 |
105 | // Perfect circle
106 | .img-circle {
107 | border-radius: 50%; // set radius in percents
108 | }
109 |
110 |
111 | // Horizontal rules
112 |
113 | hr {
114 | margin-top: $line-height-computed;
115 | margin-bottom: $line-height-computed;
116 | border: 0;
117 | border-top: 1px solid $hr-border;
118 | }
119 |
120 |
121 | // Only display content to screen readers
122 | //
123 | // See: http://a11yproject.com/posts/how-to-hide-content/
124 |
125 | .sr-only {
126 | position: absolute;
127 | width: 1px;
128 | height: 1px;
129 | margin: -1px;
130 | padding: 0;
131 | overflow: hidden;
132 | clip: rect(0,0,0,0);
133 | border: 0;
134 | }
135 |
136 | // Use in conjunction with .sr-only to only display content when it's focused.
137 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
138 | // Credit: HTML5 Boilerplate
139 |
140 | .sr-only-focusable {
141 | &:active,
142 | &:focus {
143 | position: static;
144 | width: auto;
145 | height: auto;
146 | margin: 0;
147 | overflow: visible;
148 | clip: auto;
149 | }
150 | }
151 |
152 |
153 | // iOS "clickable elements" fix for role="button"
154 | //
155 | // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
156 | // for traditionally non-focusable elements with role="button"
157 | // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
158 | // Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged
159 |
160 | [role="button"] {
161 | cursor: pointer;
162 | }
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_thumbnails.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Thumbnails
3 | // --------------------------------------------------
4 |
5 |
6 | // Mixin and adjust the regular image class
7 | .thumbnail {
8 | display: block;
9 | padding: $thumbnail-padding;
10 | margin-bottom: $line-height-computed;
11 | line-height: $line-height-base;
12 | background-color: $thumbnail-bg;
13 | border: 1px solid $thumbnail-border;
14 | border-radius: $thumbnail-border-radius;
15 | @include transition(border .2s ease-in-out);
16 |
17 | > img,
18 | a > img {
19 | @include img-responsive;
20 | margin-left: auto;
21 | margin-right: auto;
22 | }
23 |
24 | // [converter] extracted a&:hover, a&:focus, a&.active to a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active
25 |
26 | // Image captions
27 | .caption {
28 | padding: $thumbnail-caption-padding;
29 | color: $thumbnail-caption-color;
30 | }
31 | }
32 |
33 | // Add a hover state for linked versions only
34 | a.thumbnail:hover,
35 | a.thumbnail:focus,
36 | a.thumbnail.active {
37 | border-color: $link-color;
38 | }
39 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_tooltip.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Tooltips
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .tooltip {
8 | position: absolute;
9 | z-index: $zindex-tooltip;
10 | display: block;
11 | // Reset font and text properties given new insertion method
12 | font-family: $font-family-base;
13 | font-size: $font-size-small;
14 | font-weight: normal;
15 | line-height: 1.4;
16 | @include opacity(0);
17 |
18 | &.in { @include opacity($tooltip-opacity); }
19 | &.top { margin-top: -3px; padding: $tooltip-arrow-width 0; }
20 | &.right { margin-left: 3px; padding: 0 $tooltip-arrow-width; }
21 | &.bottom { margin-top: 3px; padding: $tooltip-arrow-width 0; }
22 | &.left { margin-left: -3px; padding: 0 $tooltip-arrow-width; }
23 | }
24 |
25 | // Wrapper for the tooltip content
26 | .tooltip-inner {
27 | max-width: $tooltip-max-width;
28 | padding: 3px 8px;
29 | color: $tooltip-color;
30 | text-align: center;
31 | text-decoration: none;
32 | background-color: $tooltip-bg;
33 | border-radius: $border-radius-base;
34 | }
35 |
36 | // Arrows
37 | .tooltip-arrow {
38 | position: absolute;
39 | width: 0;
40 | height: 0;
41 | border-color: transparent;
42 | border-style: solid;
43 | }
44 | // Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
45 | .tooltip {
46 | &.top .tooltip-arrow {
47 | bottom: 0;
48 | left: 50%;
49 | margin-left: -$tooltip-arrow-width;
50 | border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
51 | border-top-color: $tooltip-arrow-color;
52 | }
53 | &.top-left .tooltip-arrow {
54 | bottom: 0;
55 | right: $tooltip-arrow-width;
56 | margin-bottom: -$tooltip-arrow-width;
57 | border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
58 | border-top-color: $tooltip-arrow-color;
59 | }
60 | &.top-right .tooltip-arrow {
61 | bottom: 0;
62 | left: $tooltip-arrow-width;
63 | margin-bottom: -$tooltip-arrow-width;
64 | border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
65 | border-top-color: $tooltip-arrow-color;
66 | }
67 | &.right .tooltip-arrow {
68 | top: 50%;
69 | left: 0;
70 | margin-top: -$tooltip-arrow-width;
71 | border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0;
72 | border-right-color: $tooltip-arrow-color;
73 | }
74 | &.left .tooltip-arrow {
75 | top: 50%;
76 | right: 0;
77 | margin-top: -$tooltip-arrow-width;
78 | border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width;
79 | border-left-color: $tooltip-arrow-color;
80 | }
81 | &.bottom .tooltip-arrow {
82 | top: 0;
83 | left: 50%;
84 | margin-left: -$tooltip-arrow-width;
85 | border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
86 | border-bottom-color: $tooltip-arrow-color;
87 | }
88 | &.bottom-left .tooltip-arrow {
89 | top: 0;
90 | right: $tooltip-arrow-width;
91 | margin-top: -$tooltip-arrow-width;
92 | border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
93 | border-bottom-color: $tooltip-arrow-color;
94 | }
95 | &.bottom-right .tooltip-arrow {
96 | top: 0;
97 | left: $tooltip-arrow-width;
98 | margin-top: -$tooltip-arrow-width;
99 | border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
100 | border-bottom-color: $tooltip-arrow-color;
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_utilities.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // Floats
7 | // -------------------------
8 |
9 | .clearfix {
10 | @include clearfix;
11 | }
12 | .center-block {
13 | @include center-block;
14 | }
15 | .pull-right {
16 | float: right !important;
17 | }
18 | .pull-left {
19 | float: left !important;
20 | }
21 |
22 |
23 | // Toggling content
24 | // -------------------------
25 |
26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
27 | .hide {
28 | display: none !important;
29 | }
30 | .show {
31 | display: block !important;
32 | }
33 | .invisible {
34 | visibility: hidden;
35 | }
36 | .text-hide {
37 | @include text-hide;
38 | }
39 |
40 |
41 | // Hide from screenreaders and browsers
42 | //
43 | // Credit: HTML5 Boilerplate
44 |
45 | .hidden {
46 | display: none !important;
47 | }
48 |
49 |
50 | // For Affix plugin
51 | // -------------------------
52 |
53 | .affix {
54 | position: fixed;
55 | }
56 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/_wells.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Wells
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .well {
8 | min-height: 20px;
9 | padding: 19px;
10 | margin-bottom: 20px;
11 | background-color: $well-bg;
12 | border: 1px solid $well-border;
13 | border-radius: $border-radius-base;
14 | @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
15 | blockquote {
16 | border-color: #ddd;
17 | border-color: rgba(0,0,0,.15);
18 | }
19 | }
20 |
21 | // Sizes
22 | .well-lg {
23 | padding: 24px;
24 | border-radius: $border-radius-large;
25 | }
26 | .well-sm {
27 | padding: 9px;
28 | border-radius: $border-radius-small;
29 | }
30 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_alerts.scss:
--------------------------------------------------------------------------------
1 | // Alerts
2 |
3 | @mixin alert-variant($background, $border, $text-color) {
4 | background-color: $background;
5 | border-color: $border;
6 | color: $text-color;
7 |
8 | hr {
9 | border-top-color: darken($border, 5%);
10 | }
11 | .alert-link {
12 | color: darken($text-color, 10%);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_background-variant.scss:
--------------------------------------------------------------------------------
1 | // Contextual backgrounds
2 |
3 | // [converter] $parent hack
4 | @mixin bg-variant($parent, $color) {
5 | #{$parent} {
6 | background-color: $color;
7 | }
8 | a#{$parent}:hover {
9 | background-color: darken($color, 10%);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_border-radius.scss:
--------------------------------------------------------------------------------
1 | // Single side border-radius
2 |
3 | @mixin border-top-radius($radius) {
4 | border-top-right-radius: $radius;
5 | border-top-left-radius: $radius;
6 | }
7 | @mixin border-right-radius($radius) {
8 | border-bottom-right-radius: $radius;
9 | border-top-right-radius: $radius;
10 | }
11 | @mixin border-bottom-radius($radius) {
12 | border-bottom-right-radius: $radius;
13 | border-bottom-left-radius: $radius;
14 | }
15 | @mixin border-left-radius($radius) {
16 | border-bottom-left-radius: $radius;
17 | border-top-left-radius: $radius;
18 | }
19 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_buttons.scss:
--------------------------------------------------------------------------------
1 | // Button variants
2 | //
3 | // Easily pump out default styles, as well as :hover, :focus, :active,
4 | // and disabled options for all buttons
5 |
6 | @mixin button-variant($color, $background, $border) {
7 | color: $color;
8 | background-color: $background;
9 | border-color: $border;
10 |
11 | &:hover,
12 | &:focus,
13 | &.focus,
14 | &:active,
15 | &.active,
16 | .open > &.dropdown-toggle {
17 | color: $color;
18 | background-color: darken($background, 10%);
19 | border-color: darken($border, 12%);
20 | }
21 | &:active,
22 | &.active,
23 | .open > &.dropdown-toggle {
24 | background-image: none;
25 | }
26 | &.disabled,
27 | &[disabled],
28 | fieldset[disabled] & {
29 | &,
30 | &:hover,
31 | &:focus,
32 | &.focus,
33 | &:active,
34 | &.active {
35 | background-color: $background;
36 | border-color: $border;
37 | }
38 | }
39 |
40 | .badge {
41 | color: $background;
42 | background-color: $color;
43 | }
44 | }
45 |
46 | // Button sizes
47 | @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
48 | padding: $padding-vertical $padding-horizontal;
49 | font-size: $font-size;
50 | line-height: $line-height;
51 | border-radius: $border-radius;
52 | }
53 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_center-block.scss:
--------------------------------------------------------------------------------
1 | // Center-align a block level element
2 |
3 | @mixin center-block() {
4 | display: block;
5 | margin-left: auto;
6 | margin-right: auto;
7 | }
8 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_clearfix.scss:
--------------------------------------------------------------------------------
1 | // Clearfix
2 | //
3 | // For modern browsers
4 | // 1. The space content is one way to avoid an Opera bug when the
5 | // contenteditable attribute is included anywhere else in the document.
6 | // Otherwise it causes space to appear at the top and bottom of elements
7 | // that are clearfixed.
8 | // 2. The use of `table` rather than `block` is only necessary if using
9 | // `:before` to contain the top-margins of child elements.
10 | //
11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/
12 |
13 | @mixin clearfix() {
14 | &:before,
15 | &:after {
16 | content: " "; // 1
17 | display: table; // 2
18 | }
19 | &:after {
20 | clear: both;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_forms.scss:
--------------------------------------------------------------------------------
1 | // Form validation states
2 | //
3 | // Used in forms.less to generate the form validation CSS for warnings, errors,
4 | // and successes.
5 |
6 | @mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
7 | // Color the label and help text
8 | .help-block,
9 | .control-label,
10 | .radio,
11 | .checkbox,
12 | .radio-inline,
13 | .checkbox-inline,
14 | &.radio label,
15 | &.checkbox label,
16 | &.radio-inline label,
17 | &.checkbox-inline label {
18 | color: $text-color;
19 | }
20 | // Set the border and box shadow on specific inputs to match
21 | .form-control {
22 | border-color: $border-color;
23 | @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
24 | &:focus {
25 | border-color: darken($border-color, 10%);
26 | $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
27 | @include box-shadow($shadow);
28 | }
29 | }
30 | // Set validation states also for addons
31 | .input-group-addon {
32 | color: $text-color;
33 | border-color: $border-color;
34 | background-color: $background-color;
35 | }
36 | // Optional feedback icon
37 | .form-control-feedback {
38 | color: $text-color;
39 | }
40 | }
41 |
42 |
43 | // Form control focus state
44 | //
45 | // Generate a customized focus state and for any input with the specified color,
46 | // which defaults to the `$input-border-focus` variable.
47 | //
48 | // We highly encourage you to not customize the default value, but instead use
49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on
50 | // WebKit's default styles, but applicable to a wider range of browsers. Its
51 | // usability and accessibility should be taken into account with any change.
52 | //
53 | // Example usage: change the default blue border and shadow to white for better
54 | // contrast against a dark gray background.
55 | @mixin form-control-focus($color: $input-border-focus) {
56 | $color-rgba: rgba(red($color), green($color), blue($color), .6);
57 | &:focus {
58 | border-color: $color;
59 | outline: 0;
60 | @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
61 | }
62 | }
63 |
64 | // Form control sizing
65 | //
66 | // Relative text size, padding, and border-radii changes for form controls. For
67 | // horizontal sizing, wrap controls in the predefined grid classes. `
`
68 | // element gets special love because it's special, and that's a fact!
69 | // [converter] $parent hack
70 | @mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
71 | #{$parent} {
72 | height: $input-height;
73 | padding: $padding-vertical $padding-horizontal;
74 | font-size: $font-size;
75 | line-height: $line-height;
76 | border-radius: $border-radius;
77 | }
78 |
79 | select#{$parent} {
80 | height: $input-height;
81 | line-height: $input-height;
82 | }
83 |
84 | textarea#{$parent},
85 | select[multiple]#{$parent} {
86 | height: auto;
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_gradients.scss:
--------------------------------------------------------------------------------
1 | // Gradients
2 |
3 |
4 |
5 | // Horizontal gradient, from left to right
6 | //
7 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
8 | // Color stops are not available in IE9 and below.
9 | @mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
10 | background-image: -webkit-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
11 | background-image: -o-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Opera 12
12 | 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+
13 | background-repeat: repeat-x;
14 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
15 | }
16 |
17 | // Vertical gradient, from top to bottom
18 | //
19 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
20 | // Color stops are not available in IE9 and below.
21 | @mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
22 | background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
23 | background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
24 | 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+
25 | background-repeat: repeat-x;
26 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
27 | }
28 |
29 | @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
30 | background-repeat: repeat-x;
31 | background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
32 | background-image: -o-linear-gradient($deg, $start-color, $end-color); // Opera 12
33 | background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
34 | }
35 | @mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
36 | background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
37 | background-image: -o-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
38 | background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
39 | background-repeat: no-repeat;
40 | 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
41 | }
42 | @mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
43 | background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
44 | background-image: -o-linear-gradient($start-color, $mid-color $color-stop, $end-color);
45 | background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
46 | background-repeat: no-repeat;
47 | 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
48 | }
49 | @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
50 | background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
51 | background-image: radial-gradient(circle, $inner-color, $outer-color);
52 | background-repeat: no-repeat;
53 | }
54 | @mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
55 | background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
56 | background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
57 | background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
58 | }
59 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_grid-framework.scss:
--------------------------------------------------------------------------------
1 | // Framework grid generation
2 | //
3 | // Used only by Bootstrap to generate the correct number of grid classes given
4 | // any value of `$grid-columns`.
5 |
6 | // [converter] This is defined recursively in LESS, but Sass supports real loops
7 | @mixin make-grid-columns($i: 1, $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}") {
8 | @for $i from (1 + 1) through $grid-columns {
9 | $list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
10 | }
11 | #{$list} {
12 | position: relative;
13 | // Prevent columns from collapsing when empty
14 | min-height: 1px;
15 | // Inner gutter via padding
16 | padding-left: ($grid-gutter-width / 2);
17 | padding-right: ($grid-gutter-width / 2);
18 | }
19 | }
20 |
21 |
22 | // [converter] This is defined recursively in LESS, but Sass supports real loops
23 | @mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
24 | @for $i from (1 + 1) through $grid-columns {
25 | $list: "#{$list}, .col-#{$class}-#{$i}";
26 | }
27 | #{$list} {
28 | float: left;
29 | }
30 | }
31 |
32 |
33 | @mixin calc-grid-column($index, $class, $type) {
34 | @if ($type == width) and ($index > 0) {
35 | .col-#{$class}-#{$index} {
36 | width: percentage(($index / $grid-columns));
37 | }
38 | }
39 | @if ($type == push) and ($index > 0) {
40 | .col-#{$class}-push-#{$index} {
41 | left: percentage(($index / $grid-columns));
42 | }
43 | }
44 | @if ($type == push) and ($index == 0) {
45 | .col-#{$class}-push-0 {
46 | left: auto;
47 | }
48 | }
49 | @if ($type == pull) and ($index > 0) {
50 | .col-#{$class}-pull-#{$index} {
51 | right: percentage(($index / $grid-columns));
52 | }
53 | }
54 | @if ($type == pull) and ($index == 0) {
55 | .col-#{$class}-pull-0 {
56 | right: auto;
57 | }
58 | }
59 | @if ($type == offset) {
60 | .col-#{$class}-offset-#{$index} {
61 | margin-left: percentage(($index / $grid-columns));
62 | }
63 | }
64 | }
65 |
66 | // [converter] This is defined recursively in LESS, but Sass supports real loops
67 | @mixin loop-grid-columns($columns, $class, $type) {
68 | @for $i from 0 through $columns {
69 | @include calc-grid-column($i, $class, $type);
70 | }
71 | }
72 |
73 |
74 | // Create grid for specific class
75 | @mixin make-grid($class) {
76 | @include float-grid-columns($class);
77 | @include loop-grid-columns($grid-columns, $class, width);
78 | @include loop-grid-columns($grid-columns, $class, pull);
79 | @include loop-grid-columns($grid-columns, $class, push);
80 | @include loop-grid-columns($grid-columns, $class, offset);
81 | }
82 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_grid.scss:
--------------------------------------------------------------------------------
1 | // Grid system
2 | //
3 | // Generate semantic grid columns with these mixins.
4 |
5 | // Centered container element
6 | @mixin container-fixed($gutter: $grid-gutter-width) {
7 | margin-right: auto;
8 | margin-left: auto;
9 | padding-left: ($gutter / 2);
10 | padding-right: ($gutter / 2);
11 | @include clearfix;
12 | }
13 |
14 | // Creates a wrapper for a series of columns
15 | @mixin make-row($gutter: $grid-gutter-width) {
16 | margin-left: ($gutter / -2);
17 | margin-right: ($gutter / -2);
18 | @include clearfix;
19 | }
20 |
21 | // Generate the extra small columns
22 | @mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
23 | position: relative;
24 | float: left;
25 | width: percentage(($columns / $grid-columns));
26 | min-height: 1px;
27 | padding-left: ($gutter / 2);
28 | padding-right: ($gutter / 2);
29 | }
30 | @mixin make-xs-column-offset($columns) {
31 | margin-left: percentage(($columns / $grid-columns));
32 | }
33 | @mixin make-xs-column-push($columns) {
34 | left: percentage(($columns / $grid-columns));
35 | }
36 | @mixin make-xs-column-pull($columns) {
37 | right: percentage(($columns / $grid-columns));
38 | }
39 |
40 | // Generate the small columns
41 | @mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
42 | position: relative;
43 | min-height: 1px;
44 | padding-left: ($gutter / 2);
45 | padding-right: ($gutter / 2);
46 |
47 | @media (min-width: $screen-sm-min) {
48 | float: left;
49 | width: percentage(($columns / $grid-columns));
50 | }
51 | }
52 | @mixin make-sm-column-offset($columns) {
53 | @media (min-width: $screen-sm-min) {
54 | margin-left: percentage(($columns / $grid-columns));
55 | }
56 | }
57 | @mixin make-sm-column-push($columns) {
58 | @media (min-width: $screen-sm-min) {
59 | left: percentage(($columns / $grid-columns));
60 | }
61 | }
62 | @mixin make-sm-column-pull($columns) {
63 | @media (min-width: $screen-sm-min) {
64 | right: percentage(($columns / $grid-columns));
65 | }
66 | }
67 |
68 | // Generate the medium columns
69 | @mixin make-md-column($columns, $gutter: $grid-gutter-width) {
70 | position: relative;
71 | min-height: 1px;
72 | padding-left: ($gutter / 2);
73 | padding-right: ($gutter / 2);
74 |
75 | @media (min-width: $screen-md-min) {
76 | float: left;
77 | width: percentage(($columns / $grid-columns));
78 | }
79 | }
80 | @mixin make-md-column-offset($columns) {
81 | @media (min-width: $screen-md-min) {
82 | margin-left: percentage(($columns / $grid-columns));
83 | }
84 | }
85 | @mixin make-md-column-push($columns) {
86 | @media (min-width: $screen-md-min) {
87 | left: percentage(($columns / $grid-columns));
88 | }
89 | }
90 | @mixin make-md-column-pull($columns) {
91 | @media (min-width: $screen-md-min) {
92 | right: percentage(($columns / $grid-columns));
93 | }
94 | }
95 |
96 | // Generate the large columns
97 | @mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
98 | position: relative;
99 | min-height: 1px;
100 | padding-left: ($gutter / 2);
101 | padding-right: ($gutter / 2);
102 |
103 | @media (min-width: $screen-lg-min) {
104 | float: left;
105 | width: percentage(($columns / $grid-columns));
106 | }
107 | }
108 | @mixin make-lg-column-offset($columns) {
109 | @media (min-width: $screen-lg-min) {
110 | margin-left: percentage(($columns / $grid-columns));
111 | }
112 | }
113 | @mixin make-lg-column-push($columns) {
114 | @media (min-width: $screen-lg-min) {
115 | left: percentage(($columns / $grid-columns));
116 | }
117 | }
118 | @mixin make-lg-column-pull($columns) {
119 | @media (min-width: $screen-lg-min) {
120 | right: percentage(($columns / $grid-columns));
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_hide-text.scss:
--------------------------------------------------------------------------------
1 | // CSS image replacement
2 | //
3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
4 | // mixins being reused as classes with the same name, this doesn't hold up. As
5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
6 | //
7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
8 |
9 | // Deprecated as of v3.0.1 (will be removed in v4)
10 | @mixin hide-text() {
11 | font: 0/0 a;
12 | color: transparent;
13 | text-shadow: none;
14 | background-color: transparent;
15 | border: 0;
16 | }
17 |
18 | // New mixin to use as of v3.0.1
19 | @mixin text-hide() {
20 | @include hide-text;
21 | }
22 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_image.scss:
--------------------------------------------------------------------------------
1 | // Image Mixins
2 | // - Responsive image
3 | // - Retina image
4 |
5 |
6 | // Responsive image
7 | //
8 | // Keep images from scaling beyond the width of their parents.
9 | @mixin img-responsive($display: block) {
10 | display: $display;
11 | max-width: 100%; // Part 1: Set a maximum relative to the parent
12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
13 | }
14 |
15 |
16 | // Retina image
17 | //
18 | // Short retina mixin for setting background-image and -size. Note that the
19 | // spelling of `min--moz-device-pixel-ratio` is intentional.
20 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
21 | background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
22 |
23 | @media
24 | only screen and (-webkit-min-device-pixel-ratio: 2),
25 | only screen and ( min--moz-device-pixel-ratio: 2),
26 | only screen and ( -o-min-device-pixel-ratio: 2/1),
27 | only screen and ( min-device-pixel-ratio: 2),
28 | only screen and ( min-resolution: 192dpi),
29 | only screen and ( min-resolution: 2dppx) {
30 | background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
31 | background-size: $width-1x $height-1x;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_labels.scss:
--------------------------------------------------------------------------------
1 | // Labels
2 |
3 | @mixin label-variant($color) {
4 | background-color: $color;
5 |
6 | &[href] {
7 | &:hover,
8 | &:focus {
9 | background-color: darken($color, 10%);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_list-group.scss:
--------------------------------------------------------------------------------
1 | // List Groups
2 |
3 | @mixin list-group-item-variant($state, $background, $color) {
4 | .list-group-item-#{$state} {
5 | color: $color;
6 | background-color: $background;
7 |
8 | // [converter] extracted a& to a.list-group-item-#{$state}
9 | }
10 |
11 | a.list-group-item-#{$state} {
12 | color: $color;
13 |
14 | .list-group-item-heading {
15 | color: inherit;
16 | }
17 |
18 | &:hover,
19 | &:focus {
20 | color: $color;
21 | background-color: darken($background, 5%);
22 | }
23 | &.active,
24 | &.active:hover,
25 | &.active:focus {
26 | color: #fff;
27 | background-color: $color;
28 | border-color: $color;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_nav-divider.scss:
--------------------------------------------------------------------------------
1 | // Horizontal dividers
2 | //
3 | // Dividers (basically an hr) within dropdowns and nav lists
4 |
5 | @mixin nav-divider($color: #e5e5e5) {
6 | height: 1px;
7 | margin: (($line-height-computed / 2) - 1) 0;
8 | overflow: hidden;
9 | background-color: $color;
10 | }
11 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_nav-vertical-align.scss:
--------------------------------------------------------------------------------
1 | // Navbar vertical align
2 | //
3 | // Vertically center elements in the navbar.
4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
5 |
6 | @mixin navbar-vertical-align($element-height) {
7 | margin-top: (($navbar-height - $element-height) / 2);
8 | margin-bottom: (($navbar-height - $element-height) / 2);
9 | }
10 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_opacity.scss:
--------------------------------------------------------------------------------
1 | // Opacity
2 |
3 | @mixin opacity($opacity) {
4 | opacity: $opacity;
5 | // IE8 filter
6 | $opacity-ie: ($opacity * 100);
7 | filter: alpha(opacity=$opacity-ie);
8 | }
9 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_pagination.scss:
--------------------------------------------------------------------------------
1 | // Pagination
2 |
3 | @mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
4 | > li {
5 | > a,
6 | > span {
7 | padding: $padding-vertical $padding-horizontal;
8 | font-size: $font-size;
9 | }
10 | &:first-child {
11 | > a,
12 | > span {
13 | @include border-left-radius($border-radius);
14 | }
15 | }
16 | &:last-child {
17 | > a,
18 | > span {
19 | @include border-right-radius($border-radius);
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_panels.scss:
--------------------------------------------------------------------------------
1 | // Panels
2 |
3 | @mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
4 | border-color: $border;
5 |
6 | & > .panel-heading {
7 | color: $heading-text-color;
8 | background-color: $heading-bg-color;
9 | border-color: $heading-border;
10 |
11 | + .panel-collapse > .panel-body {
12 | border-top-color: $border;
13 | }
14 | .badge {
15 | color: $heading-bg-color;
16 | background-color: $heading-text-color;
17 | }
18 | }
19 | & > .panel-footer {
20 | + .panel-collapse > .panel-body {
21 | border-bottom-color: $border;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_progress-bar.scss:
--------------------------------------------------------------------------------
1 | // Progress bars
2 |
3 | @mixin progress-bar-variant($color) {
4 | background-color: $color;
5 |
6 | // Deprecated parent class requirement as of v3.2.0
7 | .progress-striped & {
8 | @include gradient-striped;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_reset-filter.scss:
--------------------------------------------------------------------------------
1 | // Reset filters for IE
2 | //
3 | // When you need to remove a gradient background, do not forget to use this to reset
4 | // the IE filter for IE9 and below.
5 |
6 | @mixin reset-filter() {
7 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
8 | }
9 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_resize.scss:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | @mixin resizable($direction) {
4 | resize: $direction; // Options: horizontal, vertical, both
5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
6 | }
7 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_responsive-visibility.scss:
--------------------------------------------------------------------------------
1 | // Responsive utilities
2 |
3 | //
4 | // More easily include all the states for responsive-utilities.less.
5 | // [converter] $parent hack
6 | @mixin responsive-visibility($parent) {
7 | #{$parent} {
8 | display: block !important;
9 | }
10 | table#{$parent} { display: table; }
11 | tr#{$parent} { display: table-row !important; }
12 | th#{$parent},
13 | td#{$parent} { display: table-cell !important; }
14 | }
15 |
16 | // [converter] $parent hack
17 | @mixin responsive-invisibility($parent) {
18 | #{$parent} {
19 | display: none !important;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_size.scss:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | @mixin size($width, $height) {
4 | width: $width;
5 | height: $height;
6 | }
7 |
8 | @mixin square($size) {
9 | @include size($size, $size);
10 | }
11 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_tab-focus.scss:
--------------------------------------------------------------------------------
1 | // WebKit-style focus
2 |
3 | @mixin tab-focus() {
4 | // Default
5 | outline: thin dotted;
6 | // WebKit
7 | outline: 5px auto -webkit-focus-ring-color;
8 | outline-offset: -2px;
9 | }
10 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_table-row.scss:
--------------------------------------------------------------------------------
1 | // Tables
2 |
3 | @mixin table-row-variant($state, $background) {
4 | // Exact selectors below required to override `.table-striped` and prevent
5 | // inheritance to nested tables.
6 | .table > thead > tr,
7 | .table > tbody > tr,
8 | .table > tfoot > tr {
9 | > td.#{$state},
10 | > th.#{$state},
11 | &.#{$state} > td,
12 | &.#{$state} > th {
13 | background-color: $background;
14 | }
15 | }
16 |
17 | // Hover states for `.table-hover`
18 | // Note: this is not available for cells or rows within `thead` or `tfoot`.
19 | .table-hover > tbody > tr {
20 | > td.#{$state}:hover,
21 | > th.#{$state}:hover,
22 | &.#{$state}:hover > td,
23 | &:hover > .#{$state},
24 | &.#{$state}:hover > th {
25 | background-color: darken($background, 5%);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_text-emphasis.scss:
--------------------------------------------------------------------------------
1 | // Typography
2 |
3 | // [converter] $parent hack
4 | @mixin text-emphasis-variant($parent, $color) {
5 | #{$parent} {
6 | color: $color;
7 | }
8 | a#{$parent}:hover {
9 | color: darken($color, 10%);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/bootstrap/mixins/_text-overflow.scss:
--------------------------------------------------------------------------------
1 | // Text overflow
2 | // Requires inline-block or block for proper styling
3 |
4 | @mixin text-overflow() {
5 | overflow: hidden;
6 | text-overflow: ellipsis;
7 | white-space: nowrap;
8 | }
9 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "font-awesome/variables";
7 | @import "font-awesome/mixins";
8 | @import "font-awesome/path";
9 | @import "font-awesome/core";
10 | @import "font-awesome/larger";
11 | @import "font-awesome/fixed-width";
12 | @import "font-awesome/list";
13 | @import "font-awesome/bordered-pulled";
14 | @import "font-awesome/animated";
15 | @import "font-awesome/rotated-flipped";
16 | @import "font-awesome/stacked";
17 | @import "font-awesome/icons";
18 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_animated.scss:
--------------------------------------------------------------------------------
1 | // Spinning Icons
2 | // --------------------------
3 |
4 | .#{$fa-css-prefix}-spin {
5 | -webkit-animation: fa-spin 2s infinite linear;
6 | animation: fa-spin 2s infinite linear;
7 | }
8 |
9 | .#{$fa-css-prefix}-pulse {
10 | -webkit-animation: fa-spin 1s infinite steps(8);
11 | animation: fa-spin 1s infinite steps(8);
12 | }
13 |
14 | @-webkit-keyframes fa-spin {
15 | 0% {
16 | -webkit-transform: rotate(0deg);
17 | transform: rotate(0deg);
18 | }
19 | 100% {
20 | -webkit-transform: rotate(359deg);
21 | transform: rotate(359deg);
22 | }
23 | }
24 |
25 | @keyframes fa-spin {
26 | 0% {
27 | -webkit-transform: rotate(0deg);
28 | transform: rotate(0deg);
29 | }
30 | 100% {
31 | -webkit-transform: rotate(359deg);
32 | transform: rotate(359deg);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_bordered-pulled.scss:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em $fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .pull-right { float: right; }
11 | .pull-left { float: left; }
12 |
13 | .#{$fa-css-prefix} {
14 | &.pull-left { margin-right: .3em; }
15 | &.pull-right { margin-left: .3em; }
16 | }
17 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_core.scss:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix} {
5 | display: inline-block;
6 | font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_fixed-width.scss:
--------------------------------------------------------------------------------
1 | // Fixed Width Icons
2 | // -------------------------
3 | .#{$fa-css-prefix}-fw {
4 | width: (18em / 14);
5 | text-align: center;
6 | }
7 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_larger.scss:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .#{$fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .#{$fa-css-prefix}-2x { font-size: 2em; }
11 | .#{$fa-css-prefix}-3x { font-size: 3em; }
12 | .#{$fa-css-prefix}-4x { font-size: 4em; }
13 | .#{$fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_list.scss:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: $fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .#{$fa-css-prefix}-li {
11 | position: absolute;
12 | left: -$fa-li-width;
13 | width: $fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.#{$fa-css-prefix}-lg {
17 | left: -$fa-li-width + (4em / 14);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | @mixin fa-icon() {
5 | display: inline-block;
6 | font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox
12 |
13 | }
14 |
15 | @mixin fa-icon-rotate($degrees, $rotation) {
16 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
17 | -webkit-transform: rotate($degrees);
18 | -ms-transform: rotate($degrees);
19 | transform: rotate($degrees);
20 | }
21 |
22 | @mixin fa-icon-flip($horiz, $vert, $rotation) {
23 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
24 | -webkit-transform: scale($horiz, $vert);
25 | -ms-transform: scale($horiz, $vert);
26 | transform: scale($horiz, $vert);
27 | }
28 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_path.scss:
--------------------------------------------------------------------------------
1 | /* FONT PATH
2 | * -------------------------- */
3 |
4 | @font-face {
5 | font-family: 'FontAwesome';
6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),
9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
13 | font-weight: normal;
14 | font-style: normal;
15 | }
16 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_rotated-flipped.scss:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
7 |
8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
10 |
11 | // Hook for IE8-9
12 | // -------------------------
13 |
14 | :root .#{$fa-css-prefix}-rotate-90,
15 | :root .#{$fa-css-prefix}-rotate-180,
16 | :root .#{$fa-css-prefix}-rotate-270,
17 | :root .#{$fa-css-prefix}-flip-horizontal,
18 | :root .#{$fa-css-prefix}-flip-vertical {
19 | filter: none;
20 | }
21 |
--------------------------------------------------------------------------------
/app/Resources/assets/scss/font-awesome/_stacked.scss:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; }
21 |
--------------------------------------------------------------------------------
/app/Resources/translations/messages.ro.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | title.post_list
7 | Lista de articole
8 |
9 |
10 | action.show
11 | Vezi
12 |
13 |
14 | action.edit
15 | Modifică
16 |
17 |
18 | action.create_post
19 | Creează un articol nou
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/Resources/translations/validators.cs.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | post.blank_summary
7 | Napište shrnutí příspěvku!
8 |
9 |
10 | post.too_short_content
11 | Příspěvek je příliš krátký (musí mít minimálně {{ limit }} znak)|Příspěvek je příliš krátký (musí mít minimálně {{ limit }} znaky)|Příspěvek je příliš krátký (musí mít minimálně {{ limit }} znaků)
12 |
13 |
17 |
21 |
25 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/Resources/translations/validators.en.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | post.blank_summary
7 | Give your post a summary!
8 |
9 |
10 | post.too_short_content
11 | Post content is too short ({{ limit }} characters minimum)
12 |
13 |
17 |
21 |
25 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/Resources/translations/validators.es.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | post.blank_summary
7 | No es posible dejar el resumen del artículo vacío.
8 |
9 |
10 | post.too_short_content
11 | El contenido del artículo es demasiado corto ({{ limit }} caracteres como mínimo)
12 |
13 |
17 |
21 |
25 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/Resources/translations/validators.fr.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | post.blank_summary
7 | Veuillez donner un résumé à votre post.
8 |
9 |
10 | post.too_short_content
11 | Le contenu de votre post est trop court ({{ limit }} caractères minimum)
12 |
13 |
17 |
21 |
25 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/Resources/translations/validators.pt_BR.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | post.blank_summary
7 | Informe um sumário para o seu post!
8 |
9 |
10 | post.too_short_content
11 | O conteúdo do post está muito curto (mínimo de {{ limit }} caracteres)
12 |
13 |
17 |
21 |
25 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/Resources/translations/validators.ru.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | post.blank_summary
7 | Введите краткое содержание вашей записи!
8 |
9 |
10 | post.too_short_content
11 | Содержание записи слишком короткое (минимум {{ limit }} символов).
12 |
13 |
17 |
21 |
25 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/Resources/translations/validators.uk.xliff:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | post.blank_summary
7 | Введіть короткий зміст вашого запису!
8 |
9 |
10 | post.too_short_content
11 | Зміст запису занадто короткий (мінімум {{limit}} символів).
12 |
13 |
17 |
21 |
25 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/autoload.php:
--------------------------------------------------------------------------------
1 | getPhpIniConfigPath();
8 |
9 | echo_title('Symfony2 Requirements Checker');
10 |
11 | echo '> PHP is using the following php.ini file:'.PHP_EOL;
12 | if ($iniPath) {
13 | echo_style('green', ' '.$iniPath);
14 | } else {
15 | echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!');
16 | }
17 |
18 | echo PHP_EOL.PHP_EOL;
19 |
20 | echo '> Checking Symfony requirements:'.PHP_EOL.' ';
21 |
22 | $messages = array();
23 | foreach ($symfonyRequirements->getRequirements() as $req) {
24 | /** @var $req Requirement */
25 | if ($helpText = get_error_message($req, $lineSize)) {
26 | echo_style('red', 'E');
27 | $messages['error'][] = $helpText;
28 | } else {
29 | echo_style('green', '.');
30 | }
31 | }
32 |
33 | $checkPassed = empty($messages['error']);
34 |
35 | foreach ($symfonyRequirements->getRecommendations() as $req) {
36 | if ($helpText = get_error_message($req, $lineSize)) {
37 | echo_style('yellow', 'W');
38 | $messages['warning'][] = $helpText;
39 | } else {
40 | echo_style('green', '.');
41 | }
42 | }
43 |
44 | if ($checkPassed) {
45 | echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects');
46 | } else {
47 | echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects');
48 |
49 | echo_title('Fix the following mandatory requirements', 'red');
50 |
51 | foreach ($messages['error'] as $helpText) {
52 | echo ' * '.$helpText.PHP_EOL;
53 | }
54 | }
55 |
56 | if (!empty($messages['warning'])) {
57 | echo_title('Optional recommendations to improve your setup', 'yellow');
58 |
59 | foreach ($messages['warning'] as $helpText) {
60 | echo ' * '.$helpText.PHP_EOL;
61 | }
62 | }
63 |
64 | echo PHP_EOL;
65 | echo_style('title', 'Note');
66 | echo ' The command console could use a different php.ini file'.PHP_EOL;
67 | echo_style('title', '~~~~');
68 | echo ' than the one used with your web server. To be on the'.PHP_EOL;
69 | echo ' safe side, please check the requirements from your web'.PHP_EOL;
70 | echo ' server using the ';
71 | echo_style('yellow', 'web/config.php');
72 | echo ' script.'.PHP_EOL;
73 | echo PHP_EOL;
74 |
75 | exit($checkPassed ? 0 : 1);
76 |
77 | function get_error_message(Requirement $requirement, $lineSize)
78 | {
79 | if ($requirement->isFulfilled()) {
80 | return;
81 | }
82 |
83 | $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
84 | $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
85 |
86 | return $errorMessage;
87 | }
88 |
89 | function echo_title($title, $style = null)
90 | {
91 | $style = $style ?: 'title';
92 |
93 | echo PHP_EOL;
94 | echo_style($style, $title.PHP_EOL);
95 | echo_style($style, str_repeat('~', strlen($title)).PHP_EOL);
96 | echo PHP_EOL;
97 | }
98 |
99 | function echo_style($style, $message)
100 | {
101 | // ANSI color codes
102 | $styles = array(
103 | 'reset' => "\033[0m",
104 | 'red' => "\033[31m",
105 | 'green' => "\033[32m",
106 | 'yellow' => "\033[33m",
107 | 'error' => "\033[37;41m",
108 | 'success' => "\033[37;42m",
109 | 'title' => "\033[34m",
110 | );
111 | $supports = has_color_support();
112 |
113 | echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
114 | }
115 |
116 | function echo_block($style, $title, $message)
117 | {
118 | $message = ' '.trim($message).' ';
119 | $width = strlen($message);
120 |
121 | echo PHP_EOL.PHP_EOL;
122 |
123 | echo_style($style, str_repeat(' ', $width).PHP_EOL);
124 | echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL);
125 | echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
126 | echo_style($style, str_repeat(' ', $width).PHP_EOL);
127 | }
128 |
129 | function has_color_support()
130 | {
131 | static $support;
132 |
133 | if (null === $support) {
134 | if (DIRECTORY_SEPARATOR == '\\') {
135 | $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
136 | } else {
137 | $support = function_exists('posix_isatty') && @posix_isatty(STDOUT);
138 | }
139 | }
140 |
141 | return $support;
142 | }
143 |
--------------------------------------------------------------------------------
/app/config/config.yml:
--------------------------------------------------------------------------------
1 | # This is the main configuration file of your application. It stores all the
2 | # common options for every execution environment ('prod', 'dev', 'test').
3 |
4 | # To avoid creating configuration files that are too long, we first import some
5 | # files that define the values for important parts of the Symfony application,
6 | # such as the security component and the dependency injection services
7 | imports:
8 | - { resource: parameters.yml }
9 | - { resource: security.yml }
10 |
11 | # These are the configuration parameters that define the application's behavior
12 | # and which are independent from the underlying technical infrastructure
13 | # See http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
14 | parameters:
15 | # This parameter defines the codes of the locales (languages) enabled in the application
16 | app_locales: en|fr|de|es|cs|ru|uk|ro|pt_BR
17 |
18 | # Basic configuration for the Symfony framework features
19 | framework:
20 | # Uncomment the 'ide' option to turn all of the file paths in an exception
21 | # page into clickable links that open the given file using your favorite IDE.
22 | # Supported values are 'textmate', 'macvim', 'emacs' and 'sublime' shortcuts
23 | # and any custom configuration string, such as: "phpstorm://open?file=%%f&line=%%l"
24 | # See http://symfony.com/doc/current/reference/configuration/framework.html#ide
25 | ide: sublime
26 |
27 | # esi: ~
28 | translator: { fallback: "%locale%" }
29 | secret: "%secret%"
30 | router:
31 | resource: "%kernel.root_dir%/config/routing.yml"
32 | strict_requirements: ~
33 | form: ~
34 | csrf_protection: ~
35 | validation: { enable_annotations: true }
36 | templating:
37 | engines: ['twig']
38 | default_locale: "%locale%"
39 | trusted_hosts: ~
40 | trusted_proxies: ~
41 | session:
42 | # handler_id set to null will use default session handler from php.ini
43 | handler_id: ~
44 | fragments: ~
45 | http_method_override: true
46 |
47 | # Twig Configuration (used for rendering application templates)
48 | twig:
49 | debug: "%kernel.debug%"
50 | strict_variables: "%kernel.debug%"
51 | form_themes:
52 | - "bootstrap_3_layout.html.twig"
53 |
54 | # Assetic Configuration (used for managing web assets: CSS, JavaScript, Sass, etc.)
55 | assetic:
56 | debug: "%kernel.debug%"
57 | use_controller: false
58 | bundles: [ "AcmeBlogBundle", "AcmeApiClientBundle" ]
59 | # filters:
60 | # cssrewrite: ~
61 | # jsqueeze: ~
62 | # scssphp:
63 | # # the formatter must be the FQCN (don't use the 'compressed' value)
64 | # formatter: "Leafo\\ScssPhp\\Formatter\\Compressed"
65 |
66 | # Doctrine Configuration (used to access databases and manipulate their information)
67 | doctrine:
68 | dbal:
69 | # instead of configuring the database access options in this file, we pull
70 | # them from the app/config/parameters.yml file. The reason is that config.yml
71 | # stores options that change the application behavior and parameters.yml
72 | # stores options that change from one server to another
73 | driver: "%database_driver%"
74 | host: "%database_host%"
75 | port: "%database_port%"
76 | dbname: "%database_name%"
77 | user: "%database_user%"
78 | password: "%database_password%"
79 | charset: UTF8
80 | # if using pdo_sqlite as your database driver, add the path in parameters.yml
81 | # e.g. database_path: "%kernel.root_dir%/data/data.db3"
82 |
83 | orm:
84 | auto_generate_proxy_classes: "%kernel.debug%"
85 | auto_mapping: true
86 |
87 | # Swiftmailer Configuration (used to send emails)
88 | swiftmailer:
89 | transport: "%mailer_transport%"
90 | host: "%mailer_host%"
91 | username: "%mailer_user%"
92 | password: "%mailer_password%"
93 | spool: { type: memory }
94 |
95 | fos_rest:
96 | param_fetcher_listener: true
97 | view:
98 | view_response_listener: 'force'
99 | formats:
100 | xml: true
101 | json: true
102 | templating_formats:
103 | html: true
104 | format_listener:
105 | rules:
106 | - { path: ^/, priorities: [ html, json, xml ], fallback_format: ~, prefer_extension: true }
107 | exception:
108 | codes:
109 | 'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
110 | 'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
111 | messages:
112 | 'Symfony\Component\Routing\Exception\ResourceNotFoundException': true
113 | allowed_methods_listener: true
114 | access_denied_listener:
115 | json: true
116 | body_listener: true
117 | disable_csrf_role: ROLE_API
118 |
119 | sp_bower:
120 | bundles:
121 | AcmeApiClientBundle: ~
122 | assetic: false
123 |
124 | fos_user:
125 | db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
126 | firewall_name: main
127 | user_class: Acme\BlogBundle\Entity\User
128 |
--------------------------------------------------------------------------------
/app/config/config_dev.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config.yml }
3 |
4 | framework:
5 | router:
6 | resource: "%kernel.root_dir%/config/routing_dev.yml"
7 | strict_requirements: true
8 | profiler: { only_exceptions: false }
9 |
10 | web_profiler:
11 | toolbar: %kernel.debug%
12 | intercept_redirects: false
13 |
14 | monolog:
15 | handlers:
16 | main:
17 | type: stream
18 | path: "%kernel.logs_dir%/%kernel.environment%.log"
19 | level: info
20 | console:
21 | type: console
22 | bubble: false
23 | # uncomment to get logging in your browser
24 | # you may have to allow bigger header sizes in your Web server configuration
25 | #firephp:
26 | # type: firephp
27 | # level: info
28 | #chromephp:
29 | # type: chromephp
30 | # level: info
31 |
32 | assetic:
33 | use_controller: false
34 |
35 | #swiftmailer:
36 | # delivery_address: me@example.com
37 |
--------------------------------------------------------------------------------
/app/config/config_prod.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config.yml }
3 |
4 | #framework:
5 | # validation:
6 | # cache: apc
7 |
8 | #doctrine:
9 | # orm:
10 | # metadata_cache_driver: apc
11 | # result_cache_driver: apc
12 | # query_cache_driver: apc
13 |
14 | monolog:
15 | handlers:
16 | main:
17 | type: fingers_crossed
18 | action_level: error
19 | handler: nested
20 | nested:
21 | type: stream
22 | path: "%kernel.logs_dir%/%kernel.environment%.log"
23 | level: debug
24 | console:
25 | type: console
26 |
--------------------------------------------------------------------------------
/app/config/config_test.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config_dev.yml }
3 |
4 | framework:
5 | test: ~
6 | session:
7 | storage_id: session.storage.mock_file
8 | profiler:
9 | collect: false
10 |
11 | web_profiler:
12 | toolbar: false
13 | intercept_redirects: false
14 |
15 | swiftmailer:
16 | disable_delivery: true
17 |
18 | # It's recommended to use a separate database for tests. This allows to have a
19 | # fixed and known set of data fixtures, it simplifies the code of tests and it
20 | # makes them more robust.
21 | # In this case we just need to define a different path for the application database.
22 | doctrine:
23 | dbal:
24 | path: "%kernel.root_dir%/data/blog_test.sqlite"
25 |
26 | # this configuration simplifies testing URLs protected by the security mechanism
27 | # See http://symfony.com/doc/current/cookbook/testing/http_authentication.html
28 | security:
29 | firewalls:
30 | secured_area:
31 | http_basic: ~
32 |
--------------------------------------------------------------------------------
/app/config/parameters.yml.dist:
--------------------------------------------------------------------------------
1 | # This file defines the canonical configuration parameters of the application.
2 | # Symfony uses this file as a template to generate the real app/config/parameters.yml
3 | # used by the application.
4 | # See http://symfony.com/doc/current/best_practices/configuration.html#canonical-parameters
5 | parameters:
6 | # this demo application uses an embedded SQLite database to simplify setup.
7 | # in a real Symfony application you probably will use a MySQL or PostgreSQL database
8 | database_driver: pdo_sqlite
9 | database_host: 127.0.0.1
10 | database_port: ~
11 | database_name: symfony
12 | database_user: root
13 | database_password: ~
14 | # the 'database_path' is only used for SQLite type databases
15 | database_path: %kernel.root_dir%/data/blog.sqlite
16 |
17 | # Uncomment these lines to use a MySQL database instead of SQLite:
18 | #
19 | # database_driver: pdo_mysql
20 | # database_host: 127.0.0.1
21 | # database_port: null
22 | # database_name: symfony_demo
23 | # database_user: root
24 | # database_password: null
25 | #
26 | # You can even create the database and load the sample data from the command line:
27 | #
28 | # $ cd your-symfony-project/
29 | # $ php app/console doctrine:database:create
30 | # $ php app/console doctrine:schema:create
31 | # $ php app/console doctrine:fixtures:load
32 |
33 | # If you don't use a real mail server, you can send emails via your Gmail account.
34 | # see http://symfony.com/doc/current/cookbook/email/gmail.html
35 | mailer_transport: smtp
36 | mailer_host: 127.0.0.1
37 | mailer_user: ~
38 | mailer_password: ~
39 |
40 | # The code of the default language used by the application ('en' = English)
41 | locale: en
42 |
43 | # The 'secret' value is a random string of characters, numbers and symbols
44 | # used internally by Symfony in several places (CSRF tokens, URI signing,
45 | # 'Remember Me' functionality, etc.)
46 | # see: http://symfony.com/doc/current/reference/configuration/framework.html#secret
47 | secret: 'secret_value_for_symfony_demo_application'
48 |
--------------------------------------------------------------------------------
/app/config/routing.yml:
--------------------------------------------------------------------------------
1 | acme_api_client:
2 | path: /ApiClient
3 | defaults:
4 | _controller: FrameworkBundle:Template:template
5 | template: 'AcmeApiClientBundle::index.html.twig'
6 |
7 | acme_blog:
8 | resource: "@AcmeBlogBundle/Resources/config/routes.yml"
9 | type: rest
10 |
11 | #fos_user:
12 | # resource: "@FOSUserBundle/Resources/config/routing/security.xml"
--------------------------------------------------------------------------------
/app/config/routing_dev.yml:
--------------------------------------------------------------------------------
1 | _wdt:
2 | resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
3 | prefix: /_wdt
4 |
5 | _profiler:
6 | resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
7 | prefix: /_profiler
8 |
9 | _main:
10 | resource: routing.yml
11 |
--------------------------------------------------------------------------------
/app/config/security.yml:
--------------------------------------------------------------------------------
1 | security:
2 | encoders:
3 | FOS\UserBundle\Model\UserInterface: sha512
4 |
5 | role_hierarchy:
6 | ROLE_ADMIN: ROLE_USER
7 | ROLE_API: ROLE_USER
8 | ROLE_SUPER_ADMIN: ROLE_ADMIN
9 |
10 | providers:
11 | fos_userbundle:
12 | id: fos_user.user_provider.username
13 |
14 | firewalls:
15 | wsse_secured:
16 | pattern: ^/api/.*
17 | stateless: true
18 | wsse: true
19 | anonymous : false
20 | # wsse: { lifetime: 30}
21 | main:
22 | pattern: ^/
23 | form_login:
24 | provider: fos_userbundle
25 | csrf_provider: security.csrf.token_manager # Use form.csrf_provider instead for Symfony <2.4
26 | logout: true
27 | anonymous: true
28 |
29 | access_control:
30 | - { path: ^/, role: IS_AUTHENTICATED_ANONYMOUSLY }
31 | - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
32 | - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
33 | - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
34 | - { path: ^/ApiClient, role: IS_AUTHENTICATED_ANONYMOUSLY }
35 | # - { path: ^/admin/, role: ROLE_ADMIN }
36 | # - { path: ^/, role: ROLE_USER }
--------------------------------------------------------------------------------
/app/console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
19 | $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
20 |
21 | if ($debug) {
22 | Debug::enable();
23 | }
24 |
25 | $kernel = new AppKernel($env, $debug);
26 | $application = new Application($kernel);
27 | $application->run($input);
28 |
--------------------------------------------------------------------------------
/app/logs/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/app/logs/.gitkeep
--------------------------------------------------------------------------------
/app/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 | ../src/*Bundle/Tests
19 | ../src/*/*Bundle/Tests
20 | ../src/*/Bundle/*Bundle/Tests
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 | ../src
33 |
34 | ../src/*Bundle/Resources
35 | ../src/*Bundle/Tests
36 | ../src/*/*Bundle/Resources
37 | ../src/*/*Bundle/Tests
38 | ../src/*/Bundle/*Bundle/Resources
39 | ../src/*/Bundle/*Bundle/Tests
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/symfony-demo",
3 | "license": "MIT",
4 | "type": "project",
5 | "description": "Symfony Demo Application",
6 | "autoload": {
7 | "psr-0": { "": "src/", "SymfonyStandard": "app/" }
8 | },
9 | "require": {
10 | "php" : ">=5.3.9",
11 | "ext-pdo_sqlite" : "*",
12 | "doctrine/doctrine-bundle" : "~1.5",
13 | "doctrine/doctrine-fixtures-bundle" : "~2.2",
14 | "doctrine/orm" : "~2.4",
15 | "erusev/parsedown" : "~1.5",
16 | "incenteev/composer-parameter-handler" : "~2.1",
17 | "ircmaxell/password-compat" : "~1.0",
18 | "leafo/scssphp" : "~0.1.5",
19 | "patchwork/jsqueeze" : "~1.0",
20 | "sensio/distribution-bundle" : "~3.0.28",
21 | "sensio/framework-extra-bundle" : "~3.0",
22 | "symfony/assetic-bundle" : "~2.6",
23 | "symfony/monolog-bundle" : "~2.7",
24 | "symfony/swiftmailer-bundle" : "~2.3",
25 | "symfony/symfony" : "~2.7",
26 | "twig/extensions" : "~1.2",
27 | "friendsofsymfony/rest-bundle" : "^1.7",
28 | "jms/serializer-bundle" : "~1.0",
29 | "sp/bower-bundle" : "^0.11.0",
30 | "willdurand/hateoas-bundle" : "~1.0.0",
31 | "friendsofsymfony/user-bundle" : "^1.3"
32 | },
33 | "require-dev": {
34 | "sensio/generator-bundle": "~2.3"
35 | },
36 | "scripts": {
37 | "post-install-cmd": [
38 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
39 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
40 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
41 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
42 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
43 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
44 | "Sp\\BowerBundle\\Composer\\ScriptHandler::bowerInstall",
45 | "php app/console assets:install --symlink",
46 | "php app/console assetic:dump"
47 | ],
48 | "post-update-cmd": [
49 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
50 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
51 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
52 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
53 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
54 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
55 | "Sp\\BowerBundle\\Composer\\ScriptHandler::bowerInstall",
56 | "php app/console assets:install --symlink",
57 | "php app/console assetic:dump"
58 | ]
59 | },
60 | "config": {
61 | "bin-dir": "bin",
62 | "platform": {
63 | "php": "5.6.3"
64 | }
65 | },
66 | "extra": {
67 | "symfony-app-dir": "app",
68 | "symfony-web-dir": "web",
69 | "incenteev-parameters": {
70 | "file": "app/config/parameters.yml"
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Require all denied
3 |
4 |
5 | Order deny,allow
6 | Deny from all
7 |
8 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/AcmeApiClientBundle.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/doc/index.rst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/src/Acme/ApiClientBundle/Resources/doc/index.rst
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/css/main.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.5 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */
6 |
7 | // Core variables and mixins
8 | @import "../components/bootstrap/less/variables.less";
9 | @import "variables.less";
10 | @import "../components/bootstrap/less/mixins.less";
11 |
12 | // Reset and dependencies
13 | @import "../components/bootstrap/less/normalize.less";
14 | @import "../components/bootstrap/less/print.less";
15 | @import "../components/bootstrap/less/glyphicons.less";
16 |
17 | // Core CSS
18 | @import "../components/bootstrap/less/scaffolding.less";
19 | @import "../components/bootstrap/less/type.less";
20 | @import "../components/bootstrap/less/code.less";
21 | @import "../components/bootstrap/less/grid.less";
22 | @import "../components/bootstrap/less/tables.less";
23 | @import "../components/bootstrap/less/forms.less";
24 | @import "../components/bootstrap/less/buttons.less";
25 |
26 | // Components
27 | @import "../components/bootstrap/less/component-animations.less";
28 | @import "../components/bootstrap/less/dropdowns.less";
29 | @import "../components/bootstrap/less/button-groups.less";
30 | @import "../components/bootstrap/less/input-groups.less";
31 | @import "../components/bootstrap/less/navs.less";
32 | @import "../components/bootstrap/less/navbar.less";
33 | @import "../components/bootstrap/less/breadcrumbs.less";
34 | @import "../components/bootstrap/less/pagination.less";
35 | @import "../components/bootstrap/less/pager.less";
36 | @import "../components/bootstrap/less/labels.less";
37 | @import "../components/bootstrap/less/badges.less";
38 | @import "../components/bootstrap/less/jumbotron.less";
39 | @import "../components/bootstrap/less/thumbnails.less";
40 | @import "../components/bootstrap/less/alerts.less";
41 | @import "../components/bootstrap/less/progress-bars.less";
42 | @import "../components/bootstrap/less/media.less";
43 | @import "../components/bootstrap/less/list-group.less";
44 | @import "../components/bootstrap/less/panels.less";
45 | @import "../components/bootstrap/less/responsive-embed.less";
46 | @import "../components/bootstrap/less/wells.less";
47 | @import "../components/bootstrap/less/close.less";
48 |
49 | // Components w/ JavaScript
50 | @import "../components/bootstrap/less/modals.less";
51 | @import "../components/bootstrap/less/tooltip.less";
52 | @import "../components/bootstrap/less/popovers.less";
53 | @import "../components/bootstrap/less/carousel.less";
54 |
55 | // Utility classes
56 | @import "../components/bootstrap/less/utilities.less";
57 | @import "../components/bootstrap/less/responsive-utilities.less";
58 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/css/variables.less:
--------------------------------------------------------------------------------
1 | //
2 | // Variables
3 | // --------------------------------------------------
4 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/src/Acme/ApiClientBundle/Resources/public/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/js/app-controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * The main controller for the app. The controller:
3 | * - retrieves and persists the model via Restangular
4 | * - exposes the model to the template and provides event handlers
5 | *
6 | * root_path & assets_path variables are set inside index.html.twig globally
7 | *
8 | * @type {angular.Module}
9 | */
10 |
11 |
12 | angular.module('ApiClient.controllers', ['ngCookies'])
13 | .controller('Login', ['AuthHandler', '$scope', '$window', '$cookies', 'Restangular', 'Digest', '$modal', function (AuthHandler, $scope, $window, $cookies, Restangular, Digest, $modal) {
14 | // On Submit function
15 | $scope.getSalt = function () {
16 | var username = $scope.username;
17 | var password = $scope.password;
18 | // Get Salt
19 | Restangular
20 | .oneUrl('salts', root_path + 'public/salts/' + username).get()
21 | .then(function (response) {
22 | var salt = response.salt;
23 | // Encrypt password accordingly to generate secret
24 | Digest.cipher(password, salt).then(function (secret) {
25 | // Display salt and secret for this example
26 | $scope.salt = salt;
27 | $scope.secret = secret;
28 |
29 | $modal.open({
30 | animation: true,
31 | templateUrl: assets_path + '/common/modal.html',
32 | controller: 'ModalInstanceCtrl',
33 | size: 'lg',
34 | resolve: {
35 | items: {
36 | Salt: $scope.salt,
37 | Secret: $scope.secret
38 | },
39 | title: function () {
40 | return "Login result"
41 | },
42 | introduction: function () {
43 | return [
44 | "Salt value is pulled from the database at following URL: " + root_path + 'public/salts/' + username,
45 | "Secret is your hashed, salted password, saved in cookies"
46 | ]
47 | }
48 | }
49 | });
50 |
51 | // Store auth informations in cookies for page refresh
52 | $cookies.put('username', $scope.username);
53 | $cookies.put('secret', $scope.secret);
54 |
55 | $window.location = '#/pages';
56 | }, function (err) {
57 | console.log(err);
58 | });
59 | });
60 | };
61 | }])
62 | .controller('PageController', ['$scope', '$window', 'Restangular', '$modal', function ($scope, $window, Restangular, $modal) {
63 |
64 | $scope.pages = [];
65 | Restangular
66 | .all('pages').getList()
67 | .then(function (response) {
68 | $scope.pages = response;
69 | });
70 |
71 | $scope.showPage = function (page) {
72 | $modal.open({
73 | animation: true,
74 | templateUrl: assets_path + '/page/page-show.html',
75 | controller: 'PageModalInstanceCtrl',
76 | resolve: {
77 | page: page
78 | }
79 | });
80 | };
81 |
82 | $scope.editPage = function (page) {
83 | $modal.open({
84 | animation: true,
85 | templateUrl: assets_path + '/page/page-edit.html',
86 | controller: 'PageModalInstanceCtrl',
87 | resolve: {
88 | page: page
89 | }
90 | });
91 | };
92 |
93 | }])
94 | .controller('PageModalInstanceCtrl', ['$scope', '$modalInstance', 'page', function ($scope, $modalInstance, page) {
95 |
96 | $scope.page = page;
97 |
98 | $scope.ok = function () {
99 | $modalInstance.close();
100 | };
101 |
102 | $scope.cancel = function () {
103 | $modalInstance.dismiss('cancel');
104 | };
105 |
106 | $scope.doneEditing = function (page) {
107 | page.title = page.title.trim();
108 | page.put();
109 | $modalInstance.close();
110 | };
111 |
112 | }])
113 | .controller('ModalInstanceCtrl', ['$scope', '$modalInstance', 'items', 'title', 'introduction', function ($scope, $modalInstance, items, title, introduction) {
114 |
115 | $scope.items = items;
116 | $scope.title = title;
117 | $scope.introduction = introduction;
118 |
119 |
120 | $scope.ok = function () {
121 | $modalInstance.close();
122 | };
123 |
124 | }]);
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/js/app.js:
--------------------------------------------------------------------------------
1 | /**
2 | * The main Client app module
3 | *
4 | * root_path & assets_path variables are set inside index.html.twig globally
5 | *
6 | * @type {angular.Module}
7 | */
8 |
9 | angular.module('ApiClient', ['ngRoute', 'restangular', 'ui.bootstrap', 'ApiClient.controllers', 'ApiClient.services'])
10 | .config(['$routeProvider', function ($routeProvider) {
11 | $routeProvider
12 | .when('/pages', {
13 | controller: 'PageController',
14 | templateUrl: assets_path + '/page/page-list.html'
15 | })
16 | .when('/login', {
17 | controller: 'Login',
18 | templateUrl: assets_path + '/login.html'
19 | })
20 | .otherwise({
21 | redirectTo: '/login'
22 | });
23 | }])
24 | .config(['RestangularProvider', '$injector', 'TokenHandlerProvider', 'AuthHandlerProvider', function (RestangularProvider, $injector, TokenHandlerProvider, AuthHandlerProvider) {
25 |
26 | var TokenHandler = $injector.instantiate(TokenHandlerProvider.$get);
27 | var AuthHandler = $injector.instantiate(AuthHandlerProvider.$get);
28 |
29 | RestangularProvider
30 | .setBaseUrl(root_path + 'api')
31 | .addRequestInterceptor(function (element, operation, what, url) {
32 | var newRequest = {};
33 | if (operation == 'post' || operation == 'put') {
34 | what = what.split('');
35 | what.pop();
36 | what = what.join('');
37 | }
38 | if (operation == 'put') {
39 | delete element._links;
40 | }
41 | newRequest[what] = element;
42 | return newRequest;
43 | })
44 | .setRestangularFields({
45 | selfLink: '_links.self.href'
46 | })
47 | .addFullRequestInterceptor(function (element, operation, route, url, headers, params, httpConfig) {
48 |
49 | headers['X-WSSE'] =
50 | TokenHandler.getCredentials(
51 | AuthHandler.username(),
52 | AuthHandler.secret()
53 | );
54 |
55 | return {
56 | element: element,
57 | headers: headers,
58 | params: params,
59 | httpConfig: httpConfig
60 | };
61 | });
62 | }]);
63 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/partials/common/modal.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 | {{ paragraph }}
7 |
8 |
9 |
10 | {{ key }}
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/partials/login.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
30 |
31 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/partials/page/page-edit.html:
--------------------------------------------------------------------------------
1 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/partials/page/page-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Id
5 | Title
6 | Body
7 | Action
8 |
9 |
10 |
11 |
12 |
13 | {{ $index + 1}}
14 |
15 |
16 |
17 | {{ page.title }}
18 |
19 |
20 |
21 | {{ page.body }}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/public/partials/page/page-show.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 | {{ page.body }}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/translations/messages.fr.xlf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Symfony2 is great
7 | J'aime Symfony2
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/Acme/ApiClientBundle/Resources/views/index.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Symfony2 Rest Api Client
6 | {% stylesheets output='js/styles'
7 | "@AcmeApiClientBundle/Resources/public/css/main.css"
8 | %}
9 |
10 | {% endstylesheets %}
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | {% javascripts output='js/client'
41 | "@AcmeApiClientBundle/Resources/public/components/angular/angular.js"
42 | "@AcmeApiClientBundle/Resources/public/components/angular-route/angular-route.js"
43 | "@AcmeApiClientBundle/Resources/public/components/angular-cookies/angular-cookies.js"
44 | "@AcmeApiClientBundle/Resources/public/components/lodash/dist/lodash.js"
45 | "@AcmeApiClientBundle/Resources/public/components/restangular/dist/restangular.js"
46 | "@AcmeApiClientBundle/Resources/public/components/angular-bootstrap/ui-bootstrap-tpls.js"
47 | "@AcmeApiClientBundle/Resources/public/js/app.js"
48 | "@AcmeApiClientBundle/Resources/public/js/app-controller.js"
49 | "@AcmeApiClientBundle/Resources/public/js/app-services.js"
50 | %}
51 |
52 |
53 |
54 | {% endjavascripts %}
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/AcmeBlogBundle.php:
--------------------------------------------------------------------------------
1 | getExtension('security');
18 | $extension->addSecurityListenerFactory(new WsseFactory());
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Controller/PageController.php:
--------------------------------------------------------------------------------
1 | container->get('acme_blog.page.handler');
31 |
32 | /** @var array $pages */
33 | $pages = $pageHandler->getAll();
34 | return $pages;
35 | }
36 |
37 | /**
38 | * @Annotations\View(templateVar="page")
39 | *
40 | * @param $id
41 | * @return Page
42 | */
43 | public function getPageAction($id)
44 | {
45 | /** @var PageHandler $pageHandler */
46 | $pageHandler = $this->container->get('acme_blog.page.handler');
47 |
48 | /** @var Page $page */
49 | $page = $pageHandler->get($id);
50 |
51 | return $page;
52 | }
53 |
54 | /**
55 | * @Annotations\View(templateVar="page")
56 | * @param int $id the page id
57 | * @return \Symfony\Component\HttpFoundation\Response
58 | *
59 | */
60 | public function editPageAction($id)
61 | {
62 | /** @var PageHandler $pageHandler */
63 | $pageHandler = $this->container->get('acme_blog.page.handler');
64 |
65 | /** @var Page $page */
66 | $page = $pageHandler->get($id);
67 |
68 | $form = $this->createForm(new PageType(), $page);
69 |
70 | $view = $this->view($form, 200)
71 | ->setTemplate('AcmeBlogBundle:Page:editPage.html.twig')
72 | ->setTemplateVar('form')
73 | ;
74 |
75 | return $this->handleView($view);
76 | }
77 |
78 | /**
79 | * @param Request $request
80 | * @param int $id the page id
81 | * @return \Symfony\Component\HttpFoundation\Response
82 | */
83 | public function postPageAction(Request $request, $id)
84 | {
85 | /** @var PageHandler $pageHandler */
86 | $pageHandler = $this->container->get('acme_blog.page.handler');
87 |
88 | /** @var Page $page */
89 | $page = $pageHandler->get($id);
90 |
91 | $form = $this->createForm(new PageType(), $page);
92 |
93 | $form->submit($request);
94 | if ($form->isValid()) {
95 | $pageHandler->save($page);
96 | $view = $this->routeRedirectView('api_get_page', ['id' => $page->getId()]);
97 | } else {
98 | $view = $this->view(['form' => $form], 400);
99 | }
100 |
101 | return $this->handleView($view);
102 | }
103 |
104 | /**
105 | * @param Request $request
106 | * @param int $id the page id
107 | * @return \Symfony\Component\HttpFoundation\Response
108 | */
109 | public function putPageAction(Request $request, $id)
110 | {
111 | /** @var PageHandler $pageHandler */
112 | $pageHandler = $this->container->get('acme_blog.page.handler');
113 |
114 | /** @var Page $page */
115 | $page = $pageHandler->get($id);
116 |
117 | $form = $this->createForm(new PageType(), $page);
118 |
119 | $form->submit($request);
120 | if ($form->isValid()) {
121 | $pageHandler->save($page);
122 | $view = $this->routeRedirectView('api_get_page', ['id' => $page->getId()]);
123 | } else {
124 | $view = $this->view(['form' => $form], 400);
125 | }
126 |
127 | return $this->handleView($view);
128 | }
129 | }
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Controller/UserController.php:
--------------------------------------------------------------------------------
1 | container->get('fos_user.user_manager');
18 |
19 | $user = $userManager->findUserByUsername($username);
20 | if ( is_null($user) )
21 | {
22 | throw new HttpException(400, "Error User Not Found");
23 | }
24 |
25 | return new JsonResponse(array('salt' => $user->getSalt()));
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/DataFixtures/ORM/LoadPageData.php:
--------------------------------------------------------------------------------
1 | setTitle('this is example title');
16 | $page->setBody('this is example body');
17 | $em->persist($page);
18 |
19 | $page = new Page();
20 | $page->setTitle('another awesome title');
21 | $page->setBody('is this a body, or?...');
22 | $em->persist($page);
23 |
24 | $em->flush();
25 | }
26 |
27 | public function getOrder()
28 | {
29 | return 2; // the order in which fixtures will be loaded
30 | }
31 | }
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/DependencyInjection/AcmeBlogExtension.php:
--------------------------------------------------------------------------------
1 | processConfiguration($configuration, $configs);
24 |
25 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26 | $loader->load('services.xml');
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/DependencyInjection/Configuration.php:
--------------------------------------------------------------------------------
1 | root('acme_blog');
22 |
23 | // Here you should define the parameters that are allowed to
24 | // configure your bundle. See the documentation linked above for
25 | // more information on that topic.
26 |
27 | return $treeBuilder;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/DependencyInjection/Security/Factory/WsseFactory.php:
--------------------------------------------------------------------------------
1 | setDefinition($providerId,
18 | new DefinitionDecorator('wsse.security.authentication.provider'))
19 | ->replaceArgument(0, new Reference($userProvider))
20 | ;
21 |
22 | $listenerId = 'security.authentication.listener.wsse.'.$id;
23 | $listener = $container->setDefinition($listenerId, new DefinitionDecorator('wsse.security.authentication.listener'));
24 |
25 | return array($providerId, $listenerId, $defaultEntryPoint);
26 | }
27 |
28 | public function getPosition()
29 | {
30 | return 'pre_auth';
31 | }
32 |
33 | public function getKey()
34 | {
35 | return 'wsse';
36 | }
37 |
38 | public function addConfiguration(NodeDefinition $node)
39 | {
40 | // $node
41 | // ->children()
42 | // ->scalarNode('lifetime')->defaultValue(300)
43 | // ->end();
44 | }
45 | }
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Entity/Page.php:
--------------------------------------------------------------------------------
1 | id;
47 | }
48 |
49 | /**
50 | * Set title
51 | *
52 | * @param string $title
53 | * @return Page
54 | */
55 | public function setTitle($title)
56 | {
57 | $this->title = $title;
58 |
59 | return $this;
60 | }
61 |
62 | /**
63 | * Get title
64 | *
65 | * @return string
66 | */
67 | public function getTitle()
68 | {
69 | return $this->title;
70 | }
71 |
72 | /**
73 | * Set body
74 | *
75 | * @param string $body
76 | * @return Page
77 | */
78 | public function setBody($body)
79 | {
80 | $this->body = $body;
81 |
82 | return $this;
83 | }
84 |
85 | /**
86 | * Get body
87 | *
88 | * @return string
89 | */
90 | public function getBody()
91 | {
92 | return $this->body;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Entity/User.php:
--------------------------------------------------------------------------------
1 | add('title')
19 | ->add('body')
20 | ;
21 | }
22 |
23 | /**
24 | * @param OptionsResolverInterface $resolver
25 | */
26 | public function setDefaultOptions(OptionsResolverInterface $resolver)
27 | {
28 | $resolver->setDefaults(array(
29 | 'data_class' => 'Acme\BlogBundle\Entity\Page',
30 | ));
31 | }
32 |
33 | /**
34 | * @return string
35 | */
36 | public function getName()
37 | {
38 | return 'page';
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Repository/PageHandler.php:
--------------------------------------------------------------------------------
1 | repository = $em->getRepository($entityClass);
26 | $this->em = $em;
27 | }
28 |
29 | public function get($id)
30 | {
31 | $page = $this->repository->find($id);
32 |
33 | if(!$page) {
34 | throw new NotFoundHttpException(sprintf('The resource \'%s\' was not found.', $id));
35 | } else {
36 | return $page;
37 | }
38 | }
39 |
40 | public function getAll()
41 | {
42 | $pages = $this->repository->findAll();
43 |
44 | if(!$pages) {
45 | throw new NotFoundHttpException(sprintf('The resources were not found.'));
46 | } else {
47 | return $pages;
48 | }
49 | }
50 |
51 | public function save($page)
52 | {
53 | $this->em->persist($page);
54 | $this->em->flush();
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/config/routes.yml:
--------------------------------------------------------------------------------
1 | acme_blog_Page:
2 | type: rest
3 | resource: "@AcmeBlogBundle/Controller/PageController.php"
4 | name_prefix: api_ # naming collision
5 | prefix: /api
6 |
7 |
8 | acme_blog_User:
9 | type: rest
10 | resource: "@AcmeBlogBundle/Controller/UserController.php"
11 | name_prefix: public_ # naming collision
12 | prefix: /public
13 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/config/serializer/Entity.Page.yml:
--------------------------------------------------------------------------------
1 | Acme\BlogBundle\Entity\Page:
2 | exclusion_policy: ALL
3 | xml_root_name: page
4 | properties:
5 | title:
6 | expose: true
7 | type: string
8 | groups: [standard, restapi]
9 | secret:
10 | expose: false
11 | type: string
12 | groups: [restapi]
13 | body:
14 | expose: true
15 | type: string
16 | groups: [standard, restapi]
17 | id:
18 | expose: false
19 | type: integer
20 | groups: [restapi]
21 | relations:
22 | - rel: self
23 | href:
24 | route: api_get_page
25 | parameters:
26 | id: expr(object.getId())
27 | absolute: true
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/config/services.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 | Acme\BlogBundle\Repository\PageHandler
9 | Acme\BlogBundle\Entity\Page
10 |
11 |
12 |
13 |
14 |
15 | %acme_blog.page.class%
16 |
17 |
18 |
21 |
22 |
23 | %kernel.cache_dir%/security/nonces
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/public/css/demo.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-size: 14px;
3 | font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
4 | }
5 | h1.title {
6 | font-size: 45px;
7 | padding-bottom: 30px;
8 | }
9 | .sf-reset h2 {
10 | font-weight: bold;
11 | color: #FFFFFF;
12 | /* Font is duplicated of body (sans-serif) */
13 | font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
14 |
15 | margin-bottom: 10px;
16 | background-color: #aacd4e;
17 | padding: 2px 4px;
18 | display: inline-block;
19 | text-transform: uppercase;
20 |
21 | }
22 | p {
23 | line-height: 20px;
24 | padding-bottom: 20px;
25 | }
26 | ul#demo-list a {
27 | background: url(../images/blue-arrow.png) no-repeat right 6px;
28 | padding-right: 10px;
29 | margin-right: 30px;
30 | }
31 | #symfony-header {
32 | position: relative;
33 | padding: 30px 30px 20px 30px;
34 | }
35 | .sf-reset .symfony-blocks-welcome {
36 | overflow: hidden;
37 | }
38 | .sf-reset .symfony-blocks-welcome > div {
39 | background-color: whitesmoke;
40 | float: left;
41 | width: 240px;
42 | margin-right: 14px;
43 | text-align: center;
44 | padding: 26px 20px;
45 | }
46 | .sf-reset .symfony-blocks-welcome > div.block-demo {
47 | margin-right: 0;
48 | }
49 | .sf-reset .symfony-blocks-welcome .illustration {
50 | padding-bottom: 20px;
51 | }
52 | .sf-reset .symfony-blocks-help {
53 | overflow: hidden;
54 | }
55 | .sf-reset .symfony-blocks-help {
56 | margin-top: 30px;
57 | padding: 18px;
58 | border: 1px solid #E6E6E6;
59 | }
60 | .sf-reset .symfony-blocks-help > div {
61 | width: 254px;
62 | float: left;
63 | }
64 | .flash-message {
65 | padding: 10px;
66 | margin: 5px;
67 | margin-top: 15px;
68 | background-color: #ffe;
69 | }
70 | .sf-reset .error {
71 | color: red;
72 | }
73 | #login label, #contact_form label {
74 | display: block;
75 | float: left;
76 | width: 90px;
77 | }
78 | .sf-reset ul#menu {
79 | float: right;
80 | margin-bottom: 20px;
81 | padding-left: 0;
82 | }
83 | .sf-reset #menu li {
84 | padding-left: 0;
85 | margin-right: 10px;
86 | display: inline;
87 | }
88 | .sf-reset a,
89 | .sf-reset li a {
90 | color: #08C;
91 | text-decoration: none;
92 | }
93 | .sf-reset a:hover,
94 | .sf-reset li a:hover {
95 | color: #08C;
96 | text-decoration: underline;
97 | }
98 | .sf-reset .symfony-content pre {
99 | white-space: pre;
100 | font-family: monospace;
101 | }
102 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/views/Page/editPage.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "@AcmeBlog/layout.html.twig" %}
2 |
3 | {% block content %}
4 |
5 | Edit #{{ form.vars.data.id }} - {{ form.vars.data.title }}
6 |
7 |
13 |
14 |
15 |
16 | Go back
17 |
18 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/views/Page/getPage.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "@AcmeBlog/layout.html.twig" %}
2 |
3 | {% block content %}
4 |
5 | #{{ page.id }} - {{ page.title }}
6 |
7 |
8 | {{ page.body }}
9 |
10 |
11 |
12 |
13 | Edit
14 |
15 |
16 |
17 |
18 |
19 | Go back
20 |
21 |
22 |
23 | {% endblock %}
24 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/views/Page/getPages.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "@AcmeBlog/layout.html.twig" %}
2 |
3 | {% block content %}
4 |
5 | All pages
6 |
7 |
8 | {% for page in pages %}
9 |
10 | {{ page.id }} -
11 | {{ page.title }} -
12 | {{ page.body }}
13 |
14 | {% else %}
15 | empty
16 | {% endfor %}
17 |
18 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Resources/views/layout.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "TwigBundle::layout.html.twig" %}
2 |
3 | {% block head %}
4 |
5 | {% endblock %}
6 |
7 | {% block title 'Blog Bundle' %}
8 |
9 | {% block body %}
10 |
11 | {% for flashMessage in app.session.flashbag.get('notice') %}
12 |
13 | Notice : {{ flashMessage }}
14 |
15 | {% endfor %}
16 |
17 |
18 | {% block content %}
19 |
20 | {% endblock %}
21 |
22 |
23 | {% endblock %}
24 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Security/Authentication/Provider/WsseProvider.php:
--------------------------------------------------------------------------------
1 | userProvider = $userProvider;
22 | $this->cacheDir = $cacheDir;
23 | }
24 |
25 | // Authenticate webservice client
26 | public function authenticate( TokenInterface $token )
27 | {
28 | // Load specified user
29 | $user = $this->userProvider->loadUserByUsername($token->getUsername());
30 |
31 | // Verify Token and register it
32 | /** @var WsseUserToken $token */
33 | if ($user && $this->validateDigest($token->digest, $token->nonce, $token->created, $user->getPassword())) {
34 | $authenticatedToken = new WsseUserToken($user->getRoles());
35 | $authenticatedToken->setUser($user);
36 |
37 | return $authenticatedToken;
38 | }
39 |
40 | throw new AuthenticationException('The WSSE authentication failed. For user : '.$user);
41 | }
42 |
43 | // Token validator
44 | public function validateDigest( $digest, $nonce, $created, $secret )
45 | {
46 | // Generate created Token time difference
47 | $now = new \DateTime('now', new \DateTimeZone('UTC'));
48 | $then = new \Datetime($created, new \DateTimeZone('UTC'));
49 | $diff = $now->diff( $then, true );
50 |
51 | // Check created time is not in the future
52 | if (strtotime($created) > time()) {
53 | throw new AuthenticationException("Back to the future...");
54 | }
55 |
56 | // Validate timestamp is recent within 5 minutes
57 | $seconds = time() - strtotime($created);
58 | if ( $seconds > 300 )
59 | {
60 | throw new AuthenticationException('Expired timestamp. Seconds: ' . $seconds);
61 | }
62 |
63 | // Validate nonce is unique within 5 minutes
64 | if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 > time()) {
65 | throw new NonceExpiredException('Previously used nonce detected');
66 | }
67 | if ( !is_dir($this->cacheDir) ) {
68 | mkdir($this->cacheDir, 0777, true);
69 | }
70 | file_put_contents($this->cacheDir.'/'.$nonce, time());
71 |
72 | // Validate Secret
73 | $expected = base64_encode(sha1(base64_decode($nonce).$created.$secret, true));
74 |
75 | if($digest !== $expected){
76 | throw new AuthenticationException("Bad credentials ! Digest is not as expected.");
77 | }
78 |
79 | return true;
80 | }
81 |
82 | public function supports( TokenInterface $token )
83 | {
84 | return $token instanceof WsseUserToken;
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Security/Authentication/Token/WsseUserToken.php:
--------------------------------------------------------------------------------
1 | setAuthenticated(count($roles) > 0);
19 | }
20 |
21 | public function getCredentials()
22 | {
23 | return '';
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Security/Firewall/WsseListener.php:
--------------------------------------------------------------------------------
1 | tokenStorage = $tokenStorage;
30 | $this->authenticationManager = $authenticationManager;
31 | }
32 |
33 | public function handle(GetResponseEvent $event)
34 | {
35 | $request = $event->getRequest();
36 |
37 | // Check if authentication Token is present
38 | if ($request->headers->has('x-wsse')) {
39 |
40 | // Token parser
41 | $wsseRegex = '/UsernameToken Username="([^"]+)", PasswordDigest="([^"]+)", Nonce="([^"]+)", Created="([^"]+)"/';
42 |
43 | if (preg_match($wsseRegex, $request->headers->get('x-wsse'), $matches)) {
44 | $token = new WsseUserToken();
45 | $token->setUser($matches[1]);
46 |
47 | $token->digest = $matches[2];
48 | $token->nonce = $matches[3];
49 | $token->created = $matches[4];
50 |
51 | try {
52 | // Authentication process
53 | $authToken = $this->authenticationManager->authenticate($token);
54 | $this->tokenStorage->setToken($authToken);
55 |
56 | return;
57 | } catch (AuthenticationException $failed) {
58 | $failedMessage = 'WSSE Login failed for '.$token->getUsername().'. Why ? '.$failed->getMessage();
59 | // $this->logger->err($failedMessage);
60 |
61 | // To deny the authentication clear the token. This will redirect to the login page.
62 | // $token = $this->securityContext->getToken();
63 | // if ( $token instanceof WsseUserToken && $this->providerKey === $token->getProviderKey()) {
64 | // $this->securityContext->setToken(null);
65 | // }
66 |
67 | // Deny authentication with a '403 Forbidden' HTTP response
68 | $response = new Response();
69 | $response->setStatusCode(403);
70 | $response->setContent($failedMessage);
71 | $event->setResponse($response);
72 |
73 | return;
74 | } catch( NonceExpiredException $expired) {
75 | $failedMessage = 'WSSE Nonce Expired for '.$token->getUsername().'. Why ? '.$failed->getMessage();
76 | // $this->logger->err($failedMessage);
77 |
78 | // Deny authentication with a '403 Forbidden' HTTP response
79 | $response = new Response();
80 | $response->setStatusCode(403);
81 | $response->setContent($failedMessage);
82 | $event->setResponse($response);
83 |
84 | return;
85 | }
86 |
87 | // By default deny authorization
88 | $response = new Response();
89 | $response->setStatusCode(403);
90 | $event->setResponse($response);
91 | }
92 | }
93 |
94 | // By default deny authentication
95 | $response = new Response();
96 | $response->setStatusCode(403);
97 | $event->setResponse($response);
98 |
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/src/Acme/BlogBundle/Tests/Controller/DefaultControllerTest.php:
--------------------------------------------------------------------------------
1 | request('GET', '/hello/Fabien');
14 |
15 | $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/web/.htaccess:
--------------------------------------------------------------------------------
1 | # Use the front controller as index file. It serves as a fallback solution when
2 | # every other rewrite/redirect fails (e.g. in an aliased environment without
3 | # mod_rewrite). Additionally, this reduces the matching process for the
4 | # start page (path "/") because otherwise Apache will apply the rewriting rules
5 | # to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
6 | DirectoryIndex app.php
7 |
8 |
9 | RewriteEngine On
10 |
11 | # Determine the RewriteBase automatically and set it as environment variable.
12 | # If you are using Apache aliases to do mass virtual hosting or installed the
13 | # project in a subdirectory, the base path will be prepended to allow proper
14 | # resolution of the app.php file and to redirect to the correct URI. It will
15 | # work in environments without path prefix as well, providing a safe, one-size
16 | # fits all solution. But as you do not need it in this case, you can comment
17 | # the following 2 lines to eliminate the overhead.
18 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
19 | RewriteRule ^(.*) - [E=BASE:%1]
20 |
21 | # Redirect to URI without front controller to prevent duplicate content
22 | # (with and without `/app.php`). Only do this redirect on the initial
23 | # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
24 | # endless redirect loop (request -> rewrite to front controller ->
25 | # redirect -> request -> ...).
26 | # So in case you get a "too many redirects" error or you always get redirected
27 | # to the start page because your Apache does not expose the REDIRECT_STATUS
28 | # environment variable, you have 2 choices:
29 | # - disable this feature by commenting the following 2 lines or
30 | # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
31 | # following RewriteCond (best solution)
32 | RewriteCond %{ENV:REDIRECT_STATUS} ^$
33 | RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
34 |
35 | # If the requested filename exists, simply serve it.
36 | # We only want to let Apache serve files and not directories.
37 | RewriteCond %{REQUEST_FILENAME} -f
38 | RewriteRule .? - [L]
39 |
40 | # Rewrite all other queries to the front controller.
41 | RewriteRule .? %{ENV:BASE}/app.php [L]
42 |
43 |
44 |
45 |
46 | # When mod_rewrite is not available, we instruct a temporary redirect of
47 | # the start page to the front controller explicitly so that the website
48 | # and the generated links can still be used.
49 | RedirectMatch 302 ^/$ /app.php/
50 | # RedirectTemp cannot be used instead
51 |
52 |
53 |
--------------------------------------------------------------------------------
/web/app.php:
--------------------------------------------------------------------------------
1 | unregister();
25 | // $apcLoader->register(true);
26 |
27 | require_once __DIR__.'/../app/AppKernel.php';
28 |
29 | $kernel = new AppKernel('prod', false);
30 | $kernel->loadClassCache();
31 |
32 | // If you use HTTP Cache to improve application performance, uncomment the following lines:
33 | // See http://symfony.com/doc/current/book/http_cache.html#symfony-reverse-proxy
34 | //
35 | // require_once __DIR__.'/../app/AppCache.php';
36 | // $kernel = new AppCache($kernel);
37 |
38 | // If you use HTTP Cache and your application relies on the _method request parameter
39 | // to get the intended HTTP method, uncomment this line.
40 | // See http://symfony.com/doc/current/reference/configuration/framework.html#http-method-override
41 | // Request::enableHttpMethodParameterOverride();
42 |
43 | $request = Request::createFromGlobals();
44 | $response = $kernel->handle($request);
45 | $response->send();
46 |
47 | $kernel->terminate($request, $response);
48 |
--------------------------------------------------------------------------------
/web/app_dev.php:
--------------------------------------------------------------------------------
1 | loadClassCache();
35 | $request = Request::createFromGlobals();
36 | $response = $kernel->handle($request);
37 | $response->send();
38 | $kernel->terminate($request, $response);
39 |
--------------------------------------------------------------------------------
/web/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/apple-touch-icon.png
--------------------------------------------------------------------------------
/web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/favicon.ico
--------------------------------------------------------------------------------
/web/fonts/font-awesome/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/font-awesome/FontAwesome.otf
--------------------------------------------------------------------------------
/web/fonts/font-awesome/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/font-awesome/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/web/fonts/font-awesome/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/font-awesome/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/web/fonts/font-awesome/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/font-awesome/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/web/fonts/font-awesome/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/font-awesome/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/web/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/web/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/web/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/web/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/web/fonts/lato/Lato-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/lato/Lato-Bold.woff
--------------------------------------------------------------------------------
/web/fonts/lato/Lato-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/lato/Lato-BoldItalic.woff
--------------------------------------------------------------------------------
/web/fonts/lato/Lato-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/lato/Lato-Italic.woff
--------------------------------------------------------------------------------
/web/fonts/lato/Lato-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rsobon/Symfony-Rest-Angular-Demo/e97ba28c55e0426dbe6e3fa95fa8a65ba0dd1836/web/fonts/lato/Lato-Regular.woff
--------------------------------------------------------------------------------
/web/robots.txt:
--------------------------------------------------------------------------------
1 | # www.robotstxt.org/
2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
3 |
4 | User-agent: *
5 |
--------------------------------------------------------------------------------