Skip to content

Commit 68957ba

Browse files
committed
fix XML style + formatting
1 parent bbbb525 commit 68957ba

1 file changed

Lines changed: 89 additions & 98 deletions

File tree

_layouts/01_splash.html

Lines changed: 89 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
<!-- header -->
1212
<div class='splash'>
1313
<div class='gradient'>
14-
<div class='col12 clearfix prose'>
15-
<div id='logo' class='col5 margin2 pad4y fl'><h1 class='fancy dark'>mapnik</h1></div>
16-
<div id='tagline' class='col5 space-top4 dark pad4y prose fr'>the core of geospatial visualization &amp; processing</div>
17-
</div>
18-
<div id='intro' class='col9 margin2 pad2y dark big'>mapnik combines pixel-perfect image output with lightning-fast cartographic algorithms, and exposes interfaces in C++, Python, and Node.</div>
19-
<div id='intro' class='col9 margin2 pad2y dark big'>
20-
<a href='{{site.baseurl}}/pages/downloads.html' class='button stroke white col5'>Download mapnik</a>
21-
</div>
22-
<div id='intro' class='col9 margin2 pad2y'>
23-
<a class="github-button" href="https://github.com/mapnik/mapnik/fork" data-style="mega" data-count-href="/mapnik/mapnik/network" data-count-api="/repos/mapnik/mapnik#forks_count" data-count-aria-label="# forks on GitHub" aria-label="Fork mapnik/mapnik on GitHub">Fork</a>
24-
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
25-
</div>
14+
<div class='col12 clearfix prose'>
15+
<div id='logo' class='col5 margin2 pad4y fl'><h1 class='fancy dark'>mapnik</h1></div>
16+
<div id='tagline' class='col5 space-top4 dark pad4y prose fr'>the core of geospatial visualization &amp; processing</div>
17+
</div>
18+
<div id='intro' class='col9 margin2 pad2y dark big'>mapnik combines pixel-perfect image output with lightning-fast cartographic algorithms, and exposes interfaces in C++, Python, and Node.</div>
19+
<div id='intro' class='col9 margin2 pad2y dark big'>
20+
<a href='{{site.baseurl}}/pages/downloads.html' class='button stroke white col5'>Download mapnik</a>
21+
</div>
22+
<div id='intro' class='col9 margin2 pad2y'>
23+
<a class="github-button" href="https://github.com/mapnik/mapnik/fork" data-style="mega" data-count-href="/mapnik/mapnik/network" data-count-api="/repos/mapnik/mapnik#forks_count" data-count-aria-label="# forks on GitHub" aria-label="Fork mapnik/mapnik on GitHub">Fork</a>
24+
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
25+
</div>
2626

