File size: 2,961 Bytes
6bcf797
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Emotion Analyzer{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>

<body>
    <!-- Логотип -->
    <div class="logo-container">
        <a href="{{ url_for('welcome') }}" class="logo-link">
            <h2><i class="fas fa-brain"></i> EmotionAnalyzer</h2>
        </a>
    </div>

    <!-- Основной контент -->
    {% with messages = get_flashed_messages(with_categories=true) %}
  {% if messages %}
    <div class="flash-container">
      {% for category, message in messages %}
        <div class="flash flash-{{ category }}">{{ message }}</div>
      {% endfor %}
    </div>
  {% endif %}
{% endwith %}

    <div class="public-container">
        {% block content %}{% endblock %}
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script>

  setTimeout(() => {

    document.querySelectorAll('.flash').forEach(flash => flash.remove());

  }, 4000);

</script>
    {% block scripts %}{% endblock %}
</body>
</html>

<style>

    /*Cтили для окна ошибок*/

    .flash-container {

    position: fixed;

    top: 20px;

    right: 20px;

    z-index: 9999;

    display: flex;

    flex-direction: column;

    gap: 10px;

}



.flash {

    padding: 12px 18px;

    border-radius: 6px;

    color: white;

    font-weight: 500;

    box-shadow: 0 2px 8px rgba(0,0,0,0.2);

    opacity: 0.95;

    animation: slide-in 0.4s ease;

}



.flash-success {

    background-color: #2ecc71;

}



.flash-danger {

    background-color: #e74c3c;

}



@keyframes slide-in {

    from { transform: translateX(100%); opacity: 0; }

    to   { transform: translateX(0);   opacity: 1; }

}





    /* Стили для логотипа */

    .logo-container {

        padding-top: 20px;

        padding-left: 20px;

        background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));

    }



    .logo-link {

        text-decoration: none !important;

    }



    .logo-link h2 {

        color: #fff; /* Темно-синий цвет */

        font-size: 2rem;

        margin: 0;

        transition: color 0.3s ease;

    }



    .logo-link:hover h2 {

        color: #4a4ae8; /* Цвет при наведении */

    }



    .fa-brain {

        color: inherit; /* Наследует цвет от родителя */

        margin-right: 10px;

    }







    @media (max-width: 768px) {

        .logo-link h2 {

            font-size: 1.5rem;

        }



        .public-container {

            padding: 20px;

        }

    }

</style>