diff --git a/src/routing.js b/src/routing.js index d3f84f0..d83d728 100644 --- a/src/routing.js +++ b/src/routing.js @@ -152,6 +152,13 @@ class Route { if (post) { return { pageType: 'post', postSlug, siteURL }; } + + // see if it's pointing to a tag when no prefix is used + let tagSlug = _.last(slugs); + tag = await wp.fetchTag(tagSlug); + if (tag) { + return { pageType: 'tag', tagSlug: tag.slug, siteURL }; + } } async loadPageData(url) { @@ -186,6 +193,7 @@ class Route { let { siteURL } = this.params; let siteURLInsecure = 'http:' + siteURL.substr(6); if (node.name === 'a') { + node.attribs.href = _.trim(node.attribs.href); if (node.attribs.href) { if (!_.startsWith(node.attribs.href, '/')) { if (_.startsWith(node.attribs.href, siteURL)) { diff --git a/src/style.scss b/src/style.scss index ef7ec4e..a36fbb7 100644 --- a/src/style.scss +++ b/src/style.scss @@ -39,7 +39,8 @@ A { margin-right: -0.4em; text-shadow: 0 0 0 #fff; cursor: pointer; - transition: text-shadow 1s, color 1s; + transition: text-shadow 1s, color 1s, opacity 0.5s; + color: #cccccc; &:link, &:visited { color: #cccccc; @@ -59,6 +60,10 @@ A { &.disabled { opacity: 0.5; cursor: default; + + &:hover { + opacity: 0.5 !important; + } } &.highlighted { diff --git a/src/widgets/media-view.jsx b/src/widgets/media-view.jsx index 6601a71..665f462 100644 --- a/src/widgets/media-view.jsx +++ b/src/widgets/media-view.jsx @@ -9,7 +9,7 @@ class MediaView extends PureComponent { let { media, size } = this.props; let info = _.get(media, [ 'media_details', 'sizes', size ]); if (!info) { - return; + info = media; } let props = { src: info.source_url, diff --git a/src/widgets/side-nav.jsx b/src/widgets/side-nav.jsx index 975caa6..f914d48 100644 --- a/src/widgets/side-nav.jsx +++ b/src/widgets/side-nav.jsx @@ -299,13 +299,15 @@ class SideNavSync extends PureComponent { let { date } = route.params; let className, url; if (monthEntry.year === selectedYear) { + if (date && monthEntry.month === date.month) { + className = 'selected'; + } + let postList = _.find(postLists, { monthEntry }); if (!postList || !_.isEmpty(postList.posts)) { url = route.prefetchArchiveURL(monthEntry); - } - - if (date && monthEntry.month === date.month) { - className = 'selected'; + } else { + className = 'disabled'; } } return (