newInformation.pug 7.75 KB
Newer Older
Rosanny Sihombing's avatar
Rosanny Sihombing committed
1
2
3
4
5
6
doctype html
html(lang="de")
  head
    title= "Setup a new website"
    meta(charset="UTF-8")
    meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
7
8
    link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
    link(rel="stylesheet", type="text/css", href="/css/m4lab.css")
Athanasios's avatar
Athanasios committed
9
    link(rel="stylesheet", type="text/css", href="/css/m4lab-mobile.css")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
10
    link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
11
    script(src="https://unpkg.com/vue@3")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
12
  body
Rosanny Sihombing's avatar
Rosanny Sihombing committed
13
    div(id="app" class="container")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
14
15
16
17
18
19
20
        div(class="row min-vh-100 flex-column flex-md-row")
            aside(class="col-12 col-md-3 p-0 flex-shrink-1")
                nav(class="navbar navbar-expand flex-md-column flex-row align-items-start py-2")
                    div(class="collapse navbar-collapse")
                        ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between")
                            li(class="nav-item")
                                a(class="nav-link pl-0 text-nowrap" href="/account/")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
21
                                    span(class="font-weight-bold" style="color:black;") #{user.firstName} #{user.lastName}
Rosanny Sihombing's avatar
Rosanny Sihombing committed
22
23
24
25
                            li(class="nav-item")
                                a(class="nav-link pl-0" href="/account/profile")
                                    i(class="fa fa-user fa-fw")
                                    span(class="d-none d-md-inline") Benutzerprofil
Rosanny Sihombing's avatar
Rosanny Sihombing committed
26
                            if user.isM4labIdp
Rosanny Sihombing's avatar
Rosanny Sihombing committed
27
28
29
30
31
32
33
34
35
                                li(class="nav-item")
                                    a(class="nav-link pl-0" href="/account/security")
                                        i(class="fa fa-lock fa-fw")
                                        span(class="d-none d-md-inline") Sicherheitseinstellungen
                            li(class="nav-item")
                                a(class="nav-link pl-0" href="/logout" style="color:red;")
                                    i(class="fa fa-sign-out-alt fa-fw")
                                    span(class="d-none d-md-inline") Logout
            main(class="col bg-faded py-3 flex-grow-1")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
36
37
38
                nav(aria-label="breadcrumb")
                    ol(class="breadcrumb")
                        li(class="breadcrumb-item")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
39
                            a(href="/account/") Konto
Rosanny Sihombing's avatar
Rosanny Sihombing committed
40
41
42
43
                        li(class="breadcrumb-item")
                            a(href="/account/services") Projekte und Dienste
                        li(class="breadcrumb-item active" aria-current="page") Neue Projektinformation

Rosanny Sihombing's avatar
Rosanny Sihombing committed
44
45
46
47
48
49
                if flash.success
                    div.alert.alert-success.alert-dismissible #{flash.success}
                        a(class="close", href="#", data-dismiss="alert", aria-label="close") ×
                if flash.error
                    div.alert.alert-danger.alert-dismissible.fade.show #{flash.error}
                        a(class="close", href="#", data-dismiss="alert", aria-label="close") ×
Rosanny Sihombing's avatar
Rosanny Sihombing committed
50

Rosanny Sihombing's avatar
Rosanny Sihombing committed
51
                h3(class="pb-2") Neue Projektinformation
Rosanny Sihombing's avatar
Rosanny Sihombing committed
52
                div(class="mx-4")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
53
54
                    h4(class="pb-1") Schritt 1: Setup
                    p Bitte füllen Sie alle Felder aus
Rosanny Sihombing's avatar
Rosanny Sihombing committed
55
                    form(method="POST", encType="multipart/form-data")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
56
57
58
59
60
61
62
63
                        div(class='form-group row')
                            label(for="template", class="col-sm-2") Template
                            div(class="col-sm-8")
                                select#templateSelector(name="template", class="form-control")
                                    option(value="generic") generic
                                    option(value="simple_raw") simple_raw
                                    option(value="simple_thesis") simple_thesis
                                | <span id="templateExample" class="font-italic font-weight-light"><small>See the demo: <a href="https://transfer.hft-stuttgart.de/pages/athanasios.koukofikis/mygeneric/home/" target="_blank">generic</a>, <a href="https://transfer.hft-stuttgart.de/pages/athanasios.koukofikis/myraw/home/" target="_blank">simple_raw</a>, <a href="https://transfer.hft-stuttgart.de/pages/athanasios.koukofikis/mythesis/home/" target="_blank">simple_thesis</a></small></span>
