npm run serve
To run the compiler
cd /Users/jv/Desktop/MyDevelopment/github/website/internet-resources/resources
./sass-compiler
May want to clear the cache.
cd /Users/jv/Desktop/MyDevelopment/github/website/internet-resources/resources
rm -rf .sass-cache
-
Rename data/1.0.0.x to data/1.0.0.x+1
-
Edit index.html, change only
<script src="./resources/js/data/1.0.0.28/db.js"></script>
- Edit
db.js
Find section to contain the new resource.
Add, for example
{
"image": "",
"url": "https://www.mockaroo.com/",
"header": "Mockaroo",
"text": "Realistic Data Generator"
}
Add an image. If you cannot get an image, leave image empty and the default will be applied.
Usually by scanning the Network tab on page refresh a suitable image will be revealed.
For example
/assets/kangaroo-white-3a977872f8f57d25e13c772e9ae8756b0d1aa9a19fc49b1e4eb25ac8dc14c39a.svg
Get the image
wget "https://www.mockaroo.com/assets/kangaroo-white-3a977872f8f57d25e13c772e9ae8756b0d1aa9a19fc49b1e4eb25ac8dc14c39a.svg"
if get
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
use curl
curl "https://www.mockaroo.com/assets/kangaroo-white-3a977872f8f57d25e13c772e9ae8756b0d1aa9a19fc49b1e4eb25ac8dc14c39a.svg" > jv.svg
Copy the downloaded image to
/Users/jv/Desktop/MyDevelopment/github/website/internet-resources/resources/images/logos
Rename to the name of the site, for example mockaroo.svg
These can be a real pain. They will need to be scaled and positioned.
For example, see
/Users/jv/Desktop/MyDevelopment/github/website/internet-resources/resources/images/logos/mockaroo.svg
Notice
svg width="100%" height="100%" viewBox="0 0 400 400"
which states
- size will be determined by css or html tag.
- viewbox states the size of 'slate'
<g transform="translate(0, 100) scale(0.95)" >
- set origin
+100
in the y direction and scale to0.95
-
Based on: http://codingheroes.io/resources/
-
Use images/logos/codesandbox.svg as a guide.