Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • vilem.ded/howto-cards
  • yjarosz/labCards
  • sarah.diehl/howto-cards
  • jacek.lebioda/howto-cards
  • pinar.alper/howto-cards
  • maharshi.vyas/howto-cards
  • manuel.maidorn/howto-cards
  • roland.krause/howto-cards
  • miriam.fougeras/howto-cards
  • soraya.hezzaz/howto-cards
  • fasavanh.sanichanh/howto-cards
  • marie.fossepre/howto-cards
  • jennifer.behm/howto-cards
  • annegrat.daujeumont/howto-cards
  • jon.gales/howto-cards-jpg
  • sandy.thill/howto-cards
  • jenny.tran/howto-cards
17 results
Show changes
Commits on Source (1528)
Showing with 534 additions and 467 deletions
<html>
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
function UrlExists(url, cb){
jQuery.ajax({
url: url,
dataType: 'text',
type: 'GET',
cache: false,
complete: function(xhr){
if(typeof cb === 'function')
cb.apply(this, [xhr.status]);
}
});
}
function GetShortcutDestination() {
var s = window.location.href;
var pathArray = s.split('?');
// Cut the query if it exists
if (pathArray.length > 1) {
return pathArray[1];
} else {
return '';
}
}
function RedirectTo(newLocation) {
document.location.replace(newLocation);
}
// Pick the shortcut link destination from URL, like: `category:subcategory:card-name`
var sub = GetShortcutDestination();
// Define URLs
var internalPortalURL = 'https://r3-core.pages.uni.lu/howto-cards-internal';
var externalPortalURL = 'https://r3.pages.uni.lu/howto-cards';
// First, check whether internal pages are accessible...
var internalIndexURL = internalPortalURL + '/index.html';
UrlExists(internalIndexURL, function(status){
if(status === 200){
// If the internal pages are accessible, try to redirect into correct page
if (sub.length > 0) {
var internalCardURL = internalPortalURL + '/stable/internal/cards/' + sub;
UrlExists(internalCardURL, function(status){
if (status == 200) { // The sub-card is internal, and is accessible
RedirectTo(internalCardURL);
} else {
UrlExists(internalPortalURL + '/stable/external/cards/' + sub, function(status){
if (status == 200) { // if sub-card is internal in the external directory and exists
RedirectTo(internalPortalURL + '/stable/external/cards/' + sub);
} else {
RedirectTo(internalPortalURL + '/stable/404.html');
}
});
}
});
} else {
// The user did not request specific card, redirect him just to the stable index
var internalPortalIndexURL = internalPortalURL + '/stable';
var internalPortal404URL = internalPortalURL + '/stable/404.html';
UrlExists(internalPortalIndexURL, function(status){
if (status == 200) { // if page is accessible
RedirectTo(internalPortalIndexURL);
} else {
RedirectTo(internalPortal404URL);
}
});
}
} else {
// The internal pages are not accessible, therefore the user is redirected into correct external page
if (sub.length > 0) {
sub = 'external/cards/' + sub;
}
var externalPortalCardURL = externalPortalURL + '/stable/' + sub;
var externalPortal404URL = externalPortalURL + '/stable/404.html';
UrlExists(externalPortalURL + '/stable/' + sub, function(status){
if (status == 200) { // if sub-card is internal and exists
RedirectTo(externalPortalCardURL);
} else {
RedirectTo(externalPortal404URL);
}
});
}
});
</script>
</head>
<body>
<p>
Please follow to <a href="https://r3.pages.uni.lu/howto-cards/stable">https://r3.pages.uni.lu/howto-cards/stable</a>!
</p>
</body>
</html>
url: "https://r3.pages.uni.lu"
#!/bin/sh
# change this with environment
DEFAULT_NOT_SOURCE_REGEX="/\\/assets\\//"
NOT_SOURCE_REGEX="${NOT_SOURCE_REGEX:-$DEFAULT_NOT_SOURCE_REGEX}"
TIMESTAMP_SUFFIX="${SUFFIX:-.timestamp}"
LOGFILE="${LOGFILE:-/dev/null}"
[ -z "$1" ] && echo "$0: no inputs specified?" >/dev/stderr
while [ -n "$1" ]
do
echo "sourcing directory '$1' ..." >> "$LOGFILE"
find "$1" -type f -name '*.md' | grep -v "$NOT_SOURCE_REGEX" | while read file ; do
fn=`basename "$file"`
dir=`dirname "$file"`
tsfn="$fn.timestamp"
(
echo "making timestamp in '$dir' for file '$fn' ..." >> "$LOGFILE"
cd "$dir"
if [ -f "$tsfn" ]
then echo "... but it already exists; skipping!" >> "$LOGFILE"
else
TIMESTAMP=`git log -n 1 --pretty=format:%cs -- "$fn"`
mv "$fn" "$fn.temporary"
head -n1 "$fn.temporary" > "$fn"
echo "timestamp: \"$TIMESTAMP\"" >> "$fn"
tail -n+2 "$fn.temporary" >> "$fn"
rm -f "$fn.temporary"
fi
)
done
shift
done
#!/bin/bash
DIRECTORY=build
# Install lunr to build the index
npm install lunr@2.3.8
npm install lunr@$LUNR_VERSION
# Go to the directory...
# Go to the directory containing the built website...
cd $DIRECTORY
printf "Found the following build targets inside: \n$(ls -d */)\n\n"
# ...and loop through all the build targets
for branch in $(ls -d */); do
echo "Entering: $branch";
cd "$branch";
echo "Generating the index..."
cat documents.js | node $CI_PROJECT_DIR/build_index.js > index.js
rm documents.js build_index.js
echo "Generating the index..."
echo "...should be completed. First 50 characters of the index: "
cat index.js | head -c50
echo ""
# Pipe documents.js file (which should be generated by Jekyll after building the website) through build script
cat documents.js | node build_index.js > index.js
cd ..
done
# Show the results (should not be empty)
echo "...should be completed. First 50 characters of the index: "
cat index.js | head -c50
echo ""
rm $CI_PROJECT_DIR/build_index.js
rm documents.js build_index.js
#!/bin/bash
# Install lunr to build the index
npm install lunr@$LUNR_VERSION
# Go to the directory containing the built website...
cd $DIRECTORY
echo "Generating the index..."
# Pipe documents.js file (which should be generated by Jekyll after building the website) through build script
cat documents.js | node build_index.js > index.js
# Show the results (should not be empty)
echo "...should be completed. First 50 characters of the index: "
cat index.js | head -c50
echo ""
rm documents.js build_index.js
mkdir -p build
artefact="latest"
# loop through all the branches
for branch in $(git for-each-ref --format='%(refname:strip=3)' refs/remotes); do
echo $branch;
if [[ $branch == "master" ]]; then
artefact="stable";
elif [[ $branch == "develop" ]]; then
artefact="latest";
else
artefact="unstable";
fi
echo $artefact;
git checkout -f $branch
git reset --hard $branch
git pull
# Generate the config dynamically
echo 'url: "https://r3.pages.uni.lu"' > _config_url.yml
# build the website
bundle install
bundle exec jekyll build --config "_config.yml,_config_url.yml" --baseurl="howto-cards/$artefact" -d "build/$artefact"
if [[ $branch == "master" ]]; then
# set the 404
cp howto-cards/$artefact/404.html build/404.html
fi
done
# checkout the current branch
echo $CI_COMMIT_REF_NAME
git checkout -f $CI_COMMIT_REF_NAME
git reset --hard origin/$CI_COMMIT_REF_NAME
# set the auto redirection
cp .ci/.autoRedirect build/index.html
from generator import core, save
import os, re
from os import path
# walk through the folders with all the cards
ind, wl = core.core(["external"])
def line_prepender(filename, line):
with open(filename, 'r+') as f:
content = f.read()
f.seek(0, 0)
f.write(line.rstrip('\r\n') + '\n' + content)
def build_link(title, href):
return f'\t\t\t<li><a href="{href}">{title}</a></li>\n'
def build_section_start(title):
return f'\n\t<div class="index-box">\n\t\t<h3>{title}</h3>\n\t\t<ul>\n'
def build_section_end():
return "\t\t</ul>\n\t</div>"
def remove_header(localroot, root, filename, n=5):
nfirstlines = []
#cwd = os.getcwd()
os.chdir(localroot)
#print("Local root folder:" + os.getcwd())
os.chdir(root)
#print("Local folder:" + os.getcwd())
# count the number of lines
count = 0
headerCheck = False
with open(filename, 'r') as f:
for line in f:
count += 1
# check if the header is actually a header
if (count == 0 or count == n) and line[0:3] == "---":
headerCheck = True
# remove the header
if count > n and headerCheck:
with open(filename) as f, open("tmp"+filename, "w") as out:
for _ in range(n):
nfirstlines.append(next(f))
for line in f:
out.write(line)
os.remove(filename)
os.rename("tmp"+filename, filename)
print(" - Old header removed.")
# change back to the local root
os.chdir(localroot)
#print("exit folder:" + os.getcwd())
# loop through the entire internal tree
localroot = os.getcwd()
# generate the index properly speaking
cardDirs = ["internal", "external"]
sections = []
# determine first the directories
for direct in cardDirs:
if path.isdir(direct):
dirs = os.listdir(direct)
for d in dirs:
if d[0] != ".":
sections.append(d)
sections = list(set(sections))
sections.sort()
# Index contains the generated content, init it with an empty container
index = '\n<div class="index-box-container">\n'
localIndexArr = [[]] * len(sections)
for folder in cardDirs:
# check if folder exists
if path.isdir(folder):
dirs = os.listdir(folder)
dirs = sorted(dirs)
for d in dirs:
if d[0] != ".":
# set the header of the section
#index += "\n### " + d.replace("-", " ").capitalize() + "\n"
# get the index of the section
indexS = sections.index(d)
#print(indexS)
if len(localIndexArr[indexS]) == 0:
localIndexArr[indexS] = ["\n"]
# walk through the folders with all the cards
for root, dirs, files in os.walk(folder+"/"+d):
for file in files:
if file.endswith(".md"):
fileName = os.path.join(root, file)
# ignore subsections (.md files that start with _)
if file[0] != "_":
print(" > Generating header for: " + fileName)
# remove the previous header
remove_header(localroot, root, file, 8)
# generate a permalink
permalink = "/" + root + "/"
# generate the shortcut
shortcut = re.sub(folder, '', root)
# remove the first /
shortcut = shortcut[1:]
# replace the / with a :
shortcut = re.sub('/', ':', shortcut)
# define the header for each card
header = "---\n"
header += "layout: page\n"
header += "permalink: " + permalink + "\n"
header += "shortcut: " + shortcut + "\n"
header += "redirect_from:\n"
header += " - /cards/" + shortcut + "\n"
header += " - /" + folder + "/cards/" + shortcut + "\n"
header += "---"
# add the header properly speaking
line_prepender(fileName, header)
# open file and get the title after the header
count = 0
title = ""
bp = 9
with open(fileName, 'r') as f:
for line in f:
count += 1
if count == bp:
if len(line) > 2:
title = line
break
else:
bp += 1
# remove first and last chars
title = title.rstrip("\n\r")
title = title[2:]
localIndexArr[indexS].append(build_link(title, root))
# output
print(" + New header added.")
print("-----------------------")
# join all subcategories to the index
localIndexArr[indexS].sort()
print(localIndexArr)
# determine the index
k = 0
for s in sections:
index += build_section_start(s.replace("-", " ").capitalize())
index += ''.join(localIndexArr[k])
index += build_section_end()
k += 1
# Close the container
index += "\n</div>"
# output the index
#print(index)
# Read in the file
indexFile = "index.md"
filedata = ""
with open(indexFile, 'r') as file :
for line in file:
filedata += line
# stop reading once the index place holder has been reached
if re.search("<!-- index -->", line):
filedata += "[[ index ]]"
break
# Replace the target string
filedata = filedata.replace('[[ index ]]', index)
# Write the file out again
with open(indexFile, 'w') as file:
file.write(filedata)
print("\n > New index generated and saved in " + indexFile)
save.save_index(ind, "cards.md")
save.save_whitelist(wl, ".ci/whitelist.txt")
Subproject commit 53a922a13c4e8916c97599b5242493a47ea0a2e2
/privacy-policy
/search
https://www.dev47apps.com/
https://www.dev47apps.com/droidcam/connect/
https://cerbere.uni.lu/
http://iptel.uni.lux/
javascript:%20showBanner();
javascript:showBanner();
media/7zip-encryption-windows.mp4?width=400
media/Get_MD5_checksum_windows.mp4
https://intranet.uni.lux
https://intranet.uni.lux/the_university/lcsb/lscb_internal/
https://uniluxembourg.sharepoint.com/sites/lcsb/lscb_internal/LCSB%20Handbook/Appendix%20files/Godparent%20Checklist%20-%20newcomers.pdf
https://uniluxembourg.sharepoint.com/sites/lcsb/lscb_internal/LCSB%20Handbook/Appendix%20files/Newcomer%20Checklist%20Before%20Arriving%20in%20Luxembourg.pdf
https://uniluxembourg.sharepoint.com/sites/lcsb/lscb_internal/LCSB%20Handbook/Appendix%20files/Newcomer%20Checklist%20upon%20Arrival%20in%20Luxembourg.pdf
https://uniluxembourg.sharepoint.com/sites/lcsb/lscb_internal/SitePages/default.aspx
https://uniluxembourg.sharepoint.com/sites/sc/Lists/Policies%20%20Procedures/DispForm.aspx?ID=9
https://uniluxembourg.sharepoint.com/sites/siu/Documents%20partages/Dropit%20client%20-%20configuration%20guide.pdf#search=dropit
https://uniluxembourg.sharepoint.com/sites/siu/SitePages/siu-guides.aspx
\ No newline at end of file
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
......@@ -33,3 +33,15 @@ package.json
./theme/package.json
__pycache__/
contribute.egg-info/
policies
.tmp
env/.jekyll-cache/
env/Gemfile.lock
env/_site/
handbook/
internal/handbook
internal/handbook-additional
internal/handbook-annexes
!internal/covid-19/exit-strategy/*.pdf
checkFolder
.cache/
# In case something goes horribly wrong, you can fall back to `image: ruby:2.5`
image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb:1.4
stages:
- prepare
- save
- build
- generate_index
- check
- generate
- deploy
- trigger
# !!!!!!! README !!!!!
# We are in the transition period - and the website is deployed two times - to gitlab pages and to a separate VM
# In order to migrate to a new deployment:
# 1) remove "Old deployment" section - build_pages, generate the search index and pages tasks
# 2) rename "new pages" to "pages" in the new deployment section, and "new_public" to "public"; you might also rename directories (skip "new" part)
# 3) remove ".ci/deploy.sh", ".ci/build_indices.sh"
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
GIT_SUBMODULE_STRATEGY: recursive
# Old deployment =================================================================
# prepare
# ------------------------------------------------------------------------------------
build_pages:
stage: build
prepare:index:
image: python
stage: prepare
rules:
- if: $CI_COMMIT_REF_NAME
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_MESSAGE !~ /tmpBranch/ && $CI_COMMIT_MESSAGE !~ /Update index/'
before_script:
- apt-get -qq update
- apt-get install -y -qq git-lfs
- gem install bundler:2.0.2 && bundle install
- pip install -r .ci/generator/requirements.txt
script:
- bash .ci/deploy.sh
variables:
JEKYLL_ENV: production
- python .ci/generateIndex.py
- mkdir .tmp
- cp cards.md .tmp/.
- cp .ci/whitelist.txt .tmp/.
artifacts:
expire_in: 1 day
paths:
- build
- .tmp
# save
# ------------------------------------------------------------------------------------
generate the search index:
stage: generate_index
image: node:13.8.0-slim
save:commitIndex:
image:
name: alpine/git:latest
entrypoint: [""]
stage: save
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH == "develop"
script:
- bash .ci/build_indices.sh
- mv build processed_build
artifacts:
expire_in: 1 day
paths:
- processed_build
pages:
image: alpine:3.11.3
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH == "develop"
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_MESSAGE !~ /tmpBranch/ && $CI_COMMIT_MESSAGE !~ /Update index/ && $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == "R3/howto-cards"'
before_script:
- apk add git-lfs
- git fetch --all
- url_host=`git remote get-url origin | sed -e "s/https:\/\/gitlab-ci-token:.*@//g"`
- git remote set-url origin "https://$GIT_ACCESS_USER:$GIT_ACCESS_TOKEN@${url_host}"
- git config user.name $GIT_ACCESS_USER
- git config user.email $GIT_ACCESS_EMAIL
script:
- mv processed_build public
artifacts:
expire_in: 1 week
paths:
- public
# New deployment ==================================================================
build pages for VM deployment:
# copy the index and remove the temporary directory
- cp .tmp/cards.md .
- rm -rf .tmp
# commit
- git branch -D tmpBranch || true
- git checkout -b tmpBranch || true
- git add --all || true
- git commit -m "Update index" || true
- git checkout $CI_COMMIT_REF_NAME || true
- git pull origin $CI_COMMIT_REF_NAME
- git merge tmpBranch --ff || true
- git push origin $CI_COMMIT_REF_NAME || true
- git branch -D tmpBranch || true
# build
# ------------------------------------------------------------------------------------
build:pages:
image: $CI_REGISTRY/r3/docker/jekyll-lcsb
stage: build
variables:
JEKYLL_ENV: production
BUNDLER_VERSION: 2.0.2
BUNDLER_VERSION: 2.1.4
artifacts:
expire_in: 1 day
paths:
- new_build
- build
- .tmp
rules:
- if: $CI_COMMIT_BRANCH
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_REF_NAME
before_script:
- apt-get -qq update
- apt-get install -y -qq git-lfs
- gem install bundler:$BUNDLER_VERSION && bundle install
script:
# copy the index
- cp .tmp/cards.md .
# Generate the configuration for forks (will use Gitlab Pages on personal namespaces)
- 'echo "url: https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN" >> .ci/_config_gitlab_pages.yml'
- 'echo "baseurl: /$CI_PROJECT_NAME" >> .ci/_config_gitlab_pages.yml'
# If there is no config for the current branch, use the one for Gitlab Pages
- 'if [ ! -f ".ci/_config_$CI_COMMIT_REF_NAME.yml" ]; then mv .ci/_config_gitlab_pages.yml .ci/_config_$CI_COMMIT_REF_NAME.yml; fi'
- |
if [ $CI_MERGE_REQUEST_ID ]; then
export CI_COMMIT_REF_NAME="develop";
else
echo "url: https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN" >> .ci/_config_gitlab_pages.yml;
echo "baseurl: /$CI_PROJECT_NAME" >> .ci/_config_gitlab_pages.yml;
# If there is no config for the current branch, use the one for Gitlab Pages
if [ ! -f ".ci/_config_$CI_COMMIT_REF_NAME.yml" ]; then
mv .ci/_config_gitlab_pages.yml .ci/_config_$CI_COMMIT_REF_NAME.yml;
fi
fi
# Display, which configuration is used
- 'echo "Configuration: " && cat ".ci/_config_$CI_COMMIT_REF_NAME.yml"'
- |
echo "Configuration: " && cat ".ci/_config_$CI_COMMIT_REF_NAME.yml"
# Run Jekyll with custom configuration
- bundle exec jekyll build -d new_build --config "_config.yml,.ci/_config_$CI_COMMIT_REF_NAME.yml"
generate the search index for VM deployment:
stage: generate_index
- LOGFILE=/dev/stdout .ci/add-timestamp-to-howtocard.sh external
- bundle exec jekyll build -d build --config "_config.yml,.ci/_config_$CI_COMMIT_REF_NAME.yml"
# check
# ------------------------------------------------------------------------------------
check:links:
stage: check
image: $CI_REGISTRY/r3/apps/tailorbird/linkchecker
rules:
- if: $CI_COMMIT_REF_NAME
- if: $CI_MERGE_REQUEST_ID
allow_failure: true
before_script:
- cp .tmp/whitelist.txt build/.
- cp -r build /check
- cd /
script:
- python link_check.py
# generate
# ------------------------------------------------------------------------------------
generate:searchIndex:
stage: generate
image: node:13.8.0-slim
variables:
LUNR_VERSION: 2.3.8
DIRECTORY: new_build
DIRECTORY: build
script:
- bash .ci/build_indices_new.sh
- mv new_build new_processed_build
rules:
- if: $CI_COMMIT_BRANCH
- if: $CI_MERGE_REQUEST_ID
- bash .ci/build_indices.sh
- mv build processed_build
artifacts:
expire_in: 1 day
paths:
- new_processed_build
- processed_build
# deploy
# ------------------------------------------------------------------------------------
# Deploy to Gitlab Pages - to be run only by forks; change to pages once it's ready
new pages:
# Deploy to Gitlab Pages - to be run only by forks
pages:
image: alpine:3.11.3
stage: deploy
rules:
- if: '$CI_PROJECT_NAMESPACE != "R3" && $CI_PROJECT_NAMESPACE != "R3-core"'
- if: $CI_MERGE_REQUEST_ID
- if: '$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME == "develop" && $CI_PROJECT_PATH == "R3/howto-cards"'
- if: '$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME == "master" && $CI_PROJECT_PATH == "R3/howto-cards"'
script:
- mv new_processed_build new_public
- mv processed_build public
artifacts:
expire_in: 1 week
paths:
- new_public
- public
## Deploys the website to a separate VM
deploy to production:
deploy:vm:
stage: deploy
image: alpine:3.1
before_script:
......@@ -135,10 +176,22 @@ deploy to production:
- echo "$KNOWNHOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
rules:
- if: '$CI_COMMIT_BRANCH == "develop" && $CI_PROJECT_PATH == "R3/howto-cards"'
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_PATH == "R3/howto-cards"'
#- if: '$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME == "develop" && $CI_PROJECT_PATH == "R3/howto-cards"'
- if: '$CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME == "master" && $CI_PROJECT_PATH == "R3/howto-cards"'
script:
- ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/$CI_COMMIT_BRANCH/sources/public/$CI_JOB_ID ~/$CI_COMMIT_BRANCH/public"
- scp -P $SSHPORT -r new_processed_build/* $SSHCONNECT:~/$CI_COMMIT_BRANCH/sources/public/$CI_JOB_ID
- ssh -p $SSHPORT $SSHCONNECT "cd ~/$CI_COMMIT_BRANCH/public && ln -fs ../sources/public/$CI_JOB_ID/* . && cd ~/$CI_COMMIT_BRANCH/sources/public/ && find . -type d -not -newermt '-1 minutes' -exec rm -rf {} +;"
- ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/$CI_COMMIT_REF_NAME/sources/public/$CI_JOB_ID ~/$CI_COMMIT_REF_NAME/public"
- scp -P $SSHPORT -r processed_build/* $SSHCONNECT:~/$CI_COMMIT_REF_NAME/sources/public/$CI_JOB_ID
- ssh -p $SSHPORT $SSHCONNECT "cd ~/$CI_COMMIT_REF_NAME/public && ln -fs ../sources/public/$CI_JOB_ID/* . && cd ~/$CI_COMMIT_REF_NAME/sources/public/ && find . -type d -not -newermt '-1 minutes' -exec rm -rf {} +;"
# Trigger pipelines in internal repo
# ------------------------------------------------------------------------------------
trigger:
stage: trigger
image: curlimages/curl
rules:
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "develop"'
tags:
- privileged
script:
- curl --silent --output /dev/null -X POST -F token=$INTERNAL_TRIGGER_TOKEN -F ref=$CI_COMMIT_BRANCH $INTERNAL_REPO
[submodule ".ci/generator"]
path = .ci/generator
url = https://gitlab.lcsb.uni.lu/R3/apps/generator.git
......@@ -12,7 +12,7 @@ gem "jekyll", "~> 4.0"
gem "bundler", "> 2.0"
gem "minima", "~> 2.5"
gem 'jekyll-theme-lcsb-default', '~> 0.3.8'
gem 'jekyll-theme-lcsb-default', '~> 0.5.0'
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
......@@ -32,7 +32,7 @@ group :jekyll_plugins do
gem 'jekyll-theme-lcsb-frozen-components',
'~> 0.0.2',
:git => "https://git-r3lab.uni.lu/core-services/jekyll-theme-lcsb-frozen-components.git",
:git => "https://gitlab.lcsb.uni.lu/core-services/jekyll-theme-lcsb-frozen-components.git",
:tag => "0.0.2"
gem 'jekyll-redirect-from',
......@@ -45,3 +45,6 @@ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1" if Gem.win_platform?
gem 'jekyll-spaceship', "~> 0.9"
gem "webrick", "~> 1.7"
......@@ -19,14 +19,17 @@ description: >- # this means to ignore newlines until "baseurl:"
This page is an index for lab cards that are intended to provide practical guidance in implementing Data Management, Data Protection and IT setup.
# URL settings (the most difficult part, please refer to the guide)
baseurl: "/" # the subpath of your site, e.g. /gitlab-repository-name
url: "https://localhost" # the base hostname & protocol for your site, e.g. http://gitlab-namespace-name.pages.uni.lu/
baseurl: "/howto-cards" # the subpath of your site, e.g. /gitlab-repository-name
url: "https://howto.lcsb.uni.lu" # the base hostname & protocol for your site, e.g. http://gitlab-namespace-name.pages.uni.lu/
# Banner settings
banner: howto-card # When you have custom images, change this setting's value to the name of the folder containing them
logo: small # Change to "big" (without quotas) in case of having broad logo
date: "2020"
# Is internal or external?
internal: false
# Social media icon settings
twitter_username: uni_lu
facebook_username: uni.lu
......@@ -57,6 +60,7 @@ plugins:
- jekyll-feed
- jekyll-paginate-v2
- jekyll-redirect-from
- jekyll-spaceship
# These settings are used to display share link to howto.lcsb.uni.lu
# The display logic itself is in the template
......@@ -70,8 +74,39 @@ defaults:
path: "external/*"
values:
include_link: true
searchable: 1.0
searchable: 1.0
- scope: # adding og:image to the SEO's metadata
path: ""
values:
image: /assets/favicon/apple-touch-icon.png
preventCaching: true
# GDPR banner settings
banner_title: >-
This website needs some cookies and similar means to function.
banner_text: >-
If you permit us, we will use those means to collect data on your visits for aggregated statistics to improve our service.
banner_accept_text: >-
Accept cookies for aggregated statistics
banner_refuse_text: >-
No thanks, only technically necessary cookies
banner_more_text: >-
More information
doNotTrack_text: >-
Do Not Track is enabled
cookies_expire: 180 # days
analyticsurl: https://analytics.lcsb.uni.lu/hub/
lapurl: https://analytics.lcsb.uni.lu/lap/
siteID: 3 # you get this siteID by sending an email to lcsb-r3@uni.lu
cookieName: lap
accept_all_text: >-
Aggregate statistics cookies accepted
only_necessary_text: >-
Only necessary cookies accepted
path_policy: privacy-policy
logo_policy: https://analytics.lcsb.uni.lu/lap/static/logos/r3-logo.svg
timeout_hidebanner: 500 # milliseconds
cookieDomain: 'howto.lcsb.uni.lu' # track visitors across all subdomains of a given domain; set to * to ignore
# Exclude from processing. (no need to touch these)
# The following items will not be processed, by default. Create a custom list
......
<footer class="site-footer h-card">
<div class="wrapper footer-wrapper">
<data class="u-url" href="{{ "/" | relative_url }}"></data>
<div class="footer-cp">
<div class="r3-logo-container">
<img class="r3-logo" src="{{ '/assets/banners/r3-logo.svg' | relative_url }}" type="image/svg+xml" />
<img class="lcsb-logo" src="{{ '/assets/banners/lcsb-compact.svg' | relative_url }}" type="image/svg+xml" />
</div>
{% comment %}This is used to generate share URL for howto-pages{% endcomment %}
<div class="footer-text-container">
{% if page.timestamp %}
<p>Last page modification: {{ page.timestamp }}</p>
{% endif %}
{% if page.shortcut %}
<p>
Share this page:
<a href="{{ site.share_url }}{{ page.shortcut }}">
{{ site.share_url }}{{ page.shortcut }}
</a>
</p>
{% elsif page.include_link %}
{% assign parts = page.url | absolute_url | replace: ".html", "" | replace: "http://", "" | replace: "https://", "" | split: "/" %}
<p>
Share this page:
<a href="{{ site.share_url }}{{ parts[site.include_link_index] }}">
{{ site.share_url }}{{ parts[site.include_link_index] }}
</a>
</p>
{% endif %}
<p>
The contents are available under the <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike License (CC-BY-SA 4.0)</a>.
</p>
{% if site.siteID > 0 %}
{%- include policy.html -%}
{% endif %}
</div>
<div class="social-container">
{%- include social.html -%}
</div>
</div>
</div>
</footer>
{% if site.siteID > 0 %}
{%- include gdpr-banner.html -%}
{% endif %}
<script src="{{ '/assets/vendor/js/jquery-3.6.0.min.js' | relative_url }}"></script>
<script type="text/javascript" src="{{ "assets/js/router.js" | relative_url }}"></script>
<script type="text/javascript" src="{{ "assets/js/box_hider.js" | relative_url }}"></script>
<script>
window.addEventListener('load', function() {
window.boxHider.Trigger();
})
</script>
<link rel="prefetch" href="index.js" />
<form>
<input class="search" placeholder="What are you looking for?" name="search_query" id="search_query" /><br />
<button class="search" type="submit">Find it</button>
</form>
<h1 id="search_header">Results of your query:</h1>
<table id="search_results_table">
<tbody id="search_results_tbody">
<tr id="search_results_placeholder" style="display: none">
<td id="search_results_placeholder_td"><h3>Please wait, search is in progress...</h3></td>
</tr>
</tbody>
</table>
<script src="{{ "assets/js/lunr.min.js" | relative_url }}" integrity="sha256-34Si1Y6llMBKM3G0jQILVeoQKEwuxjbk4zGWXXMT4ps=" crossorigin="anonymous"></script>
<script>
var el_table_body = document.getElementById('search_results_tbody');
var el_input_query = document.getElementById('search_query');
var el_tr_placeholder = document.getElementById('search_results_placeholder');
var el_header = document.getElementById('search_header');
var url_params = new URLSearchParams(window.location.search);
var search_term = url_params.get('search_query') || "";
if (!!search_term.length) {
el_input_query.value = search_term;
el_header.style.display = "block";
el_tr_placeholder.style.display = "block";
}
var construct_cell = function(title, content, link) {
if (link == '#') {
return '<td><h3 class="result">' + title + '</h3><p>' + content + '</p></td>';
} else {
return '<td><h3><a href="' + link + '">' + title + '</a></h3><p>' + content + '</p></td>';
}
}
var capitalize = function(text) {
return text.charAt(0).toUpperCase() + text.slice(1);
}
var prettify = function(text) {
return text.split(':').map(capitalize).join(' &raquo; ');
}
{% assign the_cards = site.pages | where_exp:"card","card.searchable >= 1.0" %}
window.content = { {% for card in the_cards %}
"{{ card.url | slugify }}": {
"title": "{{ card.shortcut | xml_escape }}",
"content": {{ card.content | markdownify | strip_html | strip_newlines | truncate: 150 | jsonify }},
"url": "{{ card.url | xml_escape | relative_url }}"
} {% unless forloop.last %},{% endunless %} {% endfor %}
};
fetch('{{ "index.js" | relative_url }}').then(response => response.text()).then((data) => {
var the_index = JSON.parse(data);
window.search_index = lunr.Index.load(the_index);
if (search_term != "") {
var results = window.search_index.search(search_term);
for (var i = 0; i < results.length; i++) {
var node = document.createElement("tr");
node.innerHTML = construct_cell(prettify(window.content[results[i].ref].title),
window.content[results[i].ref].content.substring(0, 150) + '...',
window.content[results[i].ref].url);
el_table_body.appendChild(node);
}
if (results.length == 0) {
var node = document.createElement("tr");
node.innerHTML = construct_cell("No results",
'Sorry, we were unable to find anything that matches your query',
"#");
el_table_body.appendChild(node);
}
}
el_tr_placeholder.style.display = "none";
})
</script>
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{%- include head.html -%}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link href="{{ "assets/css/landing.css" | relative_url }}"" rel="stylesheet" />
<body>
<div class="main">
<div class="content-wrapper">
<header class="site-header" role="banner">
<div>
{%- if site.banner_link -%}
{%- assign banner_link = site.banner_link -%}
{%- else -%}
{%- assign banner_link = '/' | relative_url -%}
{%- endif -%}
<div class="custom-header">
<a href="{{ banner_link }}"><img class="img-uni-lu"
src="{{ '/assets/banners/uni-logo.svg' | relative_url }}"
type="image/svg+xml"
/></a>
<img class="img-banner img-banner-main"
src="{{ '/assets/banners/' | relative_url }}{{ site.banner }}/banner.svg"
type="image/svg+xml"
/>
<img class="img-banner img-banner-motto"
src="{{ '/assets/banners/' | relative_url }}{{ site.banner }}/motto.svg"
type="image/svg+xml"
/>
<img class="img-lcsb img-logo-{{ site.logo }}"
src="{{ '/assets/banners/' | relative_url }}{{ site.banner }}/logos.svg"
type="image/svg+xml"
/>
</div>
</div>
</header>
<main class="page-content" aria-label="Content" style="margin-right: 0%">
{% if site.internal %}
<div class="indicator tooltip" id="internal-indicator">
<p>
Internal
<i class="material-icons">info</i>
</p>
<span class="tooltip-text">
You are connected to the uni.lu network. <br />You see all the cards.
</span>
</div>
{% else %}
<div class="indicator tooltip" id="external-indicator">
<p>
External
<i class="material-icons">info</i>
</p>
<span class="tooltip-text">
You are <strong>not connected</strong> to the uni.lu network. <br />You can see only publicly available cards. <br />In order to see all, please connect to the university network via VPN.
</span>
</div>
{% endif %}
<div class="wrapper">
{%- if page.show_print_button -%}
<div class="print-button">
<img src="{{ "assets/pdf.svg" | relative_url }}">
<a href="javascript:window.print()"><span>Print the page</span></a>
</div>
{%- endif -%}
{{ content }}
<!-- index -->
<form action="search" method="GET">
<div class="search-bar">
<input placeholder="What would you like to look for?" type="text" name="search_query" />
<i class="large material-icons">search</i>
</div>
</form>
<div class="container">
<div class="left-inner-container" id="left-inner-container" ondrop="window.cardDropDiscard(event)" ondragover="window.allowDrop(event)">
</div>
<div class="right-inner-container" id="right-inner-container" ondrop="window.cardDrop(event)" ondragover="window.allowDrop(event)">
<div id="drop-to-add" class="card-pinned card-grayed card-pulsate">
<div class="card-header">
<div class="card-icon"><i class="large material-icons">add</i></div>
</div>
<div class="card-content">
<div class="card-title">
<small>Drop to add...</small>
</div>
</div>
</div>
<div class="card-pinned card-grayed cursor-hand" onclick="clear_pinned()">
<div class="card-header">
<div class="card-icon"><i class="large material-icons">delete</i></div>
</div>
<div class="card-content">
<div class="card-title">
<small>Remove all...</small>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
{%- include footer.html -%}
</div>
</body>
{%- include scripts.html -%}
<script>
window.is_internal = false;
</script>
<script src="{{ "assets/js/landing.js" | relative_url }}"></script>
</html>