chiark / gitweb /
Switch theme to m.css
authorColin Watson <cjwatson@debian.org>
Fri, 23 Jul 2021 16:47:07 +0000 (17:47 +0100)
committerColin Watson <cjwatson@debian.org>
Fri, 23 Jul 2021 16:47:07 +0000 (17:47 +0100)
https://mcss.mosra.cz/themes/pelican/

16 files changed:
m.css/pelican-theme/templates/article.html
m.css/pelican-theme/templates/article_header.html
m.css/pelican-theme/templates/author.html
m.css/pelican-theme/templates/category.html
m.css/pelican-theme/templates/page.html
m.css/pelican-theme/templates/tag.html
pelicanconf.py
static/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf [new file with mode: 0644]
static/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf [new file with mode: 0644]
static/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18E.ttf [new file with mode: 0644]
static/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf [new file with mode: 0644]
static/HI_QiYsKILxRpg3hIP6sJ7fM7PqlONvUlMc.ttf [new file with mode: 0644]
static/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevT.ttf [new file with mode: 0644]
static/HI_XiYsKILxRpg3hIP6sJ7fM7Pqt4s_Ds-cv.ttf [new file with mode: 0644]
static/source-code-pro.css [new file with mode: 0644]
static/source-sans-pro.css [new file with mode: 0644]

index 611fe9c815d7f88a99fe11a0bebb53e8b21c16c4..859e7508a6fe01d1e6b411d58145811273851798 100644 (file)
@@ -28,8 +28,8 @@
   {% if article.author and article.author.twitter_id %}
   <meta name="twitter:creator:id" content="{{ article.author.twitter_id }}" />
   {% endif %}
-  <meta property="og:title" content="{{ article.title }}" />
-  <meta name="twitter:title" content="{{ article.title }}" />
+  <meta property="og:title" content="{{ article.title|striptags|e }}" />
+  <meta name="twitter:title" content="{{ article.title|striptags|e }}" />
   <meta property="og:url" content="{{ article.url|format_siteurl|e }}" />
   {% if article.summary %}
   <meta property="og:description" content="{{ article.summary|dehyphenate|striptags|e }}" />
@@ -70,7 +70,7 @@
             <div class="m-row">
               <div class="m-col-t-12 m-col-s-10 m-push-s-1 m-col-m-8 m-push-m-2">
                 {% set title = article.title.split(' — ') %}
-                <h1><a href="{{ article.url|format_siteurl|e }}" rel="bookmark" title="Permalink to {{ article.title }}">{{ title[0] }}</a></h1>
+                <h1><a href="{{ article.url|format_siteurl|e }}" rel="bookmark" title="Permalink to {{ article.title|striptags|e }}">{{ title[0] }}</a></h1>
                 {% if title|length >= 2 %}
                 <h2>{{ title[1] }}</h2>
                 {% endif %}
index 2ec0e1d218f1af9196a22446a6578652e0897f0d..d6e9453404037835cf00b3a4612771e2ca44f848 100644 (file)
@@ -1,5 +1,5 @@
 <header>
-  <h1><a href="{{ article.url|format_siteurl|e }}" rel="bookmark" title="Permalink to {{ article.title }}">
+  <h1><a href="{{ article.url|format_siteurl|e }}" rel="bookmark" title="Permalink to {{ article.title|striptags|e }}">
     <time class="m-date" datetime="{{ article.date.isoformat() }}">
       {% set month = article.date.strftime('%b') %}
       {% set day = article.date.strftime('%d') %}
index 917b1f8718b07dd247790879ef2704cff1dc8597..2357418681218ac6330c57d0fcafa5ff8a07775a 100644 (file)
@@ -15,8 +15,8 @@
   {% if author.page and author.page.twitter_id %}
   <meta name="twitter:creator:id" content="{{ author.page.twitter_id }}" />
   {% endif %}
-  <meta property="og:title" content="{% if author.page and author.page.title %}{{ author.page.title }}{% else %}{{ author|e }}{% endif %}" />
-  <meta name="twitter:title" content="{% if author.page and author.page.title %}{{ author.page.title }}{% else %}{{ author|e }}{% endif %}" />
+  <meta property="og:title" content="{% if author.page and author.page.title %}{{ author.page.title|striptags|e }}{% else %}{{ author|e }}{% endif %}" />
+  <meta name="twitter:title" content="{% if author.page and author.page.title %}{{ author.page.title|striptags|e }}{% else %}{{ author|e }}{% endif %}" />
   <meta property="og:url" content="{{ author.url|format_siteurl|e }}" />
   {% if author.page and author.page.summary %}
   <meta property="og:description" content="{{ author.page.summary|dehyphenate|striptags|e }}" />
