Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creat branch dev #2

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
'env': {
'browser': true,
'es2021': true,
'node': true
},
'overrides': [
{
'env': {
'node': true
},
'files': [
'.eslintrc.{js,cjs}'
],
'parserOptions': {
'sourceType': 'script'
}
}
],
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
'rules': {
'indent': [ 'error', 2 ],
'quotes': [ 'error', 'single' ],
'semi': [ 'error', 'always' ],
'comma-spacing': [ 'error', { 'before': false, 'after': true } ],
'object-curly-spacing': [ 'error', 'always' ],
'array-bracket-spacing': [ 'error', 'always' ],
}
};

25 changes: 25 additions & 0 deletions .github/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ESLint

on:
push:
branches:
- dev

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
nekruz03 marked this conversation as resolved.
Show resolved Hide resolved

- name: Install dependencies
run: npm install

- name: Run ESLint
run: npx eslint .
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint

on:
push:
branches:
- dev
jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
nekruz03 marked this conversation as resolved.
Show resolved Hide resolved

- name: Install dependencies
run: npm install

- name: Run ESLint
run: npm run lint

- name: Run Stylelint
run: npm run lint:scss
6 changes: 6 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "stylelint-config-standard",
"rules": {
"block-opening-brace-space-before": ["always", { "except": ["first-nested"] }]
}
}
1 change: 1 addition & 0 deletions README.md
nekruz03 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://stepancar-web-programming.github.io/3-Web/
14 changes: 14 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
console.log('Привет, мир!');
function loadPageContent(content) {
document.getElementById('content').innerHTML = content;
console.log('done');
}
page('/', function () {
loadPageContent('<h2>Education</h2><p>ITMO University</p><p>Bachelors in Computer Science</p>');
});

page('/projects', function () {
loadPageContent('<h2>Projects</h2><div class="project"><p>Coordinate Plane Analysis Web App | Java, Servlets, JSP, JavaScript</p><p>St. Petersburg, Russia</p><p>Sep. 2021 – Present</p><ul><li>Implemented an MVC architecture for point analysis on a coordinate plane using Java Servlets and JavaServer Pages (JSP)</li><li>Developed a dynamic JSP page with a user-friendly web form and real-time results visualization</li><li>Integrated JavaScript for client-side validation and interactive features</li><li>Deployed the application on WildFly, ensuring optimal configuration</li><li>Enabled dynamic updates to the coordinate plane image based on user input</li><li>Utilized HttpSession for tracking and displaying previous analysis results</li></ul></div>');
});

page();
Binary file added img/.DS_Store

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

файл не содержит никакого кода

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалил

Binary file not shown.
Binary file added img/itmo2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/person.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/v_project.mp4
Binary file not shown.
57 changes: 57 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nazirjonov Nekruz - About Me</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>

<header>
<h1>Nazirjonov Nekruz</h1>
</header>

<nav>
<ul>
<li><a href="index.html">About Me</a></li>
<li><a href="projects.html">Projects</a></li>
</ul>
</nav>

<section id="contact-info">
<h2>Contact Information</h2>
<div class="contact-details">
<div class="contact-text">
<p>Phone: +7 911 287 82 03</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давайте сделаем открытие стандартного диалого при нажатии

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавил

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделал

<p>Telegram: <a href="https://t.me/Nekruznnn">@Nekruznnn</a></p>
<p>GitHub: <a href="https://github.com/nekruz03">github.com/nekruz</a></p>
<p>Email: <a href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
<div class="developer-info">
<img src="img/person.png" alt="Nazirjonov Nekruz" id="profile-image">
<p>Java Developer</p>
</div>
</section>
<section id="education">
<h2>Education</h2>
<p>ITMO University - Bachelors in Computer Science</p>
</section>


<section id="skills">
<h2>Technical Skills</h2>
<p>Languages: Java, C/C++, PHP, HTML, CSS, JavaScript, SQL</p>
<p>Developer Tools: IntelliJ-based IDEs, Geany, Sublime Text, Code::Blocks</p>
<p>Operating Systems: Windows, Ubuntu, Mac OS</p>
</section>

<footer>
<p>&copy; 2024 Nazirjonov Nekruz</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предлагаю добавить динамику.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавил

<section id="current-date-time"></section>
<button id="night-mode-toggle" onclick="toggleNightMode()">🌙 Toggle Night Mode</button>
</footer>
<script src="main.js"></script>
</body>
</html>
50 changes: 50 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

document.addEventListener('DOMContentLoaded', function () {
const urlParams = new URLSearchParams(window.location.search);
const page = urlParams.get('page');
if (page === 'projects') {
const projectDetailsSection = document.getElementById('project-details');
projectDetailsSection.innerHTML += '<p>Additional content for projects page.</p>';
}
});
document.addEventListener('DOMContentLoaded', () => {
let nightMode = localStorage.getItem('nightMode');
if (nightMode === null) {
nightMode = 'false';
}



applyNightMode(nightMode);

document.getElementById('night-mode-toggle').addEventListener('click', () => {
nightMode = (nightMode === 'true') ? 'false' : 'true';
applyNightMode(nightMode);
localStorage.setItem('nightMode', nightMode);
});
});

footer = document.getElementsByTagName('footer')[0];


function applyNightMode(nightMode) {
document.body.classList.toggle('night-mode', nightMode === 'true');
Copy link

@stepancar stepancar Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

обратите внимание, что у вас nightMode может содержать только 2 значение true/false, при этом вы работаете со строками, вам приходится постоянно сравнивать строку с 'true', 'false'.
При этом, причина, по которой вам пришлось так сделать - кроется в в том, что высмешиваете в коде то, как данные хранятся и как они обрабатываются.
Попробуйте разделить это явно. Тогда логика у вас сильно упростится.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

упростил

footer.classList.toggle('night-mode-footer', nightMode === 'true');
}


document.addEventListener('DOMContentLoaded', () => {

displayCurrentDateTime();

setInterval(displayCurrentDateTime, 1000);
});

function displayCurrentDateTime() {
const dateTimeContainer = document.getElementById('current-date-time');
const now = new Date();
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', timeZoneName: 'short' };
const formattedDateTime = now.toLocaleDateString('en-US', options);

dateTimeContainer.innerHTML = `<p>${formattedDateTime}</p>`;
}
1 change: 1 addition & 0 deletions node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/cssesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/eslint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/glob

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nanoid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/stylelint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading