aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-07-13 11:26:12 +0000
committerNicolas Vigier <boklm@mageia.org>2013-07-13 11:26:12 +0000
commit44acb4196a6e0bed7de44292804c34b7722b6b3e (patch)
treeccd985942be0b2bbb5be601fa9efff37c240643d
parent611c89d50cbd94a1b56f6344c59f6145c10a9e77 (diff)
downloadmgapeople-44acb4196a6e0bed7de44292804c34b7722b6b3e.tar
mgapeople-44acb4196a6e0bed7de44292804c34b7722b6b3e.tar.gz
mgapeople-44acb4196a6e0bed7de44292804c34b7722b6b3e.tar.bz2
mgapeople-44acb4196a6e0bed7de44292804c34b7722b6b3e.tar.xz
mgapeople-44acb4196a6e0bed7de44292804c34b7722b6b3e.zip
Add stylesheet and mageia navigation bar
-rw-r--r--Makefile6
-rw-r--r--NEWS1
-rw-r--r--mgapeople.conf2
-rw-r--r--static/people.css12
-rw-r--r--tmpl/body_top.html5
-rw-r--r--tmpl/group.html20
-rw-r--r--tmpl/groupindex.html16
-rw-r--r--tmpl/head.html3
-rw-r--r--tmpl/index.html12
-rw-r--r--tmpl/user.html52
-rw-r--r--tmpl/userindex.html16
11 files changed, 96 insertions, 49 deletions
diff --git a/Makefile b/Makefile
index 82f2fc3..2908ee6 100644
--- a/Makefile
+++ b/Makefile
@@ -3,17 +3,21 @@ VERSION=0.4
BINFILES=mkpeople
CFGFILES=mgapeople.conf
TMPLFILES=tmpl/*.html tmpl/*.txt
+STATICFILES=static/*
sysconfdir=/etc
bindir=/usr/bin
sharedir=/usr/share
tmpldir=$(sharedir)/mgapeople/tmpl
+staticdir=$(sharedir)/mgapeople/static
install:
- install -d $(DESTDIR)$(tmpldir) $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir)
+ install -d $(DESTDIR)$(tmpldir) $(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)
tar:
git archive --format=tar --prefix mgapeople-$(VERSION)/ HEAD | xz > mgapeople-$(VERSION).tar.xz
diff --git a/NEWS b/NEWS
index 1ac7d66..943d4cc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
+- add stylesheet and mageia navigation bar
- tmpl/userindex.txt: remove empty line at end of file
Version 0.4
diff --git a/mgapeople.conf b/mgapeople.conf
index 592df4e..dad791e 100644
--- a/mgapeople.conf
+++ b/mgapeople.conf
@@ -9,3 +9,5 @@ output_format:
tmpl_dir: /usr/share/mgapeople/tmpl
maintdburl: http://pkgsubmit.mageia.org/data/maintdb.txt
sitename: people.mageia.org
+staticdir_url: //people.mageia.org/static
+links_protocol: //
diff --git a/static/people.css b/static/people.css
new file mode 100644
index 0000000..462a148
--- /dev/null
+++ b/static/people.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/body_top.html b/tmpl/body_top.html
new file mode 100644
index 0000000..2b726f1
--- /dev/null
+++ b/tmpl/body_top.html
@@ -0,0 +1,5 @@
+<header class='community' id='hmgn'></header>
+<script src="[% config.links_protocol %]static.mageia.org/g/js/jquery-1.10.1.min.js"></script>
+<script>
+ $("#hmgn").load("[% config.links_protocol %]nav.mageia.org/html/").delay(10).slideDown();
+</script>
diff --git a/tmpl/group.html b/tmpl/group.html
index 1a414a4..c61f620 100644
--- a/tmpl/group.html
+++ b/tmpl/group.html
@@ -2,17 +2,21 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% config.sitename %]: g/[% groups.$group.cn.0 %]</title>
+ [%- INCLUDE head.html -%]
</head>
<body>
- <h1>[% groups.$group.cn.0 %]</h1>
+ [%- INCLUDE body_top.html -%]
+ <h1 id='mgnavt'><a href="../index.html">[% config.sitename %]</a> » <a href="index.html">groups</a> » [% groups.$group.cn.0 %]</h1>
- <h3>[% groups.$group.description.0 %]</h3>
+ <div class='content'>
+ <h3>[% groups.$group.description.0 %]</h3>
- Members:
- <ul>
- [% FOREACH user IN groups.$group.member %]
- <li><a href="../u/[% users.$user.uid.0 %].html">[% users.$user.cn.0 %] ([% users.$user.uid.0 %])</a></li>
- [% END %]
- </ul>
+ Members:
+ <ul>
+ [% FOREACH user IN groups.$group.member %]
+ <li><a href="../u/[% users.$user.uid.0 %].html">[% users.$user.cn.0 %] ([% users.$user.uid.0 %])</a></li>
+ [% END %]
+ </ul>
+ </div>
</body>
</html>
diff --git a/tmpl/groupindex.html b/tmpl/groupindex.html
index 4489883..4549801 100644
--- a/tmpl/groupindex.html
+++ b/tmpl/groupindex.html
@@ -2,13 +2,17 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% config.sitename %]: g</title>
+ [%- INCLUDE head.html -%]
</head>
<body>
- <h1>groups</h1>
- <ul>
- [% FOREACH group IN groups %]
- <li><a href="[% group.value.cn.0 %].html">[% group.value.cn.0 %]</a> : [% group.value.description.0 %]</li>
- [% END %]
- </ul>
+ [%- INCLUDE body_top.html -%]
+ <h1 id='mgnavt'><a href="../index.html">[% config.sitename %]</a> » groups</h1>
+ <div class='content'>
+ <ul>
+ [% FOREACH group IN groups %]
+ <li><a href="[% group.value.cn.0 %].html">[% group.value.cn.0 %]</a> : [% group.value.description.0 %]</li>
+ [% END %]
+ </ul>
+ </div>
</body>
</html>
diff --git a/tmpl/head.html b/tmpl/head.html
new file mode 100644
index 0000000..f8e649e
--- /dev/null
+++ b/tmpl/head.html
@@ -0,0 +1,3 @@
+<link rel="stylesheet" type="text/css" href="[% config.links_protocol %]static.mageia.org/g/style/all.css">
+<link rel="stylesheet" type="text/css" href="[% config.links_protocol %]nav.mageia.org/css/">
+<link rel="stylesheet" type="text/css" href="[% config.staticdir_url %]/people.css">
diff --git a/tmpl/index.html b/tmpl/index.html
index dada85f..bc433c1 100644
--- a/tmpl/index.html
+++ b/tmpl/index.html
@@ -2,14 +2,18 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% config.sitename %]</title>
+ [%- INCLUDE head.html -%]
</head>
<body>
- <h1>[% config.sitename %]</h1>
+ [%- INCLUDE body_top.html -%]
+ <h1 id='mgnavt'>[% config.sitename %]</h1>
- <h2><a href="g/">Groups</a></h2>
+ <div class='content'>
+ <h2><a href="g/">Groups</a></h2>
- <h2><a href="u/">Users</a></h2>
+ <h2><a href="u/">Users</a></h2>
- Source code for this website is available on <a href="http://svnweb.mageia.org/soft/mgapeople/">svn://svn.mageia.org/svn/soft/mgapeople/</a>.
+ Source code for this website is available on <a href="http://svnweb.mageia.org/soft/mgapeople/">svn://svn.mageia.org/svn/soft/mgapeople/</a>.
+ </div>
</body>
</html>
diff --git a/tmpl/user.html b/tmpl/user.html
index d334738..789069e 100644
--- a/tmpl/user.html
+++ b/tmpl/user.html
@@ -3,32 +3,36 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% config.sitename %]: u/[% login %]</title>
+ [%- INCLUDE head.html -%]
</head>
<body>
- <h1>[% login %]</h1>
- <ul>
- <li>
- <b>Name</b>: [% users.$user.cn.0 %]
- </li>
- <li>
- <b>Login</b>: [% users.$user.uid.0 %]
- </li>
- <li>
- <b>Groups</b>:
- [% FOREACH group IN users.$user.groups %]
- <a href="../g/[% groups.$group.cn.0 %].html">[% groups.$group.cn.0 %]</a>
+ [%- INCLUDE body_top.html -%]
+ <h1 id='mgnavt'><a href="../index.html">[% config.sitename %]</a> » <a href="index.html">users</a> » [% login %]</h1>
+ <div class='content'>
+ <ul>
+ <li>
+ <b>Name</b>: [% users.$user.cn.0 %]
+ </li>
+ <li>
+ <b>Login</b>: [% users.$user.uid.0 %]
+ </li>
+ <li>
+ <b>Groups</b>:
+ [% FOREACH group IN users.$user.groups %]
+ <a href="../g/[% groups.$group.cn.0 %].html">[% groups.$group.cn.0 %]</a>
+ [% END %]
+ </li>
+ </ul>
+ [% IF maintdb.$login %]
+ <h3>[% users.$user.cn.0 %] is maintaining [% maintdb.$login.size %] packages</h3>
+ <ul>
+ [% FOREACH pkg IN maintdb.$login %]
+ <li>
+ [% pkg %]
+ </li>
+ [% END %]
+ </ul>
[% END %]
- </li>
- </ul>
- [% IF maintdb.$login %]
- <h3>[% users.$user.cn.0 %] is maintaining [% maintdb.$login.size %] packages</h3>
- <ul>
- [% FOREACH pkg IN maintdb.$login %]
- <li>
- [% pkg %]
- </li>
- [% END %]
- </ul>
- [% END %]
+ </div>
</body>
</html>
diff --git a/tmpl/userindex.html b/tmpl/userindex.html
index 23c28aa..3288c01 100644
--- a/tmpl/userindex.html
+++ b/tmpl/userindex.html
@@ -2,13 +2,17 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% config.sitename %]: u</title>
+ [%- INCLUDE head.html -%]
</head>
<body>
- <h1>Users</h1>
- <ul>
- [% FOREACH user IN users %]
- <li><a href="[% user.value.uid.0 %].html">[% user.value.cn.0 %] ([% user.value.uid.0 %])</a></li>
- [% END %]
- </ul>
+ [%- INCLUDE body_top.html -%]
+ <h1 id='mgnavt'><a href="../index.html">[% config.sitename %]</a> » users</h1>
+ <div class='content'>
+ <ul>
+ [% FOREACH user IN users %]
+ <li><a href="[% user.value.uid.0 %].html">[% user.value.cn.0 %] ([% user.value.uid.0 %])</a></li>
+ [% END %]
+ </ul>
+ </div>
</body>
</html>