Rosanny Sihombing's avatar
Rosanny Sihombing committed
64
                        div(class='form-group row')
Rosanny Sihombing's avatar
Rosanny Sihombing committed
65
66
                            label(for="name", class="col-sm-2") Name
                            div(class="col-sm-8")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
67
68
69
70
                                input#name(name="name", type="text", :value="websiteName", @input="onInput", class="form-control", placeholder="Name", maxlength="75" required)
                                p(v-if="websiteName" class="font-italic font-weight-light")
                                    <small>Ihre Webseite wird unter folgender URL veröffentlicht: <strong>https://transfer.hft-stuttgart.de/pages/#{gitlabUsername}/{{ websiteURL }}/home</strong></small>
                                p(v-else)
Rosanny Sihombing's avatar
Rosanny Sihombing committed
71
                        div(class="form-group row")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
72
                            label(for="description", class="col-sm-2") Beschreibung
Rosanny Sihombing's avatar
Rosanny Sihombing committed
73
                            div(class="col-sm-8")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
74
                                textarea#description(name="description", type="text", class="form-control", placeholder="Beschreibung", maxlength="500" required)
Rosanny Sihombing's avatar
Rosanny Sihombing committed
75
                        div(class="form-group row")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
76
                            label(for="logo", class="col-sm-2") Projektlogo
Rosanny Sihombing's avatar
Rosanny Sihombing committed
77
                            div(class="col-sm-8")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
78
                                div(class="form-group row px-4")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
79
                                    - let defaultLogo = "/img/footer/M4_LAB_LOGO_Graustufen.png"
Rosanny Sihombing's avatar
Rosanny Sihombing committed
80
81
82
                                    img(src=defaultLogo, width="100" height="100")
                                div(class="form-group row px-3")
                                    input#logo(name="logo", class="form-control-file", type="file")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
83
                                p <small>(Max file size is 80 KB.)</small>
Rosanny Sihombing's avatar
Rosanny Sihombing committed
84
                        input(type="submit", class="btn btn-primary", value="Senden")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
85
                hr
Rosanny Sihombing's avatar
Rosanny Sihombing committed
86
                div(class="mx-4", style="color: gray;")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
87
                    h4(class="pb-1") Schritt 2: Dateneingabe
Rosanny Sihombing's avatar
Rosanny Sihombing committed
88
                    p Bitte stellen Sie sicher in GitLab, dass sie Folgendes abgeschlossen haben, bevor Sie Ihre Webseite veröffentlichen:
Rosanny Sihombing's avatar
Rosanny Sihombing committed
89
                    ol
Rosanny Sihombing's avatar
Rosanny Sihombing committed
90
91
                        li Bearbeiten Sie ihre <i>index.html</i>
                        li Anpassen der Einstellungen in <i>settings.js</i>
Rosanny Sihombing's avatar
Rosanny Sihombing committed
92
93
94
95

    // jQuery
    script(src="https://code.jquery.com/jquery-3.3.1.min.js")
    script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
96
97
    // jquery-loading-overlay
    script(src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
98
99
100
    // Bootstrap
    script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
    // M4_LAB
Rosanny Sihombing's avatar
Rosanny Sihombing committed
101
    script(src="/js/headfoot.js")
Athanasios's avatar
Athanasios committed
102
    script(src="/js/mobile.js")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
103
    script.
Rosanny Sihombing's avatar
Rosanny Sihombing committed
104
105
        $("form").submit(function(){
            $.LoadingOverlay("show")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
        });
    script.
        const { createApp } = Vue
        createApp({
            data() {
                return {
                    websiteName: '',
                    websiteURL: ''
                }
            },
            methods: {
                onInput(e) {
                    this.websiteName = e.target.value
                    this.websiteURL = this.websiteName.toLowerCase().replace(/\s/g, '-')
                }
            }
        }).mount('#app')