SF.net SVN: gar:[26506] csw/mgar/pkg/opencsw-manual/trunk/files/ osqa-migration
cgrzemba at users.sourceforge.net
cgrzemba at users.sourceforge.net
Mon Jan 28 11:59:04 CET 2019
Revision: 26506
http://sourceforge.net/p/gar/code/26506
Author: cgrzemba
Date: 2019-01-28 10:58:56 +0000 (Mon, 28 Jan 2019)
Log Message:
-----------
- Order the index / list alphabetically
- Add a paragraph to the index, explaining that this is an archive of OSQA
- checked HTML syntax
- add canonical link URL
Modified Paths:
--------------
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/answer.html.tmpl
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_answer_html.py
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_quest_html.py
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/question.html.tmpl
Added Paths:
-----------
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/css/
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/css/style.css
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/images/
csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/images/logo_1.png
Modified: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/answer.html.tmpl
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/answer.html.tmpl 2019-01-25 12:26:38 UTC (rev 26505)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/answer.html.tmpl 2019-01-28 10:58:56 UTC (rev 26506)
@@ -1,30 +1,34 @@
-<link href="../../css/style.css" rel="stylesheet" type="text/css" media="all">
-<html>
+<!DOCTYPE html>
+
+<html lang="en">
<head>
+ <meta charset="UTF-8" />
+ <link href="../../css/style.css" rel="stylesheet" type="text/css" media="all" />
+ <link rel="canonical" href="https://www.opencsw.org/community/{{id}}/{{title|slugify}}/index.html" />
+ <title>OpenCSW Q&A Forum</title>
+</head>
+<body>
<div id="logo">
</div>
-</head>
-<body>
-<div id="banner">
-<ul id="answ">
-<li id="answ">
-<a href="http://www.opencsw.org" title="OpenCSW Solaris packages">Home</a>
-</li>
-<li id="answ">
-<a href="http://www.opencsw.org/community" title="OpenCSW OSQA">Questions</a>
-</li>
-</ul>
-</div>
+
+ <div id="banner">
+ <ul id="answ">
+ <li class="answi">
+ <a href="http://www.opencsw.org" title="OpenCSW Solaris packages">Home</a>
+ </li>
+ <li class="answi">
+ <a href="http://www.opencsw.org/community" title="OpenCSW OSQA">Questions</a>
+ </li>
+ </ul>
+ </div>
+
<h1>
{{ title }}
</h1>
-<p>
{{ body }}
-</p>
<p>
asked: {{ added_at|datetimeformat }}
by: {{ username }}
-
</p>
{% for com in comment %}
<hr />
@@ -31,9 +35,7 @@
<p>
{{ com.username }} commented:
</p>
-<p>
{{ com.body }}
-</p>
{% endfor %}
{% for ans in answer %}
@@ -41,17 +43,13 @@
<p>
{{ ans.username }} answers:
</p>
-<p>
{{ ans.body }}
-</p>
{% for com in ans.comment %}
<hr />
<p>
{{ com.username }} commented:
</p>
-<p>
{{ com.body }}
-</p>
{% endfor %}
{% endfor %}
</body>
Added: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/css/style.css
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/css/style.css (rev 0)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/css/style.css 2019-01-28 10:58:56 UTC (rev 26506)
@@ -0,0 +1,160 @@
+/*
+ * OpenCSW modified CSS template
+ * Main palette:
+ * #89CB11 - light green (bar)
+ * Same but darker: #50770a
+ * #3E5867 on #F4F8F9 - text on light grey background / boxes
+ * - this color doesn't fit the other colors
+ */
+
+body {
+ /*overflow-y: scroll;
+ height: 100%; */
+ background: none repeat scroll 0 0 #FFFFFF;
+ color: #000000;
+ font-family: sans-serif;
+ font-size: 12px;
+ line-height: 150%;
+ margin: 0;
+ padding: 0;
+}
+
+div {
+ margin: 0 auto;
+ padding: 0;
+}
+
+h1, h2, h3, form, img, p {
+ border: medium none;
+ margin: 0;
+ padding: 0;
+}
+
+label {
+ vertical-align: middle;
+}
+
+hr {
+ border-color: #CCCCCE -moz-use-text-color -moz-use-text-color;
+ border-right: medium none;
+ border-style: dashed none none;
+ border-width: 1px medium medium;
+}
+
+p {
+ font-size: 13px;
+ line-height: 140%;
+ margin-bottom: 13px;
+}
+
+li.answi a {
+ color: #ffffff;
+ text-decoration: none;
+}
+
+li.answi a:hover {
+ text-shadow: 1px 1px 1px #000;
+}
+
+a {
+ color: #3060A8;
+ text-decoration: none;
+}
+a:visited{
+ color:#1F2F8A;
+ text-decoration: none;
+}
+a:hover{
+ text-decoration: underline;
+}
+
+.clear {
+ clear: both;
+ width: 0px;
+ height: 0px;
+}
+
+h1 {
+ color: #3060ab;
+ font-size: 160%;
+ padding: 5px 0;
+ line-height: 110%;
+ overflow: hidden;
+}
+
+h2 {
+ font-size: 140%;
+ padding: 3px 0;
+ line-height: 110%;
+}
+
+h3 {
+ font-size: 120%;
+ padding: 3px 0;
+ line-height: 110%;
+}
+
+ul#answ {
+ list-style: none;
+ padding: 0px 28px 0px 18px;
+}
+
+ol {
+ list-style: decimal outside none;
+ margin-bottom: 1em;
+ margin-left: 30px;
+ padding-left: 0;
+}
+
+td ul {
+ vertical-align: middle;
+}
+
+li.answi {
+ float: left;
+ padding: 5px 10px;
+ font: 100%/1.5 "Lucida Grande", "Helvetica Neue", Arial, "Lucida Sans Unicode", sans-serif;
+ font-size: 175%;
+}
+
+pre {
+ background-color: #F5F5F5;
+ font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace;
+ font-size: 90%;
+ margin-bottom: 10px;
+ overflow: auto;
+ padding-left: 5px;
+ padding-top: 5px;
+ white-space: pre-wrap;
+}
+
+code {
+ font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace;
+ font-size: 90%;
+ white-space: pre-wrap;
+}
+
+blockquote {
+ background-color: #F5F5F5;
+ margin-bottom: 10px;
+ margin-right: 15px;
+ padding: 10px 0 1px 10px;
+ max-width: 650px;
+}
+
+blockquote blockquote {
+ margin: 0;
+ padding: 0;
+}
+
+#logo {
+ height: 75px;
+ background: url("../images/logo_1.png") no-repeat;
+ margin: 20px 0px 5px 0px;
+}
+
+#banner {
+ height: 41px;
+ background-color: #89CB11;
+ margin: 5px 0px 20px 0px;
+}
Modified: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_answer_html.py
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_answer_html.py 2019-01-25 12:26:38 UTC (rev 26505)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_answer_html.py 2019-01-28 10:58:56 UTC (rev 26506)
@@ -21,6 +21,10 @@
def Slugify(s):
return '-'.join(x for x in re.findall('[0-9a-z_]*', s.lower()) if x)
+ at environmentfilter
+def slugify(env, s):
+ return Slugify(s)
+
def WriteFile(root_dir, dir2, filename, content):
try:
os.makedirs(os.path.join(root_dir, dir2))
@@ -32,15 +36,17 @@
fd.write(content.encode(ENCODING))
def ProcessQuestion(question):
+ env = Environment(loader=FileSystemLoader(searchpath="./"))
+ env.filters['datetimeformat'] = datetimeformat
+ env.filters['slugify'] = slugify
+ tmpl = env.get_template('answer.html.tmpl')
+ html = tmpl.render(**question)
+
id = question['id']
slug = Slugify(question['title'])
dir_name_2 = str(id) + '/' + slug
filename = dir_name_2 + '/index.html'
- env = Environment(loader=FileSystemLoader(searchpath="./"))
- env.filters['datetimeformat'] = datetimeformat
- tmpl = env.get_template('answer.html.tmpl')
- html = tmpl.render(**question)
WriteFile(HTML_PATH, dir_name_2, filename, html)
Modified: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_quest_html.py
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_quest_html.py 2019-01-25 12:26:38 UTC (rev 26505)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/generate_quest_html.py 2019-01-28 10:58:56 UTC (rev 26506)
@@ -21,8 +21,10 @@
env = Environment(loader=FileSystemLoader(searchpath="./"))
env.filters['slugify'] = slugify
tmpl = env.get_template('question.html.tmpl')
+
+ questions.sort(key = lambda q: q['title'] )
qd = {'questions': questions }
- import pdb; pdb.set_trace()
+
html = tmpl.render(**qd)
with open(os.path.join(HTML_PATH, filename), 'w') as fd:
fd.write(html.encode(ENCODING))
Added: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/images/logo_1.png
===================================================================
(Binary files differ)
Index: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/images/logo_1.png
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/images/logo_1.png 2019-01-25 12:26:38 UTC (rev 26505)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/images/logo_1.png 2019-01-28 10:58:56 UTC (rev 26506)
Property changes on: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/images/logo_1.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Modified: csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/question.html.tmpl
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/question.html.tmpl 2019-01-25 12:26:38 UTC (rev 26505)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/osqa-migration/question.html.tmpl 2019-01-28 10:58:56 UTC (rev 26506)
@@ -1,29 +1,36 @@
-<link href="./css/style.css" rel="stylesheet" type="text/css" media="all">
-<html>
+<!DOCTYPE html>
+<html lang="en">
<head>
+ <link href="./css/style.css" rel="stylesheet" type="text/css" media="all" />
+ <meta charset="UTF-8"/>
+ <title>OpenCSW Q&A Forum</title>
+</head>
+<body>
<div id="logo">
</div>
-</head>
-<body>
-<div id="banner">
-<ul id="answ">
-<li id="answ">
-<a href="http://www.opencsw.org" title="OpenCSW Solaris packages">Home</a>
-</li>
-<li id="answ">
-<a href="http://www.opencsw.org/community" title="OpenCSW OSQA">Questions</a>
-</li>
-</ul>
-</div>
+
+ <div id="banner">
+
+ <ul id="answ">
+ <li class="answi">
+ <a href="http://www.opencsw.org" title="OpenCSW Solaris packages">Home</a>
+ </li>
+ <li class="answi">
+ <a href="http://www.opencsw.org/community" title="OpenCSW OSQA">Questions</a>
+ </li>
+ </ul>
+ </div>
+<p>
+We retired the OSQA community website and archive the posts. This web site offers the content collected the last years. If you have a question, write to the users mailing list users at lists.opencsw.org or join the IRC #opencsw.
+</p>
<h1>
OSQA Community questions
</h1>
-</p>
<ul id="quest">
{% for quest in questions %}
-<li>
-<a href={{ quest.id }}/{{ quest.title|slugify }}/index.html >{{ quest.title }}</a>
-</li>
+ <li>
+ <a href={{ quest.id }}/{{ quest.title|slugify }}/index.html >{{ quest.title }}</a>
+ </li>
{% endfor %}
</ul>
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list