diff --git a/README.md b/README.md index fa3ce84..96ababe 100644 --- a/README.md +++ b/README.md @@ -1 +1,51 @@ -# StudyOffline \ No newline at end of file +
+ +--- + +[![GitHub license](https://img.shields.io/github/license/piuswalter/StudyOffline)](https://github.com/piuswalter/StudyOffline/blob/main/LICENSE.md) +![GitHub last commit (branch)](https://img.shields.io/github/last-commit/piuswalter/StudyOffline/development) +[![GitHub issues](https://img.shields.io/github/issues/piuswalter/StudyOffline)](https://github.com/piuswalter/StudyOffline/issues) +![Lines of code](https://img.shields.io/tokei/lines/github/piuswalter/StudyOffline) +![GitHub language count](https://img.shields.io/github/languages/count/piuswalter/StudyOffline) + +StudyOffline is an open source tool that allows you to download the flashcards you have created on StudySmarter and study them offline. + +In addition, StudyOffline is a PWA (Progressive Web App) with which you can also learn your flashcards on any smartphone. + +## ⚒️ Setup your own StudyOffline instance + +[![Deploy with Docker](https://img.shields.io/badge/deploy%20with-docker-0db7ed)]() + +At the moment we do not have published StudyOffline to any container registry yet but you can easily build it by hand. + +The requirement is that Docker is installed. + +To do this, you just need to run + +`docker build https://github.com/piuswalter/StudyOffline.git#main -t studyoffline --no-cache` + +Now your container is built and can be started with + +`docker run -p 3000:3000 --name studyoffline -d studyoffline` + +You can access StudyOffline in your browser on `https://localhost:3000/`. + +## ⚙️ Built with latest technologies + +- [Express](https://expressjs.com/) - The web framework used at the backend +- [Angular](https://angular.io/) - The web framework used at the frontend +- [Node.js](https://nodejs.org/en/) - The backend power +- [IndexedDB](https://developer.mozilla.org/de/docs/Web/API/IndexedDB_API) - The database to store your flashcards + +## 📜 License + +This project is licensed under the AGPL-3.0 License - see the [LICENSE.md](LICENSE.md) file for details diff --git a/backend/src/utils/encoder.service.ts b/backend/src/utils/encoder.service.ts index 0251e67..316cf98 100644 --- a/backend/src/utils/encoder.service.ts +++ b/backend/src/utils/encoder.service.ts @@ -65,7 +65,8 @@ export default class FlashcardEncoder extends Readable { // eslint-disable-next-line class-methods-use-this async encodeFromURL(imageURL: string): Promise- - {{ subject.name }} - -
-Last used: {{ subject.last_used | date }}
-+ + {{ subject.name }} + +
+Last used: {{ subject.last_used | date }}
+feedback works!
-Multiple Choice has not implemented yet
'; + } else { + this.answer = this.domSanitizer.bypassSecurityTrustHtml( + answers[0].text + ); + } } } @@ -56,10 +71,10 @@ export class HomeComponent implements OnInit, AfterViewInit { } switchCard(inc: number): void { - const cl = this.cards.length; + const cl = this.flashcards.length; if (!inc) inc = this.randomNumber(1, cl - 1); - this.index = (this.index + inc) % cl; - if (this.index < 0) this.index = cl - 1; + this.cardIndex = (this.cardIndex + inc) % cl; + if (this.cardIndex < 0) this.cardIndex = cl - 1; this.renderCard(); } } diff --git a/frontend/src/app/home/test.ts b/frontend/src/app/home/test.ts deleted file mode 100755 index 38472e2..0000000 --- a/frontend/src/app/home/test.ts +++ /dev/null @@ -1,136 +0,0 @@ -export const courses = { - 'AM - Klausur': [ - { - question: - 'Allgemeine Lösung: System von Differentialgleichungen
', - answer: - 'z.B.
' - }, - { - question: - 'Formel Eigenwerte
', - answer: - 'Schritte bei der Lösung von Differentialgleichungen
', - answer: - '1. Separation der Variablen
2. Integral
3. Substitution
4. Integrieren
5. Auflösen
Substitutionsregel
', - answer: - '' - }, - { - question: - 'Separation der Variablen (Differentialgleichung)
', - answer: - '' - }, - { - question: - 'Ableitung von
', - answer: - '' - }, - { - question: - 'Kreisfunktion (Einheitskreis)
', - answer: - '' - }, - { - question: - 'Einheitskreismenge und Mittelpunkt
', - answer: - '' - }, - { - question: - 'Definition Transformationssatz
', - answer: - 'Diffeomorphismus: Umkehrfunktion muss existieren.
' - }, - { - question: - 'Rechenregeln Integration Summe
', - answer: - '' - }, - { - question: - 'Wann ist eine Funktion f integrierbar?
', - answer: - '' - }, - { - question: - 'Lesbeguesche äußere Maß
', - answer: - '' - }, - { - question: - 'Was ist die Idee bei der Integration?
', - answer: - 'Überdeckung mit Hüllquadern.
Kettenregel
', - answer: - '' - }, - { - question: - 'Ablauf Backpropagation
', - answer: - '' - }, - { - question: - 'Unterscheidung Extrema
', - answer: - 'Unterscheidung mithilfe der Determinanten der Hauptminoren. Bedingung muss für alle Determinanten gelten!
' - }, - { - question: - 'Definition Hessematrix
', - answer: - '' - }, - { - question: - 'Eigenschaften des Differentials
', - answer: - '' - }, - { - question: - 'Definition: Gradient
', - answer: - '' - }, - { - question: - 'Differenzierbarkeit von Funktionen und das Differential einer Funktion
', - answer: - '' - }, - { - question: - 'Logarithmusgesetze (4 Stück)
', - answer: - '' - }, - { - question: - 'Wechsel der Logarithmusbasis
', - answer: - '' - } - ] -}; diff --git a/frontend/src/app/logout-dialog/logout-dialog.component.html b/frontend/src/app/logout-dialog/logout-dialog.component.html new file mode 100644 index 0000000..fef8ea7 --- /dev/null +++ b/frontend/src/app/logout-dialog/logout-dialog.component.html @@ -0,0 +1,21 @@ ++ This will only sign you out of your account. If you also want to delete your + flashcards to save space, check the box below +
+upload works!
-