2727
</div>
2828
<!-- map design -->
@@ -32,56 +32,56 @@
3232
<div class='full-content'>
3333
<!-- mapnik latest news --><a name='latest-news'></a>
3434
<div class='content prose col12 clearfix fill-white'>
35-
<div class='col10 margin2 pad2y big'>latest news</div>
36-
{% for post in site.categories.Mapnik limit:4 %}{% if post.type != 'install' %}
37-
{% capture modulo %}{{ forloop.index0 | mod:4 }}{% endcapture %}
38-
{% assign author = site.data.author[post.author] %}
39-
{% if modulo == '0' or forloop.first %}
40-
{% assign post1-author = post.author %}{% assign post1-title = post.title %}{% assign post1-date = post.date %}
41-
{% assign post1-url = post.url %}{% assign post1-img = author[0].image %}{% assign post1-excerpt = post.excerpt %}
42-
{% assign post1-github = author[0].github %}
43-
{% endif %}
44-
{% if modulo == '1' %}
45-
{% assign post2-author = post.author %}{% assign post2-title = post.title %}{% assign post2-date = post.date %}
46-
{% assign post2-url = post.url %}{% assign post2-img = author[0].image %}{% assign post2-excerpt = post.excerpt %}
47-
{% assign post2-github = author[0].github %}
48-
{% endif %}
49-
{% if modulo == '2' %}
50-
{% assign post3-author = post.author %}{% assign post3-title = post.title %}{% assign post3-date = post.date %}
51-
{% assign post3-url = post.url %}{% assign post3-img = author[0].image %}{% assign post3-excerpt = post.excerpt %}
52-
{% assign post3-github = author[0].github %}
53-
{% endif %}
54-
{% if modulo == '3' or forloop.last %}
55-
{% assign post4-author = post.author %}{% assign post4-title = post.title %}{% assign post4-date = post.date %}
56-
{% assign post4-url = post.url %}{% assign post4-img = author[0].image %}{% assign post4-excerpt = post.excerpt %}
57-
{% assign post4-github = author[0].github %}
58-
{% endif %}
59-
{% endif %}{% endfor %}
60-
61-
<div class='col6 margin2 pad1y space-bottom4'>
62-
<div class='col3'>
63-
<h2 class='med-news'><a href="{{site.baseurl}}{{ post1-url }}"> {{ post1-title }}</a></h2>
64-
<div class='col12'>
65-
<div class='col12'><span class='date'>{{ post1-date | date: "%b %d, %Y" }}</span></div>
66-
<div class='col2 space-top1'><img class='dot fl' src='{{ post1-img }}' width='30'></div>
67-
<div class='col9 space-top1'><span class='date pad1x'>
68-
{% if post1-github != null %}
69-
<a href='{{ post1-github }}'>{{ post1-author }}</a>
70-
{% else %}
71-
{{ post1-author }}
72-
{% endif %}
73-
</span></div>
74-
</div>
75-
</div>
76-
<div class='col9'>
77-
<div class='col1'><img class='fl' src='images/quote-L.png' width='30'></div>
78-
<div class='col11 pad1x'>{{ post1-excerpt }} <a class='news' href="{{site.baseurl}}{{ post1-url }}">read more >> </a></div>
79-
</div>
80-
</div>
81-
<div class='col4 pad4x space-top1'>
82-
<div class='col12 space-bottom2'>
83-
<a href="{{site.baseurl}}{{ post2-url }}">{{ post2-title }}</a><br>
84-
<span class='date'>{{ post2-date | date: "%b %d, %Y" }} | {% if post2-github != null %}<a href='{{ post2-github }}'>{{ post2-author }}</a>{% else %}{{ post2-author }}{% endif %}</span></p>
35+
<div class='col10 margin2 pad2y big'>latest news</div>
36+
{% for post in site.categories.Mapnik limit:4 %}{% if post.type != 'install' %}
37+
{% capture modulo %}{{ forloop.index0 | mod:4 }}{% endcapture %}
38+
{% assign author = site.data.author[post.author] %}
39+
{% if modulo == '0' or forloop.first %}
40+
{% assign post1-author = post.author %}{% assign post1-title = post.title %}{% assign post1-date = post.date %}
41+
{% assign post1-url = post.url %}{% assign post1-img = author[0].image %}{% assign post1-excerpt = post.excerpt %}
42+
{% assign post1-github = author[0].github %}
43+
{% endif %}
44+
{% if modulo == '1' %}
45+
{% assign post2-author = post.author %}{% assign post2-title = post.title %}{% assign post2-date = post.date %}
46+
{% assign post2-url = post.url %}{% assign post2-img = author[0].image %}{% assign post2-excerpt = post.excerpt %}
47+
{% assign post2-github = author[0].github %}
48+
{% endif %}
49+
{% if modulo == '2' %}
50+
{% assign post3-author = post.author %}{% assign post3-title = post.title %}{% assign post3-date = post.date %}
51+
{% assign post3-url = post.url %}{% assign post3-img = author[0].image %}{% assign post3-excerpt = post.excerpt %}
52+
{% assign post3-github = author[0].github %}
53+
{% endif %}
54+
{% if modulo == '3' or forloop.last %}
55+
{% assign post4-author = post.author %}{% assign post4-title = post.title %}{% assign post4-date = post.date %}
56+
{% assign post4-url = post.url %}{% assign post4-img = author[0].image %}{% assign post4-excerpt = post.excerpt %}
57+
{% assign post4-github = author[0].github %}
58+
{% endif %}
59+
{% endif %}{% endfor %}
60+
61+
<div class='col6 margin2 pad1y space-bottom4'>
62+
<div class='col3'>
63+
<h2 class='med-news'><a href="{{site.baseurl}}{{ post1-url }}"> {{ post1-title }}</a></h2>
64+
<div class='col12'>
65+
<div class='col12'><span class='date'>{{ post1-date | date: "%b %d, %Y" }}</span></div>
66+
<div class='col2 space-top1'><img class='dot fl' src='{{ post1-img }}' width='30'></div>
67+
<div class='col9 space-top1'><span class='date pad1x'>
68+
{% if post1-github != null %}
69+
<a href='{{ post1-github }}'>{{ post1-author }}</a>
70+
{% else %}
71+
{{ post1-author }}
72+
{% endif %}
73+
</span></div>
74+
</div>
75+
</div>
76+
<div class='col9'>
77+
<div class='col1'><img class='fl' src='images/quote-L.png' width='30'></div>
78+
<div class='col11 pad1x'>{{ post1-excerpt }} <a class='news' href="{{site.baseurl}}{{ post1-url }}">read more >> </a></div>
79+
</div>
80+
</div>
81+
<div class='col4 pad4x space-top1'>
82+
<div class='col12 space-bottom2'>
83+
<a href="{{site.baseurl}}{{ post2-url }}">{{ post2-title }}</a><br>
84+
<span class='date'>{{ post2-date | date: "%b %d, %Y" }} | {% if post2-github != null %}<a href='{{ post2-github }}'>{{ post2-author }}</a>{% else %}{{ post2-author }}{% endif %}</span></p>
8585
</div>
8686
<div class='col12 space-bottom2'>
8787
<a href="{{site.baseurl}}{{ post3-url }}">{{ post3-title }}</a><br>
@@ -110,22 +110,22 @@ <h2 class='med-news'><a href="{{site.baseurl}}{{ post1-url }}"> {{ post1-title }
110110
<div class='col12 pad8y clearfix'>
111111

112112
<div class="container">
113-
<ul class='tabs'>
114-
<li class='tab-link current' data-tab='tab-1'>Python</li>
115-
<li class='tab-link' data-tab='tab-2'>Node</li>
116-
<li class='tab-link' data-tab='tab-3'>C++</li>
117-
</ul>
118-
<div id="tab-1" class="tab-content current">
113+
<ul class='tabs'>
114+
<li class='tab-link current' data-tab='tab-1'>Python</li>
115+
<li class='tab-link' data-tab='tab-2'>Node</li>
116+
<li class='tab-link' data-tab='tab-3'>C++</li>
117+
</ul>
118+
<div id="tab-1" class="tab-content current">
119119
{% highlight python %}
120120
import mapnik
121121
m = mapnik.Map(256,256)
122122
mapnik.load_map(m, 'path/to/file.xml')
123123
m.zoom_all()
124124
mapnik.render_to_file(m, 'the_image.png')
125125
{% endhighlight %}
126-
</div>
126+
</div>
127127

128-
<div id="tab-2" class="tab-content">
128+
<div id="tab-2" class="tab-content">
129129
{% highlight js %}
130130
var mapnik = require('mapnik');
131131
var fs = require('fs');
@@ -138,19 +138,19 @@ <h2 class='med-news'><a href="{{site.baseurl}}{{ post1-url }}"> {{ post1-title }
138138
map.zoomAll();
139139
var im = new mapnik.Image(256, 256);
140140
map.render(im, function(err,im) {
141-
if (err) throw err;
142-
im.encode('png', function(err,buffer) {
143-
if (err) throw err;
144-
fs.writeFile('map.png',buffer, function(err) {
145-
if (err) throw err;
146-
console.log('saved map image to map.png');
147-
});
148-
});
141+
if (err) throw err;
142+
im.encode('png', function(err,buffer) {
143+
if (err) throw err;
144+
fs.writeFile('map.png',buffer, function(err) {
145+
if (err) throw err;
146+
console.log('saved map image to map.png');
147+
});
148+
});
149149
});
150150
});
151151
{% endhighlight %}
152-
</div>
153-
<div id="tab-3" class="tab-content">
152+
</div>
153+
<div id="tab-3" class="tab-content">
154154
{% highlight c++ %}
155155
#include <mapnik/map.hpp>
156156
#include <mapnik/load_map.hpp>
@@ -169,14 +169,12 @@ <h2 class='med-news'><a href="{{site.baseurl}}{{ post1-url }}"> {{ post1-title }
169169
mapnik::save_to_file(im, "the_image.png");
170170
}
171171
{% endhighlight %}
172+
</div>
173+
</div>
174+
</div>
175+
</div>
172176
</div>
173177

