mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Self-host twemoji and the CSS
This commit is contained in:
parent
369c380054
commit
984c146e37
3 changed files with 10 additions and 3 deletions
9
Makefile
9
Makefile
|
@ -35,9 +35,16 @@ microblogpub:
|
|||
# Rebuild the Docker image
|
||||
docker build . --no-cache -t microblogpub:latest
|
||||
|
||||
.PHONY: css
|
||||
css:
|
||||
# Download pure.css if needed
|
||||
[[ ! -f static/pure.css ]] && curl https://unpkg.com/purecss@1.0.1/build/pure-min.css > static/pure.css
|
||||
# Download the emojis from twemoji if needded
|
||||
[[ ! -d static/twemoji ]] && wget https://github.com/twitter/twemoji/archive/v12.1.2.tar.gz && tar xvzf https://github.com/twitter/twemoji/archive/v12.1.2.tar.gz && mv twemoji-12.1.2/assets/svg static/twemoji && rm -rf twemoji-12.1.2
|
||||
|
||||
# Run the docker-compose project locally (will perform a update if the project is already running)
|
||||
.PHONY: run
|
||||
run: microblogpub
|
||||
run: microblogpub css
|
||||
# (poussetaches and microblogpub Docker image will updated)
|
||||
# Update MongoDB
|
||||
docker pull mongo:3
|
||||
|
|
|
@ -155,7 +155,7 @@ if conf.get("emojis"):
|
|||
EMOJIS = conf["emojis"]
|
||||
|
||||
# Emoji template for the FE
|
||||
EMOJI_TPL = '<img src="https://cdn.jsdelivr.net/npm/twemoji@12.0.0/2/svg/{filename}.svg" alt="{raw}" class="emoji">'
|
||||
EMOJI_TPL = '<img src="/static/twemoji/{filename}.svg" alt="{raw}" class="emoji">'
|
||||
if conf.get("emoji_tpl"):
|
||||
EMOJI_TPL = conf["emoji_tpl"]
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{% block title %}{{ config.NAME }}'s microblog{% endblock %}</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="/static/pure.css">
|
||||
<link rel="authorization_endpoint" href="{{ config.ID }}/indieauth">
|
||||
<link rel="token_endpoint" href="{{ config.ID }}/token">
|
||||
{% if not request.args.get("older_than") and not request.args.get("previous_than") %}<link rel="canonical" href="https://{{ config.DOMAIN }}{{ request.path }}">{% endif %}
|
||||
|
|
Loading…
Reference in a new issue