@@ -21,7 +19,9 @@
{{#if showPerpetratorData}}
Perpetrator
{{/if}}
- {{#if perpetrator}}{{perpetrator}}{{/if}}{{#if perpetrator}}{{#if usagesource}}, {{/if}}{{/if}}{{#if usagesource}}{{usagesource}}{{/if}}
+ {{#unless usageexample}}{{#if sourceurl}}{{/if}}{{/unless}}
+ {{#if perpetrator}}{{perpetrator}}{{/if}}{{#if perpetrator}}{{#if usagesource}}, {{/if}}{{/if}}{{#if usagesource}}{{usagesource}}{{/if}}
+ {{#unless usageexample}}{{#if sourceurl}}{{/if}}{{/unless}}
{{#if showPerpetratorData}}
{{/if}}
diff --git a/client/list-page.hbs b/client/list-page.hbs
deleted file mode 100644
index 51ba9a6..0000000
--- a/client/list-page.hbs
+++ /dev/null
@@ -1,18 +0,0 @@
-{{> top }}
-
-
- Guffipedia
-
-
-
- Suggest an entry
-
- Main page
-
-
- {{#each words}}
- - {{word}}
- {{/each}}
-
-
-{{> bottom }}
diff --git a/client/main-page.hbs b/client/main-page.hbs
index 436473c..34c0eee 100644
--- a/client/main-page.hbs
+++ b/client/main-page.hbs
@@ -7,12 +7,10 @@
Suggest an entry
-
Guff Index
-
{{#each homewords}}
-
-
{{#if @first}}Latest{{else}}Random{{/if}} guff
+ {{#if @first}}Latest guff added on {{formatteddate}}{{else}}Random guff{{/if}}
{{word}}
{{#if definition}}
@@ -30,6 +28,12 @@
{{/each}}
+ {{#each words}}
+ -
+ {{#if @first}}
All the guff
{{/if}}
+ {{word}}
+
+ {{/each}}
{{> bottom }}
diff --git a/client/styles/_colours.scss b/client/styles/_colours.scss
index f91ba25..8655db2 100644
--- a/client/styles/_colours.scss
+++ b/client/styles/_colours.scss
@@ -1,2 +1,4 @@
$dark-pink: #b0797a;
$blue: #007dc5;
+$light-grey: #ccc2c2;
+$dark-grey: #6a6d68;
diff --git a/client/styles/main.scss b/client/styles/main.scss
index 520d820..445a7b9 100755
--- a/client/styles/main.scss
+++ b/client/styles/main.scss
@@ -59,7 +59,7 @@ body {
line-height: 1.1em;
width: 100%;
margin-top: 8px;
- background-color: #ccc2c2;
+ background-color: $light-grey;
border-width: 0px;
&:hover {
color: inherit;
@@ -81,7 +81,7 @@ main {
font-size: 2em;
line-height: 1.4em;
margin: 0px;
- color: #000000;
+ color: black;
@include oGridRespondTo(S) {
font-size: 4em;
text-align: left;
@@ -121,7 +121,7 @@ main {
line-height: 1em;
text-align: left;
margin-top: 2px;
- color: #6a6d68;
+ color: $dark-grey;
@include oGridRespondTo(S) {
font-size: 1.8em;
text-align: left;
@@ -136,10 +136,15 @@ main {
text-align: left;
font-size: 1em;
line-height: 1.2em;
- color: #6a6d68;
+ color: $dark-grey;
@include oGridRespondTo(S) {
font-size: 1.5em;
}
+ span {
+ font-size: 0.7em;
+ font-style: italic;
+ font-weight: normal;
+ }
}
.guffs {
@@ -183,7 +188,7 @@ main {
text-align: left;
font-size: 1em;
line-height: 1.2em;
- color: #6a6d68;
+ color: $dark-grey;
@include oGridRespondTo(S) {
font-size: 1.4em;
margin-top: 8px;
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index e59df6a..171ae95 100755
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -270,6 +270,13 @@ gulp.task('download-data', () => fetch(SPREADSHEET_URL)
sortedWords[word] = words[word];
}
+ let monthNames = [
+ "January", "February", "March",
+ "April", "May", "June", "July",
+ "August", "September", "October",
+ "November", "December"
+ ];
+
for (const row of spreadsheet) {
let currentSlug = row.slug;
@@ -307,6 +314,10 @@ gulp.task('download-data', () => fetch(SPREADSHEET_URL)
if(words[currentSlug].wordid) {
words[currentSlug].wordid = words[currentSlug].wordid.substring(4,words[currentSlug].wordid.length);
}
+
+ let date = new Date(words[currentSlug].submissiondate);
+
+ words[currentSlug].formatteddate = monthNames[date.getMonth()] + " " + date.getDate() + ", " + date.getFullYear();
}
fs.writeFileSync('client/words.json', JSON.stringify(sortedWords, null, 2));
@@ -345,10 +356,6 @@ gulp.task('templates', () => {
const homewords = JSON.parse(fs.readFileSync('client/homewords.json', 'utf8'));
const mainPageTemplate = Handlebars.compile(fs.readFileSync('client/main-page.hbs', 'utf8'));
- const mainPageHtml = mainPageTemplate({homewords});
+ const mainPageHtml = mainPageTemplate({homewords, words});
fs.writeFileSync(`.tmp/index.html`, mainPageHtml);
-
- const listPageTemplate = Handlebars.compile(fs.readFileSync('client/list-page.hbs', 'utf8'));
- const listPageHtml = listPageTemplate({words});
- fs.writeFileSync(`.tmp/list.html`, listPageHtml);
});