Converted markdown found in README content to HTML for better presentation on the UI.
parent
d082ff2565
commit
1a185aeced
|
@ -8,6 +8,7 @@ flask-restful = "*"
|
|||
requests = "*"
|
||||
certifi = "*"
|
||||
uwsgi = "*"
|
||||
markdown = "*"
|
||||
|
||||
[dev-packages]
|
||||
selene-util = {path = "./../../../../shared"}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "d12b51224da23bf14f002d27627a8fcf97f4de1118f5839731077287e5b55211"
|
||||
"sha256": "8c9351986431fa789a69d1f02ece7c9764b3fa019627057e57bad980b85177f9"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -80,6 +80,14 @@
|
|||
],
|
||||
"version": "==2.10"
|
||||
},
|
||||
"markdown": {
|
||||
"hashes": [
|
||||
"sha256:9ba587db9daee7ec761cfc656272be6aabe2ed300fece21208e4aab2e457bc8f",
|
||||
"sha256:a856869c7ff079ad84a3e19cd87a64998350c2b94e9e08e44270faef33400f81"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.6.11"
|
||||
},
|
||||
"markupsafe": {
|
||||
"hashes": [
|
||||
"sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""View to return detailed information about a skill"""
|
||||
from markdown import markdown
|
||||
import requests as service_request
|
||||
|
||||
from selene_util.api import SeleneBaseView, AuthorizationError
|
||||
|
@ -26,3 +27,11 @@ class SkillDetailView(SeleneBaseView):
|
|||
self.base_url + '/skill/id/' + self.skill_id
|
||||
)
|
||||
self.response_data = self.service_response.json()
|
||||
self.response_data['description'] = markdown(
|
||||
self.response_data['description'],
|
||||
output_format='html5'
|
||||
)
|
||||
self.response_data['summary'] = markdown(
|
||||
self.response_data['summary'],
|
||||
output_format='html5'
|
||||
)
|
|
@ -2,6 +2,7 @@
|
|||
from collections import defaultdict
|
||||
|
||||
from flask import request
|
||||
from markdown import markdown
|
||||
import requests as service_request
|
||||
|
||||
from selene_util.api import SeleneBaseView, AuthorizationError
|
||||
|
@ -47,7 +48,7 @@ class SkillSummaryView(SeleneBaseView):
|
|||
icon_image=skill.get('icon_image'),
|
||||
id=skill['id'],
|
||||
title=skill['title'],
|
||||
summary=skill['summary'],
|
||||
summary=markdown(skill['summary'], output_format='html5'),
|
||||
triggers=skill['triggers']
|
||||
)
|
||||
search_term_match = (
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</fa>
|
||||
{{skill.title}}
|
||||
</h1>
|
||||
<div class="mat-subheading-1">{{skill.summary}}</div>
|
||||
<div class="mat-subheading-1" [innerHTML]="skill.summary"></div>
|
||||
</div>
|
||||
<div class="skill-detail-header-right">
|
||||
<button mat-button>INSTALL</button>
|
||||
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
<div class="skill-detail-section">
|
||||
<div class="mat-subheading-1">DESCRIPTION</div>
|
||||
<div class="mat-body-1">{{skill.description}}</div>
|
||||
<div class="mat-body-1" [innerHTML]="skill.description"></div>
|
||||
</div>
|
||||
<div class="skill-detail-section">
|
||||
<div class="mat-subheading-1">CREDITS</div>
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
{{skill.triggers[0]}}
|
||||
</button>
|
||||
</mat-card-subtitle>
|
||||
<mat-card-content>
|
||||
{{skill.summary ? skill.summary : ' '}}
|
||||
</mat-card-content>
|
||||
<mat-card-content *ngIf="skill.summary" [innerHTML]="skill.summary"></mat-card-content>
|
||||
<mat-card-content *ngIf="!skill.summary">' '</mat-card-content>
|
||||
</div>
|
||||
<mat-card-actions>
|
||||
<button mat-button (click)="install_skill(skill)">INSTALL</button>
|
||||
|
|
Loading…
Reference in New Issue