This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit dab6ea49 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Merge remote-tracking branch 'origin/development' into 115-implement-watchlist-and-stored-searches

parents 0364ec57 8c7142ff
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
Showing
with 1975 additions and 93 deletions
...@@ -5,6 +5,7 @@ src/main/webapp/content/js/popper1.16.0.min.js ...@@ -5,6 +5,7 @@ src/main/webapp/content/js/popper1.16.0.min.js
src/main/docker/ src/main/docker/
src/test/javascript/protractor.conf.js src/test/javascript/protractor.conf.js
src/test/javascript/jest.conf.js src/test/javascript/jest.conf.js
src/main/webapp/content/js/duplicate/**/*
webpack/ webpack/
target/ target/
build/ build/
......
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
jhiTranslate="exercise.details.git"> jhiTranslate="exercise.details.git">
</button> </button>
<!--
<button type="button" <button type="button"
class="btn btn-outline-secondary" class="btn btn-outline-secondary"
style="margin-top: 20px;" style="margin-top: 20px;"
...@@ -103,7 +102,7 @@ ...@@ -103,7 +102,7 @@
(click)="selectREADME()" (click)="selectREADME()"
>README >README
</button> </button>
-->
</div> </div>
<jhi-exercise-metadata <jhi-exercise-metadata
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<div class="modal-dialog modal-xxl modal-dialog-centered"> <div class="modal-dialog modal-xxl modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<!-- Modal Header --> <!-- Modal Header -->
<div class="modal-header">{{filename}} <div class="modal-header">{{filename}} (<a href="{{exercise.originalResult.project.url + '/-/blob/master/'+ filename}}" jhiTranslate="exercise.details.git" target="gitlab">show in GitLab</a>)
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
<!-- Modal body --> <!-- Modal body -->
<div class="modal-body"> <div class="modal-body">
<markdown [data]="content"> <markdown katex emoji ngPreserveWhitespaces [katexOptions]="katexOptions" [data]="getContentAndSetBaseURL()" >
</markdown> </markdown>
</div> </div>
......
...@@ -2,43 +2,94 @@ import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/cor ...@@ -2,43 +2,94 @@ import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/cor
import { Exercise } from 'app/shared/model/exercise.model'; import { Exercise } from 'app/shared/model/exercise.model';
import { ExerciseService } from '../service/exercise.service'; import { ExerciseService } from '../service/exercise.service';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { MarkdownService } from 'ngx-markdown';
import { KatexOptions, errorKatexNotLoaded } from 'ngx-markdown';
declare let katex: any; // Magic
@Component({ @Component({
selector: 'jhi-markdown-viewer', selector: 'jhi-markdown-viewer',
templateUrl: './markDownViewer.component.html', templateUrl: './markDownViewer.component.html',
styleUrls: ['./markDownViewer.component.scss'], styleUrls: ['./markDownViewer.component.scss'],
}) })
export class MarkDownViewerComponent implements OnInit, OnChanges { export class MarkDownViewerComponent implements OnInit, OnChanges {
@Input() exercise: Exercise | undefined; @Input() exercise: Exercise | undefined;
public filename: string; public filename: string;
public content: string; public content: string;
public baseURL: string;
constructor( public katexOptions: KatexOptions = {
private exerciseService: ExerciseService, displayMode: true,
private translate : TranslateService throwOnError: false,
) { errorColor: '#cc0000',
this.filename = 'README.md'; };
this.content = '';
}
constructor(private exerciseService: ExerciseService, private translate: TranslateService, private markdownService: MarkdownService) {
this.filename = 'README.md';
this.content = '';
this.baseURL = '';
}
ngOnInit(): void { ngOnInit(): void {
} this.markdownService.renderKatex = (html: string, options?: KatexOptions) => this.renderKatex(html, options);
}
// eslint-disable-next-line /** helper function for special latex rendering with katex */
ngOnChanges(changes: SimpleChanges): void { private renderKatex(html: string, options?: KatexOptions): string {
if(!this.exercise) return; if (typeof katex === 'undefined' || typeof katex.renderToString === 'undefined') {
this.exerciseService.loadExerciseFile(this.exercise.originalResult.project.project_id, 'README.md').subscribe( throw new Error(errorKatexNotLoaded);
(content) => { this.content = content; this.filename = 'README.md' },
() => {
this.exerciseService.loadExerciseFile(this.exercise!.originalResult.project.project_id, 'exercise.md').subscribe(
(content) => { this.content = content; this.filename = 'exercise.md'; },
() => { this.content = this.translate.instant('exercise.details.readmeNotFound'); this.filename = '' }
)
}
)
} }
const reDollar = /\$([^\s][^$]*?[^\s])\$/gm;
const html2 = html.replace(reDollar, (_, tex) => this.renderSanitizedLatex(tex, options));
const reMath = /<code class="language-math">((.|\n|\r])*?)<\/code>/gi;
return html2.replace(reMath, (_, tex) => this.renderSanitizedLatex(tex, options));
}
/** wrapper to sanitize latex before rendering with latex */
private renderSanitizedLatex(latex: string, options?: KatexOptions): string {
return katex.renderToString(this.replaceConfusingCharKatex(latex), options);
}
/** these html entities must be reverted, in order to work with katex :-( */
private replaceConfusingCharKatex(html: string): string {
return html
.replace(/&amp;/gm, '&')
.replace(/&lt;/gm, '<')
.replace(/&gt;/gm, '>')
.replace(/&#183;/gm, '·')
.replace(/&#10;/gm, '·')
.replace(/( \\ )+/gm, ' \\\\ ');
}
/** This is a hard core workaround, setting the baseUrl before content is rendered */
getContentAndSetBaseURL(): string {
this.markdownService.options.baseUrl = this.baseURL;
return this.content;
}
// eslint-disable-next-line
ngOnChanges(changes: SimpleChanges): void {
if (!this.exercise) return;
this.baseURL = this.exercise.originalResult.project.url + '/-/raw/master/README.md';
this.exerciseService.loadExerciseFile(this.exercise.originalResult.project.project_id, 'README.md').subscribe(
content => {
this.content = content;
this.filename = 'README.md';
},
() => {
this.exerciseService.loadExerciseFile(this.exercise!.originalResult.project.project_id, 'exercise.md').subscribe(
content => {
this.content = content;
this.filename = 'exercise.md';
},
() => {
this.content = this.translate.instant('exercise.details.readmeNotFound');
this.filename = '';
}
);
}
);
}
} }
<div><!-- just a wrapper --> <div><!-- just a wrapper -->
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h1 style="padding: 50px 0px 15px 0px;text-align:center" jhiTranslate="home.title">Browse our popular content</h1> <h1 style="padding: 10px 0px 10px 0px;text-align: center;margin-bottom: 0px;" jhiTranslate="home.title">Browse our popular content</h1>
<!-- <h4 style="margin-bottom: 50px" align="center" jhiTranslate="home.subtitle">An optional subheadline for additional information</h4> --> <!-- <h4 style="margin-bottom: 50px" align="center" jhiTranslate="home.subtitle">An optional subheadline for additional information</h4> -->
<div jhiTranslate="home.teaser" style="width: 80%; margin-left: auto; margin-right: auto;">teaser text </div> <div jhiTranslate="home.teaser" style="width: 100%; margin-left: auto; margin-right: auto; text-align: center;">teaser text </div>
<div [ngSwitch]="isAuthenticated()"> <div [ngSwitch]="isAuthenticated()">
<div class="alert alert-success" *ngSwitchCase="true"> <div class="alert alert-success" *ngSwitchCase="true">
<span id="home-logged-message" *ngIf="account" jhiTranslate="home.logged.message" <span id="home-logged-message" *ngIf="account" jhiTranslate="home.logged.message"
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</div> </div>
</div> </div>
<div><jhi-teaser-content></jhi-teaser-content></div> <div><jhi-teaser-content ></jhi-teaser-content></div>
</div> </div>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<input type="text" class="form-control" queryParamName="searchText" <input type="text" class="form-control" queryParamName="searchText"
placeholder="{{ 'search.filters.search' | translate }}"/> placeholder="{{ 'search.filters.search' | translate }}"/>
<ng-template #helpFulltext> {{ 'search.help.fulltext' | translate}}</ng-template> <ng-template #helpFulltext> {{ 'search.help.fulltext' | translate}}</ng-template>
<fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpFulltext" [icon]="questionIcon"></fa-icon> <fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpFulltext" container="body" [icon]="questionIcon"></fa-icon>
</div> </div>
</form> </form>
</div> </div>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<input type="text" class="form-control" queryParamName="programmingLanguage" [ngbTypeahead]="autoCompleteProgrammingLanguage" <input type="text" class="form-control" queryParamName="programmingLanguage" [ngbTypeahead]="autoCompleteProgrammingLanguage"
placeholder="{{ 'search.filters.programmingLanguage' | translate }}"/> placeholder="{{ 'search.filters.programmingLanguage' | translate }}"/>
<ng-template #helpPL> {{ 'search.help.programmingLanguage' | translate}}</ng-template> <ng-template #helpPL> {{ 'search.help.programmingLanguage' | translate}}</ng-template>
<fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpPL" [icon]="questionIcon"></fa-icon> <fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpPL" container="body" [icon]="questionIcon"></fa-icon>
</div> </div>
</form> </form>
</div> </div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<input type="text" class="form-control" queryParamName="keyword" [ngbTypeahead]="autoCompleteKeyWords" <input type="text" class="form-control" queryParamName="keyword" [ngbTypeahead]="autoCompleteKeyWords"
placeholder="{{ 'search.filters.keywords' | translate }}"/> placeholder="{{ 'search.filters.keywords' | translate }}"/>
<ng-template #helpKeyword> {{ 'search.help.keywords' | translate}}</ng-template> <ng-template #helpKeyword> {{ 'search.help.keywords' | translate}}</ng-template>
<fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpKeyword" [icon]="questionIcon"></fa-icon> <fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpKeyword" container="body" [icon]="questionIcon"></fa-icon>
</div> </div>
</form> </form>
</div> </div>
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<div class="input-group w-100 mt-3"> <div class="input-group w-100 mt-3">
<input type="text" class="form-control" queryParamName="author" name="author" [ngbTypeahead]="autoCompleteContributorCreator" <input type="text" class="form-control" queryParamName="author" name="author" [ngbTypeahead]="autoCompleteContributorCreator"
placeholder="{{ 'search.filters.author' | translate }}"/> placeholder="{{ 'search.filters.author' | translate }}"/>
<ng-template #helpauthorContritbutors> {{ 'search.help.authorContritbutors' | translate}}</ng-template> <ng-template #helpauthorContritbutors data-container="body"> {{ 'search.help.authorContritbutors' | translate}}</ng-template>
<fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpauthorContritbutors" [icon]="questionIcon"></fa-icon> <fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpauthorContritbutors" container="body" [icon]="questionIcon"></fa-icon>
</div> </div>
</form> </form>
</div> </div>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<input type="text" class="form-control" queryParamName="license" <input type="text" class="form-control" queryParamName="license"
placeholder="{{ 'search.filters.license' | translate }}"/> placeholder="{{ 'search.filters.license' | translate }}"/>
<ng-template #helpLicense> {{ 'search.help.license' | translate}}</ng-template> <ng-template #helpLicense> {{ 'search.help.license' | translate}}</ng-template>
<fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpLicense" [icon]="questionIcon"></fa-icon> <fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpLicense" container="body" [icon]="questionIcon"></fa-icon>
</div> </div>
</form> </form>
</div> </div>
......
<table aria-describedby="word clouds"> <table aria-describedby="word clouds" style="width: 100%;">
<colgroup> <colgroup>
<col span="1" style="width: 33%;"> <col span="1" style="width: 33%;">
<col span="1" style="width: 33%;"> <col span="1" style="width: 33%;">
<col span="1" style="width: 33%;"> <col span="1" style="width: 33%;">
</colgroup> </colgroup>
<thead><tr><th style="text-align: center" scope="col">{{'teaser.headings.keywords'|translate}}</th> <thead>
<th style="text-align: center" scope="col">{{'teaser.headings.programmingLanguages'|translate}}</th> <tr>
<th style="text-align: center" scope="col">{{'teaser.headings.contributors'|translate}}</th> <th style="text-align: center" scope="col">{{'teaser.headings.keywords'|translate}}</th>
</tr></thead> <th style="text-align: center" scope="col">{{'teaser.headings.programmingLanguages'|translate}}</th>
<tbody><tr><td> <th style="text-align: center" scope="col">{{'teaser.headings.contributors'|translate}}</th>
<angular-tag-cloud </tr>
[data]="keywordCloudData" </thead>
[config]="options" (clicked)="onKeywordClick($event)"> <tbody>
</angular-tag-cloud> <tr>
</td><td> <td data-th="Keywords">
<angular-tag-cloud <angular-tag-cloud [data]="keywordCloudData" [config]="options" (clicked)="onKeywordClick($event)"
[data]="programmingLanguageCloudData" [width]="options.width" [height]="options.height">
[config]="options" (clicked)="onProgrammingLanguageClick($event)">
</angular-tag-cloud> </angular-tag-cloud>
</td><td> </td>
<angular-tag-cloud <td data-th="Programming languages">
[data]="contributorCloudData" <angular-tag-cloud [data]="programmingLanguageCloudData" [config]="options"
[config]="options" (clicked)="onContributorClick($event)"> (clicked)="onProgrammingLanguageClick($event)" [width]="options.width" [height]="options.height">
</angular-tag-cloud> </angular-tag-cloud>
</td></tr></tbody> </td>
<td data-th="Contributors">
<angular-tag-cloud [data]="contributorCloudData" [config]="options" (clicked)="onContributorClick($event)"
[width]="options.width" [height]="options.height">
</angular-tag-cloud>
</td>
</tr>
</tbody>
</table> </table>
<!-- <!--
<div class="row" style="width: 80%;margin-left: auto; margin-right: auto;"> <div class="row" style="width: 80%;margin-left: auto; margin-right: auto;">
......
@media only screen and (max-width: 768px) {
thead {
display: none;
}
td {
display: block;
}
td:before {
content: attr(data-th);
display: block;
font-weight: bold;
text-align: center;
}
}
@media only screen and (max-width: 1000px) {
thead {
display: none;
}
td {
display: block;
}
td:before {
content: attr(data-th);
display: block;
font-weight: bold;
text-align: center;
}
}
...@@ -2,12 +2,11 @@ import { Component, OnInit } from '@angular/core'; ...@@ -2,12 +2,11 @@ import { Component, OnInit } from '@angular/core';
import { SearchService, AutoCompletionEntry } from 'app/search/service/search-service'; import { SearchService, AutoCompletionEntry } from 'app/search/service/search-service';
import { SearchInputComponent } from 'app/search/search-input/search-input.component'; import { SearchInputComponent } from 'app/search/search-input/search-input.component';
import { CloudData, CloudOptions } from 'angular-tag-cloud-module' import { CloudData, CloudOptions } from 'angular-tag-cloud-module';
import Color from 'ts-color-class'; import Color from 'ts-color-class';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({ @Component({
selector: 'jhi-teaser-content', selector: 'jhi-teaser-content',
templateUrl: './teaserContent.component.html', templateUrl: './teaserContent.component.html',
...@@ -19,25 +18,30 @@ export class TeaserContentComponent implements OnInit { ...@@ -19,25 +18,30 @@ export class TeaserContentComponent implements OnInit {
public contributors: Array<AutoCompletionEntry> = new Array<AutoCompletionEntry>(); public contributors: Array<AutoCompletionEntry> = new Array<AutoCompletionEntry>();
public programmingLanguages: Array<AutoCompletionEntry> = new Array<AutoCompletionEntry>(); public programmingLanguages: Array<AutoCompletionEntry> = new Array<AutoCompletionEntry>();
options: CloudOptions = {
options: CloudOptions = { overflow: false,
overflow: false, zoomOnHover: { scale: 1.2, transitionTime: 0.5 },
zoomOnHover: {scale: 1.2, transitionTime: 0.5} width: 1,
height: 500,
}; };
public keywordCloudData: CloudData[] = []; public keywordCloudData: CloudData[] = [];
public contributorCloudData: CloudData[] = []; public contributorCloudData: CloudData[] = [];
public programmingLanguageCloudData: CloudData[] = []; public programmingLanguageCloudData: CloudData[] = [];
constructor(private searchService: SearchService, private router: Router, private searchInputComponent: SearchInputComponent) {} constructor(private searchService: SearchService, private router: Router, private searchInputComponent: SearchInputComponent) {}
ngOnInit(): void { ngOnInit(): void {
this.searchService.getKeywordsAutoComplete('').subscribe( this.searchService.getKeywordsAutoComplete('').subscribe(
(data: Array<AutoCompletionEntry>) => { (data: Array<AutoCompletionEntry>) => {
this.keywords = data; this.keywords = data;
this.keywordCloudData = []; this.keywordCloudData = [];
this.keywords.forEach(kw => this.keywordCloudData.push( {text: kw.target.toString(), weight: kw.hitCount.valueOf(), color: this.randomColor(new Color('#ffaaee'), new Color('#440000')).getHex()}) ) this.keywords.forEach(kw =>
this.keywordCloudData.push({
text: kw.target.toString(),
weight: kw.hitCount.valueOf(),
color: this.randomColor(new Color('#ffaaee'), new Color('#440000')).getHex(),
})
);
}, },
() => { () => {
alert('Initialization of keywords failed'); alert('Initialization of keywords failed');
...@@ -48,7 +52,13 @@ export class TeaserContentComponent implements OnInit { ...@@ -48,7 +52,13 @@ export class TeaserContentComponent implements OnInit {
(data: Array<AutoCompletionEntry>) => { (data: Array<AutoCompletionEntry>) => {
this.programmingLanguages = data; this.programmingLanguages = data;
this.programmingLanguageCloudData = []; this.programmingLanguageCloudData = [];
this.programmingLanguages.forEach(pl => this.programmingLanguageCloudData.push( {text: pl.target.toString(), weight: pl.hitCount.valueOf(), color: this.randomColor(new Color('#2222ff'), new Color('#004444')).getHex()})) this.programmingLanguages.forEach(pl =>
this.programmingLanguageCloudData.push({
text: pl.target.toString(),
weight: pl.hitCount.valueOf(),
color: this.randomColor(new Color('#2222ff'), new Color('#004444')).getHex(),
})
);
}, },
() => { () => {
alert('Initialization of programming languages failed'); alert('Initialization of programming languages failed');
...@@ -58,25 +68,31 @@ export class TeaserContentComponent implements OnInit { ...@@ -58,25 +68,31 @@ export class TeaserContentComponent implements OnInit {
(data: Array<AutoCompletionEntry>) => { (data: Array<AutoCompletionEntry>) => {
this.contributors = data; this.contributors = data;
this.contributorCloudData = []; this.contributorCloudData = [];
this.contributors.forEach(pl => this.contributorCloudData.push( {text: pl.target.toString(), weight: pl.hitCount.valueOf(), color: this.randomColor(new Color('#aaff44'), new Color('#004400')).getHex()}) ) this.contributors.forEach(pl =>
this.contributorCloudData.push({
text: pl.target.toString(),
weight: pl.hitCount.valueOf(),
color: this.randomColor(new Color('#aaff44'), new Color('#004400')).getHex(),
})
);
}, },
() => { () => {
alert('Initialization of contributors failed'); alert('Initialization of contributors failed');
} }
); );
} }
onKeywordClick(event: CloudData): void { onKeywordClick(event: CloudData): void {
this.clickKeyword(event.text); this.clickKeyword(event.text);
} }
onProgrammingLanguageClick(event: CloudData): void { onProgrammingLanguageClick(event: CloudData): void {
this.clickLanguage(event.text); this.clickLanguage(event.text);
} }
onContributorClick(event: CloudData): void { onContributorClick(event: CloudData): void {
this.clickContributor(event.text); this.clickContributor(event.text);
} }
clickLanguage(programmingLanguage: String): void { clickLanguage(programmingLanguage: String): void {
this.router.navigate(['/search'], { queryParams: { pl: programmingLanguage } }); this.router.navigate(['/search'], { queryParams: { pl: programmingLanguage } });
...@@ -89,14 +105,18 @@ export class TeaserContentComponent implements OnInit { ...@@ -89,14 +105,18 @@ export class TeaserContentComponent implements OnInit {
clickKeyword(keyWord: String): void { clickKeyword(keyWord: String): void {
this.router.navigate(['/search'], { queryParams: { kw: keyWord } }); this.router.navigate(['/search'], { queryParams: { kw: keyWord } });
} }
private randomColor(main: Color, deviation: Color): Color { private randomColor(main: Color, deviation: Color): Color {
const upperBound = new Color(Math.min(main.getRed()+deviation.getRed(), 255),Math.min(main.getGreen()+deviation.getGreen(), 255), Math.min(main.getBlue()+deviation.getBlue(), 255)); const upperBound = new Color(
Math.min(main.getRed() + deviation.getRed(), 255),
Math.min(main.getGreen() + deviation.getGreen(), 255),
Math.min(main.getBlue() + deviation.getBlue(), 255)
);
const target = new Color( const target = new Color(
Math.max(Math.round(upperBound.getRed()-2*deviation.getRed()*Math.random()), 0), Math.max(Math.round(upperBound.getRed() - 2 * deviation.getRed() * Math.random()), 0),
Math.max(Math.round(upperBound.getGreen()-2*deviation.getGreen()*Math.random()), 0), Math.max(Math.round(upperBound.getGreen() - 2 * deviation.getGreen() * Math.random()), 0),
Math.max(Math.round(upperBound.getBlue()-2*deviation.getBlue()*Math.random()), 0)); Math.max(Math.round(upperBound.getBlue() - 2 * deviation.getBlue() * Math.random()), 0)
);
return target; return target;
}
}
} }
This file is a folder for javascript files from other node modules. Typically they are duplicates. If somebody finds a better way to include this scripts: You are welcome.
Things that did not work:
- https://basarat.gitbook.io/typescript/type-system/migrating
- importing js-files via vendor.ts
- importing js-files via angular.json
Other problems
- highlighting with prism is not yet supported :-(
!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",a={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[a,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=())])"),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism);
\ No newline at end of file
Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
\ No newline at end of file
// https://www.json.org/json-en.html
Prism.languages.json = {
'property': {
pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
greedy: true
},
'string': {
pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
greedy: true
},
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
greedy: true
},
'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
'punctuation': /[{}[\],]/,
'operator': /:/,
'boolean': /\b(?:true|false)\b/,
'null': {
pattern: /\bnull\b/,
alias: 'keyword'
}
};
Prism.languages.webmanifest = Prism.languages.json;
Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python;
\ No newline at end of file
Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};
\ No newline at end of file
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
...@@ -11,3 +11,5 @@ eg $input-color: red; ...@@ -11,3 +11,5 @@ eg $input-color: red;
/* jhipster-needle-scss-add-vendor JHipster will add new css style */ /* jhipster-needle-scss-add-vendor JHipster will add new css style */
@import "~@ng-select/ng-select/themes/default.theme.css"; @import "~@ng-select/ng-select/themes/default.theme.css";
@import '~katex/dist/katex.min.css';
{ {
"home": { "home": {
"title": "<img src=\"/content/img/logo-top.png\" alt=\"codeAbility\" width=\"168px\"/>Gemeinsame Bereitstellung von Lernresourcen", "title": "Gemeinsame Bereitstellung von Lernresourcen",
"subtitle": "Finde interessante Inhalte", "subtitle": "Finde interessante Inhalte",
"teaser": "<p>Die CodeAbility Sharing Plattform stellt eine Infrastruktur f&uuml;r den Austausch von Lerninhalten im Bereich Programmierung bereit.</p>\n <p>Die Inhalte umfassen Programierlernaufgaben, Vorlesungsunterlagen und Linksammlungen zu allen Themen des Lernens von Programmiersprachen.</p>", "teaser": "<p>Die CodeAbility Sharing Plattform stellt eine Infrastruktur f&uuml;r den Austausch von Lerninhalten im Bereich Programmierung bereit.</p>\n <p>Die Inhalte umfassen Programierlernaufgaben, Vorlesungsunterlagen und Linksammlungen zu allen Themen des Lernens von Programmiersprachen.</p>",
"logged": { "logged": {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment