summaryrefslogtreecommitdiffstats
path: root/g2h/overview_page.py
blob: 145a8d71aeb4304f6d9977f82757027241a044af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from .page import Page

class OverviewPage(Page):
    def __init__(self, out_dir, name, branches, tags, content_subdir, latest_commit):
        super(OverviewPage, self).__init__('overview.md', out_dir, '_index.md', name, content_subdir)
        self.branches = branches
        self.tags = tags
        self.latest_commit = latest_commit

    def context(self):
        return {
            'branches': self.branches,
            'content_subdir': self.content_subdir,
            'latest_commit_date': self.latest_commit.committed_datetime,
            'tags': self.tags,
            'title': self.name,
            'this_commit': self.latest_commit
        }