mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 08:22:40 +00:00
Adding support for AVATARS
This commit is contained in:
parent
4908cf9d79
commit
37b1adc7a5
@ -15,7 +15,7 @@ def sed(filepath, pattern, value):
|
|||||||
f.truncate()
|
f.truncate()
|
||||||
|
|
||||||
|
|
||||||
# Generating CSS bundle
|
print('Generating CSS bundle')
|
||||||
short_hash = sha1(cat('static/main.css')).hexdigest()[:7]
|
short_hash = sha1(cat('static/main.css')).hexdigest()[:7]
|
||||||
sed('templates/base.html', '-SHORTSHA1-[a-z0-9]+.css', '-SHORTSHA1-{}.css'.format(short_hash))
|
sed('templates/base.html', '-SHORTSHA1-[a-z0-9]+.css', '-SHORTSHA1-{}.css'.format(short_hash))
|
||||||
bundle_filename = 'bundle-SHORTSHA1-{}.css'.format(short_hash)
|
bundle_filename = 'bundle-SHORTSHA1-{}.css'.format(short_hash)
|
||||||
@ -24,7 +24,7 @@ with open('static/' + bundle_filename, 'wb') as bundle:
|
|||||||
bundle.write(cat('static/csslibs/solarized-highlight.css'))
|
bundle.write(cat('static/csslibs/solarized-highlight.css'))
|
||||||
bundle.write(cat('static/main.css'))
|
bundle.write(cat('static/main.css'))
|
||||||
|
|
||||||
# Generating JS bundle
|
print('Generating JS bundle')
|
||||||
short_hash = sha1(cat('static/js/social.js') + cat('static/js/filter-tags.js')).hexdigest()[:7]
|
short_hash = sha1(cat('static/js/social.js') + cat('static/js/filter-tags.js')).hexdigest()[:7]
|
||||||
sed('templates/base.html', '-SHORTSHA1-[a-z0-9]+.js', '-SHORTSHA1-{}.js'.format(short_hash))
|
sed('templates/base.html', '-SHORTSHA1-[a-z0-9]+.js', '-SHORTSHA1-{}.js'.format(short_hash))
|
||||||
for SHARE, MG_FILTER_TAGS in itertools.product(range(2), repeat=2):
|
for SHARE, MG_FILTER_TAGS in itertools.product(range(2), repeat=2):
|
||||||
@ -41,3 +41,4 @@ for SHARE, MG_FILTER_TAGS in itertools.product(range(2), repeat=2):
|
|||||||
bundle.write(cat('static/js/social.js'))
|
bundle.write(cat('static/js/social.js'))
|
||||||
if MG_FILTER_TAGS:
|
if MG_FILTER_TAGS:
|
||||||
bundle.write(cat('static/js/filter-tags.js'))
|
bundle.write(cat('static/js/filter-tags.js'))
|
||||||
|
|
||||||
|
@ -389,6 +389,12 @@ a {
|
|||||||
.mg-cloud-tag-badge {
|
.mg-cloud-tag-badge {
|
||||||
color: #d14905; }
|
color: #d14905; }
|
||||||
|
|
||||||
|
img.mg-avatar {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 48%;
|
||||||
|
padding: .3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.mg-fadeable {
|
.mg-fadeable {
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
@ -304,6 +304,12 @@ a {
|
|||||||
.mg-cloud-tag-badge {
|
.mg-cloud-tag-badge {
|
||||||
color: #d14905; }
|
color: #d14905; }
|
||||||
|
|
||||||
|
img.mg-avatar {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 48%;
|
||||||
|
padding: .3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.mg-fadeable {
|
.mg-fadeable {
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{SITEURL}}/theme/bundle-SHORTSHA1-b785cd8.css">
|
<link rel="stylesheet" type="text/css" href="{{SITEURL}}/theme/bundle-SHORTSHA1-e07d6a1.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!--[if lt IE 7]>
|
<!--[if lt IE 7]>
|
||||||
@ -117,6 +117,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if AVATARS %}
|
||||||
|
<div class="uk-panel uk-panel-box">
|
||||||
|
<h2 class="uk-panel-title">Avatars</h2>
|
||||||
|
{% for img_uri in AVATARS %}
|
||||||
|
<img class="mg-avatar" src="{{ img_uri }}" alt="An avatar I use on the web" title="An avatar I use on the web">
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if READINGS %}
|
{% if READINGS %}
|
||||||
<div class="uk-panel uk-panel-box">
|
<div class="uk-panel uk-panel-box">
|
||||||
<h2 class="uk-panel-title">En ce moment je lis</h2>
|
<h2 class="uk-panel-title">En ce moment je lis</h2>
|
||||||
|
Loading…
Reference in New Issue
Block a user