Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/alpha-sarme' into sarme
Browse files Browse the repository at this point in the history
  • Loading branch information
alimoezzi committed Sep 13, 2022
2 parents 36addbe + 40bd2fc commit d8acb12
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/components/Cursor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function Cursor({
const color = hovered ? 'rgb(100 116 139)' : '#fff'

useEffect(() => {
if (!('ontouchstart' in window)) {
if (!window.matchMedia('(pointer: coarse)').matches) {
window.addEventListener(
'mousemove',
(e) => {
Expand Down Expand Up @@ -120,7 +120,7 @@ export function Cursor({
outwards to the tunnels "Out". That means we can write dom nodes
from within r3f, with full access to canvas state! */}
<dom.In>
{!('ontouchstart' in window) && (
{!window.matchMedia('(pointer: coarse)').matches && (
<div ref={outer} className='pointer-events-none absolute left-0 top-0 z-10'>
<div
className='w-[120px] h-[120px] border-2 border-solid border-[orange] rounded-[50%]'
Expand Down
4 changes: 2 additions & 2 deletions src/components/Grid/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function Grid({ startZ = undefined, distance = 8, reverse = false, startR
{springs[i].map(({ scale, opacity }, j) => (
<group
onPointerOver={() => {
if (!('ontouchstart' in window)) {
if (!window.matchMedia('(pointer: coarse)').matches) {
apis[i].start((index) => {
if (index === j) {
return { scale: [1.1, 1.1, 1], opacity: 0.5 }
Expand All @@ -94,7 +94,7 @@ export function Grid({ startZ = undefined, distance = 8, reverse = false, startR
})
}}
onPointerLeave={() => {
if (!('ontouchstart' in window)) {
if (!window.matchMedia('(pointer: coarse)').matches) {
apis[i].start(() => ({ scale: [1, 1, 1], opacity: 0.2 }))
}
}}>
Expand Down
7 changes: 5 additions & 2 deletions src/components/Stack/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export function Stack({
outlineOpacity={springs[i].opacity}
onPointerOver={() => addGlow(i)}
onPointerLeave={() => api.start(() => ({ opacity: 0 }))}
onClick={() => c.link && window.open(c.link, '_blank', 'noopener,noreferrer')}
position-y={-0.2}>
{c.title}
<meshStandardMaterial color='white' />
Expand Down Expand Up @@ -144,6 +145,7 @@ export function Stack({
outlineOpacity={springs[i].opacity}
onPointerOver={() => addGlow(i)}
onPointerLeave={() => api.start(() => ({ opacity: 0 }))}
onClick={() => c.link && window.open(c.link, '_blank', 'noopener,noreferrer')}
position-y={-0.1}>
{c.title}
<meshStandardMaterial color='white' />
Expand Down Expand Up @@ -230,6 +232,7 @@ export function Stack({
outlineOpacity={springs[i].opacity}
onPointerOver={() => addGlow(i)}
onPointerLeave={() => api.start(() => ({ opacity: 0 }))}
onClick={() => c.link && window.open(c.link, '_blank', 'noopener,noreferrer')}
position-y={-0.2}>
{c.title}
<meshStandardMaterial color='white' />
Expand Down Expand Up @@ -343,15 +346,15 @@ export function Stack({
}
}}
onPointerOver={() => {
if (!('ontouchstart' in window)) {
if (!window.matchMedia('(pointer: coarse)').matches) {
addGlow(i)
const newHovered = Array(content.length).fill(false)
newHovered[i] = true
setHovered(newHovered)
}
}}
onPointerLeave={() => {
if (!('ontouchstart' in window)) {
if (!window.matchMedia('(pointer: coarse)').matches) {
api.start(() => ({ opacity: 0 }))
}
}}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function MyApp({ Component, pageProps }) {
<Head>
<meta name='viewport' content='width=device-width, height=device-height, initial-scale:1, user-scalable=no' />
<meta httpEquiv='Content-Type' content='text/html; charset=utf-8' />
<meta httpEquiv='X-UA-Compatible' content='IE=edge' />
<meta httpEquiv='X-UA-Compatible' content='IE=edge,chrome=1' />
</Head>
<Component {...pageProps} />
</>
Expand Down
27 changes: 18 additions & 9 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function Page({ startZ, distance }) {
type: 'photo-text',
photoY: 0,
source: 'https://res.cloudinary.com/du37hrqiv/image/upload/v1651507612/logo-default-slim-dark_qrxlcz.png',
title: 'Network Developer SYNEGY.ir | Shiraz, Iran',
title: 'Network Developer SYNEGY.ir | Iran',
description: ` 2017 \n\n﫟 Deep packet inspection for industrial network
\n\n﫟 Internal VPN mobile app for Shiraz University of medical Science
\n\n﫟 Unidirectional network gateway hardware design for industrial network using RPi
Expand All @@ -458,7 +458,7 @@ function Page({ startZ, distance }) {
type: 'video',
source: 'https://cdn1.sarme.cyou/cdn/school.mp4',
title: 'ⓘ School Organization Web App',
cardTitle: 'Full-Stack Dev. Danial Sch. | Shiraz, Iran | 2019',
cardTitle: 'Full-Stack Dev. Danial Sch. | Iran | 2019',
description: (
<div>
<br /># Developed an educational SPA web application
Expand Down Expand Up @@ -542,7 +542,7 @@ function Page({ startZ, distance }) {
title: 'Machine learning Eng.\nDeep Safety GmbH\nGermany',
description: ` 2022-Current
\n\n﫟 Designing and developing machine learning and deep learning systems specialized for autonomous systems
\n\n﫟 Build and maintain various pipeline required for model deployment and continuous operations around models
\n\n﫟 Build and maintain various pipelines required for model and dataset continuous operations around models
\n\n﫟 Ensure algorithms generate trusted and accurate output`,
descriptionFont:
'https://res.cloudinary.com/du37hrqiv/raw/upload/v1650574011/Hack_Bold_Nerd_Font_Complete_o4hhif.woff',
Expand All @@ -569,9 +569,19 @@ function Page({ startZ, distance }) {
{
type: 'text',
title:
'APPLICATION OF DEEP LEARNING IN GENERATING STRUCTURED RADIOLOGY REPORTS: A TRANSFORMER-BASED TECHNIQUE | 11/2021 | UNDER REVIEW',
description:
'Author list:\n• Seyed Alireza Moezzi\n• Abdolrahman Ghaedi\n• Mojdeh Rahmanian\n• Seyedeh Zahra Mousavi\n• Ashkan Sami',
'APPLICATION OF DEEP LEARNING IN GENERATING STRUCTURED RADIOLOGY REPORTS: A TRANSFORMER-BASED TECHNIQUE | [link]',
description: `
Submitted: 16 November 2021
Revised: 20 June 2022
Published: 27 July 2022
Authors:
• Seyed Ali Reza Moezzi
• Abdolrahman Ghaedi
• Mojdeh Rahmanian
• Seyedeh Zahra Mousavi
• Ashkan Sami`,
link: 'http://realsarm.github.io/reportql',
// description: 'Author list: Seyed Alireza Moezzi; Abdolrahman Ghaedi; Mojdeh Rahmanian; Seyedeh Zahra Mousavi; Ashkan Sami',
descriptionY: '-0.8'
}
Expand Down Expand Up @@ -656,14 +666,13 @@ export default function Home() {
scrollInSound.current = new Audio('/sound/object.mp3')
scrollOutSound.current = new Audio('/sound/toggle.mp3')

// Your code here
if (!('ontouchstart' in window)) {
if (window.matchMedia('(pointer:fine)').matches) {
window.addEventListener('wheel', (e) => {
handleScroll(e.deltaY, 0)
})
}

if ('ontouchstart' in window) {
if (window.matchMedia('(pointer: coarse)').matches) {
// eslint-disable-next-line no-undef
const hammertime = new Hammer(canvasRef.current)
hammertime.get('pinch').set({ enable: true })
Expand Down
2 changes: 2 additions & 0 deletions src/styles/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d8acb12

Please sign in to comment.