.
9 |
10 | .list-group {
11 | // No need to set list-style: none; since .list-group-item is block level
12 | margin-bottom: 20px;
13 | padding-left: 0; // reset padding because ul and ol
14 | }
15 |
16 |
17 | // Individual list items
18 | //
19 | // Use on `li`s or `div`s within the `.list-group` parent.
20 |
21 | .list-group-item {
22 | position: relative;
23 | display: block;
24 | padding: 10px 15px;
25 | // Place the border on the list items and negative margin up for better styling
26 | margin-bottom: -1px;
27 | background-color: @list-group-bg;
28 | border: 1px solid @list-group-border;
29 |
30 | // Round the first and last items
31 | &:first-child {
32 | .border-top-radius(@list-group-border-radius);
33 | }
34 | &:last-child {
35 | margin-bottom: 0;
36 | .border-bottom-radius(@list-group-border-radius);
37 | }
38 | }
39 |
40 |
41 | // Interactive list items
42 | //
43 | // Use anchor or button elements instead of `li`s or `div`s to create interactive items.
44 | // Includes an extra `.active` modifier class for showing selected items.
45 |
46 | a.list-group-item,
47 | button.list-group-item {
48 | color: @list-group-link-color;
49 |
50 | .list-group-item-heading {
51 | color: @list-group-link-heading-color;
52 | }
53 |
54 | // Hover state
55 | &:hover,
56 | &:focus {
57 | text-decoration: none;
58 | color: @list-group-link-hover-color;
59 | background-color: @list-group-hover-bg;
60 | }
61 | }
62 |
63 | button.list-group-item {
64 | width: 100%;
65 | text-align: left;
66 | }
67 |
68 | .list-group-item {
69 | // Disabled state
70 | &.disabled,
71 | &.disabled:hover,
72 | &.disabled:focus {
73 | background-color: @list-group-disabled-bg;
74 | color: @list-group-disabled-color;
75 | cursor: @cursor-disabled;
76 |
77 | // Force color to inherit for custom content
78 | .list-group-item-heading {
79 | color: inherit;
80 | }
81 | .list-group-item-text {
82 | color: @list-group-disabled-text-color;
83 | }
84 | }
85 |
86 | // Active class on item itself, not parent
87 | &.active,
88 | &.active:hover,
89 | &.active:focus {
90 | z-index: 2; // Place active items above their siblings for proper border styling
91 | color: @list-group-active-color;
92 | background-color: @list-group-active-bg;
93 | border-color: @list-group-active-border;
94 |
95 | // Force color to inherit for custom content
96 | .list-group-item-heading,
97 | .list-group-item-heading > small,
98 | .list-group-item-heading > .small {
99 | color: inherit;
100 | }
101 | .list-group-item-text {
102 | color: @list-group-active-text-color;
103 | }
104 | }
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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | zoom: 1;
13 | overflow: hidden;
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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/alerts.less:
--------------------------------------------------------------------------------
1 | // Alerts
2 |
3 | .alert-variant(@background; @border; @text-color) {
4 | background-color: @background;
5 | border-color: @border;
6 | color: @text-color;
7 |
8 | hr {
9 | border-top-color: darken(@border, 5%);
10 | }
11 | .alert-link {
12 | color: darken(@text-color, 10%);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/border-radius.less:
--------------------------------------------------------------------------------
1 | // Single side border-radius
2 |
3 | .border-top-radius(@radius) {
4 | border-top-right-radius: @radius;
5 | border-top-left-radius: @radius;
6 | }
7 | .border-right-radius(@radius) {
8 | border-bottom-right-radius: @radius;
9 | border-top-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-bottom-left-radius: @radius;
17 | border-top-left-radius: @radius;
18 | }
19 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | border-color: darken(@border, 12%);
28 |
29 | &:hover,
30 | &:focus,
31 | &.focus {
32 | color: @color;
33 | background-color: darken(@background, 17%);
34 | border-color: darken(@border, 25%);
35 | }
36 | }
37 | &:active,
38 | &.active,
39 | .open > .dropdown-toggle& {
40 | background-image: none;
41 | }
42 | &.disabled,
43 | &[disabled],
44 | fieldset[disabled] & {
45 | &:hover,
46 | &:focus,
47 | &.focus {
48 | background-color: @background;
49 | border-color: @border;
50 | }
51 | }
52 |
53 | .badge {
54 | color: @background;
55 | background-color: @color;
56 | }
57 | }
58 |
59 | // Button sizes
60 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
61 | padding: @padding-vertical @padding-horizontal;
62 | font-size: @font-size;
63 | line-height: @line-height;
64 | border-radius: @border-radius;
65 | }
66 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/center-block.less:
--------------------------------------------------------------------------------
1 | // Center-align a block level element
2 |
3 | .center-block() {
4 | display: block;
5 | margin-left: auto;
6 | margin-right: auto;
7 | }
8 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | content: " "; // 1
17 | display: table; // 2
18 | }
19 | &:after {
20 | clear: both;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | border-color: @border-color;
34 | background-color: @background-color;
35 | }
36 | // Optional feedback icon
37 | .form-control-feedback {
38 | color: @text-color;
39 | }
40 | }
41 |
42 |
43 | // Form control focus state
44 | //
45 | // Generate a customized focus state and for any input with the specified color,
46 | // which defaults to the `@input-border-focus` variable.
47 | //
48 | // We highly encourage you to not customize the default value, but instead use
49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on
50 | // WebKit's default styles, but applicable to a wider range of browsers. Its
51 | // usability and accessibility should be taken into account with any change.
52 | //
53 | // Example usage: change the default blue border and shadow to white for better
54 | // contrast against a dark gray background.
55 | .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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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-left: ceil((@grid-gutter-width / 2));
23 | padding-right: floor((@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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | margin-right: auto;
8 | margin-left: auto;
9 | padding-left: floor((@gutter / 2));
10 | padding-right: ceil((@gutter / 2));
11 | &:extend(.clearfix all);
12 | }
13 |
14 | // Creates a wrapper for a series of columns
15 | .make-row(@gutter: @grid-gutter-width) {
16 | margin-left: ceil((@gutter / -2));
17 | margin-right: floor((@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-left: (@gutter / 2);
28 | padding-right: (@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-left: (@gutter / 2);
45 | padding-right: (@gutter / 2);
46 |
47 | @media (min-width: @screen-sm-min) {
48 | float: left;
49 | width: percentage((@columns / @grid-columns));
50 | }
51 | }
52 | .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-left: (@gutter / 2);
73 | padding-right: (@gutter / 2);
74 |
75 | @media (min-width: @screen-md-min) {
76 | float: left;
77 | width: percentage((@columns / @grid-columns));
78 | }
79 | }
80 | .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-left: (@gutter / 2);
101 | padding-right: (@gutter / 2);
102 |
103 | @media (min-width: @screen-lg-min) {
104 | float: left;
105 | width: percentage((@columns / @grid-columns));
106 | }
107 | }
108 | .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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/hide-text.less:
--------------------------------------------------------------------------------
1 | // CSS image replacement
2 | //
3 | // Heads up! v3 launched with only `.hide-text()`, but per our pattern for
4 | // mixins being reused as classes with the same name, this doesn't hold up. As
5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
6 | //
7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
8 |
9 | // Deprecated as of v3.0.1 (has been removed in v4)
10 | .hide-text() {
11 | font: ~"0/0" a;
12 | color: transparent;
13 | text-shadow: none;
14 | background-color: transparent;
15 | border: 0;
16 | }
17 |
18 | // New mixin to use as of v3.0.1
19 | .text-hide() {
20 | .hide-text();
21 | }
22 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/image.less:
--------------------------------------------------------------------------------
1 | // Image Mixins
2 | // - Responsive image
3 | // - Retina image
4 |
5 |
6 | // Responsive image
7 | //
8 | // Keep images from scaling beyond the width of their parents.
9 | .img-responsive(@display: block) {
10 | display: @display;
11 | max-width: 100%; // Part 1: Set a maximum relative to the parent
12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
13 | }
14 |
15 |
16 | // Retina image
17 | //
18 | // Short retina mixin for setting background-image and -size. Note that the
19 | // spelling of `min--moz-device-pixel-ratio` is intentional.
20 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
21 | background-image: url("@{file-1x}");
22 |
23 | @media
24 | only screen and (-webkit-min-device-pixel-ratio: 2),
25 | only screen and ( min--moz-device-pixel-ratio: 2),
26 | only screen and ( -o-min-device-pixel-ratio: 2/1),
27 | only screen and ( min-device-pixel-ratio: 2),
28 | only screen and ( min-resolution: 192dpi),
29 | only screen and ( min-resolution: 2dppx) {
30 | background-image: url("@{file-2x}");
31 | background-size: @width-1x @height-1x;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/opacity.less:
--------------------------------------------------------------------------------
1 | // Opacity
2 |
3 | .opacity(@opacity) {
4 | opacity: @opacity;
5 | // IE8 filter
6 | @opacity-ie: (@opacity * 100);
7 | filter: ~"alpha(opacity=@{opacity-ie})";
8 | }
9 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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: normal;
6 | letter-spacing: normal;
7 | line-break: auto;
8 | line-height: @line-height-base;
9 | text-align: left; // Fallback for where `start` is not supported
10 | text-align: start;
11 | text-decoration: none;
12 | text-shadow: none;
13 | text-transform: none;
14 | white-space: normal;
15 | word-break: normal;
16 | word-spacing: normal;
17 | word-wrap: normal;
18 | }
19 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/resize.less:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | .resizable(@direction) {
4 | resize: @direction; // Options: horizontal, vertical, both
5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
6 | }
7 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/responsive-visibility.less:
--------------------------------------------------------------------------------
1 | // Responsive utilities
2 |
3 | //
4 | // More easily include all the states for responsive-utilities.less.
5 | .responsive-visibility() {
6 | display: block !important;
7 | table& { display: table !important; }
8 | tr& { display: table-row !important; }
9 | th&,
10 | td& { display: table-cell !important; }
11 | }
12 |
13 | .responsive-invisibility() {
14 | display: none !important;
15 | }
16 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | list-style: none;
10 | text-align: center;
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 | background-color: @pager-bg;
51 | cursor: @cursor-disabled;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | line-height: @line-height-base;
18 | text-decoration: none;
19 | color: @pagination-color;
20 | background-color: @pagination-bg;
21 | border: 1px solid @pagination-border;
22 | margin-left: -1px;
23 | }
24 | &:first-child {
25 | > a,
26 | > span {
27 | margin-left: 0;
28 | .border-left-radius(@border-radius-base);
29 | }
30 | }
31 | &:last-child {
32 | > a,
33 | > span {
34 | .border-right-radius(@border-radius-base);
35 | }
36 | }
37 | }
38 |
39 | > li > a,
40 | > li > span {
41 | &:hover,
42 | &:focus {
43 | z-index: 2;
44 | color: @pagination-hover-color;
45 | background-color: @pagination-hover-bg;
46 | border-color: @pagination-hover-border;
47 | }
48 | }
49 |
50 | > .active > a,
51 | > .active > span {
52 | &,
53 | &:hover,
54 | &:focus {
55 | z-index: 3;
56 | color: @pagination-active-color;
57 | background-color: @pagination-active-bg;
58 | border-color: @pagination-active-border;
59 | cursor: default;
60 | }
61 | }
62 |
63 | > .disabled {
64 | > span,
65 | > span:hover,
66 | > span:focus,
67 | > a,
68 | > a:hover,
69 | > a:focus {
70 | color: @pagination-disabled-color;
71 | background-color: @pagination-disabled-bg;
72 | border-color: @pagination-disabled-border;
73 | cursor: @cursor-disabled;
74 | }
75 | }
76 | }
77 |
78 | // Sizing
79 | // --------------------------------------------------
80 |
81 | // Large
82 | .pagination-lg {
83 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
84 | }
85 |
86 | // Small
87 | .pagination-sm {
88 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
89 | }
90 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/print.less:
--------------------------------------------------------------------------------
1 | /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
2 |
3 | // ==========================================================================
4 | // Print styles.
5 | // Inlined to avoid the additional HTTP request: h5bp.com/r
6 | // ==========================================================================
7 |
8 | @media print {
9 | *,
10 | *:before,
11 | *:after {
12 | background: transparent !important;
13 | color: #000 !important; // Black prints faster: h5bp.com/s
14 | box-shadow: none !important;
15 | text-shadow: none !important;
16 | }
17 |
18 | a,
19 | a:visited {
20 | text-decoration: underline;
21 | }
22 |
23 | a[href]:after {
24 | content: " (" attr(href) ")";
25 | }
26 |
27 | abbr[title]:after {
28 | content: " (" attr(title) ")";
29 | }
30 |
31 | // Don't show links that are fragment identifiers,
32 | // or use the `javascript:` pseudo protocol
33 | a[href^="#"]:after,
34 | a[href^="javascript:"]:after {
35 | content: "";
36 | }
37 |
38 | pre,
39 | blockquote {
40 | border: 1px solid #999;
41 | page-break-inside: avoid;
42 | }
43 |
44 | thead {
45 | display: table-header-group; // h5bp.com/t
46 | }
47 |
48 | tr,
49 | img {
50 | page-break-inside: avoid;
51 | }
52 |
53 | img {
54 | max-width: 100% !important;
55 | }
56 |
57 | p,
58 | h2,
59 | h3 {
60 | orphans: 3;
61 | widows: 3;
62 | }
63 |
64 | h2,
65 | h3 {
66 | page-break-after: avoid;
67 | }
68 |
69 | // Bootstrap specific changes start
70 |
71 | // Bootstrap components
72 | .navbar {
73 | display: none;
74 | }
75 | .btn,
76 | .dropup > .btn {
77 | > .caret {
78 | border-top-color: #000 !important;
79 | }
80 | }
81 | .label {
82 | border: 1px solid #000;
83 | }
84 |
85 | .table {
86 | border-collapse: collapse !important;
87 |
88 | td,
89 | th {
90 | background-color: #fff !important;
91 | }
92 | }
93 | .table-bordered {
94 | th,
95 | td {
96 | border: 1px solid #ddd !important;
97 | }
98 | }
99 |
100 | // Bootstrap specific changes end
101 | }
102 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/progress-bars.less:
--------------------------------------------------------------------------------
1 | //
2 | // Progress bars
3 | // --------------------------------------------------
4 |
5 |
6 | // Bar animations
7 | // -------------------------
8 |
9 | // WebKit
10 | @-webkit-keyframes progress-bar-stripes {
11 | from { background-position: 40px 0; }
12 | to { background-position: 0 0; }
13 | }
14 |
15 | // Spec and IE10+
16 | @keyframes progress-bar-stripes {
17 | from { background-position: 40px 0; }
18 | to { background-position: 0 0; }
19 | }
20 |
21 |
22 | // Bar itself
23 | // -------------------------
24 |
25 | // Outer container
26 | .progress {
27 | overflow: hidden;
28 | height: @line-height-computed;
29 | margin-bottom: @line-height-computed;
30 | background-color: @progress-bg;
31 | border-radius: @progress-border-radius;
32 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
33 | }
34 |
35 | // Bar of progress
36 | .progress-bar {
37 | float: left;
38 | width: 0%;
39 | height: 100%;
40 | font-size: @font-size-small;
41 | line-height: @line-height-computed;
42 | color: @progress-bar-color;
43 | text-align: center;
44 | background-color: @progress-bar-bg;
45 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
46 | .transition(width .6s ease);
47 | }
48 |
49 | // Striped bars
50 | //
51 | // `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
52 | // `.progress-bar-striped` class, which you just add to an existing
53 | // `.progress-bar`.
54 | .progress-striped .progress-bar,
55 | .progress-bar-striped {
56 | #gradient > .striped();
57 | background-size: 40px 40px;
58 | }
59 |
60 | // Call animation for the active one
61 | //
62 | // `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
63 | // `.progress-bar.active` approach.
64 | .progress.active .progress-bar,
65 | .progress-bar.active {
66 | .animation(progress-bar-stripes 2s linear infinite);
67 | }
68 |
69 |
70 | // Variations
71 | // -------------------------
72 |
73 | .progress-bar-success {
74 | .progress-bar-variant(@progress-bar-success-bg);
75 | }
76 |
77 | .progress-bar-info {
78 | .progress-bar-variant(@progress-bar-info-bg);
79 | }
80 |
81 | .progress-bar-warning {
82 | .progress-bar-variant(@progress-bar-warning-bg);
83 | }
84 |
85 | .progress-bar-danger {
86 | .progress-bar-variant(@progress-bar-danger-bg);
87 | }
88 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | left: 0;
20 | bottom: 0;
21 | height: 100%;
22 | width: 100%;
23 | border: 0;
24 | }
25 | }
26 |
27 | // Modifier class for 16:9 aspect ratio
28 | .embed-responsive-16by9 {
29 | padding-bottom: 56.25%;
30 | }
31 |
32 | // Modifier class for 4:3 aspect ratio
33 | .embed-responsive-4by3 {
34 | padding-bottom: 75%;
35 | }
36 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | // http://getbootstrap.com/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: http://a11yproject.com/posts/how-to-hide-content
124 |
125 | .sr-only {
126 | position: absolute;
127 | width: 1px;
128 | height: 1px;
129 | margin: -1px;
130 | padding: 0;
131 | overflow: hidden;
132 | clip: rect(0,0,0,0);
133 | border: 0;
134 | }
135 |
136 | // Use in conjunction with .sr-only to only display content when it's focused.
137 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
138 | // Credit: HTML5 Boilerplate
139 |
140 | .sr-only-focusable {
141 | &:active,
142 | &:focus {
143 | position: static;
144 | width: auto;
145 | height: auto;
146 | margin: 0;
147 | overflow: visible;
148 | clip: auto;
149 | }
150 | }
151 |
152 |
153 | // iOS "clickable elements" fix for role="button"
154 | //
155 | // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
156 | // for traditionally non-focusable elements with role="button"
157 | // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
158 |
159 | [role="button"] {
160 | cursor: pointer;
161 | }
162 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/thumbnails.less:
--------------------------------------------------------------------------------
1 | //
2 | // Thumbnails
3 | // --------------------------------------------------
4 |
5 |
6 | // Mixin and adjust the regular image class
7 | .thumbnail {
8 | display: block;
9 | padding: @thumbnail-padding;
10 | margin-bottom: @line-height-computed;
11 | line-height: @line-height-base;
12 | background-color: @thumbnail-bg;
13 | border: 1px solid @thumbnail-border;
14 | border-radius: @thumbnail-border-radius;
15 | .transition(border .2s ease-in-out);
16 |
17 | > img,
18 | a > img {
19 | &:extend(.img-responsive);
20 | margin-left: auto;
21 | margin-right: auto;
22 | }
23 |
24 | // Add a hover state for linked versions only
25 | a&:hover,
26 | a&:focus,
27 | a&.active {
28 | border-color: @link-color;
29 | }
30 |
31 | // Image captions
32 | .caption {
33 | padding: @thumbnail-caption-padding;
34 | color: @thumbnail-caption-color;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 { margin-top: -3px; padding: @tooltip-arrow-width 0; }
20 | &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }
21 | &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }
22 | &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }
23 | }
24 |
25 | // Wrapper for the tooltip content
26 | .tooltip-inner {
27 | max-width: @tooltip-max-width;
28 | padding: 3px 8px;
29 | color: @tooltip-color;
30 | text-align: center;
31 | background-color: @tooltip-bg;
32 | border-radius: @border-radius-base;
33 | }
34 |
35 | // Arrows
36 | .tooltip-arrow {
37 | position: absolute;
38 | width: 0;
39 | height: 0;
40 | border-color: transparent;
41 | border-style: solid;
42 | }
43 | // Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
44 | .tooltip {
45 | &.top .tooltip-arrow {
46 | bottom: 0;
47 | left: 50%;
48 | margin-left: -@tooltip-arrow-width;
49 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
50 | border-top-color: @tooltip-arrow-color;
51 | }
52 | &.top-left .tooltip-arrow {
53 | bottom: 0;
54 | right: @tooltip-arrow-width;
55 | margin-bottom: -@tooltip-arrow-width;
56 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
57 | border-top-color: @tooltip-arrow-color;
58 | }
59 | &.top-right .tooltip-arrow {
60 | bottom: 0;
61 | left: @tooltip-arrow-width;
62 | margin-bottom: -@tooltip-arrow-width;
63 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
64 | border-top-color: @tooltip-arrow-color;
65 | }
66 | &.right .tooltip-arrow {
67 | top: 50%;
68 | left: 0;
69 | margin-top: -@tooltip-arrow-width;
70 | border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
71 | border-right-color: @tooltip-arrow-color;
72 | }
73 | &.left .tooltip-arrow {
74 | top: 50%;
75 | right: 0;
76 | margin-top: -@tooltip-arrow-width;
77 | border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
78 | border-left-color: @tooltip-arrow-color;
79 | }
80 | &.bottom .tooltip-arrow {
81 | top: 0;
82 | left: 50%;
83 | margin-left: -@tooltip-arrow-width;
84 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
85 | border-bottom-color: @tooltip-arrow-color;
86 | }
87 | &.bottom-left .tooltip-arrow {
88 | top: 0;
89 | right: @tooltip-arrow-width;
90 | margin-top: -@tooltip-arrow-width;
91 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
92 | border-bottom-color: @tooltip-arrow-color;
93 | }
94 | &.bottom-right .tooltip-arrow {
95 | top: 0;
96 | left: @tooltip-arrow-width;
97 | margin-top: -@tooltip-arrow-width;
98 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
99 | border-bottom-color: @tooltip-arrow-color;
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/utilities.less:
--------------------------------------------------------------------------------
1 | //
2 | // Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // Floats
7 | // -------------------------
8 |
9 | .clearfix {
10 | .clearfix();
11 | }
12 | .center-block {
13 | .center-block();
14 | }
15 | .pull-right {
16 | float: right !important;
17 | }
18 | .pull-left {
19 | float: left !important;
20 | }
21 |
22 |
23 | // Toggling content
24 | // -------------------------
25 |
26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
27 | .hide {
28 | display: none !important;
29 | }
30 | .show {
31 | display: block !important;
32 | }
33 | .invisible {
34 | visibility: hidden;
35 | }
36 | .text-hide {
37 | .text-hide();
38 | }
39 |
40 |
41 | // Hide from screenreaders and browsers
42 | //
43 | // Credit: HTML5 Boilerplate
44 |
45 | .hidden {
46 | display: none !important;
47 | }
48 |
49 |
50 | // For Affix plugin
51 | // -------------------------
52 |
53 | .affix {
54 | position: fixed;
55 | }
56 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/nuget/bootstrap.less.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | bootstrap.less
5 | 3.3.7
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 | http://blog.getbootstrap.com
11 | Bootstrap framework in Less. Includes fonts and JavaScript
12 | en-us
13 | http://getbootstrap.com
14 | http://getbootstrap.com/apple-touch-icon.png
15 | https://github.com/twbs/bootstrap/blob/master/LICENSE
16 | Copyright 2016
17 | false
18 |
19 |
20 |
21 | css js less mobile-first responsive front-end framework web
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/nuget/bootstrap.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | bootstrap
5 | 3.3.7
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 | http://blog.getbootstrap.com
11 | Bootstrap framework in CSS. Includes fonts and JavaScript
12 | en-us
13 | http://getbootstrap.com
14 | http://getbootstrap.com/apple-touch-icon.png
15 | https://github.com/twbs/bootstrap/blob/master/LICENSE
16 | Copyright 2016
17 | false
18 |
19 |
20 |
21 | css js less mobile-first responsive front-end framework web
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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', // http://atmospherejs.com/twbs/bootstrap
8 | summary: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
9 | version: '3.3.7',
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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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.3.7",
5 | "keywords": [
6 | "css",
7 | "less",
8 | "mobile-first",
9 | "responsive",
10 | "front-end",
11 | "framework",
12 | "web"
13 | ],
14 | "homepage": "http://getbootstrap.com",
15 | "author": "Twitter, Inc.",
16 | "scripts": {
17 | "change-version": "node grunt/change-version.js",
18 | "update-shrinkwrap": "npm shrinkwrap --dev && shx mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json",
19 | "test": "grunt test"
20 | },
21 | "style": "dist/css/bootstrap.css",
22 | "less": "less/bootstrap.less",
23 | "main": "./dist/js/npm",
24 | "repository": {
25 | "type": "git",
26 | "url": "https://github.com/twbs/bootstrap.git"
27 | },
28 | "bugs": {
29 | "url": "https://github.com/twbs/bootstrap/issues"
30 | },
31 | "license": "MIT",
32 | "devDependencies": {
33 | "btoa": "~1.1.2",
34 | "glob": "~7.0.3",
35 | "grunt": "~1.0.1",
36 | "grunt-autoprefixer": "~3.0.4",
37 | "grunt-contrib-clean": "~1.0.0",
38 | "grunt-contrib-compress": "~1.3.0",
39 | "grunt-contrib-concat": "~1.0.0",
40 | "grunt-contrib-connect": "~1.0.0",
41 | "grunt-contrib-copy": "~1.0.0",
42 | "grunt-contrib-csslint": "~1.0.0",
43 | "grunt-contrib-cssmin": "~1.0.0",
44 | "grunt-contrib-htmlmin": "~1.5.0",
45 | "grunt-contrib-jshint": "~1.0.0",
46 | "grunt-contrib-less": "~1.3.0",
47 | "grunt-contrib-pug": "~1.0.0",
48 | "grunt-contrib-qunit": "~0.7.0",
49 | "grunt-contrib-uglify": "~1.0.0",
50 | "grunt-contrib-watch": "~1.0.0",
51 | "grunt-csscomb": "~3.1.0",
52 | "grunt-exec": "~1.0.0",
53 | "grunt-html": "~8.0.1",
54 | "grunt-jekyll": "~0.4.4",
55 | "grunt-jscs": "~3.0.1",
56 | "grunt-saucelabs": "~9.0.0",
57 | "load-grunt-tasks": "~3.5.0",
58 | "markdown-it": "^7.0.0",
59 | "shelljs": "^0.7.0",
60 | "shx": "^0.1.2",
61 | "time-grunt": "^1.3.0"
62 | },
63 | "engines": {
64 | "node": ">=0.10.1"
65 | },
66 | "files": [
67 | "dist",
68 | "fonts",
69 | "grunt",
70 | "js/*.js",
71 | "less/**/*.less",
72 | "Gruntfile.js",
73 | "LICENSE"
74 | ],
75 | "jspm": {
76 | "main": "js/bootstrap",
77 | "shim": {
78 | "js/bootstrap": {
79 | "deps": "jquery",
80 | "exports": "$"
81 | }
82 | },
83 | "files": [
84 | "css",
85 | "fonts",
86 | "js"
87 | ]
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | }
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | }
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 | }
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.Web/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 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.WebApi/Admin/Controllers/BlogManageController.cs:
--------------------------------------------------------------------------------
1 | using HiBlogs.EntityFramework.EntityFramework;
2 | using Microsoft.AspNetCore.Mvc;
3 | using Microsoft.EntityFrameworkCore;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace HiBlogs.WebApi.Api.Controllers
11 | {
12 | [Route("api/[controller]/[Action]")]
13 | public class BlogManageController : Controller
14 | {
15 | private readonly HiBlogsDbContext _db;
16 |
17 | public BlogManageController(HiBlogsDbContext db)
18 | {
19 | _db = db;
20 | }
21 |
22 | ///
23 | /// 获取所有博客(DOTO:后续需要分页)
24 | ///
25 | ///
26 | public async Task GetBlogs()
27 | {
28 | return await _db.Blogs.Select(t => new
29 | {
30 | t.Title,
31 | t.Url,
32 | t.Id
33 | }).ToListAsync();
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.WebApi/Admin/Controllers/BlogMigrationController.cs:
--------------------------------------------------------------------------------
1 | using BlogsMigration;
2 | using HiBlogs.Core.Entities;
3 | using HiBlogs.Definitions;
4 | using HiBlogs.EntityFramework.EntityFramework;
5 | using Microsoft.AspNetCore.Authorization;
6 | using Microsoft.AspNetCore.Identity;
7 | using Microsoft.AspNetCore.Mvc;
8 | using Microsoft.EntityFrameworkCore;
9 | using System;
10 | using System.Linq;
11 | using System.Threading.Tasks;
12 |
13 | namespace HiBlogs.WebApi.Api.Controllers
14 | {
15 | [Route("api/[controller]/[Action]")]
16 | [Authorize(Roles = "Administrator")]
17 | public class BlogMigrationController : Controller
18 | {
19 | private readonly HiBlogsDbContext db;
20 | private readonly UserManager userManager;
21 |
22 |
23 | public BlogMigrationController(HiBlogsDbContext db, UserManager userManager)
24 | {
25 | this.db = db;
26 | this.userManager = userManager;
27 | }
28 |
29 | ///
30 | /// 迁移博客
31 | ///
32 | ///
33 | ///
34 | [HttpPost]
35 | public async Task MigrationByUserName(string userName)
36 | {
37 |
38 | BlogMigrationcs blogMigration = new BlogMigrationcs();
39 | var userId = await db.Users.Where(t => t.UserName == userName).Select(t => t.Id).FirstOrDefaultAsync();
40 | if (userId <= 0)
41 | {
42 | var readomString = "111vvv" + new Random().Next();
43 | var user = new User
44 | {
45 | UserName = userName,
46 | Email = readomString + "@temo.com",
47 | SecurityStamp = Guid.NewGuid().ToString()
48 | };
49 | await userManager.CreateAsync(user, readomString);
50 | await userManager.AddToRoleAsync(user, RoleNames.Average);
51 | userId = user.Id;
52 | }
53 | var blogs = await blogMigration.CnblogsMigrationToHiBlogAsync(userName, true);
54 | foreach (var blog in blogs)
55 | {
56 | db.Blogs.Add(new Blog()
57 | {
58 | UserId = userId,
59 | Content = blog.Content,
60 | Title = blog.Title,
61 | OldPublishTiem = blog.OldPublishTiem
62 | });
63 | }
64 | return await db.SaveChangesAsync();
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.WebApi/Admin/Controllers/Dto/RegisterInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using HiBlogs.Core.Entities;
5 |
6 | namespace HiBlogs.WebApi.Api.Controllers.Dto
7 | {
8 | public class RegisterInfo
9 | {
10 | public User User { get; set; }
11 | public string Passwod { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.WebApi/ApiBaseController.cs:
--------------------------------------------------------------------------------
1 | using HiBlogs.EntityFramework.EntityFramework;
2 | using Microsoft.AspNetCore.Mvc;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace HiBlogs.WebApi
8 | {
9 | [Route("api/[controller]/[Action]")]
10 | public class ApiBaseController
11 | {
12 | protected HiBlogsDbContext Db { get; }
13 | public ApiBaseController(HiBlogsDbContext dbContext)
14 | {
15 | Db = dbContext;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.WebApi/Controllers/RemarkController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using HiBlogs.EntityFramework.EntityFramework;
6 |
7 | namespace HiBlogs.WebApi.Controllers
8 | {
9 | public class RemarkController : ApiBaseController
10 | {
11 | public RemarkController(HiBlogsDbContext dbContext)
12 | : base(dbContext)
13 | {
14 | }
15 |
16 | public void save(string mesg)
17 | {
18 | Db.Remarks.Add(new Core.Entities.Remark()
19 | {
20 | BlogId = 1,
21 | Content = mesg,
22 | CreatorUserId = 1
23 | });
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.WebApi/Controllers/UserBlogController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace HiBlogs.WebApi.Controllers
7 | {
8 | [Route("api/[controller]/[Action]")]
9 |
10 | public class UserBlogController
11 | {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/HiBlogs/HiBlogs.WebApi/HiBlogs.WebApi.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
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 |
--------------------------------------------------------------------------------
/HiBlogs/Hiblogs.Redis.Tests/Hiblogs.Redis.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/HiBlogs/Hiblogs.Redis.Tests/UnitTest1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Xunit;
4 |
5 | namespace Hiblogs.Redis.Tests
6 | {
7 | public class UnitTest1
8 | {
9 | [Fact]
10 | public async Task SetStringIncrAsync_TestsAsync()
11 | {
12 | var number1 = await RedisHelper.GetStringIncrAsync("test");
13 |
14 | await RedisHelper.SetStringIncrAsync("test");
15 | await RedisHelper.SetStringIncrAsync("test");
16 | var num3 = await RedisHelper.SetStringIncrAsync("test");
17 | var number2 = await RedisHelper.GetStringIncrAsync("test");
18 |
19 | Assert.True(number1 == number2 - 3);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/HiBlogs/Hiblogs.Redis/Hiblogs.Redis.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/HiBlogs/Hiblogs.Redis/RedisType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Text;
5 |
6 | namespace Hiblogs.Redis
7 | {
8 | public enum RedisTypePrefix
9 | {
10 | //public static string String { get; } = "S:";
11 | [Description("S:")]
12 | String
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/HiBlogs/ToolConsole/Program.cs:
--------------------------------------------------------------------------------
1 | using BlogsMigration;
2 | using HiBlogs.Core.Entities;
3 | using HiBlogs.EntityFramework.EntityFramework;
4 | using System;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 |
8 | namespace ToolConsole
9 | {
10 | class Program
11 | {
12 | static void Main(string[] args)
13 | {
14 | MainAsync().Wait();
15 | }
16 |
17 | public static async Task MainAsync()
18 | {
19 | Console.WriteLine("请输入数据库连接字符串:");
20 | var connection = Console.ReadLine();
21 | Console.WriteLine("正在读取迁移博客...");
22 | using (HiBlogsDbContext db = new HiBlogsDbContext(connection))
23 | {
24 | var userName = "zhaopei";
25 | if (!db.Users.Where(t => t.UserName == userName).Any())
26 | throw new Exception("不存在此用户");
27 | BlogMigrationcs blogMigration = new BlogMigrationcs();
28 | var blogs = await blogMigration.CnblogsMigrationToHiBlogAsync(userName, true);
29 | foreach (var blog in blogs)
30 | {
31 | Console.WriteLine("正在迁移" + blog.Url);
32 | db.Blogs.Add(new Blog()
33 | {
34 | Content = blog.Content,
35 | Title = blog.Title,
36 | OldPublishTiem = blog.OldPublishTiem
37 | });
38 | }
39 | await db.SaveChangesAsync();
40 | }
41 | Console.WriteLine("全部迁移成功");
42 | Console.Read();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/HiBlogs/ToolConsole/ToolConsole.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netstandard2.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/HiBlogs/ToolConsole/迁移.bat:
--------------------------------------------------------------------------------
1 | cd /d "%cd%\"
2 | cd bin\Debug\netcoreapp2.0
3 | dotnet ToolConsole.dll
--------------------------------------------------------------------------------
/HiBlogs/XUnitTestBlogsMigration/UnitTest1.cs:
--------------------------------------------------------------------------------
1 | using BlogsMigration;
2 | using System;
3 | using Xunit;
4 |
5 | namespace XUnitTestBlogsMigration
6 | {
7 | public class UnitTest1
8 | {
9 | [Fact]
10 | public async System.Threading.Tasks.Task Test1Async()
11 | {
12 | BlogMigrationcs blog = new BlogMigrationcs();
13 | await blog.CnblogMigrationToHiBlogAsync("http://www.cnblogs.com/zhaopei/p/7397402.html", true);
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/HiBlogs/XUnitTestBlogsMigration/XUnitTestBlogsMigration.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 农码一生
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hi-Blogs
2 |
3 | ## 嗨博客,基于ASP.NET Core2.0的跨平台的免费开源博客系统
4 | - 演示地址:https://haojima.net/
5 | - 意见和建议:https://github.com/zhaopeiym/Hi-Blogs/issues
6 |
7 | ## 使用到的相关平台、技术和工具
8 | - ASP.NET Core2.0 (底层框架)
9 | - CentOS7.3 (运行平台)
10 | - MySql5.6.37 (数据库,EF Core2.0+Pomelo.EntityFrameworkCore.MySql驱动)
11 | - nginx1.12.1 (代理)
12 | - Reids (缓存,StackExchange.Redis免费开源的.NET版的Reids客户端)
13 | - AngleSharp (Html解析组件)
14 | - Serilog (日志组件)
15 |
16 | # 相关链接
17 | [开发日志、计划](https://github.com/zhaopeiym/Hi-Blogs/blob/Dev/%E5%BC%80%E5%8F%91%E6%97%A5%E5%BF%97%E3%80%81%E5%A4%87%E5%BF%98%E3%80%81%E8%AE%A1%E5%88%92.md)
18 |
19 | # 学习资料
20 | - [Linux视频](http://study.163.com/course/courseMain.htm?courseId=266032)
21 | - [鸟哥的Linux](http://linux.vbird.org/linux_basic/0157installcentos7.php)
22 | - [Docker入门](https://yeasy.gitbooks.io/docker_practice/content/?q=)
23 | - [Redis命令参考](http://redisdoc.com/)
24 | - [The Little Redis Book](https://github.com/JasonLai256/the-little-redis-book/blob/master/cn/redis.md)
25 | - [StackExchange.Redis](https://stackexchange.github.io/StackExchange.Redis/)
26 | - [ASP.NET Core](https://docs.microsoft.com/zh-cn/aspnet/core/)
27 | - [EF Core](https://docs.microsoft.com/en-us/ef/core/)
28 |
29 |
--------------------------------------------------------------------------------
/开发日志、备忘、计划.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/开发日志、备忘、计划.md
--------------------------------------------------------------------------------