Skip to content

Commit

Permalink
Improved fullscreen button.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Aug 15, 2021
1 parent ad69f9e commit 012ecb0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions server/assets/img/fullscreen.svg
1 change: 1 addition & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func (s *Server) routes() {

s.echo.Static("/thumbs", filepath.Join(s.dataPath, pathThumbs))
s.echo.Static("/css", "./server/assets/css")
s.echo.Static("/img", "./server/assets/img")
s.echo.Static("/js", "./server/assets/js")
s.echo.File("/diff", "./server/assets/diff.html")

Expand Down
8 changes: 8 additions & 0 deletions static/img/fullscreen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@
color: #000000;
}

img {
padding: 4px;
border: 0px;
border-radius: 5px;
margin-right: 5px;

background-color: #000000;
vertical-align: middle;

cursor: pointer;
}

img:hover {
background-color: #FFFFFF;
}

option {
color: #ffffff;
background-color: #000000;
Expand Down Expand Up @@ -179,8 +195,8 @@
panButton.title = "Pan: left-drag, Zoom: right-drag. Use 'hide code' for a large pan/zoom area.";
rightside.appendChild( panButton );

fullscreenButton = document.createElement( 'button' );
fullscreenButton.textContent = 'fullscreen';
fullscreenButton = document.createElement( 'img' );
fullscreenButton.src = 'img/fullscreen.svg';
fullscreenButton.title = 'Press F11 to enter or leave fullscreen mode';
fullscreenButton.addEventListener( 'click', function ( event ) {

Expand All @@ -197,6 +213,7 @@
rightside.appendChild( fullscreenButton );

var button = document.createElement( 'a' );
button.style.marginRight = '0px';
button.textContent = 'gallery';
button.href = '/';
rightside.appendChild( button );
Expand Down

0 comments on commit 012ecb0

Please sign in to comment.