Commit e9509d04 authored by Mattias Lundmark's avatar Mattias Lundmark
Browse files

DEICH-3487 Skranke: added to monorepo

parent a32f4f60
......@@ -159,6 +159,14 @@
only:
changes: [ "Makefile", ".gitlab-ci.yml", "*.sh", "sibyl/**/*"]
build-skranke:
variables:
APPLICATION_NAME: skranke
extends:
- .build-application
only:
changes: [ "Makefile", ".gitlab-ci.yml", "*.sh", "skranke/**/*"]
build-test-ldap:
variables:
APPLICATION_NAME: test-ldap
......@@ -337,6 +345,15 @@
only:
changes: [ "Makefile", ".gitlab-ci.yml", "*.sh", "sibyl/**/*"]
deploy-skranke-test:
extends:
- .devtest
- .deploy-scp
variables:
APPLICATION_NAME: skranke
only:
changes: [ "Makefile", ".gitlab-ci.yml", "*.sh", "skranke/**/*"]
deploy-test-ldap-test:
extends:
- .devtest
......@@ -567,6 +584,15 @@
only:
changes: [ "Makefile", ".gitlab-ci.yml", "*.sh", "sibyl/**/*"]
push-skranke-latest:
extends:
- .push
when: on_success
variables:
APPLICATION_NAME: skranke
only:
changes: [ "Makefile", ".gitlab-ci.yml", "*.sh", "skranke/**/*"]
push-test-ldap-latest:
extends:
- .push
......
......@@ -211,6 +211,15 @@ services:
org.label-schema.description: "This is the backend sercvice handling search and manintenance operations for indexes."
no.deichman.label.component-category: "Backend"
skranke:
build:
context: skranke
labels:
<<: *common-labels
org.label-schema.name: "Skranke"
org.label-schema.description: "This is the employee front desk"
no.deichman.label.component-category: "Frontend"
tjenestekatalog-builder:
image: node:13-slim
working_dir: /tjenestekatalog
......
......@@ -496,6 +496,19 @@ services:
- ZONE
logging: *default-logging
skranke:
image: "digibib/skranke:${TAG:-latest}"
labels:
traefik.enable: "true"
traefik.http.routers.skranke.entrypoints: "web"
traefik.http.routers.skranke.rule: "HostRegexp(`{hostname:(skranke)\\..*}`)"
networks:
- deichman-dev
ports:
- "8080"
restart: ${RESTART_POLICY:-no}
logging: *default-logging
tjenestekatalog:
image: "digibib/tjenestekatalog:${TAG:-latest}"
labels:
......
FROM nginx
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./index.html /usr/share/nginx/html
ARG BUILD_DATE
ARG HEAD_TAG
ARG HISTORY
ARG LATEST_TAG
LABEL no.deichman.label.component-history="${HISTORY}"
ENV BUILD_DATE=${BUILD_DATE} HEAD_TAG=${HEAD_TAG} LATEST_TAG=${LATEST_TAG}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@digibib/deichman-ui@6.6.0/dist/legacy.css" />
<style>
.outer-wrap {
display: flex;
min-height: 100vh;
flex-direction: column;
position: relative;
z-index: 1;
}
.header {
background: black;
display: block;
width: 100%;
color: white;
text-align: center;
padding: 12px 20px;
}
.header__logo {
max-width: 60px;
position: absolute;
left: 20px;
top: 20px;
}
.header__heading {
text-transform: uppercase;
}
.header__emoji {
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.main {
padding: 24px 20px;
width: 100%;
flex: 1;
}
.link {
background: #fbcd83;
border-radius: 5px;
font-size: 24px;
margin-bottom: 24px;
min-height: 100px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
text-decoration: none;
padding: 16px;
width: 100%;
line-height: 1.2;
}
.link:hover {
text-decoration: none;
background: #f3c77f;
}
.link--secondary {
background: #f9f9f9;
border: 1px solid #606060;
font-size: 18px;
min-height: 64px;
}
.link--secondary:hover {
background: #f1f1f1;
}
.footer {
display: block;
padding: 20px;
width: 100%;
}
/* Effects */
.effect-earthquake {
animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) 10 both;
}
.effect-mirror {
animation: mirror 1s ease-in-out forwards;
animation-delay: 2s;
}
.effect-fade {
animation: fade 10s linear forwards;
animation-delay: 4s;
}
@keyframes shake {
10%,
90% {
transform: translate3d(-10px, -5px, 0);
}
20%,
80% {
transform: translate3d(20px, 10px, 0);
}
30%,
50%,
70% {
transform: translate3d(-40px, -20px, 0);
}
40%,
60% {
transform: translate3d(40px, 20px, 0);
}
}
@keyframes fade {
0% {
opacity: 1;
}
30% {
opacity: 0;
}
70% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes mirror {
0% {
transform: scaleX(1);
}
100% {
transform: scaleX(-1);
}
}
/* Xmas */
#xmas-canvas {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 100vh;
width: 100vw;
pointer-events: none;
background: linear-gradient(0deg, rgba(108, 188, 230, 1) 0%, rgba(0, 45, 78, 1) 100%, rgba(252, 176, 69, 1) 100%);
z-index: 0;
opacity: 1;
transition: opacity 10s;
}
.is-hidden {
opacity: 0 !important;
}
</style>
<title>Skranken</title>
</head>
<body>
<!-- Uncomment to enable xmas snow! -->
<!-- <canvas id="xmas-canvas" class="is-hidden"></canvas> -->
<div class="outer-wrap">
<header class="header flex flex--align-center flex--justify-center">
<a target="_blank" href="https://deichman.no/">
<img class="header__logo" src="https://cdn.jsdelivr.net/npm/@digibib/deichman-ui/dist/logo-small-inverted.svg" />
</a>
<h1 class="header__heading">Skranken <span class="header__emoji">📚</span></h1>
</header>
<main class="main">
<div class="grid">
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://intra.deichman.no/" class="link ">
<span class="link__content">Koha</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://deichman.no/s%C3%B8k" class="link">
<span class="link__content">Søket</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href=" https://intra.deichman.no/cgi-bin/koha/reports/guided_reports.pl?reports=101&phase=Run%20this%20report" class="link">
<span class="link__content">Søk opp låner mobil</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://intra.deichman.no/cgi-bin/koha/reports/guided_reports.pl?reports=14&phase=Run%20this%20report" class="link">
<span class="link__content">Hentenummer</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://intra.deichman.no/cgi-bin/koha/circ/view_holdsqueue.pl" class="link">
<span class="link__content">Plukklista</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://intra.deichman.no/cgi-bin/koha/reports/guided_reports.pl?reports=587&phase=Run%20this%20report" class="link">
<span class="link__content">Avbestilte reserveringer</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href=" https://docs.google.com/document/d/1UceyjLHnSnH0Zl_fTC-ul8-_fz7IBjyvyxZJb_8dqbY/edit#" class="link">
<span class="link__content">Rutiner</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://it.deichman.no/projects" class="link">
<span class="link__content">Melde feil</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://sites.google.com/site/nyttbib/arbeidsprosesser-og-rutiner/paa-bakrommet?authuser=0" class="link">
<span class="link__content">På bakrommet</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://deichman.no/ansatt" class="link">
<span class="link__content">Ansatt-pålogging deichman.no</span>
</a>
</div>
</div>
</main>
<footer class="footer">
<div class="grid">
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://admp.princh.com/login " class="link link--secondary">
<span class="link__content">Princh</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href=" http://libki10:9000/" class="link link--secondary">
<span class="link__content">Publikumsmaskiner</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://deb.intranett.oslo.kommune.no/" class="link link--secondary">
<span class="link__content">Intranett</span>
</a>
</div>
<div class="grid__item medium--one-quarter small--one-half">
<a target="_blank" href="https://oslo.workplace.com/" class="link link--secondary">
<span class="link__content">Workplace</span>
</a>
</div>
</div>
</footer>
</div>
</body>
<script>
// Easter eggs
var counter = 0;
var emojiList = ["😀", "🎅", "😃", "😄", "😁", "😆", "😅", "😂", "🤣", "️😊", "😇", "🙂", "🙃", "😉", "😌", "😍", "🥰", "😘", "😗", "😙", "😚", "😋", "😛", "😝", "😜", "🤪", "🤨", "🧐", "🤓", "😎", "🤩", "🥳", "😏", "😒", "🥺", "🤯", "😳", "🥵", "🥶", "😱", "😨", "😓", "🤗", "🤔", "🤭", "🤫", "🤥", "😶", "😐", "😑", "😬", "🙄", "😯", "😦", "😧", "😮", "😲", "😴", "🤤", "😵"];
var emoji = document.querySelector(".header__emoji");
var body = document.querySelector("body");
emoji.addEventListener("click", function() {
var randomEmoji = Math.floor(Math.random() * emojiList.length);
emoji.innerHTML = emojiList[randomEmoji];
counter++;
if (counter === 10) {
alert("Kanskje på tide å jobbe litt? 🤔");
}
if (counter === 30) {
body.className = "effect-earthquake";
setTimeout(function() {
alert("Skjerpings! Ellers blir det trekk i lønna... 👮");
}, 6000);
}
if (counter === 100) {
body.className = "effect-mirror";
setTimeout(function() {
alert("100 klikk, imponerende! 🥇 Hva tror du skjer ved 1000 klikk?");
}, 6000);
}
if (counter === 1000) {
alert("💀💀💀 GAME OVER 💀💀💀");
setTimeout(function() {
location.reload();
}, 10000);
}
});
// Xmas edition
// xmas(); // Uncomment to enable snow
document.querySelector("#xmas-canvas").className = "";
function xmas() {
(function() {
var requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
window.requestAnimationFrame = requestAnimationFrame;
})();
var flakes = [],
canvas = document.getElementById("xmas-canvas"),
ctx = canvas.getContext("2d"),
flakeCount = 400,
mX = -100,
mY = -100;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
function snow() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (var i = 0; i < flakeCount; i++) {
var flake = flakes[i],
x = mX,
y = mY,
minDist = 150,
x2 = flake.x,
y2 = flake.y;
var dist = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y)),
dx = x2 - x,
dy = y2 - y;
if (dist < minDist) {
var force = minDist / (dist * dist),
xcomp = (x - x2) / dist,
ycomp = (y - y2) / dist,
deltaV = force / 2;
flake.velX -= deltaV * xcomp;
flake.velY -= deltaV * ycomp;
} else {
flake.velX *= 0.98;
if (flake.velY <= flake.speed) {
flake.velY = flake.speed;
}
flake.velX += Math.cos((flake.step += 0.05)) * flake.stepSize;
}
ctx.fillStyle = "rgba(255,255,255," + flake.opacity + ")";
flake.y += flake.velY;
flake.x += flake.velX;
if (flake.y >= canvas.height || flake.y <= 0) {
reset(flake);
}
if (flake.x >= canvas.width || flake.x <= 0) {
reset(flake);
}
ctx.beginPath();
ctx.arc(flake.x, flake.y, flake.size, 0, Math.PI * 2);
ctx.fill();
}
requestAnimationFrame(snow);
}
function reset(flake) {
flake.x = Math.floor(Math.random() * canvas.width);
flake.y = 0;
flake.size = Math.random() * 3 + 2;
flake.speed = Math.random() * 1 + 0.5;
flake.velY = flake.speed;
flake.velX = 0;
flake.opacity = Math.random() * 0.5 + 0.3;
}
function init() {
for (var i = 0; i < flakeCount; i++) {
var x = Math.floor(Math.random() * canvas.width),
y = Math.floor(Math.random() * canvas.height),
size = Math.random() * 3 + 2,
speed = Math.random() * 1 + 0.5,
opacity = Math.random() * 0.5 + 0.3;
flakes.push({
speed: speed,
velY: speed,
velX: 0,
x: x,
y: y,
size: size,
stepSize: Math.random() / 30,
step: 0,
opacity: opacity
});
}
snow();
}
window.addEventListener("mousemove", function(e) {
(mX = e.clientX), (mY = e.clientY);
});
window.addEventListener("resize", function() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
init();
}
</script>
</html>
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
server {
listen 8080;
root /usr/share/nginx/html;
# Avoid nginx dying if this application starts before one of the upstream ones
resolver 127.0.0.11; # Docker DNS
location / {
try_files $uri /index.html;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment