Ajout thème Viregul
This commit is contained in:
parent
3ede888fb3
commit
d25933cb2d
31
README.md
31
README.md
|
@ -0,0 +1,31 @@
|
|||
# Fichiers spécifiques au service LSTU - Couic
|
||||
|
||||
Ces fichiers sont utiles lors d'une mise à jour du paquet Yunohost
|
||||
|
||||
Modifications à apporter pour les mises à jour :
|
||||
|
||||
Sauvegarder le fichier /var/www/lstu/lstu.conf :
|
||||
|
||||
cp /var/www/lstu/lstu.conf /home/admin/services/lstu/lstu.conf.$(date +%Y%M%d-%H%M%S)
|
||||
|
||||
Remplacer s'il a disparu le dossier 'viregul' dans `/var/www/lstu/themes`
|
||||
|
||||
|
||||
Modifier le `/var/www/lstu/lstu.conf`
|
||||
|
||||
```
|
||||
theme => 'viregul', # default or milligram
|
||||
```
|
||||
|
||||
Réappliquer les droits correspondants
|
||||
|
||||
```
|
||||
chown -R www-data /var/www/lstu/themes/viregul
|
||||
```
|
||||
Et redémarrer le service :
|
||||
|
||||
```
|
||||
systemctl reload lstu.service
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
POT=lib/Lstu/I18N/milligram.pot
|
||||
SEDOPTS=-e "s@SOME DESCRIPTIVE TITLE@Lstu language file@" \
|
||||
-e "s@YEAR THE PACKAGE'S COPYRIGHT HOLDER@2015 Luc Didry@" \
|
||||
-e "s@CHARSET@utf8@" \
|
||||
-e "s@the PACKAGE package@the Lstu package@" \
|
||||
-e '/^\#\. (/{N;/\n\#\. (/{N;/\n.*\.\.\/default\//{s/\#\..*\n.*\#\./\#. (/g}}}' \
|
||||
-e '/^\#\. (/{N;/\n.*\.\.\/default\//{s/\n/ /}}'
|
||||
SEDOPTS2=-e '/^\#.*\.\.\/default\//,+3d'
|
||||
XGETTEXT=carton exec ../../local/bin/xgettext.pl
|
||||
CARTON=carton exec
|
||||
|
||||
locales:
|
||||
$(XGETTEXT) -D templates -D ../default/templates -o $(POT) 2>/dev/null
|
||||
sed $(SEDOPTS) -i $(POT)
|
||||
sed $(SEDOPTS2) -i $(POT)
|
|
@ -0,0 +1,22 @@
|
|||
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
|
||||
package Lstu::I18N;
|
||||
|
||||
use base 'Locale::Maketext';
|
||||
use File::Basename qw/dirname/;
|
||||
use Locale::Maketext::Lexicon {
|
||||
_auto => 1,
|
||||
_decode => 1,
|
||||
_style => 'gettext',
|
||||
'*' => [
|
||||
Gettext => dirname(__FILE__) . '/I18N/*.po',
|
||||
Gettext => $app_dir . 'themes/default/lib/Lstu/I18N/*.po',
|
||||
]
|
||||
};
|
||||
|
||||
use vars qw($app_dir);
|
||||
BEGIN {
|
||||
use Cwd;
|
||||
my $app_dir = getcwd;
|
||||
}
|
||||
|
||||
1;
|
|
@ -0,0 +1,18 @@
|
|||
# Lstu language file.
|
||||
# Copyright (C) 2013 Luc Didry
|
||||
# This file is distributed under the same license as the Lstu package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Lstu\n"
|
||||
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Luc Didry <luc@didry.org>\n"
|
||||
"Language-Team: English (http://www.transifex.com/projects/p/lstu/language/en/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: en\n"
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Lstu language file.
|
||||
# Copyright (C) 2013 Luc Didry
|
||||
# This file is distributed under the same license as the Lstu package.
|
||||
# Luc Didry <luc@didry.org>, 2015
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Lstu\n"
|
||||
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Luc <luc@fiat-tux.fr>\n"
|
||||
"Language-Team: French (http://www.transifex.com/projects/p/lstu/language/fr/)"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Lstu language file.
|
||||
# Copyright (C) 2015 Luc Didry
|
||||
# This file is distributed under the same license as the Lstu package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Lstu language file.
|
||||
# Copyright (C) 2013 Luc Didry
|
||||
# This file is distributed under the same license as the Lstu package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
@font-face {
|
||||
font-family: 'Henny_Penny';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Henny Penny'), local('HennyPenny-Regular'), url('../font/hennypenny.woff2') format('woff2');
|
||||
}
|
||||
body {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
.container {
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.hennypenny {
|
||||
font-family: 'Henny_Penny', cursive;
|
||||
font-size: 42px;
|
||||
}
|
||||
.link_nocol, .link_nocol:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
.result {
|
||||
border-color: #d6e9c6;
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.result a.button {
|
||||
padding: 0;
|
||||
}
|
||||
ul.pager {
|
||||
list-style: none outside;
|
||||
text-align: center;
|
||||
}
|
||||
ul.pager li {
|
||||
display: inline;
|
||||
}
|
||||
.disabled {
|
||||
display: none !important;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.hidden-xs {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.qrcode-result {
|
||||
float: right;
|
||||
}
|
||||
dd > strong {
|
||||
padding-left: 15px;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
@font-face{font-family:Henny_Penny;font-style:normal;font-weight:400;src:local('Henny Penny'),local('HennyPenny-Regular'),url(../font/hennypenny.woff2) format('woff2')}body{padding-top:40px;padding-bottom:40px}.container{padding:15px;margin:0 auto}.hennypenny{font-family:Henny_Penny,cursive;font-size:42px}.link_nocol,.link_nocol:hover{color:#000;text-decoration:none}.result{border-color:#d6e9c6;padding:15px;margin-bottom:20px;border:1px solid;border-radius:4px}.result a.button{padding:0}ul.pager{list-style:none outside;text-align:center}ul.pager li{display:inline}.disabled{display:none!important}@media (max-width:767px){.hidden-xs{display:none!important}}.qrcode-result{float:right}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
|
@ -0,0 +1,26 @@
|
|||
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
||||
% title 'Lstu';
|
||||
<form class="form" method="POST" action="<%== url_for 'add' %>">
|
||||
<fieldset>
|
||||
<label class="sr-only" for="lsturl"><%= l('URL to shorten') %></label>
|
||||
<input type="url" name="lsturl" id="lsturl" class="form-control" placeholder="<%= l('URL to shorten') %>" required>
|
||||
<label class="sr-only" for="lsturl-custom"><%= l('Custom shortened text') %></label>
|
||||
<input type="text" name="lsturl-custom" id="lsturl-custom" class="form-control" placeholder="<%= l('Custom shortened text') %>">
|
||||
<%= submit_button l('Go!'), class => 'button' %>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
% if (defined(stash('short')) && defined(stash('url'))) {
|
||||
<fieldset class="result">
|
||||
<img class="qrcode-result" alt="QRCode" src="data:image/png;base64,<%= stash('qrcode') %>">
|
||||
<label><%= link_to stash('url') => begin %><h4><%= stash('url') %></h4><%= end %></label>
|
||||
⟹ <input id="input-short" value="<%== stash('short') %>" class="form-control">
|
||||
<span id="js" class="hidden"><a href="#" id="clipboard" class="button button-clear" title="<%= l('Copy to clipboard') %>" data-short="<%== stash('short') %>"><h5><span class="icon icon-clipboard"></span></h5></a><span>
|
||||
</fieldset>
|
||||
% }
|
||||
% if (defined(flash('msg'))) {
|
||||
<h3 class="alert alert-danger"><%= flash('msg') %></h3>
|
||||
% }
|
||||
% if (defined(stash('msg'))) {
|
||||
<h3 class="alert alert-danger"><%= stash('msg') %></h3>
|
||||
% }
|
|
@ -0,0 +1,59 @@
|
|||
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
||||
% my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
|
||||
% $year += 1900;
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= title %></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="icon" type="image/png" href="<%= url_for('/img/favicon.png') %>">
|
||||
<link rel="icon" sizes="128x128" href="<%= url_for('/img/lstu128.png') %>">
|
||||
<link rel="icon" sizes="196x196" href="<%= url_for('/img/lstu196.png') %>">
|
||||
<link rel="apple-touch-icon" href="<%= url_for('/img/lstu60.png') %>">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<%= url_for('/img/lstu76.png') %>">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="<%= url_for('/img/lstu120.png') %>">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="<%= url_for('/img/lstu152.png') %>">
|
||||
<link rel="apple-touch-icon" sizes="128x128" href="<%= url_for('/img/lstu128.png') %>">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="float-left hidden-xs logo">
|
||||
<img src="<%= url_for('/img/lstuviregul.png') %>" alt="lstu logo" width="100" height="100">
|
||||
</div>
|
||||
<%= link_to url_for('/') => (class => 'link_nocol') => begin %><h1 class="hennypenny">Et couic, le lien !</h1><% end %>
|
||||
<p>
|
||||
<small>© 2013 — <%= $year %> <%= link_to 'Luc Didry' => 'https://fiat-tux.fr' %> —
|
||||
<%= l('License:') %> <%= link_to 'WTFPL' => 'http://www.wtfpl.net/' %> —
|
||||
<%= link_to l('About') => 'https://framagit.org/luc/lstu/blob/master/README.md' %> —
|
||||
<%= link_to 'API' => url_for('api') %> —
|
||||
% if (defined(config('ldap')) || defined(config('htpasswd'))) {
|
||||
% if (is_user_authenticated()) {
|
||||
<%= link_to l('Statistics') => url_for('stats') %> —
|
||||
<%= link_to l('Logout') => url_for('/logout')%>
|
||||
% } else {
|
||||
<%= link_to l('Signin') => url_for('/login') %>
|
||||
% }
|
||||
% } else {
|
||||
<%= link_to l('Statistics') => url_for('stats') %>
|
||||
% }
|
||||
— <%= link_to l('Browser extensions') => url_for('extensions') %>
|
||||
</small>
|
||||
</p>
|
||||
<%= content %>
|
||||
</div>
|
||||
% if ($self->app->mode eq 'production') {
|
||||
%= stylesheet '/css/milli-lstu.min.css'
|
||||
% } else {
|
||||
%= stylesheet '/css/milligram.min.css'
|
||||
%= stylesheet '/css/lstu.css'
|
||||
%= stylesheet '/css/fontelico.css'
|
||||
% }
|
||||
% if (defined(stash('short')) && defined(stash('url'))) {
|
||||
%= javascript url_for('lstu.js')
|
||||
% }
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,86 @@
|
|||
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
||||
% title 'Lstu stats';
|
||||
% use Mojo::Date;
|
||||
<h2><%= l('Statistics') %></h2>
|
||||
% if (defined(config('adminpwd')) || defined(config('hashed_adminpwd'))) {
|
||||
% if (!flash('banned')) {
|
||||
<form class="form" method="POST" action="<%== url_for 'stats' %>">
|
||||
<fieldset>
|
||||
% if (defined(stash('admin'))) {
|
||||
<input type="hidden" value="logout" name="action">
|
||||
<%= submit_button l('Logout from admin stats'), class => 'button' %>
|
||||
% } else {
|
||||
<label class="sr-only" for="adminpwd"><%= l('Admin password') %></label>
|
||||
<input type="password" name="adminpwd" id="adminpwd" class="form-control" placeholder="<%= l('Admin password') %>" required>
|
||||
<input type="hidden" value="0" name="page">
|
||||
<%= submit_button l('Go!'), class => 'button' %>
|
||||
% }
|
||||
</fieldset>
|
||||
</form>
|
||||
% }
|
||||
% if (defined(flash('msg'))) {
|
||||
<h3 class="alert alert-danger"><%= flash('msg') %></h3>
|
||||
% }
|
||||
% }
|
||||
|
||||
% if (defined(flash('success_msg'))) {
|
||||
<h3 class="alert alert-success"><%= flash('success_msg') %></h3>
|
||||
% }
|
||||
<form class="form" method="POST" action="<%== url_for 'import_cookie' %>" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<label for="file"><%= l('Import URLs') %></label>
|
||||
<input type="file" name="file" id="file" required>
|
||||
</fieldset>
|
||||
<%= submit_button l('Import URLs'), class => 'button' %>
|
||||
<a href="<%= url_for 'export_cookie' %>" class="button button-outline"><%= l('Export your URLs') %></a>
|
||||
</form>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><%= l('URL') %></th>
|
||||
<th><%= l('Shortened URL') %></th>
|
||||
<th><%= l('Counter') %></th>
|
||||
<th><%= l('Created') %></th>
|
||||
% if (defined(config('adminpwd')) || defined(config('hashed_adminpwd'))) {
|
||||
% unless (defined(stash('admin'))) {
|
||||
<th><%= l('QRCode') %></th>
|
||||
% } else {
|
||||
<th><%= l('Delete') %></th>
|
||||
% }
|
||||
% }
|
||||
</tr>
|
||||
% my $i = 1;
|
||||
% if (defined(stash('page')) && stash('page') >= 0) {
|
||||
% $i = 1 + config('page_offset') * stash('page');
|
||||
% }
|
||||
% my $j = $i;
|
||||
% for my $url (@{$urls}) {
|
||||
<tr>
|
||||
<td><%= $i++ %></td>
|
||||
<td><%= link_to $url->{url} => $url->{url} %></td>
|
||||
<td><%= link_to $prefix.$url->{short} => $prefix.$url->{short} %></td>
|
||||
<td><%= $url->{counter} %></td>
|
||||
<td><%= Mojo::Date->new($url->{timestamp})->to_string %></td>
|
||||
% if (defined(config('adminpwd')) || defined(config('hashed_adminpwd'))) {
|
||||
% unless (defined(stash('admin'))) {
|
||||
<td><img class="qrcode-stat" alt="QRCode" src="data:image/png;base64,<%= $url->{qrcode} %>"></td>
|
||||
% } else {
|
||||
<td><a href="<%= url_for('delete', {short => $url->{short}}) %>"><h5><span class="icon icon-trash"></span></h5></a></td>
|
||||
% }
|
||||
% }
|
||||
</tr>
|
||||
% }
|
||||
</table>
|
||||
% if (defined(config('adminpwd')) || defined(config('hashed_adminpwd'))) {
|
||||
% if (defined(stash('admin'))) {
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li class="previous<%= (stash('first')) ? ' disabled' : '' %>"><%= link_to url_for->query(page => (stash('first')) ? 0 : stash('page') - 1) => begin %><span aria-hidden="true">←</span> <%= l('Previous') %><% end %></li>
|
||||
<li class="center"><%= $j.'-'.--$i.'/'.stash('total') %></li>
|
||||
<li class="next<%= (stash('last')) ? ' disabled' : '' %>"><%= link_to url_for->query(page => (stash('last')) ? stash('page') : stash('page') + 1) => begin %><%= l('Next') %> <span aria-hidden="true">→</span><% end %></li>
|
||||
</ul>
|
||||
</nav>
|
||||
% }
|
||||
% }
|
||||
%= link_to l('Home') => '/' => (class => 'button')
|
Loading…
Reference in New Issue