redesign with grouped navigation on top of page

This commit is contained in:
Astro 2013-11-12 00:16:21 +01:00
parent eca8fe9a34
commit 5f0838d1a1
7 changed files with 173 additions and 472 deletions

View File

@ -239,16 +239,16 @@ portal/items-sorted.xml: portal/items.xml $(STYLE)
$(call xml_process) $(call xml_process)
build/portal.html : NOINPUTVALID:=true build/portal.html : NOINPUTVALID:=true
build/portal.html: portal/items-sorted.xml $(STYLE) build/portal.html: portal/items-sorted.xml $(STYLE) $(CALENDAR_SUMMARY)
$(call xml_process) $(call xml_process)
# Pages: # Pages:
build/%.html: content/pages/%.xml $(STYLE) $(NAVIGATION) $(WWW_CCC_DE_UPDATES) $(CALENDAR_SUMMARY) $(DATESTAMP) news.xml build/%.html: content/pages/%.xml $(STYLE) $(NAVIGATION) $(DATESTAMP) news.xml
$(call xml_process) $(call xml_process)
# News: # News:
build/news/%.html : BASEURL="../" build/news/%.html : BASEURL="../"
build/news/%.html: content/news/%.xml $(STYLE) $(NAVIGATION) $(WWW_CCC_DE_UPDATES) $(CALENDAR_SUMMARY) $(DATESTAMP) build/news/%.html: content/news/%.xml $(STYLE) $(NAVIGATION) $(DATESTAMP)
$(call xml_process) $(call xml_process)
# Datenspuren # Datenspuren

View File

@ -5,22 +5,30 @@ When changing the position of these files in the navigation sidebar,
please adjust the #navigation li:nth-child(...) rules in the CSS file. please adjust the #navigation li:nth-child(...) rules in the CSS file.
--> -->
<navigation> <navigation>
<file title="News">news</file> <group>
<file>whois</file> <file title="News">news</file>
<file>space</file> <file>whois</file>
<file>themenabende</file> <file>space</file>
<file>events</file> <file>schule</file>
<file>schule</file> </group>
<group>
<file>kontakt</file> <file title="Kalender">calendar</file>
<file>mailingliste</file> <file>themenabende</file>
<file>muc</file> <file>events</file>
<file>wiki</file> </group>
<group>
<file>radio</file> <file>kontakt</file>
<file>podcast</file> <file>mailingliste</file>
<file>pentamusic</file> <file>muc</file>
<file>wiki</file>
<file>shop</file> </group>
<file>warez</file> <group>
<file>radio</file>
<file>podcast</file>
<file>pentamusic</file>
</group>
<group>
<file>shop</file>
<file>warez</file>
</group>
</navigation> </navigation>

View File

