Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some meemoo colors #1

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
.DS_Store
10 changes: 5 additions & 5 deletions .openshift/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ pipeline {
}
}
}
stage('Test code') {
steps {
sh 'make -f ./.openshift/Makefile test'
}
}
// stage('Test code') {
// steps {
// sh 'make -f ./.openshift/Makefile test'
// }
// }
stage('Build code') {
when {
not {
Expand Down
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.12-alpine
ARG branch=main
# The latest alpine images don't have some tools like (`git` and `bash`).
# Adding bash and openssh to the image
RUN apk update && apk upgrade && \
Expand All @@ -22,16 +23,14 @@ RUN alembic upgrade head
# Add SKOS data
RUN mkdir /data
COPY data.csv /data
RUN <<EOF
branch=main
while IFS="," read -r skos_file namespace
do
filename="${skos_file##*/}"
wget https://raw.githubusercontent.com/viaacode/datamodels/$branch/$skos_file
import_file $filename $namespace/%s --to sqlite:///meemoo_atramhasis.sqlite --conceptscheme-uri $namespace
rm $filename
done < /data/data.csv
EOF
RUN bash load.sh

EXPOSE 6543

RUN addgroup --system appgroup && adduser --system appuser --ingroup appgroup

RUN chown -R appuser:appgroup /app/atramhasis

USER appuser

CMD ["pserve", "development.ini"]
8 changes: 5 additions & 3 deletions data.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
objects/carriers.skos.ttl,https://data.hetarchief.be/id/carrier-type
objects/formats.skos.ttl,https://www.nationalarchives.gov.uk/pronom/fmt/
organizations/organization-types.skos.ttl,https://data.hetarchief.be/id/organization-type
organizations/organization-logos.skos.ttl,https://data.hetarchief.be/id/logo-type
organizations/organization-roles.skos.ttl,https://data.hetarchief.be/id/organization-role
events/events.skos.ttl,https://data.hetarchief.be/id/event-type
description/color-type.skos.ttl,https://data.hetarchief.be/id/color-type
description/edition-type.skos.ttl,https://data.hetarchief.be/id/edition-type
description/description-roles.skos.ttl,https://data.hetarchief.be/id/role
description/iec60094-type.skos.ttl,https://data.hetarchief.be/id/iec60094-type
description/rotational-speed.skos.ttl,https://data.hetarchief.be/id/rotational-speed
description/licenses.skos.ttl,https://data.hetarchief.be/id/license
education/thema.skos.ttl,https://data.hetarchief.be/id/onderwijs/thema
organizations/organization-roles.skos.ttl,https://data.hetarchief.be/id/organization-role
organizations/organization-types.skos.ttl,https://data.hetarchief.be/id/organization-type
description/production-method.skos.ttl,https://data.hetarchief.be/id/production-method
education/thema.skos.ttl,https://data.hetarchief.be/id/onderwijs/thema
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
services:
atramhasis-meemoo:
build: .
build:
context: .
args:
- branch=main
image: atramhasis-meemoo
ports:
- "6543:6543"
7 changes: 7 additions & 0 deletions load.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
while IFS="," read -r skos_file namespace
do
filename="${skos_file##*/}"
wget https://raw.githubusercontent.com/viaacode/datamodels/$branch/$skos_file
import_file $filename $namespace/%s --to sqlite:///meemoo_atramhasis.sqlite --conceptscheme-uri $namespace
rm $filename
done < /data/data.csv
2 changes: 2 additions & 0 deletions meemoo_atramhasis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def main(global_config, **settings):
# Set up atramhasis db
config.include("atramhasis:data.db")

config.add_static_view(name="fonts",path='meemoo_atramhasis:static/fonts')

config.override_asset(
to_override='atramhasis:templates/welcome.jinja2',
override_with='meemoo_atramhasis:templates/welcome.jinja2'
Expand Down
Binary file added meemoo_atramhasis/static/fonts/3AFA78_0_0.eot
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_0_0.woff
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_0_0.woff2
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_1_0.eot
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_1_0.woff
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_1_0.woff2
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_2_0.eot
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_2_0.woff
Binary file not shown.
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_3_0.eot
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_3_0.woff
Binary file not shown.
Binary file added meemoo_atramhasis/static/fonts/3AFA78_3_0.woff2
Binary file not shown.
130 changes: 130 additions & 0 deletions meemoo_atramhasis/static/scss/_atramhasis-article.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
@charset "UTF-8";

/*Panel content*/

h1.panel-header {
font-size: 2em;
color: $orange;
margin: 20px 0;
}

/*ID*/
h2.id-header {
font-size: 0.9em;
color: #999;
margin: 12px 0 20px 0;
padding: 0;
}

/* title result*/
.title-result {
padding: 20px 0 0 0;
font-size: 1.2em;
color: $steel;
}
.title-result strong {
font-size: 1em;
}
.title-result span {
color: $orange;
font-size: 1em;
}

// list
dl.infolist {
font-size: 0.8em;
display: block;
margin: 0 0 20px 0;
}
.infolist dt {
padding: 10px 0 0 0;
color: $steel;
font-weight: normal;
}
.infolist dd {
margin: -25px 0 0 105px;
}

// text
.scopeNote {
font-size: 0.9em;
border-top: 1px solid $aluminum;
}
ul.scopeNote {
margin: 0;
padding: 0;
}
.scopeNote li {
list-style-type: none;
list-style-position: outside !important;
margin: 0;
padding: 0 0 30px 0;
}
.scopeNote li:first-child {
margin: 20px 0 0 0;
}
/*result grid*/
.result-grid {
background: $white;
display: table;
word-wrap: break-word;
}
.result-grid a {
display: block;
background: $white;
margin: 0;
line-height: 0.9em;
border: 1px solid $aluminum;
text-align: center;
height: 100px;
overflow: hidden;
padding: 24px 0 0 0;
}
.result-grid a:hover {
display: block;
height: 100px;
transition: all 0.5s ease;
background: $blue;
color: $white;
}
.result-grid a h5 {
font-size: 0.8em;
color: $orange;
padding: 6px 0 5px 0;
margin: 0;
}
.result-grid a:hover h5 {
font-size: 0.8em;
color: $white;
padding: 6px 0 5px 0;
margin: 0;
}
.result-grid span {
font-size: 0.6em;
color: #999;
line-height: 8px;
}
.result-grid small {
font-size: 0.5em;
}

/*download top*/
ul.downloadtop {
margin: 30px 0 0 0;
padding: 0;
}
.downloadtop li {
list-style-type: none;
font-size: 0.6em;
padding: 0 0 5px 15px;
margin: 0 0 20px 2px;
float: left;
}
.downloadtop li a {
border: 1px solid #d6d6d6;
background: $white;
padding: 8px 15px;
}
.downloadtop li:first-child {
padding: 0;
}
130 changes: 130 additions & 0 deletions meemoo_atramhasis/static/scss/_atramhasis-custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
@charset "UTF-8";

//custom
small {font-size:0.6em;color:$steel}
a {color:$blue;}
a:hover {color:$orange !important;}

// top menu
.divider {border:1px solid $aluminum;}
.dropdown {box-shadow:0px 2px 2px #ccc;border:1px solid $aluminum;}
input.search-input-top {border:0;font-size:0.8em}

// removes blue border when selected
textarea:focus, input:focus, select:focus{ outline: none;}
*:focus {outline: none;}


// header search
input.search-input-top {background:#fff;border:1px solid #fff !important;box-shadow:none}
input.search-input-top:hover {background:#fff;border:1px solid #fff !important}


.toggle-topbar {background:$white;font-weight:normal}
.menu-icon {color:$steel !important; }
.menu-icon a {color:$steel !important; }
.menu-icon a:hover {color:$steel !important; }
.has-form {background-color:$white !important}

.top-bar-section li {background:$white !important}
.top-bar-section li select {border:0;padding:0 30px 0 10px;height:100%;margin-top: -16px;}
.top-bar-section button[type=submit] {background:transparent; padding: 0; top:0;}


// submenu
.nostyleList {list-style:none;margin-left: 0;padding-left: 0 }
h1 {font-size:0.9em;text-transform:none;letter-spacing:4px;color:black;margin:30px 0;}
h2 {font-size:0.8em;text-transform:none;letter-spacing:4px;color:$steel;margin:30px 0;}
h3 {font-size:0.7em;text-transform:none;letter-spacing:4px;color:$steel;margin:30px 0;}
h4 {font-size:0.6em;text-transform:none;letter-spacing:4px;color:$steel;margin:30px 20px;}


ul.no_bullet {
list-style-type: none;
padding: 0 ;
margin: 0 ;
}

li.cube {
background: url(listitem.png) no-repeat 0 6px;padding:0 0 15px 15px;
}

/*padding fix result page*/
.large-3-pad {padding:0;}

.large-3-pad.columns:last-child {
float: left;
}

/*download top*/
ul.downloadtop {margin:30px 0 0 0;padding:0;}
.downloadtop li {list-style-type:none;font-size:0.6em;padding:0 0 5px 15px;margin:0 0 20px 2px;float:$default-float;}
.downloadtop li a {border:1px solid #d6d6d6;background:$white;padding:8px 15px;}
.downloadtop li:first-child {padding:0;}


/*tab nav*/
.tabnav li {list-style-type:none;float:$default-float;text-transform: none;margin-top: 20px;}
.tabnav li a {border:1px solid #d6d6d6;background:$white;color:$blue !important}
.tabnav li a:hover {color:$orange !important;background-color:$white !important}
.tabnav li:first-child {padding:0;}
.tabnav .tab-title > a {background-color:#efefef !important;}
.tabnav .tab-title.active > a {background-color:$white !important; color: $black !important;}


/* home form */
.home-search-placer {padding:0 0 0 30px;}


/* various small styles */
ul.no_bullet {
list-style-type: none;
padding: 0 ;
margin: 0 ;
}

li.cube {
background: url('../img/listitem.png') no-repeat 0 6px;
padding:0 0 15px 15px;
font-size:0.8rem;
}

h3.relations-title {
margin-bottom: 0px;
}

h4.relations-subtitle {
margin: 20px 20px;
}

.pageOverlay { text-align: center;}
.loadingMessage {font-size: 1em; margin: 30px; color: #999; }

.editIcon {
float: right;
font-size: 20px;
margin: 10px 5px;
}

.word-wrap-element {
word-wrap: break-word;
word-break: break-all;
}

.treeHelpMessage {
font-size: 13px;
margin-left: 5px;
}

.highlightError {
border: 1px solid red !important;
margin-bottom: 5px;
}

.highlightErrorText {
color: red;
font-size: 13px;
padding-left: 5px;
margin-bottom: 5px;
display: inline-block;
}
Loading