File size: 3,316 Bytes
869636a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Spell & Grammar Checker</title>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap" rel="stylesheet">
    <style>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }



        body {

            font-family: 'Poppins', sans-serif;

            background: linear-gradient(to right, #6a11cb, #2575fc);

            color: #fff;

            min-height: 100vh;

            padding: 40px;

        }



        h1 {

            text-align: center;

            font-weight: 700;

            margin-bottom: 40px;

            font-size: 2.5rem;

        }



        form {

            max-width: 700px;

            margin: auto;

            background-color: rgba(255, 255, 255, 0.1);

            backdrop-filter: blur(10px);

            border-radius: 20px;

            padding: 30px;

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

        }



        textarea {

            width: 100%;

            height: 150px;

            padding: 15px;

            border-radius: 10px;

            border: none;

            font-size: 16px;

            resize: none;

            font-family: 'Poppins', sans-serif;

        }



        input[type="submit"] {

            margin-top: 20px;

            background-color: #fff;

            color: #2575fc;

            border: none;

            padding: 12px 30px;

            font-size: 18px;

            font-weight: bold;

            border-radius: 10px;

            cursor: pointer;

            transition: all 0.3s ease;

        }



        input[type="submit"]:hover {

            background-color: #2575fc;

            color: #fff;

            transform: scale(1.05);

        }



        .output {

            max-width: 700px;

            margin: 30px auto;

            background-color: rgba(255, 255, 255, 0.15);

            backdrop-filter: blur(12px);

            padding: 25px;

            border-radius: 20px;

            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);

        }



        .output h3 {

            color: #fff;

            margin-bottom: 10px;

        }



        .output p, .output li {

            font-weight: 300;

            line-height: 1.6;

        }



        .issues li {

            color: #ff9f9f;

        }

    </style>
</head>
<body>
    <h1>Spell & Grammar Checker</h1>
    <form method="POST">
        <textarea name="text" placeholder="Type or paste your text here..."></textarea><br>
        <input type="submit" value="✨ Check Now">
    </form>

    {% if corrected_spelling %}
    <div class="output">
        <h3>βœ… Corrected Spelling:</h3>
        <p>{{ corrected_spelling }}</p>
    </div>
    {% endif %}

    {% if corrected_grammar %}
    <div class="output">
        <h3>πŸ“ Grammar Suggestions:</h3>
        <p>{{ corrected_grammar }}</p>
    </div>
    {% endif %}

    {% if grammar_issues %}
    <div class="output issues">
        <h4>🚨 Issues Found:</h4>
        <ul>
            {% for issue in grammar_issues %}
            <li>{{ issue }}</li>
            {% endfor %}
        </ul>
    </div>
    {% endif %}
</body>
</html>