Browse Source

edited style website

master
alicestrt 4 years ago
parent
commit
e13ee35019
  1. 84
      static/css/style.css
  2. 42
      static/js/d3_map.js
  3. 48
      static/js/group1.json
  4. 2
      templates/base.html
  5. 40
      templates/hello.html
  6. 143
      testing/index.html
  7. 88
      testing/test.json
  8. 1
      testing/test2.json

84
static/css/style.css

@ -1,13 +1,31 @@
/* Everything*/
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300&family=Source+Sans+Pro:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Harmattan&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Asul&display=swap');
* {
border: 0px black solid;
}
.container-fluid {
overflow: hidden;
}
.bg {
/* background-image: url("/static/images/book.jpeg");*/
background-image: linear-gradient(#CDCEC9, #9494A0, #652A2E);
height: 100%;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
/*Main areas*/
.map_area {
text-align: center;
margin-top: 20px;
height:80%;
margin-bottom: 20px;
margin-right: 10px;
}
.media_area {
margin-top: 10px;
@ -26,14 +44,41 @@
.node text {
pointer-events: none;
font: 10px sans-serif;
}
#dadaloglu text {
fill:red;
/* Node styling */
#ahmed text {
fill: #703022;
font-size: 20px;
font-family: 'Asul', sans-serif;
}
#mevlana text {
fill: #703022;
font-size: 20px;
font-family: 'Asul', sans-serif;
}
#haci text {
fill: #703022;
font-size: 20px;
font-family: 'Asul', sans-serif;
}
#dadaloglu text {
fill: #C85E40;
font-size: 20px;
font-family: 'Asul', sans-serif;
}
#dedekorkut text {
fill: #C85E40;
font-size: 20px;
font-family: 'Asul', sans-serif;
}
svg{ width:100%; height:200%; }
path{
@ -62,11 +107,13 @@ stroke-dasharray:6px;
/* text area */
.thesis {
overflow-y: scroll;
max-height:300px;
max-height:400px;
scroll-behavior: smooth;
font-size: 1em;
border: 1px black solid;
padding: 1em;
padding: 0.5em;
margin-right: 10px;
margin-top: 10px;
}
h1 {
@ -78,8 +125,20 @@ h2 {
}
/* background audio */
audio {
width:100%;
.play-stop {
position: absolute;
bottom: 1.2em;
z-index: 1;
margin-left: calc( 50% - 1.8em );
overflow: hidden;
font-size: 20px;
font-weight: bold;
}
.play-stop:hover {
color: #AEB10A;
}
/* circles */
@ -95,14 +154,7 @@ audio {
}
@media all and (max-width: 350px) {
#first_circle {
width: 100%;
height: 100%;
}
#second_circle {
width: 100%;
height: 100%;
}
}
draggable {
position: absolute;

42
static/js/d3_map.js

@ -1,5 +1,5 @@
var width = 960,
height = 700
var width = 500,
height = 400
var svg = d3.select(".map_area").append("svg")
.attr("width", width)
@ -7,8 +7,8 @@ var svg = d3.select(".map_area").append("svg")
var force = d3.layout.force()
.gravity(0.01)
.distance(400)
.charge(-100)
.distance(100)
.charge(-50)
.size([width, height]);
d3.json("/static/js/group1.json", function(error, json) {
@ -29,6 +29,7 @@ d3.json("/static/js/group1.json", function(error, json) {
.enter().append("g")
.attr("class", "node")
.attr("id", function(d){return d.id})
// .style("fill",function (d) { return 'red'; })
// .on("click", function(d){
// scrolldiv(d);
@ -38,7 +39,7 @@ d3.json("/static/js/group1.json", function(error, json) {
.call(force.drag);
node.append("image")
.attr("xlink:href", "/static/images/circle.png")
.attr("xlink:href", "/static/images/squig2.png")
.attr("x", -8)
.attr("y", -8)
.attr("width", 16)
@ -56,9 +57,40 @@ d3.json("/static/js/group1.json", function(error, json) {
.attr("y2", function(d) { return d.target.y; });
node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
// node.each(collide(0.5)); //Added
});
// no overlapping
//var padding = 10, // separation between circles
// radius=8;
//function collide(alpha) {
// var quadtree = d3.geom.quadtree(graph.nodes);
// return function(d) {
// var rb = 2*radius + padding,
// nx1 = d.x - rb,
// nx2 = d.x + rb,
// ny1 = d.y - rb,
// ny2 = d.y + rb;
// quadtree.visit(function(quad, x1, y1, x2, y2) {
// if (quad.point && (quad.point !== d)) {
// var x = d.x - quad.point.x,
// y = d.y - quad.point.y,
// l = Math.sqrt(x * x + y * y);
// if (l < rb) {
// l = (l - rb) / l * alpha;
// d.x -= x *= l;
// d.y -= y *= l;
// quad.point.x += x;
// quad.point.y += y;
// }
// }
// return x1 > nx2 || x2 < nx1 || y1 > ny2 || y2 < ny1;
// });
// };
//}
// scripts for mouse events
$("#dadaloglu").click(function(){
$("#showdadaloglu").fadeIn()

48
static/js/group1.json

@ -7,32 +7,39 @@
},
{
"name": "Dedekorkut",
"group": 1
"group": 1,
"id":"dedekorkut"
},
{
"name": "Aşık Nesimi",
"group": 1
"group": 1,
"id":"asikN"
},
{
"name": "Aşık Ali İzzet",
"group": 1
"group": 1,
"id":"asikA"
},
{
"name": "Karacaoğlan",
"group": 1
"group": 1,
"id":"karacaoglan"
},
{
"name": "Aşık Mahzuni Şerif",
"group": 1
"group": 1,
"id":"asikM"
},
{
"name": "Aşık Veysel",
"group": 1
"group": 1,
"id":"asikV"
}
,
{
"name": "Neşet Ertaş",
"group": 1
"group": 1,
"id":"neset"
}
,
{
@ -44,41 +51,50 @@
,
{
"name": "Ali Ekber Çiçek",
"group": 1
"group": 1,
"id":"aliekber"
}
,
{
"name": "Dedeoğlu",
"group": 1
"group": 1,
"id":"dedeoglu"
}
,
{
"name": "Pir Sultan Abdal",
"group": 1
"group": 1,
"id":"pir"
},
{
"name": "Yunus Emre",
"group": 1
"group": 1,
"id":"yunus"
},
{
"name": "Kul Nesimi",
"group": 1
"group": 1,
"id":"kulN"
},
{
"name": "Kaygusuz Abdal",
"group": 1
"group": 1,
"id":"kaygusuz"
},
{
"name": "Ahmed Yesevi",
"group": 2
"group": 2,
"id": "ahmed"
},
{
"name": "Mevlana Celaleddin Rumi",
"group": 2
"group": 2,
"id": "mevlana"
},
{
"name": "Hacı Bektaş-i Veli",
"group": 2
"group": 2,
"id": "haci",
}
],
"links": [

2
templates/base.html

@ -11,7 +11,7 @@
{% endblock %}
</head>
<body>
<div class="container-fluid">
<div class="container-fluid p-0">
{% block body %} {% endblock %}
</div>

40
templates/hello.html

@ -2,29 +2,28 @@
{% block title %}Hello{% endblock %}
{% block body %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<div id="visualization"></div>
<div class="bg">
<div class="row">
<div class="col-md-7">
<div class="container-fluid">
<div class="map_area">
<script src="../static/js/d3_map.js"></script>
</div>
</div>
</div>
<div class="col-md-5">
<div class="row">
<div class="col-md-10">
<div class="iframe_area">
<div class="col-md-12">
<!-- <p>Merve's thesis</p> -->
<!-- <iframe src="../static/images/abstract.pdf" width="300px" height="500px"></iframe> -->
<div class="thesis">
{% include 'thesis.html' %}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-10">
<div class="media_area">
<!-- <p>Related media</p> -->
<div id="showdadaloglu">Audio for Dadaloglu<audio id="audiodadaloglu" controls>
@ -44,12 +43,20 @@
</div>
<div class="row">
<audio id='audio-1' controls>
<source src="../static/audio/HNI_Soundinstall_3tracks_together1.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
</div>
<div class="col-md-12">
<div class="play-stop">
<a id="mBtn" onclick="PSFunction()">(Play)</a>
</div>
<div class="main_audio">
<audio id='audio1'>
<source src="../static/audio/myths.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
</div>
</div>
</div>
</div>
<!-- scripts for mouse events -->
<script>
// function popup(d) {
@ -70,7 +77,18 @@
// audio.currentTime = 12;
// audio.play();
// }
var audio = document.getElementById("audio1");
var btn = document.getElementById("mBtn");
function PSFunction() {
if (audio.paused) {
audio.play();
btn.innerHTML = "(Pause)";
} else {
audio.pause();
btn.innerHTML = "(Play)";
}
}
</script>
{% endblock %}

143
testing/index.html

@ -1,143 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link {
stroke: #ccc;
}
.node text {
pointer-events: none;
font: 15px sans-serif;
}
.thesis {
overflow-y: scroll;
max-height:100px;
scroll-behavior: smooth;
width:20%;
font-size: .5em;
}
</style>
<body>
<script src="https://d3js.org/d3.v3.min.js"></script>
<div class="thesis">
<span>People since the beginning have been gathering around certain sources of knowledge creating a specific reading/understanding of the world around them. Accumulated from different sources, what is inherited shapes the minds of
individuals,
communities and societies. Often times the cultural productions that happen in reverberance to these processes guide the researchers as they become an archive - a memory space for collective affects of former and contemporary societies.
Aware of my lack of knowledge on all the processes of inheriting from my own history; geographically, ethnically and politically, I attempt to understand the effects of the accumulated sets of knowledge on the actions and behaviour of
myself - A female artist from Turkey - and of us - the un/under/misrepresented multitude. I believe this endeavour will unravel not only the history of Turkey but will shed a light on the processes of modernism under the influence of
major global actors(?).</span>
<span id='ele'>Digging through my memory, I find myself in the Turquoise Impala of my grandfather, driving up the Kayseri mountain, hearing his voice chanting a poem out of the blue. Or suddenly I’m facing one of the spontaneous tests of
my other grand
father in Istanbul, asking me to name the tune of the Ottoman-Turkish music we are listening to. My personal memories are as scattered as the collective memory of our chaotic semi island, Anatolia. Yet if one wants to take a walk
towards
the roots of this land and it’s settlers, the tunes and poems will reveal them selves as the bread crumbs guiding the way.</span>
<span> How does the cultural knowledge travel and transform in time? What forms does it take, why and how do they sustain their presence in our lives? Not only as an artist but as an individual in search of a better present and in
anticipation
and aspiration of a revolution, I try to answer these questions by investigating cultural production methods and develop an alternative reading of the common history.</span>
<span> Knowledge in its most delicate form was first contained in the minds of people who would live in small communities. The elders, the more experienced, would be the ones to teach/pass on the knowledge that they would carry along
their
lives. The inherited knowledge can be the secrets of crafts, food processing- like cheese or meat-, healing methods/recipes, rituals, requiems or stories on braveries, travels, battles and looses. All of these resources relate to
specific
figures in the societies and they</span>
</div>
<script>
function scrolldiv() {
var elem = document.getElementById("ele");
elem.scrollIntoView();
}
</script>
<script>
var width = 960,
height = 500
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
var force = d3.layout.force()
.gravity(0.05)
.distance(100)
.charge(-100)
.size([width, height]);
d3.json("test.json", function(error, json) {
if (error) throw error;
force
.nodes(json.nodes)
.links(json.links)
.start();
var link = svg.selectAll(".link")
.data(json.links)
.enter().append("line")
.attr("class", "link");
var node = svg.selectAll(".node")
.data(json.nodes)
.enter().append("g")
.attr("class", "node")
.attr("id", function(d){return d.id})
.attr("onclick", "scrolldiv()")
.call(force.drag);
node.append("image")
.attr("xlink:href", "circle.png")
.attr("x", -8)
.attr("y", -8)
.attr("width", 16)
.attr("height", 16);
node.append("text")
.attr("dx", 12)
.attr("dy", ".35em")
.text(function(d) { return d.name });
force.on("tick", function() {
link.attr("x1", function(d) { return d.source.x; })
.attr("y1", function(d) { return d.source.y; })
.attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; });
node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
// var nodeA=d3.select("#dadaloglou")
// .attr("id", "dadaloglou")
// .attr("onclick", "scrolldiv()")
// var nodeA=d3.select("dadaloglu")
// nodeA.on("click", function() {
// var elem = document.getElementById("ele");
// elem.scrollIntoView();
// });
// d3.selectAll('.node').each(function(d) {
// d.element = this;
// });
//
// var id, node = search(root, x, y);
// if (node) {
// id = node.element.getAttribute('id');
// }
//
//
// var nodeA=d3.select("#dadaloglu").attr('id')
// nodeA.on("click", scrolldiv);
});
});
</script>

88
testing/test.json

@ -1,88 +0,0 @@
{
"nodes": [
{
"name": "Dadaloğlu",
"group": 1,
"id":"dadaloglu"
},
{
"name": "Dedekorkut",
"group": 1
},
{
"name": "Aşık Nesimi",
"group": 1
},
{
"name": "Aşık Ali İzzet",
"group": 1
},
{
"name": "Karacaoğlan",
"group": 1
},
{
"name": "Aşık Veysel",
"group": 1
}
,
{
"name": "Neşet Ertaş",
"group": 1
}
,
{
"name": "Muharrem Ertaş",
"group": 1
}
,
{
"name": "Ali Ekber Çiçek",
"group": 1
}
,
{
"name": "Dedeoğlu",
"group": 1
}
,
{
"name": "Pir Sultan Abdal",
"group": 1
},
{
"name": "Yunus Emre",
"group": 1
},
{
"name": "Kul Nesimi",
"group": 1
},
{
"name": "Kaygusuz Abdal",
"group": 1
}
],
"links": [
{
"source": 8,
"target": 0,
"value": 1
},
{
"source": 4,
"target": 11,
"value": 1
},
{
"source": 14,
"target": 11,
"value": 1
},
{
"source": 2,
"target": 11,
"value": 1
}
]
}

1
testing/test2.json

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save