Merge branch 'feature/bugfix-and-cleanup' into 'dev'

bugfix and cleanup

See merge request eb2342s/swe-b1-a!30
This commit was merged in pull request #90.
This commit is contained in:
Matthias Grief
2025-01-06 16:30:48 +01:00
5 changed files with 23 additions and 8 deletions

View File

@@ -273,7 +273,6 @@ body {
padding: 2rem;
margin-bottom: 2rem;
/*box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);*/
box-shadow: 2px 4px 6px 2px rgba(0, 0, 0, 0.1);
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@@ -337,7 +336,6 @@ body {
padding: 2rem;
margin-bottom: 2rem;
/*box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);*/
box-shadow: 2px 4px 6px 2px rgba(0, 0, 0, 0.1);
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

View File

@@ -45,7 +45,7 @@ $topics = $subjectData->topics;
<nav class="sidebar bg-[<?php echo($subjectData->color); ?>] pt-24">
<div class="sidebar-header">
<i class="fas fa-graduation-cap"></i>
<i class="fas <?php echo($subjectData->icon); ?>"></i>
<h2><?php echo($subjectData->displayName); ?></h2>
</div>

View File

@@ -159,7 +159,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Icon</label>
<div class="mt-2 h-[180px] overflow-y-auto grid md:grid-cols-5 lg:grid-cols-8 grid-cols-8 gap-2 p-1">
<div class="mt-2 h-[180px] overflow-y-auto grid sm:grid-cols-5 lg:grid-cols-8 grid-cols-4 gap-2 p-1">
<?php
$icons = [
"fa-book", "fa-calculator", "fa-flask", "fa-atom", "fa-globe-europe", "fa-palette",

View File

@@ -76,7 +76,7 @@ if (!isset($topicData)) {
<!-- Left Sidebar -->
<nav class="sidebar bg-[<?php echo($subjectData->color); ?>] pt-24">
<div class="sidebar-header">
<i class="fas fa-graduation-cap"></i>
<i class="fas <?php echo($subjectData->icon); ?>"></i>
<h2><?php echo($subjectData->displayName); ?></h2>
</div>
<a href="index.php" class="nav-link">
@@ -86,7 +86,7 @@ if (!isset($topicData)) {
<i class="fas fa-book"></i> <?php echo($subjectData->displayName); ?> Übersicht
</a>
<a href="#" class="nav-link active">
<i class="fas fa-calculator"></i> <?php echo($topicData->displayName); ?>
<i class="fas <?php echo($topicData->icon); ?>"></i> <?php echo($topicData->displayName); ?>
</a>
</nav>
@@ -163,7 +163,7 @@ if (!isset($topicData)) {
foreach ($tasks as $taskIndex => $task) {
$taskId = $taskIndex;
?>
<div class="task-container"
<div class="task-container border-2 border-[var(--primary-color)] p-4 rounded-xl"
data-task-id="<?php echo htmlspecialchars($taskId, ENT_QUOTES, 'UTF-8'); ?>">
<p>
<?php echo '<b>Aufgabe ' . ($taskIndex + 1) . ':</b> ' . htmlspecialchars($task->getText(), ENT_QUOTES, 'UTF-8'); ?>

View File

@@ -372,7 +372,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
</div>
<div>
<label for="formulas" class="block text-sm font-medium text-gray-700 mb-2">Formeln</label>
<label for="formulas" class="block text-sm font-medium text-gray-700 mb-2">Aufgaben</label>
<input type="text"
name="formulas"
id="formulas"
@@ -425,7 +425,24 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
</form>
</div>
<script>
function renderFormulas() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "\\begin{equation}", right: "\\end{equation}", display: true},
{left: "\\begin{array}", right: "\\end{array}", display: true},
{left: "\\begin{align}", right: "\\end{align}", display: true},
{left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
{left: "\\begin{gather}", right: "\\end{gather}", display: true},
{left: "\\begin{CD}", right: "\\end{CD}", display: true},
{left: "\\[", right: "\\]", display: true}
],
throwOnError : false
});
}
renderFormulas();
const quill = new Quill('#quillEditor', {
modules: {