Skip to content

Instantly share code, notes, and snippets.

@ThiefMaster
Last active January 17, 2023 16:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThiefMaster/8d5bc6791d8654b31f0ec3a5960693ad to your computer and use it in GitHub Desktop.
Save ThiefMaster/8d5bc6791d8654b31f0ec3a5960693ad to your computer and use it in GitHub Desktop.
the `***` in the filenames are placeholders for `/` (which are not possible in gists)
from __future__ import unicode_literals
import os
from flask.helpers import get_root_path
from indico.core import signals
from indico.core.plugins import IndicoPlugin, IndicoPluginBlueprint
class AwesomeThemesPlugin(IndicoPlugin):
def init(self):
super(AwesomeThemesPlugin, self).init()
self.connect(signals.plugin.get_event_themes_files, self._get_themes_yaml)
def get_blueprints(self):
return IndicoPluginBlueprint(self.name, __name__)
def _get_themes_yaml(self, sender, **kwargs):
return os.path.join(get_root_path('indico_awesome_themes'), 'themes.yaml')
definitions:
foo:
<<: *standard
stylesheet: foo.scss
title: Foo Theme
from __future__ import unicode_literals
from setuptools import setup, find_packages
setup(
name='indico_awesome_themes',
version='0.1.0.dev0',
packages=find_packages(),
zip_safe=False,
include_package_data=True,
install_requires=['indico>=1.9.10'],
entry_points={'indico.plugins': {'awesome_themes = indico_awesome_themes.plugin:AwesomeThemesPlugin'}}
)
@import 'base/palette';
$lcc-dark-red: #660922;
$header-bg-color: $light-gray;
$header-icon-color: $lcc-dark-red;
$header-text-color: $black;
@import 'themes/indico';
@include header-logo('/static/plugins/awesome_themes/awesome-logo.png', 50px 35px);
@macagua
Copy link

macagua commented Jan 17, 2023

@ThiefMaster I create a Awesome Theme for Indico Events, inspired by this gist, can you check in the following link:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment