1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
var PG = PG || {};
// ※表示タイトル
PG.title = "宇部市の文化財";
// ※プロパティの設定
PG.property = {
image : "http://xmlns.com/foaf/0.1/depiction",
label : "http://www.w3.org/2000/01/rdf-schema#label",
detail : "remarks",
address : "residence",
long : "http://www.w3.org/2003/01/geo/wgs84_pos#long",
lat : "http://www.w3.org/2003/01/geo/wgs84_pos#lat"
}
window.onload = function() {
var list = "";
$("#container").prepend("<h3>" + PG.title + "</h3>");
// 指定されたworkを全件取得
$.each(LinkData.getWorks(), function(workKey, workValue) {
// workに含まれるfileを全件取得
var propUri = stringToUri(PG.property, workValue);
$.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
// subjectを全件取得
$.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) {
var image = "";
var label = "";
var detail = "";
var address = "";
var longitude = "";
var latitude = "";
var str = "";
$.each( LinkData.getTriplesBySubject(workValue, fileValue, subjValue), function( tripleKey, tripleValue ) {
var prop = tripleValue.property;
var obj = tripleValue.object;
if ( prop == propUri.image ) image = obj;
else if ( prop == propUri.label ) label = obj ;
else if ( prop == propUri.detail ) detail = obj ;
else if ( prop == propUri.address && obj.length != 0) address = "<p class=\"address\"><img src=\"http://app.linkdata.org/asset/47cb55da.png\" />" + obj + "</p>" ;
else if ( prop == propUri.long ) longitude = obj;
else if ( prop == propUri.lat ) latitude = obj;
});
str += "<li class=\"flipImage\"><div class=\"front\"><a href='#'><img src=\"" + image + "\" alt=\"image\" /></a></div><div class=\"back\"><p class=\"label\">" + label + "<p class=\"detail\">" + detail + "</p>" + address + "<span class=\"button\">" + addLinkToMap(latitude, longitude) + "</span></div></li>"
list += str;
$("#result").append( list );
// 画像を正方形にトリミング
$(".front").imgLiquid();
// 画像が読み込めなかった時の処理
$("img").error(function(){
$(this).before("No Image");
$( 'a' )
.bind( 'touchstart', function(){
$( this ).addClass( 'hover' );
}).bind( 'touchend', function(){
$( this ).removeClass( 'hover' );
};
// Google Mapのルート検索へのリンクを追加
function addLinkToMap( latitude, longitude )
{
if (latitude.length != 0 && longitude.length != 0) {
str = "<a target=\"_blank\" class=\"object\" href=\"http://maps.google.co.jp/maps?daddr=" + latitude + "," + longitude + "\">ルート検索</a>"
return str;
function stringToUri (p, workId) {
$.each (p, function(propKey, propVal){
if(propVal.indexOf("http") != 0){
p[propKey] = "http://linkdata.org/property/" + workId + "#" + encodeURIComponent(propVal);
})
return p;
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: sans-serif;
body {
background: #FFFFF;
background-image: url("http://app.linkdata.org/asset/dc4bcdc8.png"); /* ※背景画像 */
background-repeat: repeat;
h3 {
background: #C8E9EC; /* ※タイトルの背景色 */
color: #777; /* ※タイトルの文字色 */
text-align: center;
font-size: 190%;
margin: 5px;
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
img {
max-width: 100%;
height: auto;
vertical-align: middle;
.wrapper {
.container {
width: 1080px;
text-align: left;
margin: 0 auto;
padding: 20px;
.photo-grid {
position: relative;
word-wrap: break-word;
.photo-grid ul {
list-style: none;
.flipImage{
float: left;
cursor: pointer;
width: 250px;
height: 250px;
.flipImage > .front{
position:absolute;
transform: perspective( 500px ) rotateY( 0deg );
-webkit-transform: perspective( 500px ) rotateY( 0deg );
background: #E39E83;
width:250px;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
transition: transform .5s linear 0s;
-webkit-transition: transform .5s linear 0s;
.flipImage .front a {
color: #dddddd;
font-size: 180%;
font-weight: bold;
line-height: 250px;
text-decoration: none;
.flipImage > .back{
transform: perspective( 500px ) rotateY( 180deg );
-webkit-transform: perspective( 500px ) rotateY( 180deg );
background: #9A7B65; /* ※写真の裏側の背景色 */
color: #FFFFFF;
.flipImage p {
margin: 5px 10px;
font-size: 9pt;
p.detail {
background: #FFF;
color: #9A7B65;
padding: 5px;
max-height: 130px;
p.address img {
margin: 0 5px;
.flipImage p.label {
font-size: 14pt;
.flipImage .button {
width: 100%;
.flipImage .button a {
display: inline-block;
background: #83DAE3;
width: 92%;
color: #777;
padding: 7px;
margin: 0 10px;
.flipImage:hover > .front{
transform: perspective( 600px ) rotateY( -180deg );
-webkit-transform: perspective( 600px ) rotateY( -180deg );
.flipImage:hover > .back{
transform: perspective( 600px ) rotateY( 0deg );
-webkit-transform: perspective( 600px ) rotateY( 0deg );
@media only screen and (max-width: 1080px) {
width: 820px;
.photo-grid li:last-child {
display: none;
@media only screen and (max-width: 820px) {
width: 560px;
@media only screen and (max-width: 560px) {
width: 300px;
<div id="wrapper" class="wrapper">
<div id="container" class="container">
<div class="photo-grid clearfix">
<ul id="result">
</ul>
</div>
Click the Browse button or drag and drop to choose files to upload
The Maximum upload size is 1MB.(bmp,gif,jpeg,jpg,png)
*Required field
Add name for another language
You can upload jpg, gif, png file formats
Add description for another language
Fork original application has been updated. >>see
Original application has been updated. >>see
Playing...
Please enter a valid URL