Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
open-source
MetaGer
Commits
2702a96b
Commit
2702a96b
authored
Jun 05, 2019
by
Dominik Hebeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unnecessary resources
parent
8039779c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
259 deletions
+2
-259
resources/js/scriptStartPage.js
resources/js/scriptStartPage.js
+0
-166
resources/less/metager/pages/start-page.less
resources/less/metager/pages/start-page.less
+2
-71
resources/views/index.blade.php
resources/views/index.blade.php
+0
-12
resources/views/layouts/staticPages.blade.php
resources/views/layouts/staticPages.blade.php
+0
-3
webpack.mix.js
webpack.mix.js
+0
-7
No files found.
resources/js/scriptStartPage.js
deleted
100644 → 0
View file @
8039779c
const
DEFAULT_FOCUS
=
'
web
'
;
$
(
document
).
ready
(
function
()
{
// checkPlugin()
if
(
location
.
href
.
indexOf
(
'
#plugin-modal
'
)
>
-
1
)
{
$
(
'
#plugin-modal
'
).
modal
(
'
show
'
);
}
$
(
'
#addFocusBtn
'
).
removeClass
(
'
hide
'
);
$
(
'
button
'
).
popover
();
loadLocalStorage
();
setActionListeners
();
loadSavedResults
();
});
/**
* Loads the user theme and stored settings from local storage
*/
function
loadLocalStorage
()
{
setSettings
();
}
/**
* Sets all action listeners for this page
*/
function
setActionListeners
()
{
$
(
'
button
'
).
on
(
'
shown.bs.popover
'
,
function
()
{
$
(
'
#color-chooser a
'
).
click
(
function
()
{
var
theme
=
$
(
this
).
attr
(
'
data-rgba
'
);
if
(
localStorage
)
{
localStorage
.
setItem
(
'
theme
'
,
theme
);
location
.
href
=
'
/
'
;
}
});
});
$
(
'
#mobileFoki
'
).
change
(
function
()
{
var
focus
=
$
(
'
#mobileFoki > option:selected
'
).
val
();
if
(
focus
==
'
angepasst
'
)
{
window
.
location
=
'
./settings/
'
;
}
else
{
window
.
location
=
'
./?focus=
'
+
focus
;
}
});
if
(
$
(
'
fieldset#foki.mobile
'
).
length
)
{
$
(
'
fieldset#foki.mobile label#anpassen-label
'
).
click
(
function
()
{
window
.
location
=
'
./settings/
'
;
});
}
}
/**
* Loads stored settings from local storage
*/
function
setSettings
()
{
if
(
$
(
'
fieldset#foki.mobile
'
).
length
)
{
$
(
'
fieldset.mobile input#bilder
'
).
val
(
'
angepasst
'
);
$
(
'
fieldset.mobile input#bilder
'
).
prop
(
'
checked
'
,
true
);
$
(
'
fieldset.mobile input#bilder
'
).
attr
(
'
id
'
,
'
angepasst
'
);
$
(
'
fieldset.mobile label#bilder-label
'
).
attr
(
'
id
'
,
'
anpassen-label
'
);
$
(
'
fieldset.mobile label#anpassen-label
'
).
attr
(
'
for
'
,
'
angepasst
'
);
$
(
'
fieldset.mobile label#anpassen-label i.fa
'
).
attr
(
'
class
'
,
'
fa fa-cog
'
);
$
(
'
fieldset.mobile label#anpassen-label span.content
'
).
html
(
'
angepasst
'
);
}
}
// Polyfill for form attribute
(
function
(
$
)
{
/**
* polyfill for html5 form attr
*/
// detect if browser supports this
var
sampleElement
=
$
(
'
[form]
'
).
get
(
0
);
var
isIE11
=
!
(
window
.
ActiveXObject
)
&&
'
ActiveXObject
'
in
window
;
if
(
sampleElement
&&
window
.
HTMLFormElement
&&
sampleElement
.
form
instanceof
HTMLFormElement
&&
!
isIE11
)
{
// browser supports it, no need to fix
return
;
}
/**
* Append a field to a form
*
*/
$
.
fn
.
appendField
=
function
(
data
)
{
// for form only
if
(
!
this
.
is
(
'
form
'
))
return
;
// wrap data
if
(
!
$
.
isArray
(
data
)
&&
data
.
name
&&
data
.
value
)
{
data
=
[
data
];
}
var
$form
=
this
;
// attach new params
$
.
each
(
data
,
function
(
i
,
item
)
{
$
(
'
<input/>
'
).
attr
(
'
type
'
,
'
hidden
'
).
attr
(
'
name
'
,
item
.
name
).
val
(
item
.
value
).
appendTo
(
$form
);
});
return
$form
;
};
/**
* Find all input fields with form attribute point to jQuery object
*
*/
$
(
'
form[id]
'
).
submit
(
function
(
e
)
{
var
$form
=
$
(
this
);
// serialize data
var
data
=
$
(
'
[form=
'
+
$form
.
attr
(
'
id
'
)
+
'
]
'
).
serializeArray
();
// append data to form
$form
.
appendField
(
data
);
}).
each
(
function
()
{
var
form
=
this
,
$form
=
$
(
form
),
$fields
=
$
(
'
[form=
'
+
$form
.
attr
(
'
id
'
)
+
'
]
'
);
$fields
.
filter
(
'
button, input
'
).
filter
(
'
[type=reset],[type=submit]
'
).
click
(
function
()
{
var
type
=
this
.
type
.
toLowerCase
();
if
(
type
===
'
reset
'
)
{
// reset form
form
.
reset
();
// for elements outside form
$fields
.
each
(
function
()
{
this
.
value
=
this
.
defaultValue
;
this
.
checked
=
this
.
defaultChecked
;
}).
filter
(
'
select
'
).
each
(
function
()
{
$
(
this
).
find
(
'
option
'
).
each
(
function
()
{
this
.
selected
=
this
.
defaultSelected
;
});
});
}
else
if
(
type
.
match
(
/^submit|image$/i
))
{
$
(
form
).
appendField
({
name
:
this
.
name
,
value
:
this
.
value
}).
submit
();
}
});
});
})(
jQuery
);
// Opera 8.0+
var
isOpera
=
(
!!
window
.
opr
&&
!!
opr
.
addons
)
||
!!
window
.
opera
||
navigator
.
userAgent
.
indexOf
(
'
OPR/
'
)
>=
0
;
// Firefox 1.0+
var
isFirefox
=
typeof
InstallTrigger
!==
'
undefined
'
;
// At least Safari 3+: "[object HTMLElementConstructor]"
var
isSafari
=
Object
.
prototype
.
toString
.
call
(
window
.
HTMLElement
).
indexOf
(
'
Constructor
'
)
>
0
;
// Internet Explorer 6-11
var
isIE
=
/*@cc_on!@*/
false
||
!!
document
.
documentMode
;
// Edge 20+
var
isEdge
=
!
isIE
&&
!!
window
.
StyleMedia
;
// Chrome 1+
var
isChrome
=
!!
window
.
chrome
&&
!!
window
.
chrome
.
webstore
;
// Blink engine detection
var
isBlink
=
(
isChrome
||
isOpera
)
&&
!!
window
.
CSS
;
// Prüft, ob der URL-Parameter "usage" auf "once" gesetzt ist.
function
loadSavedResults
()
{
var
results
=
new
Results
();
if
(
results
.
length
>
0
)
{
var
html
=
$
(
'
\
<div class="focus">
\
<input id="savedResults" class="focus-radio hide" name="focus" value="container" form="searchForm" type="radio" required="">
\
<label id="saved-results-label" class="focus-label" for="savedResults">
\
<i class="fas fa-save"></i>
\
<span class="content">gespeicherte Ergebnisse</span>
\
<span class="badge">
'
+
results
.
length
+
'
</span>
\
</label>
\
</div>
\
'
);
$
(
'
#addFocusBtnDiv
'
).
before
(
html
);
$
(
'
#foki input#savedResults
'
).
change
(
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
))
$
(
'
#searchForm
'
).
submit
();
});
}
}
\ No newline at end of file
resources/less/metager/pages/start-page.less
View file @
2702a96b
/* Startseite */
@main-content-width: 1000px;
@foki-edge-rounding: 7px;
#main-content {
flex-grow: 1;
display: flex;
...
...
@@ -47,76 +46,8 @@
.startpage #main-content {
justify-content: center;
margin-top:
0
;
margin-top:
-15%
;
@media(max-width: @screen-mobile){
justify-content: start;
margin-top: 20vh;
}
}
#additional-content {
flex-grow: 2;
padding-top: 50px;
display: flex;
@media(max-width: @screen-mobile) {
flex-direction: column;
position: absolute;
top: 100vh;
}
#about-us {
max-width: 500px;
margin-right: 50px;
@media(max-width: @screen-mobile) {
margin: 0px;
max-width: 100%;
.card-medium;
order: 2;
p {
text-align: justify;
}
}
h2 {
font-size: 1.3em;
}
p {
font-size: 1em;
}
}
#s {
@media(max-width: @screen-mobile) {
margin: 8px 0px;
.card-medium;
}
h2 {
font-size: 1.3em;
}
ul {
list-style-type: none;
padding: 0px;
text-align: left;
margin-bottom: 0;
li.sr {
a {
color: inherit;
display: flex;
justify-content: space-between;
font-size: 1em;
i {
margin-left: 10px;
}
}
}
}
}
}
#spendenaufruf {
text-align: center;
a {
background-color: white;
display: inline-block;
width: 100%;
max-width: 770px;
margin-bottom: 10px;
margin-top: -25%;
}
}
\ No newline at end of file
resources/views/index.blade.php
View file @
2702a96b
...
...
@@ -13,16 +13,4 @@
<
a
id
=
"scroll-helper"
href
=
"#about-us"
>
<
i
class
=
"fas fa-angle-double-down"
></
i
>
</
a
>
<
script
src
=
"{{ mix('js/scriptStartPage.js') }}"
defer
></
script
>
@
endsection
@
section
(
'additional-content'
)
<
div
id
=
"about-us"
>
<
div
>
<
h2
>
{
!!
trans
(
'index.slogan.title'
)
!!
}
</
h2
>
<
p
>
{
!!
trans
(
'index.slogan.1'
)
!!
}
</
p
>
<
p
>
{
!!
trans
(
'index.slogan.2'
)
!!
}
</
p
>
<
p
>
{
!!
trans
(
'index.slogan.3'
)
!!
}
</
p
>
</
div
>
</
div
>
@
endsection
resources/views/layouts/staticPages.blade.php
View file @
2702a96b
...
...
@@ -56,9 +56,6 @@
@endif
@yield('content')
</main>
<div
id=
"additional-content"
>
@yield('additional-content')
</div>
</div>
@include('parts.sidebar', ['id' => 'staticPagesSideBar'])
@include('parts.sidebar-opener', ['class' => 'fixed'])
...
...
webpack.mix.js
View file @
2702a96b
...
...
@@ -50,13 +50,6 @@ mix
],
"
public/js/lib.js
"
)
.
babel
(
[
"
resources/js/scriptStartPage.js
"
,
"
resources/js/result-saver.js
"
],
"
public/js/scriptStartPage.js
"
)
.
babel
(
[
"
resources/js/scriptSettings.js
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment