Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fiat Tux
Hat softwares
Lufi
Commits
adf0a4d2
Commit
adf0a4d2
authored
Oct 06, 2015
by
Luc Didry
Browse files
Themes system
parent
2ccd065e
Changes
57
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
adf0a4d2
...
...
@@ -16,7 +16,7 @@ test:
clean
:
rm
-rf
lufi.db files/
dev
:
clean
$(CARTON)
morbo
$(LUFI)
--listen
http://0.0.0.0:3000
$(CARTON)
morbo
$(LUFI)
--listen
http://0.0.0.0:3000
--watch
lib/
--watch
script/
--watch
themes/
devlog
:
multitail log/development.log
...
...
lib/Lufi.pm
View file @
adf0a4d2
...
...
@@ -11,7 +11,7 @@ sub startup {
my
$config
=
$self
->
plugin
('
Config
'
=>
{
default
=>
{
provisioning
=>
100
,
provisioning
=>
100
,
provis_step
=>
5
,
length
=>
10
,
token_length
=>
32
,
...
...
@@ -21,11 +21,20 @@ sub startup {
mail
=>
{
how
=>
'
sendmail
'
},
mail_sender
=>
'
no-reply@lufi.io
'
mail_sender
=>
'
no-reply@lufi.io
',
theme
=>
'
default
',
}
});
die
"
You need to provide a contact information in lufi.conf!
"
unless
(
defined
(
$config
->
{
contact
}));
die
"
You need to provide a contact information in lufi.conf!
"
unless
(
defined
(
$self
->
config
('
contact
')));
# Themes handling
shift
@
{
$self
->
app
->
renderer
->
paths
};
if
(
$config
->
{
theme
}
ne
'
default
')
{
my
$theme
=
$self
->
home
->
rel_dir
('
themes/
'
.
$config
->
{
theme
});
push
@
{
$self
->
renderer
->
paths
},
$theme
.
'
/templates
'
if
-
d
$theme
.
'
/templates
';
}
push
@
{
$self
->
renderer
->
paths
},
$self
->
home
->
rel_dir
('
themes/default/templates
');
# Mail config
my
$mail_config
=
{
...
...
@@ -43,7 +52,7 @@ sub startup {
# Debug
$self
->
plugin
('
DebugDumperHelper
');
$self
->
secrets
(
$config
->
{
secrets
}
);
$self
->
secrets
(
$
self
->
config
('
secrets
')
);
# Helpers
$self
->
helper
(
...
...
lib/Mounter.pm
View file @
adf0a4d2
...
...
@@ -13,11 +13,20 @@ sub startup {
{
file
=>
File::
Spec
->
catfile
(
$Bin
,
'
..
'
,'
lufi.conf
'),
default
=>
{
prefix
=>
'
/
'
prefix
=>
'
/
',
theme
=>
'
default
',
}
}
);
# Themes handling
shift
@
{
$self
->
static
->
paths
};
if
(
$config
->
{
theme
}
ne
'
default
')
{
my
$theme
=
$self
->
home
->
rel_dir
('
themes/
'
.
$config
->
{
theme
});
push
@
{
$self
->
static
->
paths
},
$theme
.
'
/public
'
if
-
d
$theme
.
'
/public
';
}
push
@
{
$self
->
static
->
paths
},
$self
->
home
->
rel_dir
('
themes/default/public
');
$self
->
plugin
('
Mount
'
=>
{
$config
->
{
prefix
}
=>
File::
Spec
->
catfile
(
$Bin
,
'
..
',
'
script
',
'
application
')});
}
...
...
lufi.conf.template
View file @
adf0a4d2
...
...
@@ -20,6 +20,10 @@
# optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT
#secrets => ['fdjsofjoihrei'],
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# length of the random URL
# optional, default is 8
#length => 8,
...
...
public/bootstrap-config.json
→
themes/default/
public/bootstrap-config.json
View file @
adf0a4d2
File moved
public/css/animation.css
→
themes/default/
public/css/animation.css
View file @
adf0a4d2
File moved
public/css/bootstrap-theme.css
→
themes/default/
public/css/bootstrap-theme.css
View file @
adf0a4d2
File moved
public/css/bootstrap-theme.min.css
→
themes/default/
public/css/bootstrap-theme.min.css
View file @
adf0a4d2
File moved
public/css/bootstrap.css
→
themes/default/
public/css/bootstrap.css
View file @
adf0a4d2
File moved
public/css/bootstrap.min.css
→
themes/default/
public/css/bootstrap.min.css
View file @
adf0a4d2
File moved
public/css/cover.css
→
themes/default/
public/css/cover.css
View file @
adf0a4d2
File moved
public/css/fontello-codes.css
→
themes/default/
public/css/fontello-codes.css
View file @
adf0a4d2
File moved
public/css/fontello-embedded.css
→
themes/default/
public/css/fontello-embedded.css
View file @
adf0a4d2
File moved
public/css/fontello-ie7-codes.css
→
themes/default/
public/css/fontello-ie7-codes.css
View file @
adf0a4d2
File moved
public/css/fontello-ie7.css
→
themes/default/
public/css/fontello-ie7.css
View file @
adf0a4d2
File moved
public/css/fontello.css
→
themes/default/
public/css/fontello.css
View file @
adf0a4d2
File moved
public/css/lufi.css
→
themes/default/
public/css/lufi.css
View file @
adf0a4d2
File moved
public/font/LICENSE.txt
→
themes/default/
public/font/LICENSE.txt
View file @
adf0a4d2
File moved
public/font/README.txt
→
themes/default/
public/font/README.txt
View file @
adf0a4d2
File moved
public/font/fontello.eot
→
themes/default/
public/font/fontello.eot
View file @
adf0a4d2
File moved
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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