index 4eeaac35628c747249964854618643761cb96458..587ef29292b1d8741ebdad09916b24d7406b40a9 100644 (file)
@@ -9,8 +9,8 @@
 {% endblock %}
 
 {% block social_title_url_image %}
-  <meta property="og:title" content="{% if category.page and category.page.title %}{{ category.page.title }}{% else %}{{ category|e }}{% endif %}" />
-  <meta name="twitter:title" content="{% if category.page and category.page.title %}{{ category.page.title }}{% else %}{{ category|e }}{% endif %}" />
+  <meta property="og:title" content="{% if category.page and category.page.title %}{{ category.page.title|striptags|e }}{% else %}{{ category|e }}{% endif %}" />
+  <meta name="twitter:title" content="{% if category.page and category.page.title %}{{ category.page.title|striptags|e }}{% else %}{{ category|e }}{% endif %}" />
   <meta property="og:url" content="{{ category.url|format_siteurl|e }}" />
   {% if category.page and category.page.summary %}
   <meta property="og:description" content="{{ category.page.summary|dehyphenate|striptags|e }}" />
index a41182ac0aeace2fb47d4daf17787ca77882cd25..a65618a3f7996d6fd293466577ec39e6d23cbd9d 100644 (file)
@@ -34,8 +34,8 @@
 
 {% block social %}
   <meta property="og:site_name" content="{{ SITENAME|e }}" />
-  <meta property="og:title" content="{{ page.title }}" />
-  <meta name="twitter:title" content="{{ page.title }}" />
+  <meta property="og:title" content="{{ page.title|striptags|e }}" />
+  <meta name="twitter:title" content="{{ page.title|striptags|e }}" />
   <meta property="og:url" content="{{ page.url|format_siteurl|e }}" />
   {% if page.summary %}
   <meta property="og:description" content="{{ page.summary|dehyphenate|striptags|e }}" />
index 7ef0fd42fadce453f6ad0e643563aeae8932d7a9..8ce0825e1c69f4b1e53c32fb0db18bc6e967771a 100644 (file)
@@ -9,8 +9,8 @@
 {% endblock %}
 
 {% block social_title_url_image %}
-  <meta property="og:title" content="{% if tag.page and tag.page.title %}{{ tag.page.title }}{% else %}{{ tag|e }}{% endif %}" />
-  <meta name="twitter:title" content="{% if tag.page and tag.page.title %}{{ tag.page.title }}{% else %}{{ tag|e }}{% endif %}" />
+  <meta property="og:title" content="{% if tag.page and tag.page.title %}{{ tag.page.title|striptags|e }}{% else %}{{ tag|e }}{% endif %}" />
+  <meta name="twitter:title" content="{% if tag.page and tag.page.title %}{{ tag.page.title|striptags|e }}{% else %}{{ tag|e }}{% endif %}" />
   <meta property="og:url" content="{{ tag.url|format_siteurl|e }}" />
   {% if tag.page and tag.page.summary %}
   <meta property="og:description" content="{{ tag.page.summary|dehyphenate|striptags|e }}" />
index f71c50d0fdb551bbac29d5e1e3a7cfcc2eae7a90..a5797574b6be6b5d8e6775905d95a44870216ecd 100644 (file)
@@ -21,16 +21,32 @@ TRANSLATION_FEED_ATOM = None
 AUTHOR_FEED_ATOM = None
 AUTHOR_FEED_RSS = None
 
-SOCIAL = (
-    ('Twitter', 'https://twitter.com/colmmacuait'),
-    ('Google+', 'https://plus.google.com/u/0/115774225464003520154/posts'),
-    )
-TWITTER_USERNAME = 'colmmacuait'
-
 DEFAULT_PAGINATION = 10
 
 # Uncomment following line if you want document-relative URLs when developing
 #RELATIVE_URLS = True
 
 TYPOGRIFY = True
