Skip to content

Commit

Permalink
New Website (#176)
Browse files Browse the repository at this point in the history
* first draft

* remove useless things

* imatges portada

* mati

* canvi nosaltres

* mati2

* temporal removal of synonyms

* synonyms removal 2

* remove useless files

* [CodeFactor] Apply fixes (#175)

* nosaltres->comunitat

* remove useless stuff

* favicon

* renew

* no author

* show correct words

* show word if got it

* signepèdia

* cerca first attempt

* comments when gotten

* show alternatives when got the entry

* all 'cerca' options, without style

* 0px > 0

* more 0px

* more useless things

* remove 'Tot el contingut'

* style

* small tweeks

* removing videosize

* changing video size

* favicon no background

* codacy/factor changes

* synonyms back online

* fora email

* contributing

* 'cerca' for mobiles

* codefactor solves

* synonyms test for main

* accent link + dead links

* show news text

* sitemap

* sitemap2

* accent logo

* news size
  • Loading branch information
Masclins committed Jan 3, 2019
1 parent d6c9f21 commit 0c79700
Show file tree
Hide file tree
Showing 92 changed files with 7,164 additions and 1,011 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ services:
script:
- cp -a .git/ backend/.git
- docker-compose run backend sh -c "coverage run --source=api,db,register,users,dictionary -m unittest && coverage xml && python-codacy-coverage -r coverage.xml"
- cp -a .git/ frontend/.git
- docker-compose run frontend npm run test-with-coverage

notifications:
email: false
3 changes: 2 additions & 1 deletion backend/dictionary/synonyms.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
# Requests the synonyms of a "word" to OpenThesaurus.
# Removes repeated or equal to "word".
def request_synonyms(word):

try:
req = requests.get("https://openthesaurus.softcatala.org/synonyme/search?q=" + word + "&format=application/json")
req = requests.get("https://openthesaurus.softcatala.org/synonyme/search?q=" + word + "&format=application/json", timeout = 3)
if req.status_code != 200:
db.errorLog("request_synonyms", word, req.status_code)
return []
Expand Down
16 changes: 14 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,22 @@ For any change or contribution, this is what is expected of you:
5. Create a Pull-request and ask for a review from a collaborator
6. If changes are requested or travis does not pass, go to step 3.

To run tests or build the project you'll need to have Docker installed.
You'll also need to create `backend/private/mysql_data.json` file to access the database with the dictionary.
```
{
"user": "mysql user",
"password": "password for mysql user",
"host": "IP where the database is hosted",
"database": "name of the database"
}
```

## Running Unit tests

### Backend
`docker-compose run backend python3 test.py`

### Frontend
`docker-compose run frontend npm test`
## Build Signepedia
`docker-compose build`
`docker-compose up`
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ But if you are here, you are probably looking for a deeper form of collaboration

- Check the [Issues](https://github.com/Masclins/signepedia/issues?q=is%3Aissue+is%3Aopen) and give your oppinion regarding enything being discussed.
- Create new Issues if you see a problem or a missing feature for which there's no Issue already.
- And if you want to develop, you'll be **really** welcomed. Best way to start is to read the [documentation for contributing](https://github.com/Masclins/signepedia/blob/nou-csv/docs/CONTRIBUTING.md).
- And if you want to develop, you'll be **really** welcomed. Best way to start is to read the [documentation for contributing](https://github.com/Masclins/signepedia/blob/develop/docs/CONTRIBUTING.md).

## Language
The official language for this project is english. Even though, when the project begun we used catalan for everything.
Expand Down
8 changes: 3 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
"dependencies": {
"body-parser": "^1.18.2",
"codacy-coverage": "^3.0.0",
"crypto": "^1.0.1",
"ejs": "^2.5.9",
"express": "^4.16.3",
"express-fileupload": "^0.4.0",
"express-fileupload": "^1.0.0",
"fs": "0.0.2",
"istanbul": "^0.4.5",
"jasmine-node": "^1.14.5",
"opn": "^5.3.0",
"request": "^2.85.0",
"sitemap": "^1.13.0",
"youtube-api": "^2.0.9"
"sitemap": "^2.1.0"
},
"scripts": {
"test": "jasmine-node spec",
Expand Down
43 changes: 43 additions & 0 deletions frontend/public/css/accordion.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

.accordion .accordion_content.closed{
opacity: 0;
height: 0;
position: absolute;
overflow: hidden;
}
.accordion .accordion_content{
padding: 3px 20px 0 0;
opacity: 1;
height: 100%;
width: auto;
}
.accordion>li{
position: relative;
overflow: hidden;
border-radius: 4px;
margin-bottom:18px;
}
.accordion>li>a i{
position: absolute;
display: block;
top: 0;
left: 0;
width: 30px;
height: 30px;
background: url('../images/toggle_icon.png') 0 -37px no-repeat;
}

.accordion>li>a{
display: block;
position: relative;
padding: 5px 20px 9px 40px;
font-size: 12px;
color: #353434;
font-weight: bold;
}
.accordion>li>a:hover, .accordion>li>a.active{
color: #70bf04;
}
.accordion>li>a.active i{
background-position: 0 0;
}
Loading

0 comments on commit 0c79700

Please sign in to comment.