Demo Theme
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5217 8810af33-2d31-482b-a856-94f89814c4df
Former-commit-id: 0ad4e7ed8a
pull/2/head
parent
f15c70597b
commit
205d1c2f12
|
|
@ -74,8 +74,8 @@ public class ItemSearchWidget extends Widget {
|
|||
widget.addAttribute("asset-type", type.getName());
|
||||
}
|
||||
|
||||
final ContentSection section = CMS.getContext().getContentSection();
|
||||
widget.addAttribute("content-section", section.getLabel());
|
||||
// final ContentSection section = CMS.getContext().getContentSection();
|
||||
// widget.addAttribute("content-section", section.getLabel());
|
||||
|
||||
final Long value = (Long) getValue(state);
|
||||
if (value != null) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import org.librecms.pagemodel.FixedContentItemComponent;
|
|||
|
||||
/**
|
||||
* Form for creating/editing a {@link FixedContentItemComponent}.
|
||||
*
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
public class FixedContentItemComponentForm
|
||||
|
|
@ -99,7 +99,9 @@ public class FixedContentItemComponentForm
|
|||
final PageState state = event.getPageState();
|
||||
final FixedContentItemComponent component = getComponentModel();
|
||||
|
||||
itemSearchWidget.setValue(state, component.getContentItem());
|
||||
if (component != null) {
|
||||
itemSearchWidget.setValue(state, component.getContentItem());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -111,12 +111,10 @@ public class ItemListComponentRenderer
|
|||
language = kernelConfig.getDefaultLocale();
|
||||
}
|
||||
|
||||
final List<Category> categories;
|
||||
final List<Category> categories = new ArrayList<>();
|
||||
if (componentModel.isDescending()) {
|
||||
categories = collectCategories(category);
|
||||
} else {
|
||||
categories = new ArrayList<>();
|
||||
}
|
||||
categories.addAll(collectCategories(category));
|
||||
}
|
||||
categories.add(category);
|
||||
|
||||
final Class<? extends ContentItem> limitToType = getLimitToType(
|
||||
|
|
|
|||
|
|
@ -1,20 +1,68 @@
|
|||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="2.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:ccm="http://xmlns.libreccm.org">
|
||||
xmlns:ccm="http://xmlns.libreccm.org"
|
||||
exclude-result-prefixes="ccm xsl">
|
||||
|
||||
<xsl:output method="html"
|
||||
doctype-system="about:legacy-compat"
|
||||
indent="yes"
|
||||
encoding="utf-8"/>
|
||||
|
||||
<xsl:template match="page">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Category page</title>
|
||||
<link rel="stylesheet" href="/themes/ccm/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<xsl:apply-templates select="greetingItem" />
|
||||
<main>
|
||||
<ul class="news">
|
||||
<xsl:for-each select="/page/newsList/items">
|
||||
<span>
|
||||
<pre>
|
||||
<xsl:value-of select="count(./attachments[name='.images']/attachments[1])" />
|
||||
</pre>
|
||||
<img src="/content-sections/info/images/{./attachments[name='.images']/attachments[0]/asset/uuid}" width="354" height="286" alt="" />
|
||||
</span>
|
||||
<span>
|
||||
<xsl:value-of select="./title" />
|
||||
</span>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<div class="boxes">
|
||||
<xsl:for-each select="/page/articles/items">
|
||||
<div>
|
||||
<h1>
|
||||
<xsl:value-of select="./title" />
|
||||
</h1>
|
||||
<p>
|
||||
<img src="/content-sections/info/images/{./attachments[name='.images']/attachments[0]/asset/uuid}" alt="" />
|
||||
<xsl:value-of select="./description" />
|
||||
</p>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
<!--<xsl:apply-templates select="greetingItem" />-->
|
||||
</main>
|
||||
<footer>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/impressum">Impressum</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/privacy">Privacy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="greetingItem">
|
||||
|
||||
<h1>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,109 @@
|
|||
* {
|
||||
box-sizing: border-box;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.news {
|
||||
|
||||
background-color: #000;
|
||||
|
||||
margin: 0 auto 3em auto;
|
||||
|
||||
width: 100vw;
|
||||
|
||||
padding: 3em;
|
||||
}
|
||||
|
||||
ul.news li {
|
||||
|
||||
display: flex;
|
||||
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
max-width: 50em;
|
||||
|
||||
}
|
||||
|
||||
ul.news li img {
|
||||
max-height: 20em;
|
||||
}
|
||||
|
||||
ul.news li span {
|
||||
|
||||
color: #fff;
|
||||
|
||||
flex: 1;
|
||||
|
||||
font-size: 2rem;
|
||||
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
main div.boxes {
|
||||
display: flex;
|
||||
|
||||
margin: 3em auto 3em auto;
|
||||
|
||||
max-width: 80em;
|
||||
}
|
||||
|
||||
main div.boxes div {
|
||||
position: relative;
|
||||
|
||||
flex: 1;
|
||||
|
||||
margin: 0 3em;
|
||||
}
|
||||
|
||||
main div.boxes div p img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
main div.boxes div a {
|
||||
|
||||
}
|
||||
|
||||
footer {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
footer ul {
|
||||
|
||||
list-style: none;
|
||||
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
max-width: 80em;
|
||||
|
||||
padding-top: 4em;
|
||||
padding-bottom: 4em;
|
||||
}
|
||||
|
||||
footer ul li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
footer ul li:not(:first-child) {
|
||||
margin-left: 4em;
|
||||
}
|
||||
|
||||
footer ul li a:link {
|
||||
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
footer ul li a:focus, footer ul li a:hover {
|
||||
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue