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
  • dmj/selbstzeugnisse-hab
  • goermar/selbstzeugnisse-hab
2 results
Show changes
Showing
with 5641 additions and 0 deletions
@font-face {
font-family: Symbola;
src: url(../fonts/Symbola-26xx.woff) format("woff");
}
@font-face {
font-family: Lato;
src: url(../fonts/Lato-Regular.woff) format("woff");
}
@font-face {
font-family: Lato;
font-weight: bold;
src: url(../fonts/Lato-Bold.woff) format("woff");
}
@font-face {
font-family: Lato;
font-style: italic;
font-weight: normal;
src: url(../fonts/Lato-Italic.woff) format("woff");
}
@font-face {
font-family: Lato;
font-style: italic;
font-weight: bold;
src: url(../fonts/Lato-BoldItalic.woff) format("woff");
}
@font-face {
font-family: Junicode;
src: url(../fonts/Junicode.woff) format("woff");
}
body {
font: 10px/1.3 Lato, Symbole, Verdana, sans-serif;
background: url(../images/body_bg.jpg) center/cover no-repeat fixed;
background-color: #bbbcc7;
color: #634e42;
}
small {
font-size: smaller;
}
strong {
font-weight: bold;
}
.banner {
background-image: url(../images/banner_bg.jpg);
background-size: 100% auto;
height: 120px;
color: #634e42;
width: 100%;
margin-bottom: 4em;
}
.banner h1 {
font-size: 3em;
text-transform: uppercase;
margin: 0;
}
.banner h2 {
font-size: 2em;
font-style: italic;
margin: 0 0 0 2em;
}
.banner h3 {
display: block;
font-size: small;
font-weight: normal;
}
.banner > img.brand {
position: absolute;
top: 0;
left: 40px;
margin: 0;
}
.banner-logo {
float: right;
margin: 20px;
}
.banner input {
width: 100%;
background-color: #bbbcc7;
}
.banner-slogan {
margin-left: 220px;
padding-top: 2em;
}
.symbol {
font-family: "Symbola";
}
h1 {
font-size: xx-large;
}
h2 {
font-size: x-large;
}
h1, h2, h3 {
margin: .5em 0;
}
h3 {
font-size: large;
font-weight: bold;
}
h4 {
font-style: italic;
}
h3 + div, h3 + ul {
margin-left: 1em;
}
blockquote {
margin-left: 1em; padding: 1em; border-left: 3px solid #ccc;
}
p {
margin-top: 1em;
}
p + * {
margin-top: 1em;
}
a {
color: #3b5b7e;
text-decoration: underline;
}
*[lang] {
border-bottom: thin dotted;
}
sub, sup {
font-size: .83em
}
sub {
vertical-align: sub
}
sup {
vertical-align: super
}
i {
font-style: italic;
}
/**
* DYI Grid: https://css-tricks.com/dont-overthink-it-grids/
*/
.content {
line-height: 1.8em;
font-size: 1.5em;
float: left;
min-width: 110em;
}
.content h1, .content h2, .content h3 {
line-height: 1.8em;
}
.content:after {
content: "";
display: table;
clear: both;
}
/* .content h2 { */
/* border-bottom: thin solid; */
/* } */
.navigation {
float: left;
width: 12.5em;
padding: 1em 2em;
/* position: sticky;*/
top: 0px;
display: inline-block;
}
.navigation:first-child {
margin-top: 3em;
}
.navigation-collapse ul {
display: none;
}
.navigation ul {
text-transform: uppercase;
color: black;
}
.navigation ul ul {
margin-top: 0;
margin-left: 1em;
font-size: small;
}
.navigation li {
line-height: 1.0em;
margin: 1.1em 0;
}
.navigation .active {
font-weight: bold;
}
.navigation a {
color: inherit;
text-decoration: none;
}
.mainpage {
float: left;
/* width: 50em;*/
width: 35em;
padding: 1em 2em;
}
.infopanel {
float: left;
min-width: 40em;
padding: 1em 2em;
position: sticky;
top: 0px;
display: inline-block;
}
.infopanel h1 {
font-size: larger;
margin: 1em 0;
border-bottom: thin solid;
}
.teaser {
position: absolute;
left: 75em;
width: 500px;
}
.teaser li {
float: left;
max-width: 200px;
width: 15em;
height: 400px;
}
.teaser li + li {
margin-left: 1em;
}
.teaser > img {
padding: 1em;
margin-left: 40%;
}
.bg-blue {
background-color: #364759;
}
.bg-lgrey {
background-color: #888d96;
}
.bg-mgrey {
background-color: #a19ea0;
}
.list-styled {
list-style: disc outside;
}
.ref {
text-decoration: none;
/* border-bottom: thin dashed; */
display: inline;
}
.ref-place, .ref-person, .ref-gloss, .ref-bibl {
color: #3b5b7e;
text-decoration: none;
}
.ref-place-target, .ref-person-target, .ref-gloss-target, .ref-bibl-target {
display: none;
background-color: #fff8dc;
border: thin solid #ffe4b5;
padding: .25em;
position: absolute;
left: 51em;
width: 30em;
max-width: 30em;
/*left: 65em;
width: 28rem;
max-width: 28rem;*/
font-size: 1rem !important;
font-weight: normal !important;
z-index: 100;
}
/*.ref-person:before, .ref-place:before {
content: " ⌘ ";
}*/
.facet { display: table; font-size: small; line-height: 1.4em; }
.facet a { text-decoration: none; }
.facet-label { display: table-header-group; }
.facet-label > span { display: table-cell; }
.facet-value { display: table-row; margin: 0; }
.facet-value-label, .facet-value-count { display: table-cell; }
.facet-value-label { width: 12em; }
.facet-value .active:before { content: "✓"; margin-left: -1em; }
.facet + .facet { margin-top: 1em; }
.facet ul { margin-left: 1em; }
.search-result dt { float: left; width: 12em; margin-left: 2em; }
.search-result dd { margin-left: 14em; }
.pagination {
text-align: center;
}
.pagination li {
display: inline;
}
.content input[type=text] {
width: 60%;
}
.content input, select {
border: thin solid #222;
background-color: white;
}
fieldset {
text-align: center;
}
/*label {
display: none;
}*/
.js-toggle-sibling {
cursor: pointer;
}
.js-toggle {
display: none;
}
table {
border-collapse: collapse;
}
td, th {
padding: 0.25em;
}
th {
font-weight: bold;
border-bottom: 1px solid;
}
.print-only { display: none; }
.error { color: crimson; font-size: 1rem !important; font-weight: normal; }
.diarium {
font-family: "Junicode", "Symbola";
}
.diarium .pagination {
margin-bottom: 1em;
font-family: Lato;
display: block;
text-align: left;
}
.diarium .pagination a {
text-decoration: none;
color: inherit;
}
.diarium .pagination .prev:before {
content: "▲";
color: red;
}
.diarium .pagination .next:before {
content: "▼";
color: red;
}
.diarium .pagination h1 {
font-size: xx-large;
margin: 0;
border: none;
}
.content .diarium h2 {
font-size: large;
font-weight: bold;
display: inline;
border-bottom: none;
}
.diarium * + p {
display: inline;
}
.diarium p + p {
display: block;
}
.diarium div + div {
margin-top: 1em;
}
.diarium .margin-left {
position: absolute;
left: 1.5rem;
max-width: 12rem;
font-size: 1rem !important;
}
.diarium .unclear::after {
content: "[?]";
}
.annotation {
text-decoration: none;
/* border-bottom: thin dashed; */
display: inline;
}
.annotation-reference {
padding: 0 .25em;
text-decoration: none;
border-bottom: thin dashed;
font-size:9pt;
vertical-align:super;
color: blue;
}
.annotation-target + * {
display: inline;
}
.annotation-target {
/*display: none;*/
background-color: #fff8dc;
border: thin solid #ffe4b5;
padding: .25em;
padding-left: 2.5em;
text-indent: -2.2em;
position: absolute;
left: 65em;
width: 25rem;
max-width: 25rem;
font-size: 1rem !important;
font-weight: normal !important;
z-index: 90;
/* float: right;*/
/* margin-right: -31rem;*/
}
.appheading {
font-size: 13pt;
color: black;
font-weight: 600;
text-align: left
}
.fnnumber {
display: inline-block;
margin-left: 2.2em;
}
.active {
font-weight: bold;
}
.diarium .active, .diarium .active * {
font-weight: inherit;
/*background-color: yellow;*/
background-color: #fffa9c;
z-index: 100;
}
.diarium .visible, .diarium .visible * {
font-weight: inherit;
/*background-color: #fffa9c;*/
z-index: 100;
display: inline;
}
.margin-left .annotation-target {
margin-left: -1.5em;
}
.facsimile {
display: none;
background-color: black;
border: thin solid grey;
padding: .25em;
position: absolute;
/*left: 65em;*/
left: 51em;
/*width: 50em;
max-width: 50em;*/
width: 32em;
max-width: 32em;
height: 50em;
max-height: 50em;
font-size: 1rem !important;
font-weight: normal !important;
z-index: 100;
}
.facsimile a {
padding: .25em;
color: white;
text-decoration: none;
cursor: pointer;
}
.facsimile img {
width: 95%;
height: 100%;
}
.facsimile iframe {
width: 95%;
height: 100%;
}
/*
#facsimile {
display: block;
}*/
.controls a {
text-decoration: none;
}
.controls {
text-align: right;
font-size: small;
}
.controls li {
display: inline;
padding: 0 1em;
}
.register dl { margin-left: 2em; }
.register dt { font-weight: bold; margin-left: -1em; margin-right: 1em; float: left; }
.register dt a { margin: 0 0.25em; text-decoration: inherit; }
.cipher:before { content: "{:"; }
.cipher:after { content: ":}"; }
.breadcrumbs li { display: inline; }
.breadcrumbs li + li:before { content: " / "; }
ol {
list-style-type: roman;
}
ol em {
background-color: yellow;
}
.float {
/* left: 65rem;*/
left: 55em;
position: absolute;
padding: .25em;
width: 25rem;
}
.float img {
width: inherit;
}
.resp {
text-align: right;
font-size: smaller;
}
.row {
display: table-row;
}
.column {
display: table-cell;
padding: 1em;
}
public/assets/selbstzeugnisse/images/teaser/img001_klein.jpg

