Browse Source

Загрузить файлы 'assets/sass/components'

lansmaster 1 year ago
parent
commit
f62e323700

+ 26 - 0
assets/sass/components/_box.scss

@@ -0,0 +1,26 @@
+///
+/// Hyperspace by HTML5 UP
+/// html5up.net | @ajlkn
+/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+///
+
+/* Box */
+
+	.box {
+		border-radius: _size(border-radius);
+		border: solid _size(border-width) _palette(border);
+		margin-bottom: _size(element-margin);
+		padding: 1.5em;
+
+		> :last-child,
+		> :last-child > :last-child,
+		> :last-child > :last-child > :last-child {
+			margin-bottom: 0;
+		}
+
+		&.alt {
+			border: 0;
+			border-radius: 0;
+			padding: 0;
+		}
+	}

+ 108 - 0
assets/sass/components/_button.scss

@@ -0,0 +1,108 @@
+///
+/// Hyperspace by HTML5 UP
+/// html5up.net | @ajlkn
+/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+///
+
+/* Button */
+
+	input[type="submit"],
+	input[type="reset"],
+	input[type="button"],
+	button,
+	.button {
+		@include vendor('appearance', 'none');
+		@include vendor('transition', (
+			'border-color #{_duration(transition)} ease'
+		));
+		background-color: transparent;
+		border: solid 1px !important;
+		border-color: _palette(border) !important;
+		border-radius: 3em;
+		color: _palette(fg-bold) !important;
+		cursor: pointer;
+		display: inline-block;
+		font-size: 0.6em;
+		font-weight: _font(weight-bold);
+		height: calc(4.75em + 2px);
+		letter-spacing: _font(kerning-alt);
+		line-height: 4.75em;
+		outline: 0;
+		padding: 0 3.75em;
+		position: relative;
+		text-align: center;
+		text-decoration: none;
+		text-transform: uppercase;
+		white-space: nowrap;
+
+		&:after {
+			@include vendor('transform', 'scale(0.25)');
+			@include vendor('pointer-events', 'none');
+			@include vendor('transition', (
+				'opacity #{_duration(transition)} ease',
+				'transform #{_duration(transition)} ease'
+			));
+			background: _palette(fg-bold);
+			border-radius: 3em;
+			content: '';
+			height: 100%;
+			left: 0;
+			opacity: 0;
+			position: absolute;
+			top: 0;
+			width: 100%;
+		}
+
+		&.icon {
+			&:before {
+				margin-right: 0.75em;
+			}
+		}
+
+		&.fit {
+			display: block;
+			margin: 0 0 (_size(element-margin) * 0.5) 0;
+			width: 100%;
+		}
+
+		&.small {
+			font-size: 0.4em;
+		}
+
+		&.big {
+			font-size: 0.8em;
+		}
+
+		&.special {
+			background-color: _palette(fg-bold);
+			color: _palette(bg) !important;
+
+			&:after {
+				display: none;
+			}
+		}
+
+		&.disabled,
+		&:disabled {
+			cursor: default;
+			opacity: 0.5;
+			@include vendor('pointer-events', 'none');
+		}
+
+		&:hover {
+			border-color: _palette(fg) !important;
+
+			&:after {
+				opacity: 0.05;
+				@include vendor('transform', 'scale(1)');
+			}
+
+			&:active {
+				border-color: _palette(fg-bold) !important;
+
+				&:after {
+					opacity: 0.1;
+				}
+			}
+		}
+	}

+ 98 - 0
assets/sass/components/_features.scss

@@ -0,0 +1,98 @@
+///
+/// Hyperspace by HTML5 UP
+/// html5up.net | @ajlkn
+/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+///
+
+/* Features */
+
+	.features {
+		@include vendor('display', 'flex');
+		@include vendor('flex-wrap', 'wrap');
+		border-radius: _size(border-radius);
+		border: solid 1px _palette(border);
+		background: _palette(border-bg);
+		margin: 0 0 _size(element-margin) 0;
+
+		section {
+			@include padding(3em, 3em, (0.5em, 0, 0, 4em));
+			width: 50%;
+			border-top: solid 1px _palette(border);
+			position: relative;
+
+			&:nth-child(-n + 2) {
+				border-top-width: 0;
+			}
+
+			&:nth-child(2n) {
+				border-left: solid 1px _palette(border);
+			}
+
+			.icon {
+				@include vendor('transition', (
+					'opacity #{_duration(activation) * 0.5} ease',
+					'transform #{_duration(activation) * 0.5} ease'
+				));
+				@include vendor('transition-delay', '1s');
+				@include vendor('transform', 'scale(1)');
+				position: absolute;
+				left: 3em;
+				top: 3em;
+				opacity: 1;
+			}
+
+			@for $i from 1 through _misc(max-features) {
+				&:nth-child(#{$i}) {
+					.icon {
+						@include vendor('transition-delay', '#{(_duration(transition) * 0.75 * $i)}');
+					}
+				}
+			}
+		}
+
+		&.inactive {
+			section {
+				.icon {
+					@include vendor('transform', 'scale(0.5)');
+					opacity: 0;
+				}
+			}
+		}
+
+		@include breakpoint(medium) {
+			display: block;
+
+			section {
+				border-top-width: 1px !important;
+				border-left-width: 0 !important;
+				width: 100%;
+
+				&:first-child {
+					border-top-width: 0 !important;
+				}
+			}
+		}
+
+		@include breakpoint(small) {
+			section {
+				@include padding(2em, 1.5em, (0.5em, 0, 0, 4em));
+
+				.icon {
+					left: 1.5em;
+					top: 2em;
+				}
+			}
+		}
+
+		@include breakpoint(xsmall) {
+			section {
+				@include padding(2em, 1.5em, (0, 0, 0, 0));
+
+				.icon {
+					left: 0;
+					position: relative;
+					top: 0;
+				}
+			}
+		}
+	}

