Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
jeremystucki committed Feb 9, 2024
1 parent 9d69f1e commit 91e9605
Showing 4 changed files with 63 additions and 76 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="m-4">
<div>
<Navigation />
<router-view />
<PageFooter />
83 changes: 35 additions & 48 deletions src/components/Focus.vue
Original file line number Diff line number Diff line change
@@ -1,54 +1,41 @@
<template>
<div class="columns is-multiline">
<button
class="button is-fullwidth button-focus"
:aria-expanded="isOpen"
:class="{ 'is-success': !filteredModuleNames.length }"
type="button"
@click="toggleFocus()"
<div
class="hover:cursor-pointer border border-gray-300 hover:border-gray-600 flex items-center space-x-2 p-2"
:aria-expanded="isOpen"
:class="{ 'bg-green-200': !filteredModuleNames.length }"
type="button"
@click="toggleFocus()"
>
<span class="grow">{{ name }}</span>
<span
v-if="filteredModuleNames.length"
class="shrink-0 text-xs py-1 px-2 rounded bg-blue-50"
>
<div class="focus-main">
<span>{{ name }}</span>
<span
v-if="filteredModuleNames.length"
class="tag is-info is-light"
>
{{ filteredModuleNames.length }} Module werden noch benötigt
</span>
<span
v-if="!filteredModuleNames.length"
class="tag is-success is-light"
>
Vertiefung geplant
</span>
</div>
<div class="focus-aside">
<span class="icon">
<font-awesome-icon :icon="isOpen ? openIconClass : closedIconClass" />
</span>
</div>
</button>
<div
v-show="isOpen"
class="column is-full column-focus"
{{ filteredModuleNames.length }} Module werden noch benötigt
</span>
<span
v-if="!filteredModuleNames.length"
class="shrink-0 text-xs py-1 px-2 rounded bg-green-100"
>
<div class="box box-focus">
<p v-if="!filteredModuleNames.length">
Alle benötigten Module sind bestanden/geplant.
</p>
<p v-if="filteredModuleNames.length">
Für die Vertiefung müssen folgende Module noch geplant werden:
</p>
<ul class="focus-missing-modules-list">
<li
v-for="filteredModuleName in filteredModuleNames"
:key="filteredModuleName"
>
{{ filteredModuleName }}
</li>
</ul>
</div>
</div>
Vertiefung geplant
</span>
<font-awesome-icon :icon="isOpen ? openIconClass : closedIconClass" />
</div>
<div v-show="isOpen" class="p-4 shadow-lg mb-4">

Check warning on line 24 in src/components/Focus.vue

GitHub Actions / Build

'class' should be on a new line
<p v-if="!filteredModuleNames.length">
Alle benötigten Module sind bestanden/geplant.
</p>
<p v-if="filteredModuleNames.length">
Für die Vertiefung müssen folgende Module noch geplant werden:
</p>
<ul class="list-disc list-inside text-sm mt-1">
<li
v-for="filteredModuleName in filteredModuleNames"
:key="filteredModuleName"
>
{{ filteredModuleName }}
</li>
</ul>
</div>
</template>

43 changes: 22 additions & 21 deletions src/components/Navigation.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<template>
<nav
class="flex"
class="flex sm:mx-4 items-center flex-wrap sm:flex-nowrap"
role="navigation"
aria-label="main navigation"
>
<div>
<!-- <router-link to="/">-->
<!-- <img-->
<!-- src="../assets/logo.png"-->
<!-- class="logo-nav"-->
<!-- alt="Home"-->
<!-- >-->
<!-- </router-link>-->
<div class="flex items-center justify-between sm:justify-normal w-full sm:w-auto">
<router-link to="/">
<img
src="../assets/logo.png"
class="size-24 pb-4 object-contain"
alt="Home"
>
</router-link>
<button
class="sm:hidden"
class="sm:hidden p-4"
tabindex="0"
aria-label="menu"
aria-expanded="false"
@@ -22,28 +22,29 @@
<font-awesome-icon
:icon="['fa', 'bars']"
size="2x"
class="peer"
/>
</button>
</div>
<div
class="w-full sm:inline-flex space-x-2"
class="w-full sm:inline-flex basis-full"
:class="{ 'hidden': !isBurgerActive }"
>
<template
v-for="category in categories"
:key="category.title"
>
<div>
<button
class="py-6 px-4 peer hover:cursor-auto"
v-text="category.title"
/>
<font-awesome-icon
:icon="['fa', 'chevron-down']"
class="peer"
/>
<div class="hidden rounded shadow-2xl bg-white flex-col peer-hover:flex hover:flex fixed z-10">
<div class="px-2 sm:px-4 pt-4 pb-2 sm:py-6 peer">
<button
class="hover:cursor-auto mr-2 text-lg font-bold sm:text-md sm:font-normal"
v-text="category.title"
/>
<font-awesome-icon
:icon="['fa', 'chevron-down']"
class="peer invisible sm:visible"
/>
</div>
<div class="sm:hidden peer-hover:flex hover:flex flex rounded sm:shadow-2xl bg-white flex-col sm:fixed z-10">
<a
class="p-2 hover:bg-gray-100 rounded"
v-for="plan in category.plans"

Check warning on line 50 in src/components/Navigation.vue

GitHub Actions / Build

Attribute "v-for" should go before "class"
11 changes: 5 additions & 6 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
</Transition>
</div>
</div>
<div class="flex space-x-2 overflow-auto before:m-auto after:m-auto">
<div class="flex space-x-2 overflow-auto before:m-auto after:m-auto p-4">
<SemesterComponent
v-for="semester in semesters"
:key="semester.number"
@@ -58,7 +58,7 @@
</button>
</div>
<div class="my-16 grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 lg:justify-items-center gap-y-16">
<article>
<article class="mx-4">
<span class="text-xl">
Übersicht der ECTS Punkte
</span>
@@ -113,15 +113,14 @@
</tbody>
</table>
</article>
<article>
<article class="mx-4">
<h2 class="text-xl">
Vertiefungen
</h2>
<div class="columns is-multiline mt-5">
<div class="mt-5">
<div
v-for="focus in mappedFocuses"
:key="focus.name"
class="column is-full"
>
<FocusComponent
:name="focus.name"
@@ -132,7 +131,7 @@
</div>
</article>
<img
class="lg:col-span-2 2xl:col-span-1"
class="lg:col-span-2 2xl:col-span-1 justify-self-center"
src="../assets/this_is_fine_winter.jpg"
alt="Alternative version of the well known 'this is fine' meme with a dog in a room full of snow"
>

0 comments on commit 91e9605

Please sign in to comment.