Skip to content

Commit 64b5e5b

Browse files
committed
Merge remote-tracking branch 'origin/main' into stage
# Conflicts: # community-app/frontend/src/components/overview/LastMonth.vue # static/js/vue/app-Alert-Be0p78_K.js # static/js/vue/app-Alert-Boh7HWXA.js # static/js/vue/app-Alert-DVgOdEp7.js # static/js/vue/app-BusinessList-B8dxRR0b.js # static/js/vue/app-BusinessListStore-QupQ-pcp.js # static/js/vue/app-EditUser-23Le3jR4.js # static/js/vue/app-EditUser-DHLj1JPD.js # static/js/vue/app-EditUser-GdycPIkV.js # static/js/vue/app-EduList-0qCZNyTF.js # static/js/vue/app-EduListStore-Dm4XAekk.js # static/js/vue/app-EduListStore-DvEMDSso.js # static/js/vue/app-EduListStore-ImUgIcWv.js # static/js/vue/app-ForHireList-Bl2-rHsF.js # static/js/vue/app-ForHireList-BwsSgoJZ.js # static/js/vue/app-ForHireList-DgNLSEw2.js # static/js/vue/app-ForHireListStore-ClLzDPoy.js # static/js/vue/app-ForHireListStore-DX2H3o3Y.js # static/js/vue/app-ForHireListStore-lwGVjcm8.js # static/js/vue/app-InstitutionBasics-Bhdgh4Qf.js # static/js/vue/app-Internships-DCHTjhtd.js # static/js/vue/app-Location-D5EmNHeL.js # static/js/vue/app-PerformantEllipsis-BmbO2cnl.js # static/js/vue/app-PerformantEllipsis-D55tgJEN.js # static/js/vue/app-PerformantEllipsis-D6lZn9cO.js # static/js/vue/app-SocialView-B5hL_7sQ.js # static/js/vue/app-UserList-BYa0j4eG.js # static/js/vue/app-UserList-DHZy35pA.js # static/js/vue/app-UserList-uH3y1gSg.js # static/js/vue/app-icons-BdIiVwe_.js # static/js/vue/app.js
2 parents f1633c3 + 54cdd42 commit 64b5e5b

38 files changed

Lines changed: 1204 additions & 180 deletions

README.md

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
1-
# vvvv.org
2-
3-
The new website for vvvv.
4-
5-
Local build:
6-
* [Download Hugo Extended](https://gohugo.io/installation/windows/#prebuilt-binaries), unzip and place that into your programs folder,
7-
* Add it to your path (environment variables),
1+
Source of [vvvv.org](http://vvvv.org)
2+
3+
## Adding a Blog post
4+
5+
- Fork this repository
6+
- Browse [the blog folder](https://github.com/vvvv/vvvv.org/tree/main/content/blog/) to see how existing posts are written
7+
- Create a new folder in the `\{currentYear]\News` or `\{currentYear]\Dates` folder (depending on the type of your post) with a short name describing the post (that folder name is just for the folder structure, no other relevance)
8+
- The only file that is mandatory in your folder is the `index.md` file. Best copy one over from another blogpost and modify it
9+
- For posts of type `date` you need to enter from- and to- dates in unix time, which can be converted to from date using e.g. this [date -> timestamp converter](https://dqydj.com/unix-time-to-date-converter/)
10+
- To preview your post locally, see the section "Local Build" below
11+
- Finally make a pull-request from your fork to this repo
12+
13+
### Shortcodes
14+
For embedding external media use these short codes:
15+
16+
* Mastodon: `{{< mastodon "mastodon.xyz/@vvvv/109598445063555699" 550 >}}` Parameters: Link [Height (default=550)]
17+
* Pixelfed: `{{< pixelfed "pixelfed.social/p/madewithvvvv/509678388578111219" 550 >}}` Parameters: Link [Height (default=550)]
18+
* Vimeo: `{{< vimeo 761078720 >}}` Parameters: Vimeo ID
19+
* Youtube `{{< youtube 761078720 >}}` Parameters: Youtube ID
20+
21+
## Local build:
22+
* [Download Hugo Extended](https://github.com/gohugoio/hugo/releases/tag/v0.145.0), **Version 0.145**, unzip and place that into your programs folder,
23+
* Add it to your path (environment variables)
824
* Powershell:
9-
* cd C:\dev\vvvv.org
10-
* hugo server
25+
* `cd C:\dev\vvvv.org`
26+
* `hugo server`
1127
* Open http://localhost:1313/ in your browser
1228

1329
To run in the browser and to be able to access the site from the same local wifi (eg. checking on mobile), run hugo with:
1430
`hugo serve --bind 0.0.0.0 --baseURL http://IP:1313` where IP is your IP from `ipconfig`
15-
16-
### Blog timecodes
17-
A date blogs from- and to- dates are specified in unix time, which can be converted to from date using e.g. this [date -> timestamp converter](https://dqydj.com/unix-time-to-date-converter/)
18-
19-
### Shortcodes:
20-
21-
__Mastodon:__
22-
{{< mastodon "mastodon.xyz/@vvvv/109598445063555699" 550 >}}
23-
Parameters: Link [Height (default=550)]
24-
25-
__Pixelfed:__
26-
{{< pixelfed "pixelfed.social/p/madewithvvvv/509678388578111219" 550 >}}
27-
Parameters: Link [Height (default=550)]
28-
29-
__Vimeo:__
30-
{{< vimeo 761078720 >}}
31-
Parameters: Vimeo ID
32-
33-
__Youtube:__
34-
{{< youtube 761078720 >}}
35-
Parameters: Youtube ID

community-app/frontend/src/components/InstitutionBasics.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const socialKeys = ["website", "github", "nuget", "mastodon", "pixelfed"];
2424

2525
<Internships :data="data" text="Accepting internship applications" :isLink="true"/>
2626

27-
<SocialView class="mt-4 mb-4 pt-3 border-top" v-if="Object.keys(data.social).length>0" :social="data.social" />
27+
<SocialView class="mt-4 py-2 border-top" v-if="Object.keys(data.social).length>0" :social="data.social" />
2828

2929
<Links class="links" :data="data"/>
3030

community-app/frontend/src/components/Links.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const exists = computed(()=>{
2525
2626
</script>
2727
<template>
28-
<div class="my-3 pt-2 border-top" v-if="exists">
29-
<p class="text-muted mb-2">Direct links:</p>
28+
<div class="mb-3 pt-2 border-top" v-if="exists">
29+
<p class="text-muted mb-2 smallTitle">Direct links</p>
3030
<template v-for="link in links" :key="link.name">
3131
<p v-if="link.url" class="mb-1">
3232
<a :href="link.url" target="_blank">{{ link.name }}</a>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import Constants from "../../constants.js"
2+
import { defineStore } from 'pinia'
3+
4+
const latestMonthThumb = 'https://vvvv.org/img/blog/review-thumb.png';
5+
6+
export const useLastMonthStore = defineStore ('lastMonth',{
7+
state: ()=>{
8+
return {
9+
title: "",
10+
link:"",
11+
thumb:"",
12+
fetched: false
13+
}
14+
},
15+
actions: {
16+
async fetch(force = false){
17+
18+
if (this.fetched && !force) return;
19+
20+
try{
21+
const rss = await fetchRSS();
22+
this.title = rss.title;
23+
this.link = rss.link;
24+
this.thumb = rss.thumb;
25+
this.fetched = true;
26+
}
27+
catch (error){
28+
this.fetched = false;
29+
}
30+
31+
}
32+
}
33+
})
34+
35+
async function fetchRSS(){
36+
37+
// const imageParamsAvatars = "?withoutEnlargement=true&quality=90&fit=cover&height=60&width=60";
38+
// const limit = 10;
39+
40+
const url = Constants.OVERVIEW_RSS;
41+
42+
const response = await fetch(url);
43+
44+
if (response.ok)
45+
{
46+
const items = [];
47+
48+
try{
49+
const text = await response.text();
50+
51+
const parser = new DOMParser();
52+
const xmlDoc = parser.parseFromString(text, 'text/xml');
53+
const data = xmlDoc.querySelectorAll('item');
54+
55+
56+
data.forEach(item => (
57+
items.push(
58+
{
59+
title: getItem(item, 'title'),
60+
link: getItem(item, 'link'),
61+
category: getItem(item, 'category'),
62+
description: getItem(item, 'description'),
63+
thumb: getItem(item, 'thumb')
64+
}
65+
)
66+
));
67+
}
68+
catch (error)
69+
{
70+
console.log (error);
71+
}
72+
73+
const lastMonth = items.find(i=>i.category=="Monthly Reviews")
74+
75+
return {
76+
title: lastMonth.title,
77+
link: lastMonth.link,
78+
thumb: latestMonthThumb
79+
}
80+
}
81+
else {
82+
throw Error ("Connection Error");
83+
}
84+
}
85+
86+
function getItem(item, tag)
87+
{
88+
return item.querySelector(tag)?.textContent
89+
}

community-app/frontend/src/components/overview/LatestTopics.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,18 @@ async function sync(force)
4040
<NSkeleton text :repeat="5" class="mb-4 mx-3"></NSkeleton>
4141
</template>
4242
<template v-else>
43-
<ul v-if="store.topics.length > 0" class="list-group list-group-flush list">
44-
<li v-for="(topic, index) in store.topics" :key="index" class="list-group-item d-flex flex-nowrap link">
45-
<NEllipsis :line-clamp="1" :tooltip=false>
46-
<a :href="topic.link" target="_blank">{{ topic.title }}</a>
47-
</NEllipsis>
48-
<NBadge v-if="topic.count>0" :value="topic.count" color="DarkGray" class="ml-2"/>
49-
</li>
50-
</ul>
43+
<table v-if="store.topics.length > 0" class="table table-sm list">
44+
<tr v-for="(topic, index) in store.topics" :key="index" class="link">
45+
<td>
46+
<NEllipsis :line-clamp="1" :tooltip=false>
47+
<a :href="topic.link" target="_blank">{{ topic.title }}</a>
48+
</NEllipsis>
49+
</td>
50+
<td class="pl-3">
51+
<span v-if="topic.count" class="count">{{ topic.count }}</span>
52+
</td>
53+
</tr>
54+
</table>
5155
<div v-else class="m-3">Okay, Houston... we've had a problem here.<br/>Try again later.</div>
5256
</template>
5357
</div>

community-app/frontend/src/components/overview/LatestTopicsStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const useLatestTopicsStore = defineStore ('latestTopics',{
2727

2828
async function fetchLatestTopics(){
2929

30-
const count = 7;
30+
const count = 9;
3131
const response = await fetch(Constants.FORUM_TOPICS+`?count=${count}`);
3232

3333
if (response.ok)

community-app/frontend/src/components/overview/Opportunities.vue

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<script setup>
22
33
import { ref, onMounted } from 'vue';
4-
import { NTag, NEllipsis, NSkeleton } from 'naive-ui'
4+
import { NTag, NEllipsis, NSkeleton, NTooltip, NDropdown, NButton } from 'naive-ui'
55
import { useOpportunitiesStore } from './OpportunitiesStore.js'
66
import { showBusinessProfile } from "../../utils.js"
77
import SectionTitle from './SectionTitle.vue'
8+
import Constants from '../../Constants.js'
9+
import { useRouter } from 'vue-router';
810
911
const store = useOpportunitiesStore();
1012
const loading = ref(false);
1113
14+
const router = useRouter();
15+
1216
onMounted(()=>{
1317
sync();
1418
})
@@ -26,11 +30,41 @@ async function sync(force)
2630
loading.value = false;
2731
}
2832
}
33+
34+
const addOptions = ref(
35+
[
36+
{
37+
label: 'Add job via Job Forum',
38+
key: 'job',
39+
link: Constants.FORUM_JOBS_TOPIC
40+
},
41+
{
42+
label: 'Add internship via business profile',
43+
key: 'internship',
44+
link: Constants.PROFILE_BUSINESS
45+
}
46+
]
47+
)
48+
49+
function handleAdd (value)
50+
{
51+
const link = addOptions.value.find(o=>o.key == value).link;
52+
document.location.href = link;
53+
}
54+
2955
</script>
3056

3157
<template>
32-
<div class="section pl-4">
33-
<SectionTitle showRefresh="true" :loading="loading" title="Opportunities" @sync="sync(true)"/>
58+
<div class="section pl-4 opportunities">
59+
<SectionTitle showRefresh="true" :loading="loading" title="Opportunities" @sync="sync(true)">
60+
<template #beforeSync>
61+
<NDropdown placement="bottom-start" trigger="click" size="small" :options="addOptions" @select="handleAdd">
62+
<div class="mr-3">
63+
<NButton size="small">+ Add</NButton>
64+
</div>
65+
</NDropdown>
66+
</template>
67+
</SectionTitle>
3468
<div class="row pt-1">
3569
<template v-if="loading">
3670
<NSkeleton text :repeat="5" class="mb-4 mx-3"></NSkeleton>
@@ -53,9 +87,22 @@ async function sync(force)
5387
</a>
5488
</NEllipsis>
5589
</li>
56-
</ul>
90+
</ul>
5791
<!-- <div v-else class="m-3">Okay, Houston... we have a problem here.<br/>Try again later.</div> -->
5892
</template>
5993
</div>
94+
<div class="row justify-content-end">
95+
96+
<!-- <NTooltip trigger="hover">
97+
<template #trigger>
98+
</template>
99+
Add job via Job Forum
100+
</NTooltip>
101+
<NTooltip trigger="hover">
102+
<template #trigger>
103+
</template>
104+
Add internship via business profile
105+
</NTooltip> -->
106+
</div>
60107
</div>
61108
</template>

community-app/frontend/src/components/overview/SectionTitle.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@ const emit = defineEmits(['showAll', 'sync']);
77
</script>
88

99
<template>
10-
<div class="row pb-1 mb-2 sectionBorder no-gutter">
11-
<div class="d-flex col-auto">
10+
<div class="row pb-1 mb-2 sectionBorder no-gutter align-items-center justify-content-between">
11+
<div class="d-flex col pl-0">
1212
<template v-if="link">
1313
<a v-if="!isExternal" :href="link" @click.prevent="emit('showAll')" class="pr-3"><h2>{{title}}</h2></a>
1414
<a v-else :href="link" class="pr-3" target="_blank"><h2>{{title}}</h2></a>
1515
</template>
1616
<h2 v-else>{{ title }}</h2>
1717
<slot></slot>
1818
</div>
19-
<div v-if="showRefresh" class="col-1 ml-auto">
20-
<SyncButton v-if="!loading" @click="emit('sync')"/>
21-
<span v-else>...</span>
19+
<div v-if="showRefresh" class="col-auto">
20+
<div class="d-flex align-items-center">
21+
<slot name="beforeSync"></slot>
22+
<SyncButton v-if="!loading" @click="emit('sync')"/>
23+
<span v-else>...</span>
24+
</div>
2225
</div>
2326
</div>
2427
</template>

community-app/frontend/src/constants.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ const BACKEND_REMOTE="https://io.vvvv.org/v1/"
77
const DATAURL = DATA_REMOTE
88
const BACKENDURL = import.meta.env.DEV ? BACKEND_LOCAL: BACKEND_REMOTE
99

10+
const PROFILE = "/edit-profile"
11+
1012
export default Object({
1113

1214
//LINKS
1315
FORUM:"https://forum.vvvv.org/",
16+
FORUM_JOBS_TOPIC: "https://forum.vvvv.org/c/jobs/26",
1417
NUGET_ORG:"https://www.nuget.org/packages?q=tag%3Avl&includeComputedFrameworks=true&prerel=true&sortby=created-desc",
1518
NUGET_PACK_LINK:"https://www.nuget.org/packages/",
19+
20+
//RSS
21+
OVERVIEW_RSS: "https://vvvv.org/community/index.xml",
1622

1723
//DATA
1824
BASEURL: DATAURL,
@@ -22,6 +28,13 @@ export default Object({
2228
GET_EDUS: DATAURL + 'items/Edu',
2329
GET_USERS: DATAURL + 'items/User',
2430
GET_HIRE: DATAURL + 'items/Hire',
31+
32+
//PROFILE
33+
PROFILE: PROFILE,
34+
PROFILE_BUSINESS: PROFILE + "?p=business",
35+
PROFILE_EDU: PROFILE + "?p=edu",
36+
PROFILE_PERSONAL: PROFILE + "?p=personal",
37+
PROFILE_FORHIRE: PROFILE + "?p=forhire",
2538

2639
//BACKEND
2740
NUGETS_LATEST: BACKENDURL + 'latestNugets',

community-app/frontend/src/routes/BusinessView.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ onMounted(async ()=>
5454
<div class="col-12 col-md-6 col-lg-4 mb-sm-4">
5555
<InstitutionBasics class="mb-3" :data="company"/>
5656
</div>
57-
<div v-if="description" class="col-12 col-md-6 col-lg-8 mt-0 mt-md-3 mt-md-0 profileContent">
57+
<div v-if="description" class="col-12 col-md-6 col-lg-8 mt-md-0 pt-md-0 profileContent">
58+
<div class="border-top d-flex d-md-none mt-2 mb-4"></div>
5859
<p v-html="description"></p>
5960
<MaintainedBy class="maintained mt-4 pt-3 border-top d-block d-md-none" :data="company.owner"/>
6061
</div>

0 commit comments

Comments
 (0)