@ -1,10 +1,8 @@
/* -- General -- */ /* -- General -- */
body { body {
font: 0.8em Verdana, Arial, sans-serif; font: Verdana, Arial, sans-serif;
background-image: url(../images/background.png); margin: 0;
text-align: center; padding: 0;
min-width: 1024px;
/* max-width: 1280px; margin: 0 auto; */
} }
pre { pre {
@ -32,58 +30,59 @@ pre {
} }
#logo { #logo {
margin: 2em 2em 0 2em; margin: 0;
height: 150px; padding: 0;
background: url(../images/c3d2_blue.jpg); position: absolute;
top: 0;
height: 159px;
left: 0;
right: 0;
background-image: url(../images/c3d2_blue.jpg);
text-align: left; text-align: left;
border-top-left-radius: 30px;
-moz-border-radius-topleft: 30px;
-webkit-border-top-left-radius: 30px;
border-top-right-radius: 30px;
-moz-border-radius-topright: 30px;
-webkit-border-top-right-radius: 30px;
} }
#logo h1 { #logo h1 {
position: relative; /* position: relative; */
top: 47px; /* top: 47px; */
left: 23px; /* left: 23px; */
padding: 65px 0 0 0; padding: 65px 0 0 0;
max-width: 960px;
margin: 47px auto 0;
overflow: hidden; overflow: hidden;
background-image: url(../images/logo.png); background-image: url(../images/logo.png);
background-repeat: no-repeat; background-repeat: no-repeat;
height: 0px !important; height: 0px !important;
} }
/* -- Body -- */
#body {
display: block;
border: thin solid #ccc;
border-top: none;
background-color: white;
margin: 0 2em 0 2em;
background: #fff url(../images/background_bottom.png) no-repeat left bottom;
}
/* -- Navigation -- */ /* -- Navigation -- */
#navigation { #navigation {
float: left;
text-align: left; text-align: left;
width: 14em;
margin: 0; margin: 0;
padding: 0 1em; padding: 0 1em;
padding-top: 100px; padding-top: 159px;
background: url(../images/ck.png) top center no-repeat; background: -moz-linear-gradient(top, #113 0%, #222 100%) no-repeat;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#113), color-stop(100%,#222)) no-repeat;
background: -webkit-linear-gradient(top, #113 0%,#222 100%) no-repeat;
background: -o-linear-gradient(top, #113 0%,#222 100%) no-repeat;
background: -ms-linear-gradient(top, #113 0%,#222 100%) no-repeat;
background: linear-gradient(top, #113 0%, #222 100%) no-repeat;
background-color: #222;
}
#navgroups {
display: block;
max-width: 960px;
margin: 0 auto;
} }
#navigation ul { #navigation ul {
list-style-type: square; display: inline-block;
list-style-image: url(../images/bullet.png); list-style-type: none;
font-size: small; font-size: small;
padding-left: 2em; margin: 0.5em 0;
padding-top: 0.2em; padding: 0 5em 0 0;
border-top: #ebc63c 1px solid; vertical-align: top;
} }
#navigation li { #navigation li {
@ -96,25 +95,28 @@ pre {
} }
#navigation a { #navigation a {
color: #676767; color: #ddd;
text-decoration: none; text-decoration: none;
font-weight: bold;
} }
#navigation a:hover { #navigation a:hover {
color: white;
text-decoration: underline; text-decoration: underline;
} }
/* -- Content -- */ /* -- Content -- */
#content { #content {
text-align: left; text-align: left;
border-left: #ccc 1.1px dashed;
border-right: #ccc 1.1px dashed;
line-height: 1.3em; line-height: 1.3em;
padding: 2em; margin: 0 auto;
padding: 2em 0 4em;
min-height: 300px; min-height: 300px;
min-width: 30em; min-width: 30em;
margin: 0 24em 0 16em; max-width: 960px;
}
#content.portalcontainer {
max-width: inherit;
padding: 0 0 4em;
} }
#content p { #content p {
@ -154,6 +156,7 @@ pre {
margin-bottom: 1em; margin-bottom: 1em;
margin-top: 0px; margin-top: 0px;
color: #333; color: #333;
text-align: center;
} }
#content h3 { #content h3 {
@ -234,10 +237,9 @@ p.new_comment a:before {
/* -- Sidebar right -- */ /* -- Sidebar right -- */
#rsidebar { #rsidebar {
width: 24em;
float: right; float: right;
margin: 0; margin: 0;
padding: 0; padding: 0.5em 0.5em 1em 1em;
font-size: small; font-size: small;
text-align: left; text-align: left;
} }
@ -299,38 +301,6 @@ p.new_comment a:before {
text-decoration: none; text-decoration: none;
} }
/* -- Upcoming -- */
#upcoming {
padding: 0 1em 0 2em;
}
#upcoming h2 {
font-size: 1.2em;
border-top: #ebc63c 1px solid;
padding-top: 5%;
}
#upcoming ul {
list-style-type: none;
font-size: small;
margin-left: -2em;
}
#upcoming ul li {
line-height: 1.5em;
margin-top: .5em;
}
#upcoming a {
color: #666;
text-decoration: none;
font-style: italic;
}
#upcoming a:hover {
text-decoration: underline;
}
/* -- footer -- */ /* -- footer -- */
#footer { #footer {
clear: both; clear: both;
@ -434,21 +404,24 @@ abbr.dtstart, abbr.dtend {
/* -- Portal -- */ /* -- Portal -- */
#portal { #portal {
text-align: center;
white-space-collapsing: discard; white-space-collapsing: discard;
} }
#portal article { #portal article {
display: inline-block; display: inline-block;
text-align: left;
}
#portal article > a {
display: block;
position: relative; position: relative;
width: 14.5em; width: 14.5em;
height: 14.5em; height: 14.5em;
overflow: hidden; overflow: hidden;
text-align: left;
vertical-align: middle;
margin: 0 -0.3em 0 0;
}
#portal article > a {
display: block;
border-bottom: none; border-bottom: none;
margin: 0; margin: 0;
width: 14.5em;
height: 14.5em;
} }
#portal article > a:hover { #portal article > a:hover {
margin: 0; margin: 0;
@ -477,7 +450,7 @@ abbr.dtstart, abbr.dtend {
transition: top 0.3s ease-out; transition: top 0.3s ease-out;
letter-spacing: 0; letter-spacing: 0;
} }
#portal a:hover h3 { #portal article:hover h3 {
top: 0; top: 0;
transition: top 0.1s ease-in; transition: top 0.1s ease-in;
} }
@ -487,7 +460,7 @@ abbr.dtstart, abbr.dtend {
transition: bottom 0.3s ease-out; transition: bottom 0.3s ease-out;
letter-spacing: 0; letter-spacing: 0;
} }
#portal a:hover .footer { #portal article:hover .footer {
bottom: 0; bottom: 0;
transition: bottom 0.1s ease-in; transition: bottom 0.1s ease-in;
} }
@ -503,7 +476,7 @@ abbr.dtstart, abbr.dtend {
color: #333; color: #333;
text-shadow: -1px 0 1.5px white, 0 1px 1.5px white, 1px 0 1.5px white, 0 -1px 1.5px white; text-shadow: -1px 0 1.5px white, 0 1px 1.5px white, 1px 0 1.5px white, 0 -1px 1.5px white;
} }
#portal a:hover h4 { #portal article:hover h4 {
color: black; color: black;
} }
#portal .wiki h4 { #portal .wiki h4 {
@ -521,6 +494,24 @@ abbr.dtstart, abbr.dtend {
content: ']]'; content: ']]';
} }
/* -- Upcoming -- */
#portal .upcoming h3 a {
color: white;
}
#portal .upcoming ul {
list-style-type: none;
font-size: small;
margin-top: 2em;
margin-left: -2em;
}
#portal .upcoming ul li {
line-height: 1.5em;
margin-top: .5em;
}
/* -- Calendar -- */ /* -- Calendar -- */
table.calendar { table.calendar {
table-layout: fixed; table-layout: fixed;
@ -716,10 +707,6 @@ a[href$="xcal.xml"]:before {
content: url(../images/mime/calendar.png); content: url(../images/mime/calendar.png);
padding-right: 0.3em; padding-right: 0.3em;
} }
a[href$="calendar.html"]:before {
content: url(../images/mime/calendar.png);
padding-right: 0.3em;
}
#news h2 a:before { #news h2 a:before {
content: url(../images/mime/feed.png); content: url(../images/mime/feed.png);
padding-right: 0.3em; padding-right: 0.3em;

View File

@ -1,293 +0,0 @@
body {
padding: 2%;
font: 120% Verdana, Arial, sans-serif;
background-image: url(../images/background.png);
text-align: center;
}
a[href ^=https] {
padding-left: 16px;
margin-left: 2px;
background: url(../images/secure.png) no-repeat;
}
pre {
border: thin dotted #ccc;
margin-left: 20px;
margin-right: 20px;
background-color: #fafafa;
padding: 1em;
}
#page {
float: left;
max-width: 1200px;
min-width: 800px;
}
#body {
display: table;
float: left;
max-width: 100% !important;
width: 100% !important;
}
#logo::before {
background: transparent url(../images/top-right.png) scroll no-repeat top right;
margin-bottom: -20px;
height: 30px;
display: block;
border: none;
content: url(../images/top-left.png);
padding: 0;
line-height: 0.1;
font-size: 1px;
}
#logo {
height: 150px;
background: url(../images/c3d2_blue.jpg);
text-align: left;
}
#logo h1 {
position: relative;
top: 23px;
left: 23px;
padding: 65px 0 0 0;
overflow: hidden;
background-image: url(../images/logo.png);
background-repeat: no-repeat;
height: 0px !important;
height /**/:65px;
}
#navigation {
text-align: left;
display: table-cell;
margin-left: 0px;
width: 12%;
padding: 0.5em;
margin-top: 10px;
padding-top: 100px;
background: url(../images/ck.png) top center no-repeat;
}
#navigation form {
padding: 0.2em 0 0.2em 0;
margin: 1em 0.3em 0 0.3em;
border-top: #ebc63c 1px solid;
border-bottom: #ebc63c 1px solid;
text-align: center;
}
#navigation input[type =text] {
width: 80%;
}
#navigation ul {
list-style-type: square;
list-style-image: url(../images/bullet.png);
font-size: small;
margin-left: 0;
}
#navigation li {
line-height: 2em;
}
#navigation a {
color: #676767;
text-decoration: none;
font-weight: bold;
}
#navigation a:hover {
text-decoration: underline;
}
#content {
display: table-cell;
text-align: left;
width: 50%;
border-left: #ccc 1.1px dashed;
border-right: #ccc 1.1px dashed;
font-size: 75%;
line-height: 1.3em;
padding: 0 2em;
}
#content p {
margin: 1.5em 1em;
}
#content a {
text-decoration: none;
border-bottom: #ebc63c 1px solid;
color: #555;
}
#content a:hover {
border-width: 2px;
}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5 {
letter-spacing: 3px;
margin: 0px;
background-color: transparent;
font-weight: bold;
}
#content h2 {
font-size: 200%;
margin-bottom: 1em;
margin-top: 0px;
color: #333;
}
#content h3 {
font-size: 150%;
margin-top: 30px;
color: #555;
}
#content h4 {
font-size: 120%;
}
#news {
text-align: left;
display: table-cell;
margin-right: 1em;
width: 10%;
background: url(../images/pesthoernchen.png) top center no-repeat;
padding: 1em;
padding-top: 90px;
margin-top: 10px;
font-size: small;
}
#news h2 {
font-size: 1.2em;
border-top: #ebc63c 1px solid;
padding-top: 5%;
}
#news ul {
list-style-type: circle;
list-style-image: url(../images/star.png);
font-size: small;
margin-left: -1em;
max-width: 10em !important;
}
#news ul li {
line-height: 1.5em;
}
#news a {
color: #666;
text-decoration: none;
font-style: italic;
}
#news a:hover {
text-decoration: underline;
}
#footer {
text-align: center;
font-size: small;
border: #ccc 1px solid;
border-top: none;
background: #fff url(../images/background_bottom.png) no-repeat left bottom;
}
#footer ul, #footer li {
display: inline;
list-style-type: none;
}
#footer li a {
margin: 0 1em;
color: #676767;
text-decoration: none;
font-weight: bold;
}
#footer li a img {
border: none;
}
.hidden {
color: white;
font-size: xx-small;
clear: both;
}
#update {
font: xx-small sans-serif;
letter-spacing: 0.8px;
color: #666;
}
#content hr.news {
visibility: hidden;
clear: both;
}
#content div.news {
padding: 1em;
margin: 0;
margin-bottom: 0.5em;
}
.news_author {
font-size: small;
font-style: italic;
margin-left: 1em;
font-weight: bold;
}
#content h3.news {
border-bottom: #ebc63c 3px solid;
padding: 0px;
line-height: 1.1em;
font-size: 130%;
}
#content h3.news a {
border: none;
}
/* some little helpers */
img.left {
float: left;
margin-right: 1em;
}
img.right {
float: right;
margin-left: 1em;
}
dt {
font-weight: bold;
font-style: italic;
margin-left: 2em;
margin-top: 0.5em;
color: #555;
}
dt:after {
content: ":";
}
dl {
font-size: 90%;
margin-top: 2em;
margin-bottom: 3em;
}
dt.main {
font-style: normal;
font-size: 100%;
margin-left: 1em;
margin-top: 1em;
color: #000;
}
dt.main:after, dt.main:before {
content: "";
}
dd, dt {
font-size: 95%;
}
dd {
margin-left: 4em;
}

