├── .gitattributes ├── .gitignore ├── README.md ├── css └── style.css ├── image ├── banner.png ├── demo.png └── favicon.ico ├── index.html └── js └── main.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Calculator 2 | A simple calculator made with JavaScript. 3 | 4 | ## DEMO 5 | https://greyli.github.io/calculator/ 6 | 7 |  -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | .box { 2 | font-family: 'Orbitron', sans-serif; 3 | width: 285px; 4 | height: 350px; 5 | margin: 15% auto auto; 6 | border: 1px solid #9e9b97; 7 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), inset -1px -6px 12px 0.1px #89847e; 8 | border-radius: 20px; 9 | -webkit-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | } 14 | 15 | .screen { 16 | height: 60px; 17 | width: 240px; 18 | border: 1px solid #7c877f; 19 | background: #c7d3c5; 20 | margin: 25px 20px 5px 20px; 21 | border-radius: 6px; 22 | } 23 | 24 | .main-screen { 25 | width: 240px; 26 | height: 22px; 27 | padding: 10px 5px; 28 | font-size: 20px; 29 | text-align: right; 30 | } 31 | 32 | .sub-screen { 33 | max-width: 280px; 34 | height: 15px; 35 | padding: 10px 5px; 36 | font-size: 12px; 37 | text-align: right; 38 | } 39 | 40 | .buttons { 41 | margin: 10px auto; 42 | } 43 | 44 | button { 45 | margin: 5px; 46 | padding: 3px 10px; 47 | width: 50px; 48 | height: 30px; 49 | border: none; 50 | box-shadow: 1px 2px #666; 51 | } 52 | 53 | button:focus {outline:0 !important;} 54 | 55 | button:active { 56 | box-shadow: none; 57 | transform: translateY(4px); 58 | } 59 | 60 | .btn-zero { 61 | width: 113px; 62 | margin-right: 7px; 63 | } 64 | 65 | .btn-equal { 66 | position: absolute; 67 | margin-left: 10px; 68 | height: 75px; 69 | } -------------------------------------------------------------------------------- /image/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greyli/calculator/70350f52066abccea065b4e071fd699d1f30c85e/image/banner.png -------------------------------------------------------------------------------- /image/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greyli/calculator/70350f52066abccea065b4e071fd699d1f30c85e/image/demo.png -------------------------------------------------------------------------------- /image/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greyli/calculator/70350f52066abccea065b4e071fd699d1f30c85e/image/favicon.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |