This website works better with JavaScript.
首頁
說明
登入
ben
/
calefaction
镜像来自
https://github.com/earwig/calefaction
關註
1
收藏
1
複製
0
程式碼
版本發佈
0
Activity
瀏覽代碼
Add EVE date to footer.
master
Ben Kurtovic
8 年之前
父節點
681030e8d6
當前提交
bf7e58dba9
共有
3 個文件被更改
,包括
21 次插入
和
0 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
calefaction/eve/__init__.py
+13
-0
calefaction/eve/clock.py
+2
-0
templates/_base.mako
+ 6
- 0
calefaction/eve/__init__.py
查看文件
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from .clock import Clock
from .image import ImageServer
__all__ = ["EVE"]
@@ -7,8 +8,13 @@ __all__ = ["EVE"]
class EVE:
def __init__(self):
self._clock = Clock()
self._image = ImageServer()
@property
def clock(self):
return self._clock
@property
def image(self):
return self._image
+ 13
- 0
calefaction/eve/clock.py
查看文件
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
from datetime import datetime
__all__ = ["Clock"]
YEAR_DELTA = 1898
class Clock:
def now(self):
dt = datetime.utcnow()
return str(dt.year - YEAR_DELTA) + dt.strftime("-%m-%d %H:%M")
+ 2
- 0
templates/_base.mako
查看文件
@@ -44,6 +44,8 @@
<%block name="footer">
<footer>
<div>
YC ${g.eve.clock.now()}
•
Running <a href="https://github.com/earwig/calefaction">Calefaction</a> ${g.version}
•
<a href="https://eveonline.com">EVE Online</a> and all related trademarks are property of <a href="https://ccpgames.com">CCP hf</a>.
Write
Preview
Loading…
取消
儲存