Browse Source

Switch to gitea repositories

Piotr Orzechowski 11 months ago
parent
commit
23ccda31c7
8 changed files with 36 additions and 137 deletions
  1. 2
    4
      Makefile
  2. 0
    11
      src/content/activity.md
  3. 0
    11
      src/content/activity_pl.md
  4. 15
    15
      src/content/welcome.md
  5. 17
    18
      src/content/welcome_pl.md
  6. 0
    10
      src/site.py
  7. 0
    66
      src/static/js/commits.js
  8. 2
    2
      src/templates/menu.html

+ 2
- 4
Makefile View File

@@ -1,14 +1,12 @@
1
-js = dist/static/js
2 1
 css = dist/static/css
3 2
 
4 3
 build:
5 4
 	DEBUG=false python3 src/site.py build
6
-	
7
-	yui-compressor -o ${js}/commits.js ${js}/commits.js
5
+
8 6
 	yui-compressor -o ${css}/base.css ${css}/base.css
9 7
 	yui-compressor -o ${css}/default.css ${css}/default.css
10 8
 	yui-compressor -o ${css}/error.css ${css}/error.css
11
-	
9
+
12 10
 	cat ${css}/base.css ${css}/default.css > ${css}/tmp.css
13 11
 	mv ${css}/tmp.css ${css}/default.css
14 12
 	cat ${css}/base.css ${css}/error.css > ${css}/tmp.css

+ 0
- 11
src/content/activity.md View File

@@ -1,11 +0,0 @@
1
-lang: en
2
-langs: [{'href': '/aktywność', 'caption': 'polski'}]
3
-title: Latest commits
4
-
5
-<ul id="commits"></ul>
6
-
7
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
8
-<script src="https://cdnjs.cloudflare.com/ajax/libs/async/2.1.4/async.min.js" integrity="sha256-rN9a0GdlP/5Yu+K2F9san1sNwfGg7BY8PQDAHFIyxNQ=" crossorigin="anonymous"></script>
9
-<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js" integrity="sha256-Gn7MUQono8LUxTfRA0WZzJgTua52Udm1Ifrk5421zkA=" crossorigin="anonymous"></script>
10
-<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/locale/en-gb.js" integrity="sha256-2OoYVX6mL1q+2oZqhWBiS0TBTJTBkww7QETc9uHMBQM=" crossorigin="anonymous"></script>
11
-<script src="/static/js/commits.js"></script>

+ 0
- 11
src/content/activity_pl.md View File

@@ -1,11 +0,0 @@
1
-lang: pl
2
-langs: [{'href': '/activity', 'caption': 'English'}]
3
-title: Ostatnie zmiany
4
-
5
-<ul id="commits"></ul>
6
-
7
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
8
-<script src="https://cdnjs.cloudflare.com/ajax/libs/async/2.1.4/async.min.js" integrity="sha256-rN9a0GdlP/5Yu+K2F9san1sNwfGg7BY8PQDAHFIyxNQ=" crossorigin="anonymous"></script>
9
-<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js" integrity="sha256-Gn7MUQono8LUxTfRA0WZzJgTua52Udm1Ifrk5421zkA=" crossorigin="anonymous"></script>
10
-<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/locale/pl.js" integrity="sha256-ukph1Q1dIHp8lN3VhOIM0YJelFwZqS1FAjpUKyBIfmw=" crossorigin="anonymous"></script>
11
-<script src="/static/js/commits.js"></script>

+ 15
- 15
src/content/welcome.md View File

@@ -6,37 +6,37 @@ title: Welcome
6 6
 
7 7
 **My applications**
8 8
 
9
-* [GSummer](/gsummer) - simple checksum validator written in PyGObject.
10
-* [QSummer](/qsummer) - simple checksum validator written in PySide.
9
+* [GSummer](/git/orzech/gsummer) - simple checksum validator written in PyGObject.
10
+* [QSummer](/git/orzech/qsummer) - simple checksum validator written in PySide.
11 11
 
12 12
 **Vim**
13 13
 
14
-* [MintEclipse](/minteclipse) - Vim color scheme based on Eclipse and Mint-X.
15
-* [Vimrc](/vimrc) - my Vim settings.
14
+* [EclipseMint](/git/orzech/eclipse-mint) - Vim color scheme based on Eclipse and Mint-X.
15
+* [Vimrc](/git/orzech/vimrc) - my Vim settings.
16 16
 
17 17
 **Textadept**
18 18
 
19
-* [Xtend lexer](/ta-xtend) - Xtend LPeg lexer for Textadept.
20
-* [vCard lexer](/ta-vcard) - vCard LPeg lexer for Textadept.
21
-* [Polish locale for Textadept](/ta-polish) - Textadept Polish localization.
19
+* [Xtend lexer](/git/orzech/textadept-xtend) - Xtend LPeg lexer for Textadept.
20
+* [vCard lexer](/git/orzech/textadept-vcard) - vCard LPeg lexer for Textadept.
21
+* [Polish locale for Textadept](/git/orzech/textadept-polish) - Textadept Polish localization.
22 22
 
23 23
 **medit**
24 24
 
25
-* [Polish locale for medit](/medit-polish) - medit Polish localization.
25
+* [Polish locale for medit](/git/orzech/medit-polish) - medit Polish localization.
26 26
 
27 27
 **Other**
28 28
 
29
-* [orzechowski.tech](/site) - this site's code.
30
-* [Fossil Skins](/fossilskins) - custom Fossil skins.
31
-* [Real World Haskell](/realworldhaskell) - solutions for exercises from the
32
-[book](http://book.realworldhaskell.org){: rel="noopener noreferrer" } with the same title.
29
+* [orzechowski.tech](/git/orzech/site) - this site's code.
30
+* [Fossil Skins](/git/orzech/fossil-skins) - custom Fossil skins.
31
+* [Real World Haskell](/git/orzech/real-world-haskell) - solutions for exercises from the
32
+  [book](http://book.realworldhaskell.org){: rel="noopener noreferrer" } with the same title.
33 33
 
34 34
 # Few things about me
35 35
 
36 36
 * Son of Mieczysław and Sylwia; Wioleta's fiancé.
37 37
 * True-born islander - born on
38
-[Uznam](https://en.wikipedia.org/wiki/Uznam){: rel="noopener noreferrer" } and raised on
39
-[Wolin](https://en.wikipedia.org/wiki/Wolin){: rel="noopener noreferrer" } islands.
38
+  [Uznam](https://en.wikipedia.org/wiki/Uznam){: rel="noopener noreferrer" } and raised on
39
+  [Wolin](https://en.wikipedia.org/wiki/Wolin){: rel="noopener noreferrer" } islands.
40 40
 * Roman Catholic by faith.
41 41
 * Software engineer by education and profession (more on my
42
-[LinkedIn](https://www.linkedin.com/in/PiotrOrzechowski){: rel="noopener noreferrer" } profile).
42
+  [LinkedIn](https://www.linkedin.com/in/PiotrOrzechowski){: rel="noopener noreferrer" } profile).

+ 17
- 18
src/content/welcome_pl.md View File

@@ -6,40 +6,39 @@ title: Witaj
6 6
 
7 7
 **Moje aplikacje**
8 8
 
9
-* [GSummer](/gsummer) - prosty walidator sum kontrolnych napisany w PyGObject.
10
-* [QSummer](/qsummer) - prosty walidator sum kontrolnych napisany w PySide.
9
+* [GSummer](/git/orzech/gsummer) - prosty walidator sum kontrolnych napisany w PyGObject.
10
+* [QSummer](/git/orzech/qsummer) - prosty walidator sum kontrolnych napisany w PySide.
11 11
 
12 12
 **Vim**
13 13
 
14
-* [MintEclipse](/minteclipse) - schemat kolorów dla edytora Vim, bazowany na
15
-Eclipse i Mint-X.
16
-* [Vimrc](/vimrc) - moje ustawienia Vim.
14
+* [EclipseMint](/git/orzech/eclipse-mint) - schemat kolorów dla edytora Vim, bazowany na Eclipse
15
+  i Mint-X.
16
+* [Vimrc](/git/orzech/vimrc) - moje ustawienia Vim.
17 17
 
18 18
 **Textadept**
19 19
 
20
-* [Xtend lexer](/ta-xtend) - lekser LPeg Xtend dla edytora Textadept.
21
-* [vCard lexer](/ta-vcard) - lekser LPeg vCard dla edytora Textadept.
22
-* [Polish locale for Textadept](/ta-polish) - tlumaczenie edytora Textadept
23
-na język polski.
20
+* [Xtend lexer](/git/orzech/textadept-xtend) - lekser LPeg Xtend dla edytora Textadept.
21
+* [vCard lexer](/git/orzech/textadept-vcard) - lekser LPeg vCard dla edytora Textadept.
22
+* [Polish locale for Textadept](/git/orzech/textadept-polish) - tlumaczenie edytora Textadept
23
+  na język polski.
24 24
 
25 25
 **medit**
26 26
 
27
-* [Polish locale for medit](/medit-polish) - tłumaczenie edytora medit na
28
-język polski.
27
+* [Polish locale for medit](/git/orzech/medit-polish) - tłumaczenie edytora medit na język polski.
29 28
 
30 29
 **Inne**
31 30
 
32
-* [orzechowski.tech](/site) - kod tej strony.
33
-* [Skórki Fossila](/fossilskins) - własne skórki Fossila.
34
-* [Real World Haskell](/realworldhaskell) - rozwiązania zadań z
35
-[książki](http://book.realworldhaskell.org){: rel="noopener noreferrer" } o tym samym tytule.
31
+* [orzechowski.tech](/git/orzech/site) - kod tej strony.
32
+* [Skórki Fossila](/git/orzech/fossil-skins) - własne skórki Fossila.
33
+* [Real World Haskell](/git/orzech/real-world-haskell) - rozwiązania zadań z
34
+  [książki](http://book.realworldhaskell.org){: rel="noopener noreferrer" } o tym samym tytule.
36 35
 
37 36
 # Kilka informacji o mnie
38 37
 
39 38
 * Syn Mieczysława i Sylwii; narzeczony Wiolety.
40 39
 * Wyspiarz z krwi i kości - urodzony na
41
-[Uznamie](https://pl.wikipedia.org/wiki/Uznam){: rel="noopener noreferrer" } i wychowany na
42
-[Wolinie](https://pl.wikipedia.org/wiki/Wolin_%28wyspa%29){: rel="noopener noreferrer" }.
40
+  [Uznamie](https://pl.wikipedia.org/wiki/Uznam){: rel="noopener noreferrer" } i wychowany na
41
+  [Wolinie](https://pl.wikipedia.org/wiki/Wolin_%28wyspa%29){: rel="noopener noreferrer" }.
43 42
 * Rzymski katolik z wyznania.
44 43
 * Inżynier oprogramowania z wykształcenia i zawodu (więcej na moim profilu
45
-[LinkedIn](https://www.linkedin.com/in/PiotrOrzechowski/pl){: rel="noopener noreferrer" }).
44
+  [LinkedIn](https://www.linkedin.com/in/PiotrOrzechowski/pl){: rel="noopener noreferrer" }).

+ 0
- 10
src/site.py View File

@@ -62,16 +62,6 @@ def welcome_pl():
62 62
     return page('welcome_pl')
63 63
 
64 64
 
65
-@app.route('/activity/')
66
-def activity():
67
-    return page('activity')
68
-
69
-
70
-@app.route('/aktywność/')
71
-def activity_pl():
72
-    return page('activity_pl')
73
-
74
-
75 65
 @app.route('/en/404/')
76 66
 def page_not_found():
77 67
     return page_not_found('404')

+ 0
- 66
src/static/js/commits.js View File

@@ -1,66 +0,0 @@
1
-$(document).ready(function () {
2
-    var url = location.protocol + "//orzechowski.tech";
3
-    
4
-    var repos = [
5
-        { "name": "GSummer", "path": "/gsummer" },
6
-        { "name": "QSummer", "path": "/qsummer" },
7
-        { "name": "MintEclipse", "path": "/minteclipse" },
8
-        { "name": "Vimrc", "path": "/vimrc" },
9
-        { "name": "Xtend lexer", "path": "/ta-xtend" },
10
-        { "name": "vCard lexer", "path": "/ta-vcard" },
11
-        { "name": "Polish locale for Textadept", "path": "/ta-polish" },
12
-        { "name": "Polish locale for medit", "path": "/medit-polish" },
13
-        { "name": "orzechowski.tech", "path": "/site" },
14
-        { "name": "Fossil Skins", "path": "/fossilskins" },
15
-        { "name": "Real World Haskell", "path": "/realworldhaskell" }
16
-    ];
17
-
18
-    var limit = 30;
19
-    var command = "/json/timeline/checkin?limit=" + limit;
20
-
21
-    async.map(repos,
22
-    function (repo, callback) {
23
-        $.getJSON(url + repo.path + command, function(data) {
24
-            return callback(null, appendNameUrl(data, repo, url));
25
-        });
26
-    },
27
-    function (err, result) {
28
-        var json = new Array;
29
-
30
-        result.forEach(function(res) {
31
-            json = json.concat(res.payload.timeline);
32
-        });
33
-
34
-        json.sort(function(a, b) {
35
-            return b.timestamp - a.timestamp;
36
-        });
37
-        
38
-        if (json.length > 29) {
39
-            json = json.slice(0, 30);
40
-        }
41
-
42
-        showCommits(json, "#commits");
43
-    });
44
-});
45
-
46
-function appendNameUrl(commits, repo, url) {
47
-    commits.payload.timeline.forEach(function(entry) {
48
-        entry.repoUrl = url + repo.path;
49
-        entry.repoName = repo.name;
50
-    });
51
-
52
-    return commits;
53
-}
54
-
55
-function showCommits(commits, elemId) {
56
-    commits.forEach(function(entry) {
57
-        commit = "<li><a href=\"" + entry.repoUrl + "/info/" + entry.uuid + "\">"
58
-            + formatDate(entry.timestamp) + "</a> ↦ " + entry.repoName + " ↦ " + entry.user
59
-            + " ↦ " + entry.comment + "</li>";
60
-        $(elemId).append(commit);
61
-    });
62
-}
63
-
64
-function formatDate(date) {
65
-    return moment.unix(date).calendar();
66
-}

+ 2
- 2
src/templates/menu.html View File

@@ -1,9 +1,9 @@
1 1
 <ul>
2 2
 {% if page.lang == SITE_LANG_POLISH -%}
3 3
     <li><a href="{{ url_for('welcome_pl') }}">Witaj</a></li>
4
-    <li><a href="{{ url_for('activity_pl') }}">Ostatnie zmiany</a></li>
4
+    <li><a href="/git/orzech?tab=activity">Ostatnie zmiany</a></li>
5 5
 {%- else -%}
6 6
     <li><a href="{{ url_for('welcome') }}">Welcome</a></li>
7
-    <li><a href="{{ url_for('activity') }}">Latest commits</a></li>
7
+    <li><a href="/git/orzech?tab=activity">Latest changes</a></li>
8 8
 {%- endif %}
9 9
 </ul>