Browse Source

location and index pages done

graphics
Cailean Finn 5 months ago
parent
commit
4530173feb
  1. 140
      public/css/styles.css
  2. 8
      public/js/article.js
  3. 41
      public/js/main.js
  4. 2
      templates/_nav.html
  5. 13
      templates/index.html
  6. 5
      templates/locations.html

140
public/css/styles.css

@ -64,6 +64,11 @@ hr {
font-size: 40px; font-size: 40px;
font-family: 'Syne Mono', monospace; font-family: 'Syne Mono', monospace;
color: #0075FF; color: #0075FF;
}
.nav-element-align {
text-align: right;
} }
#main-container { #main-container {
@ -79,6 +84,36 @@ hr {
flex: 1; flex: 1;
} }
#index-container {
display: flex;
padding-top: 50px;
flex-direction: row;
gap: 50px;
padding-bottom: 50px;
padding-left: 50px;
padding-right: 50px;
overflow-y: scroll;
box-sizing: border-box; /* Include padding in the height calculation */
flex: 1;
}
#index-info {
flex-basis: 55%;
display: flex;
flex-direction: column;
gap: 50px;
}
#index-info p{
font-size: 20px;
line-height: 40px;
}
#container-index {
flex-basis: 45%;
min-height: 400px;
}
#main-container-article { #main-container-article {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -109,7 +144,6 @@ hr {
flex-direction: row; flex-direction: row;
gap: 20px; gap: 20px;
width: fit-content; width: fit-content;
background-color: white;
border-color: #0075FF; border-color: #0075FF;
background-size: cover; /* or contain, depending on your preference */ background-size: cover; /* or contain, depending on your preference */
background-repeat:repeat; background-repeat:repeat;
@ -454,7 +488,7 @@ animation: 2s fadeInUp;
/* Tablet breakpoint (768px to 1024px) */ /* Tablet breakpoint (768px to 1024px) */
@media (max-width: 1100px) and (min-width: 768px) { @media (max-width: 1100px){
#nav-bar { #nav-bar {
padding-left: 50px; padding-left: 50px;
padding-right: 50px; padding-right: 50px;
@ -514,6 +548,78 @@ animation: 2s fadeInUp;
/* Mobile breakpoint (less than 768px) */ /* Mobile breakpoint (less than 768px) */
@media (max-width: 768px) { @media (max-width: 768px) {
#main-container-locations {
flex-direction: column;
height: auto;
flex: 1;
overflow-y: scroll;
}
#location-list {
padding-top: 20px;
gap: 0px;
padding-bottom: 20px;
flex-shrink: 0;
overflow-y: scroll;
flex-basis: 60%;
justify-content: space-around;
}
#location-images {
flex-basis: 40%;
}
.location-button {
font-size: 20px;
padding: 10px;
}
#location-information {
padding-left: 10px;
padding-right: 10px;
align-items: center;
align-self: center;
width: fit-content;
}
#location-text {
font-size: 18px;
padding: 0;
width: fit-content;
text-align: center;
}
#location-button-list {
padding-left: 0px;
gap: 5px 5px;
justify-content: center;
}
#index-info {
order: 2;
flex-basis: 0%;
flex-direction: column-reverse;
}
#container-index {
order: 1;
flex: 1;
}
#index-info p{
font-size: 18px;
line-height: 40px;
text-align: justify;
}
#index-container {
flex-direction: column;
padding-left: 25px;
padding-right: 25px;
padding-top: 0px;
gap:20px;
}
#nav-bar { #nav-bar {
padding-left: 25px; padding-left: 25px;
padding-right: 25px; padding-right: 25px;
@ -524,6 +630,10 @@ animation: 2s fadeInUp;
gap: 5px; gap: 5px;
} }
.nav-element-align {
text-align:center;
}
.nav-element { .nav-element {
font-size: 20px; font-size: 20px;
} }
@ -533,6 +643,7 @@ animation: 2s fadeInUp;
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
#main-text { #main-text {
font-size: 18px; font-size: 18px;
width: 80%; width: 80%;
@ -559,8 +670,8 @@ animation: 2s fadeInUp;
gap: 10px; gap: 10px;
width: auto; width: auto;
justify-content: center; justify-content: center;
margin-left: 25px; margin-left: 0px;
margin-right: 25px; margin-right: 0px;
text-align: center; text-align: center;
} }
@ -583,11 +694,11 @@ animation: 2s fadeInUp;
} }
#article-container { #article-container {
display: flex;
flex-direction: column; flex-direction: column;
width: auto; width: 100%;
gap:0px; height: 100%;
align-items: center; gap: 0px
padding-top: 0px;
} }
#article-image { #article-image {
@ -599,10 +710,11 @@ animation: 2s fadeInUp;
#article-text { #article-text {
order: 2; order: 2;
gap: 10px; gap: 10px;
padding-left: 20px;
padding-right: 20px;
width: auto; width: auto;
padding-right: 10px;
padding-left: 10px;
flex-basis: 60%; flex-basis: 60%;
padding-top: 20px;
} }
#article-title { #article-title {
@ -626,8 +738,8 @@ animation: 2s fadeInUp;
overflow-y: hidden; overflow-y: hidden;
overflow-x: scroll; overflow-x: scroll;
height: 40px; height: 40px;
padding-right: 20px; padding-right: 10px;
padding-left: 20px; padding-left: 10px;
white-space: nowrap; white-space: nowrap;
scroll-snap-align: center; scroll-snap-align: center;
gap: 5px; gap: 5px;
@ -645,6 +757,10 @@ animation: 2s fadeInUp;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
#list-container {
padding-top: 0px;
}
} }
@keyframes fadeInUp { @keyframes fadeInUp {

8
public/js/article.js

@ -11,7 +11,7 @@
let controls let controls
let mesh let mesh
let composer let composer
let pixelSize = 3
let container_element = document.getElementById('container-article') let container_element = document.getElementById('container-article')
let containerW = container_element.offsetWidth let containerW = container_element.offsetWidth
@ -29,7 +29,11 @@
SetupControls() SetupControls()
composer = new EffectComposer( renderer ); composer = new EffectComposer( renderer );
const renderPixelatedPass = new RenderPixelatedPass( 3, scene, camera ); if (window.innerWidth < 1024 )
{
pixelSize = 1.5
}
const renderPixelatedPass = new RenderPixelatedPass( pixelSize, scene, camera );
renderPixelatedPass.normalEdgeStrength = 1; renderPixelatedPass.normalEdgeStrength = 1;
renderPixelatedPass.depthEdgeStrength = 1; renderPixelatedPass.depthEdgeStrength = 1;
renderPixelatedPass.pixelAlignedPanning = false; renderPixelatedPass.pixelAlignedPanning = false;

41
public/js/main.js

@ -11,6 +11,11 @@
let controls let controls
let mesh let mesh
let composer let composer
let pixelSize = 8
let container_element = document.getElementById('container-index')
let containerW = container_element.offsetWidth
let containerH = container_element.offsetHeight
const texture = new THREE.TextureLoader().load("public/images/main-txt.png") const texture = new THREE.TextureLoader().load("public/images/main-txt.png")
texture.minFilter = THREE.NearestFilter texture.minFilter = THREE.NearestFilter
@ -23,10 +28,14 @@
SetupRenderer() SetupRenderer()
scene = new THREE.Scene() scene = new THREE.Scene()
SetupCamera() SetupCamera()
SetupControls() //SetupControls()
composer = new EffectComposer( renderer ); composer = new EffectComposer( renderer );
const renderPixelatedPass = new RenderPixelatedPass( 8, scene, camera ); if (window.innerWidth <= 1024)
{
pixelSize = 4;
}
const renderPixelatedPass = new RenderPixelatedPass( pixelSize, scene, camera );
renderPixelatedPass.normalEdgeStrength = 0; renderPixelatedPass.normalEdgeStrength = 0;
renderPixelatedPass.depthEdgeStrength = 1; renderPixelatedPass.depthEdgeStrength = 1;
renderPixelatedPass.pixelAlignedPanning = false; renderPixelatedPass.pixelAlignedPanning = false;
@ -47,13 +56,14 @@
function SetupRenderer(){ function SetupRenderer(){
renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }) renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true })
renderer.setClearColor(0xffffff, 0); renderer.setClearColor(0xffffff, 0);
renderer.setSize(window.innerWidth, window.innerHeight) renderer.setSize(containerW, containerH)
document.getElementById('container').appendChild(renderer.domElement) document.getElementById('container-index').appendChild(renderer.domElement)
} }
function SetupCamera(){ function SetupCamera(){
aspect = (window.innerWidth) / (window.innerHeight) aspect = (containerW) / (containerH)
frustumSize = 2
frustumSize = 1.75 / aspect
camera = new THREE.OrthographicCamera( camera = new THREE.OrthographicCamera(
frustumSize * aspect / -2, frustumSize * aspect / -2,
frustumSize * aspect / 2, frustumSize * aspect / 2,
@ -64,6 +74,7 @@
) )
camera.position.x = 5 camera.position.x = 5
camera.position.set(0, 0, 20)
} }
function SetupControls(){ function SetupControls(){
@ -76,7 +87,7 @@
MIDDLE: THREE.MOUSE.DOLLY, MIDDLE: THREE.MOUSE.DOLLY,
LEFT: THREE.MOUSE.PAN LEFT: THREE.MOUSE.PAN
} }
camera.position.set(0, 0, 20)
controls.update() controls.update()
} }
@ -95,27 +106,33 @@
requestAnimationFrame(animate) requestAnimationFrame(animate)
const deltaTime = (time - lastTime) / 1000 const deltaTime = (time - lastTime) / 1000
lastTime = time lastTime = time
controls.update() //controls.update()
// Rotate the mesh on the x and z axes // Rotate the mesh on the x and z axes
mesh.rotation.x += 0.001 mesh.rotation.x += 0.001
mesh.rotation.z += 0.001 mesh.rotation.z += 0.001
mesh.rotation.y += 0.001 mesh.rotation.y += 0.001
mesh.position.x = 1; mesh.position.x = 0;
mesh.position.y = -0.1; mesh.position.y = 0;
//texture.offset.x += 0.001; //texture.offset.x += 0.001;
composer.render() composer.render()
//renderer.render(scene, camera) //renderer.render(scene, camera)
} }
function getContainerDimensions(){
containerW = container_element.offsetWidth
containerH = container_element.offsetHeight
}
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
aspect = (window.innerWidth) / (window.innerHeight) getContainerDimensions()
aspect = (containerW) / (containerH)
camera.left = -frustumSize * aspect / 2 camera.left = -frustumSize * aspect / 2
camera.right = frustumSize * aspect / 2 camera.right = frustumSize * aspect / 2
camera.top = frustumSize / 2 camera.top = frustumSize / 2
camera.bottom = -frustumSize / 2 camera.bottom = -frustumSize / 2
camera.updateProjectionMatrix() camera.updateProjectionMatrix()
renderer.setPixelRatio(window.devicePixelRatio) renderer.setPixelRatio(window.devicePixelRatio)
renderer.setSize(window.innerWidth, window.innerHeight) renderer.setSize(containerW, containerH)
}) })

2
templates/_nav.html

@ -1,5 +1,5 @@
<div id="nav-bar"> <div id="nav-bar">
<a href="/"><div class="nav-element">BETA FESTIVAL (2024)</div></a> <a href="/"><div class="nav-element">BETA FESTIVAL (2024)</div></a>
<div class="nav-element">NOV 1 - 3 | DUBLIN</div> <div class="nav-element nav-element-align">NOV 1 - 3 | DUBLIN</div>
</div> </div>
<hr> <hr>

13
templates/index.html

@ -5,12 +5,11 @@
{% block content %} {% block content %}
<div id="main-wrapper"> <div id="main-wrapper">
{% include '_nav.html' %} {% include '_nav.html' %}
<div id="main-container"> <div id="index-container">
<div id="main-text"> <div id="index-info">
<p> <p>
Beta is a new festival of art and technology critically engaging with the impact of emerging technologies on society. Taking Ireland’s role as a central node in today's wired world as a starting point, Beta will showcase and celebrate Ireland’s research and artistic communities through a combination of creativity, debate and experimentation. Beta allows members of the public to engage playfully and critically with new technologies essentially beta testing ethical issues facing society. Beta is a new festival of art and technology critically engaging with the impact of emerging technologies on society. Taking Ireland’s role as a central node in today's wired world as a starting point, Beta will showcase and celebrate Ireland’s research and artistic communities through a combination of creativity, debate and experimentation. Beta allows members of the public to engage playfully and critically with new technologies essentially beta testing ethical issues facing society.
</p> </p>
</div>
<div id="hyperlink-container"> <div id="hyperlink-container">
<a href="/exhibitions"><div class="hyperlink"> <a href="/exhibitions"><div class="hyperlink">
@ -24,10 +23,16 @@
<div>Conferences</div> <div>Conferences</div>
</div></a> </div></a>
<a href="/locations"><div class="hyperlink">
<div>Locations</div>
</div></a>
</div>
</div>
<div id="container-index">
</div> </div>
</div> </div>
</div> </div>
<div id="container"></div>
<script type="module" src="{{ url_for('static', filename='js/main.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/main.js') }}"></script>
<script type="module" src="{{ url_for('static', filename='js/skybox.js') }}"></script> <script type="module" src="{{ url_for('static', filename='js/skybox.js') }}"></script>
{% endblock content %} {% endblock content %}

5
templates/locations.html

@ -10,6 +10,11 @@
<div id="location-button-list"> <div id="location-button-list">
<div class="location-button" data-location="digital-hub">The Digital Hub</div> <div class="location-button" data-location="digital-hub">The Digital Hub</div>
<div class="location-button" data-location="pallas-projects">Pallas Projects</div> <div class="location-button" data-location="pallas-projects">Pallas Projects</div>
<div class="location-button" data-location="pallas-projects">Pallas Projects</div>
<div class="location-button" data-location="pallas-projects">Pallas Projects</div>
<div class="location-button" data-location="pallas-projects">Pallas Projects</div>
<div class="location-button" data-location="pallas-projects">Pallas Projects</div>
<div class="location-button" data-location="pallas-projects">Pallas Projects</div>
</div> </div>
<div id="location-information"> <div id="location-information">
<div id="location-text"> <div id="location-text">

Loading…
Cancel
Save