From d943e91650ee4190cd2bd8800156931c80d897a2 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Fri, 12 Jul 2013 13:45:52 +0000 Subject: Add stylesheet and mageia navigation bar --- Makefile | 6 +++++- NEWS | 3 +++ config_default | 2 ++ static/advisories.css | 12 ++++++++++++ tmpl/CVE.html | 6 +++++- tmpl/advisories.html | 6 +++++- tmpl/advisory.html | 17 +++++++++++++++-- tmpl/body_top.html | 5 +++++ tmpl/by_cve.html | 6 +++++- tmpl/by_rel.html | 6 +++++- tmpl/by_src.html | 6 +++++- tmpl/head.html | 3 +++ tmpl/index.html | 29 +++++++++++++++++++++++------ 13 files changed, 93 insertions(+), 14 deletions(-) create mode 100644 static/advisories.css create mode 100644 tmpl/body_top.html create mode 100644 tmpl/head.html diff --git a/Makefile b/Makefile index 92043aa..34acbcd 100644 --- a/Makefile +++ b/Makefile @@ -4,22 +4,26 @@ PROJECTNAME=mga-advisories BINFILES=mgaadv CFGFILES=mga-advisories.conf TMPLFILES=tmpl/*.html tmpl/*.txt tmpl/*.adv tmpl/*.rss +STATICFILES=static/* sysconfdir=/etc bindir=/usr/bin sharedir=/usr/share projectdir=$(sharedir)/$(PROJECTNAME) tmpldir=$(projectdir)/tmpl +staticdir=$(projectdir)/static perldir=/usr/lib/perl5/site_perl all: install: install -d $(DESTDIR)$(projectdir) $(DESTDIR)$(tmpldir) \ - $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir) + $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir) \ + $(DESTDIR)$(staticdir) install -m 755 $(BINFILES) $(DESTDIR)$(bindir) install -m 644 $(CFGFILES) $(DESTDIR)$(sysconfdir) install -m 644 $(TMPLFILES) $(DESTDIR)$(tmpldir) + install -m 644 $(STATICFILES) $(DESTDIR)$(staticdir) install -m 644 config_default $(DESTDIR)$(projectdir)/config install -d $(DESTDIR)$(perldir)/MGA install -m 644 lib/MGA/Advisories.pm $(DESTDIR)$(perldir)/MGA diff --git a/NEWS b/NEWS index f4645de..c81285d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ + +- add stylesheet and mageia navigation bar + Version 0.11 - fix next free id assignement diff --git a/config_default b/config_default index b746257..c3fb396 100644 --- a/config_default +++ b/config_default @@ -5,6 +5,8 @@ dump_url: http://advisories.mageia.org/advisories.yaml advisories_dir: /var/lib/mga-advisories/advisories status_dir: /var/lib/mga-advisories/status tmpl_dir: /usr/share/mga-advisories/tmpl +staticdir_url: //advisories.mageia.org/static +links_protocol: // output_format: - txt - html diff --git a/static/advisories.css b/static/advisories.css new file mode 100644 index 0000000..462a148 --- /dev/null +++ b/static/advisories.css @@ -0,0 +1,12 @@ +.content { + background: #fff; + padding: 1em 2em; + text-align: left; + float: left; + min-width: 60%; +} + +.section { + padding-top: 1em; + padding-bottom: 1em; +} diff --git a/tmpl/CVE.html b/tmpl/CVE.html index 10e599b..24e0f85 100644 --- a/tmpl/CVE.html +++ b/tmpl/CVE.html @@ -3,14 +3,18 @@ CVE list + [%- INCLUDE head.html -%] -

CVE list

+ [%- INCLUDE body_top.html -%] +

Advisories » CVE list

+
+
diff --git a/tmpl/advisories.html b/tmpl/advisories.html index 5ff26f1..0b95ac2 100644 --- a/tmpl/advisories.html +++ b/tmpl/advisories.html @@ -4,10 +4,14 @@ Mageia Advisories + [%- INCLUDE head.html -%] -

Mageia Advisories rss

+ [%- INCLUDE body_top.html -%] +

Advisories » All rss

+
[% INCLUDE advisories_table.html advlst = advdb.sorted %] +
diff --git a/tmpl/advisory.html b/tmpl/advisory.html index f0a6a52..dd49031 100644 --- a/tmpl/advisory.html +++ b/tmpl/advisory.html @@ -4,9 +4,15 @@ Mageia Advisory: [% advisory %] - [% adv.subject %] + [%- INCLUDE head.html -%] -

[% advisory %] - [% adv.subject %]

+ [%- INCLUDE body_top.html -%] +

Advisories » [% advisory %]

+ +
+
+

[% adv.subject %]

Publication date: [% date.format(adv.status.published, format => '%d %b %Y', gmt => 1) %]
Type: [% adv.type %]
@@ -28,12 +34,16 @@ [% cve %] [% END %] [% END %] +
+

Description

         [%- adv.description -%]
         
+
+

References

    [% FOREACH ref IN adv.references -%] @@ -45,7 +55,9 @@ [%- END -%] [%- END -%]
+
+

SRPMS

[% FOREACH rel IN adv.src.keys -%] [% FOREACH media IN adv.src.$rel.keys -%] @@ -57,6 +69,7 @@ [% END -%] [% END -%] - +
+
diff --git a/tmpl/body_top.html b/tmpl/body_top.html new file mode 100644 index 0000000..a5081a4 --- /dev/null +++ b/tmpl/body_top.html @@ -0,0 +1,5 @@ +
+ + diff --git a/tmpl/by_cve.html b/tmpl/by_cve.html index bd4aedd..1102d9f 100644 --- a/tmpl/by_cve.html +++ b/tmpl/by_cve.html @@ -3,10 +3,14 @@ [% CVE %] + [%- INCLUDE head.html -%] -

[% CVE %]

+ [%- INCLUDE body_top.html -%] +

Advisories » [% CVE %]

+
[% INCLUDE advisories_table.html advlst = advdb.by_cve.$CVE %] +
diff --git a/tmpl/by_rel.html b/tmpl/by_rel.html index 883d9f6..7989f75 100644 --- a/tmpl/by_rel.html +++ b/tmpl/by_rel.html @@ -4,10 +4,14 @@ Mageia [% rel %] Advisories + [%- INCLUDE head.html -%] -

Mageia [% rel %] Advisories rss

+ [%- INCLUDE body_top.html -%] +

Advisories » Mageia [% rel %] rss

+
[% INCLUDE advisories_table.html advlst = advdb.by_rel.$rel %] +
diff --git a/tmpl/by_src.html b/tmpl/by_src.html index 7456918..6426e8f 100644 --- a/tmpl/by_src.html +++ b/tmpl/by_src.html @@ -4,10 +4,14 @@ Mageia advisories for package [% src %] + [%- INCLUDE head.html -%] -

Mageia advisories for package [% src %] rss

+ [%- INCLUDE body_top.html -%] +

Advisories » Package [% src %] rss

+
[% INCLUDE advisories_table.html advlst = advdb.by_src.$src %] +
diff --git a/tmpl/head.html b/tmpl/head.html new file mode 100644 index 0000000..aa4fd30 --- /dev/null +++ b/tmpl/head.html @@ -0,0 +1,3 @@ + + + diff --git a/tmpl/index.html b/tmpl/index.html index cf68929..91e20e6 100644 --- a/tmpl/index.html +++ b/tmpl/index.html @@ -3,32 +3,49 @@ Mageia Advisories + [%- INCLUDE head.html -%] -

Mageia Advisories

+ [%- INCLUDE body_top.html -%] +

Mageia Advisories

+
+
+

Advisories

+
-

CVE list

+
+

CVE list

A list of fixed CVE is available. +
-

Command line tool

+
+

Command line tool

A command line tool is available to list and display advisories. More details. +
-

Older Advisories

+
+

Older Advisories

Older advisories are available on Mageia wiki. +
-

DB Dump

+
+

DB Dump

A dump of all advisories is available as a yaml file. +
-

Source code

+
+

Source code

Source code for the tool used to generate this website is available on svn. Patches or ideas can be posted on the sysadmin-discuss mailing list. +
+
-- cgit v1.2.1