5 Commits

Author SHA1 Message Date
chellmann
b547624cb6 Merge c7a6fbc15f into 8ba8cf70bd 2024-07-02 18:12:36 +02:00
chellmann
c7a6fbc15f Merge branch 'develop' into patch-1 2024-07-02 18:12:32 +02:00
chellmann
98c37298aa Update languages.yaml 2024-07-02 18:10:07 +02:00
chellmann
b419964bc7 Update podcast.php 2024-06-25 20:51:54 +02:00
chellmann
7cb127ec79 Update blueprints.yaml 2024-06-25 20:50:40 +02:00
3 changed files with 21 additions and 1 deletions

View File

@@ -29,3 +29,14 @@ form:
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
autoIncludeAssets:
type: toggle
label: Always Include Assets
help: "If false you will need to include the CSS and JS manually in your Twig templates when required"
highlight: 1
default: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool

View File

@@ -20,7 +20,10 @@ en:
DOWNLOAD: Download Audio
WARNING: Your browser does not support the audio tag.
EMPTY: No content available.
PUBLISHED: Published
ADMIN:
SETTINGS:
AUTO_INLCUDE_ASSETS: "If false you will need to include the CSS and JS manually in your Twig templates when required"
CHANNEL:
CONTENT:
TAB_TITLE: Podcast Page Content
@@ -149,7 +152,10 @@ de:
DOWNLOAD: Audio herunterladen
WARNING: Ihr Browser unterstützt das Audiowiedergabe-Tag nicht.
EMPTY: Kein Inhalt verfügbar.
PUBLISHED: Veröffentlicht
ADMIN:
SETTINGS:
AUTO_INLCUDE_ASSETS: Wenn deaktiviert bitte CSS von Hand in die Twig-Templates einbinden falls nötig
CHANNEL:
CONTENT:
TAB_TITLE: Inhalt der Podcast-Seite

View File

@@ -60,6 +60,7 @@ class PodcastPlugin extends Plugin
]);
}
/**
* Add blueprint directory to page templates.
*/
@@ -84,7 +85,9 @@ class PodcastPlugin extends Plugin
*/
public function onTwigSiteVariables(): void
{
$this->grav['assets']->addCss('plugin://' . $this->name . '/assets/css/podcast.css');
if ($this->config()['autoIncludeAssets']) {
$this->grav['assets']->addCss('plugin://' . $this->name . '/assets/css/podcast.css');
}
}
/**