Skip to content

Commit

Permalink
Merge pull request #1830 from mikekasprzak/tweaks
Browse files Browse the repository at this point in the history
Tweaks
  • Loading branch information
mikekasprzak committed Sep 2, 2019
2 parents bedefad + ebe639d commit 206b49b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/com/page/root/home/home.js
@@ -1,5 +1,6 @@
import {h, Component} from 'preact/preact';

import ContentEvent from "com/content-event/event";
import ContentList from 'com/content-list/list';
import ContentTimeline from 'com/content-timeline/timeline';
import ContentHeadlinerFeed from 'com/content-headliner/headliner-feed';
Expand All @@ -16,8 +17,14 @@ export default class PageRootHome extends Component {
}
}

let ShowEvent = null;
if ( featured && (!user || !user.id || !featured.focus) ) {
ShowEvent = <ContentEvent node={featured} user={user} path={path} extra={extra} featured={featured} />;
}

return (
<ContentList class="page-home-home">
{ShowEvent}
<ContentHeadlinerFeed node={node} types={['post']} subtypes={['news']} methods={['all']} limit={1} name="news" icon="news" class="-col-c" published love comments more="/news" />
{ShowHomework}
<ContentTimeline class="content-timeline-posts" types={['post']} methods={['all']} node={node} user={user} path={path} extra={extra} featured={featured} />
Expand Down
15 changes: 10 additions & 5 deletions src/com/sidebar/guides/guides.js
Expand Up @@ -9,20 +9,25 @@ export default class SidebarGuides extends Component {

render(props, state) {
var Links = {
"Rules": {"icon": "article", "href": "/events/ludum-dare/rules"},
"Game Hosting Guide": {"href": "/events/ludum-dare/hosting-guide"}
"Rules": {"href": "/events/ludum-dare/rules", "subtext": "for Ludum Dare events"},
"Game Hosting Guide": {"icon": "star-empty", "href": "/events/ludum-dare/hosting-guide"}
};

return (
<div class="sidebar-base sidebar-shortlist sidebar-guides">
<div class="-title _font2">
<SVGIcon baseline>question</SVGIcon> <span class="-text">Guides</span>
<SVGIcon baseline>article</SVGIcon> <span class="-text">Guides</span>
</div>
{Object.keys(Links).map(key => {
let subtext = "";
if (Links[key].subtext) {
subtext = " - " + Links[key].subtext;
}

return (
<NavLink class="-item" href={Links[key].href}>
<SVGIcon baseline gap>{Links[key].icon != null ? Links[key].icon : 'article'}</SVGIcon>
{key}
<SVGIcon baseline gap>{Links[key].icon != null ? Links[key].icon : 'star-full'}</SVGIcon>
<span class="-title">{key}</span>{subtext}
</NavLink>
);
})}
Expand Down
13 changes: 12 additions & 1 deletion src/com/sidebar/guides/guides.less
@@ -1,5 +1,16 @@
#sidebar > .sidebar-guides {
& > .-item {
& > .-item,
& > .-item:visited {
display: block;
color: inherit;

& .-title {
font-weight: bold;
}
}

& > .-item:hover,
& > .-item:active {
color: #FFF;
}
}

0 comments on commit 206b49b

Please sign in to comment.