Browse Source

[CX FREEZE SUPPORT] Convert css files to python constants

pull/418/head
Namgyal Brisson 7 years ago
parent
commit
df65c53a1c
  1. 26
      pygal/css/__init__.py
  2. 24
      pygal/css/base.py
  3. 24
      pygal/css/graph.py
  4. 24
      pygal/css/style.py

26
pygal/css/__init__.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2018 Kozea
#
# This library is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with pygal. If not, see <http://www.gnu.org/licenses/>.
"""CSS package containing all needed styles"""
from pygal.css.base import CSS as CSS_BASE
from pygal.css.graph import CSS as CSS_GRAPH
from pygal.css.style import CSS as CSS_STYLE
__all__ = ('CSS_BASE', 'CSS_GRAPH', 'CSS_STYLE',)

24
pygal/css/base.css → pygal/css/base.py

@ -1,4 +1,25 @@
/*
# -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2018 Kozea
#
# This library is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with pygal. If not, see <http://www.gnu.org/licenses/>.
"""Base styles"""
CSS = """/*
* This file is part of pygal
*
* A python svg graph plotting library
@ -67,3 +88,4 @@
font-family: {{ style.no_data_font_family }};
font-size: {{ style.no_data_font_size }}px;
}
"""

24
pygal/css/graph.css → pygal/css/graph.py

@ -1,4 +1,25 @@
/*
# -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2018 Kozea
#
# This library is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with pygal. If not, see <http://www.gnu.org/licenses/>.
"""Graph styles"""
CSS = """/*
* This file is part of pygal
*
* A python svg graph plotting library
@ -150,3 +171,4 @@
stroke: {{ style.background }};
stroke-width: 2px;
}
"""

24
pygal/css/style.css → pygal/css/style.py

@ -1,4 +1,25 @@
/*
# -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2018 Kozea
#
# This library is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with pygal. If not, see <http://www.gnu.org/licenses/>.
"""Styles"""
CSS = """/*
* This file is part of pygal
*
* A python svg graph plotting library
@ -172,3 +193,4 @@
{{ colors }}
{{ strokes }}
"""
Loading…
Cancel
Save