Skip to content

Commit e07e8a7

Browse files
authored
Merge pull request #205 from jordanopensource/development
Merge development into main
2 parents 3fadcef + 2695246 commit e07e8a7

File tree

91 files changed

+12080
-8072
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+12080
-8072
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ steps:
3131
]
3232
tags:
3333
- ${DRONE_COMMIT_SHA}
34-
- stable
34+
- latest
3535
username:
3636
from_secret: docker_username
3737
password:

.env.sample

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# endpoint for API
2-
COMMUNITY_API_URL=
3-
TARGET_ENV=
4-
DRONE_COMMIT_SHA=
5-
DRONE_BUILD_NUMBER=
6-
DRONE_BUILD_LINK=
7-
DRONE_COMMIT_LINK=
8-
DRONE_REPO_LINK=
9-
DRONE_BUILD_FINISHED=
10-
DEBUG=
2+
NUXT_PUBLIC_COMMUNITY_API_URL=
3+
NUXT_PUBLIC_TARGET_ENV=
4+
NUXT_PUBLIC_BUILD_COMMIT_SHA=
5+
NUXT_PUBLIC_BUILD_NUMBER=
6+
NUXT_PUBLIC_BUILD_LINK=
7+
NUXT_PUBLIC_BUILD_COMMIT_LINK=
8+
NUXT_PUBLIC_BUILD_REPO_LINK=
9+
NUXT_PUBLIC_BUILD_TIMESTAMP=
10+
NUXT_PUBLIC_DEBUG=
11+
NUXT_PUBLIC_SESSION_COOKIE_NAME=

