コード例 #1
0
def pygments_css():
    return pygments_style_defs(), 200, {"Content-Type": "text/css"}
コード例 #2
0
def pygments_css():
    return pygments_style_defs(app.config.get('HIGHLIGHT_THEME')), 200, {'Content-Type': 'text/css'}
コード例 #3
0
ファイル: blog.py プロジェクト: MasterScott/lanmaster53-src
def pygments_css():
    return pygments_style_defs(PYGMENTS_STYLE), 200, {
        'Content-Type': 'text/css'
    }
コード例 #4
0
app.config.from_object(__name__)
pages = FlatPages(app)
freezer = Freezer(app)
compressor = Compressor(app)

app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {"/": os.path.join(os.path.dirname(__file__), "static")})


#
# Web assets
#
css_bundle = CSSBundle(
    name="all.css",
    assets=[
        FileAsset("css/normalize.css"),
        Asset(pygments_style_defs()),
        FileAsset("css/styles.less", processors=["lesscss"]),
    ],
    processors=["cssmin"],
)
compressor.register_bundle(css_bundle)


#
# Filters
#
@app.template_filter()
def dateformat(value, format=u"%H:%M / %d-%m-%Y"):
    if not value:
        return u""
    return unicode(value.strftime(format).decode("utf8"))
コード例 #5
0
def pygments_css():
    u"""Return the stylesheet for the selected Pygments style."""
    style = app.config['PYGMENTS_STYLE']
    return pygments_style_defs(style), 200, {'Content-Type': 'text/css'}
コード例 #6
0
def pygments_css():
    '''View for syntax highlighting within blog posts'''
    return pygments_style_defs('tango'), 200, {'Content-Type': 'text/css'}
コード例 #7
0
def pygments_css():
    return pygments_style_defs("monokai"), 200, {"Content-Type": "text/css"}
コード例 #8
0
def pygments_css():
	return pygments_style_defs('tango'), 200, {'Content-Type': 'text/css'}
コード例 #9
0
ファイル: app.py プロジェクト: petterhj/flask-mdwiki
def pygments_css():
    pygments_style = app.config.get('FLATPAGES_PYGMENTS_STYLE', 'default')
    return pygments_style_defs(pygments_style), 200, {
        'Content-Type': 'text/css'
    }
コード例 #10
0
def pygments_css():
    return (pygments_style_defs("solarizedlight"), 200, {
        "Content-Type": "text/css"
    })
コード例 #11
0
ファイル: index.py プロジェクト: pappasam/softwarejourneyman
def pygments_css():
    '''View for syntax highlighting within blog posts'''
    return pygments_style_defs('tango'), 200, {'Content-Type': 'text/css'}
コード例 #12
0
ファイル: sitebuilder.py プロジェクト: mark-ep/site-generator
def pygments_css() -> str:
    """
    return the pygments syntax-highlighting CSS
    """
    return pygments_style_defs('monokai'), 200, {'Content-Type': 'text/css'}
コード例 #13
0
 def test_pygments_style_defs(self):
     styles = pygments_style_defs()
     self.assertTrue('.codehilite' in styles)
コード例 #14
0
def pygments_css():
    return pygments_style_defs('friendly'), 200, {'Content-Type': 'text/css'}
コード例 #15
0
 def test_pygments_style_defs(self):
     styles = pygments_style_defs()
     self.assertTrue(styles.startswith('.codehilite'))
コード例 #16
0
 def test_pygments_style_defs(self):
     styles = pygments_style_defs()
     self.assertTrue(styles.startswith('.codehilite'))
コード例 #17
0
ファイル: app.py プロジェクト: LowbrowLabs/simple-flask-blog
def pygments_css():
    return pygments_style_defs("friendly"), 200, {"Content-Type": "text/css"}
コード例 #18
0
ファイル: blog.py プロジェクト: whassani/whassani.github.io
def pygments_css():
    style = app.config['PYGMENTS_STYLE']
    return pygments_style_defs(style), 200, {'Content-Type': 'text/css'}
コード例 #19
0
ファイル: server.py プロジェクト: 98hyun/98hyun.github.io
def pygments():
    return pygments_style_defs(style='algol_nu'), 200, {
        'Content-Type': 'text/css'
    }
コード例 #20
0
ファイル: general.py プロジェクト: jymsk/fragforce.org
def pygments_css():
    return pygments_style_defs(), 200, {'Content-Type': 'text/css'}
コード例 #21
0
def pygments_css():
    return pygments_style_defs(style='colorful'), 200, {
        'Content-Type': 'text/css'
    }