diff --git a/img.jpg b/img.jpg new file mode 100644 index 00000000..3bdad160 Binary files /dev/null and b/img.jpg differ diff --git a/inde.html b/inde.html new file mode 100644 index 00000000..e4af56b8 --- /dev/null +++ b/inde.html @@ -0,0 +1,52 @@ + + + + + + Калькулятор - Лабораторная работа 4 + + + +
+
+

Калькулятор

+

Лабораторная работа 4

+
+ +
+
+
+
+ + +
+
+ + +
+
+ +
+ + +
+ + + +
+
Результат:
+
-
+
+
+
+
+
+ + + + diff --git a/index.html b/index.html new file mode 100644 index 00000000..85ced11d --- /dev/null +++ b/index.html @@ -0,0 +1,92 @@ + + + + + + Резюме студента + + + +
+
+ Фото студента +

Михайлов Виктор Николаевич

+

Студент 2-го курса направления ИБАС

+
+ +
+ + +
+
+

О себе

+
+

+ Я студент 2-го курса ИБACа. + Не боюсь ничего, потому что неудачи закаляют характер. + Упорство и умение взаимодействовать с людьми помогает мне добиваться поставленных целей. + В свободное время я занимаюсь боксом и играю в танки. +

+
+
+ +
+

Навыки

+
+
+

Hard-skills

+
+ HTML/CSS + Python + С++ + С + Git +
+
+ +
+

Soft-skills

+
+ Целеустремленность + Отвественность + Дисциплинированность + Амбициозность + Коммуникабельность + Концентрация +
+
+
+
+
+
+
+ + diff --git a/index_lab2.html b/index_lab2.html new file mode 100644 index 00000000..15a11eb4 --- /dev/null +++ b/index_lab2.html @@ -0,0 +1,98 @@ + + + + + + Лабораторная работа 2 + + + +

Лабораторная работа 2. Вариант 15

+ +
+

Задание 1. Популярные языки программирования:

+ +
+ +
+

Задание 2. Родители и дети.

+ +
+

Parent 1

+
child 1
+
child 2
+
child 3
+
child 4
+
+ +
+

Parent 2

+
child 1
+
child 2
+
+ +
+

Parent 3

+
child 1
+
child 2
+
+ +
+

Parent 3

+
child 1
+
child 2
+
child 2 (гость)
+
+
+ +
+

Задание 3. Тест из приложения.

+

+ Язык программирования — это инструменты, с помощью которых разработчики создают программное обеспечение, веб-приложения, игры, алгоритмы и многое другое. + Каждый язык имеет свои особенности, синтаксис и сферу применения. + Ниже представлены некоторые из наиболее известных языков: +

+ +

+ Это лишь малая часть из множества существующих языков, и выбор зависит от задач, которые нужно решить. +

