Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
Version 1.4.1 (#25)
Browse files Browse the repository at this point in the history
- added timestamp to article detail
- removed clutter from package
  • Loading branch information
ekarbe authored Sep 9, 2019
1 parent 9868683 commit e15d801
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 78 deletions.
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ vsc-extension-quickstart.md
**/jsconfig.json
**/*.map
**/.eslintrc.json
public/images/*
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,11 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- Added option to disable user management
- Added basic collections
- Added media warning
- Changed background color
- Changed background color

## [1.4.1]

- Added timestamp to articles
- Shrink package (removed images)

## [Unreleased]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "reddit-viewer",
"displayName": "Reddit Viewer",
"description": "Browse Reddit in code style",
"version": "1.4.0",
"version": "1.4.1",
"publisher": "ekarbe",
"author": "Eike Christian Karbe <[email protected]>",
"engines": {
Expand Down
73 changes: 0 additions & 73 deletions public/reddit-viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,79 +31,6 @@ a:visited, a:active{
border: none;
}

/*--------- Post list view header ----------- */

p.current-sub-header {
padding-left: 10px;
display: inline-block;
}

button.collapse-post-list {
background-color: transparent;
width: 10px;
height: 10px;
border: 1px solid grey;
padding: 0;
color: grey;
line-height: 7px;
}

button.collapse-post-list:active {
outline: none;
background-color: transparent;
border: 1px solid grey;
}

button.collapse-post-list:focus {
outline: 0;
}

/*------------- Post list view --------------- */
.post-list-container {
padding-left: 60px;
}

.post-list-post-container {
padding: 0px;
margin-top: 2px;
margin-bottom: 0px;
}

.post-list-post-container button {
text-decoration: none;
color: #F4F6F7;
background-color: transparent;
border: none;
text-align: left;
outline: none;
}

.post-list-post-container p {
padding-left: 0px;
padding-right: 0px;
margin: 0px;
}

/*----------------- post detail view ------------------ */

.post-detail-config {
margin-left: 40px;
padding-top: 0px;
}

.post-detail-config p {
margin-top: 2px;
margin-bottom: 0px;
padding: 0px;
}

.post-detail-config a {
display: block;
margin-top: 2px;
margin-bottom: 0px;
padding: 0px;
}

/*------------- keyword color overrides --------------- */
.keyword-color {
color: #C594C5;
Expand Down
10 changes: 10 additions & 0 deletions src/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ function articleDetails(data) {
return ``;
}

// parse unix timestamp
let created = new Date(data.created*1000);
let fmtCreated = created.getDate() + '.' + (created.getMonth()+1) + '.' + created.getFullYear();

let html = `
<span class="keyword-color">const</span>
<span class="function-color">${data.title}</span>
Expand All @@ -423,6 +427,12 @@ function articleDetails(data) {
<span class="variable-color">score =</span>
<span class="string-color">${data.score}</span><span class="variable-color">;</span>
</br>
<span class="keyword-color">&nbsp; &nbsp; let</span>
<span class="variable-color">date =</span>
<span class="string-color">${fmtCreated}</span><span class="variable-color">;</span>
</br>
<span class="keyword-color">&nbsp; &nbsp; for</span>
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,9 @@ run-async@^2.2.0:
is-promise "^2.1.0"

rxjs@^6.4.0:
version "6.5.2"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7"
integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==
version "6.5.3"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a"
integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==
dependencies:
tslib "^1.9.0"

Expand Down

0 comments on commit e15d801

Please sign in to comment.