mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-30 00:00:13 +01:00
template that forces brand designer to make changes
This commit is contained in:
parent
ce3037e4ce
commit
eaf1d13967
5 changed files with 336 additions and 1 deletions
109
public/template_logo.svg
Normal file
109
public/template_logo.svg
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="400"
|
||||
inkscape:cy="560"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1853"
|
||||
inkscape:window-height="921"
|
||||
inkscape:window-x="67"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<ellipse
|
||||
id="path3713"
|
||||
cx="107.34524"
|
||||
cy="152.6131"
|
||||
rx="93.738091"
|
||||
ry="90.714287"
|
||||
style="fill:#ffb380;stroke-width:0.46149299" />
|
||||
<path
|
||||
style="fill:#d45500;stroke-width:0.46149299"
|
||||
id="path3717"
|
||||
sodipodi:type="arc"
|
||||
sodipodi:cx="108.74432"
|
||||
sodipodi:cy="175.60233"
|
||||
sodipodi:rx="30.779675"
|
||||
sodipodi:ry="24.231895"
|
||||
sodipodi:start="0"
|
||||
sodipodi:end="0.17905702"
|
||||
sodipodi:open="true"
|
||||
d="m 139.524,175.60233 a 30.779675,24.231895 0 0 1 -0.4921,4.31574" />
|
||||
<ellipse
|
||||
style="fill:#d45500;stroke-width:0.46149299"
|
||||
id="path3722"
|
||||
cx="108.74432"
|
||||
cy="178.08763"
|
||||
rx="33.577824"
|
||||
ry="26.71722" />
|
||||
<ellipse
|
||||
style="fill:#008080;stroke-width:0.46149299"
|
||||
id="path3729"
|
||||
cx="76.565552"
|
||||
cy="128.38118"
|
||||
rx="9.7935324"
|
||||
ry="10.562623" />
|
||||
<ellipse
|
||||
style="fill:#008080;stroke-width:0.46149299"
|
||||
id="path3729-3"
|
||||
cx="135.32677"
|
||||
cy="127.75985"
|
||||
rx="9.7935324"
|
||||
ry="10.562623" />
|
||||
<ellipse
|
||||
style="fill:#552200;stroke-width:0.46149299"
|
||||
id="path3748"
|
||||
cx="96.152611"
|
||||
cy="183.0583"
|
||||
rx="4.197228"
|
||||
ry="5.5919766" />
|
||||
<ellipse
|
||||
style="fill:#552200;stroke-width:0.46149299"
|
||||
id="path3748-6"
|
||||
cx="117.1388"
|
||||
cy="183.67961"
|
||||
rx="4.197228"
|
||||
ry="5.5919766" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
|
@ -21,6 +21,9 @@ import villasweb_values from './villasweb/villasweb-values';
|
|||
import { slew_home, slew_welcome } from './slew/slew-functions';
|
||||
import slew_values from './slew/slew-values';
|
||||
|
||||
import { template_welcome, template_home, template_footer } from './template/template-functions';
|
||||
import template_values from './template/template-values';
|
||||
|
||||
class Branding {
|
||||
constructor(chosenbrand) {
|
||||
if (Branding.branding) {
|
||||
|
@ -43,6 +46,9 @@ class Branding {
|
|||
case 'slew':
|
||||
this.values = slew_values;
|
||||
break;
|
||||
case 'template':
|
||||
this.values = template_values;
|
||||
break;
|
||||
default:
|
||||
console.error("Branding '" + this.brand + "' not available, will use 'villasweb' branding");
|
||||
this.brand = 'villasweb';
|
||||
|
@ -60,6 +66,9 @@ class Branding {
|
|||
case 'slew':
|
||||
homepage = slew_home();
|
||||
break;
|
||||
case 'template':
|
||||
homepage = template_home();
|
||||
break;
|
||||
default:
|
||||
homepage = villasweb_home(this.getTitle(), username, userid, role);
|
||||
break;
|
||||
|
@ -68,7 +77,16 @@ class Branding {
|
|||
}
|
||||
|
||||
getFooter() {
|
||||
return villasweb_footer();
|
||||
var footer = '';
|
||||
switch(this.brand) {
|
||||
case 'template':
|
||||
footer = template_footer();
|
||||
break;
|
||||
default:
|
||||
footer = villasweb_footer();
|
||||
break;
|
||||
}
|
||||
return footer;
|
||||
}
|
||||
|
||||
getWelcome() {
|
||||
|
@ -77,6 +95,9 @@ class Branding {
|
|||
case 'slew':
|
||||
welcome = slew_welcome();
|
||||
break;
|
||||
case 'template':
|
||||
welcome = template_welcome();
|
||||
break;
|
||||
default:
|
||||
welcome = this.defaultWelcome();
|
||||
break;
|
||||
|
|
109
src/branding/template/img/template_logo.svg
Normal file
109
src/branding/template/img/template_logo.svg
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="400"
|
||||
inkscape:cy="560"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1853"
|
||||
inkscape:window-height="921"
|
||||
inkscape:window-x="67"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<ellipse
|
||||
id="path3713"
|
||||
cx="107.34524"
|
||||
cy="152.6131"
|
||||
rx="93.738091"
|
||||
ry="90.714287"
|
||||
style="fill:#ffb380;stroke-width:0.46149299" />
|
||||
<path
|
||||
style="fill:#d45500;stroke-width:0.46149299"
|
||||
id="path3717"
|
||||
sodipodi:type="arc"
|
||||
sodipodi:cx="108.74432"
|
||||
sodipodi:cy="175.60233"
|
||||
sodipodi:rx="30.779675"
|
||||
sodipodi:ry="24.231895"
|
||||
sodipodi:start="0"
|
||||
sodipodi:end="0.17905702"
|
||||
sodipodi:open="true"
|
||||
d="m 139.524,175.60233 a 30.779675,24.231895 0 0 1 -0.4921,4.31574" />
|
||||
<ellipse
|
||||
style="fill:#d45500;stroke-width:0.46149299"
|
||||
id="path3722"
|
||||
cx="108.74432"
|
||||
cy="178.08763"
|
||||
rx="33.577824"
|
||||
ry="26.71722" />
|
||||
<ellipse
|
||||
style="fill:#008080;stroke-width:0.46149299"
|
||||
id="path3729"
|
||||
cx="76.565552"
|
||||
cy="128.38118"
|
||||
rx="9.7935324"
|
||||
ry="10.562623" />
|
||||
<ellipse
|
||||
style="fill:#008080;stroke-width:0.46149299"
|
||||
id="path3729-3"
|
||||
cx="135.32677"
|
||||
cy="127.75985"
|
||||
rx="9.7935324"
|
||||
ry="10.562623" />
|
||||
<ellipse
|
||||
style="fill:#552200;stroke-width:0.46149299"
|
||||
id="path3748"
|
||||
cx="96.152611"
|
||||
cy="183.0583"
|
||||
rx="4.197228"
|
||||
ry="5.5919766" />
|
||||
<ellipse
|
||||
style="fill:#552200;stroke-width:0.46149299"
|
||||
id="path3748-6"
|
||||
cx="117.1388"
|
||||
cy="183.67961"
|
||||
rx="4.197228"
|
||||
ry="5.5919766" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
52
src/branding/template/template-functions.js
Normal file
52
src/branding/template/template-functions.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* This file is part of VILLASweb.
|
||||
*
|
||||
* VILLASweb is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* VILLASweb is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with VILLASweb. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
import React from 'react';
|
||||
|
||||
|
||||
export function template_home() {
|
||||
return (
|
||||
<div className="home-container">
|
||||
<img style={{ height: 120, float: 'right' }} src={require('./img/template_logo.svg').default} alt="Template Logo" />
|
||||
<h1>Home</h1>
|
||||
<p>
|
||||
Welcome to <b>BRAND</b>!
|
||||
</p>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
|
||||
labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
|
||||
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
|
||||
et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
|
||||
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
|
||||
</div>)
|
||||
}
|
||||
|
||||
export function template_welcome() {
|
||||
return (
|
||||
<div >
|
||||
<h1>Welcome!</h1>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
|
||||
labore et dolore magna aliquyam erat, sed diam voluptua.</p>
|
||||
</div>)
|
||||
}
|
||||
|
||||
export function template_footer() {
|
||||
return (
|
||||
<footer className="app-footer">
|
||||
<p>HELLO WORLD, THIS IS MY FOOTER!</p>
|
||||
</footer>)
|
||||
}
|
44
src/branding/template/template-values.js
Normal file
44
src/branding/template/template-values.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* This file is part of VILLASweb.
|
||||
*
|
||||
* VILLASweb is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* VILLASweb is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with VILLASweb. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
const template_values = {
|
||||
title: 'Template',
|
||||
subtitle: 'change me!',
|
||||
icon: "template_logo.svg",
|
||||
pages: {
|
||||
home: true,
|
||||
scenarios: true,
|
||||
infrastructure: true,
|
||||
users: true,
|
||||
account: true,
|
||||
api: true
|
||||
},
|
||||
links: {
|
||||
"Google": "https://www.google.com/",
|
||||
"StackOverFlow": "https://stackoverflow.com/"
|
||||
},
|
||||
style: {
|
||||
background: 'rgba(50,30,90, 0.6)',
|
||||
highlights: 'rgba(0,230,5, 0.75)',
|
||||
maincolor: 'rgba(255,0,0, 1)',
|
||||
secondarytext: 'rgba(0,0,100, 0.8)',
|
||||
font: "16px Comic Sans, sans-serif",
|
||||
borderradius: "60px"
|
||||
}
|
||||
}
|
||||
|
||||
export default template_values;
|
Loading…
Add table
Reference in a new issue