Skip to content

Commit 2fce57b

Browse files
BERNHIST v2.0.0
1 parent 9bd4b0d commit 2fce57b

File tree

158 files changed

+19163
-3147
lines changed

Some content is hidden

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

158 files changed

+19163
-3147
lines changed

.env

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# In all environments, the following files are loaded if they exist,
2+
# the later taking precedence over the former:
3+
#
4+
# * .env contains default values for the environment variables needed by the app
5+
# * .env.local uncommitted file with local overrides
6+
# * .env.$APP_ENV committed environment-specific defaults
7+
# * .env.$APP_ENV.local uncommitted environment-specific overrides
8+
#
9+
# Real environment variables win over .env files.
10+
#
11+
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
12+
#
13+
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
14+
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
15+
16+
###> symfony/framework-bundle ###
17+
APP_ENV=dev
18+
APP_SECRET=b2803eb8c0caa56d1570622c2fb949d2
19+
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
20+
#TRUSTED_HOSTS='^localhost|example\.com$'
21+
###< symfony/framework-bundle ###
22+
23+
###> doctrine/doctrine-bundle ###
24+
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
25+
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
26+
# Configure your db driver and server_version in config/packages/doctrine.yaml
27+
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
28+
###< doctrine/doctrine-bundle ###
29+
30+
###> symfony/swiftmailer-bundle ###
31+
# For Gmail as a transport, use: "gmail://username:password@localhost"
32+
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
33+
# Delivery is disabled by default via "null://localhost"
34+
MAILER_URL=null://localhost
35+
###< symfony/swiftmailer-bundle ###

