diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/css | 34 | ||||
-rwxr-xr-x | scripts/myhtml.py | 40 |
2 files changed, 65 insertions, 9 deletions
diff --git a/scripts/css b/scripts/css new file mode 100644 index 0000000..a5f5e04 --- /dev/null +++ b/scripts/css @@ -0,0 +1,34 @@ +h1 { + color: #364e96; + border: solid 3px #364e96; + padding: 0.5em; + border-radius: 25px 0px 0px 25px; + background: linear-gradient(transparent 20%, #aaddff 80%); +} + +h2 { + background: linear-gradient(transparent 20%, #a7d6ff 80%); +} + +table { + border-collapse: collapse; + border: solid 1px gray; + background-color: #fff2d9; +} + +table th { + border: solid 1px gray; + background: linear-gradient(#ffdd99,#bbaa88); + padding: 1px 0; +} + +table td { + border: solid 1px gray; +} + +pre { + background: linear-gradient(#eeffee,#88dd66); + border: solid 3px gray; + padding: 10px 10px; + border-radius: 10px; +} diff --git a/scripts/myhtml.py b/scripts/myhtml.py index ae2c4dd..f7d5349 100755 --- a/scripts/myhtml.py +++ b/scripts/myhtml.py @@ -136,6 +136,14 @@ class periject_html(base.base): return "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id={}".format(id) #-------------------- + # print_css + #-------------------- + def print_css(self, dir): + html("link", {"rel":"stylesheet", + "type":"text/css", + "href":self.relpath("scripts/css", dir)}).print() + + #-------------------- # index #-------------------- def index(self): @@ -254,6 +262,7 @@ class periject_html(base.base): # ------- # # ------- + self.print_css(dir) with html("body"): self.__summary(dir, self.top() + "/" + dir, find.find([dir]).get()) @@ -326,6 +335,7 @@ class periject_html(base.base): #-------------------- def menu(self): + self.print_css("html") with html("body"): html("h1").print("Wiki") self.menu_wiki() @@ -377,8 +387,8 @@ class periject_html(base.base): text = text[:hit.start()] + link + text[hit.end():] - # textile - print("<link rel=\"stylesheet\" type=\"text/css\" href=\"../../wiki/css\">") + # textile + self.print_css("html/wiki") with html("body"): print(textile.textile(text)) @@ -386,6 +396,7 @@ class periject_html(base.base): # body #-------------------- def body(self): + self.print_css("html") with html("body"): html("div").print("select tasks from menu") @@ -497,7 +508,7 @@ class periject_html(base.base): commit = upstream[item] with html("tr"): - html("td").print(item) + html("th").print(item) html("td").print(html("a", {"href":self.upstream_url(commit), "target":"subbody"}).text(self.git_title(commit))) @@ -572,8 +583,11 @@ class periject_html(base.base): v = view.viewer([argv[0]]) v.set_data(argv[0]) + dir = os.path.dirname(argv[0].replace("projects", "html")) + + self.print_css(dir) with html("body"): - html("h1").print(v.get_data("title")) + html("h2").print(v.get_data("title")) self.task_head(v) self.task_commit(v) self.task_comment(v) @@ -584,9 +598,11 @@ class periject_html(base.base): def member(self, argv): mem = argv.pop(0) + dir = "{}/html".format(self.top()) + self.print_css(dir) with html("body"): - self.__summary(mem, "{}/html".format(self.top()), argv) + self.__summary(mem, dir, argv) #-------------------- # status @@ -594,9 +610,11 @@ class periject_html(base.base): def status(self, argv): argv.pop(0) + dir = "{}/html".format(self.top()) + self.print_css(dir) with html("body"): - self.__summary(None, "{}/html".format(self.top()), argv) + self.__summary(None, dir, argv) #-------------------- # team @@ -604,9 +622,11 @@ class periject_html(base.base): def team(self, argv): team = argv.pop(0) + dir = "{}/html".format(self.top()) + self.print_css(dir) with html("body"): - self.__summary(team, "{}/html".format(self.top()), argv) + self.__summary(team, dir, argv) #-------------------- # bsp @@ -620,8 +640,10 @@ class periject_html(base.base): cnt_all = 0 cnt_done= 0 tmp = 0 + + self.print_css("html") with html("body"): - html("h1").print("BSP patch list") + html("h2").print("BSP patch list") with html("table", {"border":"1"}): with html("tr"): @@ -641,7 +663,7 @@ class periject_html(base.base): with html("tr"): a.option({"href": self.relpath_y2h(file, "{}/html".format(self.top()))}) - html("td").print("{}<br>({})".format( + html("th").print("{}<br>({})".format( a.text(os.path.basename(file).replace(".yaml", "")), v.get_data("status"))) |