Решены конфликты при слиянии main
This commit is contained in:
commit
2c2e2a2f5b
7 changed files with 76 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
build: . # Путь к Dockerfile (в текущей директории)
|
build: . # Путь к Dockerfile (в текущей директории)
|
||||||
|
<<<<<<< HEAD
|
||||||
container_name: workshop
|
container_name: workshop
|
||||||
# ports:
|
# ports:
|
||||||
# - "80:5000" # Проброс портов
|
# - "80:5000" # Проброс портов
|
||||||
|
|
@ -19,3 +20,16 @@ services:
|
||||||
networks:
|
networks:
|
||||||
all:
|
all:
|
||||||
external: true
|
external: true
|
||||||
|
=======
|
||||||
|
ports:
|
||||||
|
- "80:5000" # Проброс портов
|
||||||
|
volumes:
|
||||||
|
- nas-share:/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
nas-share:
|
||||||
|
driver_opts:
|
||||||
|
type: cifs
|
||||||
|
o: "username=Shaman,password="
|
||||||
|
device: "//192.168.31.3/share/public/complete/workshop"
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
|
|
|
||||||
BIN
frontend/assets/steam-120.ico
Normal file
BIN
frontend/assets/steam-120.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
BIN
frontend/assets/steam-32.ico
Normal file
BIN
frontend/assets/steam-32.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -6,7 +6,11 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>workshop</title>
|
<title>workshop</title>
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
|
||||||
|
<<<<<<< HEAD
|
||||||
<link rel="icon" href="https://csgoworkshop.ru/favicon.ico" type="image/x-icon">
|
<link rel="icon" href="https://csgoworkshop.ru/favicon.ico" type="image/x-icon">
|
||||||
|
=======
|
||||||
|
<link rel="icon" href="{{ url_for('static', filename='assets/steam-120.ico') }}" type="image/x-icon">
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>workshop</title>
|
<title>workshop</title>
|
||||||
|
<<<<<<< HEAD
|
||||||
<link rel="icon" href="https://csgoworkshop.ru/favicon.ico" type="image/x-icon">
|
<link rel="icon" href="https://csgoworkshop.ru/favicon.ico" type="image/x-icon">
|
||||||
|
=======
|
||||||
|
<link rel="icon" href="{{ url_for('static', filename='assets/steam-120.ico') }}" type="image/x-icon">
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='workshop.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='workshop.css') }}">
|
||||||
<script src="{{ url_for('static', filename='workshop.js') }}" defer></script>
|
<script src="{{ url_for('static', filename='workshop.js') }}" defer></script>
|
||||||
|
|
||||||
|
|
@ -28,6 +32,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<<<<<<< HEAD
|
||||||
<div class="top-bar">
|
<div class="top-bar">
|
||||||
<div class="left-text">
|
<div class="left-text">
|
||||||
<p>Сделал: ©️𝙎𝙃∆𝙈∆𝙉©️</p>
|
<p>Сделал: ©️𝙎𝙃∆𝙈∆𝙉©️</p>
|
||||||
|
|
@ -35,7 +40,21 @@
|
||||||
</div>
|
</div>
|
||||||
<h1 class="center-text">CS:GO Workshop</h1>
|
<h1 class="center-text">CS:GO Workshop</h1>
|
||||||
<a href="https://cloud.s.shsr.ru/apps/forms/s/xr8NyqdpsodwcNnRBSrMzJ4N" class="contact-button" target="_blank">Связаться</a>
|
<a href="https://cloud.s.shsr.ru/apps/forms/s/xr8NyqdpsodwcNnRBSrMzJ4N" class="contact-button" target="_blank">Связаться</a>
|
||||||
|
=======
|
||||||
|
<div class="top-bar">
|
||||||
|
<div class="left-text">
|
||||||
|
<p>Сделал: ©️𝙎𝙃∆𝙈∆𝙉©️</p>
|
||||||
|
<p>Неофициальный сайт<br>с картами для CS:GO<br>из мастерской Steam</p>
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
</div>
|
</div>
|
||||||
|
<h1 class="center-text">Добро пожаловать в Workshop</h1>
|
||||||
|
<a href="https://cloud.s.shsr.ru/apps/forms/s/xr8NyqdpsodwcNnRBSrMzJ4N" class="contact-button" target="_blank">Связаться</a> <!-- Добавлен target="_blank" -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<div class="cards-container">
|
<div class="cards-container">
|
||||||
|
|
|
||||||
34
main.py
34
main.py
|
|
@ -5,7 +5,10 @@ import aiosqlite
|
||||||
from quart import Quart, render_template, request, send_from_directory, Response
|
from quart import Quart, render_template, request, send_from_directory, Response
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from babel.dates import format_datetime
|
from babel.dates import format_datetime
|
||||||
|
<<<<<<< HEAD
|
||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
|
=======
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -49,10 +52,15 @@ async def get_maps(page=1, per_page=30):
|
||||||
return maps
|
return maps
|
||||||
|
|
||||||
def get_image_path(filepath):
|
def get_image_path(filepath):
|
||||||
|
<<<<<<< HEAD
|
||||||
print(f"Получение пути изображения для файла: {filepath}")
|
print(f"Получение пути изображения для файла: {filepath}")
|
||||||
image_path = os.path.join(DATA, filepath)
|
image_path = os.path.join(DATA, filepath)
|
||||||
if not os.path.exists(image_path):
|
if not os.path.exists(image_path):
|
||||||
print("Изображение не найдено, возвращаем дефолтное.")
|
print("Изображение не найдено, возвращаем дефолтное.")
|
||||||
|
=======
|
||||||
|
image_path = os.path.join(DATA, filepath)
|
||||||
|
if not os.path.exists(image_path):
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
return "/images/image.jpg"
|
return "/images/image.jpg"
|
||||||
return f"/images/{filepath.split('/')[0]}/{filepath.split('/')[1]}/{filepath.split('/')[1]}.jpg"
|
return f"/images/{filepath.split('/')[0]}/{filepath.split('/')[1]}/{filepath.split('/')[1]}.jpg"
|
||||||
|
|
||||||
|
|
@ -64,26 +72,41 @@ def get_star_image(stars):
|
||||||
|
|
||||||
@app.route('/images/<path:filename>')
|
@app.route('/images/<path:filename>')
|
||||||
async def serve_image(filename):
|
async def serve_image(filename):
|
||||||
|
<<<<<<< HEAD
|
||||||
print(f"Запрос изображения с именем: {filename}")
|
print(f"Запрос изображения с именем: {filename}")
|
||||||
image_path = os.path.join(DATA, filename)
|
image_path = os.path.join(DATA, filename)
|
||||||
if os.path.exists(image_path):
|
if os.path.exists(image_path):
|
||||||
print(f"Изображение {filename} найдено и отправляется.")
|
print(f"Изображение {filename} найдено и отправляется.")
|
||||||
|
=======
|
||||||
|
image_path = os.path.join(DATA, filename)
|
||||||
|
if os.path.exists(image_path):
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
return await send_from_directory(DATA, filename)
|
return await send_from_directory(DATA, filename)
|
||||||
else:
|
else:
|
||||||
default_image_path = os.path.join(DATA, 'image.jpg')
|
default_image_path = os.path.join(DATA, 'image.jpg')
|
||||||
if os.path.exists(default_image_path):
|
if os.path.exists(default_image_path):
|
||||||
|
<<<<<<< HEAD
|
||||||
print("Изображение не найдено, отправляем дефолтное.")
|
print("Изображение не найдено, отправляем дефолтное.")
|
||||||
return await send_from_directory(DATA, 'image.jpg')
|
return await send_from_directory(DATA, 'image.jpg')
|
||||||
print("Не найдено ни одного изображения.")
|
print("Не найдено ни одного изображения.")
|
||||||
|
=======
|
||||||
|
return await send_from_directory(DATA, 'image.jpg')
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
return "Default image not found", 404
|
return "Default image not found", 404
|
||||||
|
|
||||||
@app.route('/stars/<filename>')
|
@app.route('/stars/<filename>')
|
||||||
async def serve_star_image(filename):
|
async def serve_star_image(filename):
|
||||||
|
<<<<<<< HEAD
|
||||||
print(f"Запрос изображения звезды: {filename}")
|
print(f"Запрос изображения звезды: {filename}")
|
||||||
stars = os.path.join(DATA, 'stars')
|
stars = os.path.join(DATA, 'stars')
|
||||||
star_path = os.path.join(stars, filename)
|
star_path = os.path.join(stars, filename)
|
||||||
if os.path.exists(star_path):
|
if os.path.exists(star_path):
|
||||||
print(f"Звезда {filename} найдена и отправляется.")
|
print(f"Звезда {filename} найдена и отправляется.")
|
||||||
|
=======
|
||||||
|
stars = os.path.join(DATA, 'stars')
|
||||||
|
star_path = os.path.join(stars, filename)
|
||||||
|
if os.path.exists(star_path):
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
return await send_from_directory(stars, filename)
|
return await send_from_directory(stars, filename)
|
||||||
else:
|
else:
|
||||||
print("Изображение звезды не найдено.")
|
print("Изображение звезды не найдено.")
|
||||||
|
|
@ -123,7 +146,10 @@ async def download_bsp():
|
||||||
return "No .bsp file found in the same directory", 404
|
return "No .bsp file found in the same directory", 404
|
||||||
|
|
||||||
file_path = os.path.join(DATA, image_folder, bsp_filename)
|
file_path = os.path.join(DATA, image_folder, bsp_filename)
|
||||||
|
<<<<<<< HEAD
|
||||||
print(f"Найден файл для скачивания: {file_path}")
|
print(f"Найден файл для скачивания: {file_path}")
|
||||||
|
=======
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
|
|
||||||
SPEED_LIMIT = 60 * 1024 * 1024 // 8
|
SPEED_LIMIT = 60 * 1024 * 1024 // 8
|
||||||
|
|
||||||
|
|
@ -366,6 +392,7 @@ async def robots_txt():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
<<<<<<< HEAD
|
||||||
print("Запуск приложения...")
|
print("Запуск приложения...")
|
||||||
import hypercorn.asyncio
|
import hypercorn.asyncio
|
||||||
from hypercorn.config import Config
|
from hypercorn.config import Config
|
||||||
|
|
@ -373,3 +400,10 @@ if __name__ == '__main__':
|
||||||
config = Config()
|
config = Config()
|
||||||
config.bind = ["0.0.0.0:5000"]
|
config.bind = ["0.0.0.0:5000"]
|
||||||
hypercorn.asyncio.run(app, config)
|
hypercorn.asyncio.run(app, config)
|
||||||
|
=======
|
||||||
|
import hypercorn.asyncio
|
||||||
|
from hypercorn.config import Config
|
||||||
|
config = Config()
|
||||||
|
config.bind = ["0.0.0.0:5000"]
|
||||||
|
hypercorn.asyncio.run(app, config)
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
aiosqlite~=0.20.0
|
aiosqlite~=0.20.0
|
||||||
Hypercorn~=0.17.3
|
Hypercorn~=0.17.3
|
||||||
Quart~=0.19.6
|
Quart~=0.19.6
|
||||||
|
<<<<<<< HEAD
|
||||||
babel~=2.16.0
|
babel~=2.16.0
|
||||||
|
=======
|
||||||
|
babel~=2.16.0
|
||||||
|
>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue