diff --git a/h5pp/h5p/h5pmodule.py b/h5pp/h5p/h5pmodule.py index a15da47..a51b463 100644 --- a/h5pp/h5p/h5pmodule.py +++ b/h5pp/h5p/h5pmodule.py @@ -21,6 +21,8 @@ "styles/h5p-core-button.css" ] +OVERRIDE_STYLES = '/static/h5p/styles/h5pp.css' + SCRIPTS = [ "js/jquery.js", "js/h5p.js", @@ -334,6 +336,7 @@ def h5pAddFilesAndSettings(request, embedType): assets = h5pAddCoreAssets() if not 'json_content' in request.GET or not 'contentId' in request.GET: + print("passe") return integration content = h5pGetContent(request) @@ -366,6 +369,10 @@ def h5pAddFilesAndSettings(request, embedType): filesAssets['css'].append( settings.MEDIA_URL + 'h5pp/' + style['path']) integration['loadedCss'] = url + #Override CSS + filesAssets['css'].append(OVERRIDE_STYLES) + integration['loadedCss'] = OVERRIDE_STYLES + elif embedType == 'iframe': h5pAddIframeAssets(request, integration, content['id'], files) @@ -520,6 +527,8 @@ def h5pAddIframeAssets(request, integration, contentId, files): else: integration['contents'][ 'cid-' + contentId]['styles'] = core.getAssetsUrls(files['styles']) + #Override Css + integration['contents']['cid-' + contentId]['styles'].append(OVERRIDE_STYLES) if writable: if not os.path.exists(os.path.join(settings.H5P_PATH, 'files')): diff --git a/h5pp/static/h5p/styles/h5pp.css b/h5pp/static/h5p/styles/h5pp.css index d60e9a5..c781ba3 100644 --- a/h5pp/static/h5p/styles/h5pp.css +++ b/h5pp/static/h5p/styles/h5pp.css @@ -178,7 +178,7 @@ label[for='id_title'] { padding: 0; } -/* bootstrap overide */ +/* bootstrap override */ .btn:focus, .btn:active { outline-color: #25AA2E !important; } @@ -187,4 +187,9 @@ label[for='id_title'] { } .navbar .navbar-brand:hover { color: #3ab242; +} + +/* h5p override */ +.h5p-interactive-video .h5p-video { + height: 500px !important; } \ No newline at end of file diff --git a/h5pp/templates/h5p/content.html b/h5pp/templates/h5p/content.html index 07a1f47..4a77fab 100644 --- a/h5pp/templates/h5p/content.html +++ b/h5pp/templates/h5p/content.html @@ -8,7 +8,6 @@ {% if request.GET.is_iframe %} .content { padding: 0px !important; - max-width: 900px !important; } {% endif %}