Skip to content

Commit 38e7016

Browse files
committed
Multi-purpose index page.
The index (homepage) now shows only the most recent news items as a full news archive is avaible from the menu. The homepage now includes introductory text about the nginx project and an index of the other significant NGINX open source projects. A new, top-level 'img' directory is created for directly-accessed images and includes .svg files in the `make gzip` target. This requires a corresponding change to the web server configuration.
1 parent 296d803 commit 38e7016

File tree

10 files changed

+543
-13
lines changed

10 files changed

+543
-13
lines changed

GNUmakefile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
OUT = libxslt
33
TEXT = text
44
CSS = css
5+
IMG = img
56
ZIP = gzip
67
NGINX_ORG = /data/www/nginx.org
78
SHELL = tools/umasked.sh
@@ -61,6 +62,7 @@ ARTICLE_DEPS = \
6162
xslt/download.xslt \
6263
xslt/security.xslt \
6364
xslt/versions.xslt \
65+
xslt/projects.xslt \
6466

6567
NEWS_DEPS = \
6668
$(COMMON_DEPS) \
@@ -73,9 +75,10 @@ YEARS = \
7375
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 \
7476
2020 2021 2022 2023 2024
7577

76-
all: news arx 404 css $(LANGS)
78+
all: homepage news arx 404 css $(LANGS)
7779

78-
news: $(OUT)/index.html $(OUT)/news.html $(OUT)/index.rss
80+
homepage: $(OUT)/index.html
81+
news: $(OUT)/news.html $(OUT)/index.rss
7982
arx: $(foreach year,$(YEARS),$(OUT)/$(year).html)
8083
404: $(OUT)/404.html
8184
css: $(foreach f,$(wildcard css/*.css),$(OUT)/$(f))
@@ -137,21 +140,20 @@ $(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/dirindex.html): $(DIRIND_DEPS)
137140
$(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/varindex.html): $(VARIND_DEPS)
138141

139142
$(OUT)/index.html: \
140-
xml/index.xml \
141-
$(NEWS_DEPS)
142-
$(call XSLT, xslt/news.xslt, $<, $@)
143-
144-
$(OUT)/news.html: \
145-
xml/index.xml \
146-
$(NEWS_DEPS)
147-
$(call XSLT, xslt/news.xslt, $<, $@)
143+
xml/homepage.xml \
144+
$(ARTICLE_DEPS)
145+
$(call XSLT, xslt/article.xslt, $<, $@)
148146

149147
$(OUT)/index.rss: \
150148
xml/index.xml \
151149
$(NEWS_DEPS) \
152150
xslt/rss.xslt
153151
$(call XSLT, xslt/rss.xslt, $<, $@)
154152

153+
$(OUT)/news.html: \
154+
xml/index.xml \
155+
$(NEWS_DEPS)
156+
$(call XSLT, xslt/news.xslt, $<, $@)
155157

156158
$(foreach year,$(YEARS),$(OUT)/$(year).html): \
157159
xml/index.xml \
@@ -294,7 +296,7 @@ gzip: rsync_gzip
294296

295297
rsync_gzip:
296298
$(CHMOD) $(OUT) $(TEXT)
297-
$(RSYNC) --delete --exclude='*.gz' $(OUT)/ $(TEXT)/ $(ZIP)/
299+
$(RSYNC) --delete --exclude='*.gz' $(OUT)/ $(TEXT)/ $(IMG) $(ZIP)/
298300

299301
do_gzip: $(addsuffix .gz, $(wildcard $(ZIP)/*.html)) \
300302
$(addsuffix .gz, \
@@ -311,6 +313,7 @@ do_gzip: $(addsuffix .gz, $(wildcard $(ZIP)/*.html)) \
311313
$(addsuffix .gz, $(wildcard $(ZIP)/ru/CHANGES.ru-?.??)) \
312314
$(addsuffix .gz, $(wildcard $(ZIP)/keys/*.key)) \
313315
$(addsuffix .gz, $(wildcard $(ZIP)/css/*.css)) \
316+
$(addsuffix .gz, $(wildcard $(ZIP)/img/*.svg)) \
314317

315318
find $(ZIP) -type f ! -name '*.gz' -exec test \! -e {}.gz \; -print
316319

css/style_en.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ center h4 {
7878
text-align: left!important;
7979
}
8080

81+
h5 {
82+
font-size: 1.25rem;
83+
text-align: center;
84+
margin: 0.25rem 0 0 0;
85+
}
86+
8187
p {
8288
text-align: justify;
8389
margin-bottom: 0;

css/style_ru.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ center h4 {
7878
text-align: left!important;
7979
}
8080

81+
h5 {
82+
font-size: 1.25rem;
83+
text-align: center;
84+
margin: 0.25rem 0 0 0;
85+
}
86+
8187
p {
8288
text-align: justify;
8389
margin-bottom: 0;

dtd/content.dtd

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-->
55

66
<!ELEMENT section (para | list | book | download | security | note |
7-
programlisting | table | section)* >
7+
programlisting | table | section | topnews | projects)* >
88
<!ATTLIST section
99
id ID #IMPLIED
1010
name CDATA #IMPLIED
@@ -86,6 +86,7 @@
8686
note CDATA #IMPLIED
8787
width CDATA #IMPLIED
8888
class CDATA #IMPLIED
89+
border CDATA #IMPLIED
8990
>
9091
<!ELEMENT tr (td+) >
9192
<!ELEMENT td (#PCDATA | br | literal | b | i | link | list)* >
@@ -119,6 +120,19 @@
119120
year CDATA #IMPLIED
120121
>
121122

123+
<!ELEMENT projects (project+) >
124+
125+
<!ELEMENT project EMPTY >
126+
<!ATTLIST project
127+
title CDATA #REQUIRED
128+
docs CDATA #REQUIRED
129+
repo CDATA #REQUIRED
130+
logo CDATA #REQUIRED
131+
description CDATA #REQUIRED
132+
>
133+
134+
<!ELEMENT topnews EMPTY >
135+
122136
<!ELEMENT download EMPTY >
123137
<!ATTLIST download
124138
last CDATA #REQUIRED
@@ -147,6 +161,7 @@
147161
versions CDATA #IMPLIED
148162
>
149163

164+
150165
<!ENTITY nbsp "&#160;">
151166
<!ENTITY times "&#215;">
152167
<!ENTITY lsquo "&#8216;">

img/ingress_logo.svg

Lines changed: 57 additions & 0 deletions
Loading

img/njs_logo.svg

Lines changed: 48 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)