.env.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# define your env variables for the test env here
2+
KERNEL_CLASS='App\Kernel'
3+
APP_SECRET='s$cretf0rt3st'
4+
SYMFONY_DEPRECATIONS_HELPER=999999

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
###> symfony/framework-bundle ###
3+
/.env.local
4+
/.env.local.php
5+
/.env.*.local
6+
/public/bundles/
7+
/var/
8+
/vendor/
9+
###< symfony/framework-bundle ###
10+
11+
###> symfony/phpunit-bridge ###
12+
.phpunit
13+
/phpunit.xml
14+
###< symfony/phpunit-bridge ###
15+
16+
###> symfony/web-server-bundle ###
17+
/.web-server-pid
18+
###< symfony/web-server-bundle ###
19+
20+
###> symfony/webpack-encore-bundle ###
21+
/node_modules/
22+
/public/build/
23+
npm-debug.log
24+
yarn-error.log
25+
###< symfony/webpack-encore-bundle ###
26+
27+
###< custom ###
28+
/.idea
29+
/data/setup_progress.json
30+
###> custom ###

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2019 Universität Bern, Universitätsbibliothek
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.MD

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# BERNHIST
2+
3+
A re-programming and enhancement of BERNHIST (A historical-geographic information system for the swiss canton of Bern) to ensure further compatibility with modern technologies.
4+
5+
![Screenshot](./assets/images/screenshot-01.jpg)
6+
7+
![Screenshot](./assets/images/screenshot-02.jpg)
8+
9+
## About the original project (1994 - 2006)
10+
11+
BERNHIST was established by the department of economic, social and environmental History (Abteilung für Wirtschafts-, Sozial- und Umweltgeschichte, WSU) at the historical institute of the university of bern with the collaboration of Daniel Brändli, **Urs Dietrich**, **Peter Häberli**, Klaus Imfeld, **Serge Meyer**, Reto Müller, Stefan Ruetsch, Niklaus Schranz, **Hannes Schüle** und Erich Siffert.
12+
13+
![Screenshot](./assets/images/screenshot-03.jpg)
14+
15+
The files of the original project can be found [here](https://github.com/UB-Bern/bernhist/releases/tag/v1.0.0).
16+
17+
## What is new?
18+
19+
The re-programming was made with the PHP Framework [Symfony](<https://symfony.com>), the front-end component library [Bootstrap](<https://getbootstrap.com>) and the javascript charting library [Chartist](<https://gionkunz.github.io/chartist-js/>).
20+
To enable automated queries an [OAI](<https://github.com/OAI/OpenAPI-Specification>) compatible API was created.
21+
22+
## Prerequisites
23+
24+
* [PHP](<https://php.net/>) 7.1.3 or newer (See [here](<https://symfony.com/doc/4.2/reference/requirements.html>) for more information about the needed php extensions)
25+
* A database. The symfony framework is compatible with many database types. The project was tested with [MySQL](<https://www.mysql.com/>) server version 5.7.26
26+
* [composer]((<https://getcomposer.org/>)) and [yarn](<https://yarnpkg.com/>)
27+
* [Apache](<https://httpd.apache.org/>) or [NGINX](<https://www.nginx.com/>) webserver (See [here](<https://symfony.com/doc/4.2/setup/web_server_configuration.html>) for more information about the configuration).
28+
During development Symfony's built-in webserver can be used.
29+
30+
## Installation
31+
32+
Clone the repository:
33+
34+
```bash
35+
git clone https://github.com/UB-Bern/bernhist.git
36+
```
37+
38+
Change to the created directory and run:
39+
40+
```
41+
composer install
42+
```
43+
44+
Create a local copy of the `.env` file:
45+
46+
```
47+
cp .env .env.local
48+
```
49+
50+
Open the created `.env.local` file and set the `DATABASE_URL` to the desired value (see [here](<https://www.doctrine-project.org/projects/doctrine-dbal/en/2.9/reference/configuration.html#connecting-using-a-url>) for examples)
51+
52+
If the database does not already exist execute the following command:
53+
54+
```
55+
bin/console doctrine:database:create
56+
```
57+
58+
Create the database schema:
59+
60+
```
61+
bin/console doctrine:schema:create
62+
```
63+
64+
Extract `data.tar.gz` in the project root and import the SQL data dump:
65+
66+
```
67+
mysql -u [username] -p [database] < [path to data dir]/bernhist_data.sql
68+
```
69+
70+
Replace [username] with your database, [database] with the name of your database and [path to data dir] with the relative or absolute path to the extracted mysql dump.
71+
72+
Install the frontend dependencies with:
73+
74+
```
75+
yarn install
76+
```
77+
78+
**Development**
79+
80+
Build the assets with
81+
82+
```
83+
yarn encore dev
84+
```
85+
86+
Run the Symfony Server with
87+
88+
```
89+
bin/console server:start
90+
```
91+
92+
**Production**
93+
94+
Build the assets with
95+
96+
```
97+
yarn encore prod
98+
```
99+
100+
Open the `.env.local` file and set `APP_ENV` to `prod`.
101+
102+
Ensure that the web root configured in the webserver points to the `public` folder.
103+
104+
## Contributors
105+
106+
### Original project
107+
108+
* Prof. em. Dr. Christian Pfister
109+
* The persons named under "About the original project"
110+
* Erziehungsdirektion des Kantons Bern (1984-1986)
111+
* Schweizerischen Nationalfonds zur Förderung der Forschung (1986-1990)
112+
* SEVA Lotteriefonds (1991-1993)
113+
* Mobiliar Versicherung und Vorsorge (1992)
114+
* Stiftung zur Förderung der wissenschaftlichen Forschung an der Universität Bern (Hochschulstiftung) (1996-97)
115+
116+
### Current project
117+
118+
* [Mathias Stocker](mailto:mathias.stocker@ub.unibe.ch), [Universität Bern](https://www.unibe.ch), [Universitätsbibliothek Bern](https://ub.unibe.ch)
119+
120+
## Versioning
121+
122+
[SemVer](http://semver.org/) is used for versioning. For the versions available, see the [tags on this repository](https://github.com/UB-BERN/bernhist/tags).
123+
124+
## License
125+
126+
This project (Version 2.0.0 and newer) is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
127+

README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

assets/css/app.scss

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
@import "~bootstrap/scss/bootstrap";
2+
@import "~chartist/dist/scss/chartist";
3+
4+
html {
5+
height: 100%;
6+
}
7+
8+
body{
9+
padding-top: 4.5rem;
10+
padding-bottom: 9rem;
11+
}
12+
13+
.level-entry{
14+
margin-left: 15px;
15+
.level-toggle{
16+
width: 12px;
17+
height: 12px;
18+
opacity: 0.75;
19+
background-image: url('../images/toggle-closed.svg');
20+
float:left;
21+
margin-left: -15px;
22+
margin-right: 5px;
23+
margin-top: 5px;
24+
cursor: pointer;
25+
&:hover{
26+
opacity: 1;
27+
}
28+
&.opened{
29+
opacity: 1;
30+
background-image: url('../images/toggle-opened.svg');
31+
margin-top: 7px;
32+
}
33+
}
34+
}
35+
36+
.form-inline > label{
37+
margin: 0 10px;
38+
}
39+
40+
.year-select-group{
41+
margin: 30px 0;
42+
}
43+
44+
.chartist{
45+
min-height: 500px;
46+
}
47+
48+
h2{
49+
margin: 15px 0;
50+
}
51+
52+
.ct-label {
53+
white-space: nowrap !important;
54+
}
55+
56+
.footer {
57+
background-color: #f5f5f5;
58+
position: fixed;
59+
bottom: 0;
60+
left: 0;
61+
right: 0;
62+
.container {
63+
width: auto;
64+
padding: 0 15px;
65+
}
66+
}

assets/images/screenshot-01.jpg

21.5 KB
Loading

assets/images/screenshot-02.jpg

25.9 KB
Loading

assets/images/screenshot-03.jpg

29.8 KB
Loading

0 commit comments

Comments
 (0)