Skip to content

Commit

Permalink
attended to tasks in #29
Browse files Browse the repository at this point in the history
  • Loading branch information
jueyang committed Feb 4, 2013
1 parent ad60d87 commit 282413b
Show file tree
Hide file tree
Showing 10 changed files with 309 additions and 189 deletions.
26 changes: 14 additions & 12 deletions _layouts/contribute.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
layout: default
---
<div class='cell4 pad1 contribute-intro marginL'>
<h4>{{ page.contributetitle }}</h4>
<p>{{ content }}</p>
</div>
<div class='cell6 pad1 contribute-links marginL'>
<!-- <h4>{{page.startwith}}</h4> -->
<ul>
<li><a href='#'>{{page.startA}}</a></li>
<li><a href='#'>{{page.startB}}</a></li>
<li><a href='#'>{{page.startC}}</a></li>
<li><a href='#'>{{page.startD}}</a></li>
</div>
<div class='cell9 padAll marginL'>
<div class='cell7 marginR contribute-intro'>
<h4>{{ page.contributetitle }}</h4>
<p>{{ content }}</p>
</div>
<div class='cell4 contribute-links'>
<h4>{{page.startwith}}</h4>
<ul>
<li><a href='#'>{{page.startA}}</a></li>
<li><a href='#'>{{page.startB}}</a></li>
<li><a href='#'>{{page.startC}}</a></li>
<li><a href='#'>{{page.startD}}</a></li>
</div>
</div>
31 changes: 19 additions & 12 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,46 @@
<a lang='id'>Indonesian</a> |
<a lang='es'>Spanish</a>
</small>
<!-- small search bar does not appear on the front page -->
{% unless page.fronttitle or page.contributetitle%}
<form class='searchbox-default rounded'>
<span class='logo logo-search'></span>
<input id='search-field' type='text' name='search' class='default-value'></input>
</form>
{% endunless%}
</div>
<div id='header' class='{% unless page.fronttitle or page.cover %} withborder {% endunless %} cell12'>
<div id='limiter' class='marginL cell9 pad1'>
<div class='cell4'>
<div id='header' class='cell12'>
<div class='marginL cell9 padAll'>
<div class='cell7 marginR'>
<span><a href='{{site.baseurl}}/{{page.lang}}' class="logo logo-learn"></a></span>
<span class='tagline'>{{site.translations.[page.lang].tagline}}</span>
</div>
<div class='cell4'>
<ul class='ourguides cell3'>
<div class='ourguides cell4'>
<span class = 'cell3 marginR'>{{page.ourguides}}</span>
<ul class='cell3'>
{% for post in site.posts %}
{% if {{post.lang}} == {{page.lang}} and {{post.cover}} %}
<li>
<div class='title'><a href="{{site.baseurl}}{{ post.url }}">{{ post.title }}</a></div>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</li>
</ul>
</div>
<div class='cell4'>
<a class='banner cell3' href='{{site.baseurl}}/{{page.lang}}/contribute'>{{site.translations.[page.lang].contribute}}</a>
</div>
<a class='banner'></a>
</div>
</div>
<div id='content' class='cf'>
{{ content }}
</div>
<small id='footer' class='fillG cell12'>
<ul class='contact marginL marginR cell5 pad1'>
<ul class='contact marginL marginR cell5 padAll'>
<li><a class='email' href="mailto:[email protected]">[email protected]</a></li>
<li><a class='twitter' href="https://twitter.com/learnosm">@learnOSM</a></li>
<li><a class='translation' href='{{site.baseurl}}/en/status'>Translation Status</a></li>
</ul>
<div class='cell3 pad1'>
<div class='cell3 padAll'>
<span>
Official HOT OSM learning materials |
<a href='github.com/hotosm/learnosm'> Hosted on Github</a>
Expand All @@ -78,8 +78,15 @@
</div>
</body>
<script>
$('.banner').hover(
function() {
$(this).addClass('active').attr('href','{{site.baseurl}}/{{page.lang}}/contribute').append('<span>{{site.translations.[page.lang].contribute}}</span>')
},
function() {
$(this).removeClass('active').attr('href','').empty();
}
);
$.getJSON("{{site.baseurl}}/{{page.lang}}.json",function(data){
console.log(data);
var destination;
$( "#search-field" ).autocomplete({
autoFocus: true, // highlight the first search result in dropdown
Expand Down
99 changes: 49 additions & 50 deletions _layouts/doc.html
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
---
layout: default
---
<div class='cell12'>
<div class='doc-nav marginL cell2 pad1 cf'>
<ul>
<div class='doc-nav marginL cell2 padAll cf'>
<ul>

{% for post in site.categories.[page.category] %}
{% if {{post.lang}} == {{page.lang}} %}
<li class='doc rounded'>
<a class='title {% if {{post.cover}} %}cover{% endif %} {% if page.url == post.url %}active{% endif %}' href="{{site.baseurl}}{{ post.url }}">
<span>{{ post.title }}</span>
</a>
</li>
{% endif %}
{% endfor %}
{% for post in site.categories.[page.category] %}
{% if {{post.lang}} == {{page.lang}} %}
<li class='doc rounded'>
<a class='title {% if {{post.cover}} %}cover{% endif %} {% if page.url == post.url %}active{% endif %}' href="{{site.baseurl}}{{ post.url }}">
<span>{{ post.title }}</span>
</a>
</li>
{% endif %}
{% endfor %}

</ul>
</div>
<div class='doc-main doc cell6 pad1'>
{% if {{page.cover}} %}
<h1>Overview</h1>
{% endif %}
{{content}}
{% if {{page.cover}} %}
<div class='training pad1'>
<span>Are you a workshop organizer?</span>
Check out the <a href='#'>training material</a> for {{page.title}} Guide.
</div>
{% endif %}
{% unless {{page.cover}} %}
<div class='feedback pad1'>
<span>Was this chapter helpful?</span>
<a href='mailto:[email protected]'>Let us know</a> or
<a href='{{site.baseurl}}/{{page.lang}}/contribute'>help us improve the guides</a>
</ul>
</div>
<div class='doc-main doc cell6 padAll'>
{% if {{page.cover}} %}
<h1>Overview</h1>
{% endif %}
{{content}}
{% if {{page.cover}} %}
<div class='training padAll'>
<!-- translation needed through post-->
<span>Are you a workshop organizer?</span>
Check out the <a href='#'>training material</a> for {{page.title}} Guide.
</div>
{% endunless %}
{% endif %}
{% unless {{page.cover}} %}
<div class='feedback padAll'>
<span>Was this chapter helpful?</span>
<a href='mailto:[email protected]'>Let us know</a> or
<a href='{{site.baseurl}}/{{page.lang}}/contribute'>help us improve the guides</a>
</div>
{% endunless %}
</div>

<script>
Expand Down Expand Up @@ -64,25 +63,25 @@ <h1>Overview</h1>
});

// clickable thumbnail
$('.doc img').bind('click',function(){
var original = $(this);
var fullimage = $('<img class="fullimage" style="max-width:520px;">')
.attr('src',original.attr('src'))
.css('top',original.prop('offsetTop'))
.bind('click',closeImg);
var close = $('<span class="imageclose logo"></span>')
.css('top',original.prop('offsetTop'))
.css('left',original.prop('offsetLeft') + fullimage.prop('width') + 12)
.bind('click',closeImg);
function closeImg(){
fullimage.remove();
close.remove();
};
// only expand big enough images
if (original.prop('naturalWidth') > 200 ) {
original.parent().append(fullimage).append(close);
}
});
// $('.doc img').bind('click',function(){
// var original = $(this);
// var fullimage = $('<img class="fullimage" style="max-width:520px;">')
// .attr('src',original.attr('src'))
// .css('top',original.prop('offsetTop'))
// .bind('click',closeImg);
// var close = $('<span class="imageclose logo"></span>')
// .css('top',original.prop('offsetTop'))
// .css('left',original.prop('offsetLeft') + fullimage.prop('width') + 12)
// .bind('click',closeImg);
// function closeImg(){
// fullimage.remove();
// close.remove();
// };
// // only expand big enough images
// if (original.prop('naturalWidth') > 200 ) {
// original.parent().append(fullimage).append(close);
// }
// });

// make doc-nav sticky
// TODO make the fixed element not conflict with footer
Expand Down
57 changes: 28 additions & 29 deletions _layouts/front.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
---
layout: default
---
<div id='front-links' class='cell12'>
<div id='limiter' class='marginL cell9 pad1'>
<div class='link1 cell4'>
<a href='{{site.baseurl}}/{{page.lang}}/beginner'>
<span>{{ page.begspan }}</span>
{{ page.beg }}
</a>
</div>
<div class='link2 cell4'>
<a href='{{site.baseurl}}/{{page.lang}}/intermediate'>
<span>{{ page.interspan }}</span>
{{ page.inter }}
</a>
</div>
<div class='link3 cell4'>
<a href='{{site.baseurl}}/{{page.lang}}/advanced'>
<span> {{ page.advspan }}</span>
{{ page.adv }}
</a>
</div>
<div id='ads' class='marginL cell9 padAll'>
<div class='ad1 cell8'>
<a href='{{site.baseurl}}/{{page.lang}}/beginner'>
<span>{{ page.begspan }}</span>
{{ page.beg }}
</a>
</div>
</div>
<div id='front-text' class='cell12'>
<div class='marginL cell9 pad1'>
<form class='searchbox rounded'>
<span class='logo logo-search'></span>
<input id='search-field' type='text' name='search' class='default-value cell10'></input>
</form>
<div class='ad2 cell4'>
<a href='{{site.baseurl}}/{{page.lang}}/intermediate'>
<!-- needs translation -->
<span>Looking for more guides?</span>
More guides available
</a>
</div>
<div class='ad3 cell4'>
<a href='{{site.baseurl}}/{{page.lang}}/advanced'>
<span>Organizing a workshop?</span>
Check out the trainers materials
</a>
</div>
<div class='marginL marginR cell5 pad1'>
</div>
<div class='marginL cell9 padAll'>
<form class='searchbox rounded'>
<span class='logo logo-search'></span>
<input id='search-field' type='text' name='search' class='default-value cell10'></input>
</form>
</div>
<div class='marginL cell9 padAll'>
<div class='front-text cell7 marginR'>
<h4 class='tagtitle'>{{ page.fronttitle }}</h4>
<p class='tagwords'>{{ page.frontintro }}</p>
</div>
<div class='faqbox cell3 pad1'>
<div class='faqbox cell4'>
<h4>{{page.faq}}</h4>
<ul class='faq'>
<li><a href='#'>{{page.faqA}}</a></li>
Expand Down
Empty file removed _layouts/inprogess.html
Empty file.
3 changes: 2 additions & 1 deletion _posts/en/0100-01-01-404.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ nosearch: true
<div class='pad1 notfound rounded'>
<span></span>
<h1>404: page not found</h1>
<p><a href='mailto:[email protected]'>Let us know</a> if you think it should be here.</p>
<p>The content you are looking for is currently in the process of being migrated from the old site or other sources. Please check again shortly.
If you'd like to speed up the process of the transition, [follow our threads on github](https://github.com/hotosm/learnosm/issues) and help us improve. Thanks!<a href='mailto:[email protected]'>Let us know</a> if you think it should be here.</p>
</div>
4 changes: 0 additions & 4 deletions _posts/en/0100-01-01-inprogress.md

This file was deleted.

Binary file modified images/sprites/sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 140 additions & 42 deletions images/sprites/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 282413b

Please sign in to comment.