+ 221 - 0
assets/sass/components/_form.scss

@@ -0,0 +1,221 @@
+///
+/// Hyperspace by HTML5 UP
+/// html5up.net | @ajlkn
+/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+///
+
+/* Form */
+
+	form {
+		margin: 0 0 _size(element-margin) 0;
+
+		.field {
+			margin: 0 0 (_size(element-margin) * 0.5) 0;
+
+			&.half {
+				width: 50%;
+				float: left;
+				padding: 0 0 0 0.75em;
+
+				&.first {
+					padding: 0 0.75em 0 0;
+				}
+			}
+		}
+
+		> .actions {
+			margin: _size(element-margin) 0 0 0 !important;
+		}
+
+		@include breakpoint(small) {
+			.field {
+				&.half {
+					width: 100%;
+					float: none;
+					padding: 0;
+
+					&.first {
+						padding: 0;
+					}
+				}
+			}
+		}
+	}
+
+	label {
+		color: _palette(fg-bold);
+		font-weight: _font(weight-bold);
+		line-height: 1.5;
+		margin: 0 0 (_size(element-margin) * 0.35) 0;
+		display: block;
+		font-size: 1.1em;
+	}
+
+	input[type="text"],
+	input[type="password"],
+	input[type="email"],
+	input[type="tel"],
+	select,
+	textarea {
+		@include vendor('appearance', 'none');
+		background: _palette(border-bg);
+		border-radius: _size(border-radius);
+		border: none;
+		border: solid _size(border-width) _palette(border);
+		color: inherit;
+		display: block;
+		outline: 0;
+		padding: 0 1em;
+		text-decoration: none;
+		width: 100%;
+
+		&:invalid {
+			box-shadow: none;
+		}
+
+		&:focus {
+			border-color: _palette(fg-bold);
+			box-shadow: 0 0 0 _size(border-width) _palette(fg-bold);
+		}
+	}
+
+	.select-wrapper {
+		@include icon;
+		display: block;
+		position: relative;
+
+		&:before {
+			color: _palette(border);
+			content: '\f078';
+			display: block;
+			height: _size(element-height);
+			line-height: _size(element-height);
+			pointer-events: none;
+			position: absolute;
+			right: 0;
+			text-align: center;
+			top: 0;
+			width: _size(element-height);
+		}
+
+		select::-ms-expand {
+			display: none;
+		}
+	}
+
+	select {
+		option {
+			background-color: _palette(bg);
+			color: _palette(fg-bold);
+		}
+	}
+
+	input[type="text"],
+	input[type="password"],
+	input[type="email"],
+	select {
+		height: _size(element-height);
+	}
+
+	textarea {
+		padding: 0.75em 1em;
+
+		body.is-ie & {
+			min-height: 10em;
+		}
+	}
+
+	input[type="checkbox"],
+	input[type="radio"], {
+		@include vendor('appearance', 'none');
+		display: block;
+		float: left;
+		margin-right: -2em;
+		opacity: 0;
+		width: 1em;
+		z-index: -1;
+
+		& + label {
+			@include icon;
+			color: _palette(fg);
+			cursor: pointer;
+			display: inline-block;
+			font-size: 1em;
+			font-weight: _font(weight);
+			padding-left: (_size(element-height) * 0.6) + 0.75em;
+			padding-right: 0.75em;
+			position: relative;
+
+			&:before {
+				background: _palette(border-bg);
+				border-radius: _size(border-radius);
+				border: solid _size(border-width) _palette(border);
+				content: '';
+				display: inline-block;
+				height: (_size(element-height) * 0.6);
+				left: 0;
+				line-height: (_size(element-height) * 0.575);
+				position: absolute;
+				text-align: center;
+				top: 0;
+				width: (_size(element-height) * 0.6);
+			}
+		}
+
+		&:checked + label {
+			&:before {
+				background: _palette(fg-bold);
+				border-color: _palette(fg-bold);
+				color: _palette(accent3);
+				content: '\f00c';
+			}
+		}
+
+		&:focus + label {
+			&:before {
+				border-color: _palette(fg-bold);
+				box-shadow: 0 0 0 _size(border-width) _palette(fg-bold);
+			}
+		}
+	}
+
+	input[type="checkbox"] {
+		& + label {
+			&:before {
+				border-radius: _size(border-radius);
+			}
+		}
+	}
+
+	input[type="radio"] {
+		& + label {
+			&:before {
+				border-radius: 100%;
+			}
+		}
+	}
+
+	::-webkit-input-placeholder {
+		color: _palette(fg-light) !important;
+		opacity: 1.0;
+	}
+
+	:-moz-placeholder {
+		color: _palette(fg-light) !important;
+		opacity: 1.0;
+	}
+
+	::-moz-placeholder {
+		color: _palette(fg-light) !important;
+		opacity: 1.0;
+	}
+
+	:-ms-input-placeholder {
+		color: _palette(fg-light) !important;
+		opacity: 1.0;
+	}
+
+	.formerize-placeholder {
+		color: _palette(fg-light) !important;
+		opacity: 1.0;
+	}