9.79 KiB

public/assets/selbstzeugnisse/images/teaser/img002_klein.jpg

8.55 KiB

public/assets/selbstzeugnisse/images/teaser/img004.jpg

26.8 KiB

public/assets/selbstzeugnisse/images/teaser/img005.jpg

26.6 KiB

/**
* Prototyp Geovisualisierung
*
* Author: David Maus <maus@hab.de>
* Timestamp: <2017-07-26 11:57:56 maus>
*/
var Karte = (function () {
// Kenndaten des Kartenausschnitts:
//
// 6144 x 4096 Pixel
//
// Nordosten: 77.11 42.08
// Südwesten: 31.55 -26.38
//
// Rechteck: 45.56 68.46
//
var tilesUrl = "../assets/tiles/{z}/map_{x}_{y}.png";
var scaleLat = 4096 / 45.56;
var scaleLon = 6144 / 68.46;
return {
// Latitude ist Breitengrad, d.h. Nord-Süd-Position
// Longitude ist Längengrad, d.h. Ost-West-Position
project: function (lat, lon) {
var x = (lon + 26.38) * scaleLon;
var y = (77.11 - lat) * scaleLat;
return Karte.map.unproject([x, y]);
},
initialize: function () {
Karte.map = new L.Map('map', { crs: L.CRS.Simple, minZoom: 20, maxZoom: 20, zoomControl: false });
Karte.layer = new L.TileLayer(tilesUrl, { minZoom: 20, maxZoom: 20, opacity: 0.5 });
Karte.map.addLayer(Karte.layer);
Karte.map.setMaxBounds(new L.LatLngBounds(Karte.map.unproject([0, 4096]), Karte.map.unproject([6144, 0])));
Karte.map.setZoom(20);
}
};
})();
function adjust (selector) {
var nodelist = $(selector);
var length = nodelist.size();
for (var i = 1; i < length; i++) {
var prev = $(nodelist.get(i - 1));
var node = $(nodelist.get(i));
var bottom = prev.offset().top + prev.height() + 16;
if (node.offset().top < bottom) {
node.offset({ top: bottom });
}
}
}
$(document).ready(
function () {
$('.js-toggle-sibling').click(
function (event) {
$('.fa', this).toggleClass('fa-chevron-right fa-chevron-down');
$(this).next().toggle();
event.preventDefault();
}
);
/*$('a.pagebreak').click(
function (event) {
var imageUri = $(this).attr('href');
$('.facsimile img').attr('src', imageUri);
$('#facsimile').attr('href', imageUri);
$('.facsimile').fadeIn();
event.preventDefault();
}
);*/
$('a.fa-close').click(
function (event) {
$(this).removeClass('visible');
event.preventDefault();
}
);
$('.ref')
.click(
function (event) {
$(this).toggleClass('visible');
// var targetUri = $('a.annotation-reference', this).attr('href');
// $(targetUri).addClass('active');
}
);
$('.annotation')
.mouseenter(
function (event) {
$(this).addClass('active');
// var targetUri = $('a.annotation-reference', this).attr('href');
// $(targetUri).addClass('active');
}
)
.mouseleave(
function (event) {
$(this).removeClass('active');
// var targetUri = $('a.annotation-reference', this).attr('href');
// $(targetUri).addClass('active');
}
);
$('.navigation-collapse')
.mouseenter(
function (event) {
$('.margin-left').fadeOut();
$('ul', this).fadeIn();
}
)
.mouseleave(
function (event) {
$('.margin-left').fadeIn();
$('ul', this).fadeOut();
}
)
}
);
.affix {
top: 0;
width: 100%;
z-index: 9999 !important;
}
.affix + .container-fluid {
padding-top: 70px;
}
This diff is collapsed.
/*div.container {
padding-bottom: 5em;
}
div.entry {
margin-top:0.5em;
margin-bottom:0.5em;
}
.affix {
top: 0;
width: auto;
}
.affix + .container-fluid {
padding-top: 70px;
}
div.container-fluid {
padding-left:10px;
padding-right:10px;
}
div.container-fluid:first-of-type {
background-color:#eee;
margin-bottom:5px;
}
ul.nav li.dropdown:hover ul.dropdown-menu {
display:block;
margin-top:0px;
}
div.buttonsTop {
text-align:right
} */
.dropdown-menu {
max-height: 400px;
overflow: hidden;
overflow-y: auto;
}
/* Formatierungen für Textteile */
footer {
background-color: #555;
padding:15px;
text-align:center;
margin-top:2em;
bottom:0;
width:100%;
}
span.titleCat {
display:none;
}
/* Formatierungen für WordClouds */
div#wordCloudButtons {
/* margin-top:3em;
text-align:left; */
}
div#wordcloud {
font-family: "Helvetica", "Arial", sans-serif;
/* color: #09f; */
color: #035151;
overflow: hidden;
position: relative;
margin-left: auto;
margin-right: auto;
margin-top:3em;
width: 1170px;
}
div#wordcloud a {
color: inherit;
text-decoration: none;
}
div#wordcloud a:hover {
/* color: #0df; */
color: #ECD5A7;
}
div#wordcloud a:hover {
/* color: #0cf; */
color: #ECD5A7;
}
div#wordcloud span {
padding: 0;
}
div#wordcloud span.w10 {
font-size: 54px;
color: #035151;
}
div#wordcloud span.w9 {
font-size: 50px;
color: #a08246;
}
div#wordcloud span.w8 {
font-size: 002222;
color: #003A3A;
}
div#wordcloud span.w7 {
font-size: 40px;
color: #5C420E;
}
div#wordcloud span.w6 {
font-size: 34px;
color: #003A3A;
}
div#wordcloud span.w5 {
font-size: 30px;
color: #836528;
}
div#wordcloud span.w4 {
font-size: 24px;
color: #ECD5A7;
}
div#wordcloud span.w3 {
font-size: 20px;
color: #C1A56C;
}
div#wordcloud span.w2 {
font-size: 14px;
color: #257878;
}
div#wordcloud span.w1 {
font-size: 10px;
color: #003A3A;
}
/* Formatierungen für Chart.js */
.chart-legend li span {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 5px;
float: left;
}
div.chart-legend {
margin-top:3em;
}
div.chart-numbers {
margin-left:40px;
}
#myDoughnutChart {
position: relative;
margin-left: auto;
margin-right: auto;
}
li { list-style-type: none }
li.entry-list { list-style-type: auto }
File added
File added
File added
File added
This diff is collapsed.
This diff is collapsed.
/*!
* jQCloud
* Copyright 2011 Luca Ongaro (http://www.lucaongaro.eu)
* Copyright 2013 Daniel White (http://www.developerdan.com)
* Copyright 2014 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
/*jshint -W055 *//* non standard constructor name */
(function($) {
"use strict";
/*
* Plugin class
*/
var jQCloud = function (element, word_array, options) {
this.$element = $(element);
this.word_array = word_array || [];
this.options = options;
this.sizeGenerator = null;
this.colorGenerator = null;
// Data used internally
this.data = {
placed_words: [],
timeouts: {},
namespace: null,
step: null,
angle: null,
aspect_ratio: null,
max_weight: null,
min_weight: null,
sizes: [],
colors: []
};
this.initialize();
};
jQCloud.DEFAULTS = {
width: 100,
height: 100,
center: { x: 0.5, y: 0.5 },
steps: 10,
delay: null,
shape: 'elliptic',
classPattern: 'w{n}',
encodeURI: true,
removeOverflowing: true,
afterCloudRender: null,
autoResize: false,
colors: null,
fontSize: null,
template: null
};
jQCloud.prototype = {
initialize: function() {
// Set/Get dimensions
if (this.options.width) {
this.$element.width(this.options.width);
}
else {
this.options.width = this.$element.width();
}
if (this.options.height) {
this.$element.height(this.options.height);
}
else {
this.options.height = this.$element.height();
}
// Default options value
this.options = $.extend(true, {}, jQCloud.DEFAULTS, this.options);
// Ensure delay
if (this.options.delay === null) {
this.options.delay = this.word_array.length > 50 ? 10 : 0;
}
// Backward compatibility
if (this.options.center.x > 1) {
this.options.center.x = this.options.center.x / this.options.width;
this.options.center.y = this.options.center.y / this.options.height;
}
// Create colorGenerator function from options
// Direct function
if (typeof this.options.colors == 'function') {
this.colorGenerator = this.options.colors;
}
// Array of sizes
else if ($.isArray(this.options.colors)) {
var cl = this.options.colors.length;
if (cl > 0) {
// Fill the sizes array to X items
if (cl < this.options.steps) {
for (var i=cl; i<this.options.steps; i++) {
this.options.colors[i] = this.options.colors[cl-1];
}
}
this.colorGenerator = function(weight) {
return this.options.colors[this.options.steps - weight];
};
}
}
// Create sizeGenerator function from options
// Direct function
if (typeof this.options.fontSize == 'function') {
this.sizeGenerator = this.options.fontSize;
}
// Object with 'from' and 'to'
else if ($.isPlainObject(this.options.fontSize)) {
this.sizeGenerator = function(width, height, weight) {
var max = width * this.options.fontSize.from,
min = width * this.options.fontSize.to;
return Math.round(min + (max - min) * 1.0 / (this.options.steps-1) * (weight - 1)) + 'px';
};
}
// Array of sizes
else if ($.isArray(this.options.fontSize)) {
var sl = this.options.fontSize.length;
if (sl > 0) {
// Fill the sizes array to X items
if (sl < this.options.steps) {
for (var j=sl; j<this.options.steps; j++) {
this.options.fontSize[j] = this.options.fontSize[sl-1];
}
}
this.sizeGenerator = function(width, height, weight) {
return this.options.fontSize[this.options.steps - weight];
};
}
}
this.data.angle = Math.random() * 6.28;
this.data.step = (this.options.shape === 'rectangular') ? 18.0 : 2.0;
this.data.aspect_ratio = this.options.width / this.options.height;
this.clearTimeouts();
// Namespace word ids to avoid collisions between multiple clouds
this.data.namespace = (this.$element.attr('id') || Math.floor((Math.random()*1000000)).toString(36)) + '_word_';
this.$element.addClass('jqcloud');
// Container's CSS position cannot be 'static'
if (this.$element.css('position') === 'static') {
this.$element.css('position', 'relative');
}
// Delay execution so that the browser can render the page before the computatively intensive word cloud drawing
this.createTimeout($.proxy(this.drawWordCloud, this), 10);
// Attach window resize event
if (this.options.autoResize) {
$(window).on('resize', throttle(this.resize, 50, this));
}
},
// Helper function to keep track of timeouts so they can be destroyed
createTimeout: function(callback, time) {
var timeout = setTimeout($.proxy(function(){
delete this.data.timeouts[timeout];
callback();
}, this), time);
this.data.timeouts[timeout] = true;
},
// Destroy all timeouts
clearTimeouts: function() {
$.each(this.data.timeouts, function(key){
clearTimeout(key);
});
this.data.timeouts = {};
},
// Pairwise overlap detection
overlapping: function(a, b) {
if (Math.abs(2.0*a.left + a.width - 2.0*b.left - b.width) < a.width + b.width) {
if (Math.abs(2.0*a.top + a.height - 2.0*b.top - b.height) < a.height + b.height) {
return true;
}
}
return false;
},
// Helper function to test if an element overlaps others
hitTest: function(elem) {
// Check elements for overlap one by one, stop and return false as soon as an overlap is found
for(var i=0, l=this.data.placed_words.length; i<l; i++) {
if (this.overlapping(elem, this.data.placed_words[i])) {
return true;
}
}
return false;
},
// Initialize the drawing of the whole cloud
drawWordCloud: function() {
var i, l;
this.$element.children('[id^="' + this.data.namespace + '"]').remove();
if (this.word_array.length === 0) {
return;
}
// Make sure every weight is a number before sorting
for (i=0, l=this.word_array.length; i<l; i++) {
this.word_array[i].weight = parseFloat(this.word_array[i].weight, 10);
}
// Sort word_array from the word with the highest weight to the one with the lowest
this.word_array.sort(function(a, b) {
return b.weight - a.weight;
});
// Kepp trace of bounds
this.data.max_weight = this.word_array[0].weight;
this.data.min_weight = this.word_array[this.word_array.length - 1].weight;
// Generate colors
this.data.colors = [];
if (this.colorGenerator) {
for (i=0; i<this.options.steps; i++) {
this.data.colors.push(this.colorGenerator(i+1));
}
}
// Generate font sizes
this.data.sizes = [];
if (this.sizeGenerator) {
for (i=0; i<this.options.steps; i++) {
this.data.sizes.push(this.sizeGenerator(this.options.width, this.options.height, i+1));
}
}
// Iterate drawOneWord on every word, immediately or with delay
if (this.options.delay > 0){
this.drawOneWordDelayed();
}
else {
for (i=0, l=this.word_array.length; i<l; i++) {
this.drawOneWord(i, this.word_array[i]);
}
if (typeof this.options.afterCloudRender === 'function') {
this.options.afterCloudRender.call(this.$element);
}
}
},
// Function to draw a word, by moving it in spiral until it finds a suitable empty place
drawOneWord: function(index, word) {
var word_id = this.data.namespace + index,
word_selector = '#' + word_id,
// option.shape == 'elliptic'
angle = this.data.angle,
radius = 0.0,
// option.shape == 'rectangular'
steps_in_direction = 0.0,
quarter_turns = 0.0,
weight = Math.floor(this.options.steps / 2),
word_span,
word_size,
word_style;
// Create word attr object
word.attr = $.extend({}, word.html, { id: word_id });
// Linearly map the original weight to a discrete scale from 1 to 10
// Only if weights are different
if (this.data.max_weight != this.data.min_weight) {
weight = Math.round((word.weight - this.data.min_weight) * 1.0 * (this.options.steps-1) / (this.data.max_weight - this.data.min_weight)) + 1;
}
word_span = $('<span>').attr(word.attr);
// Apply class
if (this.options.classPattern) {
word_span.addClass(this.options.classPattern.replace('{n}', weight));
}
// Apply color
if (this.data.colors.length) {
word_span.css('color', this.data.colors[weight-1]);
}
// Apply size
if (this.data.sizes.length) {
word_span.css('font-size', this.data.sizes[weight-1]);
}
//Render using template function if provided.
if (this.options.template) {
word_span.html(this.options.template(word));
} else if (word.link) {
// Append link if word.link attribute was set
// If link is a string, then use it as the link href
if (typeof word.link === 'string') {
word.link = { href: word.link };
}
if (this.options.encodeURI) {
word.link.href = encodeURI(word.link.href).replace(/'/g, '%27');
}
word_span.append($('<a>').attr(word.link).text(word.text));
}
else {
word_span.text(word.text);
}
// Bind handlers to words
if (word.handlers) {
word_span.on(word.handlers);
}
this.$element.append(word_span);
word_size = {
width: word_span.outerWidth(),
height: word_span.outerHeight()
};
word_size.left = this.options.center.x*this.options.width - word_size.width / 2.0;
word_size.top = this.options.center.y*this.options.height - word_size.height / 2.0;
// Save a reference to the style property, for better performance
word_style = word_span[0].style;
word_style.position = 'absolute';
word_style.left = word_size.left + 'px';
word_style.top = word_size.top + 'px';
while(this.hitTest(word_size)) {
// option shape is 'rectangular' so move the word in a rectangular spiral
if (this.options.shape === 'rectangular') {
steps_in_direction++;
if (steps_in_direction * this.data.step > (1 + Math.floor(quarter_turns / 2.0)) * this.data.step * ((quarter_turns % 4 % 2) === 0 ? 1 : this.data.aspect_ratio)) {
steps_in_direction = 0.0;
quarter_turns++;
}
switch(quarter_turns % 4) {
case 1:
word_size.left += this.data.step * this.data.aspect_ratio + Math.random() * 2.0;
break;
case 2:
word_size.top -= this.data.step + Math.random() * 2.0;
break;
case 3:
word_size.left -= this.data.step * this.data.aspect_ratio + Math.random() * 2.0;
break;
case 0:
word_size.top += this.data.step + Math.random() * 2.0;
break;
}
}
// Default settings: elliptic spiral shape
else {
radius += this.data.step;
angle += (index % 2 === 0 ? 1 : -1) * this.data.step;
word_size.left = this.options.center.x*this.options.width - (word_size.width / 2.0) + (radius*Math.cos(angle)) * this.data.aspect_ratio;
word_size.top = this.options.center.y*this.options.height + radius*Math.sin(angle) - (word_size.height / 2.0);
}
word_style.left = word_size.left + 'px';
word_style.top = word_size.top + 'px';
}
// Don't render word if part of it would be outside the container
if (this.options.removeOverflowing && (
word_size.left < 0 || word_size.top < 0 ||
(word_size.left + word_size.width) > this.options.width ||
(word_size.top + word_size.height) > this.options.height
)
) {
word_span.remove();
return;
}
// Save position for further usage
this.data.placed_words.push(word_size);
if (typeof word.afterWordRender === 'function') {
word.afterWordRender.call(word_span);
}
},
// Draw one word then recall the function after a delay
drawOneWordDelayed: function(index) {
index = index || 0;
// if not visible then do not attempt to draw
if (!this.$element.is(':visible')) {
this.createTimeout($.proxy(function(){
this.drawOneWordDelayed(index);
}, this), 10);
return;
}
if (index < this.word_array.length) {
this.drawOneWord(index, this.word_array[index]);
this.createTimeout($.proxy(function(){
this.drawOneWordDelayed(index + 1);
}, this), this.options.delay);
}
else {
if (typeof this.options.afterCloudRender == 'function') {
this.options.afterCloudRender.call(this.$element);
}
}
},
// Destroy any data and objects added by the plugin
destroy: function() {
this.clearTimeouts();
this.$element.removeClass('jqcloud');
this.$element.removeData('jqcloud');
this.$element.children('[id^="' + this.data.namespace + '"]').remove();
},
// Update the list of words
update: function(word_array) {
this.word_array = word_array;
this.data.placed_words = [];
this.clearTimeouts();
this.drawWordCloud();
},
resize: function() {
var new_size = {
width: this.$element.width(),
height: this.$element.height()
};
if (new_size.width != this.options.width || new_size.height != this.options.height) {
this.options.width = new_size.width;
this.options.height = new_size.height;
this.data.aspect_ratio = this.options.width / this.options.height;
this.update(this.word_array);
}
},
};
/*
* Apply throttling to a callback
* @param callback {function}
* @param delay {int} milliseconds
* @param context {object|null}
* @return {function}
*/
function throttle(callback, delay, context) {
var state = {
pid: null,
last: 0
};
return function() {
var elapsed = new Date().getTime() - state.last,
args = arguments,
that = this;
function exec() {
state.last = new Date().getTime();
return callback.apply(context || that, Array.prototype.slice.call(args));
}
if (elapsed > delay) {
return exec();
}
else {
clearTimeout(state.pid);
state.pid = setTimeout(exec, delay - elapsed);
}
};
}
/*
* jQuery plugin
*/
$.fn.jQCloud = function(word_array, option) {
var args = arguments;
return this.each(function () {
var $this = $(this),
data = $this.data('jqcloud');
if (!data && word_array === 'destroy') {
// Don't even try to initialize when called with 'destroy'
return;
}
if (!data) {
var options = typeof option === 'object' ? option : {};
$this.data('jqcloud', (data = new jQCloud(this, word_array, options)));
}
else if (typeof word_array === 'string') {
data[word_array].apply(data, Array.prototype.slice.call(args, 1));
}
});
};
$.fn.jQCloud.defaults = {
set: function(options) {
$.extend(true, jQCloud.DEFAULTS, options);
},
get: function(key) {
var options = jQCloud.DEFAULTS;
if (key) {
options = options[key];
}
return $.extend(true, {}, options);
}
};
})(jQuery);
This diff is collapsed.
function toggle(control){
var elem = document.getElementById(control);
if(elem.style.display == "none"){
elem.style.display = "block";
minus(control);
}else{
elem.style.display = "none";
plus(control);
}
}
function minus(control) {
document.getElementById("link" + control).innerHTML = "Reduzieren";
}
function plus(control) {
document.getElementById("link" + control).innerHTML = "Mehr";
}
// Umschalten zwischen bibliographierten Daten und Transkription
function switchToOriginal() {
var x = document.getElementsByClassName("titleBib");
var y = document.getElementsByClassName("titleCat");
var a = document.getElementsByClassName("authorList");
var p = document.getElementsByClassName("published");
var v = document.getElementsByClassName("volumes");
var c = document.getElementsByClassName("titleOriginal-single");
var countA = a.length;
for (i = 0; i < countA; i++) {
a[i].style.display='none';
}
var countP = p.length;
for (i = 0; i < countP; i++) {
p[i].style.display='none';
}
var countV = v.length;
for (i = 0; i < countV; i++) {
v[i].style.display='none';
}
var count = x.length;
for (i = 0; i < count; i++) {
x[i].style.display='none';
y[i].style.display='inline';
}
var countC = c.length;
for (i = 0; i < countC; i++) {
c[i].style.display='none';
}
z = document.getElementById("switchLink");
z.innerHTML = "<a href='javascript:switchToBibl()'>Bibliographierte Daten anzeigen</a>";
}
function switchToBibl() {
var x = document.getElementsByClassName("titleBib");
var y = document.getElementsByClassName("titleCat");
var a = document.getElementsByClassName("authorList");
var p = document.getElementsByClassName("published");
var v = document.getElementsByClassName("volumes");
var c = document.getElementsByClassName("titleOriginal-single");
var countA = a.length;
for (i = 0; i < countA; i++) {
a[i].style.display='inline';
}
var countP = p.length;
for (i = 0; i < countP; i++) {
p[i].style.display='inline';
}
var countV = v.length;
for (i = 0; i < countV; i++) {
v[i].style.display='inline';
}
var count = x.length;
for (i = 0; i < count; i++) {
y[i].style.display='none';
x[i].style.display='inline';
}
var countC = c.length;
for (i = 0; i < countC; i++) {
c[i].style.display='inline';
}
z = document.getElementById("switchLink");
z.innerHTML = "<a href='javascript:switchToOriginal()'>Anzeige in Vorlageform</a>";
}
/*
Die folgende Funktion scrollt die Seite beim Ansteuern interner Sprungmarken um die Breite der
Navigationsleiste nach oben. Das funktioniert in folgendem Fall noch nicht: Die Leiste ist breiter als
Standard (52 px) und man kommt vom Anfang derselben Seite.
*/
function scrollNav(x) {
var shiftWindow = function() { scrollBy(0, x) };
if (location.hash) {
shiftWindow();
if(x < -52) {
var y = x + 52;
var shiftWindowMore = function() { scrollBy(0, y) };
shiftWindowMore();
}
}
window.addEventListener("hashchange", shiftWindow);
}
// So lautete die Funktion ursprünglich
/* function scrollNav(x) {
var shiftWindow = function() { scrollBy(0, x) };
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);
} */
function getNavBarHeight() {
var x = document.getElementsByTagName('nav')[0].offsetHeight;
return(-x);
}
/* For generating and updating word clouds by jQCloud */
function makeWordCloud(cloudList) {
cloudList = JSON.parse(cloudList);
var settings = { width: 800, height: 500 };
$(document).ready(
function() {
$("#wordcloud").jQCloud(cloudList, settings);
}
);
}
function updateWordCloud(cloudList) {
makeFirstButtonInactive();
cloudList = JSON.parse(cloudList);
var settings = { width: 800, height: 500 };
$(document).ready(
function() {
$("#wordcloud").jQCloud('update', cloudList, settings);
}
);
}
function makeFirstButtonInactive() {
var x = document.getElementsByClassName('btn btn-default active');
for (i = 0; i < x.length; i++) {
x[i].className = 'btn btn-default';
}
}
/* For updating doughnut charts generated by Chart.js */
function replaceChart(newData) {
makeFirstButtonInactive();
myNewChart.destroy();
data = JSON.parse(newData);
updateCount(countMarked(data));
myNewChart = new Chart(ctx).Doughnut(data, optionsDoughnut);
legend = myNewChart.generateLegend();
document.getElementById('chart-legend').innerHTML = legend;
}
function updateCount(number) {
span = document.getElementById('overallNumber');
span.innerHTML = '<br />Auszeichnungen: ' + number;
}
function countMarked(data) {
var count = 0;
for (i = 0; i < data.length; i++) {
count += data[i]["value"];
}
return(count);
}
This diff is collapsed.