.
11 |
12 | .list-group {
13 | // No need to set list-style: none; since .list-group-item is block level
14 | padding-left: 0; // reset padding because ul and ol
15 | margin-bottom: 20px;
16 | }
17 |
18 |
19 | // Individual list items
20 | //
21 | // Use on `li`s or `div`s within the `.list-group` parent.
22 |
23 | .list-group-item {
24 | position: relative;
25 | display: block;
26 | padding: 10px 15px;
27 | // Place the border on the list items and negative margin up for better styling
28 | margin-bottom: -1px;
29 | background-color: @list-group-bg;
30 | border: 1px solid @list-group-border;
31 |
32 | // Round the first and last items
33 | &:first-child {
34 | .border-top-radius(@list-group-border-radius);
35 | }
36 | &:last-child {
37 | margin-bottom: 0;
38 | .border-bottom-radius(@list-group-border-radius);
39 | }
40 |
41 | // Disabled state
42 | &.disabled,
43 | &.disabled:hover,
44 | &.disabled:focus {
45 | color: @list-group-disabled-color;
46 | cursor: @cursor-disabled;
47 | background-color: @list-group-disabled-bg;
48 |
49 | // Force color to inherit for custom content
50 | .list-group-item-heading {
51 | color: inherit;
52 | }
53 | .list-group-item-text {
54 | color: @list-group-disabled-text-color;
55 | }
56 | }
57 |
58 | // Active class on item itself, not parent
59 | &.active,
60 | &.active:hover,
61 | &.active:focus {
62 | z-index: 2; // Place active items above their siblings for proper border styling
63 | color: @list-group-active-color;
64 | background-color: @list-group-active-bg;
65 | border-color: @list-group-active-border;
66 |
67 | // Force color to inherit for custom content
68 | .list-group-item-heading,
69 | .list-group-item-heading > small,
70 | .list-group-item-heading > .small {
71 | color: inherit;
72 | }
73 | .list-group-item-text {
74 | color: @list-group-active-text-color;
75 | }
76 | }
77 | }
78 |
79 |
80 | // Interactive list items
81 | //
82 | // Use anchor or button elements instead of `li`s or `div`s to create interactive items.
83 | // Includes an extra `.active` modifier class for showing selected items.
84 |
85 | a.list-group-item,
86 | button.list-group-item {
87 | color: @list-group-link-color;
88 |
89 | .list-group-item-heading {
90 | color: @list-group-link-heading-color;
91 | }
92 |
93 | // Hover state
94 | &:hover,
95 | &:focus {
96 | color: @list-group-link-hover-color;
97 | text-decoration: none;
98 | background-color: @list-group-hover-bg;
99 | }
100 | }
101 |
102 | button.list-group-item {
103 | width: 100%;
104 | text-align: left;
105 | }
106 |
107 |
108 | // Contextual variants
109 | //
110 | // Add modifier classes to change text and background color on individual items.
111 | // Organizationally, this must come after the `:hover` states.
112 |
113 | .list-group-item-variant(success; @state-success-bg; @state-success-text);
114 | .list-group-item-variant(info; @state-info-bg; @state-info-text);
115 | .list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
116 | .list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
117 |
118 |
119 | // Custom content options
120 | //
121 | // Extra classes for creating well-formatted content within `.list-group-item`s.
122 |
123 | .list-group-item-heading {
124 | margin-top: 0;
125 | margin-bottom: 5px;
126 | }
127 | .list-group-item-text {
128 | margin-bottom: 0;
129 | line-height: 1.3;
130 | }
131 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/media.less:
--------------------------------------------------------------------------------
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 | overflow: hidden;
13 | zoom: 1;
14 | }
15 |
16 | .media-body {
17 | width: 10000px;
18 | }
19 |
20 | .media-object {
21 | display: block;
22 |
23 | // Fix collapse in webkit from max-width: 100% and display: table-cell.
24 | &.img-thumbnail {
25 | max-width: none;
26 | }
27 | }
28 |
29 | .media-right,
30 | .media > .pull-right {
31 | padding-left: 10px;
32 | }
33 |
34 | .media-left,
35 | .media > .pull-left {
36 | padding-right: 10px;
37 | }
38 |
39 | .media-left,
40 | .media-right,
41 | .media-body {
42 | display: table-cell;
43 | vertical-align: top;
44 | }
45 |
46 | .media-middle {
47 | vertical-align: middle;
48 | }
49 |
50 | .media-bottom {
51 | vertical-align: bottom;
52 | }
53 |
54 | // Reset margins on headings for tighter default spacing
55 | .media-heading {
56 | margin-top: 0;
57 | margin-bottom: 5px;
58 | }
59 |
60 | // Media list variation
61 | //
62 | // Undo default ul/ol styles
63 | .media-list {
64 | padding-left: 0;
65 | list-style: none;
66 | }
67 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 |
4 | // Utilities
5 | @import "mixins/hide-text.less";
6 | @import "mixins/opacity.less";
7 | @import "mixins/image.less";
8 | @import "mixins/labels.less";
9 | @import "mixins/reset-filter.less";
10 | @import "mixins/resize.less";
11 | @import "mixins/responsive-visibility.less";
12 | @import "mixins/size.less";
13 | @import "mixins/tab-focus.less";
14 | @import "mixins/reset-text.less";
15 | @import "mixins/text-emphasis.less";
16 | @import "mixins/text-overflow.less";
17 | @import "mixins/vendor-prefixes.less";
18 |
19 | // Components
20 | @import "mixins/alerts.less";
21 | @import "mixins/buttons.less";
22 | @import "mixins/panels.less";
23 | @import "mixins/pagination.less";
24 | @import "mixins/list-group.less";
25 | @import "mixins/nav-divider.less";
26 | @import "mixins/forms.less";
27 | @import "mixins/progress-bar.less";
28 | @import "mixins/table-row.less";
29 |
30 | // Skins
31 | @import "mixins/background-variant.less";
32 | @import "mixins/border-radius.less";
33 | @import "mixins/gradients.less";
34 |
35 | // Layout
36 | @import "mixins/clearfix.less";
37 | @import "mixins/center-block.less";
38 | @import "mixins/nav-vertical-align.less";
39 | @import "mixins/grid-framework.less";
40 | @import "mixins/grid.less";
41 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/alerts.less:
--------------------------------------------------------------------------------
1 | // Alerts
2 |
3 | .alert-variant(@background; @border; @text-color) {
4 | color: @text-color;
5 | background-color: @background;
6 | border-color: @border;
7 |
8 | hr {
9 | border-top-color: darken(@border, 5%);
10 | }
11 |
12 | .alert-link {
13 | color: darken(@text-color, 10%);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/background-variant.less:
--------------------------------------------------------------------------------
1 | // Contextual backgrounds
2 |
3 | .bg-variant(@color) {
4 | background-color: @color;
5 | a&:hover,
6 | a&:focus {
7 | background-color: darken(@color, 10%);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/border-radius.less:
--------------------------------------------------------------------------------
1 | // Single side border-radius
2 |
3 | .border-top-radius(@radius) {
4 | border-top-left-radius: @radius;
5 | border-top-right-radius: @radius;
6 | }
7 | .border-right-radius(@radius) {
8 | border-top-right-radius: @radius;
9 | border-bottom-right-radius: @radius;
10 | }
11 | .border-bottom-radius(@radius) {
12 | border-bottom-right-radius: @radius;
13 | border-bottom-left-radius: @radius;
14 | }
15 | .border-left-radius(@radius) {
16 | border-top-left-radius: @radius;
17 | border-bottom-left-radius: @radius;
18 | }
19 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/buttons.less:
--------------------------------------------------------------------------------
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 | .button-variant(@color; @background; @border) {
7 | color: @color;
8 | background-color: @background;
9 | border-color: @border;
10 |
11 | &:focus,
12 | &.focus {
13 | color: @color;
14 | background-color: darken(@background, 10%);
15 | border-color: darken(@border, 25%);
16 | }
17 | &:hover {
18 | color: @color;
19 | background-color: darken(@background, 10%);
20 | border-color: darken(@border, 12%);
21 | }
22 | &:active,
23 | &.active,
24 | .open > .dropdown-toggle& {
25 | color: @color;
26 | background-color: darken(@background, 10%);
27 | background-image: none;
28 | border-color: darken(@border, 12%);
29 |
30 | &:hover,
31 | &:focus,
32 | &.focus {
33 | color: @color;
34 | background-color: darken(@background, 17%);
35 | border-color: darken(@border, 25%);
36 | }
37 | }
38 | &.disabled,
39 | &[disabled],
40 | fieldset[disabled] & {
41 | &:hover,
42 | &:focus,
43 | &.focus {
44 | background-color: @background;
45 | border-color: @border;
46 | }
47 | }
48 |
49 | .badge {
50 | color: @background;
51 | background-color: @color;
52 | }
53 | }
54 |
55 | // Button sizes
56 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
57 | padding: @padding-vertical @padding-horizontal;
58 | font-size: @font-size;
59 | line-height: @line-height;
60 | border-radius: @border-radius;
61 | }
62 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/center-block.less:
--------------------------------------------------------------------------------
1 | // Center-align a block level element
2 |
3 | .center-block() {
4 | display: block;
5 | margin-right: auto;
6 | margin-left: auto;
7 | }
8 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/clearfix.less:
--------------------------------------------------------------------------------
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 | .clearfix() {
14 | &:before,
15 | &:after {
16 | display: table; // 2
17 | content: " "; // 1
18 | }
19 | &:after {
20 | clear: both;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/forms.less:
--------------------------------------------------------------------------------
1 | // Form validation states
2 | //
3 | // Used in forms.less to generate the form validation CSS for warnings, errors,
4 | // and successes.
5 |
6 | .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 | .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 | .box-shadow(@shadow);
28 | }
29 | }
30 | // Set validation states also for addons
31 | .input-group-addon {
32 | color: @text-color;
33 | background-color: @background-color;
34 | border-color: @border-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 | .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 | .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 | .input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
70 | height: @input-height;
71 | padding: @padding-vertical @padding-horizontal;
72 | font-size: @font-size;
73 | line-height: @line-height;
74 | border-radius: @border-radius;
75 |
76 | select& {
77 | height: @input-height;
78 | line-height: @input-height;
79 | }
80 |
81 | textarea&,
82 | select[multiple]& {
83 | height: auto;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/gradients.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable value-no-vendor-prefix, selector-max-id
2 |
3 | #gradient {
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 | .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 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", argb(@start-color), argb(@end-color))); // IE9 and down
14 | background-repeat: repeat-x;
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 | .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 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@start-color), argb(@end-color))); // IE9 and down
26 | background-repeat: repeat-x;
27 | }
28 |
29 | .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
30 | background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
31 | background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
32 | background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
33 | background-repeat: repeat-x;
34 | }
35 | .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 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", argb(@start-color), argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
40 | background-repeat: no-repeat;
41 | }
42 | .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 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@start-color), argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
47 | background-repeat: no-repeat;
48 | }
49 | .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 | .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 | }
60 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/grid-framework.less:
--------------------------------------------------------------------------------
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 | .make-grid-columns() {
7 | // Common styles for all sizes of grid columns, widths 1-12
8 | .col(@index) { // initial
9 | @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
10 | .col((@index + 1), @item);
11 | }
12 | .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
13 | @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
14 | .col((@index + 1), ~"@{list}, @{item}");
15 | }
16 | .col(@index, @list) when (@index > @grid-columns) { // terminal
17 | @{list} {
18 | position: relative;
19 | // Prevent columns from collapsing when empty
20 | min-height: 1px;
21 | // Inner gutter via padding
22 | padding-right: floor((@grid-gutter-width / 2));
23 | padding-left: ceil((@grid-gutter-width / 2));
24 | }
25 | }
26 | .col(1); // kickstart it
27 | }
28 |
29 | .float-grid-columns(@class) {
30 | .col(@index) { // initial
31 | @item: ~".col-@{class}-@{index}";
32 | .col((@index + 1), @item);
33 | }
34 | .col(@index, @list) when (@index =< @grid-columns) { // general
35 | @item: ~".col-@{class}-@{index}";
36 | .col((@index + 1), ~"@{list}, @{item}");
37 | }
38 | .col(@index, @list) when (@index > @grid-columns) { // terminal
39 | @{list} {
40 | float: left;
41 | }
42 | }
43 | .col(1); // kickstart it
44 | }
45 |
46 | .calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
47 | .col-@{class}-@{index} {
48 | width: percentage((@index / @grid-columns));
49 | }
50 | }
51 | .calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
52 | .col-@{class}-push-@{index} {
53 | left: percentage((@index / @grid-columns));
54 | }
55 | }
56 | .calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
57 | .col-@{class}-push-0 {
58 | left: auto;
59 | }
60 | }
61 | .calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
62 | .col-@{class}-pull-@{index} {
63 | right: percentage((@index / @grid-columns));
64 | }
65 | }
66 | .calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
67 | .col-@{class}-pull-0 {
68 | right: auto;
69 | }
70 | }
71 | .calc-grid-column(@index, @class, @type) when (@type = offset) {
72 | .col-@{class}-offset-@{index} {
73 | margin-left: percentage((@index / @grid-columns));
74 | }
75 | }
76 |
77 | // Basic looping in LESS
78 | .loop-grid-columns(@index, @class, @type) when (@index >= 0) {
79 | .calc-grid-column(@index, @class, @type);
80 | // next iteration
81 | .loop-grid-columns((@index - 1), @class, @type);
82 | }
83 |
84 | // Create grid for specific class
85 | .make-grid(@class) {
86 | .float-grid-columns(@class);
87 | .loop-grid-columns(@grid-columns, @class, width);
88 | .loop-grid-columns(@grid-columns, @class, pull);
89 | .loop-grid-columns(@grid-columns, @class, push);
90 | .loop-grid-columns(@grid-columns, @class, offset);
91 | }
92 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/grid.less:
--------------------------------------------------------------------------------
1 | // Grid system
2 | //
3 | // Generate semantic grid columns with these mixins.
4 |
5 | // Centered container element
6 | .container-fixed(@gutter: @grid-gutter-width) {
7 | padding-right: ceil((@gutter / 2));
8 | padding-left: floor((@gutter / 2));
9 | margin-right: auto;
10 | margin-left: auto;
11 | &:extend(.clearfix all);
12 | }
13 |
14 | // Creates a wrapper for a series of columns
15 | .make-row(@gutter: @grid-gutter-width) {
16 | margin-right: floor((@gutter / -2));
17 | margin-left: ceil((@gutter / -2));
18 | &:extend(.clearfix all);
19 | }
20 |
21 | // Generate the extra small columns
22 | .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-right: (@gutter / 2);
28 | padding-left: (@gutter / 2);
29 | }
30 | .make-xs-column-offset(@columns) {
31 | margin-left: percentage((@columns / @grid-columns));
32 | }
33 | .make-xs-column-push(@columns) {
34 | left: percentage((@columns / @grid-columns));
35 | }
36 | .make-xs-column-pull(@columns) {
37 | right: percentage((@columns / @grid-columns));
38 | }
39 |
40 | // Generate the small columns
41 | .make-sm-column(@columns; @gutter: @grid-gutter-width) {
42 | position: relative;
43 | min-height: 1px;
44 | padding-right: (@gutter / 2);
45 | padding-left: (@gutter / 2);
46 |
47 | @media (min-width: @screen-sm-min) {
48 | float: left;
49 | width: percentage((@columns / @grid-columns));
50 | }
51 | }
52 | .make-sm-column-offset(@columns) {
53 | @media (min-width: @screen-sm-min) {
54 | margin-left: percentage((@columns / @grid-columns));
55 | }
56 | }
57 | .make-sm-column-push(@columns) {
58 | @media (min-width: @screen-sm-min) {
59 | left: percentage((@columns / @grid-columns));
60 | }
61 | }
62 | .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 | .make-md-column(@columns; @gutter: @grid-gutter-width) {
70 | position: relative;
71 | min-height: 1px;
72 | padding-right: (@gutter / 2);
73 | padding-left: (@gutter / 2);
74 |
75 | @media (min-width: @screen-md-min) {
76 | float: left;
77 | width: percentage((@columns / @grid-columns));
78 | }
79 | }
80 | .make-md-column-offset(@columns) {
81 | @media (min-width: @screen-md-min) {
82 | margin-left: percentage((@columns / @grid-columns));
83 | }
84 | }
85 | .make-md-column-push(@columns) {
86 | @media (min-width: @screen-md-min) {
87 | left: percentage((@columns / @grid-columns));
88 | }
89 | }
90 | .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 | .make-lg-column(@columns; @gutter: @grid-gutter-width) {
98 | position: relative;
99 | min-height: 1px;
100 | padding-right: (@gutter / 2);
101 | padding-left: (@gutter / 2);
102 |
103 | @media (min-width: @screen-lg-min) {
104 | float: left;
105 | width: percentage((@columns / @grid-columns));
106 | }
107 | }
108 | .make-lg-column-offset(@columns) {
109 | @media (min-width: @screen-lg-min) {
110 | margin-left: percentage((@columns / @grid-columns));
111 | }
112 | }
113 | .make-lg-column-push(@columns) {
114 | @media (min-width: @screen-lg-min) {
115 | left: percentage((@columns / @grid-columns));
116 | }
117 | }
118 | .make-lg-column-pull(@columns) {
119 | @media (min-width: @screen-lg-min) {
120 | right: percentage((@columns / @grid-columns));
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/hide-text.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable font-family-name-quotes, font-family-no-missing-generic-family-keyword
2 |
3 | // CSS image replacement
4 | //
5 | // Heads up! v3 launched with only `.hide-text()`, but per our pattern for
6 | // mixins being reused as classes with the same name, this doesn't hold up. As
7 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
8 | //
9 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
10 |
11 | // Deprecated as of v3.0.1 (has been removed in v4)
12 | .hide-text() {
13 | font: ~"0/0" a;
14 | color: transparent;
15 | text-shadow: none;
16 | background-color: transparent;
17 | border: 0;
18 | }
19 |
20 | // New mixin to use as of v3.0.1
21 | .text-hide() {
22 | .hide-text();
23 | }
24 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/image.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable media-feature-name-no-vendor-prefix, media-feature-parentheses-space-inside, media-feature-name-no-unknown, indentation, at-rule-name-space-after
2 |
3 | // Responsive image
4 | //
5 | // Keep images from scaling beyond the width of their parents.
6 | .img-responsive(@display: block) {
7 | display: @display;
8 | max-width: 100%; // Part 1: Set a maximum relative to the parent
9 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
10 | }
11 |
12 |
13 | // Retina image
14 | //
15 | // Short retina mixin for setting background-image and -size. Note that the
16 | // spelling of `min--moz-device-pixel-ratio` is intentional.
17 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
18 | background-image: url("@{file-1x}");
19 |
20 | @media
21 | only screen and (-webkit-min-device-pixel-ratio: 2),
22 | only screen and ( min--moz-device-pixel-ratio: 2),
23 | only screen and ( -o-min-device-pixel-ratio: 2/1),
24 | only screen and ( min-device-pixel-ratio: 2),
25 | only screen and ( min-resolution: 192dpi),
26 | only screen and ( min-resolution: 2dppx) {
27 | background-image: url("@{file-2x}");
28 | background-size: @width-1x @height-1x;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/labels.less:
--------------------------------------------------------------------------------
1 | // Labels
2 |
3 | .label-variant(@color) {
4 | background-color: @color;
5 |
6 | &[href] {
7 | &:hover,
8 | &:focus {
9 | background-color: darken(@color, 10%);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/list-group.less:
--------------------------------------------------------------------------------
1 | // List Groups
2 |
3 | .list-group-item-variant(@state; @background; @color) {
4 | .list-group-item-@{state} {
5 | color: @color;
6 | background-color: @background;
7 |
8 | a&,
9 | button& {
10 | color: @color;
11 |
12 | .list-group-item-heading {
13 | color: inherit;
14 | }
15 |
16 | &:hover,
17 | &:focus {
18 | color: @color;
19 | background-color: darken(@background, 5%);
20 | }
21 | &.active,
22 | &.active:hover,
23 | &.active:focus {
24 | color: #fff;
25 | background-color: @color;
26 | border-color: @color;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/nav-divider.less:
--------------------------------------------------------------------------------
1 | // Horizontal dividers
2 | //
3 | // Dividers (basically an hr) within dropdowns and nav lists
4 |
5 | .nav-divider(@color: #e5e5e5) {
6 | height: 1px;
7 | margin: ((@line-height-computed / 2) - 1) 0;
8 | overflow: hidden;
9 | background-color: @color;
10 | }
11 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/nav-vertical-align.less:
--------------------------------------------------------------------------------
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 | .navbar-vertical-align(@element-height) {
7 | margin-top: ((@navbar-height - @element-height) / 2);
8 | margin-bottom: ((@navbar-height - @element-height) / 2);
9 | }
10 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/opacity.less:
--------------------------------------------------------------------------------
1 | // Opacity
2 |
3 | .opacity(@opacity) {
4 | @opacity-ie: (@opacity * 100); // IE8 filter
5 | filter: ~"alpha(opacity=@{opacity-ie})";
6 | opacity: @opacity;
7 | }
8 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/pagination.less:
--------------------------------------------------------------------------------
1 | // Pagination
2 |
3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
4 | > li {
5 | > a,
6 | > span {
7 | padding: @padding-vertical @padding-horizontal;
8 | font-size: @font-size;
9 | line-height: @line-height;
10 | }
11 | &:first-child {
12 | > a,
13 | > span {
14 | .border-left-radius(@border-radius);
15 | }
16 | }
17 | &:last-child {
18 | > a,
19 | > span {
20 | .border-right-radius(@border-radius);
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/panels.less:
--------------------------------------------------------------------------------
1 | // Panels
2 |
3 | .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 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/progress-bar.less:
--------------------------------------------------------------------------------
1 | // Progress bars
2 |
3 | .progress-bar-variant(@color) {
4 | background-color: @color;
5 |
6 | // Deprecated parent class requirement as of v3.2.0
7 | .progress-striped & {
8 | #gradient > .striped();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/reset-filter.less:
--------------------------------------------------------------------------------
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 | .reset-filter() {
7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
8 | }
9 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/reset-text.less:
--------------------------------------------------------------------------------
1 | .reset-text() {
2 | font-family: @font-family-base;
3 | // We deliberately do NOT reset font-size.
4 | font-style: normal;
5 | font-weight: 400;
6 | line-height: @line-height-base;
7 | line-break: auto;
8 | text-align: left; // Fallback for where `start` is not supported
9 | text-align: start;
10 | text-decoration: none;
11 | text-shadow: none;
12 | text-transform: none;
13 | letter-spacing: normal;
14 | word-break: normal;
15 | word-spacing: normal;
16 | word-wrap: normal;
17 | white-space: normal;
18 | }
19 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/resize.less:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | .resizable(@direction) {
4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5 | resize: @direction; // Options: horizontal, vertical, both
6 | }
7 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/responsive-visibility.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | .responsive-visibility() {
4 | display: block !important;
5 | table& { display: table !important; }
6 | tr& { display: table-row !important; }
7 | th&,
8 | td& { display: table-cell !important; }
9 | }
10 |
11 | .responsive-invisibility() {
12 | display: none !important;
13 | }
14 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/size.less:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | .size(@width; @height) {
4 | width: @width;
5 | height: @height;
6 | }
7 |
8 | .square(@size) {
9 | .size(@size; @size);
10 | }
11 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/tab-focus.less:
--------------------------------------------------------------------------------
1 | // WebKit-style focus
2 |
3 | .tab-focus() {
4 | // WebKit-specific. Other browsers will keep their default outline style.
5 | // (Initially tried to also force default via `outline: initial`,
6 | // but that seems to erroneously remove the outline in Firefox altogether.)
7 | outline: 5px auto -webkit-focus-ring-color;
8 | outline-offset: -2px;
9 | }
10 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/table-row.less:
--------------------------------------------------------------------------------
1 | // Tables
2 |
3 | .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 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/text-emphasis.less:
--------------------------------------------------------------------------------
1 | // Typography
2 |
3 | .text-emphasis-variant(@color) {
4 | color: @color;
5 | a&:hover,
6 | a&:focus {
7 | color: darken(@color, 10%);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/mixins/text-overflow.less:
--------------------------------------------------------------------------------
1 | // Text overflow
2 | // Requires inline-block or block for proper styling
3 |
4 | .text-overflow() {
5 | overflow: hidden;
6 | text-overflow: ellipsis;
7 | white-space: nowrap;
8 | }
9 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/modals.less:
--------------------------------------------------------------------------------
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 | position: fixed;
18 | top: 0;
19 | right: 0;
20 | bottom: 0;
21 | left: 0;
22 | z-index: @zindex-modal;
23 | display: none;
24 | overflow: hidden;
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 | .translate(0, -25%);
34 | .transition-transform(~"0.3s ease-out");
35 | }
36 | &.in .modal-dialog { .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 | background-clip: padding-box;
55 | border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
56 | border: 1px solid @modal-content-border-color;
57 | border-radius: @border-radius-large;
58 | .box-shadow(0 3px 9px rgba(0, 0, 0, .5));
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 { .opacity(0); }
74 | &.in { .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 | &:extend(.clearfix all);
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 | &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
108 |
109 | // Properly space out buttons
110 | .btn + .btn {
111 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
112 | margin-left: 5px;
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 | .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 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/pager.less:
--------------------------------------------------------------------------------
1 | //
2 | // Pager pagination
3 | // --------------------------------------------------
4 |
5 |
6 | .pager {
7 | padding-left: 0;
8 | margin: @line-height-computed 0;
9 | text-align: center;
10 | list-style: none;
11 | &:extend(.clearfix all);
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 | cursor: @cursor-disabled;
51 | background-color: @pager-bg;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/pagination.less:
--------------------------------------------------------------------------------
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 | margin-left: -1px;
18 | line-height: @line-height-base;
19 | color: @pagination-color;
20 | text-decoration: none;
21 | background-color: @pagination-bg;
22 | border: 1px solid @pagination-border;
23 |
24 | &:hover,
25 | &:focus {
26 | z-index: 2;
27 | color: @pagination-hover-color;
28 | background-color: @pagination-hover-bg;
29 | border-color: @pagination-hover-border;
30 | }
31 | }
32 | &:first-child {
33 | > a,
34 | > span {
35 | margin-left: 0;
36 | .border-left-radius(@border-radius-base);
37 | }
38 | }
39 | &:last-child {
40 | > a,
41 | > span {
42 | .border-right-radius(@border-radius-base);
43 | }
44 | }
45 | }
46 |
47 | > .active > a,
48 | > .active > span {
49 | &,
50 | &:hover,
51 | &:focus {
52 | z-index: 3;
53 | color: @pagination-active-color;
54 | cursor: default;
55 | background-color: @pagination-active-bg;
56 | border-color: @pagination-active-border;
57 | }
58 | }
59 |
60 | > .disabled {
61 | > span,
62 | > span:hover,
63 | > span:focus,
64 | > a,
65 | > a:hover,
66 | > a:focus {
67 | color: @pagination-disabled-color;
68 | cursor: @cursor-disabled;
69 | background-color: @pagination-disabled-bg;
70 | border-color: @pagination-disabled-border;
71 | }
72 | }
73 | }
74 |
75 | // Sizing
76 | // --------------------------------------------------
77 |
78 | // Large
79 | .pagination-lg {
80 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
81 | }
82 |
83 | // Small
84 | .pagination-sm {
85 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
86 | }
87 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/popovers.less:
--------------------------------------------------------------------------------
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 | // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.
15 | // So reset our font and text properties to avoid inheriting weird values.
16 | .reset-text();
17 | font-size: @font-size-base;
18 | background-color: @popover-bg;
19 | background-clip: padding-box;
20 | border: 1px solid @popover-fallback-border-color;
21 | border: 1px solid @popover-border-color;
22 | border-radius: @border-radius-large;
23 | .box-shadow(0 5px 10px rgba(0, 0, 0, .2));
24 |
25 | // Offset the popover to account for the popover arrow
26 | &.top { margin-top: -@popover-arrow-width; }
27 | &.right { margin-left: @popover-arrow-width; }
28 | &.bottom { margin-top: @popover-arrow-width; }
29 | &.left { margin-left: -@popover-arrow-width; }
30 |
31 | // Arrows
32 | // .arrow is outer, .arrow:after is inner
33 | > .arrow {
34 | border-width: @popover-arrow-outer-width;
35 |
36 | &,
37 | &:after {
38 | position: absolute;
39 | display: block;
40 | width: 0;
41 | height: 0;
42 | border-color: transparent;
43 | border-style: solid;
44 | }
45 |
46 | &:after {
47 | content: "";
48 | border-width: @popover-arrow-width;
49 | }
50 | }
51 |
52 | &.top > .arrow {
53 | bottom: -@popover-arrow-outer-width;
54 | left: 50%;
55 | margin-left: -@popover-arrow-outer-width;
56 | border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback
57 | border-top-color: @popover-arrow-outer-color;
58 | border-bottom-width: 0;
59 | &:after {
60 | bottom: 1px;
61 | margin-left: -@popover-arrow-width;
62 | content: " ";
63 | border-top-color: @popover-arrow-color;
64 | border-bottom-width: 0;
65 | }
66 | }
67 | &.right > .arrow {
68 | top: 50%;
69 | left: -@popover-arrow-outer-width;
70 | margin-top: -@popover-arrow-outer-width;
71 | border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback
72 | border-right-color: @popover-arrow-outer-color;
73 | border-left-width: 0;
74 | &:after {
75 | bottom: -@popover-arrow-width;
76 | left: 1px;
77 | content: " ";
78 | border-right-color: @popover-arrow-color;
79 | border-left-width: 0;
80 | }
81 | }
82 | &.bottom > .arrow {
83 | top: -@popover-arrow-outer-width;
84 | left: 50%;
85 | margin-left: -@popover-arrow-outer-width;
86 | border-top-width: 0;
87 | border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback
88 | border-bottom-color: @popover-arrow-outer-color;
89 | &:after {
90 | top: 1px;
91 | margin-left: -@popover-arrow-width;
92 | content: " ";
93 | border-top-width: 0;
94 | border-bottom-color: @popover-arrow-color;
95 | }
96 | }
97 |
98 | &.left > .arrow {
99 | top: 50%;
100 | right: -@popover-arrow-outer-width;
101 | margin-top: -@popover-arrow-outer-width;
102 | border-right-width: 0;
103 | border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback
104 | border-left-color: @popover-arrow-outer-color;
105 | &:after {
106 | right: 1px;
107 | bottom: -@popover-arrow-width;
108 | content: " ";
109 | border-right-width: 0;
110 | border-left-color: @popover-arrow-color;
111 | }
112 | }
113 | }
114 |
115 | .popover-title {
116 | padding: 8px 14px;
117 | margin: 0; // reset heading margin
118 | font-size: @font-size-base;
119 | background-color: @popover-title-bg;
120 | border-bottom: 1px solid darken(@popover-title-bg, 5%);
121 | border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;
122 | }
123 |
124 | .popover-content {
125 | padding: 9px 14px;
126 | }
127 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/print.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important, selector-no-qualifying-type
2 |
3 | /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
4 |
5 | // ==========================================================================
6 | // Print styles.
7 | // Inlined to avoid the additional HTTP request: h5bp.com/r
8 | // ==========================================================================
9 |
10 | @media print {
11 | *,
12 | *:before,
13 | *:after {
14 | color: #000 !important; // Black prints faster: h5bp.com/s
15 | text-shadow: none !important;
16 | background: transparent !important;
17 | box-shadow: none !important;
18 | }
19 |
20 | a,
21 | a:visited {
22 | text-decoration: underline;
23 | }
24 |
25 | a[href]:after {
26 | content: " (" attr(href) ")";
27 | }
28 |
29 | abbr[title]:after {
30 | content: " (" attr(title) ")";
31 | }
32 |
33 | // Don't show links that are fragment identifiers,
34 | // or use the `javascript:` pseudo protocol
35 | a[href^="#"]:after,
36 | a[href^="javascript:"]:after {
37 | content: "";
38 | }
39 |
40 | pre,
41 | blockquote {
42 | border: 1px solid #999;
43 | page-break-inside: avoid;
44 | }
45 |
46 | thead {
47 | display: table-header-group; // h5bp.com/t
48 | }
49 |
50 | tr,
51 | img {
52 | page-break-inside: avoid;
53 | }
54 |
55 | img {
56 | max-width: 100% !important;
57 | }
58 |
59 | p,
60 | h2,
61 | h3 {
62 | orphans: 3;
63 | widows: 3;
64 | }
65 |
66 | h2,
67 | h3 {
68 | page-break-after: avoid;
69 | }
70 |
71 | // Bootstrap specific changes start
72 |
73 | // Bootstrap components
74 | .navbar {
75 | display: none;
76 | }
77 | .btn,
78 | .dropup > .btn {
79 | > .caret {
80 | border-top-color: #000 !important;
81 | }
82 | }
83 | .label {
84 | border: 1px solid #000;
85 | }
86 |
87 | .table {
88 | border-collapse: collapse !important;
89 |
90 | td,
91 | th {
92 | background-color: #fff !important;
93 | }
94 | }
95 | .table-bordered {
96 | th,
97 | td {
98 | border: 1px solid #ddd !important;
99 | }
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/progress-bars.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable at-rule-no-vendor-prefix
2 |
3 | //
4 | // Progress bars
5 | // --------------------------------------------------
6 |
7 |
8 | // Bar animations
9 | // -------------------------
10 |
11 | // WebKit
12 | @-webkit-keyframes progress-bar-stripes {
13 | from { background-position: 40px 0; }
14 | to { background-position: 0 0; }
15 | }
16 |
17 | // Spec and IE10+
18 | @keyframes progress-bar-stripes {
19 | from { background-position: 40px 0; }
20 | to { background-position: 0 0; }
21 | }
22 |
23 |
24 | // Bar itself
25 | // -------------------------
26 |
27 | // Outer container
28 | .progress {
29 | height: @line-height-computed;
30 | margin-bottom: @line-height-computed;
31 | overflow: hidden;
32 | background-color: @progress-bg;
33 | border-radius: @progress-border-radius;
34 | .box-shadow(inset 0 1px 2px rgba(0, 0, 0, .1));
35 | }
36 |
37 | // Bar of progress
38 | .progress-bar {
39 | float: left;
40 | width: 0%;
41 | height: 100%;
42 | font-size: @font-size-small;
43 | line-height: @line-height-computed;
44 | color: @progress-bar-color;
45 | text-align: center;
46 | background-color: @progress-bar-bg;
47 | .box-shadow(inset 0 -1px 0 rgba(0, 0, 0, .15));
48 | .transition(width .6s ease);
49 | }
50 |
51 | // Striped bars
52 | //
53 | // `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
54 | // `.progress-bar-striped` class, which you just add to an existing
55 | // `.progress-bar`.
56 | .progress-striped .progress-bar,
57 | .progress-bar-striped {
58 | #gradient > .striped();
59 | background-size: 40px 40px;
60 | }
61 |
62 | // Call animation for the active one
63 | //
64 | // `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
65 | // `.progress-bar.active` approach.
66 | .progress.active .progress-bar,
67 | .progress-bar.active {
68 | .animation(progress-bar-stripes 2s linear infinite);
69 | }
70 |
71 |
72 | // Variations
73 | // -------------------------
74 |
75 | .progress-bar-success {
76 | .progress-bar-variant(@progress-bar-success-bg);
77 | }
78 |
79 | .progress-bar-info {
80 | .progress-bar-variant(@progress-bar-info-bg);
81 | }
82 |
83 | .progress-bar-warning {
84 | .progress-bar-variant(@progress-bar-warning-bg);
85 | }
86 |
87 | .progress-bar-danger {
88 | .progress-bar-variant(@progress-bar-danger-bg);
89 | }
90 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/responsive-embed.less:
--------------------------------------------------------------------------------
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 | bottom: 0;
20 | left: 0;
21 | width: 100%;
22 | height: 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 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/scaffolding.less:
--------------------------------------------------------------------------------
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 | // https://getbootstrap.com/docs/3.4/getting-started/#third-box-sizing
11 | * {
12 | .box-sizing(border-box);
13 | }
14 | *:before,
15 | *:after {
16 | .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 | .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 | .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 | .transition(all .2s ease-in-out);
100 |
101 | // Keep them at most 100% wide
102 | .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: https://a11yproject.com/posts/how-to-hide-content
124 |
125 | .sr-only {
126 | position: absolute;
127 | width: 1px;
128 | height: 1px;
129 | padding: 0;
130 | margin: -1px;
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 https://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 |
159 | [role="button"] {
160 | cursor: pointer;
161 | }
162 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/thumbnails.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable selector-no-qualifying-type
2 |
3 | //
4 | // Thumbnails
5 | // --------------------------------------------------
6 |
7 |
8 | // Mixin and adjust the regular image class
9 | .thumbnail {
10 | display: block;
11 | padding: @thumbnail-padding;
12 | margin-bottom: @line-height-computed;
13 | line-height: @line-height-base;
14 | background-color: @thumbnail-bg;
15 | border: 1px solid @thumbnail-border;
16 | border-radius: @thumbnail-border-radius;
17 | .transition(border .2s ease-in-out);
18 |
19 | > img,
20 | a > img {
21 | &:extend(.img-responsive);
22 | margin-right: auto;
23 | margin-left: auto;
24 | }
25 |
26 | // Add a hover state for linked versions only
27 | a&:hover,
28 | a&:focus,
29 | a&.active {
30 | border-color: @link-color;
31 | }
32 |
33 | // Image captions
34 | .caption {
35 | padding: @thumbnail-caption-padding;
36 | color: @thumbnail-caption-color;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/tooltip.less:
--------------------------------------------------------------------------------
1 | //
2 | // Tooltips
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .tooltip {
8 | position: absolute;
9 | z-index: @zindex-tooltip;
10 | display: block;
11 | // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
12 | // So reset our font and text properties to avoid inheriting weird values.
13 | .reset-text();
14 | font-size: @font-size-small;
15 |
16 | .opacity(0);
17 |
18 | &.in { .opacity(@tooltip-opacity); }
19 | &.top {
20 | padding: @tooltip-arrow-width 0;
21 | margin-top: -3px;
22 | }
23 | &.right {
24 | padding: 0 @tooltip-arrow-width;
25 | margin-left: 3px;
26 | }
27 | &.bottom {
28 | padding: @tooltip-arrow-width 0;
29 | margin-top: 3px;
30 | }
31 | &.left {
32 | padding: 0 @tooltip-arrow-width;
33 | margin-left: -3px;
34 | }
35 |
36 | // Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
37 | &.top .tooltip-arrow {
38 | bottom: 0;
39 | left: 50%;
40 | margin-left: -@tooltip-arrow-width;
41 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
42 | border-top-color: @tooltip-arrow-color;
43 | }
44 | &.top-left .tooltip-arrow {
45 | right: @tooltip-arrow-width;
46 | bottom: 0;
47 | margin-bottom: -@tooltip-arrow-width;
48 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
49 | border-top-color: @tooltip-arrow-color;
50 | }
51 | &.top-right .tooltip-arrow {
52 | bottom: 0;
53 | left: @tooltip-arrow-width;
54 | margin-bottom: -@tooltip-arrow-width;
55 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
56 | border-top-color: @tooltip-arrow-color;
57 | }
58 | &.right .tooltip-arrow {
59 | top: 50%;
60 | left: 0;
61 | margin-top: -@tooltip-arrow-width;
62 | border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
63 | border-right-color: @tooltip-arrow-color;
64 | }
65 | &.left .tooltip-arrow {
66 | top: 50%;
67 | right: 0;
68 | margin-top: -@tooltip-arrow-width;
69 | border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
70 | border-left-color: @tooltip-arrow-color;
71 | }
72 | &.bottom .tooltip-arrow {
73 | top: 0;
74 | left: 50%;
75 | margin-left: -@tooltip-arrow-width;
76 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
77 | border-bottom-color: @tooltip-arrow-color;
78 | }
79 | &.bottom-left .tooltip-arrow {
80 | top: 0;
81 | right: @tooltip-arrow-width;
82 | margin-top: -@tooltip-arrow-width;
83 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
84 | border-bottom-color: @tooltip-arrow-color;
85 | }
86 | &.bottom-right .tooltip-arrow {
87 | top: 0;
88 | left: @tooltip-arrow-width;
89 | margin-top: -@tooltip-arrow-width;
90 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
91 | border-bottom-color: @tooltip-arrow-color;
92 | }
93 | }
94 |
95 | // Wrapper for the tooltip content
96 | .tooltip-inner {
97 | max-width: @tooltip-max-width;
98 | padding: 3px 8px;
99 | color: @tooltip-color;
100 | text-align: center;
101 | background-color: @tooltip-bg;
102 | border-radius: @border-radius-base;
103 | }
104 |
105 | // Arrows
106 | .tooltip-arrow {
107 | position: absolute;
108 | width: 0;
109 | height: 0;
110 | border-color: transparent;
111 | border-style: solid;
112 | }
113 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/utilities.less:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | //
4 | // Utility classes
5 | // --------------------------------------------------
6 |
7 |
8 | // Floats
9 | // -------------------------
10 |
11 | .clearfix {
12 | .clearfix();
13 | }
14 | .center-block {
15 | .center-block();
16 | }
17 | .pull-right {
18 | float: right !important;
19 | }
20 | .pull-left {
21 | float: left !important;
22 | }
23 |
24 |
25 | // Toggling content
26 | // -------------------------
27 |
28 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
29 | .hide {
30 | display: none !important;
31 | }
32 | .show {
33 | display: block !important;
34 | }
35 | .invisible {
36 | visibility: hidden;
37 | }
38 | .text-hide {
39 | .text-hide();
40 | }
41 |
42 |
43 | // Hide from screenreaders and browsers
44 | //
45 | // Credit: HTML5 Boilerplate
46 |
47 | .hidden {
48 | display: none !important;
49 | }
50 |
51 |
52 | // For Affix plugin
53 | // -------------------------
54 |
55 | .affix {
56 | position: fixed;
57 | }
58 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/less/wells.less:
--------------------------------------------------------------------------------
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 | .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 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/nuget/MyGet.ps1:
--------------------------------------------------------------------------------
1 | $nuget = $env:NuGet
2 |
3 | # parse the version number out of package.json
4 | $bsversion = ((Get-Content $env:SourcesPath\package.json) -join "`n" | ConvertFrom-Json).version
5 |
6 | # create packages
7 | & $nuget pack "nuget\bootstrap.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion
8 | & $nuget pack "nuget\bootstrap.less.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion
9 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/nuget/bootstrap.less.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | bootstrap.less
5 | 3.4.1
6 | Bootstrap Less
7 | Twitter, Inc.
8 | bootstrap
9 | The most popular front-end framework for developing responsive, mobile first projects on the web.
10 | https://blog.getbootstrap.com/
11 | Bootstrap framework in Less. Includes fonts and JavaScript
12 | en-us
13 | https://getbootstrap.com/
14 | https://getbootstrap.com/apple-touch-icon.png
15 | https://github.com/twbs/bootstrap/blob/master/LICENSE
16 | Copyright 2019
17 | false
18 |
19 |
20 |
21 | css js less mobile-first responsive front-end framework web
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/nuget/bootstrap.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | bootstrap
5 | 3.4.1
6 | Bootstrap CSS
7 | Twitter, Inc.
8 | bootstrap
9 | The most popular front-end framework for developing responsive, mobile first projects on the web.
10 | https://blog.getbootstrap.com/
11 | Bootstrap framework in CSS. Includes fonts and JavaScript
12 | en-us
13 | https://getbootstrap.com/
14 | https://getbootstrap.com/apple-touch-icon.png
15 | https://github.com/twbs/bootstrap/blob/master/LICENSE
16 | Copyright 2019
17 | false
18 |
19 |
20 |
21 | css js less mobile-first responsive front-end framework web
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/package.js:
--------------------------------------------------------------------------------
1 | // package metadata file for Meteor.js
2 |
3 | /* jshint strict:false */
4 | /* global Package:true */
5 |
6 | Package.describe({
7 | name: 'twbs:bootstrap', // https://atmospherejs.com/twbs/bootstrap
8 | summary: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
9 | version: '3.4.1',
10 | git: 'https://github.com/twbs/bootstrap.git'
11 | });
12 |
13 | Package.onUse(function (api) {
14 | api.versionsFrom('METEOR@1.0');
15 | api.use('jquery', 'client');
16 | var assets = [
17 | 'dist/fonts/glyphicons-halflings-regular.eot',
18 | 'dist/fonts/glyphicons-halflings-regular.svg',
19 | 'dist/fonts/glyphicons-halflings-regular.ttf',
20 | 'dist/fonts/glyphicons-halflings-regular.woff',
21 | 'dist/fonts/glyphicons-halflings-regular.woff2'
22 | ];
23 | if (api.addAssets) {
24 | api.addAssets(assets, 'client');
25 | } else {
26 | api.addFiles(assets, 'client', { isAsset: true });
27 | }
28 | api.addFiles([
29 | 'dist/css/bootstrap.css',
30 | 'dist/js/bootstrap.js'
31 | ], 'client');
32 | });
33 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/bootstrap/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 | "version": "3.4.1",
5 | "keywords": [
6 | "css",
7 | "less",
8 | "mobile-first",
9 | "responsive",
10 | "front-end",
11 | "framework",
12 | "web"
13 | ],
14 | "homepage": "https://getbootstrap.com/",
15 | "author": "Twitter, Inc.",
16 | "scripts": {
17 | "sri": "node grunt/generate-sri.js",
18 | "release": "grunt prep-release && npm run sri && npm run release-zip",
19 | "release-zip": "cross-env-shell \"shx rm -rf bootstrap-$npm_package_version-dist && shx cp -r dist/ bootstrap-$npm_package_version-dist && zip -r9 bootstrap-$npm_package_version-dist.zip bootstrap-$npm_package_version-dist && shx rm -rf bootstrap-$npm_package_version-dist\"",
20 | "change-version": "node grunt/change-version.js",
21 | "test": "grunt test"
22 | },
23 | "style": "dist/css/bootstrap.css",
24 | "less": "less/bootstrap.less",
25 | "main": "./dist/js/npm",
26 | "repository": {
27 | "type": "git",
28 | "url": "https://github.com/twbs/bootstrap.git"
29 | },
30 | "bugs": {
31 | "url": "https://github.com/twbs/bootstrap/issues"
32 | },
33 | "license": "MIT",
34 | "dependencies": {},
35 | "devDependencies": {
36 | "autoprefixer": "^9.4.7",
37 | "btoa": "^1.2.1",
38 | "cross-env": "^5.2.0",
39 | "glob": "^7.1.3",
40 | "grunt": "^1.0.3",
41 | "grunt-contrib-clean": "^2.0.0",
42 | "grunt-contrib-concat": "^1.0.1",
43 | "grunt-contrib-connect": "^2.0.0",
44 | "grunt-contrib-copy": "^1.0.0",
45 | "grunt-contrib-cssmin": "^3.0.0",
46 | "grunt-contrib-jshint": "^2.0.0",
47 | "grunt-contrib-less": "^2.0.0",
48 | "grunt-contrib-pug": "^2.0.0",
49 | "grunt-contrib-uglify": "^4.0.0",
50 | "grunt-contrib-watch": "^1.1.0",
51 | "grunt-exec": "^3.0.0",
52 | "grunt-html": "^10.1.0",
53 | "grunt-jekyll": "^1.0.0",
54 | "grunt-jscs": "^3.0.1",
55 | "grunt-postcss": "^0.9.0",
56 | "grunt-stylelint": "^0.10.1",
57 | "ip": "^1.1.5",
58 | "karma": "^3.1.3",
59 | "karma-browserstack-launcher": "^1.4.0",
60 | "karma-chrome-launcher": "^2.2.0",
61 | "karma-detect-browsers": "^2.3.3",
62 | "karma-firefox-launcher": "^1.1.0",
63 | "karma-qunit": "^1.2.1",
64 | "load-grunt-tasks": "^4.0.0",
65 | "markdown-it": "^8.4.2",
66 | "qunitjs": "^1.23.1",
67 | "replace-in-file": "^3.4.3",
68 | "shelljs": "^0.8.3",
69 | "shx": "^0.3.2",
70 | "stylelint": "~9.6.0",
71 | "stylelint-config-standard": "^18.2.0",
72 | "stylelint-order": "^1.0.0",
73 | "time-grunt": "^2.0.0"
74 | },
75 | "engines": {
76 | "node": ">=6"
77 | },
78 | "files": [
79 | "dist",
80 | "fonts",
81 | "grunt",
82 | "js/*.js",
83 | "less/**/*.less",
84 | "Gruntfile.js",
85 | "LICENSE"
86 | ],
87 | "jspm": {
88 | "main": "js/bootstrap",
89 | "shim": {
90 | "js/bootstrap": {
91 | "deps": "jquery",
92 | "exports": "$"
93 | }
94 | },
95 | "files": [
96 | "css",
97 | "fonts",
98 | "js"
99 | ]
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/jquery-validation-unobtrusive/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-validation-unobtrusive",
3 | "version": "3.2.6",
4 | "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
5 | "description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.",
6 | "main": [
7 | "jquery.validate.unobtrusive.js"
8 | ],
9 | "ignore": [
10 | "**/.*",
11 | "*.json",
12 | "*.md",
13 | "*.txt",
14 | "gulpfile.js"
15 | ],
16 | "keywords": [
17 | "jquery",
18 | "asp.net",
19 | "mvc",
20 | "validation",
21 | "unobtrusive"
22 | ],
23 | "authors": [
24 | "Microsoft"
25 | ],
26 | "license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm",
27 | "repository": {
28 | "type": "git",
29 | "url": "git://github.com/aspnet/jquery-validation-unobtrusive.git"
30 | },
31 | "dependencies": {
32 | "jquery-validation": ">=1.8",
33 | "jquery": ">=1.8"
34 | },
35 | "_release": "3.2.6",
36 | "_resolution": {
37 | "type": "version",
38 | "tag": "v3.2.6",
39 | "commit": "13386cd1b5947d8a5d23a12b531ce3960be1eba7"
40 | },
41 | "_source": "git://github.com/aspnet/jquery-validation-unobtrusive.git",
42 | "_target": "3.2.6",
43 | "_originalSource": "jquery-validation-unobtrusive"
44 | }
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/jquery-validation/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-validation",
3 | "homepage": "http://jqueryvalidation.org/",
4 | "repository": {
5 | "type": "git",
6 | "url": "git://github.com/jzaefferer/jquery-validation.git"
7 | },
8 | "authors": [
9 | "Jörn Zaefferer "
10 | ],
11 | "description": "Form validation made easy",
12 | "main": "dist/jquery.validate.js",
13 | "keywords": [
14 | "forms",
15 | "validation",
16 | "validate"
17 | ],
18 | "license": "MIT",
19 | "ignore": [
20 | "**/.*",
21 | "node_modules",
22 | "bower_components",
23 | "test",
24 | "demo",
25 | "lib"
26 | ],
27 | "dependencies": {
28 | "jquery": ">= 1.7.2"
29 | },
30 | "version": "1.14.0",
31 | "_release": "1.14.0",
32 | "_resolution": {
33 | "type": "version",
34 | "tag": "1.14.0",
35 | "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
36 | },
37 | "_source": "git://github.com/jzaefferer/jquery-validation.git",
38 | "_target": ">=1.8",
39 | "_originalSource": "jquery-validation"
40 | }
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/jquery-validation/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | =====================
3 |
4 | Copyright Jörn Zaefferer
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/jquery/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "main": "dist/jquery.js",
4 | "license": "MIT",
5 | "ignore": [
6 | "package.json"
7 | ],
8 | "keywords": [
9 | "jquery",
10 | "javascript",
11 | "browser",
12 | "library"
13 | ],
14 | "homepage": "https://github.com/jquery/jquery-dist",
15 | "version": "2.2.0",
16 | "_release": "2.2.0",
17 | "_resolution": {
18 | "type": "version",
19 | "tag": "2.2.0",
20 | "commit": "6fc01e29bdad0964f62ef56d01297039cdcadbe5"
21 | },
22 | "_source": "git://github.com/jquery/jquery-dist.git",
23 | "_target": "2.2.0",
24 | "_originalSource": "jquery"
25 | }
--------------------------------------------------------------------------------
/samples/TestImplementation.ReadCookie/wwwroot/lib/jquery/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright jQuery Foundation and other contributors, https://jquery.org/
2 |
3 | This software consists of voluntary contributions made by many
4 | individuals. For exact contribution history, see the revision history
5 | available at https://github.com/jquery/jquery
6 |
7 | The following license applies to all parts of this software except as
8 | documented below:
9 |
10 | ====
11 |
12 | Permission is hereby granted, free of charge, to any person obtaining
13 | a copy of this software and associated documentation files (the
14 | "Software"), to deal in the Software without restriction, including
15 | without limitation the rights to use, copy, modify, merge, publish,
16 | distribute, sublicense, and/or sell copies of the Software, and to
17 | permit persons to whom the Software is furnished to do so, subject to
18 | the following conditions:
19 |
20 | The above copyright notice and this permission notice shall be
21 | included in all copies or substantial portions of the Software.
22 |
23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 |
31 | ====
32 |
33 | All files located in the node_modules and external directories are
34 | externally maintained libraries used by this software which have their
35 | own licenses; we recommend you read them, as their terms may differ from
36 | the terms above.
37 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/App_Start/BundleConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 | using System.Web.Optimization;
3 |
4 | namespace TestImplementation.SetCookie
5 | {
6 | public class BundleConfig
7 | {
8 | // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
9 | public static void RegisterBundles(BundleCollection bundles)
10 | {
11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
12 | "~/Scripts/jquery-{version}.js"));
13 |
14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
15 | "~/Scripts/jquery.validate*"));
16 |
17 | // Use the development version of Modernizr to develop with and learn from. Then, when you're
18 | // ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
19 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
20 | "~/Scripts/modernizr-*"));
21 |
22 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
23 | "~/Scripts/bootstrap.js",
24 | "~/Scripts/respond.js"));
25 |
26 | bundles.Add(new StyleBundle("~/Content/css").Include(
27 | "~/Content/bootstrap.css",
28 | "~/Content/site.css"));
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/App_Start/FilterConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 | using System.Web.Mvc;
3 |
4 | namespace TestImplementation.SetCookie
5 | {
6 | public class FilterConfig
7 | {
8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters)
9 | {
10 | filters.Add(new HandleErrorAttribute());
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/App_Start/RouteConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Mvc;
2 | using System.Web.Routing;
3 |
4 | namespace TestImplementation.SetCookie
5 | {
6 | public class RouteConfig
7 | {
8 | public static void RegisterRoutes(RouteCollection routes)
9 | {
10 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
11 |
12 | routes.MapRoute(
13 | name: "Default",
14 | url: "{controller}/{action}/{id}",
15 | defaults: new { controller = "Login", action = "Index", id = UrlParameter.Optional }
16 | );
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/ApplicationInsights.config:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Content/Site.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | padding-bottom: 20px;
4 | }
5 |
6 | /* Set padding to keep content from hitting the edges */
7 | .body-content {
8 | padding-left: 15px;
9 | padding-right: 15px;
10 | }
11 |
12 | /* Override the default bootstrap behavior where horizontal description lists
13 | will truncate terms that are too long to fit in the left column
14 | */
15 | .dl-horizontal dt {
16 | white-space: normal;
17 | }
18 |
19 | /* Set width on the form input elements since they're 100% wide by default */
20 | input,
21 | select,
22 | textarea {
23 | max-width: 280px;
24 | }
25 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Controllers/LoginController.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Mvc;
2 | using TestImplementation.SetCookie.Models;
3 |
4 | namespace TestImplementation.SetCookie.Controllers
5 | {
6 | public class LoginController : Controller
7 | {
8 | public ActionResult Index(string returnUrl)
9 | {
10 | var model = new LoginVM()
11 | {
12 | ReturnUrl = returnUrl
13 | };
14 | return View(model);
15 | }
16 |
17 | [HttpPost]
18 | public ActionResult Index(LoginVM model)
19 | {
20 | if (ModelState.IsValid)
21 | {
22 | System.Web.Security.FormsAuthentication.SetAuthCookie(model.UserName, true);
23 | return Redirect(model.ReturnUrl);
24 | }
25 | return View(model);
26 | }
27 |
28 | public ActionResult Logout()
29 | {
30 | System.Web.Security.FormsAuthentication.SignOut();
31 | return RedirectToAction(nameof(Index));
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="TestImplementation.SetCookie.MvcApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 | using System.Web.Optimization;
7 | using System.Web.Routing;
8 |
9 | namespace TestImplementation.SetCookie
10 | {
11 | public class MvcApplication : System.Web.HttpApplication
12 | {
13 | protected void Application_Start()
14 | {
15 | AreaRegistration.RegisterAllAreas();
16 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
17 | RouteConfig.RegisterRoutes(RouteTable.Routes);
18 | BundleConfig.RegisterBundles(BundleTable.Bundles);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Models/LoginVM.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 |
3 | namespace TestImplementation.SetCookie.Models
4 | {
5 | public class LoginVM
6 | {
7 | public string ReturnUrl { get; set; }
8 | [Required]
9 | public string UserName { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("TestImplementation.SetCookie")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("TestImplementation.SetCookie")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("762b673b-7e0d-41b8-b049-ba1d044acb95")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Views/Login/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model TestImplementation.SetCookie.Models.LoginVM
2 | @{
3 | ViewBag.Title = "Login Page";
4 | }
5 |
6 |
7 |
8 |
Login
9 | @using (Html.BeginForm())
10 | {
11 | @Html.HiddenFor(m => m.ReturnUrl)
12 |
13 | @Html.TextBoxFor(m => m.UserName)
14 | @Html.ValidationMessageFor(m => m.UserName)
15 |
16 |
17 |
18 |
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Error
6 |
7 |
8 |
9 | Error.
10 | An error occurred while processing your request.
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @ViewBag.Title - My ASP.NET Application
7 | @Styles.Render("~/Content/css")
8 | @Scripts.Render("~/bundles/modernizr")
9 |
10 |
11 |
12 |
13 |
21 |
22 |
23 | @Html.ActionLink("Home", "Index", "Login")
24 | @if (User.Identity.IsAuthenticated)
25 | {
26 | @Html.ActionLink("Logout", "Logout", "Login")
27 | }
28 |
29 |
30 |
31 |
32 |
33 | @RenderBody()
34 |
35 |
38 |
39 |
40 | @Scripts.Render("~/bundles/jquery")
41 | @Scripts.Render("~/bundles/bootstrap")
42 | @RenderSection("scripts", required: false)
43 |
44 |
45 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/_Layout.cshtml";
3 | }
4 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/synercoder/FormsAuthentication/537d1592c381821cfd8c3ca00a5658816e10fd2f/samples/TestImplementation.SetCookie/favicon.ico
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/synercoder/FormsAuthentication/537d1592c381821cfd8c3ca00a5658816e10fd2f/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/synercoder/FormsAuthentication/537d1592c381821cfd8c3ca00a5658816e10fd2f/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/synercoder/FormsAuthentication/537d1592c381821cfd8c3ca00a5658816e10fd2f/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/synercoder/FormsAuthentication/537d1592c381821cfd8c3ca00a5658816e10fd2f/samples/TestImplementation.SetCookie/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/samples/TestImplementation.SetCookie/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/CryptoAlgorithmFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Security.Cryptography;
4 |
5 | namespace Synercoding.FormsAuthentication.Encryption
6 | {
7 | // based upon: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/MachineKeyCryptoAlgorithmFactory.cs
8 | internal sealed class CryptoAlgorithmFactory : ICryptoAlgorithmFactory
9 | {
10 |
11 | private readonly FormsAuthenticationOptions _options;
12 | private Func _encryptionAlgorithmFactory;
13 | private Func _validationAlgorithmFactory;
14 |
15 | public CryptoAlgorithmFactory(FormsAuthenticationOptions options)
16 | {
17 | _options = options;
18 | }
19 |
20 | public SymmetricAlgorithm GetEncryptionAlgorithm()
21 | {
22 | if (_encryptionAlgorithmFactory == null)
23 | {
24 | _encryptionAlgorithmFactory = GetEncryptionAlgorithmFactory();
25 | }
26 | return _encryptionAlgorithmFactory();
27 | }
28 |
29 | private Func GetEncryptionAlgorithmFactory()
30 | {
31 | switch (_options.EncryptionMethod)
32 | {
33 | case EncryptionMethod.AES:
34 | return CryptoAlgorithms.CreateAes;
35 | case EncryptionMethod.TripleDES:
36 | return CryptoAlgorithms.CreateTripleDES;
37 | default:
38 | throw new InvalidDataException();
39 | }
40 | }
41 |
42 | public KeyedHashAlgorithm GetValidationAlgorithm()
43 | {
44 | if (_validationAlgorithmFactory == null)
45 | {
46 | _validationAlgorithmFactory = GetValidationAlgorithmFactory();
47 | }
48 | return _validationAlgorithmFactory();
49 | }
50 |
51 | private Func GetValidationAlgorithmFactory()
52 | {
53 | switch (_options.ValidationMethod)
54 | {
55 | case ValidationMethod.SHA1:
56 | return CryptoAlgorithms.CreateHMACSHA1;
57 | case ValidationMethod.HMACSHA256:
58 | return CryptoAlgorithms.CreateHMACSHA256;
59 | case ValidationMethod.HMACSHA384:
60 | return CryptoAlgorithms.CreateHMACSHA384;
61 | case ValidationMethod.HMACSHA512:
62 | return CryptoAlgorithms.CreateHMACSHA512;
63 | default:
64 | throw new InvalidDataException();
65 | }
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/CryptoAlgorithms.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics.CodeAnalysis;
3 | using System.Security.Cryptography;
4 |
5 | namespace Synercoding.FormsAuthentication.Encryption
6 | {
7 | // taken from: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/CryptoAlgorithms.cs
8 | internal static class CryptoAlgorithms
9 | {
10 | internal static Aes CreateAes()
11 | {
12 | return Aes.Create();
13 | }
14 |
15 | [SuppressMessage("Microsoft.Security.Cryptography", "CA5354:SHA1CannotBeUsed", Justification = @"This is only used by legacy code; new features do not use this algorithm.")]
16 | internal static HMACSHA1 CreateHMACSHA1()
17 | {
18 | return new HMACSHA1();
19 | }
20 |
21 | internal static HMACSHA256 CreateHMACSHA256()
22 | {
23 | return new HMACSHA256();
24 | }
25 |
26 | internal static HMACSHA384 CreateHMACSHA384()
27 | {
28 | return new HMACSHA384();
29 | }
30 |
31 | internal static HMACSHA512 CreateHMACSHA512()
32 | {
33 | return new HMACSHA512();
34 | }
35 |
36 | internal static HMACSHA512 CreateHMACSHA512(byte[] key)
37 | {
38 | return new HMACSHA512(key);
39 | }
40 |
41 | internal static SHA256 CreateSHA256()
42 | {
43 | return SHA256.Create();
44 | }
45 |
46 | [SuppressMessage("Microsoft.Cryptographic.Standard", "CA5353:TripleDESCannotBeUsed", Justification = @"This is only used by legacy code; new features do not use this algorithm.")]
47 | [Obsolete("3DES is deprecated and MUST NOT be used by new features. Consider using AES instead.")]
48 | internal static TripleDES CreateTripleDES()
49 | {
50 | return TripleDES.Create();
51 | }
52 |
53 | }
54 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/CryptographicKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | namespace Synercoding.FormsAuthentication.Encryption
5 | {
6 | // Copied from: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/CryptographicKey.cs
7 | internal sealed class CryptographicKey
8 | {
9 |
10 | private readonly byte[] _keyMaterial;
11 |
12 | public CryptographicKey(byte[] keyMaterial)
13 | {
14 | _keyMaterial = keyMaterial;
15 | }
16 |
17 | // Returns the length of the key (in bits).
18 | public int KeyLength
19 | {
20 | get
21 | {
22 | return checked(_keyMaterial.Length * 8);
23 | }
24 | }
25 |
26 | // Extracts the specified number of bits at the specified offset
27 | // and returns a new CryptographicKey. This is not appropriate
28 | // for subkey derivation, but it can be used if this cryptographic
29 | // key is actually two keys (like encryption + validation)
30 | // concatenated together. Inputs are specified as bit lengths.
31 | public CryptographicKey ExtractBits(int offset, int count)
32 | {
33 | Debug.Assert(offset % 8 == 0, "Offset must be divisible by 8.");
34 | Debug.Assert(count % 8 == 0, "Count must be divisible by 8.");
35 |
36 | int offsetBytes = offset / 8;
37 | int countBytes = count / 8;
38 |
39 | byte[] newKey = new byte[countBytes];
40 | Buffer.BlockCopy(_keyMaterial, offsetBytes, newKey, 0, countBytes);
41 | return new CryptographicKey(newKey);
42 | }
43 |
44 | // Returns the raw key material as a byte array.
45 | public byte[] GetKeyMaterial()
46 | {
47 | return _keyMaterial;
48 | }
49 |
50 | }
51 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/HomogenizingCryptoServiceWrapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Security.Cryptography;
3 |
4 | namespace Synercoding.FormsAuthentication.Encryption
5 | {
6 | // Based upon: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/HomogenizingCryptoServiceWrapper.cs
7 | internal sealed class HomogenizingCryptoServiceWrapper : ICryptoService
8 | {
9 |
10 | public HomogenizingCryptoServiceWrapper(ICryptoService wrapped)
11 | {
12 | WrappedCryptoService = wrapped;
13 | }
14 |
15 | internal ICryptoService WrappedCryptoService
16 | {
17 | get;
18 | private set;
19 | }
20 |
21 | private static byte[] HomogenizeErrors(Func func, byte[] input)
22 | {
23 | // If the underlying method returns null or throws an exception, the
24 | // error will be homogenized as a single CryptographicException.
25 |
26 | byte[] output = null;
27 |
28 | try
29 | {
30 | output = func(input);
31 | return output;
32 | }
33 | finally
34 | {
35 | if (output == null)
36 | {
37 | throw new CryptographicException();
38 | }
39 | }
40 | }
41 |
42 | public byte[] Protect(byte[] clearData)
43 | {
44 | return HomogenizeErrors(WrappedCryptoService.Protect, clearData);
45 | }
46 |
47 | public byte[] Unprotect(byte[] protectedData)
48 | {
49 | return HomogenizeErrors(WrappedCryptoService.Unprotect, protectedData);
50 | }
51 |
52 | }
53 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/ICryptoAlgorithmFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Security.Cryptography;
2 |
3 | namespace Synercoding.FormsAuthentication.Encryption
4 | {
5 | // Copied from: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/ICryptoAlgorithmFactory.cs
6 | internal interface ICryptoAlgorithmFactory
7 | {
8 |
9 | // Gets a SymmetricAlgorithm instance that can be used for encryption / decryption
10 | SymmetricAlgorithm GetEncryptionAlgorithm();
11 |
12 | // Gets a KeyedHashAlgorithm instance that can be used for signing / validation
13 | KeyedHashAlgorithm GetValidationAlgorithm();
14 |
15 | }
16 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/ICryptoService.cs:
--------------------------------------------------------------------------------
1 | namespace Synercoding.FormsAuthentication.Encryption
2 | {
3 | // Copied from: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/ICryptoService.cs
4 | internal interface ICryptoService
5 | {
6 |
7 | // Protects some data by applying appropriate cryptographic transformations to it.
8 | byte[] Protect(byte[] clearData);
9 |
10 | // Returns the unprotected form of some protected data by validating and undoing the cryptographic transformations that led to it.
11 | byte[] Unprotect(byte[] protectedData);
12 |
13 | }
14 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/IMasterKeyProvider.cs:
--------------------------------------------------------------------------------
1 | namespace Synercoding.FormsAuthentication.Encryption
2 | {
3 | // Copied from: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/IMasterKeyProvider.cs
4 | internal interface IMasterKeyProvider
5 | {
6 |
7 | // encryption + decryption key
8 | CryptographicKey GetEncryptionKey();
9 |
10 | // signing + validation key
11 | CryptographicKey GetValidationKey();
12 |
13 | }
14 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/MasterKeyProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Synercoding.FormsAuthentication.Encryption
4 | {
5 | // Lossly based upon: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/Cryptography/MachineKeyMasterKeyProvider.cs
6 | // Removed auto-gen functionality and replaced config requirement
7 | internal sealed class MasterKeyProvider : IMasterKeyProvider
8 | {
9 | private CryptographicKey _encryptionKey;
10 | private readonly FormsAuthenticationOptions _options;
11 | private CryptographicKey _validationKey;
12 |
13 | // the only required parameter is 'machineKeySection'; other parameters are just used for unit testing
14 | internal MasterKeyProvider(FormsAuthenticationOptions machineKeySection)
15 | {
16 | _options = machineKeySection;
17 | }
18 |
19 | private CryptographicKey GenerateCryptographicKey(string configAttributeValue)
20 | {
21 | byte[] keyMaterial = CryptoUtil.HexToBinary(configAttributeValue);
22 |
23 | // If contained a valid key, just use it verbatim.
24 | if (keyMaterial != null && keyMaterial.Length > 0)
25 | {
26 | return new CryptographicKey(keyMaterial);
27 | }
28 |
29 | throw new Exception();
30 | }
31 |
32 | public CryptographicKey GetEncryptionKey()
33 | {
34 | if (_encryptionKey == null)
35 | _encryptionKey = GenerateCryptographicKey(_options.DecryptionKey);
36 | return _encryptionKey;
37 | }
38 |
39 | public CryptographicKey GetValidationKey()
40 | {
41 | if (_validationKey == null)
42 | _validationKey = GenerateCryptographicKey(_options.ValidationKey);
43 | return _validationKey;
44 | }
45 |
46 | }
47 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/SerializingBinaryReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace Synercoding.FormsAuthentication.Encryption
5 | {
6 | // Copied from private sub-class in: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/FormsAuthenticationTicketSerializer.cs
7 | internal sealed class SerializingBinaryReader : BinaryReader
8 | {
9 | public SerializingBinaryReader(Stream input)
10 | : base(input)
11 | {
12 | }
13 |
14 | public string ReadBinaryString()
15 | {
16 | int charCount = Read7BitEncodedInt();
17 | byte[] bytes = ReadBytes(charCount * 2);
18 |
19 | char[] chars = new char[charCount];
20 | for (int i = 0; i < chars.Length; i++)
21 | {
22 | chars[i] = (char)(bytes[2 * i] | (bytes[2 * i + 1] << 8));
23 | }
24 |
25 | return new String(chars);
26 | }
27 |
28 | public override string ReadString()
29 | {
30 | // should never call this method since it will produce wrong results
31 | throw new NotImplementedException();
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Encryption/SerializingBinaryWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace Synercoding.FormsAuthentication.Encryption
5 | {
6 | // Copied from private sub-class in: https://github.com/Microsoft/referencesource/blob/master/System.Web/Security/FormsAuthenticationTicketSerializer.cs
7 | internal sealed class SerializingBinaryWriter : BinaryWriter
8 | {
9 | public SerializingBinaryWriter(Stream output)
10 | : base(output)
11 | {
12 | }
13 |
14 | public override void Write(string value)
15 | {
16 | // should never call this method since it will produce wrong results
17 | throw new NotImplementedException();
18 | }
19 |
20 | public void WriteBinaryString(string value)
21 | {
22 | byte[] bytes = new byte[value.Length * 2];
23 | for (int i = 0; i < value.Length; i++)
24 | {
25 | char c = value[i];
26 | bytes[2 * i] = (byte)c;
27 | bytes[2 * i + 1] = (byte)(c >> 8);
28 | }
29 |
30 | Write7BitEncodedInt(value.Length);
31 | Write(bytes);
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/EncryptionMethod.cs:
--------------------------------------------------------------------------------
1 | namespace Synercoding.FormsAuthentication
2 | {
3 | public enum EncryptionMethod
4 | {
5 | AES,
6 | TripleDES
7 | }
8 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/FormsAuthenticationCookie.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Synercoding.FormsAuthentication
4 | {
5 | public class FormsAuthenticationCookie
6 | {
7 | public byte Version { get; set; }
8 | public DateTime IssuedUtc { get; set; }
9 | public DateTime ExpiresUtc { get; set; }
10 | public bool IsPersistent { get; set; }
11 | public string UserName { get; set; }
12 | public string UserData { get; set; }
13 | public string CookiePath { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/FormsAuthenticationDataFormat.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Authentication;
2 | using System;
3 |
4 | namespace Synercoding.FormsAuthentication
5 | {
6 | public class FormsAuthenticationDataFormat : ISecureDataFormat
7 | where TData : AuthenticationTicket
8 | {
9 | private readonly Func _convertFrom;
10 | private readonly Func _convertTo;
11 | private readonly FormsAuthenticationCryptor _cryptor;
12 |
13 | public FormsAuthenticationDataFormat(FormsAuthenticationOptions options, Func from, Func to)
14 | {
15 | _cryptor = new FormsAuthenticationCryptor(options);
16 | _convertFrom = from;
17 | _convertTo = to;
18 | }
19 |
20 | public string Protect(TData data)
21 | {
22 | return Protect(data, null);
23 | }
24 |
25 | public string Protect(TData data, string purpose)
26 | {
27 | var cookie = _convertTo(data);
28 | return _cryptor.Protect(cookie);
29 | }
30 |
31 | public TData Unprotect(string protectedText)
32 | {
33 | return Unprotect(protectedText, null);
34 | }
35 |
36 | public TData Unprotect(string protectedText, string purpose)
37 | {
38 | try
39 | {
40 | var cookie = _cryptor.Unprotect(protectedText);
41 | return _convertFrom(cookie);
42 | }
43 | catch
44 | {
45 | return default(TData);
46 | }
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/FormsAuthenticationOptions.cs:
--------------------------------------------------------------------------------
1 | namespace Synercoding.FormsAuthentication
2 | {
3 | public class FormsAuthenticationOptions
4 | {
5 | public EncryptionMethod EncryptionMethod { get; set; } = EncryptionMethod.AES;
6 | public ValidationMethod ValidationMethod { get; set; } = ValidationMethod.HMACSHA256;
7 |
8 | public string DecryptionKey { get; set; }
9 | public string ValidationKey { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/Synercoding.FormsAuthentication.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | True
6 | With this package you can use ASP.NET Forms Authentication, alot of the code for this package was taken (and altered) from https://github.com/Microsoft/referencesource/tree/master/System.Web/Security under MIT license.
7 | Synercoding
8 | Synercoding
9 | 2.1.0
10 | 2.1.0.0
11 | https://opensource.org/licenses/MIT
12 | false
13 | 2.1.0.0
14 | https://github.com/synercoder/FormsAuthentication
15 | https://github.com/synercoder/FormsAuthentication
16 | en
17 | Mickaël Derriey (@mderriey) fixed issue #2 in pull #3: Return default value when an exception is thrown while unprotecting data
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/Synercoding.FormsAuthentication/ValidationMethod.cs:
--------------------------------------------------------------------------------
1 | namespace Synercoding.FormsAuthentication
2 | {
3 | public enum ValidationMethod
4 | {
5 | SHA1,
6 | HMACSHA256,
7 | HMACSHA384,
8 | HMACSHA512
9 | }
10 | }
--------------------------------------------------------------------------------