53 Commits

Author SHA1 Message Date
renovate[bot]
87a82445c2 Update dependency @fontsource/roboto to v5.2.7 (#269)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dave Gallant <davegallant@proton.me>
2025-09-14 01:05:47 -04:00
renovate[bot]
5d2e51cc81 Update dependency vuetify to v3.10.0 (#268)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-14 00:57:43 -04:00
renovate[bot]
a40103768c Update dependency axios to v1.12.1 (#267)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-14 00:57:31 -04:00
dependabot[bot]
b1174f2975 Bump axios from 1.11.0 to 1.12.0 (#266)
Bumps [axios](https://github.com/axios/axios) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-13 14:36:43 -04:00
renovate[bot]
61eb9e117b Update dependency core-js to v3.45.1 (#247)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-10 07:18:31 -04:00
dependabot[bot]
a2c6eeb3c2 Bump vite from 6.3.5 to 6.3.6 (#264)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.3.5 to 6.3.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-10 07:17:44 -04:00
renovate[bot]
a805fa16a9 Update dependency cssnano to v7.1.1 (#248)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-06 09:03:10 -04:00
renovate[bot]
def4338a2d Update dependency unplugin-vue-components to v29 (#257)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-06 09:02:52 -04:00
renovate[bot]
9355275ece Update dependency sass-embedded to v1.92.1 (#262)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-06 09:02:26 -04:00
renovate[bot]
bc73749b75 Update docker/dockerfile Docker tag to v1.18 (#263)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-06 08:43:29 -04:00
renovate[bot]
2156330f96 Update dependency vuetify to v3.9.7 (#261)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-06 08:43:20 -04:00
renovate[bot]
c7dc0dba2f Update dependency vue to v3.5.21 (#260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 22:12:57 -04:00
renovate[bot]
f22c8a561b Update babel monorepo to v7.28.4 (#259)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 22:12:41 -04:00
b29377a962 Hide input details to save space 2025-08-30 08:48:45 -04:00
renovate[bot]
80f650736f Update dependency vue to v3.5.20 (#254)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 23:03:21 -04:00
renovate[bot]
48c4162746 Update caddy Docker tag to v2.10.2 (#256)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 22:58:51 -04:00
926617056f Cleanup old code 2025-08-29 22:58:09 -04:00
485e04afe2 Fix / hotkey 2025-08-29 22:37:47 -04:00
8bae1c4978 Adjust mobile fonts 2025-08-29 21:45:42 -04:00
ce4396dd0d Use Tokyo night theme 2025-08-29 21:38:54 -04:00
f0e33e6060 Migrate to vuetify and vite (#251) 2025-08-29 20:57:27 -04:00
065c965f00 Update Caddyfile 2025-08-29 17:20:08 -04:00
renovate[bot]
b2bea9a424 Update dependency vue to v3.5.19 (#249)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-23 07:26:13 -04:00
renovate[bot]
1969569143 Update vue-cli monorepo to v5.0.9 (#250)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-23 07:25:51 -04:00
renovate[bot]
286da4cf54 Update actions/checkout action to v5 (#246)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 21:35:43 -04:00
renovate[bot]
eebf0478c5 Update dependency @babel/core to v7.28.3 (#245)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 21:35:33 -04:00
renovate[bot]
34478e9ede Update dependency core-js to v3.45.0 (#244)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-09 18:15:50 -04:00
renovate[bot]
a8dd3a4839 Update dependency vue to v3.5.18 (#243)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-26 07:54:19 -04:00
dependabot[bot]
10a6ae4964 Bump axios from 1.10.0 to 1.11.0 (#241)
Bumps [axios](https://github.com/axios/axios) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-23 20:03:36 -04:00
dependabot[bot]
fcbdf15180 Bump form-data from 4.0.1 to 4.0.4 (#240)
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.1 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.1...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-22 18:48:52 -04:00
renovate[bot]
968a417f60 Update babel monorepo to v7.28.0 (#236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-19 08:49:36 -04:00
renovate[bot]
05fb199525 Update dependency core-js to v3.44.0 (#237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-19 08:49:26 -04:00
renovate[bot]
9e4a84dbbb Update dependency cssnano to v7.1.0 (#239)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-19 08:49:13 -04:00
dependabot[bot]
665edf0c80 Bump on-headers and compression (#238)
---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 15:07:05 -04:00
renovate[bot]
ef7448f02f Update babel monorepo to v7.27.4 (#230)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dave Gallant <davegallant@gmail.com>
2025-06-21 09:30:00 -04:00
renovate[bot]
60dfad2c66 Update dependency vue to v3.5.17 (#231)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 21:58:30 -04:00
renovate[bot]
f60dd55178 Update dependency core-js to v3.43.0 (#232)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 21:58:21 -04:00
renovate[bot]
e7a47adca5 Update dependency bootstrap to v5.3.7 (#234)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 21:42:50 -04:00
renovate[bot]
d54b07172e Update docker/dockerfile Docker tag to v1.17 (#235)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 21:42:36 -04:00
f60e4cf1cf Add banner notifying users that rfd.fyi will not be renewed after 2025-08-20 2025-06-19 10:23:33 -04:00
renovate[bot]
d4253ed8e2 Update dependency axios to v1.10.0 (#233)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-15 08:13:49 -04:00
renovate[bot]
a0ee6bb6c8 Update docker/dockerfile Docker tag to v1.16 (#229)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-23 21:55:57 -04:00
renovate[bot]
5f7e848670 Update dependency vue to v3.5.14 (#228)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-16 23:29:27 -04:00
renovate[bot]
f2c05bce92 Update dependency cssnano to v7.0.7 (#227)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-10 07:44:49 -04:00
renovate[bot]
0e34c00b99 Update dependency bootstrap to v5.3.6 (#226)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-10 07:41:46 -04:00
renovate[bot]
c20f4fb32a Update dependency core-js to v3.42.0 (#225)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-02 21:56:56 -04:00
renovate[bot]
052e2d92d9 Update babel monorepo to v7.27.1 (#224)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-02 21:56:41 -04:00
renovate[bot]
b367ad0a46 Update dependency axios to v1.9.0 (#222)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 22:39:21 -04:00
renovate[bot]
16ef189fe4 Update dependency vue-router to v4.5.1 (#220)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 22:39:11 -04:00
dependabot[bot]
89d3d70ef9 Bump http-proxy-middleware from 2.0.7 to 2.0.9 (#223)
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 22:39:02 -04:00
renovate[bot]
00e3c8ad5e Update caddy Docker tag to v2.10.0 (#221)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-26 18:10:26 -04:00
renovate[bot]
6444cac6ee Update docker/dockerfile Docker tag to v1.15 (#219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-18 22:31:54 -04:00
b15a4fa107 Change DNS and other small tweaks 2025-04-18 18:44:19 -04:00
19 changed files with 2891 additions and 941 deletions

4
.browserslistrc Normal file
View File

@@ -0,0 +1,4 @@
> 1%
last 2 versions
not dead
not ie 11

View File

@@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4

View File

@@ -10,7 +10,7 @@ jobs:
name: Publish rfd-fyi-backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Prepare
id: prep
@@ -50,7 +50,7 @@ jobs:
name: Publish rfd-fyi-frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Prepare
id: prep

View File

@@ -1,5 +1,4 @@
rfd.fyi
file_server
reverse_proxy /api/* backend:8080
rfd.davegallant.ca {
file_server
reverse_proxy /api/* backend:8080
}

View File

@@ -10,7 +10,7 @@ COPY . .
RUN npm run build
FROM caddy:2.9.1-alpine as runtime
FROM caddy:2.10.2-alpine as runtime
WORKDIR /my-site

View File

@@ -20,8 +20,7 @@ backend:
## frontend: Build and run the frontend from source
frontend:
@npm install @vue/cli-service
@npx vue-cli-service serve
@npm run serve
.PHONY: frontend
## dev: Build and run in docker compose

View File

@@ -1,11 +1,9 @@
# rfd.fyi
# rfd-fyi
This repository provides a simple, less-distracting overlay for hot deals posted on https://forums.redflagdeals.com.
The frontend is made with Vue 3 and the backend is written in Go. The backend exists for caching purposes; to prevent excessive requests to RedFlagDeals itself.
It is hosted at [rfd.fyi](https://rfd.fyi).
## Local Development
To get up and running locally: in one pane/tab, run:

View File

@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.14
# syntax=docker/dockerfile:1.18
FROM cgr.dev/chainguard/go:latest as build
WORKDIR /src

View File

@@ -10,8 +10,12 @@
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
/>
<title>rfd.fyi - An overlay of hot deals</title>
<script defer src="https://umami.snake-cloud.ts.net/script.js" data-website-id="59ffe8be-509a-471e-8cd6-a63c5b35b7aa"></script>
<title>rfd-fyi - An overlay of hot deals</title>
<script
defer
src="https://umami.snake-cloud.ts.net/script.js"
data-website-id="59ffe8be-509a-471e-8cd6-a63c5b35b7aa"
></script>
</head>
<body>
<noscript>
@@ -21,6 +25,7 @@
>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<!-- built files will be auto injected -->
</body>
</html>

3358
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,36 +3,42 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"serve": "vite",
"preview": "vite preview",
"build": "vite build",
"lint": "eslint . --fix"
},
"dependencies": {
"@fontsource/roboto": "5.2.7",
"@github/hotkey": "^3.0.0",
"@mdi/font": "7.4.47",
"@popperjs/core": "^2.11.8",
"axios": "^1.6.0",
"bootstrap": "^5.3.1",
"bootstrap-vue": "^2.22.0",
"axios": "^1.12.0",
"core-js": "^3.32.1",
"cssnano": "^7.0.0",
"jquery": "^3.7.0",
"moment": "^2.29.4",
"vue": "^3.3.4",
"vue": "^3.5.17",
"vue-github-button": "^3.0.3",
"vue-loading-overlay": "^6.0.3",
"vue-router": "4.5.0"
"vue-router": "^4.5.1",
"vuetify": "^3.9.6"
},
"devDependencies": {
"@babel/core": "^7.22.10",
"@babel/eslint-parser": "^7.22.10",
"@types/bootstrap": "^5.2.6",
"@types/mousetrap": "^1.6.11",
"@vitejs/plugin-vue": "^5.2.3",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "^5.0.8",
"@vue/cli-service": "^5.0.9",
"eslint": "^8.47.0",
"eslint-plugin-vue": "^9.17.0",
"postcss-cli": "^11.0.0"
"postcss-cli": "^11.0.0",
"sass-embedded": "^1.89.2",
"unplugin-fonts": "^1.3.1",
"unplugin-vue-components": "^29.0.0",
"vite": "^6.3.6",
"vite-plugin-vuetify": "^2.1.1"
},
"eslintConfig": {
"root": true,
@@ -47,11 +53,5 @@
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}
}

View File

@@ -2,33 +2,37 @@
import axios from "axios";
import moment from "moment";
import Loading from "vue-loading-overlay";
import GithubButton from "vue-github-button";
import { install } from "@github/hotkey";
import "vue-loading-overlay/dist/css/index.css";
import { ref } from "vue";
export default {
data() {
return {
ascending: this.ascending,
filter: window.location.href.split("filter=")[1] || "",
isLoading: false,
sortColumn: this.sortColumn,
topics: [],
};
},
mounted() {
// Install all the hotkeys on the page
for (const el of document.querySelectorAll("[data-hotkey]")) {
install(el);
}
this.sortColumn = localStorage.getItem("sortColumn") || "score";
this.ascending =
localStorage.getItem("ascending") === "false" ? false : true;
this.isLoading = true;
window.addEventListener("keydown", this.handleKeyDown);
this.fetchDeals();
},
beforeUnmount() {
window.removeEventListener("keydown", this.handleKeyDown);
},
methods: {
handleKeyDown(event) {
const isInput = ["INPUT", "TEXTAREA"].includes(
document.activeElement.tagName
);
if (event.key === "/" && !isInput) {
event.preventDefault(); // prevent typing `/` into whatever is focused
this.$refs.filter.focus();
}
},
createFilterRoute(params) {
this.$refs.filter.blur();
history.pushState(
@@ -38,49 +42,15 @@ export default {
);
},
fetchDeals() {
this.isLoading = true;
axios
.get("api/v1/topics")
.then((response) => {
this.topics = response.data;
this.isLoading = false;
this.sortTable(this.sortColumn, false);
})
.catch((err) => {
console.log(err.response);
});
},
sortTable: function sortTable(col, flipAscending) {
if (this.sortColumn === col && flipAscending) {
this.ascending = !this.ascending;
}
var ascending = this.ascending;
localStorage.setItem("ascending", this.ascending);
localStorage.setItem("sortColumn", col);
this.sortColumn = col;
this.topics.sort(function (a, b) {
if (a[col] > b[col]) {
return ascending ? -1 : 1;
} else if (a[col] < b[col]) {
return ascending ? 1 : -1;
}
return 0;
});
},
isMobile() {
if (
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
)
) {
return true;
} else {
return false;
}
},
},
computed: {
formatDate() {
@@ -88,14 +58,6 @@ export default {
return moment(String(v)).format("hh:mm A z (MM/DD)");
};
},
columns() {
return {
Deal: "deal",
Score: "score",
Views: "total_views",
"Last Reply": "last_post_time",
};
},
filteredTopics() {
return this.topics.filter((row) => {
const titles = (
@@ -119,111 +81,81 @@ export default {
};
},
},
components: {
Loading,
GithubButton,
},
};
</script>
<template>
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
<body>
<input
class="form-control"
type="text"
id="filter"
placeholder="Filter"
<script setup>
const headers = [
{ title: "Deal", value: "title", align: "center" },
{ title: "Score", value: "score", align: "center", sortable: true },
{ title: "Views", value: "total_views", align: "center", sortable: true },
{
title: "Last Post",
value: "last_post_time",
align: "center",
sortable: true,
},
];
const sortBy = ref([{ key: "score", order: "desc" }]); // Vuetify 3 format
</script>
data-hotkey="/"
v-model="filter"
v-on:keyup.enter="createFilterRoute(this.filter.toString())"
v-on:keyup.escape="this.$refs.filter.blur()"
ref="filter"
/>
<table class="table table-hover">
<thead class="thead text-muted">
<tr>
<th
v-for="(col, key) in columns"
v-on:click="sortTable(col, true)"
:key="col"
>
{{ key }}
<div
class="arrow"
v-if="col == sortColumn"
v-bind:class="ascending ? 'arrow_up' : 'arrow_down'"
></div>
</th>
</tr>
</thead>
<tbody>
<loading
v-model:active="isLoading"
color="#ccc"
opacity="0"
loader="bars"
:is-full-page="false"
<template>
<v-app>
<v-main>
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
<body>
<v-text-field
v-model="filter"
label="Filter"
ref="filter"
@keyup.enter="createFilterRoute(filter.toString())"
@keyup.esc="$refs.filter.blur()"
hide-details="true"
/>
<v-data-table
:headers="headers"
:items="filteredTopics"
:sort-by="sortColumn"
v-model:sortBy="sortBy"
:items-per-page="25"
>
</loading>
<tr
scope="row"
v-for="(topic, index) in filteredTopics"
:key="`topic.topic_id-${index}`"
>
<td scope="col">
<template #item.title="{ item }">
<a
:href="`https://forums.redflagdeals.com${topic.web_path}`"
:href="`https://forums.redflagdeals.com${item.web_path}`"
target="_blank"
v-html="
highlightMatches(
topic.title + ' [' + topic.Offer.dealer_name + '] '
item.title + ' [' + item.Offer.dealer_name + '] '
)
"
></a>
<a
:href="`${topic.Offer.url}`"
target="_blank"
v-if="topic.Offer.url"
><span class="material-symbols-outlined"> link </span></a
<a :href="item.Offer.url" target="_blank" v-if="item.Offer.url">
<span class="material-symbols-outlined"> link </span>
</a>
<span v-else class="material-symbols-outlined"> link_off </span>
</template>
<template #item.score="{ item }">
<span v-if="item.score > 0" class="green-score"
>+{{ item.score }}</span
>
<span v-if="!topic.Offer.url" class="material-symbols-outlined">
link_off
</span>
</td>
<td v-if="topic.score > 0" scope="col" class="green-score">
+{{ topic.score }}
</td>
<td v-if="topic.score < 0" scope="col" class="red-score">
{{ topic.score }}
</td>
<td v-if="topic.score == 0" scope="col">
{{ topic.score }}
</td>
<td scope="col">{{ topic.total_views }}</td>
<td scope="col">{{ formatDate(topic.last_post_time) }}</td>
</tr>
</tbody>
</table>
<div v-if="!isMobile()">
<footer class="fixed-bottom">
<small
>Press '/' to begin filtering (i.e.
<a
href="/#/filter=costco"
onclick="setTimeout(location.reload.bind(location), 1)"
>https://rfd.fyi/#/filter=costco</a
>)</small
>
<div class="footer-right">
<github-button href="https://github.com/davegallant/rfd-fyi"
>Star</github-button
>
</div>
</footer>
</div>
</body>
<span v-else-if="item.score < 0" class="red-score">{{
item.score
}}</span>
<span v-else>{{ item.score }}</span>
</template>
<template #item.last_post_time="{ item }">
{{ formatDate(item.last_post_time) }}
</template>
<template #loading>
<v-progress-linear indeterminate color="grey" />
</template>
</v-data-table>
</body>
</v-main>
</v-app>
</template>
<style>
@@ -234,4 +166,9 @@ export default {
text-align: center;
color: #2c3e50;
}
.fixed-bottom {
background: #ffc;
color: black;
}
</style>

View File

@@ -2,11 +2,10 @@ import { createApp } from "vue";
import App from "./App.vue";
import { createRouter, createWebHashHistory } from "vue-router";
import "bootstrap/dist/css/bootstrap.min.css";
import "bootstrap/dist/js/bootstrap.min.js";
import "./theme.css";
import { registerPlugins } from "@/plugins";
const routes = [];
const router = createRouter({
@@ -16,5 +15,7 @@ const router = createRouter({
const app = createApp(App);
registerPlugins(app);
app.use(router);
app.mount("#app");

3
src/plugins/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Plugins
Plugins are a way to extend the functionality of your Vue application. Use this folder for registering plugins that you want to use globally.

12
src/plugins/index.js Normal file
View File

@@ -0,0 +1,12 @@
/**
* plugins/index.js
*
* Automatically included in `./src/main.js`
*/
// Plugins
import vuetify from './vuetify'
export function registerPlugins (app) {
app.use(vuetify)
}

35
src/plugins/vuetify.js Normal file
View File

@@ -0,0 +1,35 @@
/**
* plugins/vuetify.js
*
* Framework documentation: https://vuetifyjs.com`
*/
// Styles
import "@mdi/font/css/materialdesignicons.css";
import "vuetify/styles";
const tokyoNight = {
dark: true,
colors: {
background: "#1a1b26",
surface: "#24283b",
primary: "#7aa2f7",
secondary: "#b4f9f8",
accent: "#ff9e64",
error: "#f7768e",
info: "#2ac3de",
success: "#9ece6a",
warning: "#e0af68",
},
};
// Composables
import { createVuetify } from "vuetify";
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({
theme: {
defaultTheme: "tokyoNight",
themes: { tokyoNight },
},
});

View File

@@ -2,11 +2,6 @@ body {
max-width: 100%;
}
.thead {
position: sticky;
top: 0;
}
html {
font-family: sans-serif;
min-width: 100%;
@@ -14,16 +9,6 @@ html {
-ms-text-size-adjust: 100%;
}
a {
color: #96ada5; /**/
}
a:visited {
color: #53514f; /**/
}
a:hover {
color: #d65d03; /**/
}
footer {
background: #212529;
color: white;
@@ -41,28 +26,29 @@ footer {
}
.green-score {
color: rgb(22, 120, 63) !important;
color: rgb(158, 206, 106) !important;
}
.red-score {
color: rgb(175, 21, 21) !important;
color: rgb(247, 118, 142) !important;
}
.arrow_down {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAaCAYAAABPY4eKAAAAAXNSR0IArs4c6QAAAvlJREFUSA29Vk1PGlEUHQaiiewslpUJiyYs2yb9AyRuJGm7c0VJoFXSX9A0sSZN04ULF12YEBQDhMCuSZOm1FhTiLY2Rky0QPlQBLRUsICoIN/0PCsGyox26NC3eTNn3r3n3TvnvvsE1PkwGo3yUqkkEQqFgw2Mz7lWqwng7ztN06mxsTEv8U0Aam5u7r5EInkplUol/f391wAJCc7nEAgE9Uwmkzo4OPiJMa1Wq6cFs7Ozt0H6RqlUDmJXfPIx+qrX69Ti4mIyHA5r6Wq1egND+j+IyW6QAUoul18XiUTDNHaSyGazKcZtdgk8wqhUKh9o/OMvsVgsfHJy0iWqVrcQNRUMBnd6enqc9MjISAmRP3e73T9al3XnbWNjIw2+KY1Gc3imsNHR0YV4PP5+d3e32h3K316TySQFoX2WyWR2glzIO5fLTSD6IElLNwbqnFpbWyO/96lCoai0cZjN5kfYQAYi5H34fL6cxWIZbya9iJyAhULBHAqFVlMpfsV/fHxMeb3er+Vy+VUzeduzwWC45XA4dlD/vEXvdDrj8DvURsYEWK3WF4FA4JQP9mg0WrHZbEYmnpa0NxYgPVObm5teiLABdTQT8a6vrwdRWhOcHMzMzCiXlpb2/yV6qDttMpkeshEzRk4Wo/bfoe4X9vb2amzGl+HoXNT29vZqsVi0sK1jJScG+Xx+HGkL4Tew2TPi5zUdQQt9otPpuBk3e0TaHmMDh1zS7/f780S0zX6Yni+NnBj09fUZUfvudDrNZN+GkQbl8Xi8RLRtHzsB9Hr9nfn5+SjSeWUCXC7XPq5kw53wsNogjZNohYXL2EljstvtrAL70/mVaW8Y4OidRO1/gwgbUMvcqGmcDc9aPvD1gnTeQ+0nmaInokRj0nHh+uvIiVOtVvt2a2vLv7Ky0tL3cRTXIcpPAwMDpq6R4/JXE4vFQ5FI5CN+QTaRSFCYc8vLy1l0rge4ARe5kJ/d27kYkLXoy2Jo4C7K8CZOsEBvb+9rlUp1xNXPL7v3IDwxvPD6AAAAAElFTkSuQmCC");
}
.arrow_up {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAaCAYAAACgoey0AAAAAXNSR0IArs4c6QAAAwpJREFUSA21Vt1PUmEYP4dvkQ8JFMwtBRocWAkDbiqXrUWXzU1rrTt0bdVqXbb1tbW16C9IBUSmm27cODdneoXjputa6069qwuW6IIBIdLvdaF4OAcOiGeDc87zPs/vd57P96WpFq7p6enbGo1mjKZpeTabjU1MTCRagGnOZHFxcXxtbe1XKpUq7+zslJeXl//Mz8+Hy+Uy3RxSE9qTk5M3otFooVQqgef4Wl9f343FYoEmoISrxuNxFX5f9vb2jhn/PxUKhfLS0tIPfFifUESRUMV8Pv/M6XReRm5rTGQyGeXxeGxYe1ezeBpBOBx2rKysbO7v79d4Wy3Y2Nj4GQqFbgnhaugxwiuGJx99Pp9FLBbXxYTXvTqd7v3MzIy6riIWGxJnMpl7AwMD14xGYyMsSq1WUyQdUqn0eSPlusQIsbGrq+vl4OCgvhFQZd1utyv1en0gEolcqsi47nWJlUrlG5fLZVcoFFy2nDKSDpIWlUoVTCQSEk4lCHmJMZ2GTCbTiMVikfIZ88l7enoos9l8dXt7+z6fDicxSJUokqDX6xXcl2wCROoc0vQCWL3sNfLOSdzR0fHY4XC4tVotl40gmVwup9xuN4OQv+UyqCFGH9rg7SOGYVRcBs3IEG4J0nVnamrqOtvuBDGGgQg9+wHFcVEi4a0LNkbdd6TrPKo8ODc311mteIIYjT/a398/jK+s1jnVM0kXoufCFvq0GuiIGEVgQIhfoygM1QrteEa9dAL7ITiYCt4RMabOK5AyKKzKWtvupLcRciu8D5J0EuDDPyT/Snd39yh6VtY2NhYQSR9G79Ds7OxdskRjEyAufvb7/cPoO5Z6e1+xtVKrq6vfcFzyi/A3ZrPZ3GdNSlwgo5ekE4X2RIQGf2C1WlufFE0GBeGWYQ8YERWLxQtnUVB830MKLZfL9RHir8lkssCn2G751tZWEWe03zTKm15YWPiEiXXTYDB0Ig/t7yd8PRws4EicwWHxO4jHD8/C5HiTTqd1BwcHFozKU89origB+y/kmzgYpgOBQP4fGmUiZmJ+WNgAAAAASUVORK5CYII=");
}
.arrow {
float: right;
width: 10px;
height: 12px;
background-repeat: no-repeat;
background-size: contain;
background-position-y: bottom;
a {
color: var(--v-theme-primary);
}
.material-symbols-outlined {
font-size: medium;
a:hover {
color: #d65d03;
}
a:visited {
color: #53514f;
}
@media (min-width: 769px) {
.v-data-table-header th,
.v-data-table__td,
.v-data-footer {
font-size: 1.2rem;
}
}

58
vite.config.mjs Normal file
View File

@@ -0,0 +1,58 @@
// Plugins
import Components from "unplugin-vue-components/vite";
import Vue from "@vitejs/plugin-vue";
import Vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
import Fonts from "unplugin-fonts/vite";
// Utilities
import { defineConfig } from "vite";
import { fileURLToPath, URL } from "node:url";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
Vue({
template: { transformAssetUrls },
}),
// https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
Vuetify(),
Components(),
Fonts({
fontsource: {
families: [
{
name: "Roboto",
weights: [100, 300, 400, 500, 700, 900],
styles: ["normal", "italic"],
},
],
},
}),
],
optimizeDeps: {
exclude: ["vuetify"],
},
define: { "process.env": {} },
resolve: {
alias: {
"@": fileURLToPath(new URL("src", import.meta.url)),
},
extensions: [".js", ".json", ".jsx", ".mjs", ".ts", ".tsx", ".vue"],
},
server: {
port: 3000,
proxy: {
"/api": "http://localhost:8080",
},
},
css: {
preprocessorOptions: {
sass: {
api: "modern-compiler",
},
scss: {
api: "modern-compiler",
},
},
},
});

View File

@@ -1,7 +0,0 @@
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
proxy: "http://localhost:8080",
},
});