CONTRIBUTING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Contributing to JOSA.community
2+
3+
Thank you for your interest in contributing to our project! We welcome your help and appreciate your support.
4+
To ensure a smooth and collaborative process, please take a moment to review this contributing guide.
5+
6+
## Code or Documentation Contributions
7+
8+
1. [Fork this repository](https://github.com/jordanopensource/community-web/fork).
9+
2. Clone the forked repository to your local machine with this command:
10+
`git clone https://github.com/<your github username>/community-web.git`
11+
3. Switch to `development` branch with this command: `git checkout development`.
12+
**If your contribution is a documentation, jump to step 7 below**.
13+
4. (**_You can ignore this step if you're using docker compose_**) Create a `.env` file and copy the content of [`.env.sample`](https://github.com/jordanopensource/community-web/blob/development/.env.sample) file into it,
14+
then add the value(s) of environment variable(s).
15+
You can use the current running API URL as the value to `NUXT_PUBLIC_COMMUNITY_API_URL` variable as the following:
16+
`NUXT_PUBLIC_COMMUNITY_API_URL=https://community.api.prod.josa.ngo/v2`.
17+
(_other environment variables are optional_).
18+
19+
5. [Run the project locally](https://github.com/jordanopensource/community-web/blob/main/CONTRIBUTING.md#running-the-project-locally).
20+
6. Check current [issues](https://github.com/jordanopensource/community-web/issues),
21+
and if you're a beginner, you can [filter issues with `good first issues` label](https://github.com/jordanopensource/contributions-web/issues?q=is%3Aopen+is%3Aissue+label%3Ahacktoberfest+label%3A%22good+first+issue%22).
22+
If you decide to work on one of the issues, write a comment on the issue asking to be assigned to it.
23+
_Do not work on issues that you're not assigned to in order to avoid duplicate work_.
24+
7. Create a new branch from `development` branch for the task that you want to work on:
25+
`git checkout -b <prefix>/branch-title`
26+
- `<prefix>`: The prefix should be one of the following:
27+
- `feat` for new features
28+
- `fix` for bug fixes
29+
- `task` for other general tasks
30+
- `docs` for documentation
31+
- `branch-title` should be short and concise and written in kebab-case (separate each word with '-')
32+
**Example**:
33+
```sh
34+
git checkout development && git pull # pull the latest changes from development branch
35+
36+
git checkout -b fix/type # create new branch
37+
```
38+
39+
8. Write descriptive and concise commit messages.
40+
Follow these guidelines when writing commit messages:
41+
- Limit the first line of the commit message to 72 characters or less.
42+
- Use the imperative mood and present tense in the subject line, e.g. "Fix typo in the homepage" instead of "Fixed typo...".
43+
- Use the body of the commit message to provide additional context or details, _if necessary_.
44+
- Use bullet points in the body of the commit message to break down changes, _if necessary_.
45+
46+
9. Push to your branch and then make a pull request from your branch to the base `development`.
47+
48+
### Running the Project Locally
49+
50+
#### Using Docker
51+
Make sure that [docker](https://docs.docker.com/engine/install/) is installed on your system
52+
and then run the project locally using [docker compose](https://github.com/jordanopensource/community-web/blob/development/docker-compose.yaml) with this command:
53+
`docker compose up`.
54+
55+
#### Using Node:
56+
1. Make sure [Node](https://nodejs.org/en) v18 is installed. Alternatively, you can use [NVM](https://github.com/nvm-sh/nvm#installing-and-updating) to install any node version.
57+
2. Navigate to the project directory and run `npm i` to install the dependancies.
58+
3. Run the project in development mode by running `npm run dev`. You can now preview the project on port `3000` by visiting `http://localhost:3000/` in your browser.
59+
60+
## Issues and Features Requests
61+
62+
If you want to report a bug or submit a feature request, please use one of the [templates here](https://github.com/jordanopensource/community-web/issues/new/choose).

Dockerfile

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,47 @@
11
# set global args
2-
ARG COMMUNITY_API_URL HOST=0.0.0.0 PORT=3000 USER=node TARGET_ENV DRONE_COMMIT_SHA=${DRONE_COMMIT_SHA} DRONE_BUILD_NUMBER=${DRONE_BUILD_NUMBER} DRONE_BUILD_LINK=${DRONE_BUILD_LINK} DRONE_COMMIT_LINK=${DRONE_COMMIT_LINK} DRONE_REPO_LINK=${DRONE_REPO_LINK} DRONE_BUILD_FINISHED=${DRONE_BUILD_FINISHED} DEBUG='false'
2+
ARG USER=node DRONE_COMMIT_SHA=${DRONE_COMMIT_SHA} DRONE_BUILD_NUMBER=${DRONE_BUILD_NUMBER} DRONE_BUILD_LINK=${DRONE_BUILD_LINK} DRONE_COMMIT_LINK=${DRONE_COMMIT_LINK} DRONE_REPO_LINK=${DRONE_REPO_LINK} DRONE_BUILD_FINISHED=${DRONE_BUILD_FINISHED}
33

44
###########
55
# BUILDER #
66
###########
7-
FROM node:16.14.0 AS builder
7+
FROM node:18.14.0 AS builder
88

9-
# pass the global args
10-
ARG COMMUNITY_API_URL
11-
ARG HOST
12-
ARG PORT
13-
ARG TARGET_ENV
14-
ARG DRONE_COMMIT_SHA
15-
ARG DRONE_BUILD_NUMBER
16-
ARG DRONE_BUILD_LINK
17-
ARG DRONE_COMMIT_LINK
18-
ARG DRONE_REPO_LINK
19-
ARG DRONE_BUILD_FINISHED
20-
ARG DEBUG
219

2210
# copy build context and install dependencinpm res
2311
WORKDIR /workspace
2412
COPY . .
2513
RUN npm install
2614

27-
# inject build args as enviroment variables
28-
ENV COMMUNITY_API_URL=${COMMUNITY_API_URL} HOST=${HOST} PORT=${PORT} TARGET_ENV=${TARGET_ENV} DRONE_COMMIT_SHA=$DRONE_COMMIT_SHA DRONE_BUILD_NUMBER=${DRONE_BUILD_NUMBER} DRONE_BUILD_LINK=${DRONE_BUILD_LINK} DRONE_COMMIT_LINK=${DRONE_COMMIT_LINK} DRONE_REPO_LINK=${DRONE_REPO_LINK} DRONE_BUILD_FINISHED=${DRONE_BUILD_FINISHED} DEBUG=${DEBUG}
2915
# build NuxtJS project
3016
RUN npm run build
3117

3218
###########
3319
# PROJECT #
3420
###########
35-
FROM node:16-slim
21+
FROM node:18-slim
3622

3723
# pass the global args
38-
ARG COMMUNITY_API_URL
39-
ARG HOST
40-
ARG PORT
4124
ARG USER
42-
ARG TARGET_ENV
4325
ARG DRONE_COMMIT_SHA
4426
ARG DRONE_BUILD_NUMBER
4527
ARG DRONE_BUILD_LINK
4628
ARG DRONE_COMMIT_LINK
4729
ARG DRONE_REPO_LINK
4830
ARG DRONE_BUILD_FINISHED
49-
ARG DEBUG
5031

5132
# copy builder output to project workdir
5233
WORKDIR /app
53-
COPY --from=builder --chown=${USER}:${USER} /workspace/.nuxt /app/.nuxt
54-
COPY --from=builder --chown=${USER}:${USER} /workspace/.output /app/.output
55-
COPY --from=builder --chown=${USER}:${USER} /workspace/node_modules /app/node_modules
5634
COPY --from=builder --chown=${USER}:${USER} /workspace/package.json /app/
57-
58-
# inject build args as enviroment variables
59-
ENV COMMUNITY_API_URL=${COMMUNITY_API_URL} HOST=${HOST} PORT=${PORT} TARGET_ENV=${TARGET_ENV} DRONE_COMMIT_SHA=${DRONE_COMMIT_SHA} DRONE_BUILD_NUMBER=${DRONE_BUILD_NUMBER} DRONE_BUILD_LINK=${DRONE_BUILD_LINK} DRONE_COMMIT_LINK=${DRONE_COMMIT_LINK} DRONE_REPO_LINK=${DRONE_REPO_LINK} DRONE_BUILD_FINISHED=${DRONE_BUILD_FINISHED} DEBUG=${DEBUG}
35+
COPY --from=builder --chown=${USER}:${USER} /workspace/.output /app/.output
6036

6137
# set user context
6238
USER ${USER}
6339

40+
# inject build args as enviroment variables
41+
ENV NUXT_PUBLIC_BUILD_COMMIT_SHA=${DRONE_COMMIT_SHA} NUXT_PUBLIC_BUILD_NUMBER=${DRONE_BUILD_NUMBER} NUXT_PUBLIC_BUILD_LINK=${DRONE_BUILD_LINK} NUXT_PUBLIC_BUILD_COMMIT_LINK=${DRONE_COMMIT_LINK} NUXT_PUBLIC_BUILD_REPO_LINK=${DRONE_REPO_LINK} NUXT_PUBLIC_BUILD_TIMESTAMP=${DRONE_BUILD_FINISHED}
42+
6443
# expose port
6544
EXPOSE ${PORT}
6645

6746
# run for production
68-
CMD [ "npm", "run", "start"]
47+
CMD [ "node", "/app/.output/server/index.mjs"]

app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<div class="bg-josa-warm-grey-light">
3-
<BuildInfoBanner v-if="config.public.TARGET_ENV === 'development'" />
2+
<div class="bg-community-grey-light">
3+
<BuildInfoBanner v-if="config.public.targetEnv === 'development'" />
44
<PageHeader />
55
<NuxtPage />
66
<PageFooter />

assets/css/form.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ input {
33
}
44

55
input::placeholder {
6-
@apply text-josa-warm-grey-dark;
6+
@apply text-community-grey-dark;
77
}
88

99
textarea::placeholder {
10-
@apply text-josa-warm-grey-dark;
10+
@apply text-community-grey-dark;
1111
}
1212

1313
.input-control label {
14-
display : block;
14+
display: block;
1515
margin-bottom: 0.5rem;
1616
}
1717

1818
.input-control input,
1919
.input-control textarea {
20-
display : block;
21-
width : 100%;
22-
box-sizing : border-box;
23-
font : inherit;
24-
border : 1px solid #e0dddb;
25-
padding : 10px;
20+
display: block;
21+
width: 100%;
22+
box-sizing: border-box;
23+
font: inherit;
24+
border: 1px solid #e0dddb;
25+
padding: 10px;
2626
margin-bottom: 1rem;
2727
}
2828

2929
.input-control input:focus,
3030
.input-control textarea:focus {
3131
background-color: #f7f6f5;
32-
outline : none;
32+
outline: none;
3333
}

assets/css/global.css

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ padding 40 px btween eneties top bottom, between container items 20px
1111
*/
1212
body {
1313
@apply text-base font-normal;
14-
@apply text-josa-black-text;
14+
@apply text-community-black-text;
1515
}
1616

1717
/* Titles are classes used to descirbe titles of entities */
@@ -27,18 +27,37 @@ body {
2727
@apply border-dotted border-b border-gray-500;
2828
}
2929

30-
h1 {
31-
@apply text-5xl;
30+
.secondary-text {
31+
@apply text-community-grey-text;
32+
}
33+
34+
h1:not(.heading h1) {
35+
@apply text-4xl;
3236
@apply text-white;
3337
}
3438

3539
h2 {
36-
@apply text-4xl;
40+
@apply text-2xl;
3741
}
3842

3943
h3 {
4044
@apply lg:text-xl;
4145
}
46+
.loader {
47+
@apply h-6 w-6;
48+
@apply border-4 border-solid border-gray-200;
49+
border-radius: 50%;
50+
border-top: 3px solid #0c97ac;
51+
animation: spin 0.8s linear infinite;
52+
@keyframes spin {
53+
0% {
54+
transform: rotate(0deg);
55+
}
56+
100% {
57+
transform: rotate(360deg);
58+
}
59+
}
60+
}
4261

4362
.rounded {
4463
}
@@ -59,15 +78,15 @@ h3 {
5978
}
6079

6180
.button-blue {
62-
@apply border-josa-blue text-josa-blue;
81+
@apply border-community-blue text-community-blue;
6382
}
6483

6584
.button-blue:hover {
66-
@apply bg-josa-blue text-white !important;
85+
@apply bg-community-blue text-white !important;
6786
}
6887

6988
.button-blue-full {
70-
@apply border-josa-blue bg-josa-blue;
89+
@apply border-community-blue bg-community-blue;
7190
color: #fff !important;
7291
}
7392

@@ -77,7 +96,7 @@ h3 {
7796
}
7897

7998
.button-flat {
80-
@apply rounded-none border-none normal-case py-3 px-6 text-josa-black font-semibold;
99+
@apply rounded-none border-none normal-case py-3 px-6 text-community-black font-semibold;
81100
}
82101

83102
.button-flat:hover {
@@ -92,11 +111,11 @@ a {
92111

93112
a:hover,
94113
a.active {
95-
@apply text-josa-blue;
114+
@apply text-community-blue;
96115
}
97116

98117
.nav-link {
99-
@apply p-2 uppercase block text-josa-warm-grey-light;
118+
@apply p-2 uppercase block text-community-grey-light;
100119
}
101120

102121
@screen lg {
@@ -125,4 +144,12 @@ ul > li {
125144

126145
.title {
127146
font-weight: 500;
128-
}
147+
}
148+
149+
.delete-btn {
150+
@apply cursor-pointer bg-trashIcon bg-no-repeat bg-contain w-4 h-4 border-none;
151+
}
152+
153+
.edit-btn {
154+
@apply cursor-pointer bg-contain w-4 h-4 bg-no-repeat;
155+
}

assets/css/typography.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ title {
184184
.mono,
185185
h1,
186186
h2,
187-
h3,
188-
h4,
189-
h5,
190-
h6 {
187+
h3 {
191188
font-family: 'IBM Mono';
192189
}
193190

assets/icons/icon-checkbox.svg

Lines changed: 3 additions & 0 deletions
Loading

assets/icons/icon-eye-closed.svg

Lines changed: 11 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)