View File

@ -184,15 +184,17 @@
</xsl:template> </xsl:template>
<xsl:template name="navitems"> <xsl:template name="navitems">
<ul> <xsl:for-each select="document('../content/navigation.xml')/navigation/group">
<xsl:for-each select="document('../content/navigation.xml')/navigation/file"> <ul>
<xsl:call-template name="navitem"> <xsl:for-each select="file">
<xsl:with-param name="file" select="."/> <xsl:call-template name="navitem">
<xsl:with-param name="title" select="@title"/> <xsl:with-param name="file" select="."/>
<xsl:with-param name="baseurl" select="$baseurl"/> <xsl:with-param name="title" select="@title"/>
</xsl:call-template> <xsl:with-param name="baseurl" select="$baseurl"/>
</xsl:for-each> </xsl:call-template>
</ul> </xsl:for-each>
</ul>
</xsl:for-each>
</xsl:template> </xsl:template>
<!-- Adspace --> <!-- Adspace -->
@ -237,46 +239,40 @@
<xsl:template name="calendar-events"> <xsl:template name="calendar-events">
<xsl:param name="limit" select="5"/> <xsl:param name="limit" select="5"/>
<xsl:if test="document('../calendar-summary.xml')/page/calendar-summary/event[date:seconds(end) &gt;= date:seconds(date:date())]">
<div id="upcoming">
<h2>
<a href="{$baseurl}calendar.html">Kalender</a>
</h2>
<ul>
<xsl:for-each select="document('../calendar-summary.xml')/page/calendar-summary/event[date:seconds(end) &gt;= date:seconds(date:date())]">
<xsl:sort select="date:seconds(start)" data-type="number" order="ascending" />
<xsl:if test="position() &lt;= $limit"> <ul>
<xsl:variable name="href"> <xsl:for-each select="document('../calendar-summary.xml')/page/calendar-summary/event[date:seconds(end) &gt;= date:seconds(date:date())]">
<xsl:call-template name="make-href"> <xsl:sort select="date:seconds(start)" data-type="number" order="ascending" />
<xsl:with-param name="href" select="link"/>
</xsl:call-template>
</xsl:variable>
<li> <xsl:if test="position() &lt;= $limit">
<xsl:call-template name="datespan-to-human"> <xsl:variable name="href">
<xsl:with-param name="start" select="start"/> <xsl:call-template name="make-href">
<xsl:with-param name="end" select="end"/> <xsl:with-param name="href" select="link"/>
</xsl:call-template>: </xsl:call-template>
<a> </xsl:variable>
<xsl:if test="string-length($href) &gt; 0">
<xsl:attribute name="href"> <li>
<xsl:value-of select="$href"/> <xsl:call-template name="datespan-to-human">
</xsl:attribute> <xsl:with-param name="start" select="start"/>
</xsl:if> <xsl:with-param name="end" select="end"/>
<xsl:if test="string-length(location) &gt; 0"> </xsl:call-template>:
<xsl:attribute name="title"> <a>
<xsl:value-of select="concat('Ort: ', location)"/> <xsl:if test="string-length($href) &gt; 0">
</xsl:attribute> <xsl:attribute name="href">
</xsl:if> <xsl:value-of select="$href"/>
<xsl:value-of select="title"/> </xsl:attribute>
</a> </xsl:if>
</li> <xsl:if test="string-length(location) &gt; 0">
</xsl:if> <xsl:attribute name="title">
</xsl:for-each> <xsl:value-of select="concat('Ort: ', location)"/>
</ul> </xsl:attribute>
</div> </xsl:if>
</xsl:if> <xsl:value-of select="title"/>
</a>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:template> </xsl:template>
<!-- Support für <event/> bzw. Microformats --> <!-- Support für <event/> bzw. Microformats -->

