diff --git a/fet2020/members/views.py b/fet2020/members/views.py index 09fddea8..7525e44e 100644 --- a/fet2020/members/views.py +++ b/fet2020/members/views.py @@ -107,7 +107,7 @@ def profile_view(request, member_id=None): logger.info("Wrong member id '{}'".format(member_id)) raise Http404("no member") - jobs = deque(JobMember.members.filter(member__id=member_id)) + jobs = deque(JobMember.members.filter(member__id=member_id).order_by("job_start")) context = { "pinned_job_groups": pinned_job_groups, diff --git a/fet2020/static/js/alpinejs@3.2.2.js b/fet2020/static/js/alpinejs@3.2.2.js new file mode 100644 index 00000000..de5c062e --- /dev/null +++ b/fet2020/static/js/alpinejs@3.2.2.js @@ -0,0 +1,2517 @@ +(() => { + // packages/alpinejs/src/scheduler.js + var flushPending = false; + var flushing = false; + var queue = []; + function scheduler(callback) { + queueJob(callback); + } + function queueJob(job) { + if (!queue.includes(job)) + queue.push(job); + queueFlush(); + } + function queueFlush() { + if (!flushing && !flushPending) { + flushPending = true; + queueMicrotask(flushJobs); + } + } + function flushJobs() { + flushPending = false; + flushing = true; + for (let i = 0; i < queue.length; i++) { + queue[i](); + } + queue.length = 0; + flushing = false; + } + + // packages/alpinejs/src/reactivity.js + var reactive; + var effect; + var release; + var raw; + var shouldSchedule = true; + function disableEffectScheduling(callback) { + shouldSchedule = false; + callback(); + shouldSchedule = true; + } + function setReactivityEngine(engine) { + reactive = engine.reactive; + release = engine.release; + effect = (callback) => engine.effect(callback, {scheduler: (task) => { + if (shouldSchedule) { + scheduler(task); + } else { + task(); + } + }}); + raw = engine.raw; + } + function overrideEffect(override) { + effect = override; + } + function elementBoundEffect(el) { + let cleanup2 = () => { + }; + let wrappedEffect = (callback) => { + let effectReference = effect(callback); + if (!el._x_effects) { + el._x_effects = new Set(); + el._x_runEffects = () => { + el._x_effects.forEach((i) => i()); + }; + } + el._x_effects.add(effectReference); + cleanup2 = () => { + if (effectReference === void 0) + return; + el._x_effects.delete(effectReference); + release(effectReference); + }; + }; + return [wrappedEffect, () => { + cleanup2(); + }]; + } + + // packages/alpinejs/src/mutation.js + var onAttributeAddeds = []; + var onElRemoveds = []; + var onElAddeds = []; + function onElAdded(callback) { + onElAddeds.push(callback); + } + function onElRemoved(callback) { + onElRemoveds.push(callback); + } + function onAttributesAdded(callback) { + onAttributeAddeds.push(callback); + } + function onAttributeRemoved(el, name, callback) { + if (!el._x_attributeCleanups) + el._x_attributeCleanups = {}; + if (!el._x_attributeCleanups[name]) + el._x_attributeCleanups[name] = []; + el._x_attributeCleanups[name].push(callback); + } + function cleanupAttributes(el, names) { + if (!el._x_attributeCleanups) + return; + Object.entries(el._x_attributeCleanups).forEach(([name, value]) => { + (names === void 0 || names.includes(name)) && value.forEach((i) => i()); + delete el._x_attributeCleanups[name]; + }); + } + var observer = new MutationObserver(onMutate); + var currentlyObserving = false; + function startObservingMutations() { + observer.observe(document, {subtree: true, childList: true, attributes: true, attributeOldValue: true}); + currentlyObserving = true; + } + function stopObservingMutations() { + observer.disconnect(); + currentlyObserving = false; + } + var recordQueue = []; + var willProcessRecordQueue = false; + function flushObserver() { + recordQueue = recordQueue.concat(observer.takeRecords()); + if (recordQueue.length && !willProcessRecordQueue) { + willProcessRecordQueue = true; + queueMicrotask(() => { + processRecordQueue(); + willProcessRecordQueue = false; + }); + } + } + function processRecordQueue() { + onMutate(recordQueue); + recordQueue.length = 0; + } + function mutateDom(callback) { + if (!currentlyObserving) + return callback(); + flushObserver(); + stopObservingMutations(); + let result = callback(); + startObservingMutations(); + return result; + } + function onMutate(mutations) { + let addedNodes = []; + let removedNodes = []; + let addedAttributes = new Map(); + let removedAttributes = new Map(); + for (let i = 0; i < mutations.length; i++) { + if (mutations[i].target._x_ignoreMutationObserver) + continue; + if (mutations[i].type === "childList") { + mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.push(node)); + mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.push(node)); + } + if (mutations[i].type === "attributes") { + let el = mutations[i].target; + let name = mutations[i].attributeName; + let oldValue = mutations[i].oldValue; + let add2 = () => { + if (!addedAttributes.has(el)) + addedAttributes.set(el, []); + addedAttributes.get(el).push({name, value: el.getAttribute(name)}); + }; + let remove = () => { + if (!removedAttributes.has(el)) + removedAttributes.set(el, []); + removedAttributes.get(el).push(name); + }; + if (el.hasAttribute(name) && oldValue === null) { + add2(); + } else if (el.hasAttribute(name)) { + remove(); + add2(); + } else { + remove(); + } + } + } + removedAttributes.forEach((attrs, el) => { + cleanupAttributes(el, attrs); + }); + addedAttributes.forEach((attrs, el) => { + onAttributeAddeds.forEach((i) => i(el, attrs)); + }); + for (let node of addedNodes) { + if (removedNodes.includes(node)) + continue; + onElAddeds.forEach((i) => i(node)); + } + for (let node of removedNodes) { + if (addedNodes.includes(node)) + continue; + onElRemoveds.forEach((i) => i(node)); + } + addedNodes = null; + removedNodes = null; + addedAttributes = null; + removedAttributes = null; + } + + // packages/alpinejs/src/scope.js + function addScopeToNode(node, data2, referenceNode) { + node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)]; + return () => { + node._x_dataStack = node._x_dataStack.filter((i) => i !== data2); + }; + } + function refreshScope(element, scope) { + let existingScope = element._x_dataStack[0]; + Object.entries(scope).forEach(([key, value]) => { + existingScope[key] = value; + }); + } + function closestDataStack(node) { + if (node._x_dataStack) + return node._x_dataStack; + if (node instanceof ShadowRoot) { + return closestDataStack(node.host); + } + if (!node.parentNode) { + return []; + } + return closestDataStack(node.parentNode); + } + function mergeProxies(objects) { + return new Proxy({}, { + ownKeys: () => { + return Array.from(new Set(objects.flatMap((i) => Object.keys(i)))); + }, + has: (target, name) => { + return objects.some((obj) => obj.hasOwnProperty(name)); + }, + get: (target, name) => { + return (objects.find((obj) => obj.hasOwnProperty(name)) || {})[name]; + }, + set: (target, name, value) => { + let closestObjectWithKey = objects.find((obj) => obj.hasOwnProperty(name)); + if (closestObjectWithKey) { + closestObjectWithKey[name] = value; + } else { + objects[objects.length - 1][name] = value; + } + return true; + } + }); + } + + // packages/alpinejs/src/interceptor.js + function initInterceptors(data2) { + let isObject2 = (val) => typeof val === "object" && !Array.isArray(val) && val !== null; + let recurse = (obj, basePath = "") => { + Object.entries(obj).forEach(([key, value]) => { + let path = basePath === "" ? key : `${basePath}.${key}`; + if (typeof value === "object" && value !== null && value._x_interceptor) { + obj[key] = value.initialize(data2, path, key); + } else { + if (isObject2(value) && value !== obj && !(value instanceof Element)) { + recurse(value, path); + } + } + }); + }; + return recurse(data2); + } + function interceptor(callback, mutateObj = () => { + }) { + let obj = { + initialValue: void 0, + _x_interceptor: true, + initialize(data2, path, key) { + return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key); + } + }; + mutateObj(obj); + return (initialValue) => { + if (typeof initialValue === "object" && initialValue !== null && initialValue._x_interceptor) { + let initialize = obj.initialize.bind(obj); + obj.initialize = (data2, path, key) => { + let innerValue = initialValue.initialize(data2, path, key); + obj.initialValue = innerValue; + return initialize(data2, path, key); + }; + } else { + obj.initialValue = initialValue; + } + return obj; + }; + } + function get(obj, path) { + return path.split(".").reduce((carry, segment) => carry[segment], obj); + } + function set(obj, path, value) { + if (typeof path === "string") + path = path.split("."); + if (path.length === 1) + obj[path[0]] = value; + else if (path.length === 0) + throw error; + else { + if (obj[path[0]]) + return set(obj[path[0]], path.slice(1), value); + else { + obj[path[0]] = {}; + return set(obj[path[0]], path.slice(1), value); + } + } + } + + // packages/alpinejs/src/magics.js + var magics = {}; + function magic(name, callback) { + magics[name] = callback; + } + function injectMagics(obj, el) { + Object.entries(magics).forEach(([name, callback]) => { + Object.defineProperty(obj, `$${name}`, { + get() { + return callback(el, {Alpine: alpine_default, interceptor}); + }, + enumerable: false + }); + }); + return obj; + } + + // packages/alpinejs/src/evaluator.js + function evaluate(el, expression, extras = {}) { + let result; + evaluateLater(el, expression)((value) => result = value, extras); + return result; + } + function evaluateLater(...args) { + return theEvaluatorFunction(...args); + } + var theEvaluatorFunction = normalEvaluator; + function setEvaluator(newEvaluator) { + theEvaluatorFunction = newEvaluator; + } + function normalEvaluator(el, expression) { + let overriddenMagics = {}; + injectMagics(overriddenMagics, el); + let dataStack = [overriddenMagics, ...closestDataStack(el)]; + if (typeof expression === "function") { + return generateEvaluatorFromFunction(dataStack, expression); + } + let evaluator = generateEvaluatorFromString(dataStack, expression); + return tryCatch.bind(null, el, expression, evaluator); + } + function generateEvaluatorFromFunction(dataStack, func) { + return (receiver = () => { + }, {scope = {}, params = []} = {}) => { + let result = func.apply(mergeProxies([scope, ...dataStack]), params); + runIfTypeOfFunction(receiver, result); + }; + } + var evaluatorMemo = {}; + function generateFunctionFromString(expression) { + if (evaluatorMemo[expression]) { + return evaluatorMemo[expression]; + } + let AsyncFunction = Object.getPrototypeOf(async function() { + }).constructor; + let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression) || /^(let|const)/.test(expression) ? `(() => { ${expression} })()` : expression; + let func = new AsyncFunction(["__self", "scope"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`); + evaluatorMemo[expression] = func; + return func; + } + function generateEvaluatorFromString(dataStack, expression) { + let func = generateFunctionFromString(expression); + return (receiver = () => { + }, {scope = {}, params = []} = {}) => { + func.result = void 0; + func.finished = false; + let completeScope = mergeProxies([scope, ...dataStack]); + let promise = func(func, completeScope); + if (func.finished) { + runIfTypeOfFunction(receiver, func.result, completeScope, params); + } else { + promise.then((result) => { + runIfTypeOfFunction(receiver, result, completeScope, params); + }); + } + }; + } + function runIfTypeOfFunction(receiver, value, scope, params) { + if (typeof value === "function") { + let result = value.apply(scope, params); + if (result instanceof Promise) { + result.then((i) => runIfTypeOfFunction(receiver, i, scope, params)); + } else { + receiver(result); + } + } else { + receiver(value); + } + } + function tryCatch(el, expression, callback, ...args) { + try { + return callback(...args); + } catch (e) { + console.warn(`Alpine Expression Error: ${e.message} + +Expression: "${expression}" + +`, el); + throw e; + } + } + + // packages/alpinejs/src/directives.js + var prefixAsString = "x-"; + function prefix(subject = "") { + return prefixAsString + subject; + } + function setPrefix(newPrefix) { + prefixAsString = newPrefix; + } + var directiveHandlers = {}; + function directive(name, callback) { + directiveHandlers[name] = callback; + } + function directives(el, attributes, originalAttributeOverride) { + let transformedAttributeMap = {}; + let directives2 = Array.from(attributes).map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority); + return directives2.map((directive2) => { + return getDirectiveHandler(el, directive2); + }); + } + var isDeferringHandlers = false; + var directiveHandlerStack = []; + function deferHandlingDirectives(callback) { + isDeferringHandlers = true; + let flushHandlers = () => { + while (directiveHandlerStack.length) + directiveHandlerStack.shift()(); + }; + let stopDeferring = () => { + isDeferringHandlers = false; + flushHandlers(); + }; + callback(flushHandlers); + stopDeferring(); + } + function getDirectiveHandler(el, directive2) { + let noop = () => { + }; + let handler3 = directiveHandlers[directive2.type] || noop; + let cleanups = []; + let cleanup2 = (callback) => cleanups.push(callback); + let [effect3, cleanupEffect] = elementBoundEffect(el); + cleanups.push(cleanupEffect); + let utilities = { + Alpine: alpine_default, + effect: effect3, + cleanup: cleanup2, + evaluateLater: evaluateLater.bind(evaluateLater, el), + evaluate: evaluate.bind(evaluate, el) + }; + let doCleanup = () => cleanups.forEach((i) => i()); + onAttributeRemoved(el, directive2.original, doCleanup); + let fullHandler = () => { + if (el._x_ignore || el._x_ignoreSelf) + return; + handler3.inline && handler3.inline(el, directive2, utilities); + handler3 = handler3.bind(handler3, el, directive2, utilities); + isDeferringHandlers ? directiveHandlerStack.push(handler3) : handler3(); + }; + fullHandler.runCleanups = doCleanup; + return fullHandler; + } + var startingWith = (subject, replacement) => ({name, value}) => { + if (name.startsWith(subject)) + name = name.replace(subject, replacement); + return {name, value}; + }; + var into = (i) => i; + function toTransformedAttributes(callback) { + return ({name, value}) => { + let {name: newName, value: newValue} = attributeTransformers.reduce((carry, transform) => { + return transform(carry); + }, {name, value}); + if (newName !== name) + callback(newName, name); + return {name: newName, value: newValue}; + }; + } + var attributeTransformers = []; + function mapAttributes(callback) { + attributeTransformers.push(callback); + } + function outNonAlpineAttributes({name}) { + return alpineAttributeRegex().test(name); + } + var alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\b`); + function toParsedDirectives(transformedAttributeMap, originalAttributeOverride) { + return ({name, value}) => { + let typeMatch = name.match(alpineAttributeRegex()); + let valueMatch = name.match(/:([a-zA-Z0-9\-:]+)/); + let modifiers = name.match(/\.[^.\]]+(?=[^\]]*$)/g) || []; + let original = originalAttributeOverride || transformedAttributeMap[name] || name; + return { + type: typeMatch ? typeMatch[1] : null, + value: valueMatch ? valueMatch[1] : null, + modifiers: modifiers.map((i) => i.replace(".", "")), + expression: value, + original + }; + }; + } + var DEFAULT = "DEFAULT"; + var directiveOrder = [ + "ignore", + "ref", + "data", + "bind", + "init", + "for", + "model", + "transition", + "show", + "if", + DEFAULT, + "element" + ]; + function byPriority(a, b) { + let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type; + let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type; + return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB); + } + + // packages/alpinejs/src/utils/dispatch.js + function dispatch(el, name, detail = {}) { + el.dispatchEvent(new CustomEvent(name, { + detail, + bubbles: true, + composed: true, + cancelable: true + })); + } + + // packages/alpinejs/src/nextTick.js + var tickStack = []; + var isHolding = false; + function nextTick(callback) { + tickStack.push(callback); + queueMicrotask(() => { + isHolding || setTimeout(() => { + releaseNextTicks(); + }); + }); + } + function releaseNextTicks() { + isHolding = false; + while (tickStack.length) + tickStack.shift()(); + } + function holdNextTicks() { + isHolding = true; + } + + // packages/alpinejs/src/utils/walk.js + function walk(el, callback) { + if (el instanceof ShadowRoot) { + Array.from(el.children).forEach((el2) => walk(el2, callback)); + return; + } + let skip = false; + callback(el, () => skip = true); + if (skip) + return; + let node = el.firstElementChild; + while (node) { + walk(node, callback, false); + node = node.nextElementSibling; + } + } + + // packages/alpinejs/src/utils/warn.js + function warn(message, ...args) { + console.warn(`Alpine Warning: ${message}`, ...args); + } + + // packages/alpinejs/src/lifecycle.js + function start() { + if (!document.body) + warn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` + + + + + \ No newline at end of file diff --git a/fet2020/templates/blackboard/index.html b/fet2020/templates/blackboard/index.html index b2ceaed0..0bcbd498 100644 --- a/fet2020/templates/blackboard/index.html +++ b/fet2020/templates/blackboard/index.html @@ -1,46 +1,70 @@ -{% extends 'layout.html' %} +{% extends 'base.html' %} + {% block content %} + +
+

Blackboard

-
- {% if request.user.is_authenticated %} -
- +
+
+
+ + {% if bb_info %} + {{ bb_info.content|safe }} + {% endif %} +
- {% if bb_info %} - - {% endif %} + {% if request.user.is_authenticated and bb_info %} + + Info-Text bearbeiten + + {% endif %} +
- {% if bb_empty %} - - {% endif %} -
-
- {% endif %} + {% if job_postings %} +
+
+ {% for job in job_postings %} + {% if not forloop.first %} +
+ {% endif %} -

Blackboard

+ {% include 'blackboard/partials/_show_job_posting.html' %} + {% endfor %} +
- {% if bb_info %} - {{ bb_info.content|safe }} -
- {% endif %} + {% if request.user.is_authenticated %} + + {% endif %} +
-
- {% for job in job_postings %} - {% include 'blackboard/partials/_show_job_posting.html' %} - {% empty %} - {% if bb_empty %} -
- {{ bb_empty.content|safe }} -
+ {% else %} +
+ {% if bb_empty %} +
+ + {{ bb_empty.content|safe }} +
+ {% endif %} + + {% if request.user.is_authenticated %} +
+ + Neuer Eintrag + + {% if bb_empty %} + + Fülltext bearbeiten + + {% endif %} +
+ {% endif %} +
{% endif %} - {% endfor %} -
-
- +
+
{% endblock %} diff --git a/fet2020/templates/blackboard/partials/_show_job_posting.html b/fet2020/templates/blackboard/partials/_show_job_posting.html index 79dc330e..1cea3b08 100644 --- a/fet2020/templates/blackboard/partials/_show_job_posting.html +++ b/fet2020/templates/blackboard/partials/_show_job_posting.html @@ -1,22 +1,13 @@ -
-

{{job.company_name}}

-

{{job.job_name}}
- - {% if job.number_of_hours == 1 %} - Mindestgehalt: {{job.salary}}€ Stundenlohn

- {% else %} - monatliches Mindestgehalt:
- {{job.salary}}€ für {{job.number_of_hours}}h

- {% endif %} - - {# only thumb and name of member #} - - -
-
-

{{job.company_name}}

-

{{job.job_name}}

-
-
-
-
+ +
+

{{ job.company_name }}

+

{{ job.job_name }}

+
+
+

{{ job.salary }}€

+

/ {{ job.number_of_hours }} h

+
+
+ +
+
diff --git a/fet2020/templates/home.html b/fet2020/templates/home.html index 86135d11..d7c24ca6 100644 --- a/fet2020/templates/home.html +++ b/fet2020/templates/home.html @@ -1,103 +1,93 @@ -{% extends 'layout.html' %} +{% extends 'base.html' %} + {% load post_helpers %} {% load static %} + {% block content %} + +
+
+
+

+ Fachschaft
+ Elektrotechnik +

+ +
-
+ +
+
+

Events

-
-
- -

Events

- - {% with post=featured_event %} +
+ {% if featured_event %} + {% with post=featured_event %} {% include 'posts/partials/_article_row.html' %} - {% endwith %} + {% endwith %} + {% endif %} {% for post in featured_meeting %} - {% include 'posts/partials/_meeting_row.html' %} + {% include 'posts/partials/_article_row.html' %} {% endfor %} -
-
-
-
+ + -
-
- {{ tags_list|tags_to_url }} -
+
+ -
-
- {% for post in posts %} - {% include 'posts/partials/_posts_hero.html' %} - {% endfor %} -
+
+

Zuletzt veröffentlicht

+ + {% for post in posts %} + {% include 'posts/partials/_posts_hero.html' %} + {% endfor %} -
- - - - - - - - - {% for post in events %} - {% include 'posts/partials/_date_box.html' %} - {% endfor %} - - - - -
- -
- - Mehr anzeigen - -
+ Mehr anzeigen + +
+
+
+ + + + + +
+ + FET Discord-Server
+ Klicke hier zum Beitreten +
+ +
+ {% endblock %} diff --git a/fet2020/templates/layout.html b/fet2020/templates/layout.html index 53e31fb3..a28d97a3 100644 --- a/fet2020/templates/layout.html +++ b/fet2020/templates/layout.html @@ -4,19 +4,18 @@ - - - -FET - Fachschaft Elektrotechnik - - - - - -{% block galleryheader %} -{% endblock %} -{% block extraheader %} -{% endblock %} + + + + FET - Fachschaft Elektrotechnik + + + + + {% block galleryheader %} + {% endblock %} + {% block extraheader %} + {% endblock %} diff --git a/fet2020/templates/members/index.html b/fet2020/templates/members/index.html index 4ededad0..82907e0b 100644 --- a/fet2020/templates/members/index.html +++ b/fet2020/templates/members/index.html @@ -1,104 +1,154 @@ -{% extends "layout.html" %} +{% extends 'base.html' %} + {% load softhyphen_tags %} +{% load static %} {% block content %} -
+ +
+

Über uns

+
+ - - -
- - {% if description %} -
-
- {{ description|safe }} -
-
- {% endif %} - - - {% if member %} - {% block members_content %} - {% endblock %} - {% endif %} - - - {% if members %} -
-
- {% if fs_info %} - {{ fs_info.content|safe }} - - {% if request.user.is_authenticated %} -
- Fachschaft-Text bearbeiten -
+
+ {% if description %} +
+ {{ description|safe }} +
{% endif %} - {% endif %} -
-
-
- {% include 'members/members_list.html' %} -
- {% endif %} + {% if member %} + + {% block members_content %} + {% endblock %} + {% endif %} - - {% include 'members/jobs_list.html' %} + {% if members %} + + {% if fs_info %} +
+ {{ fs_info.content|safe }} +
-
+ {% if request.user.is_authenticated %} +
+ Fachschaft-Text bearbeiten +
+ {% endif %} + {% endif %} + +
+
+ {% for member in members %} + {% include 'members/partials/_member.html' %} + {% endfor %} +
+
+ {% endif %} + +
+ + {% include 'members/jobs_list.html' %} +
+ + + + + + + + + + + {% endblock %} - - diff --git a/fet2020/templates/members/jobs_list.html b/fet2020/templates/members/jobs_list.html index 85c4cb82..f536e0bc 100644 --- a/fet2020/templates/members/jobs_list.html +++ b/fet2020/templates/members/jobs_list.html @@ -1,20 +1,17 @@ {% regroup job_members by job.name as all_jobmem_list %} {% for jobmem in all_jobmem_list %} - -
- -

{{jobmem.grouper}} #

- -
- +
+ + +

{{jobmem.grouper}}

+
+
{% for jm in jobmem.list %} {% with member=jm.member %} - {% include 'members/partials/_job_membership_grid.html' %} + {% include 'members/partials/_member.html' %} {% endwith %} {% endfor %} -
-
- -{% endfor %} \ No newline at end of file + +{% endfor %} diff --git a/fet2020/templates/members/member.html b/fet2020/templates/members/member.html index fea55124..3ab40949 100644 --- a/fet2020/templates/members/member.html +++ b/fet2020/templates/members/member.html @@ -1,14 +1,12 @@ {% extends 'members/index.html' %} {% block extraheader %} - - - - + + + + {% endblock %} {% block members_content %} -
- {% include 'members/partials/_member_details.html' %} -
+ {% include 'members/partials/_member_details.html' %} {% endblock %} diff --git a/fet2020/templates/members/members_list.html b/fet2020/templates/members/members_list.html index b08e431c..7b428a30 100644 --- a/fet2020/templates/members/members_list.html +++ b/fet2020/templates/members/members_list.html @@ -1,4 +1,3 @@ -
{% for member in members %}
@@ -7,4 +6,3 @@
{% endfor %}
- diff --git a/fet2020/templates/members/partials/_member.html b/fet2020/templates/members/partials/_member.html index de025a5b..c3cb8a52 100644 --- a/fet2020/templates/members/partials/_member.html +++ b/fet2020/templates/members/partials/_member.html @@ -1,9 +1,8 @@ -{# only thumb and name of member #} - - -
-
-

{{member.nickname}}

-
-
-
+
+ + Portraitfoto von {{ member.firstname }} +
+

{{ member.firstname }} {{ member.surname }}

+
+
+
diff --git a/fet2020/templates/members/partials/_member_details.html b/fet2020/templates/members/partials/_member_details.html index 7d39bfde..c3c8bc6f 100644 --- a/fet2020/templates/members/partials/_member_details.html +++ b/fet2020/templates/members/partials/_member_details.html @@ -1,26 +1,71 @@ {# This template shows one member and all the details (that are ment for public) including a list of current jobs #} {% load softhyphen_tags %} +{% load static %} -
-
- -
-
- {% if request.user.is_authenticated %} - Profil bearbeiten -
- {% endif %} -

{{ member.firstname }} {{ member.surname }}

-

Spitzname: {{ member.nickname }}
- Mailaccount: {{ member.mailaccount }}
-

- {{ member.description|softhyphen|safe }} -

+
+ + Portraitfoto von {{ member.firstname }} {{ member.surname }} +
+

{{ member.firstname }} {{ member.surname }}

+
+ Spitzname: {{ member.nickname }}
+ Mailaccount: {{ member.mailaccount }}
+
+
+ {{ member.description|softhyphen|safe }} +
{% if jobs %} - Ehrenamtliche Tätigkeiten:
- {% for jobm in jobs %} - {{ jobm.job.name }}: {{ jobm.job_start|date }} - {{ jobm.job_end|date }}
- {% endfor %} +

Ehrenamtliche Tätigkeiten: + +

+ +
    + {% for jobm in jobs %} +
  • + {{ jobm.job.name }}: + {{ jobm.job_start|date }} - +
  • + {% endfor %} +
+
    + {% for jobm in jobs %} +
  • + {{ jobm.job.name }}: + {{ jobm.job_start|date }} - +
  • + {% endfor %} +
{% endif %}
-
+ + + + + diff --git a/fet2020/templates/posts/index.html b/fet2020/templates/posts/index.html index 52649886..fdcecef8 100644 --- a/fet2020/templates/posts/index.html +++ b/fet2020/templates/posts/index.html @@ -1,7 +1,132 @@ -{% extends 'layout.html' %} +{% extends 'base.html' %} + {% load post_helpers %} {% block content %} + +
+

News

+
+ + +
+ {% if compact_view %} + {% for post in posts %} + {% include 'posts/partials/_posts_hero_compact.html' %} + {% endfor %} + {% else %} + {% for post in posts %} + {% include 'posts/partials/_posts_hero.html' %} + {% endfor %} + {% endif %} +
+
+
+
@@ -37,21 +162,5 @@
- -
-
- - {% if compact_view %} - {% for post in posts %} - {% include 'posts/partials/_posts_hero_compact.html' %} - {% endfor %} - {% else %} - {% for post in posts %} - {% include 'posts/partials/_posts_hero.html' %} - {% endfor %} - {% endif %} - -
-
{% endblock %} diff --git a/fet2020/templates/posts/partials/_article_row.html b/fet2020/templates/posts/partials/_article_row.html index 9c6fe1a1..2a664016 100644 --- a/fet2020/templates/posts/partials/_article_row.html +++ b/fet2020/templates/posts/partials/_article_row.html @@ -1,12 +1,7 @@ - -
-
-

{{post.title}}

- {% if post.subtitle is not None %} -

{{post.subtitle}}

- {% endif %} - - -
-
+
+

{{ post.title }}

+

+ + {{ post.event_start|date }} · {{ post.event_start|time }} Uhr +

diff --git a/fet2020/templates/posts/partials/_date_box.html b/fet2020/templates/posts/partials/_date_box.html index 21ecc99a..28023bb0 100644 --- a/fet2020/templates/posts/partials/_date_box.html +++ b/fet2020/templates/posts/partials/_date_box.html @@ -1,11 +1,7 @@ - -
- - - {{post.event_start|date:"d"}} - {{post.event_start|date:"M"}} - - - {{post.title}} + +
+ {{ post.event_start|date:"d" }} + {{ post.event_start|date:"M" }}
+

{{ post.title }}

diff --git a/fet2020/templates/posts/partials/_meeting_row.html b/fet2020/templates/posts/partials/_meeting_row.html index c3f164e4..e467eeff 100644 --- a/fet2020/templates/posts/partials/_meeting_row.html +++ b/fet2020/templates/posts/partials/_meeting_row.html @@ -1,11 +1,9 @@ - -
-
-

{{post.title}}

- {% if post.subtitle is not None %} -

{{post.subtitle}}

- {% endif %} - -
-
-
+ diff --git a/fet2020/templates/posts/partials/_posts_hero.html b/fet2020/templates/posts/partials/_posts_hero.html index ced29997..6356cc18 100644 --- a/fet2020/templates/posts/partials/_posts_hero.html +++ b/fet2020/templates/posts/partials/_posts_hero.html @@ -1,9 +1,22 @@ - -
-
-

{{ post.title | safe }}

-

{{ post.subtitle|default_if_none:" " }}

-

{{ post.date|date:"d. F Y" }}

+
diff --git a/fet2020/templates/posts/partials/_posts_hero_compact.html b/fet2020/templates/posts/partials/_posts_hero_compact.html index 7fa267f4..d81d1aef 100644 --- a/fet2020/templates/posts/partials/_posts_hero_compact.html +++ b/fet2020/templates/posts/partials/_posts_hero_compact.html @@ -1,11 +1,13 @@ - -
- - +

{{ post.title | safe | truncatechars:60 }}

+ + diff --git a/fet2020/templates/posts/show.html b/fet2020/templates/posts/show.html index feb7b173..877575ba 100644 --- a/fet2020/templates/posts/show.html +++ b/fet2020/templates/posts/show.html @@ -1,155 +1,245 @@ -{% extends "layout.html" %} +{% extends 'base.html' %} + {% load post_helpers %} {% load admin_urls %} {% block extraheader %} - - - - + + + + {% endblock %} {% block content %} -
-
-
- + +
+ + +
+
+ +

{{ post.title|tags_to_url }}

+
-
-

{{ post.title|tags_to_url }}

-
+
-
- - {{ post.subtitle|default_if_none:" "|tags_to_url }} - - {% if author_image and author %} - - {% elif post.author %} - - {% else %} - +
+ +
+ + {% if post.post_type != 'N' %} + {% endif %} -
-
-
-
-
-
-
- {% for tag in post.get_tagnames %} - {{ tag|tags_to_url }} - {% endfor %} -
+
+
+
+
+ +
+ - {% if post.has_agenda %} -

Agenda #

- {{ post.agenda_html|safe }} -
- {% elif post.body %} - {{ post.body|safe|add_internal_links|tags_to_url }} -
- {% endif %} + {% if request.user.is_authenticated %} +
- {% if request.user.is_authenticated and post.has_protocol %} -

Protokoll #

- {{ post.protocol_html|safe }} -
- {% endif %} + {% if post.has_agenda %} + Agenda + {% if filename_agenda %} + + + + {% endif %} +
+ {% endif %} -
-
- Nächster Artikel
+ {% if post.has_protocol %} + Protokoll + {% if filename_protocol %} + + + + {% endif %} +
+
+ {% endif %} + + {% endif %} + + {% if post.has_agenda %} +

Agenda

+ {{ post.agenda_html|safe }} +
+ {% elif post.body %} + {{ post.body|safe|add_internal_links|tags_to_url }} + {% endif %} + + {% if request.user.is_authenticated and post.has_protocol %} +

Protokoll

+ {{ post.protocol_html|safe }} + {% endif %} +
+ + {% if files %} +
+ Dokumente: + + + + {% endif %} + +
+
+

Termindetails:

+
    +
  • Start: {{ post.event_start|date }} um {{ post.event_start|time }} Uhr
  • +
  • Ende: {{ post.event_end|date }} um {{ post.event_end|time }} Uhr
  • +
+
+
+ +
{% if request.user.is_authenticated %} -
- - {% if post.has_agenda %} - Agenda - {% if filename_agenda %} - - - - {% endif %} -
- {% endif %} - - {% if post.has_protocol %} - Protokoll - {% if filename_protocol %} - - - - {% endif %} -
-
- {% endif %} - {% if post.post_type == 'N' %} - News bearbeiten + + Artikel bearbeiten + {% elif post.post_type == 'E' %} - Event bearbeiten + + Event bearbeiten + {% elif post.post_type == 'F' %} - FET Sitzung bearbeiten + + FET Sitzung bearbeiten + {% endif %} - {% endif %} +
- {% if post.event_start %} -
- Start: {{ post.event_start|date:"d. F Y" }} {{ post.event_start|time:"H:i" }}
- {% endif %} - {% if post.event_end %} - Ende: {{ post.event_end|date:"d. F Y" }} {{ post.event_end|time:"H:i" }}
- {% endif %} - - {% if post.event_place %} - Ort: {{ post.event_place }} - {% endif %} - - {% if post.event_start %} - {% include 'posts/partials/_date_box.html' %} - {% endif %} - - {% if files %} -
- Dokumente: - - - - {% endif %} - -
- -
- -
- -
- {% for post in related_posts %} -
- {% include 'posts/partials/_posts_hero.html' %} -
- {% endfor %} -
-
+ + {% endif %} + {% endblock %}