174-
</div>
175-
</div>
176-
</div>
177-
</div>
178-
179-
180178
<!-- xml stylesheets -->
181179
<a name="xml"></a>
182180
<div class='content col12 clearfix fill-gray'>
@@ -185,42 +183,35 @@ <h2 class='big'>style with a stylesheet</h2>
185183
<div class='col10 pad2y'>Only a single XML stylesheet for your map, regardless of the code binding.</div>
186184
<a href='https://github.com/mapnik/mapnik/wiki/XMLConfigReference' class='space-top1 button stroke light short col8'>XML Configuration</a>
187185
</div>
188-
189186
<div class='col7 pad4x space-bottom4'>
190187
<div class='fill-white'>
191188
{% highlight xml%}
192-
<Map background-color="blue" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
189+
<Map background-color="blue" srs="+init=epsg:4326">
193190
<Style name="My Style">
194191
<Rule>
195192
<PolygonSymbolizer fill="#f2eff9" />
196193
<LineSymbolizer stroke="rgb(50%,50%,50%)" stroke-width="0.1" />
197194
</Rule>
198195
</Style>
199-
<Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
196+
<Layer name="world" srs="+init=epsg:4326">
200197
<StyleName>My Style</StyleName>
201198
<Datasource>
202199
<Parameter name="file">path/to/shapefile.shp</Parameter>
203200
<Parameter name="type">shape</Parameter>
204201
</Datasource>
205202
</Layer>
206-
</Map >
207-
{% endhighlight %}</div>
203+
</Map>
204+
{% endhighlight %}
205+
</div>
208206
</div>
209207
</div>
210208
<!--</div>-->
211-
212209
<!-- blog -->
213210
<div class='fill-gray content col12 clearfix pad1y'>
214-
215211
<div class='big quote center pad4y'>above all else, beautiful maps</div>
216-
217-
218212
</div>
219-
220213
{% include stacks.html %}
221-
222214
{% include footer.html %}
223-
224215
<!-- end content -->
225216
</div>
226217
</body>

0 commit comments

Comments
 (0)