Skip to content

Commit

Permalink
mejoras html y algunas correciones
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Oct 18, 2014
1 parent 05bb47d commit 13b6399
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 95 deletions.
70 changes: 7 additions & 63 deletions html/html/generated_toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,12 @@
generated_toc = {
generate: function() {
// Identify our TOC element, and what it applies to
generate_from = '0';
generate_from = '2';
generate_for = 'unset';
tocparent = document.getElementById('generated-toc');
if (tocparent) {
// there is a div class="generated-toc" in the document
// dictating where the TOC should appear
classes = tocparent.className.split(/\s+/);
for (var i=0; i<classes.length; i++) {
// if it specifies which heading level to generate from,
// or what level to generate for, save these specifications
if (classes[i].match(/^generate_from_h[1-6]$/)) {
generate_from = classes[i].substr(classes[i].length-1,1);
} else if (classes[i].match(/^generate_for_[a-z]+$/)) {
generate_for = classes[i].match(/^generate_for_([a-z])+$/)[1];
}
}
} else {
// They didn't specify a TOC element; exit
return;
}

// set top_node to be the element in the document under which
// we'll be analysing headings
if (generate_for == 'page') {
top_node = document.getElementsByTagName('body');
} else {
// i.e., explicitly set to "parent", left blank (so "unset"),
// or some invalid value
top_node = tocparent.parentNode;
}
top_node = document.getElementById('chapter');


// If there isn't a specified header level to generate from, work
// out what the first header level inside top_node is
Expand Down Expand Up @@ -107,15 +83,14 @@ generated_toc = {
}
}

// make the basic elements of the TOC itself, ready to fill into

display_initially = "none";
toggle_initially = "[Mostrar índice del capítulo]";
b = document.createElement('b');
b.appendChild(document.createTextNode("ÍNDICE DEL CAPÍTULO"));
tocparent.appendChild(b);

// make the basic elements of the TOC itself, ready to fill into

cur_head_lvl = "h" + generate_from;
cur_list_el = document.createElement('ul');
cur_list_el.style.display = display_initially;
p = document.createElement('p');
span = document.createElement('span');
span.className = 'hidden';
Expand All @@ -125,15 +100,6 @@ generated_toc = {
//span.appendChild(a);
//p.appendChild(span);
tocparent.appendChild(p);
p = document.createElement('p');
p.id = 'toggle-container';
a = document.createElement('a');
a.id = 'generated_toc_d_toggle';
a.appendChild(document.createTextNode(toggle_initially));
p.appendChild(a);
a.onclick = generated_toc.wrapOpenClose(a,cur_list_el);
a.href = '#';
tocparent.appendChild(p);
tocparent.appendChild(cur_list_el);

// now walk through our saved heading nodes
Expand Down Expand Up @@ -203,28 +169,6 @@ generated_toc = {

},

wrapOpenClose: function(a, cur_list_el) {
// we return a function here so that it acts as a closure;
// in essence the inner function, which is the event handler
// for clicking on the toggle-toc link, remembers the a and cur_list_el
// elements as they are when they're passed in to it.
// This is an explicit function rather than an anonymous function
// defined where it's called so it's easier to understand.
return function(e) {
d = cur_list_el.style.display;
a.firstChild.nodeValue = (d == 'block' ? '[Mostrar' : '[Ocultar') + ' índice del capítulo]';
a.className = (d == 'block' ? 'toggle-closed' : 'toggle-open');
cur_list_el.style.display = d == 'block' ? 'none' : 'block';
if (window.event) {
window.event.returnValue = false;
window.event.cancelBubble = true;
} else {
e.preventDefault();
e.stopPropagation();
}
}
},


innerText: function(el) {
return (typeof(el.innerText) != 'undefined') ? el.innerText :
Expand Down
15 changes: 7 additions & 8 deletions html/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ <h3 class="title" style="text-align:center"> Un libro libre de Víctor Olaya</h3

<p>Para cualquier comentario, puedes <a href="mailto:[email protected]">contactar con el autor</a>.</p>

<h4>Licencia</h4>

<p>Se concede permiso para copiar, distribuir o modificar esta obra bajo los términos expresados en la licencia <a href="https://creativecommons.org/licenses/by/3.0/deed.es">Creative Commons Atribución</a>. La licencia se aplica a todo el texto, así como las imágenes creadas por el propio autor, que serán aquellas para las que no se especifique de modo explícito una distinta procedencia.</p>

<p>Los nombre de productos o corporaciones que aparecen en el texto pueden constituir marcas registradas y se emplean sin otro afán que el meramente identificativo. Asimismo, la inclusión o no de uno de tales productos no expresa recomendación alguna por parte del autor.</p>
<br>
<h3>Índice</h3>

<ul>
Expand Down Expand Up @@ -90,9 +84,14 @@ <h3>Índice</h3>
<li><a href="chapters/Metadatos.html">Metadatos</a>
<li><a href="chapters/Estandares.html">Estándares</a>
</ul>


</ul>
<p></p>
<p><center><img src="separator.png"></center></p>
<p style="font-size:80%">Se concede permiso para copiar, distribuir o modificar esta obra bajo los términos expresados en la licencia <a href="https://creativecommons.org/licenses/by/3.0/deed.es">Creative Commons Atribución</a>. La licencia se aplica a todo el texto, así como las imágenes creadas por el propio autor, que serán aquellas para las que no se especifique de modo explícito una distinta procedencia.</p>
<p style="font-size:80%">Los nombre de productos o corporaciones que aparecen en el texto pueden constituir marcas registradas y se emplean sin otro afán que el meramente identificativo. Asimismo, la inclusión o no de uno de tales productos no expresa recomendación alguna por parte del autor.</p>
<p style="font-size:80%">Este libro utiliza código CSS adaptado de <a href="https://code.google.com/p/better-web-readability-project/"> Better Web Readability Project</a>. El CSS de las menus laterales se ha creado a partir de código de <a href="http://usabilitypost.com/">Dmitry Fadeyev</a>. Para la generación de índices de capítulo se utiliza la librería <a href="http://www.kryogenix.org/code/browser/generated-toc/">generated-toc</a>.</p>
</div>
</div>


</body>
104 changes: 98 additions & 6 deletions html/html/typography.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

body { font:1.05em "lucida grande","lucida sans unicode", sans-serif; background-color:#FFFEF0;
body { font:1.05em "lucida grande","lucida sans unicode", sans-serif; background-color:#FFFFFF;
font-size-adjust:none;
font-style:normal;
font-variant:normal;
font-weight:normal;
background: #f9f9f8;
background: #FFFFFF;
}

p { padding:0 0 1em 0; color:#111; font-weight:300;}
Expand Down Expand Up @@ -59,12 +59,104 @@ img{

.main {margin:0 auto; width:750px;}

#toindex {
#slideout_chapter {
position: fixed;
top: 0px;
left: 10px;
background-color:#FFFEF0
top: 130px;
left: 0;
width: 85px;
padding: 12px 0;
text-align: center;
background: #99ccff;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
transition-duration: 0.3s;
-o-transition-duration: 0.3s;
-webkit-border-radius: 0 5px 5px 0;
-moz-border-radius: 0 5px 5px 0;
border-radius: 0 5px 5px 0;
z-index: 99;
color: white;
font-weight: bold;
}
#slideout_inner_chapter {
position: fixed;
top: 130px;
left: -450px;
background: #FFFFFF;
width: 400px;
padding: 25px;
height: 100%;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
transition-duration: 0.3s;
-o-transition-duration: 0.3s;
text-align: left;
-webkit-border-radius: 0 0 5px 0;
-moz-border-radius: 0 0 5px 0;
border-radius: 0 0 5px 0;
font:.8em "lucida grande","lucida sans unicode", sans-serif; background-color:#FFFFFF;
z-index: 99;
color: black;
font-weight: normal;
}

#slideout_chapter:hover {
left: 450px;
z-index: 99;
}
#slideout_chapter:hover #slideout_inner_chapter {
left: 0;
z-index: 99;
}

#slideout_general {
position: fixed;
top: 40px;
left: 0;
width: 85px;
padding: 12px 0;
text-align: center;
background: #FFaa56;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
transition-duration: 0.3s;
-o-transition-duration: 0.3s;
-webkit-border-radius: 0 5px 5px 0;
-moz-border-radius: 0 5px 5px 0;
border-radius: 0 5px 5px 0;
z-index: 100;
color: white;
font-weight: bold;
}
#slideout_inner_general {
position: fixed;
top: 40px;
left: -450px;
background: #FFaa56;
width: 400px;
padding: 25px;
height: 100%;
overflow:auto;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
transition-duration: 0.3s;
-o-transition-duration: 0.3s;
text-align: left;
-webkit-border-radius: 0 0 5px 0;
-moz-border-radius: 0 0 5px 0;
border-radius: 0 0 5px 0;
font:.8em "lucida grande","lucida sans unicode", sans-serif; background-color:#FFFFFF;
z-index: 100;
color: black;
font-weight: normal;
}

