1
0
mirror of https://github.com/typemill/typemill.git synced 2025-10-17 07:36:24 +02:00

Version 1.1.1 Removed vendor folder

This commit is contained in:
Sebastian
2018-02-26 18:16:29 +01:00
parent 058b3a531b
commit 8cc70d6e6b
710 changed files with 1 additions and 56332 deletions

View File

@@ -1,41 +0,0 @@
<?php
namespace Plugins\Disqus;
use \Typemill\Plugin;
class Disqus extends Plugin
{
protected $settings;
public static function getSubscribedEvents()
{
return [];
}
public function onSettingsLoaded($settings)
{
$this->settings = $settings->getData();
}
public function onTwigLoaded()
{
/* get Twig Instance and add the cookieconsent template-folder to the path */
$twig = $this->getTwig();
$loader = $twig->getLoader();
$loader->addPath(__DIR__ . '/templates');
$analyticSettings = $this->settings['settings']['plugins']['analytics'];
/* fetch the template, render it with twig and add javascript with settings */
if($analyticSettings['tool'] == 'piwik')
{
$this->addInlineJS($twig->fetch('/piwikanalytics.twig', $this->settings));
}
elseif($analyticSettings['tool'] == 'google')
{
$this->addJS('https://www.googletagmanager.com/gtag/js?id=' . $analyticSettings['google_id']);
$this->addInlineJS($twig->fetch('/googleanalytics.twig', $analyticSettings));
}
}
}

View File

@@ -1,15 +0,0 @@
name: Disqus
version: 1.0.0
description: Integrate Disqus into Typemill.
author: Sebastian Schürmanns
homepage: http://typemill.net
licence: MIT
forms:
fields:
shortname:
type: text
label: Disqus-Shortname
help: You can find the shortname in your disqus-settings
placeholder: 'YOUR SHORTNAME'

View File

@@ -1,12 +0,0 @@
var disqus_config = function () {
this.page.url = {{ item.urlAbs }} ;
};
(function() {
var d = document, s = d.createElement('script');
s.src = 'https://{{ settings.plugins.disqus.shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();