add skin system
add brique's skin
961
brique/assets/css/ynh-style.css
Normal file
737
brique/assets/css/ynhpanel.css
Normal file
BIN
brique/assets/fonts/sourcesanspro-bold-webfont.eot
Executable file
BIN
brique/assets/fonts/sourcesanspro-bold-webfont.ttf
Executable file
BIN
brique/assets/fonts/sourcesanspro-regular-webfont.eot
Executable file
BIN
brique/assets/fonts/sourcesanspro-regular-webfont.ttf
Executable file
BIN
brique/assets/fonts/ynh_ssowat/ynh_ssowat.eot
Normal file
17
brique/assets/fonts/ynh_ssowat/ynh_ssowat.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="ynh_ssowat" horiz-adv-x="1000" >
|
||||
<font-face font-family="ynh_ssowat" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="user" unicode="" d="m786 66q0-67-41-106t-108-39h-488q-67 0-108 39t-41 106q0 30 2 58t8 61 15 60 24 55 34 45 48 30 62 11q5 0 24-12t41-27 60-27 75-12 74 12 61 27 41 27 24 12q34 0 62-11t48-30 34-45 24-55 15-60 8-61 2-58z m-179 498q0-88-63-151t-151-63-152 63-62 151 62 152 152 63 151-63 63-152z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="lock" unicode="" d="m179 421h285v108q0 59-42 101t-101 41-101-41-41-101v-108z m464-53v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v322q0 22 16 38t38 15h17v108q0 102 74 176t176 74 177-74 73-176v-108h18q23 0 38-15t16-38z" horiz-adv-x="642.9" />
|
||||
<glyph glyph-name="pencil" unicode="" d="m203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="trash" unicode="" d="m286 439v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m143 0v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m142 0v-321q0-8-5-13t-12-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q7 0 12-5t5-13z m72-404v529h-500v-529q0-12 4-22t8-15 6-5h464q2 0 6 5t8 15 4 22z m-375 601h250l-27 65q-4 5-9 6h-177q-6-1-10-6z m518-18v-36q0-8-5-13t-13-5h-54v-529q0-46-26-80t-63-34h-464q-37 0-63 33t-27 79v531h-53q-8 0-13 5t-5 13v36q0 8 5 13t13 5h172l39 93q9 21 31 35t44 15h178q22 0 44-15t30-35l39-93h173q8 0 13-5t5-13z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="angle-left" unicode="" d="m350 546q0-7-6-12l-219-220 219-219q6-6 6-13t-6-13l-28-28q-5-5-12-5t-13 5l-260 260q-6 6-6 13t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="357.1" />
|
||||
<glyph glyph-name="off" unicode="" d="m857 350q0-87-34-166t-91-137-137-92-166-34-167 34-136 92-92 137-34 166q0 102 45 191t126 151q24 18 54 14t46-28q18-23 14-53t-28-47q-54-41-84-101t-30-127q0-58 22-111t62-91 91-61 111-23 110 23 92 61 61 91 22 111q0 68-30 127t-84 101q-24 18-28 47t14 53q17 24 47 28t53-14q81-61 126-151t45-191z m-357 429v-358q0-29-21-50t-50-21-51 21-21 50v358q0 29 21 50t51 21 50-21 21-50z" horiz-adv-x="857.1" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
BIN
brique/assets/fonts/ynh_ssowat/ynh_ssowat.ttf
Normal file
BIN
brique/assets/fonts/ynh_ssowat/ynh_ssowat.woff
Normal file
BIN
brique/assets/icons/apple-touch-icon-114x114.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
brique/assets/icons/apple-touch-icon-120x120.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
brique/assets/icons/apple-touch-icon-144x144.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
brique/assets/icons/apple-touch-icon-152x152.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
brique/assets/icons/apple-touch-icon-57x57.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
brique/assets/icons/apple-touch-icon-60x60.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
brique/assets/icons/apple-touch-icon-72x72.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
brique/assets/icons/apple-touch-icon-76x76.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
brique/assets/icons/apple-touch-icon-precomposed.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
brique/assets/icons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 14 KiB |
12
brique/assets/icons/browserconfig.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="/mstile-70x70.png"/>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<square310x310logo src="/mstile-310x310.png"/>
|
||||
<wide310x150logo src="/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
BIN
brique/assets/icons/favicon-160x160.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
brique/assets/icons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 578 B |
BIN
brique/assets/icons/favicon-196x196.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
brique/assets/icons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 905 B |
BIN
brique/assets/icons/favicon-96x96.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
brique/assets/icons/favicon.ico
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
brique/assets/icons/mstile-144x144.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
brique/assets/icons/mstile-150x150.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
brique/assets/icons/mstile-310x150.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
brique/assets/icons/mstile-310x310.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
brique/assets/icons/mstile-70x70.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
brique/assets/img/background.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
34
brique/assets/img/logo-ynh-white.svg
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
||||
]>
|
||||
<svg version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
||||
x="0px" y="0px" width="98px" height="85px" viewBox="-0.25 -0.25 98 85"
|
||||
overflow="visible" enable-background="new -0.25 -0.25 98 85" xml:space="preserve">
|
||||
<defs>
|
||||
</defs>
|
||||
<path fill="#FFFFFF" d="M97,51c-2.02,4.98-8.33,5.67-14,7c-0.609,6.29,3.05,10.95-1,16c-6.41-0.26-7.471-5.859-7-13c-1,0-2,0-3,0
|
||||
c-2.09,2.77,0.9,4.52,0,8c-1.12,4.34-7.88,7.91-11,7c-2.18-0.641-5.96-6.63-5-12c2.82-2.71,2.76,3.12,6,3c5.05-7.84-9.63-8.55-8-17
|
||||
c1.24-6.42,11.66-9.66,15-1c1.54,4.21-5.17,0.16-5,3c-0.279,1.62,0.95,1.72,1,3c2.52,0.77,1.68-2.16,3-3c1.859-1.17,3.09-0.75,6-1
|
||||
c2.45-2.55,1.08-8.92,4-11c3.87,0.46,6.08,2.59,6,7C91.01,46.109,94.3,46.05,97,51z"/>
|
||||
<path fill="#FFFFFF" d="M87,13c0.609,3.21,2.32,4.98,2,8c-0.34,3.21-2.9,8.83-4,9c-1.17,0.18-1.34,1.78-2,2
|
||||
c-4.66,1.57-12.391-1.48-14-7c-1.16-3.97,1.9-13.37,4-17c1.3-2.25,1.221-2.99,5-4c2.41-0.65,3.65-2.25,6,0
|
||||
c0.471,0.45,1.3,0.49,1.85,0.89c-0.199,0,2,3.14,2.15,4.11C88.32,11.07,86.77,11.78,87,13z M79,22c1.779-1.89,3.29-4.04,3-8
|
||||
C77.49,12.33,74.67,21.3,79,22z"/>
|
||||
<path fill="#FFFFFF" d="M67,21c-0.07,5.81,2.48,10.7,0,15c-6.73,1.06-7.24-4.1-11-6c-1.939,1.39-1.49,5.18-3,7
|
||||
c-3.78,0.44-4.69-1.97-7-3c2.47-7.81,1.26-18.98,2-26c8.58-0.58,7.68,8.32,12,12c0.52-4.34-0.359-15.52,3-20
|
||||
C70.33,3.29,67.09,12.99,67,21z"/>
|
||||
<path fill="#FFFFFF" d="M52,55c1.93,8.41,0.12,22.689-12,20c-1.59-0.35-8.42-5.22-9-7c-1.62-5,0.34-13.34,3-16
|
||||
C39.03,46.97,45.48,50.359,52,55z M39,66c4.55,0.96,6.3-4.2,4-7C39.37,59.03,38.61,61.939,39,66z"/>
|
||||
<path fill="#FFFFFF" d="M39,8c5.58,0.9,6.4,6.81,5,15c-1.43,8.38-3.02,14.59-9,15c-9.57,0.65-12.25-16.69-9-29
|
||||
c8.32,1.27,6.59,10.36,6,17c2.71,0.83,2.2-0.85,3-2C37.05,21.04,37.82,13.61,39,8z"/>
|
||||
<path fill="#FFFFFF" d="M28,62c0.1,5.67,4.4,11.33,2,17c-4.32-1.01-6.57-4.09-9-7c-3.15-0.48-2.26,3.07-6,2
|
||||
c-0.67,5.061,2.29,7.57-1,10c-4.7-0.63-6.66-4-8-8c-2.61-1.38-5.48-2.52-6-6c0.14-3.53,4.48-2.85,7-4c0.47-5.53-1.41-13.41,2-16
|
||||
c8.31,0.49,8.21,7.13,7,15c4.36,0.29,4.94-4.35,5-7c0.06-2.43-1.82-8.26,2-11c3.06-0.73,2.94,1.73,6,1
|
||||
C32.35,52.7,27.92,57.439,28,62z"/>
|
||||
<path fill="#FFFFFF" d="M24,12c1.07,7.07-3.86,8.14-6,12c0.21,6.88-0.47,12.86-2,18c-5.86-1.32-8.7-10.38-6-17
|
||||
c-0.33-3.52-5.26-4.22-7-8c-0.3-0.66-0.47-4.43-1-7C1.09,5.63,0.55,4.31,3,1c8.16-0.49,7.21,8.13,9,14c5.05,0.39,3.91-5.42,8-6
|
||||
C20.98,10.35,22.67,11,24,12z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
38
brique/assets/img/logo-ynh.svg
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
||||
]>
|
||||
<svg version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
||||
x="0px" y="0px" width="98px" height="85px" viewBox="0 0 98 85" overflow="visible" enable-background="new 0 0 98 85"
|
||||
xml:space="preserve">
|
||||
<defs>
|
||||
</defs>
|
||||
<g id="XMLID_2_">
|
||||
<g>
|
||||
<path d="M97.25,51.25c-2.02,4.98-8.33,5.67-14,7c-0.61,6.29,3.05,10.95-1,16c-6.41-0.26-7.47-5.86-7-13c-1,0-2,0-3,0
|
||||
c-2.09,2.77,0.9,4.52,0,8c-1.12,4.34-7.88,7.91-11,7c-2.18-0.64-5.96-6.63-5-12c2.82-2.71,2.76,3.12,6,3c5.05-7.84-9.63-8.55-8-17
|
||||
c1.24-6.42,11.66-9.66,15-1c1.54,4.21-5.17,0.16-5,3c-0.28,1.62,0.95,1.72,1,3c2.52,0.77,1.68-2.16,3-3c1.86-1.17,3.09-0.75,6-1
|
||||
c2.45-2.55,1.08-8.92,4-11c3.87,0.46,6.08,2.59,6,7C91.26,46.36,94.55,46.3,97.25,51.25z"/>
|
||||
<path d="M87.25,13.25c0.61,3.21,2.32,4.98,2,8c-0.34,3.21-2.9,8.83-4,9c-1.17,0.18-1.34,1.78-2,2c-4.66,1.57-12.39-1.48-14-7
|
||||
c-1.16-3.97,1.9-13.37,4-17c1.3-2.25,1.22-2.99,5-4c2.41-0.65,3.65-2.25,6,0c0.47,0.45,1.3,0.49,1.85,0.89
|
||||
c-0.199,0,2,3.14,2.15,4.11C88.57,11.32,87.02,12.03,87.25,13.25z M79.25,22.25c1.78-1.89,3.29-4.04,3-8
|
||||
C77.74,12.58,74.92,21.55,79.25,22.25z"/>
|
||||
<path d="M67.25,21.25c-0.07,5.81,2.48,10.7,0,15c-6.73,1.06-7.24-4.1-11-6c-1.94,1.39-1.49,5.18-3,7c-3.78,0.44-4.69-1.97-7-3
|
||||
c2.47-7.81,1.26-18.98,2-26c8.58-0.58,7.68,8.32,12,12c0.52-4.34-0.36-15.52,3-20C70.58,3.54,67.34,13.24,67.25,21.25z"/>
|
||||
<path d="M52.25,55.25c1.93,8.41,0.12,22.69-12,20c-1.59-0.35-8.42-5.22-9-7c-1.62-5,0.34-13.34,3-16
|
||||
C39.28,47.22,45.73,50.61,52.25,55.25z M39.25,66.25c4.55,0.96,6.3-4.2,4-7C39.62,59.28,38.86,62.19,39.25,66.25z"/>
|
||||
<path d="M39.25,8.25c5.58,0.9,6.4,6.81,5,15c-1.43,8.38-3.02,14.59-9,15c-9.57,0.65-12.25-16.69-9-29c8.32,1.27,6.59,10.36,6,17
|
||||
c2.71,0.83,2.2-0.85,3-2C37.3,21.29,38.07,13.86,39.25,8.25z"/>
|
||||
<path d="M28.25,62.25c0.1,5.67,4.4,11.33,2,17c-4.32-1.01-6.57-4.09-9-7c-3.15-0.48-2.26,3.07-6,2c-0.67,5.06,2.29,7.57-1,10
|
||||
c-4.7-0.63-6.66-4-8-8c-2.61-1.38-5.48-2.52-6-6c0.14-3.53,4.48-2.85,7-4c0.47-5.53-1.41-13.41,2-16c8.31,0.49,8.21,7.13,7,15
|
||||
c4.36,0.29,4.94-4.35,5-7c0.06-2.43-1.82-8.26,2-11c3.06-0.73,2.94,1.73,6,1C32.6,52.95,28.17,57.69,28.25,62.25z"/>
|
||||
<path d="M24.25,12.25c1.07,7.07-3.86,8.14-6,12c0.21,6.88-0.47,12.86-2,18c-5.86-1.32-8.7-10.38-6-17c-0.33-3.52-5.26-4.22-7-8
|
||||
c-0.3-0.66-0.47-4.43-1-7c-0.91-4.37-1.45-5.69,1-9c8.16-0.49,7.21,8.13,9,14c5.05,0.39,3.91-5.42,8-6
|
||||
C21.23,10.6,22.92,11.25,24.25,12.25z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
38
brique/assets/js/global.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Variables
|
||||
var liMenu = document.querySelectorAll('#apps a')
|
||||
, colors = ['redbg','purpledarkbg','darkbluebg','orangebg','greenbg','darkbluebg','purpledarkbg','yellowbg','lightpinkbg','pinkbg','turquoisebg','yellowbg','lightbluebg','purpledarkbg', 'bluebg']
|
||||
, addMailAlias = document.getElementById('add-mailalias')
|
||||
, addMaildrop = document.getElementById('add-maildrop')
|
||||
;
|
||||
|
||||
liMenu && [].forEach.call(liMenu, function(el, i) {
|
||||
// Select a color value from the App label
|
||||
randomColorNumber = parseInt(el.textContent, 36) % colors.length;
|
||||
//randomColorNumber = i%colors.length; // Old value
|
||||
// Add color class.
|
||||
el.classList.add(colors[randomColorNumber]);
|
||||
// Set first-letter data attribute.
|
||||
el.querySelector('.first-letter').setAttribute('data-first-letter',el.textContent.substring(0, 2));
|
||||
});
|
||||
|
||||
addMailAlias && addMailAlias.addEventListener('click', function(){
|
||||
// Clone last input.
|
||||
var inputAliasClone = document.querySelector('.mailalias-input').cloneNode(true);
|
||||
// Empty value.
|
||||
inputAliasClone.value = '';
|
||||
// Append to form-group.
|
||||
addMailAlias.parentNode.insertBefore(inputAliasClone, addMailAlias);
|
||||
});
|
||||
|
||||
addMaildrop && addMaildrop.addEventListener('click', function(){
|
||||
// Clone last input.
|
||||
var inputDropClone = document.querySelector('.maildrop-input').cloneNode(true);
|
||||
// Empty value.
|
||||
inputDropClone.value = '';
|
||||
// Append to form-group.
|
||||
addMaildrop.parentNode.insertBefore(inputDropClone, addMaildrop);
|
||||
});
|
||||
|
||||
});
|
303
brique/assets/js/ynhpanel.js
Normal file
|
@ -0,0 +1,303 @@
|
|||
/* ----------------------------------------------------------
|
||||
Utilities
|
||||
---------------------------------------------------------- */
|
||||
|
||||
/* Console log fix
|
||||
-------------------------- */
|
||||
if (typeof(console) === 'undefined') {
|
||||
var console = {};
|
||||
console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = function() {};
|
||||
}
|
||||
|
||||
|
||||
/* Array utilities
|
||||
https://github.com/Darklg/JavaScriptUtilities/blob/master/assets/js/vanilla-js/libs/vanilla-arrays.js
|
||||
-------------------------- */
|
||||
Array.contains = function(needle, haystack) {
|
||||
var i = 0,
|
||||
length = haystack.length;
|
||||
|
||||
for (; i < length; i++) {
|
||||
if (haystack[i] === needle) return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Array.each = function(arrayToParse, callback) {
|
||||
var i = 0,
|
||||
length = arrayToParse.length;
|
||||
for (; i < length; i++) {
|
||||
callback(arrayToParse[i]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* CSS classes utilities
|
||||
https://github.com/Darklg/JavaScriptUtilities/blob/master/assets/js/vanilla-js/libs/vanilla-classes.js
|
||||
-------------------------- */
|
||||
Element.getClassNames = function(element) {
|
||||
var classNames = [],
|
||||
elementClassName = element.className;
|
||||
if (elementClassName !== '') {
|
||||
elementClassName = elementClassName.replace(/\s+/g, ' ');
|
||||
classNames = elementClassName.split(' ');
|
||||
}
|
||||
return classNames;
|
||||
};
|
||||
Element.hasClass = function(element, className) {
|
||||
if (element.classList) {
|
||||
return element.classList.contains(className);
|
||||
}
|
||||
return Array.contains(className, Element.getClassNames(element));
|
||||
};
|
||||
Element.addClass = function(element, className) {
|
||||
if (element.classList) {
|
||||
element.classList.add(className);
|
||||
return;
|
||||
}
|
||||
if (!Element.hasClass(element, className)) {
|
||||
var elementClasses = Element.getClassNames(element);
|
||||
elementClasses.push(className);
|
||||
element.className = elementClasses.join(' ');
|
||||
}
|
||||
};
|
||||
Element.removeClass = function(element, className) {
|
||||
if (element.classList) {
|
||||
element.classList.remove(className);
|
||||
return;
|
||||
}
|
||||
var elementClasses = Element.getClassNames(element);
|
||||
var newElementClasses = [];
|
||||
var i = 0,
|
||||
arLength = elementClasses.length;
|
||||
for (; i < arLength; i++) {
|
||||
if (elementClasses[i] !== className) {
|
||||
newElementClasses.push(elementClasses[i]);
|
||||
}
|
||||
}
|
||||
element.className = newElementClasses.join(' ');
|
||||
};
|
||||
Element.toggleClass = function(element, className) {
|
||||
if (!Element.hasClass(element, className)) {
|
||||
Element.addClass(element, className);
|
||||
}
|
||||
else {
|
||||
Element.removeClass(element, className);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* Add Event
|
||||
https://github.com/Darklg/JavaScriptUtilities/blob/master/assets/js/vanilla-js/libs/vanilla-events.js
|
||||
-------------------------- */
|
||||
window.addEvent = function(el, eventName, callback) {
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener(eventName, callback, false);
|
||||
}
|
||||
else if (el.attachEvent) {
|
||||
el.attachEvent("on" + eventName, function(e) {
|
||||
return callback.call(el, e);
|
||||
});
|
||||
}
|
||||
};
|
||||
window.eventPreventDefault = function(event) {
|
||||
return (event.preventDefault) ? event.preventDefault() : event.returnValue = false;
|
||||
};
|
||||
|
||||
|
||||
/* Draggable
|
||||
|
||||
Sources :
|
||||
http://jsfiddle.net/5t3Ju/
|
||||
http://stackoverflow.com/questions/9334084/moveable-draggable-div
|
||||
http://jsfiddle.net/tovic/Xcb8d/light/
|
||||
-------------------------- */
|
||||
|
||||
var dragg = function(id) {
|
||||
|
||||
// Variables
|
||||
this.elem = document.getElementById(id),
|
||||
this.selected = null, // Selected element
|
||||
this.dragged = false, // Dragging status
|
||||
this.x_pos = 0, this.y_pos = 0, // Stores x & y coordinates of the mouse pointer
|
||||
this.x_elem = 0, this.y_elem = 0; // Stores top, left values (edge) of the element
|
||||
|
||||
// Start dragging
|
||||
window.addEvent(elem, 'mousedown', function(e){
|
||||
// Prevent firefox native D'n'D behavior
|
||||
window.eventPreventDefault(e);
|
||||
|
||||
selected = elem;
|
||||
x_elem = x_pos - selected.offsetLeft;
|
||||
y_elem = y_pos - selected.offsetTop;
|
||||
});
|
||||
|
||||
// Will be called when user dragging an element
|
||||
window.addEvent(window, 'mousemove', function(e){
|
||||
// Get position
|
||||
x_pos = document.all ? window.event.clientX : e.pageX;
|
||||
y_pos = document.all ? window.event.clientY : e.pageY;
|
||||
|
||||
if (selected !== null) {
|
||||
dragged = true;
|
||||
selected.style.left = (x_pos - x_elem) + 'px';
|
||||
selected.style.top = (y_pos - y_elem) + 'px';
|
||||
}
|
||||
});
|
||||
|
||||
// Destroy the object when we are done
|
||||
window.addEvent(window, 'mouseup', function(e){
|
||||
selected = null;
|
||||
});
|
||||
|
||||
// Handle click event
|
||||
window.addEvent(elem, 'click', function(e){
|
||||
// Prevent default event
|
||||
window.eventPreventDefault(e);
|
||||
|
||||
// Do not prapagate to other click event if dragged out
|
||||
if (dragged) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
// Reset dragging status
|
||||
dragged = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* Smallest DOMReady
|
||||
http://dustindiaz.com/smallest-domready-ever
|
||||
-------------------------- */
|
||||
function domReady(cb) {
|
||||
/in/.test(document.readyState) // in = loadINg
|
||||
? setTimeout('domReady('+cb+')', 9)
|
||||
: cb();
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------
|
||||
Main
|
||||
---------------------------------------------------------- */
|
||||
domReady(function(){
|
||||
// Don't do this in iframe
|
||||
if (window.self !== window.top) {return false;}
|
||||
|
||||
// Set and store meta viewport
|
||||
var meta_viewport = document.querySelector('meta[name="viewport"]');
|
||||
if (meta_viewport === null) {
|
||||
meta_viewport = document.createElement('meta');
|
||||
meta_viewport.setAttribute('name', "viewport");
|
||||
meta_viewport.setAttribute('content', "");
|
||||
document.getElementsByTagName('head')[0].insertBefore(meta_viewport, null);
|
||||
}
|
||||
meta_viewport = document.querySelector('meta[name="viewport"]');
|
||||
meta_viewport_content = meta_viewport.getAttribute('content');
|
||||
|
||||
// Add portal stylesheet
|
||||
var portalStyle = document.createElement("link");
|
||||
portalStyle.setAttribute("rel", "stylesheet");
|
||||
portalStyle.setAttribute("type", "text/css");
|
||||
portalStyle.setAttribute("href", '/ynhpanel.css');
|
||||
document.getElementsByTagName("head")[0].insertBefore(portalStyle, null);
|
||||
|
||||
// Create portal link
|
||||
var portal = document.createElement('a');
|
||||
portal.setAttribute('id', 'ynh-overlay-switch');
|
||||
portal.setAttribute('href', '/yunohost/sso/');
|
||||
portal.setAttribute('class', 'disableAjax');
|
||||
document.body.insertBefore(portal, null);
|
||||
|
||||
// Portal link is draggable, for user convenience
|
||||
dragg('ynh-overlay-switch');
|
||||
|
||||
|
||||
// Create overlay element
|
||||
var overlay = document.createElement("div");
|
||||
overlay.setAttribute("id","ynh-overlay");
|
||||
overlay.setAttribute("style","display:none");
|
||||
|
||||
document.body.insertBefore(overlay, null);
|
||||
|
||||
//Color Application
|
||||
var colors = ['redbg','purpledarkbg','darkbluebg','orangebg','greenbg','darkbluebg','purpledarkbg','yellowbg','lightpinkbg','pinkbg','turquoisebg','yellowbg','lightbluebg','purpledarkbg', 'bluebg'];
|
||||
|
||||
// Get user's app
|
||||
var r = new XMLHttpRequest();
|
||||
r.open("GET", "/ynhpanel.json", true);
|
||||
r.onreadystatechange = function () {
|
||||
// Die if error
|
||||
if (r.readyState != 4 || r.status != 200) return;
|
||||
|
||||
// Response is JSON
|
||||
response = JSON.parse(r.responseText);
|
||||
|
||||
// Add overlay header
|
||||
overlay.innerHTML += '<div id="ynh-user" class="ynh-wrapper info">' +
|
||||
'<ul class="ul-reset user-menu"><li><a class="icon icon-connexion disableAjax" href="'+ response.portal_url +'?action=logout">'+response.t_logout+'</a></li></ul>'+
|
||||
'<a class="user-container user-container-info disableAjax" href="'+ response.portal_url +'edit.html">' +
|
||||
'<h2 class="user-username">'+ response.uid +'</h2>' +
|
||||
'<small class="user-fullname">'+ response.givenName + ' ' + response.sn +'</small>' +
|
||||
'<span class="user-mail">'+ response.mail +'</span>' +
|
||||
'</a>' +
|
||||
'</div>';
|
||||
|
||||
|
||||
// Add application links
|
||||
var links = [];
|
||||
Array.prototype.forEach.call(response.app, function(app, n){
|
||||
randomColorNumber = parseInt(app.name, 36) % colors.length;
|
||||
links.push('<li><a class="'+colors[randomColorNumber]+' disableAjax" href="//'+app.url+'"><span class="first-letter" data-first-letter="'+ app.name.substr(0,2) +'"></span><span class="name">'+app.name+'</span></a></li>');
|
||||
});
|
||||
overlay.innerHTML += '<div id="ynh-apps" class="ynh-wrapper apps"><ul class="listing-apps">'+ links.join("\n") +'</ul></div>';
|
||||
|
||||
// Add footer links
|
||||
overlay.innerHTML += '<div id="ynh-footer" class="ynh-wrapper footer"><nav>' + "\n" +
|
||||
'<a class="link-profile-edit" href="/yunohost/sso/edit.html">'+ response.t_footerlink_edit +'</a>' + "\n" +
|
||||
'<a class="link-documentation" href="//yunohost.org/docs" target="_blank">'+ response.t_footerlink_documentation +'</a>' + "\n" +
|
||||
'<a class="link-documentation" href="//yunohost.org/support" target="_blank">'+ response.t_footerlink_support +'</a>' + "\n" +
|
||||
'<a class="link-admin" href="/yunohost/admin/" target="_blank">'+ response.t_footerlink_administration +'</a>' + "\n" +
|
||||
'</nav></div>';
|
||||
|
||||
// Add overlay to DOM
|
||||
var btn = document.getElementById('logo'),
|
||||
yunoverlay = document.getElementById('ynh-overlay'),
|
||||
user = document.getElementById('ynh-user'),
|
||||
apps = document.getElementById('ynh-apps');
|
||||
|
||||
var pfx = ["webkit", "moz", "MS", "o", ""];
|
||||
function PrefixedEvent(element, type, callback) {
|
||||
for (var p = 0; p < pfx.length; p++) {
|
||||
if (!pfx[p]) type = type.toLowerCase();
|
||||
element.addEventListener(pfx[p]+type, callback, false);
|
||||
}
|
||||
}
|
||||
|
||||
// Bind YNH Button
|
||||
window.addEvent(portal, 'click', function(e){
|
||||
// Prevent default click
|
||||
window.eventPreventDefault(e);
|
||||
// Toggle overlay on YNHPortal button
|
||||
//Element.toggleClass(overlay, 'visible');
|
||||
Element.toggleClass(portal, 'visible');
|
||||
Element.toggleClass(document.querySelector('html'), 'ynh-panel-active');
|
||||
|
||||
|
||||
if(yunoverlay.classList.contains('ynh-active')) {
|
||||
meta_viewport.setAttribute('content', meta_viewport_content);
|
||||
yunoverlay.classList.add('ynh-fadeOut');
|
||||
PrefixedEvent(yunoverlay, "AnimationEnd", function(){
|
||||
if(yunoverlay.classList.contains('ynh-fadeOut')) {
|
||||
yunoverlay.classList.remove('ynh-active');
|
||||
}
|
||||
});
|
||||
}else {
|
||||
meta_viewport.setAttribute('content', "width=device-width");
|
||||
yunoverlay.classList.remove('ynh-fadeOut');
|
||||
yunoverlay.classList.add('ynh-active');
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
r.send();
|
||||
|
||||
});
|
1
brique/assets/js/ynhpanel.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
65
brique/edit.html
Normal file
|
@ -0,0 +1,65 @@
|
|||
<div class="ynh-wrapper user">
|
||||
<ul class="user-menu">
|
||||
<li><a class="icon icon-connexion" href="?action=logout">{{t_logout}}</a></li>
|
||||
</ul>
|
||||
|
||||
<a class="user-container user-container-edit" href="info.html">
|
||||
<h2 class="user-username">{{{uid}}}</h2>
|
||||
<small class="user-fullname">{{givenName}} {{sn}}</small>
|
||||
<span class="user-mail">{{mail}}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="ynh-wrapper edit">
|
||||
<form class="form-edit" role="form" method="POST" action="edit.html">
|
||||
|
||||
<div class="form-section">
|
||||
<div class="form-group">
|
||||
<label for="uid" class="control-label">{{t_username}}</label>
|
||||
<input type="text" id="uid" name="uid" class="form-text" value="{{uid}}" disabled required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="givenName" class="control-label">{{t_fullname}}</label>
|
||||
<input type="text" id="givenName" name="givenName" class="form-text" value="{{givenName}}" placeholder="{{t_firstname}}" required>
|
||||
<input type="text" name="sn" class="form-text" value="{{sn}}" placeholder="{{t_lastname}}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="skin" class="control-label">{{t_skin}}</label>
|
||||
<input type="text" id="skin" name="skin" class="form-text" value="{{skin}}" placeholder="{{t_skin}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="form-group" id="form-add-mail-alias">
|
||||
<label for="mail" class="control-label">{{t_mail_addresses}}</label>
|
||||
<a class="help-link" href="#">?</a>
|
||||
<input type="email" name="mail" class="form-text" value="{{mail}}" placeholder="{{t_new_mail}}" required>
|
||||
{{#mailalias}}
|
||||
<input type="email" name="mailalias[]" class="form-text" value="{{.}}">
|
||||
{{/mailalias}}
|
||||
<input id="mail" type="email" name="mailalias[]" class="mailalias-input form-text" placeholder="{{t_new_mail}}">
|
||||
<a class="btn link-btn" id="add-mailalias">{{t_add_mail}}</a>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="form-add-mail-drop">
|
||||
<label for="mailforward" class="control-label">{{t_mail_forward}}</label>
|
||||
<a class="help-link" href="#">?</a>
|
||||
{{#maildrop}}
|
||||
<input type="email" name="maildrop[]" class="form-text" value="{{.}}">
|
||||
{{/maildrop}}
|
||||
<input id="mailforward" type="email" name="maildrop[]" class="maildrop-input form-text" placeholder="{{t_new_forward}}">
|
||||
<a class="btn link-btn" id="add-maildrop">{{t_add_forward}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<a href="info.html" class="btn large-btn">{{t_cancel}}</a>
|
||||
<input type="submit" class="btn classic-btn large-btn" value="{{t_ok}}">
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<a href="password.html" class="btn validate-btn large-btn">{{t_change_password}}</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
15
brique/footer.ms
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{#connected}}
|
||||
<div class="ynh-wrapper footer"><nav>
|
||||
<a class="link-profile-edit" href="/yunohost/sso/edit.html">{{t_footerlink_edit}}</a>
|
||||
<a class="link-documentation" href="//yunohost.org/docs" target="_blank">{{t_footerlink_documentation}}</a>
|
||||
<a class="link-documentation" href="//yunohost.org/support" target="_blank">{{t_footerlink_support}}</a>
|
||||
<a class="link-admin" href="/yunohost/admin/" target="_blank">{{t_footerlink_administration}}</a>
|
||||
</nav></div>
|
||||
{{/connected}}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="assets/js/global.js"></script>
|
||||
</body>
|
||||
</html>
|
53
brique/header.ms
Normal file
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{t_portal}}</title>
|
||||
|
||||
<!-- Responsive -->
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1" />
|
||||
|
||||
<!-- Do not index SSOWat pages -->
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<!-- Stylesheets -->
|
||||
<link rel="stylesheet" href="assets/css/ynh-style.css">
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="shortcut icon" href="assets/icons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="assets/icons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="assets/icons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="assets/icons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="assets/icons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="assets/icons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="assets/icons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="assets/icons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="assets/icons/apple-touch-icon-152x152.png">
|
||||
<link rel="icon" type="image/png" href="assets/icons/favicon-196x196.png" sizes="196x196">
|
||||
<link rel="icon" type="image/png" href="assets/icons/favicon-160x160.png" sizes="160x160">
|
||||
<link rel="icon" type="image/png" href="assets/icons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="assets/icons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="assets/icons/favicon-32x32.png" sizes="32x32">
|
||||
<meta name="msapplication-TileColor" content="#41444f">
|
||||
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
|
||||
</head>
|
||||
<body class="{{#connected}}logged{{/connected}}">
|
||||
|
||||
<h1 id="logo" class="logo">
|
||||
<img src="assets/img/logo-ynh-white.svg"/><span class="element-invisible">Yunohost</span>
|
||||
</h1>
|
||||
|
||||
<div class="overlay">
|
||||
{{#flash_win}}
|
||||
<div class="wrapper messages success">{{.}}</div>
|
||||
{{/flash_win}}
|
||||
|
||||
{{#flash_fail}}
|
||||
<div class="wrapper messages danger">{{.}}</div>
|
||||
{{/flash_fail}}
|
||||
|
||||
{{#flash_info}}
|
||||
<div class="wrapper messages info">{{.}}</div>
|
||||
{{/flash_info}}
|
||||
|
20
brique/info.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<div class="ynh-wrapper user">
|
||||
<ul class="user-menu">
|
||||
<li><a class="icon icon-connexion" href="?action=logout">{{t_logout}}</a></li>
|
||||
</ul>
|
||||
|
||||
<a class="user-container user-container-info" href="edit.html">
|
||||
<h2 class="user-username">{{{uid}}}</h2>
|
||||
<small class="user-fullname">{{givenName}} {{sn}}</small>
|
||||
<span class="user-mail">{{mail}}</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="apps" class="wrapper apps">
|
||||
<ul class="listing-apps">
|
||||
{{#app}}
|
||||
<li><a href="https://{{url}}"><span class="first-letter"></span><span class="name">{{name}}</span></a></li>
|
||||
{{/app}}
|
||||
</ul>
|
||||
</div>
|
41
brique/locales/de.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"add_forward": "E-Mail Weiterleitung hinzufügen",
|
||||
"add_mail": "E-Mail Alias hinzufügen",
|
||||
"cancel": "Abbrechen",
|
||||
"change_password": "Passwort ändern",
|
||||
"confirm": "Bestätigen",
|
||||
"current_password": "Aktuelles Passwort",
|
||||
"edit": "Bearbeiten",
|
||||
"footerlink_administration": "Verwaltung",
|
||||
"footerlink_documentation": "Dokumentation",
|
||||
"footerlink_edit": "Mein Profil bearbeiten",
|
||||
"footerlink_support": "Support",
|
||||
"fullname": "Vollständiger Name",
|
||||
"information": "Deine Informationen",
|
||||
"information_updated": "Informationen wurden aktualisiert",
|
||||
"invalid_domain": "Ungültige Domain angegeben",
|
||||
"invalid_mail": "Ungültige E-Mail Adresse",
|
||||
"invalid_mailforward": "Ungültige E-Mail Weiterleitung",
|
||||
"logged_out": "Ausgeloggt",
|
||||
"login": "Anmelden",
|
||||
"logout": "Abmelden",
|
||||
"mail_addresses": "E-Mail Adressen",
|
||||
"mail_already_used": "Diese E-Mail Adresse wird bereits verwendet:",
|
||||
"mail_forward": "E-Mail Weiterleitung",
|
||||
"missing_required_fields": "Benötigte Felder fehlen",
|
||||
"new_forward": "neueweiterleitung@anderedomain.org",
|
||||
"new_mail": "neuemail@meinedomain.org",
|
||||
"new_password": "Neues Passwort",
|
||||
"ok": "OK",
|
||||
"password": "Passwort",
|
||||
"password_changed": "Passwort erfolgreich geändert",
|
||||
"password_changed_error": "Beim Ändern des Passworts ist ein Fehler aufgetreten",
|
||||
"password_not_match": "Die neuen Passwörter stimmen nicht überein",
|
||||
"please_login": "Bitte logge dich ein, um auf diesen Inhalt zu zugreifen",
|
||||
"please_login_from_portal": "Bitte logge dich am Portal ein",
|
||||
"portal": "YunoHost Portal",
|
||||
"user_saving_fail": "Ein Fehler trat beim Speichern der Änderungen auf",
|
||||
"username": "Benutzername",
|
||||
"wrong_current_password": "Aktuelles Passwort ist falsch",
|
||||
"wrong_username_password": "Falscher Benutzername oder Passwort"
|
||||
}
|
42
brique/locales/en.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"portal": "YunoHost Portal",
|
||||
"information": "Your information",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"fullname": "Fullname",
|
||||
"mail_addresses": "Mail addresses",
|
||||
"mail_forward": "Mail forward",
|
||||
"new_mail": "newmail@mydomain.org",
|
||||
"new_forward": "newforward@myforeigndomain.org",
|
||||
"add_mail": "Add a mail alias",
|
||||
"add_forward": "Add a mail forward",
|
||||
"ok": "OK",
|
||||
"cancel": "Cancel",
|
||||
"change_password": "Change password",
|
||||
"edit": "Edit",
|
||||
"current_password": "Current password",
|
||||
"new_password": "New password",
|
||||
"confirm": "Confirm",
|
||||
"login": "Login",
|
||||
"logout": "Logout",
|
||||
"skin": "Skin",
|
||||
"password_changed": "Password successfully changed",
|
||||
"password_changed_error": "An error occurred on password changing",
|
||||
"password_not_match": "New passwords don't match",
|
||||
"wrong_current_password": "Current password is wrong",
|
||||
"invalid_mail": "Invalid mail address",
|
||||
"invalid_domain": "Invalid domain in",
|
||||
"invalid_mailforward": "Invalid mail forward address",
|
||||
"mail_already_used": "Mail address already used:",
|
||||
"information_updated": "Information updated",
|
||||
"user_saving_fail": "An error occurred on user's modification saving",
|
||||
"missing_required_fields": "Required fields are missing",
|
||||
"wrong_username_password": "Wrong username or password",
|
||||
"logged_out": "Logged out",
|
||||
"please_login": "Please log in to access to this content",
|
||||
"please_login_from_portal": "Please log in from the portal",
|
||||
"footerlink_edit": "Edit my profile",
|
||||
"footerlink_documentation": "Documentation",
|
||||
"footerlink_support": "Support",
|
||||
"footerlink_administration": "Administration"
|
||||
}
|
41
brique/locales/es.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"add_forward": "Añadir un adelante de correo electrónico ",
|
||||
"add_mail": "Añadir un alias de correo electrónico ",
|
||||
"cancel": "Cancelar",
|
||||
"change_password": "Cambiar la contraseña",
|
||||
"confirm": "Confirmar",
|
||||
"current_password": "Contraseña actual",
|
||||
"edit": "Editar",
|
||||
"footerlink_administration": "Administración",
|
||||
"footerlink_documentation": "Documentación",
|
||||
"footerlink_edit": "Cambiar mi perfil",
|
||||
"footerlink_support": "Apoyo",
|
||||
"fullname": "Nombre completo",
|
||||
"information": "Su información ",
|
||||
"information_updated": "Información actualizada ",
|
||||
"invalid_domain": "Dominio no válido en la",
|
||||
"invalid_mail": "Dirección de correo electrónico no es válido",
|
||||
"invalid_mailforward": "Adelante dirección de correo electrónico no es válido",
|
||||
"logged_out": "Sesión cerrada",
|
||||
"login": "Login",
|
||||
"logout": "Logout",
|
||||
"mail_addresses": "Direcciones de correo electrónico",
|
||||
"mail_already_used": "Mail ya utilizado:",
|
||||
"mail_forward": "Adelante correo electrónico",
|
||||
"missing_required_fields": "Los campos necesarios están desaparecidos",
|
||||
"new_forward": "nuevoadelante@miextranjerodominio.org",
|
||||
"new_mail": "nuevomail@midominio.org",
|
||||
"new_password": "Nueva contraseña",
|
||||
"ok": "OK",
|
||||
"password": "Contraseña",
|
||||
"password_changed": "Contraseña se ha cambiado satisfactoriamente",
|
||||
"password_changed_error": "Se produjo un error en el cambio de contraseña ",
|
||||
"password_not_match": "Las nuevas contraseñas no coinciden",
|
||||
"please_login": "Por favor, inicie sesión para acceder a este contenido",
|
||||
"please_login_from_portal": "Por favor, iniciar sesión desde el portal",
|
||||
"portal": "Portal YunoHost",
|
||||
"user_saving_fail": "Se produjo un error en el ahorro de la modificación del usuario ",
|
||||
"username": "Nombre de usuario",
|
||||
"wrong_current_password": "La contraseña actual es incorrecto",
|
||||
"wrong_username_password": "Nombre de usuario o contraseña incorrectos"
|
||||
}
|
42
brique/locales/fr.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"add_forward": "Ajouter une adresse de transfert",
|
||||
"add_mail": "Ajouter une adresse email",
|
||||
"cancel": "Annuler",
|
||||
"change_password": "Changer de mot de passe",
|
||||
"confirm": "Confirmation",
|
||||
"current_password": "Mot de passe actuel",
|
||||
"edit": "Éditer",
|
||||
"footerlink_administration": "Administration",
|
||||
"footerlink_documentation": "Documentation",
|
||||
"footerlink_edit": "Éditer mon profil",
|
||||
"footerlink_support": "Support",
|
||||
"fullname": "Nom complet",
|
||||
"information": "Vos informations",
|
||||
"information_updated": "Informations mises à jour",
|
||||
"invalid_domain": "Nom de domaine invalide dans",
|
||||
"invalid_mail": "Adresse email invalide",
|
||||
"invalid_mailforward": "Adresse email de transfert invalide",
|
||||
"logged_out": "Déconnecté",
|
||||
"login": "Connexion",
|
||||
"logout": "Déconnexion",
|
||||
"skin": "Skin",
|
||||
"mail_addresses": "Adresses email",
|
||||
"mail_already_used": "Adresse déjà utilisée :",
|
||||
"mail_forward": "Adresses de transfert",
|
||||
"missing_required_fields": "Champs requis manquants",
|
||||
"new_forward": "nouveau_transfert@domainedistant.org",
|
||||
"new_mail": "nouvelle_adresse@domaine.org",
|
||||
"new_password": "Nouveau mot de passe",
|
||||
"ok": "Valider",
|
||||
"password": "Mot de passe",
|
||||
"password_changed": "Mot de passe modifié",
|
||||
"password_changed_error": "Une erreur s'est produite lors du changement de mot de passe",
|
||||
"password_not_match": "Les nouveaux mots de passe ne correspondent pas",
|
||||
"please_login": "Veuillez vous identifier pour accéder à cette page",
|
||||
"please_login_from_portal": "Veuillez vous identifiez depuis le portail",
|
||||
"portal": "Portail YunoHost",
|
||||
"user_saving_fail": "Une erreur s'est produite lors de la modification des informations",
|
||||
"username": "Nom d'utilisateur",
|
||||
"wrong_current_password": "Le mot de passe actuel est incorrect",
|
||||
"wrong_username_password": "Nom d'utilisateur ou mot de passe incorrect"
|
||||
}
|
1
brique/locales/hi.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
41
brique/locales/it.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"add_forward": "Aggiungi un inoltro email",
|
||||
"add_mail": "Aggiungi un alias email",
|
||||
"cancel": "Annulla",
|
||||
"change_password": "Cambia password",
|
||||
"confirm": "Conferma",
|
||||
"current_password": "Password attuale",
|
||||
"edit": "Modifica",
|
||||
"footerlink_administration": "Amministrazione",
|
||||
"footerlink_documentation": "Documentazione",
|
||||
"footerlink_edit": "Modifica il mio profilo",
|
||||
"footerlink_support": "Supporto",
|
||||
"fullname": "Nome completo",
|
||||
"information": "Le tue informazioni",
|
||||
"information_updated": "Informazioni aggiornate",
|
||||
"invalid_domain": "Dominio non valido",
|
||||
"invalid_mail": "Indirizzo email non valido",
|
||||
"invalid_mailforward": "Indirizzo di inoltro email non valido",
|
||||
"logged_out": "Uscita effettuata",
|
||||
"login": "Accedi",
|
||||
"logout": "Esci",
|
||||
"mail_addresses": "Indirizzo email",
|
||||
"mail_already_used": "Indirizzo email già utilizzato:",
|
||||
"mail_forward": "Email di inoltro",
|
||||
"missing_required_fields": "Campi obbligatori non compilati",
|
||||
"new_forward": "nuovoinoltro@miodominiodifferente.org",
|
||||
"new_mail": "nuovaemail@miodominio.org",
|
||||
"new_password": "Nuova password",
|
||||
"ok": "OK",
|
||||
"password": "Password",
|
||||
"password_changed": "Password cambiata con successo",
|
||||
"password_changed_error": "Si è verificato un errore durante il cambio password",
|
||||
"password_not_match": "Le nuove password non corrispondono",
|
||||
"please_login": "Per favore, accedi per visualizzare il contenuto",
|
||||
"please_login_from_portal": "Per favore, accedi dal portale",
|
||||
"portal": "Portale YunoHost",
|
||||
"user_saving_fail": "Si è verificato un errore durante il salvataggio delle modifiche dell'utente",
|
||||
"username": "Nome utente",
|
||||
"wrong_current_password": "La password attuale è sbagliata",
|
||||
"wrong_username_password": "Nome utente o password sbagliati"
|
||||
}
|
41
brique/locales/nl.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"add_forward": "Voeg een email forward toe",
|
||||
"add_mail": "Voeg een emailalias toe",
|
||||
"cancel": "Annuleren",
|
||||
"change_password": "Verander wachtwoord",
|
||||
"confirm": "Bevestigen",
|
||||
"current_password": "Huidig wachtwoord",
|
||||
"edit": "Bewerken",
|
||||
"footerlink_administration": "Administratie",
|
||||
"footerlink_documentation": "Documentatie",
|
||||
"footerlink_edit": "Bewerk mijn profiel",
|
||||
"footerlink_support": "Ondersteuning",
|
||||
"fullname": "Volledige naam",
|
||||
"information": "Uw informatie",
|
||||
"information_updated": "Informatie bijgewerkt",
|
||||
"invalid_domain": "Ongeldig domein",
|
||||
"invalid_mail": "Ongeldig emailadres",
|
||||
"invalid_mailforward": "Ongeldig email-forward adres ",
|
||||
"logged_out": "Uitgelogd ",
|
||||
"login": "Inloggen",
|
||||
"logout": "Uitloggen",
|
||||
"mail_addresses": "Emailadressen",
|
||||
"mail_already_used": "Emailadres al gebruikt:",
|
||||
"mail_forward": "Email forward",
|
||||
"missing_required_fields": "Verplichte velden zijn niet ingevuld",
|
||||
"new_forward": "nieuwe_forward@mijndomein.org",
|
||||
"new_mail": "nieuwe_email@mijndomein.org",
|
||||
"new_password": "Nieuw wachtwoord",
|
||||
"ok": "Ok",
|
||||
"password": "Wachtwoord",
|
||||
"password_changed": "Wachtwoord successvol verandert",
|
||||
"password_changed_error": "Er is een fout opgetreden bij het veranderen van het wachtwoord",
|
||||
"password_not_match": "Nieuwe wachtwoorden zijn niet gelijk",
|
||||
"please_login": "Log in om toegang te krijgen tot deze inhoud",
|
||||
"please_login_from_portal": "Log in vanaf het portaal",
|
||||
"portal": "YunoHost Portaal",
|
||||
"user_saving_fail": "Er is een fout opgetreden bij het opslaan van wijzigingen aan gebruiker",
|
||||
"username": "Gebruikersnaam",
|
||||
"wrong_current_password": "Huidig wachtwoord is verkeerd",
|
||||
"wrong_username_password": "Verkeerde gebruikersnaam of wachtwoord"
|
||||
}
|
29
brique/locales/pl.json
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"add_mail": "Dodaj dodatkowy email",
|
||||
"cancel": "Anuluj",
|
||||
"change_password": "Zmień hasło",
|
||||
"confirm": "Potwierdź",
|
||||
"current_password": "Aktualne hasło",
|
||||
"edit": "Edytuj",
|
||||
"footerlink_administration": "Panel administracyjny",
|
||||
"footerlink_documentation": "Dokumentacja",
|
||||
"footerlink_edit": "Edytuj mój profil",
|
||||
"footerlink_support": "Pomoc techniczna",
|
||||
"fullname": "Imię i nazwisko",
|
||||
"information": "Your information",
|
||||
"logged_out": "Wylogowany",
|
||||
"login": "Zaloguj",
|
||||
"logout": "Wyloguj",
|
||||
"mail_addresses": "Adresy E-mail",
|
||||
"mail_already_used": "Ten adres e-mail aktualnie w użyciu:",
|
||||
"new_forward": "newforward@myforeigndomain.org",
|
||||
"new_mail": "nowymail@domena.org",
|
||||
"new_password": "Nowe hasło",
|
||||
"ok": "Akceptuj",
|
||||
"password": "Hasło",
|
||||
"password_changed": "Hasło zmienione",
|
||||
"please_login": "Proszę się zalogować by uzyskać dostęp do tej strony",
|
||||
"portal": "YunoHost Portal",
|
||||
"username": "Nazwa użytkownika",
|
||||
"wrong_username_password": "Zła nazwa użytkownika lub hasło"
|
||||
}
|
41
brique/locales/pt.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"add_forward": "Adicionar reencaminhamento de mensagem",
|
||||
"add_mail": "Adicionar nova etiqueta a mensagens",
|
||||
"cancel": "Cancelar",
|
||||
"change_password": "Alterar senha",
|
||||
"confirm": "Confirmar",
|
||||
"current_password": "Senha atual",
|
||||
"edit": "Editar",
|
||||
"footerlink_administration": "Administração",
|
||||
"footerlink_documentation": "Documentação",
|
||||
"footerlink_edit": "Editar o meu perfil",
|
||||
"footerlink_support": "Suporte",
|
||||
"fullname": "Nome completo",
|
||||
"information": "Informação pessoal",
|
||||
"information_updated": "Informação atualizada",
|
||||
"invalid_domain": "Domínio inválido em",
|
||||
"invalid_mail": "Endereço de correio inválido",
|
||||
"invalid_mailforward": "Endereço de correio para reencaminhamento inválido",
|
||||
"logged_out": "Sessão terminada",
|
||||
"login": "Iniciar sessão",
|
||||
"logout": "Terminar sessão",
|
||||
"mail_addresses": "Correio eletrónico",
|
||||
"mail_already_used": "O endereço de correio já está utilizado.",
|
||||
"mail_forward": "Reencaminhar mensagem",
|
||||
"missing_required_fields": "Campos obrigatórios em falta",
|
||||
"new_forward": "novoreenvio@dominioexterno.org",
|
||||
"new_mail": "novomail@meudominio.org",
|
||||
"new_password": "Nova senha",
|
||||
"ok": "Confirmar",
|
||||
"password": "Senha",
|
||||
"password_changed": "Senha alterada com êxito",
|
||||
"password_changed_error": "Ocorreu um erro durante a alteração da senha",
|
||||
"password_not_match": "As senhas novas não coincidem",
|
||||
"please_login": "Por favor inicie sessão para aceder a este conteúdo",
|
||||
"please_login_from_portal": "Por favor inicie sessão no portal",
|
||||
"portal": "Portal YunoHost",
|
||||
"user_saving_fail": "Ocorreu um erro ao guardar as modificações do utilizador.",
|
||||
"username": "Nome de utilizador",
|
||||
"wrong_current_password": "Senha atual está errada",
|
||||
"wrong_username_password": "Nome de utilizador e senha errados"
|
||||
}
|
41
brique/locales/tr.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"add_forward": "E-posta yönlendirmesi ekle",
|
||||
"add_mail": "E-posta alias'ı ekle",
|
||||
"cancel": "İptal",
|
||||
"change_password": "Parolayı değiştir",
|
||||
"confirm": "Onayla",
|
||||
"current_password": "Mevcut parola",
|
||||
"edit": "Düzenle",
|
||||
"footerlink_administration": "Yönetim",
|
||||
"footerlink_documentation": "Belgelendirme",
|
||||
"footerlink_edit": "Profilimi düzenle",
|
||||
"footerlink_support": "Destek",
|
||||
"fullname": "İsim",
|
||||
"information": "Bilgileriniz",
|
||||
"information_updated": "Bilgileriniz güncellendi",
|
||||
"invalid_domain": "Geçersiz domain",
|
||||
"invalid_mail": "Geçersiz e-posta adresi",
|
||||
"invalid_mailforward": "Geçersiz e-posta yönlendirme adresi",
|
||||
"logged_out": "Çıkış yapıldı",
|
||||
"login": "Giriş yap",
|
||||
"logout": "Çıkış yap",
|
||||
"mail_addresses": "E-posta adresleri",
|
||||
"mail_already_used": "Mail adresi zaten kullanılıyor",
|
||||
"mail_forward": "E-posta yönlendirme",
|
||||
"missing_required_fields": "Gerekli alanlar eksik",
|
||||
"new_forward": "newforward@myforeigndomain.org",
|
||||
"new_mail": "newmail@mydomain.org",
|
||||
"new_password": "Yeni parola",
|
||||
"ok": "Tamam",
|
||||
"password": "Parola",
|
||||
"password_changed": "Parola başarıyla değiştirildi",
|
||||
"password_changed_error": "Parola değiştirirken hata oluştu",
|
||||
"password_not_match": "Parolalar uyuşmuyor",
|
||||
"please_login": "Bu içeriğe erişmek için lütfen giriş yapınız",
|
||||
"please_login_from_portal": "Lütfen portaldan giriş yapınız",
|
||||
"portal": "YunoHost Portalı",
|
||||
"user_saving_fail": "Değişiklikler kaydedilirken hata oluştu",
|
||||
"username": "Kullanıcı adı",
|
||||
"wrong_current_password": "Mevcut parola yanlış",
|
||||
"wrong_username_password": "Yanlış kullanıcı adı veya parola"
|
||||
}
|
13
brique/login.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div class="ynh-wrapper login">
|
||||
<form class="login-form" name="input" action="" method="post">
|
||||
<div class="form-group">
|
||||
<label class="icon icon-user" for="user"><span class="element-invisible">{{t_username}}</span></label>
|
||||
<input id="user" type="text" name="user" placeholder="{{t_username}}" class="form-text" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="icon icon-lock" for="password"><span class="element-invisible">{{t_password}}</span></label>
|
||||
<input id="password" type="password" name="password" placeholder="{{t_password}}" class="form-text" required>
|
||||
</div>
|
||||
<input type="submit" value="{{t_login}}" class="btn classic-btn large-btn">
|
||||
</form>
|
||||
</div>
|
33
brique/password.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<div class="ynh-wrapper user">
|
||||
<ul class="user-menu">
|
||||
<li><a class="icon icon-connexion" href="?action=logout">{{t_logout}}</a></li>
|
||||
</ul>
|
||||
<a class="user-container user-container-password" href="info.html">
|
||||
<h2 class="user-username">{{{uid}}}</h2>
|
||||
<small class="user-fullname">{{givenName}} {{sn}}</small>
|
||||
<span class="user-mail">{{mail}}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="ynh-wrapper password">
|
||||
<form class="form-password" role="form" method="POST" action="password.html">
|
||||
|
||||
<div class="form-section">
|
||||
<div class="form-group">
|
||||
<label for="currentpassword">{{t_current_password}}</label>
|
||||
<input type="password" class="form-text" id="currentpassword" name="currentpassword" placeholder="•••••" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-section">
|
||||
<div class="form-group">
|
||||
<label for="newpassword">{{t_new_password}}</label>
|
||||
<input type="password" class="form-text" id="newpassword" name="newpassword" placeholder="•••••" required>
|
||||
<input type="password" class="form-text" id="confirm" name="confirm" placeholder="{{t_confirm}}" required>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<a href="info.html" class="btn large-btn btn-default">{{t_cancel}}</a>
|
||||
<input type="submit" class="btn large-btn classic-btn" value="{{t_ok}}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
|
@ -391,7 +391,7 @@ function serve(uri)
|
|||
end
|
||||
|
||||
-- Try to get file content
|
||||
local content = read_file(script_path.."portal"..rel_path)
|
||||
local content = read_file(script_path..conf["skin"]..rel_path)
|
||||
if not content then
|
||||
return ngx.exit(ngx.HTTP_NOT_FOUND)
|
||||
end
|
||||
|
@ -477,6 +477,7 @@ function get_data_for(view)
|
|||
data = {
|
||||
connected = true,
|
||||
portal_url = conf.portal_url,
|
||||
skin = conf.skin,
|
||||
uid = user,
|
||||
cn = cache:get(user.."-cn"),
|
||||
sn = cache:get(user.."-sn"),
|
||||
|
|