#slideout_general:hover {
left: 450px;
z-index: 100;
}
#slideout_general:hover #slideout_inner_general {
left: 0;
z-index: 100;
}

75 changes: 70 additions & 5 deletions html/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,84 @@
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
<script src="../generated_toc.js"></script>
</head>
<body lang="es">
<div class="main">
<div class="g960">
<div id="toindex"><a href="../index.html">Índice general</a></div>
<div class="g960" id="chapter">
<h1>[TITLE]</h1>
[AUTHOR]
<div id="generated-toc"></div>

[BODY]
</div>
</div>
<script src="../generated_toc.js"></script>
<div id="slideout_chapter">
Índice<br>capítulo
<div id="slideout_inner_chapter">
<div id="generated-toc"></div>
</div>
</div>
<div id="slideout_general">
Índice<br>general
<div id="slideout_inner_general">
<b>ÍNDICE GENERAL</b><br>
<ul>
<li><a href="Intro.html">Introducción</a></li>
<li>Parte 1. Fundamentos</li>
<ul>
<li><a href="Introduccion_fundamentos.html">Introducción. ¿Qué es un SIG?</a>
<li><a href="Historia.html">Historia de los SIG</a>
<li><a href="Fundamentos_cartograficos.html">Fundamentos cartográficos y geodésicos</a>
</ul>
<li>Parte 2. Datos</li>
<ul>
<li><a href="Introduccion_datos.html">Introducción. ¿Con qué trabajo en un SIG?</a>
<li><a href="Tipos_datos.html">Modelos para la información geográfica</a>
<li><a href="Fuentes_datos.html">Fuentes principales de datos espaciales</a>
<li><a href="Calidad_datos.html">La calidad de los datos espaciales</a>
<li><a href="Bases_datos.html">Bases de datos</a>
</ul>
<li>Parte 3. Analisis</li>
<ul>
<li><a href="Introduccion_procesos.html">Introducción. ¿Qué puedo hacer con un SIG?</a>
<li><a href="Analisis_espacial.html">Conceptos básicos para el análisis espacial</a>
<li><a href="Consultas.html">Consultas y operaciones con bases de datos</a>
<li><a href="Estadistica_espacial.html">Estadísticas espaciales</a>
<li><a href="Creacion_capas_raster.html">Creación de capas raster</a>
<li><a href="Algebra_de_mapas.html">Álgebra de mapas</a>
<li><a href="Geomorfometria.html">Geomorfometría y análisis del terreno</a>
<li><a href="Imagenes.html">Procesado de imágenes</a>
<li><a href="Creacion_capas_vectoriales.html">Creación de capas vectoriales</a>
<li><a href="Operaciones_geometricas.html">Operaciones geométricas con capas vectoriales</a>
<li><a href="Costes.html">Costes, distancias y áreas de influencia</a>
<li><a href="Estadistica_avanzada.html">Más estadística espacial</a>
</ul>
<li>Parte 4. Tecnología</li>
<ul>
<li><a href="Introduccion_tecnologia.html">Introducción. ¿Cómo son las aplicaciones SIG?</a>
<li><a href="SIGs_escritorio.html">Herramientas de escritorio</a>
<li><a href="Cliente_servidor.html">Clientes y servidores remotos. Web mapping</a>
<li><a href="SIG_movil.html">SIG movil</a>
</ul>
<li>Parte 5. Visualización</li>
<ul>
<li><a href="Introduccion_visualizacion.html">Introducción. Los SIG como herramientas de visualización</a>
<li><a href="Conceptos_basicos.html">Conceptos básicos de visualización y representación</a>
<li><a href="Mapas.html">El mapa y la comunicación cartográfica</a>
<li><a href="Visualizacion_SIG.html">La visualización en términos SIG</a>
</ul>
<li>Parte 6. Factor organizativo</li>
<ul>
<li><a href="Introduccion_factor_organizativo.html">Introducción. ¿Cómo se organiza un SIG?</a>
<li><a href="IDE.html">Infraestructuras de Datos Espaciales</a>
<li><a href="Metadatos.html">Metadatos</a>
<li><a href="Estandares.html">Estándares</a>
</ul>
</ul>
</div>
</div>

<script>
hideTOC();
//hideTOC();
</script>
</body>
2 changes: 1 addition & 1 deletion latex/Analisis/Geomorfometria/Geomorfometria.tex
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ \subsubsection{Medidas basadas en derivadas de primer grado}

\begin{equation}
E''=E' \cos\alpha
\end {equation}
\end{equation}

El valor de $\cos\alpha$ se calcula a partir de las orientaciones y pendientes tanto del Sol como de la celda, haciendo uso de la expresión

Expand Down
2 changes: 1 addition & 1 deletion latex/Factor_organizativo/IDE/IDE.tex
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ \subsection{Actores de una IDE}
\begin{figure}[!hbtp]
\centering
\includegraphics[width=0.85\textwidth]{IDE/idee.png}
\caption{\small Interfaz de acceso al catalogo de la IDEE\footnote{\url{http://www.idee.es/}}}
\caption{\small Interfaz de acceso al catalogo de la IDEE\footnote{\url{http://www.idee.es}}}
\label{Fig:Catalogo_UNEX}
\end{figure}

Expand Down
Loading

0 comments on commit 13b6399

Please sign in to comment.