Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb9f13a0bc | ||
|
|
e800be509d | ||
|
|
c492241e6d | ||
|
|
375cd03901 | ||
|
|
bd4454334c | ||
|
|
89668ce6b6 | ||
|
|
c081f6536f | ||
|
|
39318bd70b | ||
|
|
e292aacf54 | ||
|
|
5f6d5ee58f | ||
|
|
8eed667124 | ||
|
|
5ea6f9f802 | ||
|
|
55e2a869ec | ||
|
|
3e96c4f6ac | ||
|
|
fec6181578 | ||
|
|
fc8695aa1e | ||
|
|
729ecfc981 | ||
|
|
6e4eb8cfa6 | ||
|
|
7c13e79abd | ||
|
|
c4c1381910 | ||
|
|
f1bab648cb | ||
|
|
ddb4f46b0a | ||
|
|
0b96b9500c | ||
|
|
4d45d79202 | ||
|
|
0ed45311ac | ||
|
|
2438a6c6ba | ||
|
|
4308a17529 | ||
|
|
99f1012163 | ||
|
|
43bd630b18 | ||
|
|
e2e3290457 | ||
|
|
88aec93c61 | ||
|
|
e8ebcdaa2d | ||
|
|
868a61fc48 | ||
|
|
80cd7d5ddf | ||
|
|
74bc10bce9 | ||
|
|
54ef6180a2 | ||
|
|
180b7917a3 | ||
|
|
b4341704c6 | ||
|
|
1852e5410a | ||
|
|
84af34fc63 | ||
|
|
159d3b9304 | ||
|
|
49f410a6b9 |
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
6
.github/workflows/build.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: Build/release
|
name: Build/release
|
||||||
|
|
||||||
on: push
|
on: workflow_dispatch
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -17,11 +17,11 @@ jobs:
|
|||||||
- name: Install Node.js, NPM and Yarn
|
- name: Install Node.js, NPM and Yarn
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 17
|
node-version: 18
|
||||||
|
|
||||||
- name: Build and release with electron-builder
|
- name: Build and release with electron-builder
|
||||||
run: |
|
run: |
|
||||||
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||||
yarn install
|
yarn install
|
||||||
yarn dist
|
yarn dist -c.snap.publish=github
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
/.idea/
|
/.idea/
|
||||||
/release/
|
/release/
|
||||||
|
.DS_Store
|
||||||
|
flatpak-node-generator.py
|
||||||
|
generated-sources.json
|
||||||
3
.prettierignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
yarn.lock
|
||||||
|
node_modules/
|
||||||
|
README.md
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 Agampreet Singh
|
Copyright (c) 2022 Agampreet Singh
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
22
README.md
@@ -9,7 +9,7 @@
|
|||||||
<a href="https://electronjs.org">
|
<a href="https://electronjs.org">
|
||||||
<img align="center" src="https://img.shields.io/badge/Developed%20With-Electron-red?logo=Electron&logoColor=white&style=flat">
|
<img align="center" src="https://img.shields.io/badge/Developed%20With-Electron-red?logo=Electron&logoColor=white&style=flat">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/agam778/MS-Office-Electron/blob/main/license.txt">
|
<a href="https://github.com/agam778/MS-Office-Electron/blob/main/LICENSE">
|
||||||
<img align="center" src="https://img.shields.io/github/license/agam778/MS-Office-Electron?style=flat">
|
<img align="center" src="https://img.shields.io/github/license/agam778/MS-Office-Electron?style=flat">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/agam778/MS-Office-Electron/releases/">
|
<a href="https://github.com/agam778/MS-Office-Electron/releases/">
|
||||||
@@ -43,15 +43,15 @@
|
|||||||
- [📸 Ubuntu Preview](#-ubuntu-preview)
|
- [📸 Ubuntu Preview](#-ubuntu-preview)
|
||||||
- [💻 Developing Locally](#-developing-locally)
|
- [💻 Developing Locally](#-developing-locally)
|
||||||
- [📃 MIT License](#-mit-license)
|
- [📃 MIT License](#-mit-license)
|
||||||
- [*Disclaimer: Not affiliated with Microsoft*](#disclaimer-not-affiliated-with-microsoft)
|
- [*Disclaimer: Not affiliated with Microsoft. Office, the name, website, images/icons are the intellectual properties of Microsoft.*](#disclaimer-not-affiliated-with-microsoft-office-the-name-website-imagesicons-are-the-intellectual-properties-of-microsoft)
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
|
|
||||||
As we know that Microsoft Office is a paid service, they also have a free Web version [here](https://office.com).
|
As we know that Microsoft Office is a paid service, they also have a free Web version [here](https://office.com).
|
||||||
|
|
||||||
For those people who can't afford Microsoft Office Subscription, or don't want to pay for that, or like the web version of it, Then **MS Office - Electron** is the app you require.
|
For those people who can't afford Microsoft Office Subscription, or don't want to pay for that, or like the web version of it, Then **MS-Office-Electron** is the app you require.
|
||||||
|
|
||||||
**MS Office - Electron** is the app in which the Web Version of Microsoft Office is wrapped into a Cross-Platform App with Electron. And all the Services of Microsoft Office will work for free.
|
**MS-Office-Electron** is the app in which the Web Version of Microsoft Office is wrapped into a Cross-Platform App with Electron. And all the Services of Microsoft Office will work for free.
|
||||||
|
|
||||||
Note - Windows Hello or Sign in with Security key is not currently supported and will show you an error. You will have to manually sign in with your E-Mail and Password.
|
Note - Windows Hello or Sign in with Security key is not currently supported and will show you an error. You will have to manually sign in with your E-Mail and Password.
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ Supported Platforms
|
|||||||
5. All Distributions supporting AppImage (AppImage File)
|
5. All Distributions supporting AppImage (AppImage File)
|
||||||
|
|
||||||
Arch Linux builds are now on AUR!<br>
|
Arch Linux builds are now on AUR!<br>
|
||||||
Mac OS supported now with builds for both M1 And Intel Chips . See the instructions how to install below<br>
|
Mac OS is supported now! See the instructions how to install below<br>
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
|
|
||||||
@@ -89,13 +89,17 @@ For Installing this app on Windows :-
|
|||||||
For Installing this app on Mac :-
|
For Installing this app on Mac :-
|
||||||
|
|
||||||
1. Just go to the [Releases](https://github.com/agam778/MS-Office-Electron/releases) page
|
1. Just go to the [Releases](https://github.com/agam778/MS-Office-Electron/releases) page
|
||||||
2. Scroll down and click the `.dmg` file. The build with no architecture written is for Intel Macs (Will fix it soon) and the build with arm64 written in it is for M1 Macs. Download the build according to your Mac.
|
2. Scroll down and click the `.dmg` file. The build is only for Intel Macs.
|
||||||
3. After it downloads, click on the file and mount it on your system. Now drag my app to the Applications Folder (There will be a shortcut in the opened window too) and your app will be installed. Open from Launchpad and enjoy.
|
3. After it downloads, click on the file and mount it on your system. Now drag my app to the Applications Folder (There will be a shortcut in the opened window too) and your app will be installed. Open from Launchpad and enjoy.
|
||||||
|
|
||||||
# Linux
|
# Linux
|
||||||
|
|
||||||
## 💿 Linux Installation
|
## 💿 Linux Installation
|
||||||
|
|
||||||
|
<a href="https://snapcraft.io/ms-office-electron">
|
||||||
|
<img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" />
|
||||||
|
</a>
|
||||||
|
|
||||||
### Ubuntu/Debian based distribution installation
|
### Ubuntu/Debian based distribution installation
|
||||||
|
|
||||||
For Installing in Ubuntu/Debian based distribution :-
|
For Installing in Ubuntu/Debian based distribution :-
|
||||||
@@ -140,7 +144,7 @@ If you find any issues in using the AUR Builds, please create a [New Issue](http
|
|||||||
To build the app locally:<br>
|
To build the app locally:<br>
|
||||||
Run this script to automatically install `nodejs`, `yarn` and all the dependencies, and automatically start/build the app (it will show options) (Note: for Linux and macOS Only!):
|
Run this script to automatically install `nodejs`, `yarn` and all the dependencies, and automatically start/build the app (it will show options) (Note: for Linux and macOS Only!):
|
||||||
```bash
|
```bash
|
||||||
git clone --depth=1 https://github.com/agam778/MS-Office-Electron.git
|
git clone https://github.com/agam778/MS-Office-Electron.git
|
||||||
cd MS-Office-Electron
|
cd MS-Office-Electron
|
||||||
bash build.sh
|
bash build.sh
|
||||||
```
|
```
|
||||||
@@ -155,7 +159,7 @@ yarn install
|
|||||||
```
|
```
|
||||||
```bash
|
```bash
|
||||||
$ yarn run
|
$ yarn run
|
||||||
yarn run v1.22.17
|
yarn run v1.22.18
|
||||||
info Commands available from binary scripts: asar, dircompare, ejs, electron, electron-builder, electron-osx-flat, electron-osx-sign, extract-zip, install-app-deps, is-ci, jake, js-yaml, json5, mime, mkdirp, node-which, rc, rimraf, semver
|
info Commands available from binary scripts: asar, dircompare, ejs, electron, electron-builder, electron-osx-flat, electron-osx-sign, extract-zip, install-app-deps, is-ci, jake, js-yaml, json5, mime, mkdirp, node-which, rc, rimraf, semver
|
||||||
info Project commands
|
info Project commands
|
||||||
- dist
|
- dist
|
||||||
@@ -172,4 +176,4 @@ To build the app, run `yarn dist`
|
|||||||
|
|
||||||
# 📃 MIT License
|
# 📃 MIT License
|
||||||
|
|
||||||
#### *Disclaimer: Not affiliated with Microsoft*
|
#### *Disclaimer: Not affiliated with Microsoft. Office, the name, website, images/icons are the intellectual properties of Microsoft.*
|
||||||
|
|||||||
BIN
assets/generated/icons/mac/icon.icns
Normal file
BIN
assets/generated/icons/png/1024x1024.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
assets/generated/icons/png/128x128.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
assets/generated/icons/png/16x16.png
Normal file
|
After Width: | Height: | Size: 642 B |
BIN
assets/generated/icons/png/24x24.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/generated/icons/png/256x256.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
assets/generated/icons/png/32x32.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/generated/icons/png/48x48.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/generated/icons/png/512x512.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
assets/generated/icons/png/64x64.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/generated/icons/win/icon.ico
Normal file
|
After Width: | Height: | Size: 353 KiB |
BIN
assets/icon.png
Normal file
|
After Width: | Height: | Size: 321 KiB |
BIN
assets/icons/download-fail.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
assets/icons/download-success.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
assets/icons/download.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
40
build.sh
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This script helps you to start/build the MS-Office-Electron app
|
||||||
if ! [ -x "$(command -v node)" ]; then
|
if ! [ -x "$(command -v node)" ]; then
|
||||||
echo 'Error: nodejs is not installed.' >&2
|
echo 'Error: nodejs is not installed.' >&2
|
||||||
echo 'Installing nodejs now; this may take a while.'
|
echo 'Installing nodejs now; this may take a while.'
|
||||||
@@ -7,6 +8,7 @@ if ! [ -x "$(command -v node)" ]; then
|
|||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
|
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
|
||||||
sudo apt-get install -y nodejs
|
sudo apt-get install -y nodejs
|
||||||
|
sudo apt-get install rpm -y # for rpm build.
|
||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
sudo yum install nodejs
|
sudo yum install nodejs
|
||||||
elif [ -f /etc/arch-release ]; then
|
elif [ -f /etc/arch-release ]; then
|
||||||
@@ -153,7 +155,7 @@ else
|
|||||||
echo 'Please install git manually.'
|
echo 'Please install git manually.'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
git clone --depth=1 https://github.com/agam778/MS-Office-Electron; cd MS-Office-Electron
|
git clone --depth=1 https://github.com/agam778/MS-Office-Electron; cd MS-Office-Electron || echo "Failed to change directory." && return 1
|
||||||
echo 'Cloned the repository'
|
echo 'Cloned the repository'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -166,15 +168,16 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
echo 'Do you want to run the app or build the app?'
|
echo 'What do you want to do?'
|
||||||
echo '1. Run the app'
|
echo '1. Run the app without building'
|
||||||
echo '2. Build the app'
|
echo '2. Build the app'
|
||||||
echo '3. Exit'
|
echo '3. Build and install the app'
|
||||||
|
echo '4. Exit'
|
||||||
echo 'Enter your choice:'; read choice;
|
echo 'Enter your choice:'; read choice;
|
||||||
if [ $choice -eq 1 ]; then
|
if [ "$choice" -eq "1" ]; then
|
||||||
echo 'Running the app...'
|
echo 'Running the app...'
|
||||||
yarn start
|
yarn start
|
||||||
elif [ $choice -eq 2 ]; then
|
elif [ "$choice" -eq "2" ]; then
|
||||||
echo 'Building the app...'
|
echo 'Building the app...'
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
if [ "$(uname -m)" == "arm64" ]; then
|
if [ "$(uname -m)" == "arm64" ]; then
|
||||||
@@ -189,7 +192,30 @@ if [ $choice -eq 1 ]; then
|
|||||||
yarn dist --x64
|
yarn dist --x64
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ $choice -eq 3 ]; then
|
elif [ "$choice" -eq "3" ]; then
|
||||||
|
echo 'Building and installing the app...'
|
||||||
|
if ! [ -f /etc/debian_version ]; then
|
||||||
|
echo 'Error: "Build and install the app" option is only supported on Debian-based systems for now.' >&2
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
if [ "$(uname -m)" == "arm64" ]; then
|
||||||
|
sudo yarn dist --arm64
|
||||||
|
sudo apt install -y -f ./release/MS-Office-Electron*.deb
|
||||||
|
elif [ "$(uname -m)" == "x86_64" ]; then
|
||||||
|
sudo yarn dist --x64
|
||||||
|
sudo apt install -y -f ./release/MS-Office-Electron*.deb
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$(uname -m)" == "arm64" ]; then
|
||||||
|
yarn dist --arm64
|
||||||
|
apt install -y -f ./release/MS-Office-Electron*.deb
|
||||||
|
elif [ "$(uname -m)" == "x86_64" ]; then
|
||||||
|
yarn dist --x64
|
||||||
|
apt install -y -f ./release/MS-Office-Electron*.deb
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [ "$choice" -eq "4" ]; then
|
||||||
echo 'Exiting...'
|
echo 'Exiting...'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
# MS-Office-Electron
|
# MS-Office-Electron
|
||||||
|
|
||||||
A Microsoft Office Online Desktop Client made with Electron. Free of Cost.
|
A Microsoft Office Online Desktop Client made with Electron. Free of Cost.
|
||||||
|
|
||||||
# Website Branch
|
# Website
|
||||||
Just a website for the MS-Office-Electron App, nothing much<br>
|
|
||||||
Includes the loading screen for now [here](https://agam778.github.io/MS-Office-Electron/loading/)
|
|
||||||
|
|
||||||
# Todo:
|
Just a website for the MS-Office-Electron App, nothing much
|
||||||
- [ ] Add description about the app
|
|
||||||
|
|||||||
4395
docs/assets/css/fontawesome-all.min.css
vendored
150
docs/assets/js/breakpoints.min.js
vendored
@@ -1,2 +1,150 @@
|
|||||||
/* breakpoints.js v1.0 | @ajlkn | MIT licensed */
|
/* breakpoints.js v1.0 | @ajlkn | MIT licensed */
|
||||||
var breakpoints=function(){"use strict";function e(e){t.init(e)}var t={list:null,media:{},events:[],init:function(e){t.list=e,window.addEventListener("resize",t.poll),window.addEventListener("orientationchange",t.poll),window.addEventListener("load",t.poll),window.addEventListener("fullscreenchange",t.poll)},active:function(e){var n,a,s,i,r,d,c;if(!(e in t.media)){if(">="==e.substr(0,2)?(a="gte",n=e.substr(2)):"<="==e.substr(0,2)?(a="lte",n=e.substr(2)):">"==e.substr(0,1)?(a="gt",n=e.substr(1)):"<"==e.substr(0,1)?(a="lt",n=e.substr(1)):"!"==e.substr(0,1)?(a="not",n=e.substr(1)):(a="eq",n=e),n&&n in t.list)if(i=t.list[n],Array.isArray(i)){if(r=parseInt(i[0]),d=parseInt(i[1]),isNaN(r)){if(isNaN(d))return;c=i[1].substr(String(d).length)}else c=i[0].substr(String(r).length);if(isNaN(r))switch(a){case"gte":s="screen";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: -1px)";break;case"not":s="screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (max-width: "+d+c+")"}else if(isNaN(d))switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen";break;case"gt":s="screen and (max-width: -1px)";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+")";break;default:s="screen and (min-width: "+r+c+")"}else switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+"), screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (min-width: "+r+c+") and (max-width: "+d+c+")"}}else s="("==i.charAt(0)?"screen and "+i:i;t.media[e]=!!s&&s}return t.media[e]!==!1&&window.matchMedia(t.media[e]).matches},on:function(e,n){t.events.push({query:e,handler:n,state:!1}),t.active(e)&&n()},poll:function(){var e,n;for(e=0;e<t.events.length;e++)n=t.events[e],t.active(n.query)?n.state||(n.state=!0,n.handler()):n.state&&(n.state=!1)}};return e._=t,e.on=function(e,n){t.on(e,n)},e.active=function(e){return t.active(e)},e}();!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.breakpoints=t()}(this,function(){return breakpoints});
|
var breakpoints = (function () {
|
||||||
|
"use strict";
|
||||||
|
function e(e) {
|
||||||
|
t.init(e);
|
||||||
|
}
|
||||||
|
var t = {
|
||||||
|
list: null,
|
||||||
|
media: {},
|
||||||
|
events: [],
|
||||||
|
init: function (e) {
|
||||||
|
(t.list = e),
|
||||||
|
window.addEventListener("resize", t.poll),
|
||||||
|
window.addEventListener("orientationchange", t.poll),
|
||||||
|
window.addEventListener("load", t.poll),
|
||||||
|
window.addEventListener("fullscreenchange", t.poll);
|
||||||
|
},
|
||||||
|
active: function (e) {
|
||||||
|
var n, a, s, i, r, d, c;
|
||||||
|
if (!(e in t.media)) {
|
||||||
|
if (
|
||||||
|
(">=" == e.substr(0, 2)
|
||||||
|
? ((a = "gte"), (n = e.substr(2)))
|
||||||
|
: "<=" == e.substr(0, 2)
|
||||||
|
? ((a = "lte"), (n = e.substr(2)))
|
||||||
|
: ">" == e.substr(0, 1)
|
||||||
|
? ((a = "gt"), (n = e.substr(1)))
|
||||||
|
: "<" == e.substr(0, 1)
|
||||||
|
? ((a = "lt"), (n = e.substr(1)))
|
||||||
|
: "!" == e.substr(0, 1)
|
||||||
|
? ((a = "not"), (n = e.substr(1)))
|
||||||
|
: ((a = "eq"), (n = e)),
|
||||||
|
n && n in t.list)
|
||||||
|
)
|
||||||
|
if (((i = t.list[n]), Array.isArray(i))) {
|
||||||
|
if (((r = parseInt(i[0])), (d = parseInt(i[1])), isNaN(r))) {
|
||||||
|
if (isNaN(d)) return;
|
||||||
|
c = i[1].substr(String(d).length);
|
||||||
|
} else c = i[0].substr(String(r).length);
|
||||||
|
if (isNaN(r))
|
||||||
|
switch (a) {
|
||||||
|
case "gte":
|
||||||
|
s = "screen";
|
||||||
|
break;
|
||||||
|
case "lte":
|
||||||
|
s = "screen and (max-width: " + d + c + ")";
|
||||||
|
break;
|
||||||
|
case "gt":
|
||||||
|
s = "screen and (min-width: " + (d + 1) + c + ")";
|
||||||
|
break;
|
||||||
|
case "lt":
|
||||||
|
s = "screen and (max-width: -1px)";
|
||||||
|
break;
|
||||||
|
case "not":
|
||||||
|
s = "screen and (min-width: " + (d + 1) + c + ")";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
s = "screen and (max-width: " + d + c + ")";
|
||||||
|
}
|
||||||
|
else if (isNaN(d))
|
||||||
|
switch (a) {
|
||||||
|
case "gte":
|
||||||
|
s = "screen and (min-width: " + r + c + ")";
|
||||||
|
break;
|
||||||
|
case "lte":
|
||||||
|
s = "screen";
|
||||||
|
break;
|
||||||
|
case "gt":
|
||||||
|
s = "screen and (max-width: -1px)";
|
||||||
|
break;
|
||||||
|
case "lt":
|
||||||
|
s = "screen and (max-width: " + (r - 1) + c + ")";
|
||||||
|
break;
|
||||||
|
case "not":
|
||||||
|
s = "screen and (max-width: " + (r - 1) + c + ")";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
s = "screen and (min-width: " + r + c + ")";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
switch (a) {
|
||||||
|
case "gte":
|
||||||
|
s = "screen and (min-width: " + r + c + ")";
|
||||||
|
break;
|
||||||
|
case "lte":
|
||||||
|
s = "screen and (max-width: " + d + c + ")";
|
||||||
|
break;
|
||||||
|
case "gt":
|
||||||
|
s = "screen and (min-width: " + (d + 1) + c + ")";
|
||||||
|
break;
|
||||||
|
case "lt":
|
||||||
|
s = "screen and (max-width: " + (r - 1) + c + ")";
|
||||||
|
break;
|
||||||
|
case "not":
|
||||||
|
s =
|
||||||
|
"screen and (max-width: " +
|
||||||
|
(r - 1) +
|
||||||
|
c +
|
||||||
|
"), screen and (min-width: " +
|
||||||
|
(d + 1) +
|
||||||
|
c +
|
||||||
|
")";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
s =
|
||||||
|
"screen and (min-width: " +
|
||||||
|
r +
|
||||||
|
c +
|
||||||
|
") and (max-width: " +
|
||||||
|
d +
|
||||||
|
c +
|
||||||
|
")";
|
||||||
|
}
|
||||||
|
} else s = "(" == i.charAt(0) ? "screen and " + i : i;
|
||||||
|
t.media[e] = !!s && s;
|
||||||
|
}
|
||||||
|
return t.media[e] !== !1 && window.matchMedia(t.media[e]).matches;
|
||||||
|
},
|
||||||
|
on: function (e, n) {
|
||||||
|
t.events.push({ query: e, handler: n, state: !1 }), t.active(e) && n();
|
||||||
|
},
|
||||||
|
poll: function () {
|
||||||
|
var e, n;
|
||||||
|
for (e = 0; e < t.events.length; e++)
|
||||||
|
(n = t.events[e]),
|
||||||
|
t.active(n.query)
|
||||||
|
? n.state || ((n.state = !0), n.handler())
|
||||||
|
: n.state && (n.state = !1);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
(e._ = t),
|
||||||
|
(e.on = function (e, n) {
|
||||||
|
t.on(e, n);
|
||||||
|
}),
|
||||||
|
(e.active = function (e) {
|
||||||
|
return t.active(e);
|
||||||
|
}),
|
||||||
|
e
|
||||||
|
);
|
||||||
|
})();
|
||||||
|
!(function (e, t) {
|
||||||
|
"function" == typeof define && define.amd
|
||||||
|
? define([], t)
|
||||||
|
: "object" == typeof exports
|
||||||
|
? (module.exports = t())
|
||||||
|
: (e.breakpoints = t());
|
||||||
|
})(this, function () {
|
||||||
|
return breakpoints;
|
||||||
|
});
|
||||||
|
|||||||
118
docs/assets/js/browser.min.js
vendored
@@ -1,2 +1,118 @@
|
|||||||
/* browser.js v1.0 | @ajlkn | MIT licensed */
|
/* browser.js v1.0 | @ajlkn | MIT licensed */
|
||||||
var browser=function(){"use strict";var e={name:null,version:null,os:null,osVersion:null,touch:null,mobile:null,_canUse:null,canUse:function(n){e._canUse||(e._canUse=document.createElement("div"));var o=e._canUse.style,r=n.charAt(0).toUpperCase()+n.slice(1);return n in o||"Moz"+r in o||"Webkit"+r in o||"O"+r in o||"ms"+r in o},init:function(){var n,o,r,i,t=navigator.userAgent;for(n="other",o=0,r=[["firefox",/Firefox\/([0-9\.]+)/],["bb",/BlackBerry.+Version\/([0-9\.]+)/],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/],["opera",/OPR\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)/],["edge",/Edge\/([0-9\.]+)/],["safari",/Version\/([0-9\.]+).+Safari/],["chrome",/Chrome\/([0-9\.]+)/],["ie",/MSIE ([0-9]+)/],["ie",/Trident\/.+rv:([0-9]+)/]],i=0;i<r.length;i++)if(t.match(r[i][1])){n=r[i][0],o=parseFloat(RegExp.$1);break}for(e.name=n,e.version=o,n="other",o=0,r=[["ios",/([0-9_]+) like Mac OS X/,function(e){return e.replace("_",".").replace("_","")}],["ios",/CPU like Mac OS X/,function(e){return 0}],["wp",/Windows Phone ([0-9\.]+)/,null],["android",/Android ([0-9\.]+)/,null],["mac",/Macintosh.+Mac OS X ([0-9_]+)/,function(e){return e.replace("_",".").replace("_","")}],["windows",/Windows NT ([0-9\.]+)/,null],["bb",/BlackBerry.+Version\/([0-9\.]+)/,null],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/,null],["linux",/Linux/,null],["bsd",/BSD/,null],["unix",/X11/,null]],i=0;i<r.length;i++)if(t.match(r[i][1])){n=r[i][0],o=parseFloat(r[i][2]?r[i][2](RegExp.$1):RegExp.$1);break}e.os=n,e.osVersion=o,e.touch="wp"==e.os?navigator.msMaxTouchPoints>0:!!("ontouchstart"in window),e.mobile="wp"==e.os||"android"==e.os||"ios"==e.os||"bb"==e.os}};return e.init(),e}();!function(e,n){"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():e.browser=n()}(this,function(){return browser});
|
var browser = (function () {
|
||||||
|
"use strict";
|
||||||
|
var e = {
|
||||||
|
name: null,
|
||||||
|
version: null,
|
||||||
|
os: null,
|
||||||
|
osVersion: null,
|
||||||
|
touch: null,
|
||||||
|
mobile: null,
|
||||||
|
_canUse: null,
|
||||||
|
canUse: function (n) {
|
||||||
|
e._canUse || (e._canUse = document.createElement("div"));
|
||||||
|
var o = e._canUse.style,
|
||||||
|
r = n.charAt(0).toUpperCase() + n.slice(1);
|
||||||
|
return (
|
||||||
|
n in o ||
|
||||||
|
"Moz" + r in o ||
|
||||||
|
"Webkit" + r in o ||
|
||||||
|
"O" + r in o ||
|
||||||
|
"ms" + r in o
|
||||||
|
);
|
||||||
|
},
|
||||||
|
init: function () {
|
||||||
|
var n,
|
||||||
|
o,
|
||||||
|
r,
|
||||||
|
i,
|
||||||
|
t = navigator.userAgent;
|
||||||
|
for (
|
||||||
|
n = "other",
|
||||||
|
o = 0,
|
||||||
|
r = [
|
||||||
|
["firefox", /Firefox\/([0-9\.]+)/],
|
||||||
|
["bb", /BlackBerry.+Version\/([0-9\.]+)/],
|
||||||
|
["bb", /BB[0-9]+.+Version\/([0-9\.]+)/],
|
||||||
|
["opera", /OPR\/([0-9\.]+)/],
|
||||||
|
["opera", /Opera\/([0-9\.]+)/],
|
||||||
|
["edge", /Edge\/([0-9\.]+)/],
|
||||||
|
["safari", /Version\/([0-9\.]+).+Safari/],
|
||||||
|
["chrome", /Chrome\/([0-9\.]+)/],
|
||||||
|
["ie", /MSIE ([0-9]+)/],
|
||||||
|
["ie", /Trident\/.+rv:([0-9]+)/],
|
||||||
|
],
|
||||||
|
i = 0;
|
||||||
|
i < r.length;
|
||||||
|
i++
|
||||||
|
)
|
||||||
|
if (t.match(r[i][1])) {
|
||||||
|
(n = r[i][0]), (o = parseFloat(RegExp.$1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (
|
||||||
|
e.name = n,
|
||||||
|
e.version = o,
|
||||||
|
n = "other",
|
||||||
|
o = 0,
|
||||||
|
r = [
|
||||||
|
[
|
||||||
|
"ios",
|
||||||
|
/([0-9_]+) like Mac OS X/,
|
||||||
|
function (e) {
|
||||||
|
return e.replace("_", ".").replace("_", "");
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"ios",
|
||||||
|
/CPU like Mac OS X/,
|
||||||
|
function (e) {
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
],
|
||||||
|
["wp", /Windows Phone ([0-9\.]+)/, null],
|
||||||
|
["android", /Android ([0-9\.]+)/, null],
|
||||||
|
[
|
||||||
|
"mac",
|
||||||
|
/Macintosh.+Mac OS X ([0-9_]+)/,
|
||||||
|
function (e) {
|
||||||
|
return e.replace("_", ".").replace("_", "");
|
||||||
|
},
|
||||||
|
],
|
||||||
|
["windows", /Windows NT ([0-9\.]+)/, null],
|
||||||
|
["bb", /BlackBerry.+Version\/([0-9\.]+)/, null],
|
||||||
|
["bb", /BB[0-9]+.+Version\/([0-9\.]+)/, null],
|
||||||
|
["linux", /Linux/, null],
|
||||||
|
["bsd", /BSD/, null],
|
||||||
|
["unix", /X11/, null],
|
||||||
|
],
|
||||||
|
i = 0;
|
||||||
|
i < r.length;
|
||||||
|
i++
|
||||||
|
)
|
||||||
|
if (t.match(r[i][1])) {
|
||||||
|
(n = r[i][0]),
|
||||||
|
(o = parseFloat(r[i][2] ? r[i][2](RegExp.$1) : RegExp.$1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
(e.os = n),
|
||||||
|
(e.osVersion = o),
|
||||||
|
(e.touch =
|
||||||
|
"wp" == e.os
|
||||||
|
? navigator.msMaxTouchPoints > 0
|
||||||
|
: !!("ontouchstart" in window)),
|
||||||
|
(e.mobile =
|
||||||
|
"wp" == e.os || "android" == e.os || "ios" == e.os || "bb" == e.os);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return e.init(), e;
|
||||||
|
})();
|
||||||
|
!(function (e, n) {
|
||||||
|
"function" == typeof define && define.amd
|
||||||
|
? define([], n)
|
||||||
|
: "object" == typeof exports
|
||||||
|
? (module.exports = n())
|
||||||
|
: (e.browser = n());
|
||||||
|
})(this, function () {
|
||||||
|
return browser;
|
||||||
|
});
|
||||||
|
|||||||
5512
docs/assets/js/jquery.min.js
vendored
611
docs/assets/js/jquery.poptrox.min.js
vendored
@@ -4,114 +4,105 @@
|
|||||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function($) {
|
(function ($) {
|
||||||
|
var $window = $(window),
|
||||||
|
$body = $("body"),
|
||||||
|
$header = $("#header"),
|
||||||
|
$footer = $("#footer"),
|
||||||
|
$main = $("#main"),
|
||||||
|
settings = {
|
||||||
|
// Parallax background effect?
|
||||||
|
parallax: true,
|
||||||
|
|
||||||
var $window = $(window),
|
// Parallax factor (lower = more intense, higher = less intense).
|
||||||
$body = $('body'),
|
parallaxFactor: 20,
|
||||||
$header = $('#header'),
|
};
|
||||||
$footer = $('#footer'),
|
|
||||||
$main = $('#main'),
|
|
||||||
settings = {
|
|
||||||
|
|
||||||
// Parallax background effect?
|
// Breakpoints.
|
||||||
parallax: true,
|
breakpoints({
|
||||||
|
xlarge: ["1281px", "1800px"],
|
||||||
|
large: ["981px", "1280px"],
|
||||||
|
medium: ["737px", "980px"],
|
||||||
|
small: ["481px", "736px"],
|
||||||
|
xsmall: [null, "480px"],
|
||||||
|
});
|
||||||
|
|
||||||
// Parallax factor (lower = more intense, higher = less intense).
|
// Play initial animations on page load.
|
||||||
parallaxFactor: 20
|
$window.on("load", function () {
|
||||||
|
window.setTimeout(function () {
|
||||||
|
$body.removeClass("is-preload");
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
};
|
// Touch?
|
||||||
|
if (browser.mobile) {
|
||||||
|
// Turn on touch mode.
|
||||||
|
$body.addClass("is-touch");
|
||||||
|
|
||||||
// Breakpoints.
|
// Height fix (mostly for iOS).
|
||||||
breakpoints({
|
window.setTimeout(function () {
|
||||||
xlarge: [ '1281px', '1800px' ],
|
$window.scrollTop($window.scrollTop() + 1);
|
||||||
large: [ '981px', '1280px' ],
|
}, 0);
|
||||||
medium: [ '737px', '980px' ],
|
}
|
||||||
small: [ '481px', '736px' ],
|
|
||||||
xsmall: [ null, '480px' ],
|
|
||||||
});
|
|
||||||
|
|
||||||
// Play initial animations on page load.
|
// Footer.
|
||||||
$window.on('load', function() {
|
breakpoints.on("<=medium", function () {
|
||||||
window.setTimeout(function() {
|
$footer.insertAfter($main);
|
||||||
$body.removeClass('is-preload');
|
});
|
||||||
}, 100);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Touch?
|
breakpoints.on(">medium", function () {
|
||||||
if (browser.mobile) {
|
$footer.appendTo($header);
|
||||||
|
});
|
||||||
|
|
||||||
// Turn on touch mode.
|
// Header.
|
||||||
$body.addClass('is-touch');
|
|
||||||
|
|
||||||
// Height fix (mostly for iOS).
|
// Parallax background.
|
||||||
window.setTimeout(function() {
|
|
||||||
$window.scrollTop($window.scrollTop() + 1);
|
|
||||||
}, 0);
|
|
||||||
|
|
||||||
}
|
// Disable parallax on IE (smooth scrolling is jerky), and on mobile platforms (= better performance).
|
||||||
|
if (browser.name == "ie" || browser.mobile) settings.parallax = false;
|
||||||
|
|
||||||
// Footer.
|
if (settings.parallax) {
|
||||||
breakpoints.on('<=medium', function() {
|
breakpoints.on("<=medium", function () {
|
||||||
$footer.insertAfter($main);
|
$window.off("scroll.strata_parallax");
|
||||||
});
|
$header.css("background-position", "");
|
||||||
|
});
|
||||||
|
|
||||||
breakpoints.on('>medium', function() {
|
breakpoints.on(">medium", function () {
|
||||||
$footer.appendTo($header);
|
$header.css("background-position", "left 0px");
|
||||||
});
|
|
||||||
|
|
||||||
// Header.
|
$window.on("scroll.strata_parallax", function () {
|
||||||
|
$header.css(
|
||||||
|
"background-position",
|
||||||
|
"left " +
|
||||||
|
-1 * (parseInt($window.scrollTop()) / settings.parallaxFactor) +
|
||||||
|
"px"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Parallax background.
|
$window.on("load", function () {
|
||||||
|
$window.triggerHandler("scroll");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Disable parallax on IE (smooth scrolling is jerky), and on mobile platforms (= better performance).
|
// Main Sections: Two.
|
||||||
if (browser.name == 'ie'
|
|
||||||
|| browser.mobile)
|
|
||||||
settings.parallax = false;
|
|
||||||
|
|
||||||
if (settings.parallax) {
|
// Lightbox gallery.
|
||||||
|
$window.on("load", function () {
|
||||||
breakpoints.on('<=medium', function() {
|
$("#two").poptrox({
|
||||||
|
caption: function ($a) {
|
||||||
$window.off('scroll.strata_parallax');
|
return $a.next("h3").text();
|
||||||
$header.css('background-position', '');
|
},
|
||||||
|
overlayColor: "#2c2c2c",
|
||||||
});
|
overlayOpacity: 0.85,
|
||||||
|
popupCloserText: "",
|
||||||
breakpoints.on('>medium', function() {
|
popupLoaderText: "",
|
||||||
|
selector: ".work-item a.image",
|
||||||
$header.css('background-position', 'left 0px');
|
usePopupCaption: true,
|
||||||
|
usePopupDefaultStyling: false,
|
||||||
$window.on('scroll.strata_parallax', function() {
|
usePopupEasyClose: false,
|
||||||
$header.css('background-position', 'left ' + (-1 * (parseInt($window.scrollTop()) / settings.parallaxFactor)) + 'px');
|
usePopupNav: true,
|
||||||
});
|
windowMargin: breakpoints.active("<=small") ? 0 : 50,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
})(jQuery);
|
||||||
$window.on('load', function() {
|
|
||||||
$window.triggerHandler('scroll');
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Main Sections: Two.
|
|
||||||
|
|
||||||
// Lightbox gallery.
|
|
||||||
$window.on('load', function() {
|
|
||||||
|
|
||||||
$('#two').poptrox({
|
|
||||||
caption: function($a) { return $a.next('h3').text(); },
|
|
||||||
overlayColor: '#2c2c2c',
|
|
||||||
overlayOpacity: 0.85,
|
|
||||||
popupCloserText: '',
|
|
||||||
popupLoaderText: '',
|
|
||||||
selector: '.work-item a.image',
|
|
||||||
usePopupCaption: true,
|
|
||||||
usePopupDefaultStyling: false,
|
|
||||||
usePopupEasyClose: false,
|
|
||||||
usePopupNav: true,
|
|
||||||
windowMargin: (breakpoints.active('<=small') ? 0 : 50)
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
|
|||||||
@@ -2,222 +2,201 @@
|
|||||||
|
|
||||||
// Vars.
|
// Vars.
|
||||||
|
|
||||||
/// Breakpoints.
|
/// Breakpoints.
|
||||||
/// @var {list}
|
/// @var {list}
|
||||||
$breakpoints: () !global;
|
$breakpoints: () !global;
|
||||||
|
|
||||||
// Mixins.
|
// Mixins.
|
||||||
|
|
||||||
/// Sets breakpoints.
|
/// Sets breakpoints.
|
||||||
/// @param {map} $x Breakpoints.
|
/// @param {map} $x Breakpoints.
|
||||||
@mixin breakpoints($x: ()) {
|
@mixin breakpoints($x: ()) {
|
||||||
$breakpoints: $x !global;
|
$breakpoints: $x !global;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wraps @content in a @media block targeting a specific orientation.
|
/// Wraps @content in a @media block targeting a specific orientation.
|
||||||
/// @param {string} $orientation Orientation.
|
/// @param {string} $orientation Orientation.
|
||||||
@mixin orientation($orientation) {
|
@mixin orientation($orientation) {
|
||||||
@media screen and (orientation: #{$orientation}) {
|
@media screen and (orientation: #{$orientation}) {
|
||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wraps @content in a @media block using a given query.
|
/// Wraps @content in a @media block using a given query.
|
||||||
/// @param {string} $query Query.
|
/// @param {string} $query Query.
|
||||||
@mixin breakpoint($query: null) {
|
@mixin breakpoint($query: null) {
|
||||||
|
$breakpoint: null;
|
||||||
|
$op: null;
|
||||||
|
$media: null;
|
||||||
|
|
||||||
$breakpoint: null;
|
// Determine operator, breakpoint.
|
||||||
$op: null;
|
|
||||||
$media: null;
|
|
||||||
|
|
||||||
// Determine operator, breakpoint.
|
// Greater than or equal.
|
||||||
|
@if (str-slice($query, 0, 2) == ">=") {
|
||||||
|
$op: "gte";
|
||||||
|
$breakpoint: str-slice($query, 3);
|
||||||
|
}
|
||||||
|
|
||||||
// Greater than or equal.
|
// Less than or equal.
|
||||||
@if (str-slice($query, 0, 2) == '>=') {
|
@elseif (str-slice($query, 0, 2) == '<=') {
|
||||||
|
$op: "lte";
|
||||||
|
$breakpoint: str-slice($query, 3);
|
||||||
|
}
|
||||||
|
|
||||||
$op: 'gte';
|
// Greater than.
|
||||||
$breakpoint: str-slice($query, 3);
|
@elseif (str-slice($query, 0, 1) == '>') {
|
||||||
|
$op: "gt";
|
||||||
|
$breakpoint: str-slice($query, 2);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Less than.
|
||||||
|
@elseif (str-slice($query, 0, 1) == '<') {
|
||||||
|
$op: "lt";
|
||||||
|
$breakpoint: str-slice($query, 2);
|
||||||
|
}
|
||||||
|
|
||||||
// Less than or equal.
|
// Not.
|
||||||
@elseif (str-slice($query, 0, 2) == '<=') {
|
@elseif (str-slice($query, 0, 1) == '!') {
|
||||||
|
$op: "not";
|
||||||
|
$breakpoint: str-slice($query, 2);
|
||||||
|
}
|
||||||
|
|
||||||
$op: 'lte';
|
// Equal.
|
||||||
$breakpoint: str-slice($query, 3);
|
@else {
|
||||||
|
$op: "eq";
|
||||||
|
$breakpoint: $query;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Build media.
|
||||||
|
@if ($breakpoint and map-has-key($breakpoints, $breakpoint)) {
|
||||||
|
$a: map-get($breakpoints, $breakpoint);
|
||||||
|
|
||||||
// Greater than.
|
// Range.
|
||||||
@elseif (str-slice($query, 0, 1) == '>') {
|
@if (type-of($a) == "list") {
|
||||||
|
$x: nth($a, 1);
|
||||||
|
$y: nth($a, 2);
|
||||||
|
|
||||||
$op: 'gt';
|
// Max only.
|
||||||
$breakpoint: str-slice($query, 2);
|
@if ($x == null) {
|
||||||
|
// Greater than or equal (>= 0 / anything)
|
||||||
|
@if ($op == "gte") {
|
||||||
|
$media: "screen";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Less than or equal (<= y)
|
||||||
|
@elseif ($op == 'lte') {
|
||||||
|
$media: "screen and (max-width: " + $y + ")";
|
||||||
|
}
|
||||||
|
|
||||||
// Less than.
|
// Greater than (> y)
|
||||||
@elseif (str-slice($query, 0, 1) == '<') {
|
@elseif ($op == 'gt') {
|
||||||
|
$media: "screen and (min-width: " + ($y + 1) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
$op: 'lt';
|
// Less than (< 0 / invalid)
|
||||||
$breakpoint: str-slice($query, 2);
|
@elseif ($op == 'lt') {
|
||||||
|
$media: "screen and (max-width: -1px)";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Not (> y)
|
||||||
|
@elseif ($op == 'not') {
|
||||||
|
$media: "screen and (min-width: " + ($y + 1) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
// Not.
|
// Equal (<= y)
|
||||||
@elseif (str-slice($query, 0, 1) == '!') {
|
@else {
|
||||||
|
$media: "screen and (max-width: " + $y + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$op: 'not';
|
// Min only.
|
||||||
$breakpoint: str-slice($query, 2);
|
@else if ($y == null) {
|
||||||
|
// Greater than or equal (>= x)
|
||||||
|
@if ($op == "gte") {
|
||||||
|
$media: "screen and (min-width: " + $x + ")";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Less than or equal (<= inf / anything)
|
||||||
|
@elseif ($op == 'lte') {
|
||||||
|
$media: "screen";
|
||||||
|
}
|
||||||
|
|
||||||
// Equal.
|
// Greater than (> inf / invalid)
|
||||||
@else {
|
@elseif ($op == 'gt') {
|
||||||
|
$media: "screen and (max-width: -1px)";
|
||||||
|
}
|
||||||
|
|
||||||
$op: 'eq';
|
// Less than (< x)
|
||||||
$breakpoint: $query;
|
@elseif ($op == 'lt') {
|
||||||
|
$media: "screen and (max-width: " + ($x - 1) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Not (< x)
|
||||||
|
@elseif ($op == 'not') {
|
||||||
|
$media: "screen and (max-width: " + ($x - 1) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
// Build media.
|
// Equal (>= x)
|
||||||
@if ($breakpoint and map-has-key($breakpoints, $breakpoint)) {
|
@else {
|
||||||
|
$media: "screen and (min-width: " + $x + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$a: map-get($breakpoints, $breakpoint);
|
// Min and max.
|
||||||
|
@else {
|
||||||
|
// Greater than or equal (>= x)
|
||||||
|
@if ($op == "gte") {
|
||||||
|
$media: "screen and (min-width: " + $x + ")";
|
||||||
|
}
|
||||||
|
|
||||||
// Range.
|
// Less than or equal (<= y)
|
||||||
@if (type-of($a) == 'list') {
|
@elseif ($op == 'lte') {
|
||||||
|
$media: "screen and (max-width: " + $y + ")";
|
||||||
|
}
|
||||||
|
|
||||||
$x: nth($a, 1);
|
// Greater than (> y)
|
||||||
$y: nth($a, 2);
|
@elseif ($op == 'gt') {
|
||||||
|
$media: "screen and (min-width: " + ($y + 1) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
// Max only.
|
// Less than (< x)
|
||||||
@if ($x == null) {
|
@elseif ($op == 'lt') {
|
||||||
|
$media: "screen and (max-width: " + ($x - 1) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
// Greater than or equal (>= 0 / anything)
|
// Not (< x and > y)
|
||||||
@if ($op == 'gte') {
|
@elseif ($op == 'not') {
|
||||||
$media: 'screen';
|
$media: "screen and (max-width: " + ($x - 1) +
|
||||||
}
|
"), screen and (min-width: " + ($y + 1) + ")";
|
||||||
|
}
|
||||||
|
|
||||||
// Less than or equal (<= y)
|
// Equal (>= x and <= y)
|
||||||
@elseif ($op == 'lte') {
|
@else {
|
||||||
$media: 'screen and (max-width: ' + $y + ')';
|
$media: "screen and (min-width: " +
|
||||||
}
|
$x +
|
||||||
|
") and (max-width: " +
|
||||||
|
$y +
|
||||||
|
")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Greater than (> y)
|
// String.
|
||||||
@elseif ($op == 'gt') {
|
@else {
|
||||||
$media: 'screen and (min-width: ' + ($y + 1) + ')';
|
// Missing a media type? Prefix with "screen".
|
||||||
}
|
@if (str-slice($a, 0, 1) == "(") {
|
||||||
|
$media: "screen and " + $a;
|
||||||
|
}
|
||||||
|
|
||||||
// Less than (< 0 / invalid)
|
// Otherwise, use as-is.
|
||||||
@elseif ($op == 'lt') {
|
@else {
|
||||||
$media: 'screen and (max-width: -1px)';
|
$media: $a;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Not (> y)
|
// Output.
|
||||||
@elseif ($op == 'not') {
|
@media #{$media} {
|
||||||
$media: 'screen and (min-width: ' + ($y + 1) + ')';
|
@content;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Equal (<= y)
|
|
||||||
@else {
|
|
||||||
$media: 'screen and (max-width: ' + $y + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Min only.
|
|
||||||
@else if ($y == null) {
|
|
||||||
|
|
||||||
// Greater than or equal (>= x)
|
|
||||||
@if ($op == 'gte') {
|
|
||||||
$media: 'screen and (min-width: ' + $x + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Less than or equal (<= inf / anything)
|
|
||||||
@elseif ($op == 'lte') {
|
|
||||||
$media: 'screen';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Greater than (> inf / invalid)
|
|
||||||
@elseif ($op == 'gt') {
|
|
||||||
$media: 'screen and (max-width: -1px)';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Less than (< x)
|
|
||||||
@elseif ($op == 'lt') {
|
|
||||||
$media: 'screen and (max-width: ' + ($x - 1) + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not (< x)
|
|
||||||
@elseif ($op == 'not') {
|
|
||||||
$media: 'screen and (max-width: ' + ($x - 1) + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Equal (>= x)
|
|
||||||
@else {
|
|
||||||
$media: 'screen and (min-width: ' + $x + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Min and max.
|
|
||||||
@else {
|
|
||||||
|
|
||||||
// Greater than or equal (>= x)
|
|
||||||
@if ($op == 'gte') {
|
|
||||||
$media: 'screen and (min-width: ' + $x + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Less than or equal (<= y)
|
|
||||||
@elseif ($op == 'lte') {
|
|
||||||
$media: 'screen and (max-width: ' + $y + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Greater than (> y)
|
|
||||||
@elseif ($op == 'gt') {
|
|
||||||
$media: 'screen and (min-width: ' + ($y + 1) + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Less than (< x)
|
|
||||||
@elseif ($op == 'lt') {
|
|
||||||
$media: 'screen and (max-width: ' + ($x - 1) + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not (< x and > y)
|
|
||||||
@elseif ($op == 'not') {
|
|
||||||
$media: 'screen and (max-width: ' + ($x - 1) + '), screen and (min-width: ' + ($y + 1) + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Equal (>= x and <= y)
|
|
||||||
@else {
|
|
||||||
$media: 'screen and (min-width: ' + $x + ') and (max-width: ' + $y + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// String.
|
|
||||||
@else {
|
|
||||||
|
|
||||||
// Missing a media type? Prefix with "screen".
|
|
||||||
@if (str-slice($a, 0, 1) == '(') {
|
|
||||||
$media: 'screen and ' + $a;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Otherwise, use as-is.
|
|
||||||
@else {
|
|
||||||
$media: $a;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output.
|
|
||||||
@media #{$media} {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,35 +4,26 @@
|
|||||||
/// @param {integer} $index Index.
|
/// @param {integer} $index Index.
|
||||||
/// @return {list} Updated list.
|
/// @return {list} Updated list.
|
||||||
@function remove-nth($list, $index) {
|
@function remove-nth($list, $index) {
|
||||||
|
$result: null;
|
||||||
|
|
||||||
$result: null;
|
@if type-of($index) != number {
|
||||||
|
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
|
||||||
|
} @else if $index == 0 {
|
||||||
|
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
|
||||||
|
} @else if abs($index) > length($list) {
|
||||||
|
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
|
||||||
|
} @else {
|
||||||
|
$result: ();
|
||||||
|
$index: if($index < 0, length($list) + $index + 1, $index);
|
||||||
|
|
||||||
@if type-of($index) != number {
|
@for $i from 1 through length($list) {
|
||||||
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
|
@if $i != $index {
|
||||||
}
|
$result: append($result, nth($list, $i));
|
||||||
@else if $index == 0 {
|
}
|
||||||
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
|
}
|
||||||
}
|
}
|
||||||
@else if abs($index) > length($list) {
|
|
||||||
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
|
|
||||||
}
|
|
||||||
@else {
|
|
||||||
|
|
||||||
$result: ();
|
|
||||||
$index: if($index < 0, length($list) + $index + 1, $index);
|
|
||||||
|
|
||||||
@for $i from 1 through length($list) {
|
|
||||||
|
|
||||||
@if $i != $index {
|
|
||||||
$result: append($result, nth($list, $i));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@return $result;
|
|
||||||
|
|
||||||
|
@return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a value from a map.
|
/// Gets a value from a map.
|
||||||
@@ -41,50 +32,48 @@
|
|||||||
/// @param {string} $keys Key(s).
|
/// @param {string} $keys Key(s).
|
||||||
/// @return {string} Value.
|
/// @return {string} Value.
|
||||||
@function val($map, $keys...) {
|
@function val($map, $keys...) {
|
||||||
|
@if nth($keys, 1) == null {
|
||||||
|
$keys: remove-nth($keys, 1);
|
||||||
|
}
|
||||||
|
|
||||||
@if nth($keys, 1) == null {
|
@each $key in $keys {
|
||||||
$keys: remove-nth($keys, 1);
|
$map: map-get($map, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@each $key in $keys {
|
|
||||||
$map: map-get($map, $key);
|
|
||||||
}
|
|
||||||
|
|
||||||
@return $map;
|
|
||||||
|
|
||||||
|
@return $map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a duration value.
|
/// Gets a duration value.
|
||||||
/// @param {string} $keys Key(s).
|
/// @param {string} $keys Key(s).
|
||||||
/// @return {string} Value.
|
/// @return {string} Value.
|
||||||
@function _duration($keys...) {
|
@function _duration($keys...) {
|
||||||
@return val($duration, $keys...);
|
@return val($duration, $keys...);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a font value.
|
/// Gets a font value.
|
||||||
/// @param {string} $keys Key(s).
|
/// @param {string} $keys Key(s).
|
||||||
/// @return {string} Value.
|
/// @return {string} Value.
|
||||||
@function _font($keys...) {
|
@function _font($keys...) {
|
||||||
@return val($font, $keys...);
|
@return val($font, $keys...);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a misc value.
|
/// Gets a misc value.
|
||||||
/// @param {string} $keys Key(s).
|
/// @param {string} $keys Key(s).
|
||||||
/// @return {string} Value.
|
/// @return {string} Value.
|
||||||
@function _misc($keys...) {
|
@function _misc($keys...) {
|
||||||
@return val($misc, $keys...);
|
@return val($misc, $keys...);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a palette value.
|
/// Gets a palette value.
|
||||||
/// @param {string} $keys Key(s).
|
/// @param {string} $keys Key(s).
|
||||||
/// @return {string} Value.
|
/// @return {string} Value.
|
||||||
@function _palette($keys...) {
|
@function _palette($keys...) {
|
||||||
@return val($palette, $keys...);
|
@return val($palette, $keys...);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a size value.
|
/// Gets a size value.
|
||||||
/// @param {string} $keys Key(s).
|
/// @param {string} $keys Key(s).
|
||||||
/// @return {string} Value.
|
/// @return {string} Value.
|
||||||
@function _size($keys...) {
|
@function _size($keys...) {
|
||||||
@return val($size, $keys...);
|
@return val($size, $keys...);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,148 +2,137 @@
|
|||||||
|
|
||||||
// Mixins.
|
// Mixins.
|
||||||
|
|
||||||
/// Initializes the current element as an HTML grid.
|
/// Initializes the current element as an HTML grid.
|
||||||
/// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually).
|
/// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually).
|
||||||
/// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list).
|
/// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list).
|
||||||
@mixin html-grid($gutters: 1.5em, $suffix: '') {
|
@mixin html-grid($gutters: 1.5em, $suffix: "") {
|
||||||
|
// Initialize.
|
||||||
|
$cols: 12;
|
||||||
|
$multipliers: 0, 0.25, 0.5, 1, 1.5, 2;
|
||||||
|
$unit: 100% / $cols;
|
||||||
|
|
||||||
// Initialize.
|
// Suffixes.
|
||||||
$cols: 12;
|
$suffixes: null;
|
||||||
$multipliers: 0, 0.25, 0.5, 1, 1.50, 2.00;
|
|
||||||
$unit: 100% / $cols;
|
|
||||||
|
|
||||||
// Suffixes.
|
@if (type-of($suffix) == "list") {
|
||||||
$suffixes: null;
|
$suffixes: $suffix;
|
||||||
|
} @else {
|
||||||
|
$suffixes: ($suffix);
|
||||||
|
}
|
||||||
|
|
||||||
@if (type-of($suffix) == 'list') {
|
// Gutters.
|
||||||
$suffixes: $suffix;
|
$guttersCols: null;
|
||||||
}
|
$guttersRows: null;
|
||||||
@else {
|
|
||||||
$suffixes: ($suffix);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Gutters.
|
@if (type-of($gutters) == "list") {
|
||||||
$guttersCols: null;
|
$guttersCols: nth($gutters, 1);
|
||||||
$guttersRows: null;
|
$guttersRows: nth($gutters, 2);
|
||||||
|
} @else {
|
||||||
|
$guttersCols: $gutters;
|
||||||
|
$guttersRows: 0;
|
||||||
|
}
|
||||||
|
|
||||||
@if (type-of($gutters) == 'list') {
|
// Row.
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
box-sizing: border-box;
|
||||||
|
align-items: stretch;
|
||||||
|
|
||||||
$guttersCols: nth($gutters, 1);
|
// Columns.
|
||||||
$guttersRows: nth($gutters, 2);
|
> * {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
// Gutters.
|
||||||
@else {
|
&.gtr-uniform {
|
||||||
|
> * {
|
||||||
|
> :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$guttersCols: $gutters;
|
// Alignment.
|
||||||
$guttersRows: 0;
|
&.aln-left {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
&.aln-center {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
// Row.
|
&.aln-right {
|
||||||
display: flex;
|
justify-content: flex-end;
|
||||||
flex-wrap: wrap;
|
}
|
||||||
box-sizing: border-box;
|
|
||||||
align-items: stretch;
|
|
||||||
|
|
||||||
// Columns.
|
&.aln-top {
|
||||||
> * {
|
align-items: flex-start;
|
||||||
box-sizing: border-box;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Gutters.
|
&.aln-middle {
|
||||||
&.gtr-uniform {
|
align-items: center;
|
||||||
> * {
|
}
|
||||||
> :last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Alignment.
|
&.aln-bottom {
|
||||||
&.aln-left {
|
align-items: flex-end;
|
||||||
justify-content: flex-start;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.aln-center {
|
// Step through suffixes.
|
||||||
justify-content: center;
|
@each $suffix in $suffixes {
|
||||||
}
|
// Suffix.
|
||||||
|
@if ($suffix != "") {
|
||||||
|
$suffix: "-" + $suffix;
|
||||||
|
} @else {
|
||||||
|
$suffix: "";
|
||||||
|
}
|
||||||
|
|
||||||
&.aln-right {
|
// Row.
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.aln-top {
|
// Important.
|
||||||
align-items: flex-start;
|
> .imp#{$suffix} {
|
||||||
}
|
order: -1;
|
||||||
|
}
|
||||||
|
|
||||||
&.aln-middle {
|
// Columns, offsets.
|
||||||
align-items: center;
|
@for $i from 1 through $cols {
|
||||||
}
|
> .col-#{$i}#{$suffix} {
|
||||||
|
width: $unit * $i;
|
||||||
|
}
|
||||||
|
|
||||||
&.aln-bottom {
|
> .off-#{$i}#{$suffix} {
|
||||||
align-items: flex-end;
|
margin-left: $unit * $i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Step through suffixes.
|
// Step through multipliers.
|
||||||
@each $suffix in $suffixes {
|
@each $multiplier in $multipliers {
|
||||||
|
// Gutters.
|
||||||
|
$class: null;
|
||||||
|
|
||||||
// Suffix.
|
@if ($multiplier != 1) {
|
||||||
@if ($suffix != '') {
|
$class: ".gtr-" + ($multiplier * 100);
|
||||||
$suffix: '-' + $suffix;
|
}
|
||||||
}
|
|
||||||
@else {
|
|
||||||
$suffix: '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Row.
|
&#{$class} {
|
||||||
|
margin-top: ($guttersRows * $multiplier * -1);
|
||||||
|
margin-left: ($guttersCols * $multiplier * -1);
|
||||||
|
|
||||||
// Important.
|
> * {
|
||||||
> .imp#{$suffix} {
|
padding: ($guttersRows * $multiplier)
|
||||||
order: -1;
|
0
|
||||||
}
|
0
|
||||||
|
($guttersCols * $multiplier);
|
||||||
|
}
|
||||||
|
|
||||||
// Columns, offsets.
|
// Uniform.
|
||||||
@for $i from 1 through $cols {
|
&.gtr-uniform {
|
||||||
> .col-#{$i}#{$suffix} {
|
margin-top: $guttersCols * $multiplier * -1;
|
||||||
width: $unit * $i;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .off-#{$i}#{$suffix} {
|
> * {
|
||||||
margin-left: $unit * $i;
|
padding-top: $guttersCols * $multiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Step through multipliers.
|
}
|
||||||
@each $multiplier in $multipliers {
|
}
|
||||||
|
}
|
||||||
// Gutters.
|
|
||||||
$class: null;
|
|
||||||
|
|
||||||
@if ($multiplier != 1) {
|
|
||||||
$class: '.gtr-' + ($multiplier * 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
&#{$class} {
|
|
||||||
margin-top: ($guttersRows * $multiplier * -1);
|
|
||||||
margin-left: ($guttersCols * $multiplier * -1);
|
|
||||||
|
|
||||||
> * {
|
|
||||||
padding: ($guttersRows * $multiplier) 0 0 ($guttersCols * $multiplier);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Uniform.
|
|
||||||
&.gtr-uniform {
|
|
||||||
margin-top: $guttersCols * $multiplier * -1;
|
|
||||||
|
|
||||||
> * {
|
|
||||||
padding-top: $guttersCols * $multiplier;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,38 +3,33 @@
|
|||||||
/// @param {string} $category Optional category to use.
|
/// @param {string} $category Optional category to use.
|
||||||
/// @param {string} $where Optional pseudoelement to target (before or after).
|
/// @param {string} $where Optional pseudoelement to target (before or after).
|
||||||
@mixin icon($content: false, $category: regular, $where: before) {
|
@mixin icon($content: false, $category: regular, $where: before) {
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
text-decoration: none;
|
&:#{$where} {
|
||||||
|
@if $content {
|
||||||
|
content: $content;
|
||||||
|
}
|
||||||
|
|
||||||
&:#{$where} {
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
@if $content {
|
display: inline-block;
|
||||||
content: $content;
|
font-style: normal;
|
||||||
}
|
font-variant: normal;
|
||||||
|
text-rendering: auto;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
line-height: 1;
|
||||||
-webkit-font-smoothing: antialiased;
|
text-transform: none !important;
|
||||||
display: inline-block;
|
|
||||||
font-style: normal;
|
|
||||||
font-variant: normal;
|
|
||||||
text-rendering: auto;
|
|
||||||
line-height: 1;
|
|
||||||
text-transform: none !important;
|
|
||||||
|
|
||||||
@if ($category == brands) {
|
|
||||||
font-family: 'Font Awesome 5 Brands';
|
|
||||||
}
|
|
||||||
@elseif ($category == solid) {
|
|
||||||
font-family: 'Font Awesome 5 Free';
|
|
||||||
font-weight: 900;
|
|
||||||
}
|
|
||||||
@else {
|
|
||||||
font-family: 'Font Awesome 5 Free';
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@if ($category == brands) {
|
||||||
|
font-family: "Font Awesome 5 Brands";
|
||||||
|
}
|
||||||
|
@elseif ($category == solid) {
|
||||||
|
font-family: "Font Awesome 5 Free";
|
||||||
|
font-weight: 900;
|
||||||
|
} @else {
|
||||||
|
font-family: "Font Awesome 5 Free";
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Applies padding to an element, taking the current element-margin value into account.
|
/// Applies padding to an element, taking the current element-margin value into account.
|
||||||
@@ -42,37 +37,34 @@
|
|||||||
/// @param {mixed} $lr Left/right padding.
|
/// @param {mixed} $lr Left/right padding.
|
||||||
/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)
|
/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)
|
||||||
/// @param {bool} $important If true, adds !important.
|
/// @param {bool} $important If true, adds !important.
|
||||||
@mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) {
|
@mixin padding($tb, $lr, $pad: (0, 0, 0, 0), $important: null) {
|
||||||
|
@if $important {
|
||||||
|
$important: "!important";
|
||||||
|
}
|
||||||
|
|
||||||
@if $important {
|
$x: 0.1em;
|
||||||
$important: '!important';
|
|
||||||
}
|
|
||||||
|
|
||||||
$x: 0.1em;
|
@if unit(_size(element-margin)) == "rem" {
|
||||||
|
$x: 0.1rem;
|
||||||
@if unit(_size(element-margin)) == 'rem' {
|
}
|
||||||
$x: 0.1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important};
|
|
||||||
|
|
||||||
|
padding: ($tb + nth($pad, 1)) ($lr + nth($pad, 2))
|
||||||
|
max($x, $tb - _size(element-margin) + nth($pad, 3)) ($lr + nth($pad, 4)) #{$important};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).
|
/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).
|
||||||
/// @param {string} $svg SVG data URL.
|
/// @param {string} $svg SVG data URL.
|
||||||
/// @return {string} Encoded SVG data URL.
|
/// @return {string} Encoded SVG data URL.
|
||||||
@function svg-url($svg) {
|
@function svg-url($svg) {
|
||||||
|
$svg: str-replace($svg, '"', "'");
|
||||||
|
$svg: str-replace($svg, "%", "%25");
|
||||||
|
$svg: str-replace($svg, "<", "%3C");
|
||||||
|
$svg: str-replace($svg, ">", "%3E");
|
||||||
|
$svg: str-replace($svg, "&", "%26");
|
||||||
|
$svg: str-replace($svg, "#", "%23");
|
||||||
|
$svg: str-replace($svg, "{", "%7B");
|
||||||
|
$svg: str-replace($svg, "}", "%7D");
|
||||||
|
$svg: str-replace($svg, ";", "%3B");
|
||||||
|
|
||||||
$svg: str-replace($svg, '"', '\'');
|
@return url("data:image/svg+xml;charset=utf8,#{$svg}");
|
||||||
$svg: str-replace($svg, '%', '%25');
|
}
|
||||||
$svg: str-replace($svg, '<', '%3C');
|
|
||||||
$svg: str-replace($svg, '>', '%3E');
|
|
||||||
$svg: str-replace($svg, '&', '%26');
|
|
||||||
$svg: str-replace($svg, '#', '%23');
|
|
||||||
$svg: str-replace($svg, '{', '%7B');
|
|
||||||
$svg: str-replace($svg, '}', '%7D');
|
|
||||||
$svg: str-replace($svg, ';', '%3B');
|
|
||||||
|
|
||||||
@return url("data:image/svg+xml;charset=utf8,#{$svg}");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,59 +1,64 @@
|
|||||||
// Misc.
|
// Misc.
|
||||||
$misc: (
|
$misc: (
|
||||||
z-index-base: 10000
|
z-index-base: 10000,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Duration.
|
// Duration.
|
||||||
$duration: (
|
$duration: (
|
||||||
transition: 0.2s
|
transition: 0.2s,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Size.
|
// Size.
|
||||||
$size: (
|
$size: (
|
||||||
border-radius: 0.35em,
|
border-radius: 0.35em,
|
||||||
element-height: 2.75em,
|
element-height: 2.75em,
|
||||||
element-margin: 2em,
|
element-margin: 2em,
|
||||||
container-width: 100%
|
container-width: 100%,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Font.
|
// Font.
|
||||||
$font: (
|
$font: (
|
||||||
family: ('Source Sans Pro', Helvetica, sans-serif),
|
family: (
|
||||||
family-fixed: ('Courier New', monospace),
|
"Source Sans Pro",
|
||||||
weight: 400,
|
Helvetica,
|
||||||
weight-bold: 400
|
sans-serif,
|
||||||
);
|
),
|
||||||
|
family-fixed: (
|
||||||
|
"Courier New",
|
||||||
|
monospace,
|
||||||
|
),
|
||||||
|
weight: 400,
|
||||||
|
weight-bold: 400,
|
||||||
|
);
|
||||||
|
|
||||||
// Palette.
|
// Palette.
|
||||||
$palette: (
|
$palette: (
|
||||||
bg: #fff,
|
bg: #fff,
|
||||||
fg: #a2a2a2,
|
fg: #a2a2a2,
|
||||||
fg-bold: #787878,
|
fg-bold: #787878,
|
||||||
fg-light: #b2b2b2,
|
fg-light: #b2b2b2,
|
||||||
border: #efefef,
|
border: #efefef,
|
||||||
border-bg: #f7f7f7,
|
border-bg: #f7f7f7,
|
||||||
border2: #dfdfdf,
|
border2: #dfdfdf,
|
||||||
border2-bg: #e7e7e7,
|
border2-bg: #e7e7e7,
|
||||||
|
accent1: (
|
||||||
accent1: (
|
bg: #49bf9d,
|
||||||
bg: #49bf9d,
|
fg: mix(#49bf9d, #ffffff, 25%),
|
||||||
fg: mix(#49bf9d, #ffffff, 25%),
|
fg-bold: #ffffff,
|
||||||
fg-bold: #ffffff,
|
fg-light: mix(#49bf9d, #ffffff, 40%),
|
||||||
fg-light: mix(#49bf9d, #ffffff, 40%),
|
border: rgba(255, 255, 255, 0.25),
|
||||||
border: rgba(255,255,255,0.25),
|
border-bg: rgba(255, 255, 255, 0.075),
|
||||||
border-bg: rgba(255,255,255,0.075),
|
border2: rgba(255, 255, 255, 0.5),
|
||||||
border2: rgba(255,255,255,0.5),
|
border2-bg: rgba(255, 255, 255, 0.2),
|
||||||
border2-bg: rgba(255,255,255,0.2)
|
),
|
||||||
),
|
accent2: (
|
||||||
|
bg: #1f1815,
|
||||||
accent2: (
|
fg: rgba(255, 255, 255, 0.5),
|
||||||
bg: #1f1815,
|
fg-bold: #ffffff,
|
||||||
fg: rgba(255,255,255,0.5),
|
fg-light: rgba(255, 255, 255, 0.4),
|
||||||
fg-bold: #ffffff,
|
border: rgba(255, 255, 255, 0.25),
|
||||||
fg-light: rgba(255,255,255,0.4),
|
border-bg: rgba(255, 255, 255, 0.075),
|
||||||
border: rgba(255,255,255,0.25),
|
border2: rgba(255, 255, 255, 0.5),
|
||||||
border-bg: rgba(255,255,255,0.075),
|
border2-bg: rgba(255, 255, 255, 0.2),
|
||||||
border2: rgba(255,255,255,0.5),
|
),
|
||||||
border2-bg: rgba(255,255,255,0.2)
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|||||||
@@ -2,375 +2,323 @@
|
|||||||
|
|
||||||
// Vars.
|
// Vars.
|
||||||
|
|
||||||
/// Vendor prefixes.
|
/// Vendor prefixes.
|
||||||
/// @var {list}
|
/// @var {list}
|
||||||
$vendor-prefixes: (
|
$vendor-prefixes: ("-moz-", "-webkit-", "-ms-", "");
|
||||||
'-moz-',
|
|
||||||
'-webkit-',
|
|
||||||
'-ms-',
|
|
||||||
''
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Properties that should be vendorized.
|
/// Properties that should be vendorized.
|
||||||
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
|
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
|
||||||
/// @var {list}
|
/// @var {list}
|
||||||
$vendor-properties: (
|
$vendor-properties: (
|
||||||
|
// Animation.
|
||||||
|
"animation",
|
||||||
|
"animation-delay",
|
||||||
|
"animation-direction",
|
||||||
|
"animation-duration",
|
||||||
|
"animation-fill-mode",
|
||||||
|
"animation-iteration-count",
|
||||||
|
"animation-name",
|
||||||
|
"animation-play-state",
|
||||||
|
"animation-timing-function",
|
||||||
|
// Appearance.
|
||||||
|
"appearance",
|
||||||
|
// Backdrop filter.
|
||||||
|
"backdrop-filter",
|
||||||
|
// Background image options.
|
||||||
|
"background-clip",
|
||||||
|
"background-origin",
|
||||||
|
"background-size",
|
||||||
|
// Box sizing.
|
||||||
|
"box-sizing",
|
||||||
|
// Clip path.
|
||||||
|
"clip-path",
|
||||||
|
// Filter effects.
|
||||||
|
"filter",
|
||||||
|
// Flexbox.
|
||||||
|
"align-content",
|
||||||
|
"align-items",
|
||||||
|
"align-self",
|
||||||
|
"flex",
|
||||||
|
"flex-basis",
|
||||||
|
"flex-direction",
|
||||||
|
"flex-flow",
|
||||||
|
"flex-grow",
|
||||||
|
"flex-shrink",
|
||||||
|
"flex-wrap",
|
||||||
|
"justify-content",
|
||||||
|
"order",
|
||||||
|
// Font feature.
|
||||||
|
"font-feature-settings",
|
||||||
|
"font-language-override",
|
||||||
|
"font-variant-ligatures",
|
||||||
|
// Font kerning.
|
||||||
|
"font-kerning",
|
||||||
|
// Fragmented borders and backgrounds.
|
||||||
|
"box-decoration-break",
|
||||||
|
// Grid layout.
|
||||||
|
"grid-column",
|
||||||
|
"grid-column-align",
|
||||||
|
"grid-column-end",
|
||||||
|
"grid-column-start",
|
||||||
|
"grid-row",
|
||||||
|
"grid-row-align",
|
||||||
|
"grid-row-end",
|
||||||
|
"grid-row-start",
|
||||||
|
"grid-template-columns",
|
||||||
|
"grid-template-rows",
|
||||||
|
// Hyphens.
|
||||||
|
"hyphens",
|
||||||
|
"word-break",
|
||||||
|
// Masks.
|
||||||
|
"mask",
|
||||||
|
"mask-border",
|
||||||
|
"mask-border-outset",
|
||||||
|
"mask-border-repeat",
|
||||||
|
"mask-border-slice",
|
||||||
|
"mask-border-source",
|
||||||
|
"mask-border-width",
|
||||||
|
"mask-clip",
|
||||||
|
"mask-composite",
|
||||||
|
"mask-image",
|
||||||
|
"mask-origin",
|
||||||
|
"mask-position",
|
||||||
|
"mask-repeat",
|
||||||
|
"mask-size",
|
||||||
|
// Multicolumn.
|
||||||
|
"break-after",
|
||||||
|
"break-before",
|
||||||
|
"break-inside",
|
||||||
|
"column-count",
|
||||||
|
"column-fill",
|
||||||
|
"column-gap",
|
||||||
|
"column-rule",
|
||||||
|
"column-rule-color",
|
||||||
|
"column-rule-style",
|
||||||
|
"column-rule-width",
|
||||||
|
"column-span",
|
||||||
|
"column-width",
|
||||||
|
"columns",
|
||||||
|
// Object fit.
|
||||||
|
"object-fit",
|
||||||
|
"object-position",
|
||||||
|
// Regions.
|
||||||
|
"flow-from",
|
||||||
|
"flow-into",
|
||||||
|
"region-fragment",
|
||||||
|
// Scroll snap points.
|
||||||
|
"scroll-snap-coordinate",
|
||||||
|
"scroll-snap-destination",
|
||||||
|
"scroll-snap-points-x",
|
||||||
|
"scroll-snap-points-y",
|
||||||
|
"scroll-snap-type",
|
||||||
|
// Shapes.
|
||||||
|
"shape-image-threshold",
|
||||||
|
"shape-margin",
|
||||||
|
"shape-outside",
|
||||||
|
// Tab size.
|
||||||
|
"tab-size",
|
||||||
|
// Text align last.
|
||||||
|
"text-align-last",
|
||||||
|
// Text decoration.
|
||||||
|
"text-decoration-color",
|
||||||
|
"text-decoration-line",
|
||||||
|
"text-decoration-skip",
|
||||||
|
"text-decoration-style",
|
||||||
|
// Text emphasis.
|
||||||
|
"text-emphasis",
|
||||||
|
"text-emphasis-color",
|
||||||
|
"text-emphasis-position",
|
||||||
|
"text-emphasis-style",
|
||||||
|
// Text size adjust.
|
||||||
|
"text-size-adjust",
|
||||||
|
// Text spacing.
|
||||||
|
"text-spacing",
|
||||||
|
// Transform.
|
||||||
|
"transform",
|
||||||
|
"transform-origin",
|
||||||
|
// Transform 3D.
|
||||||
|
"backface-visibility",
|
||||||
|
"perspective",
|
||||||
|
"perspective-origin",
|
||||||
|
"transform-style",
|
||||||
|
// Transition.
|
||||||
|
"transition",
|
||||||
|
"transition-delay",
|
||||||
|
"transition-duration",
|
||||||
|
"transition-property",
|
||||||
|
"transition-timing-function",
|
||||||
|
// Unicode bidi.
|
||||||
|
"unicode-bidi",
|
||||||
|
// User select.
|
||||||
|
"user-select",
|
||||||
|
// Writing mode.
|
||||||
|
"writing-mode"
|
||||||
|
);
|
||||||
|
|
||||||
// Animation.
|
/// Values that should be vendorized.
|
||||||
'animation',
|
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
|
||||||
'animation-delay',
|
/// @var {list}
|
||||||
'animation-direction',
|
$vendor-values: (
|
||||||
'animation-duration',
|
// Cross fade.
|
||||||
'animation-fill-mode',
|
"cross-fade",
|
||||||
'animation-iteration-count',
|
// Element function.
|
||||||
'animation-name',
|
"element",
|
||||||
'animation-play-state',
|
// Filter function.
|
||||||
'animation-timing-function',
|
"filter",
|
||||||
|
// Flexbox.
|
||||||
// Appearance.
|
"flex",
|
||||||
'appearance',
|
"inline-flex",
|
||||||
|
// Grab cursors.
|
||||||
// Backdrop filter.
|
"grab",
|
||||||
'backdrop-filter',
|
"grabbing",
|
||||||
|
// Gradients.
|
||||||
// Background image options.
|
"linear-gradient",
|
||||||
'background-clip',
|
"repeating-linear-gradient",
|
||||||
'background-origin',
|
"radial-gradient",
|
||||||
'background-size',
|
"repeating-radial-gradient",
|
||||||
|
// Grid layout.
|
||||||
// Box sizing.
|
"grid",
|
||||||
'box-sizing',
|
"inline-grid",
|
||||||
|
// Image set.
|
||||||
// Clip path.
|
"image-set",
|
||||||
'clip-path',
|
// Intrinsic width.
|
||||||
|
"max-content",
|
||||||
// Filter effects.
|
"min-content",
|
||||||
'filter',
|
"fit-content",
|
||||||
|
"fill",
|
||||||
// Flexbox.
|
"fill-available",
|
||||||
'align-content',
|
"stretch",
|
||||||
'align-items',
|
// Sticky position.
|
||||||
'align-self',
|
"sticky",
|
||||||
'flex',
|
// Transform.
|
||||||
'flex-basis',
|
"transform",
|
||||||
'flex-direction',
|
// Zoom cursors.
|
||||||
'flex-flow',
|
"zoom-in",
|
||||||
'flex-grow',
|
"zoom-out"
|
||||||
'flex-shrink',
|
);
|
||||||
'flex-wrap',
|
|
||||||
'justify-content',
|
|
||||||
'order',
|
|
||||||
|
|
||||||
// Font feature.
|
|
||||||
'font-feature-settings',
|
|
||||||
'font-language-override',
|
|
||||||
'font-variant-ligatures',
|
|
||||||
|
|
||||||
// Font kerning.
|
|
||||||
'font-kerning',
|
|
||||||
|
|
||||||
// Fragmented borders and backgrounds.
|
|
||||||
'box-decoration-break',
|
|
||||||
|
|
||||||
// Grid layout.
|
|
||||||
'grid-column',
|
|
||||||
'grid-column-align',
|
|
||||||
'grid-column-end',
|
|
||||||
'grid-column-start',
|
|
||||||
'grid-row',
|
|
||||||
'grid-row-align',
|
|
||||||
'grid-row-end',
|
|
||||||
'grid-row-start',
|
|
||||||
'grid-template-columns',
|
|
||||||
'grid-template-rows',
|
|
||||||
|
|
||||||
// Hyphens.
|
|
||||||
'hyphens',
|
|
||||||
'word-break',
|
|
||||||
|
|
||||||
// Masks.
|
|
||||||
'mask',
|
|
||||||
'mask-border',
|
|
||||||
'mask-border-outset',
|
|
||||||
'mask-border-repeat',
|
|
||||||
'mask-border-slice',
|
|
||||||
'mask-border-source',
|
|
||||||
'mask-border-width',
|
|
||||||
'mask-clip',
|
|
||||||
'mask-composite',
|
|
||||||
'mask-image',
|
|
||||||
'mask-origin',
|
|
||||||
'mask-position',
|
|
||||||
'mask-repeat',
|
|
||||||
'mask-size',
|
|
||||||
|
|
||||||
// Multicolumn.
|
|
||||||
'break-after',
|
|
||||||
'break-before',
|
|
||||||
'break-inside',
|
|
||||||
'column-count',
|
|
||||||
'column-fill',
|
|
||||||
'column-gap',
|
|
||||||
'column-rule',
|
|
||||||
'column-rule-color',
|
|
||||||
'column-rule-style',
|
|
||||||
'column-rule-width',
|
|
||||||
'column-span',
|
|
||||||
'column-width',
|
|
||||||
'columns',
|
|
||||||
|
|
||||||
// Object fit.
|
|
||||||
'object-fit',
|
|
||||||
'object-position',
|
|
||||||
|
|
||||||
// Regions.
|
|
||||||
'flow-from',
|
|
||||||
'flow-into',
|
|
||||||
'region-fragment',
|
|
||||||
|
|
||||||
// Scroll snap points.
|
|
||||||
'scroll-snap-coordinate',
|
|
||||||
'scroll-snap-destination',
|
|
||||||
'scroll-snap-points-x',
|
|
||||||
'scroll-snap-points-y',
|
|
||||||
'scroll-snap-type',
|
|
||||||
|
|
||||||
// Shapes.
|
|
||||||
'shape-image-threshold',
|
|
||||||
'shape-margin',
|
|
||||||
'shape-outside',
|
|
||||||
|
|
||||||
// Tab size.
|
|
||||||
'tab-size',
|
|
||||||
|
|
||||||
// Text align last.
|
|
||||||
'text-align-last',
|
|
||||||
|
|
||||||
// Text decoration.
|
|
||||||
'text-decoration-color',
|
|
||||||
'text-decoration-line',
|
|
||||||
'text-decoration-skip',
|
|
||||||
'text-decoration-style',
|
|
||||||
|
|
||||||
// Text emphasis.
|
|
||||||
'text-emphasis',
|
|
||||||
'text-emphasis-color',
|
|
||||||
'text-emphasis-position',
|
|
||||||
'text-emphasis-style',
|
|
||||||
|
|
||||||
// Text size adjust.
|
|
||||||
'text-size-adjust',
|
|
||||||
|
|
||||||
// Text spacing.
|
|
||||||
'text-spacing',
|
|
||||||
|
|
||||||
// Transform.
|
|
||||||
'transform',
|
|
||||||
'transform-origin',
|
|
||||||
|
|
||||||
// Transform 3D.
|
|
||||||
'backface-visibility',
|
|
||||||
'perspective',
|
|
||||||
'perspective-origin',
|
|
||||||
'transform-style',
|
|
||||||
|
|
||||||
// Transition.
|
|
||||||
'transition',
|
|
||||||
'transition-delay',
|
|
||||||
'transition-duration',
|
|
||||||
'transition-property',
|
|
||||||
'transition-timing-function',
|
|
||||||
|
|
||||||
// Unicode bidi.
|
|
||||||
'unicode-bidi',
|
|
||||||
|
|
||||||
// User select.
|
|
||||||
'user-select',
|
|
||||||
|
|
||||||
// Writing mode.
|
|
||||||
'writing-mode',
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Values that should be vendorized.
|
|
||||||
/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org
|
|
||||||
/// @var {list}
|
|
||||||
$vendor-values: (
|
|
||||||
|
|
||||||
// Cross fade.
|
|
||||||
'cross-fade',
|
|
||||||
|
|
||||||
// Element function.
|
|
||||||
'element',
|
|
||||||
|
|
||||||
// Filter function.
|
|
||||||
'filter',
|
|
||||||
|
|
||||||
// Flexbox.
|
|
||||||
'flex',
|
|
||||||
'inline-flex',
|
|
||||||
|
|
||||||
// Grab cursors.
|
|
||||||
'grab',
|
|
||||||
'grabbing',
|
|
||||||
|
|
||||||
// Gradients.
|
|
||||||
'linear-gradient',
|
|
||||||
'repeating-linear-gradient',
|
|
||||||
'radial-gradient',
|
|
||||||
'repeating-radial-gradient',
|
|
||||||
|
|
||||||
// Grid layout.
|
|
||||||
'grid',
|
|
||||||
'inline-grid',
|
|
||||||
|
|
||||||
// Image set.
|
|
||||||
'image-set',
|
|
||||||
|
|
||||||
// Intrinsic width.
|
|
||||||
'max-content',
|
|
||||||
'min-content',
|
|
||||||
'fit-content',
|
|
||||||
'fill',
|
|
||||||
'fill-available',
|
|
||||||
'stretch',
|
|
||||||
|
|
||||||
// Sticky position.
|
|
||||||
'sticky',
|
|
||||||
|
|
||||||
// Transform.
|
|
||||||
'transform',
|
|
||||||
|
|
||||||
// Zoom cursors.
|
|
||||||
'zoom-in',
|
|
||||||
'zoom-out',
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
// Functions.
|
// Functions.
|
||||||
|
|
||||||
/// Removes a specific item from a list.
|
/// Removes a specific item from a list.
|
||||||
/// @author Hugo Giraudel
|
/// @author Hugo Giraudel
|
||||||
/// @param {list} $list List.
|
/// @param {list} $list List.
|
||||||
/// @param {integer} $index Index.
|
/// @param {integer} $index Index.
|
||||||
/// @return {list} Updated list.
|
/// @return {list} Updated list.
|
||||||
@function remove-nth($list, $index) {
|
@function remove-nth($list, $index) {
|
||||||
|
$result: null;
|
||||||
|
|
||||||
$result: null;
|
@if type-of($index) != number {
|
||||||
|
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
|
||||||
|
} @else if $index == 0 {
|
||||||
|
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
|
||||||
|
} @else if abs($index) > length($list) {
|
||||||
|
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
|
||||||
|
} @else {
|
||||||
|
$result: ();
|
||||||
|
$index: if($index < 0, length($list) + $index + 1, $index);
|
||||||
|
|
||||||
@if type-of($index) != number {
|
@for $i from 1 through length($list) {
|
||||||
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
|
@if $i != $index {
|
||||||
}
|
$result: append($result, nth($list, $i));
|
||||||
@else if $index == 0 {
|
}
|
||||||
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
|
}
|
||||||
}
|
}
|
||||||
@else if abs($index) > length($list) {
|
|
||||||
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
|
|
||||||
}
|
|
||||||
@else {
|
|
||||||
|
|
||||||
$result: ();
|
@return $result;
|
||||||
$index: if($index < 0, length($list) + $index + 1, $index);
|
}
|
||||||
|
|
||||||
@for $i from 1 through length($list) {
|
/// Replaces a substring within another string.
|
||||||
|
/// @author Hugo Giraudel
|
||||||
|
/// @param {string} $string String.
|
||||||
|
/// @param {string} $search Substring.
|
||||||
|
/// @param {string} $replace Replacement.
|
||||||
|
/// @return {string} Updated string.
|
||||||
|
@function str-replace($string, $search, $replace: "") {
|
||||||
|
$index: str-index($string, $search);
|
||||||
|
|
||||||
@if $i != $index {
|
@if $index {
|
||||||
$result: append($result, nth($list, $i));
|
@return str-slice($string, 1, $index - 1) + $replace +
|
||||||
}
|
str-replace(
|
||||||
|
str-slice($string, $index + str-length($search)),
|
||||||
|
$search,
|
||||||
|
$replace
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
@return $string;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
/// Replaces a substring within each string in a list.
|
||||||
|
/// @param {list} $strings List of strings.
|
||||||
|
/// @param {string} $search Substring.
|
||||||
|
/// @param {string} $replace Replacement.
|
||||||
|
/// @return {list} Updated list of strings.
|
||||||
|
@function str-replace-all($strings, $search, $replace: "") {
|
||||||
|
@each $string in $strings {
|
||||||
|
$strings: set-nth(
|
||||||
|
$strings,
|
||||||
|
index($strings, $string),
|
||||||
|
str-replace($string, $search, $replace)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@return $result;
|
@return $strings;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// Replaces a substring within another string.
|
|
||||||
/// @author Hugo Giraudel
|
|
||||||
/// @param {string} $string String.
|
|
||||||
/// @param {string} $search Substring.
|
|
||||||
/// @param {string} $replace Replacement.
|
|
||||||
/// @return {string} Updated string.
|
|
||||||
@function str-replace($string, $search, $replace: '') {
|
|
||||||
|
|
||||||
$index: str-index($string, $search);
|
|
||||||
|
|
||||||
@if $index {
|
|
||||||
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
|
||||||
}
|
|
||||||
|
|
||||||
@return $string;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Replaces a substring within each string in a list.
|
|
||||||
/// @param {list} $strings List of strings.
|
|
||||||
/// @param {string} $search Substring.
|
|
||||||
/// @param {string} $replace Replacement.
|
|
||||||
/// @return {list} Updated list of strings.
|
|
||||||
@function str-replace-all($strings, $search, $replace: '') {
|
|
||||||
|
|
||||||
@each $string in $strings {
|
|
||||||
$strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));
|
|
||||||
}
|
|
||||||
|
|
||||||
@return $strings;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mixins.
|
// Mixins.
|
||||||
|
|
||||||
/// Wraps @content in vendorized keyframe blocks.
|
/// Wraps @content in vendorized keyframe blocks.
|
||||||
/// @param {string} $name Name.
|
/// @param {string} $name Name.
|
||||||
@mixin keyframes($name) {
|
@mixin keyframes($name) {
|
||||||
|
@-moz-keyframes #{$name} {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
@-webkit-keyframes #{$name} {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
@-ms-keyframes #{$name} {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
@keyframes #{$name} {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@-moz-keyframes #{$name} { @content; }
|
/// Vendorizes a declaration's property and/or value(s).
|
||||||
@-webkit-keyframes #{$name} { @content; }
|
/// @param {string} $property Property.
|
||||||
@-ms-keyframes #{$name} { @content; }
|
/// @param {mixed} $value String/list of value(s).
|
||||||
@keyframes #{$name} { @content; }
|
@mixin vendor($property, $value) {
|
||||||
|
// Determine if property should expand.
|
||||||
|
$expandProperty: index($vendor-properties, $property);
|
||||||
|
|
||||||
}
|
// Determine if value should expand (and if so, add '-prefix-' placeholder).
|
||||||
|
$expandValue: false;
|
||||||
|
|
||||||
/// Vendorizes a declaration's property and/or value(s).
|
@each $x in $value {
|
||||||
/// @param {string} $property Property.
|
@each $y in $vendor-values {
|
||||||
/// @param {mixed} $value String/list of value(s).
|
@if $y == str-slice($x, 1, str-length($y)) {
|
||||||
@mixin vendor($property, $value) {
|
$value: set-nth($value, index($value, $x), "-prefix-" + $x);
|
||||||
|
$expandValue: true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Determine if property should expand.
|
// Expand property?
|
||||||
$expandProperty: index($vendor-properties, $property);
|
@if $expandProperty {
|
||||||
|
@each $vendor in $vendor-prefixes {
|
||||||
|
#{$vendor}#{$property}: #{str-replace-all($value, "-prefix-", $vendor)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Determine if value should expand (and if so, add '-prefix-' placeholder).
|
// Expand just the value?
|
||||||
$expandValue: false;
|
@elseif $expandValue {
|
||||||
|
@each $vendor in $vendor-prefixes {
|
||||||
|
#{$property}: #{str-replace-all($value, "-prefix-", $vendor)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@each $x in $value {
|
// Neither? Treat them as a normal declaration.
|
||||||
@each $y in $vendor-values {
|
@else {
|
||||||
@if $y == str-slice($x, 1, str-length($y)) {
|
#{$property}: #{$value};
|
||||||
|
}
|
||||||
$value: set-nth($value, index($value, $x), '-prefix-' + $x);
|
}
|
||||||
$expandValue: true;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Expand property?
|
|
||||||
@if $expandProperty {
|
|
||||||
@each $vendor in $vendor-prefixes {
|
|
||||||
#{$vendor}#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Expand just the value?
|
|
||||||
@elseif $expandValue {
|
|
||||||
@each $vendor in $vendor-prefixes {
|
|
||||||
#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Neither? Treat them as a normal declaration.
|
|
||||||
@else {
|
|
||||||
#{$property}: #{$value};
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
-->
|
-->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>MS Office - Electron</title>
|
<title>MS-Office-Electron</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta
|
<meta
|
||||||
name="viewport"
|
name="viewport"
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
><img src="images/logo.png" alt=""
|
><img src="images/logo.png" alt=""
|
||||||
/></a>
|
/></a>
|
||||||
<h1>
|
<h1>
|
||||||
<strong>MS Office - Electron</strong><br />
|
<strong>MS-Office-Electron</strong><br />
|
||||||
Free Office Online Desktop Client
|
Free Office Online Desktop Client
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@@ -34,37 +34,47 @@
|
|||||||
<section id="one">
|
<section id="one">
|
||||||
<header class="major">
|
<header class="major">
|
||||||
<h2>
|
<h2>
|
||||||
An Unofficial Microsoft Office Online Desktop Client made with Electron. Free of Cost.
|
An Unofficial Microsoft Office Online Desktop Client made with
|
||||||
|
Electron. Free of Cost.
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<p>
|
<p>
|
||||||
<img
|
<img
|
||||||
src="images/Mac_Screenshot.png"
|
src="images/Mac_Screenshot.png"
|
||||||
alt=""
|
alt=""
|
||||||
width="500"
|
width="500"
|
||||||
height="auto"
|
height="auto"
|
||||||
class="floatright"
|
class="floatright"
|
||||||
/>
|
/>
|
||||||
MS Office - Electron is an app in which the Web Version of
|
MS-Office-Electron is an app in which the Web Version of MS Office
|
||||||
MS Office is wrapped into a Cross-Platform App with Electron.
|
is wrapped into a Cross-Platform App with Electron. And all the
|
||||||
And all the Services of Microsoft Office will work for free. It is available for Windows, Mac OS, and Linux!
|
Services of Microsoft Office will work for free. It is available for
|
||||||
If you like the project, do not forget to give a "<i
|
Windows, Mac OS, and Linux! If you like the project, do not forget to
|
||||||
class="far fa-star"
|
give a "<i class="far fa-star"></i>
|
||||||
></i>
|
|
||||||
Star" to the project :D
|
Star" to the project :D
|
||||||
</p>
|
</p>
|
||||||
<h2>Download Now:</h2>
|
<h2>Download Now:</h2>
|
||||||
<ul class="actions">
|
<ul class="actions">
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/agam778/MS-Office-Electron#-windows-installation" class="button"
|
<a
|
||||||
|
href="https://github.com/agam778/MS-Office-Electron#-windows-installation"
|
||||||
|
class="button"
|
||||||
><i class="fab fa-windows"></i> Windows</a
|
><i class="fab fa-windows"></i> Windows</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/agam778/MS-Office-Electron#-macos-installation" class="button"><i class="fab fa-apple"></i> Mac OS</a>
|
<a
|
||||||
|
href="https://github.com/agam778/MS-Office-Electron#-macos-installation"
|
||||||
|
class="button"
|
||||||
|
><i class="fab fa-apple"></i> Mac OS</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/agam778/MS-Office-Electron#-linux-installation" class="button"><i class="fab fa-linux"></i> Linux</a>
|
<a
|
||||||
|
href="https://github.com/agam778/MS-Office-Electron#-linux-installation"
|
||||||
|
class="button"
|
||||||
|
><i class="fab fa-linux"></i> Linux</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
@@ -75,7 +85,9 @@
|
|||||||
<div class="inner">
|
<div class="inner">
|
||||||
<ul class="icons">
|
<ul class="icons">
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/agam778/MS-Office-Electron" class="icon brands fa-github"
|
<a
|
||||||
|
href="https://github.com/agam778/MS-Office-Electron"
|
||||||
|
class="icon brands fa-github"
|
||||||
><span class="label">Github</span></a
|
><span class="label">Github</span></a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -1,19 +1,22 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" >
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<title>Loading MS Office - Electron</title>
|
<title>Loading MS-Office-Electron</title>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
|
<link
|
||||||
<link rel="stylesheet" href="./style.css">
|
rel="stylesheet"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"
|
||||||
|
/>
|
||||||
|
<link rel="stylesheet" href="./style.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="loader"></div>
|
||||||
|
<div class="shadow"></div>
|
||||||
|
|
||||||
</head>
|
<div class="logo">
|
||||||
<body>
|
<a href="https://github.com/agam778/MS-Office-Electron" target="_blank"
|
||||||
<div class="loader"></div>
|
><img src="./MSlogo.svg" alt="MS-Office-Electron"
|
||||||
<div class="shadow"></div>
|
/></a>
|
||||||
|
</div>
|
||||||
<div class="logo">
|
</body>
|
||||||
<a href="https://github.com/agam778/MS-Office-Electron" target="_blank"><img src="https://raw.githubusercontent.com/agam778/MS-Office-Electron/main/MSlogo.svg" alt="MS Office - Electron"></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,246 +1,248 @@
|
|||||||
@-webkit-keyframes mainAnimation {
|
@-webkit-keyframes mainAnimation {
|
||||||
0% {
|
0% {
|
||||||
width: 50px;
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
width: 50px;
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
width: 150px;
|
|
||||||
transform: translateX(-50px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
60% {
|
|
||||||
width: 150px;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
transform: translateX(-150px) translateY(0px) rotate(90deg);
|
|
||||||
}
|
|
||||||
80% {
|
|
||||||
width: 50px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(90deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
width: 50px;
|
|
||||||
transform: translateX(-50px) translateY(0px) rotate(90deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes mainAnimation {
|
|
||||||
0% {
|
|
||||||
width: 50px;
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
width: 50px;
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
width: 150px;
|
|
||||||
transform: translateX(-50px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
60% {
|
|
||||||
width: 150px;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
transform: translateX(-150px) translateY(0px) rotate(90deg);
|
|
||||||
}
|
|
||||||
80% {
|
|
||||||
width: 50px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(90deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
width: 50px;
|
|
||||||
transform: translateX(-50px) translateY(0px) rotate(90deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-webkit-keyframes secundaryAnimation {
|
|
||||||
0% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(180deg);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(180deg);
|
|
||||||
}
|
|
||||||
60% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
80% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(180deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes secundaryAnimation {
|
|
||||||
0% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(180deg);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(180deg);
|
|
||||||
}
|
|
||||||
60% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
80% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(180deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-webkit-keyframes shadowAnimation {
|
|
||||||
0% {
|
|
||||||
width: 150px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
width: 75px;
|
|
||||||
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
width: 200px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
60% {
|
|
||||||
width: 75px;
|
|
||||||
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
80% {
|
|
||||||
width: 75px;
|
|
||||||
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
width: 150px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes shadowAnimation {
|
|
||||||
0% {
|
|
||||||
width: 150px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
width: 75px;
|
|
||||||
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
width: 200px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
60% {
|
|
||||||
width: 75px;
|
|
||||||
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
80% {
|
|
||||||
width: 75px;
|
|
||||||
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
width: 150px;
|
|
||||||
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-webkit-keyframes float {
|
|
||||||
0% {
|
|
||||||
top: 50%;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
top: 51%;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
top: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes float {
|
|
||||||
0% {
|
|
||||||
top: 50%;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
top: 51%;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
top: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
position: relative;
|
|
||||||
background: #5684f0;
|
|
||||||
background: linear-gradient(135deg, #5684f0 0%, #fa7587 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
position: absolute;
|
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
margin-top: -25px;
|
|
||||||
margin-left: -25px;
|
|
||||||
background-color: #FFF5A5;
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
-webkit-animation: mainAnimation 2.6s ease 0s infinite forwards;
|
|
||||||
animation: mainAnimation 2.6s ease 0s infinite forwards;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
}
|
||||||
.loader:after {
|
20% {
|
||||||
content: "";
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
|
||||||
top: 0;
|
|
||||||
left: -50px;
|
|
||||||
background-color: #FFF5A5;
|
|
||||||
transform-origin: top right;
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
-webkit-animation: secundaryAnimation 2.6s ease 0s infinite forwards;
|
|
||||||
animation: secundaryAnimation 2.6s ease 0s infinite forwards;
|
|
||||||
}
|
}
|
||||||
|
40% {
|
||||||
.shadow {
|
width: 150px;
|
||||||
position: absolute;
|
transform: translateX(-50px) translateY(0px) rotate(0deg);
|
||||||
width: 100px;
|
}
|
||||||
height: 10px;
|
60% {
|
||||||
|
width: 150px;
|
||||||
|
transform-origin: bottom right;
|
||||||
|
transform: translateX(-150px) translateY(0px) rotate(90deg);
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
width: 50px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(90deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
width: 50px;
|
||||||
|
transform: translateX(-50px) translateY(0px) rotate(90deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes mainAnimation {
|
||||||
|
0% {
|
||||||
|
width: 50px;
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
width: 50px;
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
width: 150px;
|
||||||
|
transform: translateX(-50px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
width: 150px;
|
||||||
|
transform-origin: bottom right;
|
||||||
|
transform: translateX(-150px) translateY(0px) rotate(90deg);
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
width: 50px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(90deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
width: 50px;
|
||||||
|
transform: translateX(-50px) translateY(0px) rotate(90deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes secundaryAnimation {
|
||||||
|
0% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(180deg);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(180deg);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes secundaryAnimation {
|
||||||
|
0% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(180deg);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(180deg);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes shadowAnimation {
|
||||||
|
0% {
|
||||||
|
width: 150px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
width: 75px;
|
||||||
|
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
width: 200px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
width: 75px;
|
||||||
|
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
width: 75px;
|
||||||
|
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
width: 150px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes shadowAnimation {
|
||||||
|
0% {
|
||||||
|
width: 150px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
width: 75px;
|
||||||
|
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
width: 200px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
width: 75px;
|
||||||
|
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
width: 75px;
|
||||||
|
transform: translateX(37.5px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
width: 150px;
|
||||||
|
transform: translateX(-25px) translateY(0px) rotate(0deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes float {
|
||||||
|
0% {
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
|
||||||
margin-top: 50px;
|
|
||||||
margin-left: -75px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: #95a5a6;
|
|
||||||
transform: translateX(0px) translateY(0px) rotate(0deg);
|
|
||||||
-webkit-animation: shadowAnimation 2.6s ease 0s infinite forwards, float 5s ease-in-out 0s infinite forwards;
|
|
||||||
animation: shadowAnimation 2.6s ease 0s infinite forwards, float 5s ease-in-out 0s infinite forwards;
|
|
||||||
filter: blur(5px);
|
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
|
50% {
|
||||||
.logo {
|
top: 51%;
|
||||||
position: absolute;
|
|
||||||
bottom: 20px;
|
|
||||||
left: 50%;
|
|
||||||
width: 42px;
|
|
||||||
height: 42px;
|
|
||||||
padding: 12px 5px;
|
|
||||||
margin-left: -21px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: white;
|
|
||||||
border-radius: 50%;
|
|
||||||
transition: transform 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
||||||
}
|
}
|
||||||
.logo:hover {
|
100% {
|
||||||
transform: scale(1.4);
|
top: 50%;
|
||||||
}
|
}
|
||||||
.logo img {
|
}
|
||||||
width: 100%;
|
@keyframes float {
|
||||||
height: auto;
|
0% {
|
||||||
margin: 0 auto;
|
top: 50%;
|
||||||
}
|
}
|
||||||
|
50% {
|
||||||
|
top: 51%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
position: relative;
|
||||||
|
background: #5684f0;
|
||||||
|
background: linear-gradient(135deg, #5684f0 0%, #fa7587 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader {
|
||||||
|
position: absolute;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: -25px;
|
||||||
|
margin-left: -25px;
|
||||||
|
background-color: #fff5a5;
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
-webkit-animation: mainAnimation 2.6s ease 0s infinite forwards;
|
||||||
|
animation: mainAnimation 2.6s ease 0s infinite forwards;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.loader:after {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
top: 0;
|
||||||
|
left: -50px;
|
||||||
|
background-color: #fff5a5;
|
||||||
|
transform-origin: top right;
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
-webkit-animation: secundaryAnimation 2.6s ease 0s infinite forwards;
|
||||||
|
animation: secundaryAnimation 2.6s ease 0s infinite forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shadow {
|
||||||
|
position: absolute;
|
||||||
|
width: 100px;
|
||||||
|
height: 10px;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-left: -75px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #95a5a6;
|
||||||
|
transform: translateX(0px) translateY(0px) rotate(0deg);
|
||||||
|
-webkit-animation: shadowAnimation 2.6s ease 0s infinite forwards,
|
||||||
|
float 5s ease-in-out 0s infinite forwards;
|
||||||
|
animation: shadowAnimation 2.6s ease 0s infinite forwards,
|
||||||
|
float 5s ease-in-out 0s infinite forwards;
|
||||||
|
filter: blur(5px);
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
left: 50%;
|
||||||
|
width: 42px;
|
||||||
|
height: 42px;
|
||||||
|
padding: 12px 5px;
|
||||||
|
margin-left: -21px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: transform 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||||
|
}
|
||||||
|
.logo:hover {
|
||||||
|
transform: scale(1.4);
|
||||||
|
}
|
||||||
|
.logo img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|||||||
890
main.js
@@ -1,289 +1,601 @@
|
|||||||
const { app, Menu, BrowserWindow, dialog, shell } = require("electron");
|
const { app, Menu, BrowserWindow, dialog, shell } = require("electron");
|
||||||
const { autoUpdater } = require("electron-updater");
|
const { autoUpdater } = require("electron-updater");
|
||||||
const isMac = process.platform === "darwin";
|
const isMac = process.platform === "darwin";
|
||||||
const openAboutWindow = require("about-window").default;
|
const openAboutWindow = require("about-window").default;
|
||||||
const isOnline = require("is-online");
|
const isOnline = require("is-online");
|
||||||
const axios = require("axios");
|
const axios = require("axios");
|
||||||
const ElectronDl = require("electron-dl");
|
const ElectronDl = require("electron-dl");
|
||||||
const contextMenu = require("electron-context-menu");
|
const contextMenu = require("electron-context-menu");
|
||||||
|
const path = require("path");
|
||||||
const log = require("electron-log");
|
const Store = require("electron-store");
|
||||||
log.transports.file.level = "verbose";
|
const store = new Store();
|
||||||
console.log = log.log;
|
|
||||||
|
const RPC = require("discord-rpc");
|
||||||
ElectronDl({
|
const clientId = "942637872530460742";
|
||||||
dlPath: "./downloads",
|
const rpc = new RPC.Client({ transport: "ipc" });
|
||||||
onStarted: (item) => {
|
|
||||||
dialog.showMessageBox({
|
const windowsuseragent =
|
||||||
type: "info",
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36";
|
||||||
title: "Downloading File",
|
const macuseragent =
|
||||||
message: `Downloading "${item.getFilename()}" to "${item.getSavePath()}"`,
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 12_3_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36";
|
||||||
buttons: ["OK"],
|
const linuxuseragent =
|
||||||
});
|
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36";
|
||||||
},
|
|
||||||
onCompleted: () => {
|
const log = require("electron-log");
|
||||||
dialog.showMessageBox({
|
log.transports.file.level = "verbose";
|
||||||
type: "info",
|
console.log = log.log;
|
||||||
title: "Download Completed",
|
Object.assign(console, log.functions);
|
||||||
message: `Downloading Completed! Please check your "Downloads" folder.`,
|
require("electron-log");
|
||||||
buttons: ["OK"],
|
|
||||||
});
|
ElectronDl({
|
||||||
},
|
dlPath: "./downloads",
|
||||||
onError: (item) => {
|
onStarted: (item) => {
|
||||||
dialog.showMessageBox({
|
BrowserWindow.getAllWindows().forEach((window) => {
|
||||||
type: "error",
|
window.setOverlayIcon(
|
||||||
title: "Download failed",
|
__dirname + "/assets/icons/download.png",
|
||||||
message: `Downloading "${item.getFilename()}" failed :(`,
|
"Downloading"
|
||||||
buttons: ["OK"],
|
);
|
||||||
});
|
});
|
||||||
},
|
dialog.showMessageBox({
|
||||||
});
|
type: "info",
|
||||||
|
title: "Downloading File",
|
||||||
contextMenu({
|
message: `Downloading "${item.getFilename()}" to "${item.getSavePath()}"`,
|
||||||
showInspectElement: false,
|
buttons: ["OK"],
|
||||||
showServices: false,
|
});
|
||||||
});
|
},
|
||||||
|
onCompleted: () => {
|
||||||
const template = [
|
BrowserWindow.getAllWindows().forEach((window) => {
|
||||||
...(isMac
|
window.setOverlayIcon(
|
||||||
? [
|
__dirname + "/assets/icons/download-success.png",
|
||||||
{
|
"Download Successful"
|
||||||
label: app.name,
|
);
|
||||||
submenu: [
|
});
|
||||||
{ role: "about" },
|
dialog.showMessageBox({
|
||||||
{ type: "separator" },
|
type: "info",
|
||||||
{ role: "services" },
|
title: "Download Completed",
|
||||||
{ type: "separator" },
|
message: `Downloading Completed! Please check your "Downloads" folder.`,
|
||||||
{ role: "hide" },
|
buttons: ["OK"],
|
||||||
{ role: "hideothers" },
|
});
|
||||||
{ role: "unhide" },
|
setTimeout(() => {
|
||||||
{ type: "separator" },
|
BrowserWindow.getAllWindows().forEach((window) => {
|
||||||
{ role: "quit" },
|
window.setOverlayIcon(null, "");
|
||||||
],
|
});
|
||||||
},
|
}, 7000);
|
||||||
]
|
},
|
||||||
: []),
|
onError: (item) => {
|
||||||
{
|
dialog.showMessageBox({
|
||||||
label: "Application",
|
type: "error",
|
||||||
submenu: [
|
title: "Download failed",
|
||||||
{
|
message: `Downloading "${item.getFilename()}" failed :(`,
|
||||||
label: "About MS Office - Electron",
|
buttons: ["OK"],
|
||||||
click: () =>
|
});
|
||||||
openAboutWindow({
|
BrowserWindow.getAllWindows().forEach((window) => {
|
||||||
icon_path:
|
window.setOverlayIcon(
|
||||||
"https://github.com/agam778/MS-Office-Electron/blob/main/icon2.png?raw=true",
|
__dirname + "/download-fail.png",
|
||||||
product_name: "MS Office - Electron",
|
"Download Failed"
|
||||||
copyright: "Copyright (c) 2021 Agampreet Singh Bajaj",
|
);
|
||||||
package_json_dir: __dirname,
|
});
|
||||||
bug_report_url:
|
setTimeout(() => {
|
||||||
"https://github.com/agam778/Microsoft-Office-Electron/issues/",
|
BrowserWindow.getAllWindows().forEach((window) => {
|
||||||
bug_link_text: "Report an issue",
|
window.setOverlayIcon(null, "");
|
||||||
adjust_window_size: "2",
|
});
|
||||||
show_close_button: "Close",
|
}, 7000);
|
||||||
}),
|
},
|
||||||
},
|
});
|
||||||
{
|
|
||||||
label: "Check for Updates",
|
contextMenu({
|
||||||
click: async () => {
|
showInspectElement: false,
|
||||||
axios
|
showServices: false,
|
||||||
.get(
|
});
|
||||||
"https://api.github.com/repos/agam778/MS-Office-Electron/releases/latest"
|
|
||||||
)
|
const menulayout = [
|
||||||
.then((res) => {
|
...(isMac
|
||||||
let data = res.data;
|
? [
|
||||||
let currentVersion = "v" + app.getVersion();
|
{
|
||||||
let latestVersion = data.tag_name;
|
label: app.name,
|
||||||
if (currentVersion !== latestVersion) {
|
submenu: [
|
||||||
const updatedialog = dialog.showMessageBoxSync({
|
{ role: "about" },
|
||||||
type: "info",
|
{ type: "separator" },
|
||||||
title: "Update Available",
|
{ role: "services" },
|
||||||
message: `Your App's version: ${currentVersion}\nLatest version: ${latestVersion}\n\nPlease update to the latest version.`,
|
{ type: "separator" },
|
||||||
buttons: ["Download", "Close"],
|
{ role: "hide" },
|
||||||
});
|
{ role: "hideothers" },
|
||||||
if (updatedialog === 0) {
|
{ role: "unhide" },
|
||||||
shell.openExternal(
|
{ type: "separator" },
|
||||||
"https://github.com/agam778/MS-Office-Electron/releases/latest"
|
{ role: "quit" },
|
||||||
);
|
],
|
||||||
}
|
},
|
||||||
} else {
|
]
|
||||||
dialog.showMessageBoxSync({
|
: []),
|
||||||
type: "info",
|
{
|
||||||
title: "No Update Available",
|
label: "Application",
|
||||||
message: `Your App's version: ${currentVersion}\nLatest version: ${latestVersion}\n\nYou are already using the latest version.`,
|
submenu: [
|
||||||
buttons: ["OK"],
|
{
|
||||||
});
|
label: "About MS-Office-Electron",
|
||||||
}
|
click: () =>
|
||||||
});
|
openAboutWindow({
|
||||||
},
|
icon_path:
|
||||||
},
|
"https://raw.githubusercontent.com/agam778/MS-Office-Electron/main/assets/icon.png",
|
||||||
{
|
product_name: "MS-Office-Electron",
|
||||||
label: "Learn More",
|
copyright:
|
||||||
click: async () => {
|
"Copyright (c) 2022 Agampreet Singh\nOffice, the name, website, images/icons\nare the intellectual properties of Microsoft.",
|
||||||
const { shell } = require("electron");
|
package_json_dir: __dirname,
|
||||||
await shell.openExternal(
|
bug_report_url:
|
||||||
"https://github.com/agam778/MS-Office-Electron"
|
"https://github.com/agam778/Microsoft-Office-Electron/issues/",
|
||||||
);
|
bug_link_text: "Report an issue",
|
||||||
},
|
adjust_window_size: "2",
|
||||||
},
|
show_close_button: "Close",
|
||||||
{
|
}),
|
||||||
label: "Open Logs Folder",
|
},
|
||||||
click: async () => {
|
{
|
||||||
const { shell } = require("electron");
|
label: "Check for Updates",
|
||||||
if (process.platform === "win32") {
|
click: async () => {
|
||||||
await shell.openPath(
|
axios
|
||||||
"C:\\Users\\" +
|
.get(
|
||||||
process.env.USERNAME +
|
"https://api.github.com/repos/agam778/MS-Office-Electron/releases/latest"
|
||||||
"\\AppData\\Roaming\\ms-office-electron\\\\logs\\"
|
)
|
||||||
);
|
.then((res) => {
|
||||||
} else if (process.platform === "darwin") {
|
let data = res.data;
|
||||||
await shell.openPath(
|
let currentVersion = "v" + app.getVersion();
|
||||||
"/Users/" +
|
let latestVersion = data.tag_name;
|
||||||
process.env.USERNAME +
|
if (currentVersion !== latestVersion) {
|
||||||
"/Library/Logs/ms-office-electron/"
|
const updatedialog = dialog.showMessageBoxSync({
|
||||||
);
|
type: "info",
|
||||||
} else if (process.platform === "linux") {
|
title: "Update Available",
|
||||||
await shell.openPath(
|
message: `Your App's version: ${currentVersion}\nLatest version: ${latestVersion}\n\nPlease update to the latest version.`,
|
||||||
"/home/" +
|
buttons: ["Download", "Close"],
|
||||||
process.env.USERNAME +
|
});
|
||||||
"/.config/ms-office-electron/logs"
|
if (updatedialog === 0) {
|
||||||
);
|
shell.openExternal(
|
||||||
}
|
"https://github.com/agam778/MS-Office-Electron/releases/latest"
|
||||||
},
|
);
|
||||||
},
|
}
|
||||||
{ type: "separator" },
|
} else {
|
||||||
{
|
dialog.showMessageBoxSync({
|
||||||
role: "quit",
|
type: "info",
|
||||||
accelerator: process.platform === "darwin" ? "Ctrl+Q" : "Ctrl+Q",
|
title: "No Update Available",
|
||||||
},
|
message: `Your App's version: ${currentVersion}\nLatest version: ${latestVersion}\n\nYou are already using the latest version.`,
|
||||||
],
|
buttons: ["OK"],
|
||||||
},
|
});
|
||||||
{
|
}
|
||||||
label: "Edit",
|
});
|
||||||
submenu: [
|
},
|
||||||
{ role: "undo" },
|
},
|
||||||
{ role: "redo" },
|
{
|
||||||
{ type: "separator" },
|
label: "Learn More",
|
||||||
{ role: "cut" },
|
click: async () => {
|
||||||
{ role: "copy" },
|
const { shell } = require("electron");
|
||||||
{ role: "paste" },
|
await shell.openExternal(
|
||||||
...(isMac
|
"https://github.com/agam778/MS-Office-Electron"
|
||||||
? [
|
);
|
||||||
{ role: "pasteAndMatchStyle" },
|
},
|
||||||
{ role: "delete" },
|
},
|
||||||
{ role: "selectAll" },
|
{
|
||||||
{ type: "separator" },
|
label: "Open Logs Folder",
|
||||||
{
|
click: async () => {
|
||||||
label: "Speech",
|
const { shell } = require("electron");
|
||||||
submenu: [{ role: "startSpeaking" }, { role: "stopSpeaking" }],
|
if (process.platform === "win32") {
|
||||||
},
|
await shell.openPath(
|
||||||
]
|
"C:\\Users\\" +
|
||||||
: [{ role: "delete" }, { type: "separator" }, { role: "selectAll" }]),
|
process.env.USERNAME +
|
||||||
],
|
"\\AppData\\Roaming\\ms-office-electron\\logs\\"
|
||||||
},
|
);
|
||||||
{
|
} else if (process.platform === "darwin") {
|
||||||
label: "View",
|
await shell.openPath(
|
||||||
submenu: [
|
"/Users/" + process.env.USER + "/Library/Logs/ms-office-electron/"
|
||||||
{ role: "reload" },
|
);
|
||||||
{ role: "forceReload" },
|
} else if (process.platform === "linux") {
|
||||||
{ type: "separator" },
|
await shell.openPath(
|
||||||
{ role: "resetZoom" },
|
"/home/" + process.env.USER + "/.config/ms-office-electron/logs/"
|
||||||
{
|
);
|
||||||
role: "zoomIn",
|
}
|
||||||
accelerator: process.platform === "darwin" ? "Control+=" : "Control+=",
|
},
|
||||||
},
|
},
|
||||||
{ role: "zoomOut" },
|
{ type: "separator" },
|
||||||
{ type: "separator" },
|
{
|
||||||
{ role: "togglefullscreen" },
|
label: "Open Normal version of MS Office",
|
||||||
],
|
type: "radio",
|
||||||
},
|
click() {
|
||||||
{
|
store.set("enterprise-or-normal", "https://office.com/?auth=1");
|
||||||
label: "Window",
|
dialog.showMessageBoxSync({
|
||||||
submenu: [
|
type: "info",
|
||||||
{ role: "minimize" },
|
title: "Normal version of MS Office",
|
||||||
{ role: "zoom" },
|
message:
|
||||||
...(isMac
|
"The normal version of MS Office will be opened.\n\nPlease restart the app to apply the changes.",
|
||||||
? [
|
buttons: ["OK"],
|
||||||
{ type: "separator" },
|
});
|
||||||
{ role: "front" },
|
},
|
||||||
{ type: "separator" },
|
checked:
|
||||||
{ role: "window" },
|
store.get("enterprise-or-normal") === "https://office.com/?auth=1",
|
||||||
]
|
},
|
||||||
: [{ role: "close" }]),
|
{
|
||||||
],
|
label: "Open Enterprise version of MS Office",
|
||||||
},
|
type: "radio",
|
||||||
];
|
click() {
|
||||||
|
store.set("enterprise-or-normal", "https://office.com/?auth=2");
|
||||||
const menu = Menu.buildFromTemplate(template);
|
dialog.showMessageBoxSync({
|
||||||
Menu.setApplicationMenu(menu);
|
type: "info",
|
||||||
|
title: "Enterprise version of MS Office",
|
||||||
function createWindow() {
|
message:
|
||||||
const win = new BrowserWindow({
|
"The enterprise version of MS Office will be opened.\n\nPlease restart the app to apply the changes.",
|
||||||
width: 1181,
|
buttons: ["OK"],
|
||||||
height: 670,
|
});
|
||||||
icon: "./icon.png",
|
},
|
||||||
show: false,
|
checked:
|
||||||
webPreferences: {
|
store.get("enterprise-or-normal") === "https://office.com/?auth=2",
|
||||||
nodeIntegration: true,
|
},
|
||||||
devTools: false,
|
{ type: "separator" },
|
||||||
},
|
{
|
||||||
});
|
label: "Open Websites in New Windows (Recommended)",
|
||||||
|
type: "radio",
|
||||||
const splash = new BrowserWindow({
|
click: () => {
|
||||||
width: 810,
|
store.set("websites-in-new-window", "true");
|
||||||
height: 610,
|
dialog.showMessageBoxSync({
|
||||||
transparent: true,
|
type: "info",
|
||||||
frame: false,
|
title: "Websites in New Windows",
|
||||||
alwaysOnTop: true,
|
message:
|
||||||
icon: "./icon.png",
|
"Websites which are targeted to open in new tabs will now open in new windows.",
|
||||||
});
|
buttons: ["OK"],
|
||||||
|
});
|
||||||
splash.loadURL(`https://agam778.github.io/MS-Office-Electron/loading`);
|
},
|
||||||
win.loadURL("https://office.com/?auth=1", {
|
checked: store.get("websites-in-new-window")
|
||||||
userAgent:
|
? store.get("websites-in-new-window") === "true"
|
||||||
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
|
: true,
|
||||||
});
|
},
|
||||||
|
{
|
||||||
win.webContents.on("did-finish-load", () => {
|
label: "Open Websites in the Same Window",
|
||||||
splash.destroy();
|
type: "radio",
|
||||||
win.show();
|
click: () => {
|
||||||
});
|
store.set("websites-in-new-window", "false");
|
||||||
}
|
dialog.showMessageBoxSync({
|
||||||
|
type: "info",
|
||||||
app.on("ready", () => {
|
title: "Websites in New Windows",
|
||||||
createWindow();
|
message:
|
||||||
});
|
"Websites which are targeted to open in new tabs will now open in the same window.\n\nNote: This will be buggy in some cases if you are using Enterprise version of MS Office.",
|
||||||
|
buttons: ["OK"],
|
||||||
app.on("window-all-closed", () => {
|
});
|
||||||
if (process.platform !== "darwin") {
|
},
|
||||||
app.quit();
|
checked: store.get("websites-in-new-window")
|
||||||
}
|
? store.get("websites-in-new-window") === "false"
|
||||||
});
|
: false,
|
||||||
|
},
|
||||||
app.on("activate", () => {
|
{ type: "separator" },
|
||||||
if (BrowserWindow.getAllWindows().length === 0) {
|
{
|
||||||
createWindow();
|
label: "Enable Discord Rich Presence",
|
||||||
}
|
type: "radio",
|
||||||
});
|
click: () => {
|
||||||
|
store.set("discordrpcstatus", "true");
|
||||||
app.on("ready", function () {
|
dialog.showMessageBoxSync({
|
||||||
isOnline().then((online) => {
|
type: "info",
|
||||||
if (online) {
|
title: "Discord Rich Presence",
|
||||||
console.log("You are connected to the internet!");
|
message: "Discord Rich Presence is now enabled.",
|
||||||
} else {
|
buttons: ["OK"],
|
||||||
const options = {
|
});
|
||||||
type: "warning",
|
discordrpcupdate(
|
||||||
buttons: ["Ok"],
|
`On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"`
|
||||||
defaultId: 2,
|
);
|
||||||
title: "Warning",
|
},
|
||||||
message: "You appear to be offline!",
|
checked: store.get("discordrpcstatus")
|
||||||
detail:
|
? store.get("discordrpcstatus") === "true"
|
||||||
"Please check your Internet Connectivity. This app cannot run without an Internet Connection!",
|
: true,
|
||||||
};
|
},
|
||||||
|
{
|
||||||
dialog.showMessageBox(null, options, (response) => {
|
label: "Disable Discord Rich Presence",
|
||||||
console.log(response);
|
type: "radio",
|
||||||
});
|
click: () => {
|
||||||
}
|
store.set("discordrpcstatus", "false");
|
||||||
});
|
dialog.showMessageBoxSync({
|
||||||
autoUpdater.checkForUpdatesAndNotify();
|
type: "info",
|
||||||
});
|
title: "Discord Rich Presence",
|
||||||
|
message: "Discord Rich Presence is now disabled.",
|
||||||
|
buttons: ["OK"],
|
||||||
|
});
|
||||||
|
rpc.clearActivity();
|
||||||
|
},
|
||||||
|
checked: store.get("discordrpcstatus")
|
||||||
|
? store.get("discordrpcstatus") === "false"
|
||||||
|
: false,
|
||||||
|
},
|
||||||
|
{ type: "separator" },
|
||||||
|
{
|
||||||
|
label: "Windows Useragent",
|
||||||
|
type: "radio",
|
||||||
|
click: () => {
|
||||||
|
store.set("useragentstring", windowsuseragent);
|
||||||
|
dialog.showMessageBoxSync({
|
||||||
|
type: "info",
|
||||||
|
title: "User agent switcher",
|
||||||
|
message:
|
||||||
|
"You have switched to Windows Useragent.\n\nPlease restart the app to apply the changes.",
|
||||||
|
buttons: ["OK"],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checked:
|
||||||
|
store.get("useragentstring") === windowsuseragent ? true : false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Mac os Useragent",
|
||||||
|
type: "radio",
|
||||||
|
click: () => {
|
||||||
|
store.set("useragentstring", macuseragent);
|
||||||
|
dialog.showMessageBoxSync({
|
||||||
|
type: "info",
|
||||||
|
title: "User agent switcher",
|
||||||
|
message:
|
||||||
|
"You have switched to Mac OS Useragent.\n\nPlease restart the app to apply the changes.",
|
||||||
|
buttons: ["OK"],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checked: store.get("useragentstring") === macuseragent ? true : false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Linux Useragent",
|
||||||
|
type: "radio",
|
||||||
|
click: () => {
|
||||||
|
store.set("useragentstring", linuxuseragent);
|
||||||
|
dialog.showMessageBoxSync({
|
||||||
|
type: "info",
|
||||||
|
title: "User agent switcher",
|
||||||
|
message:
|
||||||
|
"You have switched to Linux Useragent.\n\nPlease restart the app to apply the changes.",
|
||||||
|
buttons: ["OK"],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checked: store.get("useragentstring") === linuxuseragent ? true : false,
|
||||||
|
},
|
||||||
|
{ type: "separator" },
|
||||||
|
{
|
||||||
|
role: "quit",
|
||||||
|
accelerator: process.platform === "darwin" ? "Ctrl+Q" : "Ctrl+Q",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Navigation",
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
label: "Back",
|
||||||
|
click: () => {
|
||||||
|
BrowserWindow.getFocusedWindow().webContents.goBack();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Forward",
|
||||||
|
click: () => {
|
||||||
|
BrowserWindow.getFocusedWindow().webContents.goForward();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Reload",
|
||||||
|
click: () => {
|
||||||
|
BrowserWindow.getFocusedWindow().webContents.reload();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Home",
|
||||||
|
click: () => {
|
||||||
|
BrowserWindow.getFocusedWindow().loadURL(
|
||||||
|
`${store.get("enterprise-or-normal")}`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Edit",
|
||||||
|
submenu: [
|
||||||
|
{ role: "undo" },
|
||||||
|
{ role: "redo" },
|
||||||
|
{ type: "separator" },
|
||||||
|
{ role: "cut" },
|
||||||
|
{ role: "copy" },
|
||||||
|
{ role: "paste" },
|
||||||
|
...(isMac
|
||||||
|
? [
|
||||||
|
{ role: "pasteAndMatchStyle" },
|
||||||
|
{ role: "delete" },
|
||||||
|
{ role: "selectAll" },
|
||||||
|
{ type: "separator" },
|
||||||
|
{
|
||||||
|
label: "Speech",
|
||||||
|
submenu: [{ role: "startSpeaking" }, { role: "stopSpeaking" }],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: [{ role: "delete" }, { type: "separator" }, { role: "selectAll" }]),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "View",
|
||||||
|
submenu: [
|
||||||
|
{ role: "reload" },
|
||||||
|
{ role: "forceReload" },
|
||||||
|
{ type: "separator" },
|
||||||
|
{ role: "resetZoom" },
|
||||||
|
{
|
||||||
|
role: "zoomIn",
|
||||||
|
accelerator: process.platform === "darwin" ? "Control+=" : "Control+=",
|
||||||
|
},
|
||||||
|
{ role: "zoomOut" },
|
||||||
|
{ type: "separator" },
|
||||||
|
{ role: "togglefullscreen" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Window",
|
||||||
|
submenu: [
|
||||||
|
{ role: "minimize" },
|
||||||
|
{ role: "zoom" },
|
||||||
|
...(isMac
|
||||||
|
? [
|
||||||
|
{ type: "separator" },
|
||||||
|
{ role: "front" },
|
||||||
|
{ type: "separator" },
|
||||||
|
{ role: "window" },
|
||||||
|
]
|
||||||
|
: [{ role: "close" }]),
|
||||||
|
{
|
||||||
|
label: "Show Menu Bar",
|
||||||
|
type: "radio",
|
||||||
|
click: () => {
|
||||||
|
store.set("autohide-menubar", "false");
|
||||||
|
dialog.showMessageBoxSync({
|
||||||
|
type: "info",
|
||||||
|
title: "Menu Bar Settings",
|
||||||
|
message:
|
||||||
|
"Menu will be visible now. Please restart the app for changes to take effect.",
|
||||||
|
buttons: ["OK"],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checked: store.get("autohide-menubar") === "false",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Hide Menu Bar (Press ALT To show for some time)",
|
||||||
|
type: "radio",
|
||||||
|
click: () => {
|
||||||
|
store.set("autohide-menubar", "true");
|
||||||
|
dialog.showMessageBoxSync({
|
||||||
|
type: "info",
|
||||||
|
title: "Menu Bar Settings",
|
||||||
|
message:
|
||||||
|
"Menu bar will be automatically hidden now. Please restart the app for changes to take effect.",
|
||||||
|
buttons: ["OK"],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checked: store.get("autohide-menubar") === "true",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const menu = Menu.buildFromTemplate(menulayout);
|
||||||
|
Menu.setApplicationMenu(menu);
|
||||||
|
|
||||||
|
function discordrpc(title) {
|
||||||
|
if (store.get("discordrpcstatus") === "true") {
|
||||||
|
rpc
|
||||||
|
.setActivity({
|
||||||
|
details: `${title}`,
|
||||||
|
largeImageKey: "logo",
|
||||||
|
largeImageText: "MS-Office-Electron",
|
||||||
|
startTimestamp: Date.now(),
|
||||||
|
instance: false,
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function discordrpcupdate(title) {
|
||||||
|
rpc.clearActivity();
|
||||||
|
rpc
|
||||||
|
.setActivity({
|
||||||
|
details: `${title}`,
|
||||||
|
largeImageKey: "logo",
|
||||||
|
largeImageText: "MS-Office-Electron",
|
||||||
|
startTimestamp: Date.now(),
|
||||||
|
instance: false,
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function createWindow() {
|
||||||
|
const win = new BrowserWindow({
|
||||||
|
width: 1181,
|
||||||
|
height: 670,
|
||||||
|
icon: path.join(__dirname, "/assets/generated/icons/png/1024x1024.png"),
|
||||||
|
show: false,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
devTools: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (store.get("autohide-menubar") === "true") {
|
||||||
|
win.setAutoHideMenuBar(true);
|
||||||
|
} else {
|
||||||
|
win.setAutoHideMenuBar(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
const splash = new BrowserWindow({
|
||||||
|
width: 810,
|
||||||
|
height: 610,
|
||||||
|
transparent: true,
|
||||||
|
frame: false,
|
||||||
|
alwaysOnTop: true,
|
||||||
|
icon: path.join(__dirname, "/assets/generated/icons/png/1024x1024.png"),
|
||||||
|
});
|
||||||
|
|
||||||
|
splash.loadURL(`https://agam778.github.io/MS-Office-Electron/loading`);
|
||||||
|
win.loadURL(
|
||||||
|
`${store.get("enterprise-or-normal") || "https://office.com/?auth=1"}`,
|
||||||
|
{
|
||||||
|
userAgent: store.get("useragentstring") || windowsuseragent,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
win.webContents.on("did-finish-load", () => {
|
||||||
|
splash.destroy();
|
||||||
|
win.show();
|
||||||
|
discordrpc(`On "${win.webContents.getTitle()}"`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
app.on("ready", () => {
|
||||||
|
createWindow();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("web-contents-created", (event, contents) => {
|
||||||
|
contents.on("new-window", (event, url) => {
|
||||||
|
if (store.get("websites-in-new-window") === "false") {
|
||||||
|
event.preventDefault();
|
||||||
|
BrowserWindow.getFocusedWindow().loadURL(url);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("window-all-closed", () => {
|
||||||
|
rpc.clearActivity();
|
||||||
|
if (process.platform !== "darwin") {
|
||||||
|
app.quit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("activate", () => {
|
||||||
|
if (BrowserWindow.getAllWindows().length === 0) {
|
||||||
|
createWindow();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("ready", function () {
|
||||||
|
isOnline().then((online) => {
|
||||||
|
if (online) {
|
||||||
|
console.log("You are connected to the internet!");
|
||||||
|
} else {
|
||||||
|
const options = {
|
||||||
|
type: "warning",
|
||||||
|
buttons: ["Ok"],
|
||||||
|
defaultId: 2,
|
||||||
|
title: "Warning",
|
||||||
|
message: "You appear to be offline!",
|
||||||
|
detail:
|
||||||
|
"Please check your Internet Connectivity. This app cannot run without an Internet Connection!",
|
||||||
|
};
|
||||||
|
|
||||||
|
dialog.showMessageBox(null, options, (response) => {
|
||||||
|
console.log(response);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
autoUpdater.checkForUpdatesAndNotify();
|
||||||
|
rpc
|
||||||
|
.login({ clientId })
|
||||||
|
.catch((err) =>
|
||||||
|
console.error(
|
||||||
|
"Oops! An Error occured while connecting to Discord RPC. Probably discord isn't installed or opened?"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|||||||
169
package.json
@@ -1,88 +1,81 @@
|
|||||||
{
|
{
|
||||||
"name": "ms-office-electron",
|
"name": "ms-office-electron",
|
||||||
"version": "0.4.5",
|
"version": "0.7.2",
|
||||||
"description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.",
|
"description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/agam778/MS-Office-Electron.git"
|
"url": "https://github.com/agam778/MS-Office-Electron.git"
|
||||||
},
|
},
|
||||||
"build": {
|
"author": {
|
||||||
"extraFiles": [
|
"name": "Agampreet Singh",
|
||||||
"icon.png",
|
"email": "agam778@zohomail.in",
|
||||||
"license.txt",
|
"url": "https://agamsblog.xyz/"
|
||||||
"icon2.png"
|
},
|
||||||
],
|
"build": {
|
||||||
"appId": "com.agampreet.ms-office-electron",
|
"extraFiles": [
|
||||||
"productName": "MS-Office-Electron",
|
"/assets",
|
||||||
"artifactName": "MS-Office-Electron-Setup-v${version}-${os}-${arch}.${ext}",
|
"LICENSE"
|
||||||
"linux": {
|
],
|
||||||
"category": "Office",
|
"appId": "com.agampreet.ms-office-electron",
|
||||||
"desktop": {
|
"productName": "MS-Office-Electron",
|
||||||
"Comment": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.",
|
"artifactName": "MS-Office-Electron-Setup-v${version}-${os}-${arch}.${ext}",
|
||||||
"Name": "MS-Office-Electron",
|
"mac": {
|
||||||
"StartupNotify": "true",
|
"identity": "null",
|
||||||
"Terminal": "false",
|
"category": "public.app-category.office",
|
||||||
"Type": "Application",
|
"target": [
|
||||||
"Categories": "Office;"
|
"dmg"
|
||||||
},
|
],
|
||||||
"icon": "icon.png",
|
"icon": "./assets/generated/icons/mac/icon.icns"
|
||||||
"executableName": "MS-Office-Electron",
|
},
|
||||||
"maintainer": "Agampreet Singh <agam778@zohomail.in>",
|
"win": {
|
||||||
"target": [
|
"target": [
|
||||||
"deb",
|
"nsis"
|
||||||
"rpm",
|
],
|
||||||
"AppImage"
|
"icon": "./assets/generated/icons/win/icon.ico"
|
||||||
]
|
},
|
||||||
},
|
"nsis": {
|
||||||
"deb": {
|
"oneClick": false,
|
||||||
"compression": "bzip2"
|
"perMachine": false,
|
||||||
},
|
"allowToChangeInstallationDirectory": false,
|
||||||
"mac": {
|
"license": "LICENSE"
|
||||||
"category": "public.app-category.office",
|
},
|
||||||
"target": [
|
"linux": {
|
||||||
"dmg"
|
"category": "Office",
|
||||||
],
|
"icon": "./assets/generated/icons/png",
|
||||||
"icon": "icon.icns"
|
"executableName": "ms-office-electron",
|
||||||
},
|
"maintainer": "Agampreet Singh <agam778@zohomail.in>",
|
||||||
"nsis": {
|
"target": [
|
||||||
"oneClick": false,
|
"snap",
|
||||||
"perMachine": false,
|
"deb",
|
||||||
"allowToChangeInstallationDirectory": false,
|
"rpm",
|
||||||
"license": "license.txt"
|
"AppImage",
|
||||||
},
|
"tar.gz"
|
||||||
"win": {
|
]
|
||||||
"target": [
|
},
|
||||||
"nsis"
|
"directories": {
|
||||||
],
|
"output": "release"
|
||||||
"icon": "icon.ico"
|
}
|
||||||
},
|
},
|
||||||
"directories": {
|
"scripts": {
|
||||||
"output": "release"
|
"start": "electron .",
|
||||||
}
|
"pack": "electron-builder --dir",
|
||||||
},
|
"dist": "electron-builder"
|
||||||
"scripts": {
|
},
|
||||||
"start": "electron .",
|
"license": "MIT",
|
||||||
"pack": "electron-builder --dir",
|
"devDependencies": {
|
||||||
"dist": "electron-builder"
|
"electron": "^18.2.4",
|
||||||
},
|
"electron-builder": "^23.0.3"
|
||||||
"author": {
|
},
|
||||||
"name": "Agampreet Singh",
|
"dependencies": {
|
||||||
"email": "agam778@zohomail.in",
|
"about-window": "^1.15.2",
|
||||||
"url": "https://agam778.is-a.dev/"
|
"axios": "^0.27.2",
|
||||||
},
|
"discord-rpc": "^4.0.1",
|
||||||
"license": "MIT",
|
"electron-context-menu": "^3.1.1",
|
||||||
"devDependencies": {
|
"electron-dl": "^3.3.1",
|
||||||
"electron": "^17.0.0",
|
"electron-log": "^4.4.7",
|
||||||
"electron-builder": "^22.14.5"
|
"electron-store": "^8.0.1",
|
||||||
},
|
"electron-updater": "^5.0.1",
|
||||||
"dependencies": {
|
"is-online": "^9.0.1"
|
||||||
"about-window": "^1.15.2",
|
}
|
||||||
"axios": "^0.25.0",
|
}
|
||||||
"electron-context-menu": "^3.1.1",
|
|
||||||
"electron-dl": "^3.3.0",
|
|
||||||
"electron-log": "^4.4.5",
|
|
||||||
"electron-updater": "^4.6.1",
|
|
||||||
"is-online": "^9.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||