Commit 034ace03 authored by Athanasios's avatar Athanasios
Browse files

Add project logo

parent afc5bcc3
Pipeline #2699 passed with stages
in 25 seconds
...@@ -75,4 +75,17 @@ ...@@ -75,4 +75,17 @@
} }
}
@media only screen and (max-width : 400px) {
#projectlogo img{
width: 50px;
}
#projectname {
font-size: 12px;
}
} }
\ No newline at end of file
...@@ -167,6 +167,16 @@ nav a:hover { ...@@ -167,6 +167,16 @@ nav a:hover {
margin: auto; margin: auto;
} }
#projectlogo {
text-align: center;
margin-top: auto;
}
#projectlogo img{
max-width: 300px;
width: 16%;
}
#projectname { #projectname {
font-weight: 700; font-weight: 700;
color: #fff; color: #fff;
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
</div> </div>
<nav></nav> <nav></nav>
</div> </div>
<div id='projectname'></div> <div id="projectlogo"></div>
<div id="projectname"></div>
</header> </header>
<div class="content"> <div class="content">
......
let portal=function(){document.querySelector("title").innerText="M4_LAB";let e=document.createElement("a");e.href="https://hft-stuttgart.de",e.innerHTML=`<img src='${BASE_URL}/assets/images/hft_logo.svg'/>`,document.getElementById("logo").appendChild(e);let t=(e,t,l={},a=null)=>{let i=document.createElement(e);for(cls of t)i.classList.add(cls);return Object.keys(l).forEach(e=>{i.setAttribute(e,l[e])}),a&&(i.innerText=a),i},l=e=>{let l=t("div",["participant-social"]);for(i of e){let e=t("a",["social"],{title:i.agent,href:i.profile}),a=t("img",[],{src:i.icon});e.appendChild(a),l.appendChild(e)}return l},a={projectName:()=>{document.querySelector("#projectname").innerHTML=settings.projectName},menu:()=>{let e=document.createElement("ul");for(m of settings.menu){let l=document.createElement("li"),a=t("a",[],{href:m.link},m.menuText);l.appendChild(a),e.appendChild(l)}let l=document.querySelector("nav");l.appendChild(e);let a=document.querySelector(".hamburger");a.style.display="flex";let i=document.querySelector("header");a.addEventListener("click",()=>{a.classList.toggle("slide-hamburger"),l.classList.toggle("slide-nav"),i.classList.toggle("overflow-visible")})},participants:()=>{let e=document.querySelector(".footer"),a=t("ul",["footer-participants-container"]);for(p of settings.participants){let e=t("li",["participant"]),i=t("div",["participant-avatar"]),n=t("img",[],{src:p.avatar}),r=t("div",[],{},p.name),o=t("div",[],{},p.email);i.appendChild(n),e.appendChild(i),e.appendChild(r),e.appendChild(o),e.appendChild(l(p.social)),a.appendChild(e)}e.appendChild(a)},footerLogos:()=>{let e=document.querySelector(".footer"),l=t("ul",["footer-logo-container"]);for(fl of settings.footerLogos){let e=t("li",["footer-logo"]),a=t("a",[],{title:fl.title,href:fl.href}),i=t("img",[],{src:fl.logo});a.appendChild(i),e.appendChild(a),l.appendChild(e)}e.appendChild(l)}};for(swt of settings.switches)swt.state==ON&&a[swt.name]();let n={legal:()=>{let e=document.querySelector(".legal"),l=t("div",["legal-text-container"]),a=t("div",["legal-text"],{},"Hochschule für Technik Stuttgart"),i=t("a",["legal-text"],{href:"https://www.hft-stuttgart.de/impressum"},"Impressum"),n=t("a",["legal-text"],{href:"https://www.hft-stuttgart.de/datenschutz"},"Datenschutz"),r=t("div",["top"],{}),o=t("a",[],{href:"#header",title:"Top"}),d=t("img",[],{src:`${BASE_URL}/assets/images/top.png`});o.appendChild(d),r.appendChild(o),l.appendChild(a),l.appendChild(i),l.appendChild(n),e.appendChild(l),e.appendChild(r)}};Object.keys(n).forEach(e=>{n[e]()})}(); let portal=function(){document.querySelector("title").innerText="M4_LAB";let e=(e,t,l={},a=null)=>{let i=document.createElement(e);for(cls of t)i.classList.add(cls);return Object.keys(l).forEach(e=>{i.setAttribute(e,l[e])}),a&&(i.innerText=a),i},t={hftLogo:()=>{let t=document.querySelector("#logo"),l=e("a",[],{href:"https://hft-stuttgart.de",title:"hft-stuttgart.de"}),a=e("img",[],{src:`${BASE_URL}/assets/images/hft_logo.svg`});l.appendChild(a),t.appendChild(l)},legal:()=>{let t=document.querySelector(".legal"),l=e("div",["legal-text-container"]),a=e("div",["legal-text"],{},"Hochschule für Technik Stuttgart"),i=e("a",["legal-text"],{href:"https://www.hft-stuttgart.de/impressum"},"Impressum"),o=e("a",["legal-text"],{href:"https://www.hft-stuttgart.de/datenschutz"},"Datenschutz"),r=e("div",["top"],{}),n=e("a",[],{href:"#header",title:"Top"}),p=e("img",[],{src:`${BASE_URL}/assets/images/top.png`});n.appendChild(p),r.appendChild(n),l.appendChild(a),l.appendChild(i),l.appendChild(o),t.appendChild(l),t.appendChild(r)}};Object.keys(t).forEach(e=>{t[e]()});let l=t=>{let l=e("div",["participant-social"]);for(i of t){let t=e("a",["social"],{title:i.agent,href:i.profile}),a=e("img",[],{src:i.icon});t.appendChild(a),l.appendChild(t)}return l},a={projectLogo:()=>{let t=e("img",[],{src:settings.projectLogo});document.querySelector("#projectlogo").append(t)},projectName:()=>{document.querySelector("#projectname").innerHTML=settings.projectName},menu:()=>{let t=document.createElement("ul");for(m of settings.menu){let l=document.createElement("li"),a=e("a",[],{href:m.link},m.menuText);l.appendChild(a),t.appendChild(l)}let l=document.querySelector("nav");l.appendChild(t);let a=document.querySelector(".hamburger");a.style.display="flex";let i=document.querySelector("header");a.addEventListener("click",()=>{a.classList.toggle("slide-hamburger"),l.classList.toggle("slide-nav"),i.classList.toggle("overflow-visible")})},participants:()=>{let t=document.querySelector(".footer"),a=e("ul",["footer-participants-container"]);for(p of settings.participants){let t=e("li",["participant"]),i=e("div",["participant-avatar"]),o=e("img",[],{src:p.avatar}),r=e("div",[],{},p.name),n=e("div",[],{},p.email);i.appendChild(o),t.appendChild(i),t.appendChild(r),t.appendChild(n),t.appendChild(l(p.social)),a.appendChild(t)}t.appendChild(a)},footerLogos:()=>{let t=document.querySelector(".footer"),l=e("ul",["footer-logo-container"]);for(fl of settings.footerLogos){let t=e("li",["footer-logo"]),a=e("a",[],{title:fl.title,href:fl.href}),i=e("img",[],{src:fl.logo});a.appendChild(i),t.appendChild(a),l.appendChild(t)}t.appendChild(l)}};for(swt of settings.switches)swt.state==ON&&a[swt.name]()}();
\ No newline at end of file \ No newline at end of file
...@@ -27,6 +27,10 @@ const DEFAULT = { ...@@ -27,6 +27,10 @@ const DEFAULT = {
let settings = { let settings = {
switches: [ switches: [
{
name: "projectLogo",
state: OFF
},
{ {
name: "projectName", name: "projectName",
state: OFF state: OFF
...@@ -45,6 +49,8 @@ let settings = { ...@@ -45,6 +49,8 @@ let settings = {
} }
], ],
projectLogo: `${BASE_URL}/assets/logos/M4_LAB_tr.png`,
projectName: "M4_LAB Page Demo", projectName: "M4_LAB Page Demo",
menu: [ menu: [
...@@ -53,8 +59,8 @@ let settings = { ...@@ -53,8 +59,8 @@ let settings = {
link: `${BASE_URL}/home/` link: `${BASE_URL}/home/`
}, },
{ {
menuText: "bio", menuText: "results",
link: `${BASE_URL}/bio/` link: `${BASE_URL}/results/`
}, },
{ {
menuText: "demo", menuText: "demo",
...@@ -64,9 +70,9 @@ let settings = { ...@@ -64,9 +70,9 @@ let settings = {
participants: [ participants: [
{ {
name: "Charlotte Doe", name: "John Doe",
avatar: `${BASE_URL}/assets/images/charlotte.jpg`, avatar: DEFAULT.avatar,
email: "charlotte.doe@lalaland.com", email: "john.doe@lalaland.com",
social: [ social: [
{ {
agent: "twitter", agent: "twitter",
...@@ -86,7 +92,29 @@ let settings = { ...@@ -86,7 +92,29 @@ let settings = {
{ {
agent: "webpage", agent: "webpage",
icon: DEFAULT.social.webpage.icon, icon: DEFAULT.social.webpage.icon,
profile: "http://websiteexample.com" profile: "https://johndoe.com"
}
]
},
{
name: "Charlotte Doe",
avatar: `${BASE_URL}/assets/images/charlotte.jpg`,
email: "charlotte.doe@lalaland.com",
social: [
{
agent: "twitter",
icon: DEFAULT.social.twitter.icon,
profile: DEFAULT.social.twitter.profile
},
{
agent: "facebook",
icon: DEFAULT.social.facebook.icon,
profile: DEFAULT.social.facebook.profile
},
{
agent: "linkedin",
icon: DEFAULT.social.linkedin.icon,
profile: DEFAULT.social.linkedin.profile
} }
] ]
} }
...@@ -114,4 +142,4 @@ let settings = { ...@@ -114,4 +142,4 @@ let settings = {
title: "Die Gemeinsame Wissenschaftskonferenz" title: "Die Gemeinsame Wissenschaftskonferenz"
} }
] ]
}; };
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment