Compare commits
32 Commits
ea0b091c8a
...
hw6
| Author | SHA1 | Date | |
|---|---|---|---|
| 63af3ed7b4 | |||
| b2c005e22c | |||
| 4cf2f56749 | |||
| b0c3660f16 | |||
| b47e479b95 | |||
| eb509fb846 | |||
| 9870335263 | |||
| 7cc781c0b9 | |||
| 8eaf1ed628 | |||
| 7b1c5b0a50 | |||
| 4316ac1636 | |||
| a4f511cb45 | |||
| dd9002a61b | |||
| e142436ed3 | |||
| 38e70189b8 | |||
| 39d023d50b | |||
| 05b624120d | |||
| 7a83c54165 | |||
| c495c26320 | |||
| 3982a97dce | |||
| 8f89dbe429 | |||
| 98b74ae77d | |||
| bdc5a9d55c | |||
| 8900cf3228 | |||
| 4cc6b7e9d8 | |||
| 73ea28eab6 | |||
| 5f692a4708 | |||
| b98abb94cc | |||
| 2f44691a98 | |||
| 36fb1653d3 | |||
| 0bdaa800f6 | |||
| ebe6566b87 |
5
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
node_modules
|
**node_modules
|
||||||
to_reform
|
**to_reform
|
||||||
|
.vscode
|
||||||
@@ -4,10 +4,10 @@ mixin navbarMixin(selectedItem)
|
|||||||
.navbar
|
.navbar
|
||||||
each navbarUrl,navbarName in navbarItems
|
each navbarUrl,navbarName in navbarItems
|
||||||
if navbarName == selectedItem
|
if navbarName == selectedItem
|
||||||
a.navbar__link__wrapper(href=navbarUrl)
|
a.navbar__link-wrapper(href=navbarUrl)
|
||||||
.navbar__item.navbar__item_selected #{navbarName}
|
.navbar__item.navbar__item_selected #{navbarName}
|
||||||
else
|
else
|
||||||
a.navbar__link__wrapper(href=navbarUrl)
|
a.navbar__link-wrapper(href=navbarUrl)
|
||||||
.navbar__item #{navbarName}
|
.navbar__item #{navbarName}
|
||||||
|
|
||||||
mixin infoCardsMinxin()
|
mixin infoCardsMinxin()
|
||||||
@@ -36,7 +36,7 @@ mixin filtersMixin()
|
|||||||
.filter-group__items
|
.filter-group__items
|
||||||
each filter in locationFilters
|
each filter in locationFilters
|
||||||
input.filter-group__checkbox(type="checkbox" id=filter.id name="location" value=filter.value)
|
input.filter-group__checkbox(type="checkbox" id=filter.id name="location" value=filter.value)
|
||||||
| #{filter.label}
|
span #{filter.label}
|
||||||
br
|
br
|
||||||
|
|
||||||
.filter-group
|
.filter-group
|
||||||
@@ -46,7 +46,7 @@ mixin filtersMixin()
|
|||||||
.filter-group__items
|
.filter-group__items
|
||||||
each filter in sensorTypeFilters
|
each filter in sensorTypeFilters
|
||||||
input.filter-group__checkbox(type="checkbox" id=filter.id name="sensor_type" value=filter.value)
|
input.filter-group__checkbox(type="checkbox" id=filter.id name="sensor_type" value=filter.value)
|
||||||
| #{filter.label}
|
span #{filter.label}
|
||||||
br
|
br
|
||||||
|
|
||||||
.filter-group
|
.filter-group
|
||||||
@@ -54,14 +54,14 @@ mixin filtersMixin()
|
|||||||
b Numeric Values
|
b Numeric Values
|
||||||
br
|
br
|
||||||
.filter-group__range
|
.filter-group__range
|
||||||
| Temperature from:
|
span Temperature from:
|
||||||
input.filter-group__input(type="number" name="temp_min" placeholder="20")
|
input.filter-group__input(type="number" name="temp_min" placeholder="20")
|
||||||
| to:
|
span to:
|
||||||
input.filter-group__input(type="number" name="temp_max" placeholder="30")
|
input.filter-group__input(type="number" name="temp_max" placeholder="30")
|
||||||
br
|
br
|
||||||
| Humidity from:
|
span Humidity from:
|
||||||
input.filter-group__input(type="number" name="humidity_min" placeholder="40")
|
input.filter-group__input(type="number" name="humidity_min" placeholder="40")
|
||||||
| to:
|
span to:
|
||||||
input.filter-group__input(type="number" name="humidity_max" placeholder="60")
|
input.filter-group__input(type="number" name="humidity_max" placeholder="60")
|
||||||
br
|
br
|
||||||
|
|
||||||
@@ -70,10 +70,10 @@ mixin filtersMixin()
|
|||||||
b Device Specific Filters
|
b Device Specific Filters
|
||||||
br
|
br
|
||||||
.filter-group__items
|
.filter-group__items
|
||||||
| Sensor Name:
|
span Sensor Name:
|
||||||
input.filter-group__input(type="text" name="sensor_name")
|
input.filter-group__input(type="text" name="sensor_name")
|
||||||
br
|
br
|
||||||
| Days Since Calibration (max):
|
span Days Since Calibration (max):
|
||||||
input.filter-group__input(type="number" name="calibration_days" placeholder="30")
|
input.filter-group__input(type="number" name="calibration_days" placeholder="30")
|
||||||
br
|
br
|
||||||
|
|
||||||
@@ -82,10 +82,10 @@ mixin filtersMixin()
|
|||||||
b Measurement Period
|
b Measurement Period
|
||||||
br
|
br
|
||||||
.filter-group__dates
|
.filter-group__dates
|
||||||
| From:
|
span From:
|
||||||
input.filter-group__input(type="date" name="date_from")
|
input.filter-group__input(type="date" name="date_from")
|
||||||
br
|
br
|
||||||
| To:
|
span To:
|
||||||
input.filter-group__input(type="date" name="date_to")
|
input.filter-group__input(type="date" name="date_to")
|
||||||
br
|
br
|
||||||
|
|
||||||
@@ -93,13 +93,7 @@ mixin filtersMixin()
|
|||||||
input.filter-group__button.filter-group__button--submit(type="submit" value="Apply Filters")
|
input.filter-group__button.filter-group__button--submit(type="submit" value="Apply Filters")
|
||||||
input.filter-group__button.filter-group__button--reset(type="reset" value="Reset Filters")
|
input.filter-group__button.filter-group__button--reset(type="reset" value="Reset Filters")
|
||||||
|
|
||||||
mixin sortingMixin()
|
mixin sortLevel(level)
|
||||||
- const sortLevels = ['1', '2', '3'];
|
|
||||||
details.sorting
|
|
||||||
summary.sorting__summary Sortings
|
|
||||||
form.sorting__form
|
|
||||||
fieldset.sorting__fieldset
|
|
||||||
each level in sortLevels
|
|
||||||
.sort-level
|
.sort-level
|
||||||
i.sort-level__label
|
i.sort-level__label
|
||||||
b Sort Level #{level}
|
b Sort Level #{level}
|
||||||
@@ -110,13 +104,38 @@ mixin sortingMixin()
|
|||||||
option(value=option.value) #{option.label}
|
option(value=option.value) #{option.label}
|
||||||
label.sort-level__reverse-label(for=`sort${level}_reverse`)
|
label.sort-level__reverse-label(for=`sort${level}_reverse`)
|
||||||
input.sort-level__checkbox(type="checkbox" id=`sort${level}_reverse` name=`sort${level}_reverse`)
|
input.sort-level__checkbox(type="checkbox" id=`sort${level}_reverse` name=`sort${level}_reverse`)
|
||||||
| Reverse
|
span Reverse
|
||||||
br
|
br
|
||||||
if level === '3'
|
if level === '3'
|
||||||
input.sort-level__submit(type="submit" value="Sort")
|
input.sort-level__submit(type="submit" value="Sort")
|
||||||
else
|
else
|
||||||
br
|
br
|
||||||
|
|
||||||
|
mixin sortingMixin()
|
||||||
|
- const sortLevels = ['1', '2', '3'];
|
||||||
|
details.sorting
|
||||||
|
summary.sorting__summary Sortings
|
||||||
|
form.sorting__form
|
||||||
|
fieldset.sorting__fieldset
|
||||||
|
each level in sortLevels
|
||||||
|
+sortLevel(level)
|
||||||
|
|
||||||
|
mixin graphXOption(option)
|
||||||
|
if option.checked
|
||||||
|
input.axis-group__radio(type="radio" id=option.id name="x_axis" value=option.value checked)
|
||||||
|
else
|
||||||
|
input.axis-group__radio(type="radio" id=option.id name="x_axis" value=option.value)
|
||||||
|
label.axis-group__option-label(for=option.id) #{option.label}
|
||||||
|
br
|
||||||
|
|
||||||
|
mixin graphYOption(option)
|
||||||
|
if option.checked
|
||||||
|
input.values-group__checkbox(type="checkbox" id=option.id name="values" value=option.value checked)
|
||||||
|
else
|
||||||
|
input.values-group__checkbox(type="checkbox" id=option.id name="values" value=option.value)
|
||||||
|
label.values-group__option-label(for=option.id) #{option.label}
|
||||||
|
br
|
||||||
|
|
||||||
mixin graphMixin()
|
mixin graphMixin()
|
||||||
details.graph
|
details.graph
|
||||||
summary.graph__summary Graph
|
summary.graph__summary Graph
|
||||||
@@ -128,23 +147,12 @@ mixin graphMixin()
|
|||||||
br
|
br
|
||||||
.axis-group__options
|
.axis-group__options
|
||||||
each option in axisOptions
|
each option in axisOptions
|
||||||
if option.checked
|
+graphXOption(option)
|
||||||
input.axis-group__radio(type="radio" id=option.id name="x_axis" value=option.value checked)
|
|
||||||
else
|
|
||||||
input.axis-group__radio(type="radio" id=option.id name="x_axis" value=option.value)
|
|
||||||
label.axis-group__option-label(for=option.id) #{option.label}
|
|
||||||
br
|
|
||||||
|
|
||||||
.values-group
|
.values-group
|
||||||
i.values-group__label
|
i.values-group__label
|
||||||
b Values
|
b Values
|
||||||
br
|
br
|
||||||
.values-group__options
|
.values-group__options
|
||||||
each option in valueOptions
|
each option in valueOptions
|
||||||
if option.checked
|
+graphYOption(option)
|
||||||
input.values-group__checkbox(type="checkbox" id=option.id name="values" value=option.value checked)
|
|
||||||
else
|
|
||||||
input.values-group__checkbox(type="checkbox" id=option.id name="values" value=option.value)
|
|
||||||
label.values-group__option-label(for=option.id) #{option.label}
|
|
||||||
br
|
|
||||||
button.values-group__button(type="submit" id="build_graph" name="build_graph") Build
|
button.values-group__button(type="submit" id="build_graph" name="build_graph") Build
|
||||||
|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 347 KiB After Width: | Height: | Size: 347 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 5.2 MiB After Width: | Height: | Size: 5.2 MiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
@@ -1,3 +1,3 @@
|
|||||||
import './styles/main.styl'
|
import './styles/index.styl'
|
||||||
import './styles/details.styl'
|
import './styles/details.styl'
|
||||||
import './styles/table.styl'
|
import './styles/table.styl'
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
// Миксины для переиспользования
|
item_h=3em;
|
||||||
|
|
||||||
double-border()
|
double-border()
|
||||||
border-top double thick silver
|
border-top double thick silver
|
||||||
border-bottom double thick silver
|
border-bottom double thick silver
|
||||||
@@ -18,26 +19,25 @@ grid-responsive(columns)
|
|||||||
grid-template-columns columns
|
grid-template-columns columns
|
||||||
grid-template-rows 1fr
|
grid-template-rows 1fr
|
||||||
|
|
||||||
// Основные стили
|
|
||||||
.navbar
|
.navbar
|
||||||
double-border()
|
double-border()
|
||||||
font-size 0
|
font-size 0
|
||||||
grid-responsive(repeat(7, min-content))
|
grid-responsive(repeat(7, min-content))
|
||||||
justify-items start
|
justify-items start
|
||||||
|
|
||||||
&__link__wrapper
|
&__link-wrapper
|
||||||
color black
|
color black
|
||||||
text-decoration none
|
text-decoration none
|
||||||
|
|
||||||
&__item
|
&__item
|
||||||
display inline-block
|
display inline-block
|
||||||
width max-content
|
width max-content
|
||||||
height 3em
|
height item_h
|
||||||
line-height 3em
|
line-height item_h
|
||||||
text-align center
|
text-align center
|
||||||
vertical-align middle
|
vertical-align middle
|
||||||
padding 0 10px
|
padding 0 10px
|
||||||
margin 0 10px
|
margin @padding
|
||||||
overflow hidden
|
overflow hidden
|
||||||
text-overflow ellipsis
|
text-overflow ellipsis
|
||||||
font-size medium
|
font-size medium
|
||||||
112
hw/hw6/hw6.js
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
let templates = [
|
||||||
|
[
|
||||||
|
"X--X----",
|
||||||
|
"-XXX-X--",
|
||||||
|
"----X---",
|
||||||
|
"----X---",
|
||||||
|
"------XX",
|
||||||
|
"----XX--",
|
||||||
|
"X-------",
|
||||||
|
"-XX--X--"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"---XX---",
|
||||||
|
"----X-X-",
|
||||||
|
"---XX---",
|
||||||
|
"---X----",
|
||||||
|
"-X------",
|
||||||
|
"X----X-X",
|
||||||
|
"--X--X--",
|
||||||
|
"-X----XX"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"-X-X----",
|
||||||
|
"---X-X--",
|
||||||
|
"X-XX--X-",
|
||||||
|
"--X-X---",
|
||||||
|
"------X",
|
||||||
|
"--------",
|
||||||
|
"X-----X-",
|
||||||
|
"-X-X---X"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"-XX-X---",
|
||||||
|
"-----X--",
|
||||||
|
"----X---",
|
||||||
|
"-----X-X",
|
||||||
|
"-X-X--X-",
|
||||||
|
"-XX----X",
|
||||||
|
"-X------",
|
||||||
|
"XX------"
|
||||||
|
], [
|
||||||
|
"----XX-X",
|
||||||
|
"X-------",
|
||||||
|
"--------",
|
||||||
|
"-----XX-",
|
||||||
|
"---X-X--",
|
||||||
|
"-X---XX-",
|
||||||
|
"-X-X----",
|
||||||
|
"----XXX-"
|
||||||
|
], [
|
||||||
|
"XX------",
|
||||||
|
"-----X--",
|
||||||
|
"-------X",
|
||||||
|
"-X-X----",
|
||||||
|
"X-X----X",
|
||||||
|
"-X-X-X-X",
|
||||||
|
"----X-X-",
|
||||||
|
"-X------"
|
||||||
|
],
|
||||||
|
];
|
||||||
|
const squareSize = templates[0].length;
|
||||||
|
|
||||||
|
//convert to arrays for mutability
|
||||||
|
let temp = []
|
||||||
|
for (let n = 0; n < templates.length; n++) {
|
||||||
|
temp.push([])
|
||||||
|
for (let i = 0; i < squareSize; i++) {
|
||||||
|
temp[n].push([]);
|
||||||
|
for (let j = 0; j < squareSize; j++) {
|
||||||
|
temp[n][i].push(templates[n][i][j] == "X" ? 1 : 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
templates = temp;
|
||||||
|
|
||||||
|
const encodedMsg = "Р_НАЙА_СЛЗДЕ_ЛОСЖСТОИКНОЛЬЛЬТКУЮО__КЗАЕ_ДВАОКАЧОЖЗ_УЧАСМОДУ_ТЮЖЕ";
|
||||||
|
|
||||||
|
|
||||||
|
function rotateTemplate(template) {
|
||||||
|
for (let i = 0; i < squareSize; i++) {
|
||||||
|
for (let j = 0; j < i; j++) {
|
||||||
|
let temp = template[i][j];
|
||||||
|
template[i][j] = template[j][i];
|
||||||
|
template[j][i] = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < squareSize; i++) {
|
||||||
|
for (let j = 0; j < squareSize / 2; j++) {
|
||||||
|
let temp = template[i][j];
|
||||||
|
template[i][j] = template[i][(squareSize - 1) - j];
|
||||||
|
template[i][(squareSize - 1) - j] = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let n = 0; n < templates.length; n++) {
|
||||||
|
let out = ""
|
||||||
|
for (let rot = 0; rot < 4; rot++) {
|
||||||
|
for (let i = 0; i < squareSize; i++) {
|
||||||
|
for (let j = 0; j < squareSize; j++) {
|
||||||
|
if (templates[n][i][j]) {
|
||||||
|
out += encodedMsg[i * squareSize + j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rotateTemplate(templates[n]);
|
||||||
|
}
|
||||||
|
console.log(out);
|
||||||
|
console.log("=======");
|
||||||
|
|
||||||
|
}
|
||||||
1
labs/fake-lab5/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
6695
labs/fake-lab5/package-lock.json
generated
Normal file
30
labs/fake-lab5/package.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"name": "template_pug",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "webpack --mode production",
|
||||||
|
"serve": "webpack serve --open --mode development",
|
||||||
|
"dev": "webpack --mode development",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"devDependencies": {
|
||||||
|
"chokidar": "^4.0.3",
|
||||||
|
"css-loader": "^6.8.1",
|
||||||
|
"filemanager-webpack-plugin": "^8.0.0",
|
||||||
|
"glob": "^11.0.3",
|
||||||
|
"html-webpack-plugin": "^5.5.3",
|
||||||
|
"pug": "^2.0.4",
|
||||||
|
"pug-loader": "^2.4.0",
|
||||||
|
"style-loader": "^3.3.3",
|
||||||
|
"stylus": "^0.61.0",
|
||||||
|
"stylus-loader": "^7.1.3",
|
||||||
|
"webpack": "^5.89.0",
|
||||||
|
"webpack-cli": "^5.1.4",
|
||||||
|
"webpack-dev-server": "^4.15.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
1
labs/fake-lab5/src/index.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import './styles/main.styl'
|
||||||
19
labs/fake-lab5/src/pages/index.pug
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
extends template
|
||||||
|
|
||||||
|
block nav
|
||||||
|
nav
|
||||||
|
+createMenu(dictMenu, 'Главная')
|
||||||
|
|
||||||
|
block content
|
||||||
|
div.images
|
||||||
|
each pict in listImages
|
||||||
|
a(href= "building.html")
|
||||||
|
img(src= require("../images/" + pict))
|
||||||
|
|
||||||
|
article
|
||||||
|
each item in listSections
|
||||||
|
section
|
||||||
|
h3= item.header
|
||||||
|
img(src= require("../images/" + item.image))
|
||||||
|
p= item.text
|
||||||
|
a(href="#") …
|
||||||
86
labs/fake-lab5/src/styles/main.styl
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
colorText = #6f6d6d
|
||||||
|
|
||||||
|
back(size)
|
||||||
|
background-color #f1f1f1
|
||||||
|
box-shadow 4px 5px 10px rgba(0, 0, 0, 0.4)
|
||||||
|
padding: size + "%"
|
||||||
|
margin 0 0 1% 0
|
||||||
|
|
||||||
|
html
|
||||||
|
color colorText
|
||||||
|
|
||||||
|
nav
|
||||||
|
back(0)
|
||||||
|
text-align right
|
||||||
|
|
||||||
|
& a
|
||||||
|
display inline-block
|
||||||
|
padding 1%
|
||||||
|
color colorText
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
&.active
|
||||||
|
background-color #f87777
|
||||||
|
color #f8f8f8
|
||||||
|
|
||||||
|
div.images
|
||||||
|
display grid
|
||||||
|
grid-template-columns repeat(5, 1fr)
|
||||||
|
grid-gap 0.5%
|
||||||
|
back(1)
|
||||||
|
overflow hidden
|
||||||
|
|
||||||
|
& img
|
||||||
|
width: 100%
|
||||||
|
@media (max-width: 600px)
|
||||||
|
grid-template-rows repeat(5, 1fr)
|
||||||
|
grid-template-columns 1fr
|
||||||
|
justify-items center
|
||||||
|
|
||||||
|
article
|
||||||
|
width 80%
|
||||||
|
margin auto
|
||||||
|
display grid
|
||||||
|
grid-template-columns repeat(3, 1fr)
|
||||||
|
grid-gap 4%
|
||||||
|
overflow hidden
|
||||||
|
|
||||||
|
@media (max-width: 600px)
|
||||||
|
grid-template-rows repeat(3, 1fr)
|
||||||
|
grid-template-columns 1fr
|
||||||
|
& section
|
||||||
|
display grid
|
||||||
|
grid-template-columns 1fr 2fr
|
||||||
|
grid-gap 2%
|
||||||
|
align-items center
|
||||||
|
back(2)
|
||||||
|
|
||||||
|
& h3
|
||||||
|
grid-column 1/3
|
||||||
|
margin 0
|
||||||
|
text-align center
|
||||||
|
|
||||||
|
& img
|
||||||
|
width: 100%
|
||||||
|
|
||||||
|
|
||||||
|
footer
|
||||||
|
background-color colorText
|
||||||
|
color white
|
||||||
|
@media (max-width: 600px)
|
||||||
|
margin 3vh 0
|
||||||
|
& h4
|
||||||
|
padding:10px
|
||||||
|
|
||||||
|
.big
|
||||||
|
width 50vw
|
||||||
|
@media (max-width: 600px)
|
||||||
|
width 100vw
|
||||||
|
|
||||||
|
section
|
||||||
|
display grid
|
||||||
|
grid-template-columns 1fr 1fr
|
||||||
|
|
||||||
|
@media (max-width: 600px)
|
||||||
|
grid-template-columns 1fr
|
||||||
69
labs/fake-lab5/webpack.config.js
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
|
const FileManagerPlugin = require("filemanager-webpack-plugin");
|
||||||
|
const path = require("path");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const pagesDir = path.join(__dirname, "src", "pages");
|
||||||
|
const pages = fs.readdirSync(pagesDir).filter(file => file.endsWith(".pug"));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
output: {
|
||||||
|
path: path.join(__dirname, "dist"),
|
||||||
|
filename: "index.[contenthash].js",
|
||||||
|
assetModuleFilename: path.join("images", "[name].[contenthash][ext]"),
|
||||||
|
},
|
||||||
|
entry: path.join(__dirname, "src", "index.js"),
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.pug$/,
|
||||||
|
loader: "pug-loader",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(png|jpg|jpeg|gif)$/i,
|
||||||
|
type: "asset/resource",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.svg$/,
|
||||||
|
type: "asset/resource",
|
||||||
|
generator: {
|
||||||
|
filename: path.join("icons", "[name].[contenthash][ext]"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.styl$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: "style-loader",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: "css-loader",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: "stylus-loader",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
...pages.map(
|
||||||
|
(page) =>
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
template: path.join(pagesDir, page),
|
||||||
|
filename: page.replace(".pug", ".html"),
|
||||||
|
})
|
||||||
|
),
|
||||||
|
new FileManagerPlugin({
|
||||||
|
events: {
|
||||||
|
onStart: {
|
||||||
|
delete: ["dist"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
devServer: {
|
||||||
|
watchFiles: path.join(__dirname, "src"),
|
||||||
|
port: 9000,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 37 KiB |
@@ -1,2 +0,0 @@
|
|||||||
h2= 'Hello World!'
|
|
||||||
img(src= require("../images/img1.jpg"))
|
|
||||||
@@ -1,19 +1,5 @@
|
|||||||
extends template
|
head
|
||||||
|
title Lab 5
|
||||||
block nav
|
body
|
||||||
nav
|
p.first-green-letter Текст Текст
|
||||||
+createMenu(dictMenu, 'Главная')
|
p.first-green-letter Второй параграф
|
||||||
|
|
||||||
block content
|
|
||||||
div.images
|
|
||||||
each pict in listImages
|
|
||||||
a(href= "building.html")
|
|
||||||
img(src= require("../images/" + pict))
|
|
||||||
|
|
||||||
article
|
|
||||||
each item in listSections
|
|
||||||
section
|
|
||||||
h3= item.header
|
|
||||||
img(src= require("../images/" + item.image))
|
|
||||||
p= item.text
|
|
||||||
a(href="#") …
|
|
||||||
@@ -1,84 +1,7 @@
|
|||||||
colorText = #6f6d6d
|
text(size, color)
|
||||||
|
&:first-letter
|
||||||
|
font-size size
|
||||||
|
color color
|
||||||
|
|
||||||
back(size)
|
.first-green-letter
|
||||||
background-color #f1f1f1
|
text(2em,green)
|
||||||
box-shadow 4px 5px 10px rgba(0, 0, 0, 0.4)
|
|
||||||
padding: size + "%"
|
|
||||||
margin 0 0 1% 0
|
|
||||||
|
|
||||||
html
|
|
||||||
color colorText
|
|
||||||
|
|
||||||
nav
|
|
||||||
back(0)
|
|
||||||
text-align right
|
|
||||||
|
|
||||||
& a
|
|
||||||
display inline-block
|
|
||||||
padding 1%
|
|
||||||
color colorText
|
|
||||||
text-decoration: none
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
&.active
|
|
||||||
background-color #f87777
|
|
||||||
color #f8f8f8
|
|
||||||
|
|
||||||
div.images
|
|
||||||
display grid
|
|
||||||
grid-template-columns repeat(5, 1fr)
|
|
||||||
grid-gap 0.5%
|
|
||||||
back(1)
|
|
||||||
|
|
||||||
& img
|
|
||||||
width: 100%
|
|
||||||
@media (max-width: 600px)
|
|
||||||
grid-template-rows repeat(5, 1fr)
|
|
||||||
grid-template-columns 1fr
|
|
||||||
& img
|
|
||||||
width 80%
|
|
||||||
margin auto
|
|
||||||
article
|
|
||||||
width 80%
|
|
||||||
margin auto
|
|
||||||
display grid
|
|
||||||
grid-template-columns repeat(3, 1fr)
|
|
||||||
grid-gap 4%
|
|
||||||
@media (max-width: 600px)
|
|
||||||
grid-template-rows repeat(3, 1fr)
|
|
||||||
grid-template-columns 1fr
|
|
||||||
& section
|
|
||||||
display grid
|
|
||||||
grid-template-columns 1fr 2fr
|
|
||||||
grid-gap 2%
|
|
||||||
align-items center
|
|
||||||
back(2)
|
|
||||||
|
|
||||||
& h3
|
|
||||||
grid-column 1/3
|
|
||||||
margin 0
|
|
||||||
text-align center
|
|
||||||
|
|
||||||
& img
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
|
|
||||||
footer
|
|
||||||
background-color colorText
|
|
||||||
color white
|
|
||||||
@media (max-width: 600px)
|
|
||||||
margin 3vh 0
|
|
||||||
& h4
|
|
||||||
padding:10px
|
|
||||||
|
|
||||||
.big
|
|
||||||
width 50vw
|
|
||||||
@media (max-width: 600px)
|
|
||||||
width 100vw
|
|
||||||
|
|
||||||
section
|
|
||||||
display grid
|
|
||||||
grid-template-columns 1fr 1fr
|
|
||||||
|
|
||||||
@media (max-width: 600px)
|
|
||||||
grid-template-columns 1fr
|
|
||||||
19
labs/lab6/lab6.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
function areNumbersEqual(num1,num2,percision){
|
||||||
|
return Math.abs(num1 - num2) < percision;
|
||||||
|
}
|
||||||
|
|
||||||
|
func=(...args) => {
|
||||||
|
const percision=0.1E-2;
|
||||||
|
args.sort();
|
||||||
|
let out = "";
|
||||||
|
let lastElem = null;
|
||||||
|
for (let i = 0; i < args.length-1; i++){
|
||||||
|
if (areNumbersEqual(args[i],args[i+1],percision) && (!areNumbersEqual(args[i],lastElem,percision) || lastElem === null)){
|
||||||
|
lastElem = args[i];
|
||||||
|
out += lastElem+" ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(func(-0.0009111,0,-0.0009111,-0.009111,-0,1.1,1.101,2.0001,2))
|
||||||
69
lectures/lecture3.txt
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
ol#list(type="I")
|
||||||
|
li Препроцессоры HTML
|
||||||
|
ul(type="disc")
|
||||||
|
li.first
|
||||||
|
a(href="#") Haml
|
||||||
|
li Pug
|
||||||
|
li Препроцессоры CSS
|
||||||
|
ul(type="circle")
|
||||||
|
li.first SAAS
|
||||||
|
li Stylus
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- var tag = 'h'
|
||||||
|
- var i = 1
|
||||||
|
|
||||||
|
#{tag+i} Уровень #{i}
|
||||||
|
- i++
|
||||||
|
#{tag+i} Уровень #{i}
|
||||||
|
- i++
|
||||||
|
#{tag+i} Уровень #{i}
|
||||||
|
- i++
|
||||||
|
#{tag+i} Уровень #{i}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- var products ={"Товар":"Цена","ручка":30.5, "карандаш":50, "альбом":156, "тетрадь":21.5, "ластик":10.2}
|
||||||
|
table
|
||||||
|
each name,price in products
|
||||||
|
tr
|
||||||
|
td #{name}
|
||||||
|
td #{price}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
table
|
||||||
|
- for(var i=0;i<10;i++)
|
||||||
|
tr
|
||||||
|
- for(var j=0;j<10;j++)
|
||||||
|
- if((i + j) % 2 == 0)
|
||||||
|
td.white
|
||||||
|
- else
|
||||||
|
td.black
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mixin createList(listType, items, tag)
|
||||||
|
- var dispListType = "ul"
|
||||||
|
- if (listType == "ol")
|
||||||
|
- dispListType = "ol"
|
||||||
|
|
||||||
|
#{dispListType}.list
|
||||||
|
each item in items
|
||||||
|
li
|
||||||
|
#{tag} #{item}
|
||||||
|
|
||||||
|
// Вызов миксина
|
||||||
|
+createList('ul', ['Python', 'JavaScript', 'Java'], 'strong')
|
||||||
|
|
||||||
|
|
||||||
|
size=1%
|
||||||
|
section
|
||||||
|
box-shadow: size size (2*size) rgba(0,0,0,0.5)
|
||||||
|
padding:size*2
|
||||||
|
margin:size*4
|
||||||
17
lectures/temp.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
function updateDict(dict, update) {
|
||||||
|
let key, value = update.entries()[0];
|
||||||
|
dict[key] = value + (key in dict) ? dict[key] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
aboba={"asd":123}
|
||||||
|
upd={"asd":123}
|
||||||
|
upd1={"asd":123}
|
||||||
|
|
||||||
|
updateDict(aboba,upd1)
|
||||||
|
console.log(aboba)
|
||||||
|
updateDict(aboba,upd1)
|
||||||
|
console.log(aboba)
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
// Импорт стилей для главной страницы
|
|
||||||
@import 'index.styl'
|
|
||||||