Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work in 39.1 #5

Open
alexeiboronnikov opened this issue Aug 17, 2016 · 10 comments
Open

Doesn't work in 39.1 #5

alexeiboronnikov opened this issue Aug 17, 2016 · 10 comments
Assignees
Labels

Comments

@alexeiboronnikov
Copy link

I'm getting just a blank page in browser with no image preview.

@matt-curtis matt-curtis self-assigned this Aug 17, 2016
@alexeiboronnikov
Copy link
Author

Any luck, Matt?

@alexeiboronnikov
Copy link
Author

Your plugin is much better than the mirror web preview

@matt-curtis
Copy link
Owner

Not yet - hoping to get to it very soon, though! Thanks for the reminder.

@andrejilderda
Copy link

@matt-curtis For me Sketch Server works fine on Sketch 40.1.

@alexeiboronnikov
Copy link
Author

@ajilderda humm, maybe it conflicts with some other plugins on my side

@matt-curtis
Copy link
Owner

@alexeiboronnikov if you could pull the crash/error you're getting from Console.app, that would help a lot.

@avadhbsd
Copy link

avadhbsd commented May 23, 2017

For me it does not work. I get a blank page. but the page is being served; not sure what could be the reason for the blank page.
My Sketch version is 44.1 (41455)

Page source from the browser:

<!doctype html>

<title>Sketch Server Preview</title>
	<style>
		html {
			height: 100%;
		}

		body {
			margin: 0; height: 100%;

			cursor: pointer;
		}
		
		#image {
			min-width: 100%;
			min-height: 100%;

			background-repeat: no-repeat;
			background-position: center;
		}
	</style>

	<script type="text/javascript">
		window.addEventListener("DOMContentLoaded", function(){
			var body = document.body;

			//	Reload on tap

			body.addEventListener("click", function(){
				window.location.reload();
			});

			//	Set & Size Image

			var size = { width: 0, height: 0 }
		
			var imageElement = document.getElementById("image");
			var query = window.location.search;
			
			imageElement.style.width = size.width+"px";
			imageElement.style.height = size.height+"px";
			imageElement.style.backgroundSize = size.width+"px "+size.height+"px";
			imageElement.style.backgroundImage = "url('/image"+query+"')";
		}, false);
	</script>
</head>

<body><div id="image"/></body>

@alexeiboronnikov
Copy link
Author

Absolutely the same!

@matt-curtis
Copy link
Owner

Probably the artboard image export is wrong. Should get some time this week to fix this :)

@maxbln
Copy link

maxbln commented Jul 7, 2017

Any news here? Tried it in sketch 44.1 and got a blank page.
Could you fix it? The idea is awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants