diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-12-10 10:47:51 +0900 |
---|---|---|
committer | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-12-10 11:55:11 +0900 |
commit | 4601bce38ed2c58999ae97cbddb95c056157b703 (patch) | |
tree | dea612278522d801e092b31dae7dc999ab926f3f | |
parent | bccb5d561d607f14d6c87def972d594f8dbcb74d (diff) |
css: use css at task page
and some design update
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-rw-r--r-- | scripts/css | 34 | ||||
-rwxr-xr-x | scripts/myhtml.py | 40 | ||||
-rw-r--r-- | wiki/css | 28 |
3 files changed, 65 insertions, 37 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"))) diff --git a/wiki/css b/wiki/css deleted file mode 100644 index e4f5cf0..0000000 --- a/wiki/css +++ /dev/null @@ -1,28 +0,0 @@ -h1 { - background-color: #bbffff; -} - -h2 { - background-color: #ddffff; -} - - -table { - border-collapse: collapse; - border: solid 1px gray; - background-color: #fff2d9; -} - -table th { - background-color: #ffdd99; - border: solid 1px gray; -} - -table td { - border: solid 1px gray; -} - -pre { - background-color: #e5ffe5; - border: solid 1px gray; -}
\ No newline at end of file |