restruc
@@ -4,21 +4,9 @@ use Mojo::Template;
|
||||
use Dojo::Support qw{ log dmph merge_hash load_module get_names};
|
||||
sub tst{
|
||||
my $c=shift;
|
||||
# $c->stash( merge_hash(
|
||||
# (load_module("home/tst"))[0],
|
||||
# (load_module("home/contact"))[0]
|
||||
#));
|
||||
# $c->stash(apend => ["home/contact"]);
|
||||
#$c->stash( (load_module("home/tst"))[0] );
|
||||
#$c->stash(layout=> "defaultContact");
|
||||
#my $x = [get_names("public/home/cal/img/")];
|
||||
#log("@$x");
|
||||
#$c->stash( ilist => $x);
|
||||
#$c->dbv->tst;
|
||||
$c->render(text=> $c->config->{radio}{'channel'});
|
||||
|
||||
}
|
||||
|
||||
# User ========================================================================
|
||||
sub home_ {
|
||||
my $c = shift;
|
||||
@@ -27,32 +15,32 @@ sub tst{
|
||||
|
||||
sub home {
|
||||
my $c = shift;
|
||||
$c->stash((load_module("home/home"))[0]);
|
||||
$c->stash( $c->dbv->mod) ;
|
||||
$c->stash(layout=>'default');
|
||||
}
|
||||
|
||||
sub pang {
|
||||
my $c = shift;
|
||||
my ($v,$w)=load_module("home/pang");
|
||||
$c->stash($v);
|
||||
$c->stash( $c->dbv->md_to_hash(@{$w->{'md'}}) );
|
||||
my $h=$c->dbv->pang_md;
|
||||
map { $c->stash( $_ => $h->{$_}) } keys %$h;
|
||||
$c->stash(layout=>'default');
|
||||
|
||||
}
|
||||
|
||||
sub cal {
|
||||
my $c = shift;
|
||||
$c->stash((load_module("home/cal"))[0]);
|
||||
my $data=$c->dbv->calendar_events;
|
||||
my $block=$c->dbv->calendar_monthblock;
|
||||
my %hdata;
|
||||
map{ push @{ $hdata{$_->{bid}} },$_; }(@$data);
|
||||
$c->stash( r=>\%hdata, b=>$block);
|
||||
my %h;
|
||||
map{ push @{ $h{$_->{bid}} },$_; }(@$data);
|
||||
$c->stash( r=>\%h, b=>$block);
|
||||
$c->stash(layout=>'default');
|
||||
}
|
||||
|
||||
sub event{
|
||||
my $c = shift;
|
||||
$c->stash((load_module("home/event"))[0]);
|
||||
$c->stash(layout=> "defaultContact");
|
||||
$c->stash($c->dbv->event($c->param("id")));
|
||||
$c->stash(layout=> "defaultContact");
|
||||
}
|
||||
|
||||
sub contact{
|
||||
@@ -67,7 +55,7 @@ sub tst{
|
||||
);
|
||||
$c->redirect_to('contact2');
|
||||
}else{
|
||||
$c->stash((load_module("home/contact"))[0]);
|
||||
$c->stash(layout=>'default');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,22 +63,17 @@ sub tst{
|
||||
my $c = shift;
|
||||
$c->redirect_to("home") unless $c->flash('mname');
|
||||
$c->stash( mname=>$c->flash('mname'));
|
||||
$c->stash((load_module("home/contact2"))[0]);
|
||||
$c->stash(layout=>'default');
|
||||
}
|
||||
|
||||
sub store{
|
||||
my $c = shift;
|
||||
$c->stash((load_module("home/store"))[0]);
|
||||
$c->stash( r=>$c->dbv->store);
|
||||
$c->stash(layout=> "defaultContact");
|
||||
}
|
||||
|
||||
sub tv{
|
||||
my $c = shift;
|
||||
$c->stash( merge_hash(
|
||||
(load_module("home/tv"))[0],
|
||||
(load_module("home/tv/trans"))[0]
|
||||
));
|
||||
$c->stash( videos=>$c->dbv->tv_videos, table=>$c->dbv->tv_series);
|
||||
$c->stash(layout=> "defaultContact");
|
||||
}
|
||||
|
||||
@@ -12,39 +12,43 @@ use DBI;
|
||||
use Dojo::Conf;
|
||||
|
||||
sub new { bless {}, shift };
|
||||
my $data_path = path('lib/Dojo/Model/Data')->make_path;
|
||||
#just for fun
|
||||
|
||||
# Read vdg user ===============================================================
|
||||
# mensaje del día:mod,rmod,yt,fb,sc
|
||||
sub mod{
|
||||
my $q="select nombre,contenido from casa;";
|
||||
my %h=map{ $_->{nombre} => $_->{contenido}}@{_read($q)};
|
||||
return %h;
|
||||
}
|
||||
|
||||
sub md_to_hash{
|
||||
my ($self,@filelist)=@_;
|
||||
return {map { basename($_,".md") => load_md("public/$_")}@filelist};
|
||||
sub pang_md{
|
||||
my $c=shift;
|
||||
my %h = map {$_=> markdown(decode_utf8($data_path->child('pang/'.$_.'.md')->slurp))}
|
||||
("pang","helen","benjamin");
|
||||
return \%h;
|
||||
}
|
||||
|
||||
sub calendar_monthblock {
|
||||
return _read (path("public/home/cal/q1Block.q")->slurp);
|
||||
return _read ($data_path->child("cal/q1Block.q")->slurp);
|
||||
}
|
||||
sub calendar_events {
|
||||
return _read (path("public/home/cal/q3Event.q")->slurp);
|
||||
return _read ($data_path->child("cal/q3Event.q")->slurp);
|
||||
}
|
||||
|
||||
sub event{
|
||||
my ($self,$id)=@_;
|
||||
return shift @{ _read (path("public/home/event/qEvent.q")->slurp,$id)};
|
||||
my ($c,$id)=@_;
|
||||
return shift @{ _read ($data_path->child("event/qEvent.q")->slurp,$id)};
|
||||
}
|
||||
sub store{
|
||||
return _read (path("public/home/store/qStore.q")->slurp);
|
||||
return _read ($data_path->child("/store/qStore.q")->slurp);
|
||||
}
|
||||
sub tv_videos{
|
||||
return _read (path("public/home/tv/qSeries.q")->slurp); #group,name
|
||||
return _read ($data_path->child("/tv/qSeries.q")->slurp); #group,name
|
||||
}
|
||||
sub tv_series{
|
||||
return _read (path("public/home/tv/qTable.q")->slurp); #name,order,group
|
||||
return _read ($data_path->child("/tv/qTable.q")->slurp); #name,order,group
|
||||
}
|
||||
sub podcast_txt{
|
||||
# return "Hemos desarrollado con mucho cariño ejercicios gratuitos y descargables que pueden ser practicados por cualquier persona aún antes de asistir a uno de los cursos de instrucción.";
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/usr/bin/perl -s
|
||||
use warnings;
|
||||
use strict;
|
||||
#---
|
||||
use Cwd 'abs_path';
|
||||
use lib abs_path("../../")."/sibelius2/conf";
|
||||
use Paths;
|
||||
use Init;
|
||||
use ServerVars;
|
||||
use Net::Telnet;
|
||||
use MIME::Lite;
|
||||
use JSON;
|
||||
#-------------
|
||||
### MimeLite necesita sendmail, para arch, sendmail esta sin atender,
|
||||
### puedes usar msmtp msmtp-mta para simular sendmail. este ultimo
|
||||
### necesita configurarse con un correo.
|
||||
|
||||
my ($mod_name,$sid) = @ARGV;
|
||||
my %var = (Init::modInit($sid),%ServerVars::sk);
|
||||
my $server_name = $var{'chat_srv'};
|
||||
|
||||
my @arr;
|
||||
push (@arr,{name=>"one",tag=>"notag"});
|
||||
|
||||
|
||||
my $to = 'benjamuga@gmail.com';
|
||||
my $from = 'mensajes@vuelodegrulla.com';
|
||||
my $subject = "Mensaje de $var{'mname'}";
|
||||
my $message = "Enviado por:
|
||||
<h1>$var{'mname'}</h1>
|
||||
<h2>correo:</br>$var{'mail'}<h2>
|
||||
<p>$var{'msg'}</p>
|
||||
";
|
||||
|
||||
my $msg = MIME::Lite->new(
|
||||
From => $from,
|
||||
To => $to,
|
||||
Subject => $subject,
|
||||
Data => $message
|
||||
);
|
||||
|
||||
$msg->attr("content-type" => "text/html");
|
||||
$msg->send;
|
||||
|
||||
print encode_json( \@arr ) ."\n";
|
||||
|
||||
1
|
||||
__END__
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
/* c#host localhost*/
|
||||
/* c#database #dbmsg */
|
||||
/* c#user #dbmsg_w */
|
||||
/* c#password #dbmsg_wp */
|
||||
/* c#write write*/
|
||||
|
||||
|
||||
|
||||
insert into entrada
|
||||
(nombre,correo,pagina,texto,fecha)
|
||||
values
|
||||
( q#mname , q#mail , q#wp , q#msg ,now() );
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
|
||||
/* c#host localhost*/
|
||||
/* c#database #dbdata */
|
||||
/* c#user #dbdata_user */
|
||||
/* c#password #dbdata_pass */
|
||||
|
||||
|
||||
|
||||
select
|
||||
nombre as "tag",
|
||||
contenido as "uContent"
|
||||
from casa;
|
||||
|
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 589 KiB After Width: | Height: | Size: 589 KiB |
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
@@ -1,31 +0,0 @@
|
||||
<section class="spacer"></section>
|
||||
|
||||
<section id="trs" class="trans header">
|
||||
<h2 class="textHead"> Nuestro querido maestro Pang He Ming </h3>
|
||||
</section>
|
||||
<section class=" trans content flex">
|
||||
<article id="apang" class="imageHead"></article>
|
||||
<article class="text">
|
||||
<!-- ##pang.txt -->
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section id="trs" class="trans header">
|
||||
<h2 class="textHead"> Los maestros Zhang Qing (Helen) y Qiu Fu Chun (Karl). </h3>
|
||||
</section>
|
||||
<section class=" trans content flex">
|
||||
<article id="ahel" class="imageHead"></article>
|
||||
<article class="text">
|
||||
<!-- ##helen.txt -->
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section id="trs" class="trans header">
|
||||
<h2 class="textHead"> Instructor Benjamín Munñóz </h3>
|
||||
</section>
|
||||
<section class=" trans content flex">
|
||||
<article id="aben" class="imageHead"></article>
|
||||
<article class="text">
|
||||
<!-- ##benjamin.txt -->
|
||||
</article>
|
||||
</section>
|
||||
|
Before Width: | Height: | Size: 343 KiB After Width: | Height: | Size: 343 KiB |
@@ -2,7 +2,7 @@ body{
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-size:cover;
|
||||
background-image:url("grulla_21.jpg");
|
||||
background-image:url("bkg_grulla_21.jpg");
|
||||
background-position: right top;
|
||||
|
||||
}
|
||||
@@ -40,9 +40,9 @@ article.imageHead{
|
||||
margin:20px;
|
||||
min-height:300px
|
||||
}
|
||||
article#apang{ background-image:url("img/maestro.png");}
|
||||
article#ahel{ background-image:url("img/helen.png");}
|
||||
article#aben{ background-image:url("img/ben.png");}
|
||||
article#apang{ background-image:url("maestro.png");}
|
||||
article#ahel{ background-image:url("helen.png");}
|
||||
article#aben{ background-image:url("ben.png");}
|
||||
|
||||
/* text column -------------------*/
|
||||
article.text{
|
||||
BIN
public/home/store/img/libro.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 58 KiB |
BIN
public/home/store/img/libro_old.jpg
Executable file
|
After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,11 +1,9 @@
|
||||
% stash css=>["home/cal/cal.css/"];
|
||||
<section class="title"> <p>Próximos eventos</p></section>
|
||||
|
||||
<section class="cal">
|
||||
|
||||
% foreach (@$b) {
|
||||
<section class="month flex">
|
||||
|
||||
<div class="spacer"></div> <p class="month">
|
||||
<section class="month flex"> <div class="spacer"></div>
|
||||
<p class="month">
|
||||
<%= $_->{text} %>
|
||||
</p>
|
||||
<div class="spacer"></div>
|
||||
@@ -24,11 +22,9 @@
|
||||
<img class="small" src= "home/cal/img/<%= $d->{imagen_chica} %>">
|
||||
<article class="more"> ... </article>
|
||||
</article>
|
||||
</article>
|
||||
</section>
|
||||
</a>
|
||||
%}
|
||||
%}
|
||||
%} }
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
% stash css=>["/home/contact/contact1.css"];
|
||||
<section id="msg" class="contact">
|
||||
|
||||
<section class="cbanner">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
% stash css=>["/home/contact2/contact2.css"];
|
||||
<section class="contact">
|
||||
|
||||
<section class="cbanner">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
% stash css=> ["/home/event/event.css"];
|
||||
<section class="event">
|
||||
<section class="eimage">
|
||||
</section>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
%stash css=>[ "/home/home/animation.css", "/home/home/grid.css", "/home/home/head.css", "/home/home/osc.css", "/home/home/trans.css" ];
|
||||
%stash js=>["/home/home/d3_tras.js","/home/home/fb.js"];
|
||||
<section id="ihead">
|
||||
<div id="courtain">
|
||||
<div class="logo"></div>
|
||||
@@ -36,14 +38,11 @@
|
||||
<iframe id="evideo"
|
||||
src="https://www.youtube.com/embed/<%= $yt %> " allowfullscreen>
|
||||
</iframe>
|
||||
|
||||
</article>
|
||||
<div class="group flex">
|
||||
<article class="box-2 fb">
|
||||
|
||||
<div class="fb-post" id="fbdiv" data-href="<%= $fb %>"
|
||||
data-width="450" data-show-text="true"></div>
|
||||
|
||||
</article>
|
||||
<article class="box-1 sc">
|
||||
<%== $sc %>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
% stash css => ["home/pang/pang.css"];
|
||||
% stash js => ["home/pang/d3Tras.js"];
|
||||
<section class="spacer"></section>
|
||||
|
||||
<section id="trs" class="trans header">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
% stash css=>["/home/store/shop.css"];
|
||||
<section class="shop">
|
||||
<article class="heading"> <p class="heading">TIENDA VIRTUAL</p> </article>
|
||||
% for (@$r){
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
% stash css=>["/home/tv/head.css","/home/tv/trans.css","/home/tv/tv.css"];
|
||||
% stash js=>["/home/tv/d3_tras.js","/home/tv/d3_tune.js"];
|
||||
<section id="ihead">
|
||||
<div id="courtain"></div>
|
||||
<!--
|
||||
<article class="mod"> <p class="mod"> #uContent </p></article>
|
||||
-->
|
||||
</section>
|
||||
|
||||
<!-- trans -->
|
||||
<section id="trs" class="trans flex">
|
||||
<article class="vdg"></article>
|
||||
<article id=tcurt" class="trans">
|
||||
@@ -14,8 +12,6 @@
|
||||
<p class="superlight">+++</p>
|
||||
</article>
|
||||
</section>
|
||||
<!-- trans -->
|
||||
<!-- tv -->
|
||||
<section class="grid">
|
||||
<section class="yt">
|
||||
<iframe id="evideo" frameBorder="0"
|
||||
@@ -26,25 +22,20 @@
|
||||
<section class="col flex">
|
||||
|
||||
<article class="series"><ul>
|
||||
<!-- ##series -->
|
||||
% for (@$videos){
|
||||
<li class="series" value="<%= $_->{group} %>">
|
||||
<%= $_->{name} %>
|
||||
</li>
|
||||
% }
|
||||
<!-- c#series -->
|
||||
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<article class="chap"> <ul>
|
||||
<!-- ##table -->
|
||||
% for (@$table){
|
||||
<li class="chap <%= $_->{group} %> " value="<%= $_->{link} %> ">
|
||||
<%= $_->{order} %> <%= $_->{name} %>
|
||||
</li>
|
||||
% }
|
||||
<!-- c#table -->
|
||||
</ul> </article>
|
||||
|
||||
<article class="facefeed">
|
||||
@@ -53,4 +44,3 @@
|
||||
|
||||
</section>
|
||||
</section>
|
||||
<!-- tv -->
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<%= stylesheet "/global/nav/cssSide.css" %>
|
||||
<%= stylesheet "/global/nav/cssNav.css" %>
|
||||
<%= stylesheet "/global/chaos/c.css" %>
|
||||
<%= stylesheet "/home/contact/cssContact1.css" %>
|
||||
<%= stylesheet "/home/contact/contact1.css" %>
|
||||
<% map{%><%= stylesheet "$_"%><%}(@{stash('css')}) if defined(stash('css'));%>
|
||||
</head>
|
||||
<body>
|
||||
|
||||