Преглед на файлове

add 'all changes' page.

Thomas Buck преди 1 година
родител
ревизия
5c134ddfd2
променени са 3 файла, в които са добавени 15 реда и са изтрити 2 реда
  1. 2
    0
      input/index.md
  2. 9
    0
      input/updates.md
  3. 4
    2
      macros.py

+ 2
- 0
input/index.md Целия файл

42
 <!--%
42
 <!--%
43
 printRecentMenu(10)
43
 printRecentMenu(10)
44
 %-->
44
 %-->
45
+
46
+[Show all updates](updates.html).

+ 9
- 0
input/updates.md Целия файл

1
+title: Updates
2
+---
3
+
4
+This is a list of all pages with an associated date, ordered from newest to oldest.
5
+You can use it to keep track of what I've been doing here.
6
+
7
+<!--%
8
+printRecentMenu(0)
9
+%-->

+ 4
- 2
macros.py Целия файл

134
     return lastyear
134
     return lastyear
135
 
135
 
136
 def printRecentMenu(count = 5):
136
 def printRecentMenu(count = 5):
137
-    posts = [p for p in pages if "date" in p]
137
+    posts = [p for p in pages if "date" in p and p.lang == "en"]
138
     posts.sort(key=lambda p: p.get("update", p.get("date")), reverse=True)
138
     posts.sort(key=lambda p: p.get("update", p.get("date")), reverse=True)
139
-    for p in posts[0:count]:
139
+    if count > 0:
140
+        posts = posts[0:count]
141
+    for p in posts:
140
         printMenuItem(p, False, False, False, True, "0", "", False)
142
         printMenuItem(p, False, False, False, True, "0", "", False)
141
 
143
 
142
 def printBlogMenu():
144
 def printBlogMenu():

Loading…
Отказ
Запис