+
+ + diff --git a/script.js b/script.js new file mode 100644 index 00000000..58d93f65 --- /dev/null +++ b/script.js @@ -0,0 +1,88 @@ +document.addEventListener('DOMContentLoaded', function () { + const num1Input = document.getElementById('num1'); + const num2Input = document.getElementById('num2'); + const operationSelect = document.getElementById('operation'); + const calculateBtn = document.getElementById('calculate'); + const resultDiv = document.getElementById('result'); + const errorDiv = document.getElementById('error'); + + if (!num1Input || !num2Input || !operationSelect || !calculateBtn || !resultDiv || !errorDiv) { + return; + } + + calculateBtn.addEventListener('click', handleCalculation); + + function handleCalculation() { + clearDisplay(); + + const num1 = parseFloat(num1Input.value); + const num2 = parseFloat(num2Input.value); + const operation = operationSelect.value; + + if (!validateInput(num1, num2)) { + displayError('Введите корректные числа в оба поля'); + return; + } + + const calculationResult = performCalculation(num1, num2, operation); + + if (calculationResult.success) { + displayResult(calculationResult.value); + } else { + displayError(calculationResult.error); + } + } + + function clearDisplay() { + errorDiv.textContent = ''; + resultDiv.textContent = '-'; + } + + function validateInput(num1, num2) { + return !isNaN(num1) && !isNaN(num2); + } + + function performCalculation(num1, num2, operation) { + let result; + + switch (operation) { + case 'add': + result = num1 + num2; + break; + case 'subtract': + result = num1 - num2; + break; + case 'multiply': + result = num1 * num2; + break; + case 'divide': + if (num2 === 0) { + return { + success: false, + error: 'Деление на ноль невозможно' + }; + } + result = num1 / num2; + break; + default: + return { + success: false, + error: 'Неизвестная операция' + }; + } + + return { + success: true, + value: result + }; + } + + function displayResult(result) { + const roundedResult = Math.round(result * 1e10) / 1e10; + resultDiv.textContent = parseFloat(roundedResult.toFixed(10)); + } + + function displayError(errorMessage) { + errorDiv.textContent = errorMessage; + } +}); diff --git a/styl.css b/styl.css new file mode 100644 index 00000000..87ef2024 --- /dev/null +++ b/styl.css @@ -0,0 +1,155 @@ +* { + box-sizing: border-box; + margin: 0; + padding: 0; + font-family: "Segoe UI"; +} + +body { + background: linear-gradient(135deg, #76e11c 0%, #c0ef1a 100%); + color: #333; + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + padding: 40px 20px; +} + +.container { + max-width: 800px; + width: 100%; + background-color: white; + border-radius: 20px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); + overflow: hidden; +} + +header { + background: linear-gradient(to right, #76e11c, #c0ef1a); + color: white; + padding: 30px; + text-align: center; +} + +h1 { + font-size: 2.5rem; + margin-bottom: 10px; +} + +.subtitle { + font-size: 1.2rem; + opacity: 0.9; +} + +.calculator-container { + padding: 30px; +} + +.calculator { + background-color: #f8f9fa; + border-radius: 15px; + padding: 25px; + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); +} + +.input-group { + display: flex; + flex-wrap: wrap; + gap: 20px; + margin-bottom: 25px; +} + +.input-field { + flex: 1; + min-width: 200px; +} + +label { + display: block; + margin-bottom: 8px; + font-weight: 600; + color: #495057; +} + +input, +select { + width: 100%; + padding: 12px 15px; + border: 2px solid #76e11c; + border-radius: 10px; + font-size: 1rem; + transition: all 0.3s; +} + + input:focus, + select:focus { + border-color: #c0ef1a; + outline: none; + box-shadow: 0 0 0 3px rgba(74, 0, 224, 0.1); + } + +.operation-group { + margin-bottom: 25px; +} + +.calculate-btn { + display: block; + width: 100%; + padding: 15px; + background: linear-gradient(to right, #76e11c, #c0ef1a); + color: white; + border: none; + border-radius: 10px; + font-size: 1.1rem; + font-weight: 600; + cursor: pointer; + transition: all 0.3s; + margin-bottom: 25px; +} + + .calculate-btn:hover { + transform: translateY(-2px); + box-shadow: 0 5px 15px rgba(74, 0, 224, 0.3); + } + + .calculate-btn:active { + transform: translateY(0); + } + +.result-container { + background-color: white; + border-radius: 10px; + padding: 20px; + text-align: center; + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08); +} + +.result-label { + font-size: 1rem; + color: #09ee11; + margin-bottom: 10px; +} + +.result { + font-size: 2rem; + font-weight: 700; + color: #09ee11; + min-height: 48px; +} + +.error { + color: #09ee11; + font-size: 1rem; + margin-top: 10px; + min-height: 24px; +} + +@media (max-width: 600px) { + .input-group { + flex-direction: column; + } + + h1 { + font-size: 2rem; + } +} diff --git a/style.css b/style.css new file mode 100644 index 00000000..7864c5e6 --- /dev/null +++ b/style.css @@ -0,0 +1,273 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +.page { + font-family: "Times New Roman", sans-serif; + background-color: #112ab5; + color: #333; + line-height: 1.6; + padding: 20px; +} + +.container { + max-width: 1000px; + margin: 0 auto; + background-color: white; + border-radius: 10px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.header { + background: linear-gradient(150deg, white 0%, blue 100%); + color: white; + padding: 40px; + text-align: center; + position: relative; +} + +.header__photo { + width: 180px; + height: 180px; + border-radius: 50%; + object-fit: cover; + border: 5px solid rgba(255, 255, 255, 0.5); + margin-bottom: 20px; +} + +.header__title { + font-size: 2.5rem; + margin-bottom: 10px; + text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); +} + +.header__subtitle { + font: 1.2rem; + opacity: 0.9; +} + +.content { + display: grid; + grid-template-columns: 1fr 2fr; + gap: 30px; + padding: 30px; +} + +.sidebar { + display: flex; + flex-direction: column; + gap: 20px; +} + +.info-card { + background-color: #f8f9fa; + padding: 25px; + border-radius: 8px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); +} + +.info-card__title { + color: blue; + margin-bottom: 20px; + font-size: 1.3rem; + border-bottom: 2px solid #61639f; + padding-bottom: 8px; +} + +.info-card__item { + margin-bottom: 20px; + padding: 15px; + background: white; + border-radius: 8px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); +} + +.info-card__item:last-child { + margin-bottom: 0; +} + +.item__label { + display: block; + color: blue; + margin-bottom: 8px; + font-size: 1.1rem; +} + +.item__value { + display: block; + margin-bottom: 5px; +} + +.link { + display: inline-block; + text-decoration: none; + transition: all 0.3s ease; + font-weight: 500; +} + +.link--github { + background: linear-gradient(135deg, white 0%, blue 100%); + color: white; + padding: 12px 25px; + border-radius: 5px; + margin-top: 10px; +} + +.link--github:hover { + background: linear-gradient(135deg, blue 0%, white 100%); + transform: translateY(-2px); + box-shadow: 0 5px 15px rgba(255, 95, 0, 0.4); +} + +.main { + padding: 10px 0; +} + +.section { + margin-bottom: 40px; +} + +.section:last-child { + margin-bottom: 0; +} + +.section__title { + color: blue; + margin-bottom: 20px; + padding-bottom: 8px; + border-bottom: 2px solid #eaeaea; + position: relative; +} + +.section__title::after { + content: ""; + position: absolute; + bottom: -2px; + left: 0; + width: 50px; + height: 2px; + background-color: darkblue; +} + +.about { + background: #f8f9fa; + padding: 20px; + border-radius: 8px; + border-left: 4px solid darkblue; +} + +.about__text { + text-align: justify; + line-height: 1.8; +} + +.skills { + display: flex; + flex-direction: column; + gap: 25px; +} + +.skills_category { + background: #f8f9fa; + padding: 20px; + border-radius: 8px; +} + +.category__subtitle { + color: blue; + margin-bottom: 15px; + font-size: 1.2rem; +} + +.category__list { + display: flex; + flex-wrap: wrap; + gap: 10px; +} + +.list__tag { + background: linear-gradient(135deg, #49ace8 0%, #2530eb 100%); + color: white; + padding: 8px 15px; + border-radius: 20px; + font-size: 0.9rem; + transition: all 0.3s ease; + cursor: default; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; +} + +.list__tag:hover { + box-shadow: 0 0 8px #4CAF50; +} + +.contact-link { + color: inherit; + text-decoration: none; + transition: none; + font-weight: normal; /* Убран жирный шрифт */ +} + +.contact-link:hover, +.contact-link:visited, +.contact-link:active { + color: inherit; + text-decoration: none; +} + +@media (max-width: 768px) { + .content { + grid-template-columns: 1fr; + gap: 20px; + padding: 20px; + } + + .header { + padding: 30px 20px; + } + + .header__title { + font-size: 2rem; + } + + .header__photo { + width: 150px; + height: 150px; + } + + .category__list { + justify-content: center; + } +} + +@media (max-width: 480px) { + .page { + padding: 10px; + } + + .content { + padding: 15px; + } + + .header__title { + font-size: 1.8rem; + } + + .header__photo { + width: 120px; + height: 120px; + } + + .info-card { + padding: 15px; + } + + .skills_category { + padding: 15px; + } +} diff --git a/style_lab2.css b/style_lab2.css new file mode 100644 index 00000000..ff7fa6c6 --- /dev/null +++ b/style_lab2.css @@ -0,0 +1,94 @@ +.list__items { + list-style-type: disc; + padding-right: 20px; +} + +.items__item { + color: black; + transition: color 0.5s ease; +} + +.items__item:hover { + color: green; +} + +.parent { + margin-bottom: 40px; +} + +.parent__title { + font-weight: bold; +} + +.parent--1__child, +.parent--2__child, +.parent--3__child { + margin-left: 20px; + padding: 2px 4px; +} + +.parent--1 .parent--1__child { + color: red; +} + +.parent--2 { + color: orange; +} + +.parent--2 .parent--2__child { + color: #b4005a; + border: 1px dotted orange; + width: 100px; + display: inline-block; +} + +.parent--3 { + color: inherit; +} + +.parent--3 > .parent--2__child { + color: violet; + font-weight: bold; + border: 1px dashed violet; + padding: 4px; + background-color: #f0e6ff; +} + +.parent--3__child--guest { + color: purple; + margin-left: 20px; + padding: 2px 4px; + border: none; +} + +.parent--2 ~ .parent--3, +.parent--2 ~ .parent--3 .parent--3__child { + color: green; +} + +.languages { + max-width: 700px; + margin-top: 20px; + line-height: 1.5; +} + +.languages__link { + font-weight: bold; + text-decoration: none; + color: inherit; + position: relative; +} + +.languages__link::after { + content: " 🌐"; + font-weight: normal; +} + +.languages__list::after { + content: url("https://ssau.ru/i/logo/logo-white-ru.svg"); + display: block; + width: auto; + height: 100px; + background-color: #2780E3; + margin: 15px auto 0; +} diff --git "a/\320\233\320\260\320\261\320\276\321\200\320\260\321\202\320\276\321\200\320\275\320\260\321\217 \321\200\320\260\320\261\320\276\321\202\320\260 1.md" "b/\320\233\320\260\320\261\320\276\321\200\320\260\321\202\320\276\321\200\320\275\320\260\321\217 \321\200\320\260\320\261\320\276\321\202\320\260 1.md" deleted file mode 100644 index 3e131bd6..00000000 --- "a/\320\233\320\260\320\261\320\276\321\200\320\260\321\202\320\276\321\200\320\275\320\260\321\217 \321\200\320\260\320\261\320\276\321\202\320\260 1.md" +++ /dev/null @@ -1,28 +0,0 @@ -# Лабораторная работа 1 -## Начало знакомства с версткой - -В данной лабораторной работе будет происходить знакомство с html и css посредством выполнения заданий, позволяющих ознакомится с основными html-тегами, а также css-свойствами позволяющими задавать: - -- позиционирование элемента -- цвета текста и заднего фона -- позиционирование текста -- настройки отступов (внешних и внутренних) -- настройка границ -- свойство display - -Необходимо выполнить следующие задания: -1. Взять текст из [приложения 1](#%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F), расположить внутри блока с выравниванием и цветами согласно варианту. -2. Взяв картинки из [приложения 2](#%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F), расположить их одну поверх другой соосно, используя свойство position. -3. Создать светофор. Создать 3 блока (красный, желтый, зеленый) и расположить их вертикально. -4. Создать лабиринт 3*3 из квадратных блоков, где каждый блок это элемент поля, а в качестве стен выступают границы блоков. - -## Приложения -### Приложение 1 - -JavaScript (аббр. JS) — мультипарадигменный язык программирования. Поддерживает объектно-ориентированный, императивный и функциональный стили. Является реализацией спецификации ECMAScript (стандарт ECMA-262). \ -JavaScript обычно используется как встраиваемый язык для программного доступа к объектам приложений. Наиболее широкое применение находит в браузерах как язык сценариев для придания интерактивности веб-страницам. - -### Приложение 2 - -- [Картинка 1](https://img2.akspic.ru/crops/8/4/6/4/6/164648/164648-kot-kotenok-privlekatelnost-golova-glaz-3840x2160.jpg) -- [Картинка 2](https://i.pinimg.com/236x/cd/16/12/cd16121609a79d95dffbfa28a326331e.jpg)