Skip to content

Commit

Permalink
Adding IRC Chat to Webpage, Changes to some Layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mach0 committed Jun 20, 2013
1 parent 94a93d5 commit 224120b
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 8 deletions.
6 changes: 4 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
# for source files.
# Deprecated since version 1.0 of sphinx .. use exclude_patterns instead
# exclude_trees = ['buildout', 'build']
exclude_patterns = ['build']
exclude_patterns = ['build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None

Expand Down Expand Up @@ -173,7 +173,9 @@

# Additional templates that should be rendered to pages, maps page names to
# template names.
html_additional_pages = {'index': 'index.html'}
html_additional_pages = {
'index': 'index.html',
'irchat': 'irchat.html'}

# If false, no module index is generated.
#html_use_modindex = True
Expand Down
71 changes: 71 additions & 0 deletions docs/templates/irchat-en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<is></is>{% extends "inasafe-base.html" %}
{% set title = 'Live Chat' %}

{% block hero %}
<iframe src="http://webchat.freenode.net?channels=inasafe&uio=MTE9MzE28"
width="700" height="400"></iframe>
{% endblock %}
{% block body %}
<div class="alert alert-info centered">
<a href="../id/irchat.html">Ganti ke Bahasa Indonesia!</a>
</div>
<div class="alert alert-info left">
<h3>Help using <span class="inasafe">InaSAFE</span> IRC-Chat</h3>
</div>
<div class="row" id="blocks-row">
<div class="span4">
{# We put the admonition inside the span because adding border #}
{# to the span will mess up the layout #}
<div class="admonition">
<h5>Login:</h5>
<div class="alert alert-block">
<ul>
<li>Enter a Nickname in the Nickname Field.
</li>
<li>Read the CAPTCHA and enter it in the Field below.
</li>
<li>Click on Connect.
</li>
<li>The Chat-window will open.
</li>
<li>If you cannot read the CAPTCHA click the Reload
button. Another CAPTCHA will appear which you
might be able to read.
</li>
</ul>
</div>
</div>
</div>
<div class="span4">
<div class="admonition">
<h5>Rules:</h5>
<div class="alert alert-block">
<ul>
<li>Ask your question without asking to ask.
</li>
<li>Be patient. There is not always someone around at
the very same second answering your question.
</li>
<li>Wait for some time. Your message is readable for
other users that are inside the chat. It might
take a bit to answer you question too.
</li>
</ul>
</div>
</div>
</div>
<div class="span4">
<div class="admonition">
<h5>Logout:</h5>
Just click on a menu item to go to another page or close
the browser window. No need to logout.
</div>
</div>
</div>

<div class="alert alert-danger centered">
Disclaimer: Neither AIFDR and AusAID, nor the World Bank-GFDRR take
any responsibility for the correctness of outputs from InaSAFE or
decisions derived as a consequence.
</div>
{% endblock %}
71 changes: 71 additions & 0 deletions docs/templates/irchat-id.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<is></is>{% extends "inasafe-base.html" %}
{% set title = 'Live Chat' %}

{% block hero %}
<iframe src="http://webchat.freenode.net?channels=inasafe&uio=MTE9MzE28"
width="700" height="400"></iframe>
{% endblock %}
{% block body %}
<div class="alert alert-info centered">
<a href="../id/irchat.html">Ganti ke Bahasa Indonesia!</a>
</div>
<div class="alert alert-info left">
<h3>Help using <span class="inasafe">InaSAFE</span> IRC-Chat</h3>
</div>
<div class="row" id="blocks-row">
<div class="span4">
{# We put the admonition inside the span because adding border #}
{# to the span will mess up the layout #}
<div class="admonition">
<h5>Login:</h5>
<div class="alert alert-block">
<ul>
<li>Enter a Nickname in the Nickname Field.
</li>
<li>Read the CAPTCHA and enter it in the Field below.
</li>
<li>Click on Connect.
</li>
<li>The Chat-window will open.
</li>
<li>If you cannot read the CAPTCHA click the Reload
button. Another CAPTCHA will appear which you
might be able to read.
</li>
</ul>
</div>
</div>
</div>
<div class="span4">
<div class="admonition">
<h5>Rules:</h5>
<div class="alert alert-block">
<ul>
<li>Ask your question without asking to ask.
</li>
<li>Be patient. There is not always someone around at
the very same second answering your question.
</li>
<li>Wait for some time. Your message is readable for
other users that are inside the chat. It might
take a bit to answer you question too.
</li>
</ul>
</div>
</div>
</div>
<div class="span4">
<div class="admonition">
<h5>Logout:</h5>
Just click on a menu item to go to another page or close
the browser window. No need to logout.
</div>
</div>
</div>

<div class="alert alert-danger centered">
Disclaimer: Neither AIFDR and AusAID, nor the World Bank-GFDRR take
any responsibility for the correctness of outputs from InaSAFE or
decisions derived as a consequence.
</div>
{% endblock %}
2 changes: 2 additions & 0 deletions docs/themes/inasafe-theme/inasafe-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@
</li>
<li><a href="https://github.com/AIFDR/inasafe">Get the code</a>
</li>
<li><a href="{{ pathto(master_doc) }}/../irchat.html">Chat live!</a>
</li>
<li><div id="searchbox">
<form class="navbar-form pull-right" id="search" action="{{ pathto(master_doc) }}/../search.html" method="get">
<input type="text" name="q" placeholder="Search"/>
Expand Down
8 changes: 7 additions & 1 deletion docs/themes/inasafe-theme/static/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ h3 {

.navbar .nav {
margin-top: 20px;
background-color: #fdfdfd;
background-color: rgba(255, 255, 255, 0.85);;
padding-right: 15px;
border-radius: 6px;
}

.navbar-inverse .navbar-inner {
Expand Down Expand Up @@ -167,6 +169,10 @@ span.inasafe {
text-shadow: none;
}

.alert-block {
color: #000000;
}

.alert-info {
color: #f76926;
background-color: #fee8d1;
Expand Down
14 changes: 9 additions & 5 deletions scripts/post_translate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,13 @@ do
# HTML Generation
#
#################################
# Now prepare the index-[locale] template which is a manually translated,
# unique per locale page that gets copied to index.html for the doc
# Now prepare the index/irchat-[locale] template which is a manually translated,
# unique per locale page that gets copied to index.html/irchat.html for the doc
# generation process.
cp templates/index-${LOCALE}.html templates/index.html
echo "Copied index for '${LOCALE}'"
cp templates/irchat-${LOCALE}.html templates/irchat.html
echo "Copied irchat '${LOCALE}'"

echo "Building HTML for locale '${LOCALE}'..."
LOG=/tmp/sphinx$$.log
Expand All @@ -135,11 +138,12 @@ do

# Remove the static html copy again
rm templates/index.html
rm templates/irchat.html

# hack to avoid error when using Search in contents.html but search
# itself still does not work

# hack to avoid error when using Search in contents.html
rpl -q '#/../search.html' 'search.html' ./output/html/${LOCALE}/contents.html
# same applies for having the IRC-Chat Navigation Link
rpl -q '#/../irchat.html' 'irchat.html' ./output/html/${LOCALE}/contents.html

#################################
#
Expand Down

0 comments on commit 224120b

Please sign in to comment.