View File

@ -12,7 +12,10 @@
<xsl:template match="/config"> <xsl:template match="/config">
<portal> <portal>
<!-- Extract from fetched XML files -->
<xsl:apply-templates select="*[@id]"/> <xsl:apply-templates select="*[@id]"/>
<!-- Extract from news -->
<xsl:for-each select="document('../news.xml')//newsfile"> <xsl:for-each select="document('../news.xml')//newsfile">
<xsl:apply-templates select="document(concat('../', .))/item" mode="news"> <xsl:apply-templates select="document(concat('../', .))/item" mode="news">
<xsl:with-param name="link" <xsl:with-param name="link"

View File

@ -79,29 +79,16 @@
<a href="http://c3d2.de"><h1>&lt;&lt;&lt;/&gt;&gt; Chaos Computer Club Dresden | c3d2</h1></a> <a href="http://c3d2.de"><h1>&lt;&lt;&lt;/&gt;&gt; Chaos Computer Club Dresden | c3d2</h1></a>
</div> </div>
<div id="body">
<!-- ### Navigation ### --> <!-- ### Navigation ### -->
<xsl:comment> <xsl:comment>
<xsl:text> ### Navigation ### </xsl:text> <xsl:text> ### Navigation ### </xsl:text>
</xsl:comment> </xsl:comment>
<nav id="navigation"> <nav id="navigation">
<div id="navgroups">
<xsl:call-template name="navitems" /> <xsl:call-template name="navitems" />
</nav> </div>
</nav>
<!-- ### News ### -->
<xsl:comment>
<xsl:text> ### News ### </xsl:text>
</xsl:comment>
<aside id="rsidebar">
<xsl:call-template name="adspace" />
<xsl:call-template name="calendar-events" />
<xsl:call-template name="chaosupdates" />
</aside>
<!-- ### Content ### --> <!-- ### Content ### -->
<xsl:comment> <xsl:comment>
@ -112,6 +99,9 @@
<xsl:if test="event"> <xsl:if test="event">
<xsl:attribute name="class">vevent</xsl:attribute> <xsl:attribute name="class">vevent</xsl:attribute>
</xsl:if> </xsl:if>
<xsl:if test="/page/portal">
<xsl:attribute name="class">portalcontainer</xsl:attribute>
</xsl:if>
<xsl:if test="$title != ''"> <xsl:if test="$title != ''">
<h2> <h2>
@ -135,7 +125,6 @@
</section> <!-- id="content" --> </section> <!-- id="content" -->
<xsl:call-template name="footer" /> <xsl:call-template name="footer" />
</div> <!-- id="body" -->
</div> <!-- id="page" --> </div> <!-- id="page" -->
</xsl:element> <!-- name="body" --> </xsl:element> <!-- name="body" -->
</xsl:element> <!-- name="html" --> </xsl:element> <!-- name="html" -->
@ -315,7 +304,18 @@
<xsl:template match="/page/portal"> <xsl:template match="/page/portal">
<section id="portal"> <section id="portal">
<xsl:apply-templates select="item[position() &lt;= 60]"/> <!-- Upcoming events -->
<article class="upcoming">
<h3>
<a href="{$baseurl}calendar.html">Kalender</a>
</h3>
<xsl:call-template name="calendar-events">
<xsl:with-param name="limit" select="4"/>
</xsl:call-template>
</article>
<!-- All items... -->
<xsl:apply-templates select="item[position() &lt;= 32]"/>
</section> </section>
</xsl:template> </xsl:template>