links for 2006-12-25
-
OpenID lets you log in to different sites without having to create a new username and password for each one. This screencast demonstrates OpenID in action.
ccREL es una forma de añadir la licencia Creative Commons a nuestros contenidos web. Su uso es muy sencillo, aunque a mi no me ha validado el HTML, si alguien sabe como conseguir que valide que lo diga:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:cc="http://creativecommons.org/ns">
<head>
<title>Judith Myerson's Stuff</title>
</head>
<body>
<div about="">
This page, by
<a property="cc:attributionName" rel="cc:attributionURL" href="http://jmyerson.org/">
Judith Myerson
</a>,
is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/">
CC Attribution License
</a>.
</div>
</body>
</html>
Vía / IBM Developer Works
for ($i=0; $i<1814400; $i++) {
echo "No hacer nada\n";
sleep(1);
}
Tener un grid con todas las filas al mismo tamaño puede ser algo difícil de conseguir. El problema viene con que CSS grid toma el tamaño de las filas según el tamaño máximo de sus celdas.
Para conseguir ello es necesario que el contenido de la celda tenga posicionamiento absoluto, y jugar con ::before para simular contenido vacío que rellene la celda:
.grid {
margin: 0 auto;
width: 60vw;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 5px;
grid-auto-rows: auto;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
.grid--same-height .cell {
position: relative;
}
.grid--same-height .cell::before {
content: "";
display: inline-block;
padding-bottom: 100%;
}
.grid--same-height .content {
height: 100%;
position: absolute;
margin-top: -100%;
}
Teniendo en cuenta que el HTML sería:
<div id="grid" class="grid">
<div class="cell">
<div class="content">
<img src="https://picsum.photos/500/500"/>
</div>
</div>
...
</div>
Para el ejemplo uso picsum.photos, un lorem ipsum para fotos que permite indicar distintos tamaños de imágenes.
Podéis ver un ejemplo en este pen