-THEME = 'cjwatson-theme'
+
+THEME = 'm.css/pelican-theme'
+THEME_STATIC_DIR = 'static'
+THEME_STATIC_PATHS = ['static', '../../static']
+DIRECT_TEMPLATES = ['index']
+
+M_CSS_FILES = [
+    'static/source-sans-pro.css',
+    'static/source-code-pro.css',
+    'static/m-dark.css',
+    ]
+M_THEME_COLOR = '#22272e'
+
+PLUGIN_PATHS = ['m.css/plugins']
+PLUGINS = ['m.htmlsanity']
+
+M_HIDE_ARTICLE_SUMMARY = True
+M_LINKS_FOOTER1 = [
+    ('Social', ''),
+    ('Twitter', 'https://twitter.com/colmmacuait'),
+    ('RSS feed', FEED_ALL_ATOM),
+    ]
+M_SOCIAL_TWITTER_SITE = '@colmmacuait'
diff --git a/static/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf b/static/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf
new file mode 100644 (file)
index 0000000..72a85b0
Binary files /dev/null and b/static/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf differ
diff --git a/static/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf b/static/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf
new file mode 100644 (file)
index 0000000..7e73d27
Binary files /dev/null and b/static/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf differ
diff --git a/static/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18E.ttf b/static/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18E.ttf
new file mode 100644 (file)
index 0000000..bc6fb91
Binary files /dev/null and b/static/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18E.ttf differ
diff --git a/static/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf b/static/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf
new file mode 100644 (file)
index 0000000..b6a2ca3
Binary files /dev/null and b/static/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf differ
diff --git a/static/HI_QiYsKILxRpg3hIP6sJ7fM7PqlONvUlMc.ttf b/static/HI_QiYsKILxRpg3hIP6sJ7fM7PqlONvUlMc.ttf
new file mode 100644 (file)
index 0000000..9e89fd7
Binary files /dev/null and b/static/HI_QiYsKILxRpg3hIP6sJ7fM7PqlONvUlMc.ttf differ
diff --git a/static/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevT.ttf b/static/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevT.ttf
new file mode 100644 (file)
index 0000000..814a6d5
Binary files /dev/null and b/static/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevT.ttf differ
diff --git a/static/HI_XiYsKILxRpg3hIP6sJ7fM7Pqt4s_Ds-cv.ttf b/static/HI_XiYsKILxRpg3hIP6sJ7fM7Pqt4s_Ds-cv.ttf
new file mode 100644 (file)
index 0000000..c35eeda
Binary files /dev/null and b/static/HI_XiYsKILxRpg3hIP6sJ7fM7Pqt4s_Ds-cv.ttf differ
diff --git a/static/source-code-pro.css b/static/source-code-pro.css
new file mode 100644 (file)
index 0000000..6a310d3
--- /dev/null
@@ -0,0 +1,21 @@
+/* https://fonts.google.com/specimen/Source+Code+Pro
+ * https://fonts.googleapis.com/css?family=Source+Code+Pro:400,400i,600
+ */
+@font-face {
+  font-family: 'Source Code Pro';
+  font-style: italic;
+  font-weight: 400;
+  src: url(HI_QiYsKILxRpg3hIP6sJ7fM7PqlONvUlMc.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Source Code Pro';
+  font-style: normal;
+  font-weight: 400;
+  src: url(HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevT.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Source Code Pro';
+  font-style: normal;
+  font-weight: 600;
+  src: url(HI_XiYsKILxRpg3hIP6sJ7fM7Pqt4s_Ds-cv.ttf) format('truetype');
+}
diff --git a/static/source-sans-pro.css b/static/source-sans-pro.css
new file mode 100644 (file)
index 0000000..5b679e2
--- /dev/null
@@ -0,0 +1,27 @@
+/* https://fonts.google.com/specimen/Source+Sans+Pro
+ * https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i
+ */
+@font-face {
+  font-family: 'Source Sans Pro';
+  font-style: italic;
+  font-weight: 400;
+  src: url(6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Source Sans Pro';
+  font-style: italic;
+  font-weight: 600;
+  src: url(6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18E.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Source Sans Pro';
+  font-style: normal;
+  font-weight: 400;
+  src: url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf) format('truetype');
+}
+@font-face {
+  font-family: 'Source Sans Pro';
+  font-style: normal;
+  font-weight: 600;
+  src: url(6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdr.ttf) format('truetype');
+}