]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/commitdiff
Add fontello icons.
authorjloup <jeanloup.jamet@gmail.com>
Mon, 7 May 2018 11:40:12 +0000 (13:40 +0200)
committerjloup <jeanloup.jamet@gmail.com>
Mon, 7 May 2018 15:41:18 +0000 (17:41 +0200)
cmd/web/.gitignore
cmd/web/Makefile
cmd/web/fontello_config.json [new file with mode: 0644]
cmd/web/static/fontello.css [new file with mode: 0644]
cmd/web/static/fonts/fontello.eot [new file with mode: 0644]
cmd/web/static/fonts/fontello.svg [new file with mode: 0644]
cmd/web/static/fonts/fontello.ttf [new file with mode: 0644]
cmd/web/static/fonts/fontello.woff [new file with mode: 0644]
cmd/web/static/fonts/fontello.woff2 [new file with mode: 0644]
cmd/web/static/index.html
cmd/web/static/style.css

index 7a7ecee9430e1ff9bbb4df937b6afd4a98f1ba00..f233aa58e77f0cebf230975dbf9cde6928ee9b40 100644 (file)
@@ -2,3 +2,5 @@ bower_components/
 node_modules/
 build/
 npm-debug.log
+.fontello
+static/fontello
\ No newline at end of file
index 85bba5bdfa3c48ed3625469c8e69bf4863c7ed3f..02ff826d6eca77c7d7261edc59b9fe6e8af4e64f 100644 (file)
@@ -6,15 +6,14 @@ SRC_DIR=js
 BUILD_DIR=build/js
 JSX_SRC= header_footer.jsx main.jsx signup.jsx signin.jsx otp.jsx poloniex.jsx password_reset.jsx change_password.jsx
 JS_SRC= cookies.js app.js api.js
-STATIC_FILES= index.html style.css
+STATIC_FILES= index.html style.css fontello.css
+STATIC_FILES+=$(addprefix fonts/, fontello.eot fontello.svg fontello.ttf fontello.woff fontello.woff2)
 JSX_OBJS=$(addprefix $(BUILD_DIR)/,$(JSX_SRC:.jsx=.js))
 JS_OBJS=$(addprefix $(BUILD_DIR)/,$(JS_SRC))
 ICONS=$(addprefix $(STATIC_BUILD_DIR)/icons/black/, $(notdir $(wildcard static/icons/black/*.svg)))
 ICONS+=$(addprefix $(STATIC_BUILD_DIR)/icons/color/, $(notdir $(wildcard static/icons/color/*.svg)))
 STATIC_BUILD_DIR=build/static
 
-$(info $(ICONS))
-
 install:
        node --version
        npm --version
@@ -33,6 +32,7 @@ $(STATIC_BUILD_DIR):
        mkdir -p $@
        mkdir -p $@/icons/black
        mkdir -p $@/icons/color
+       mkdir -p $@/fonts
 
 $(BUILD_DIR)/%.js: $(SRC_DIR)/%.jsx
        eslint --fix $<
@@ -59,3 +59,38 @@ release: $(STATIC_BUILD_DIR) build/webapp.tar.gz
 clean:
        rm -rf build
        rm -rf node_modules
+
+
+FONT_DIR = ./static/fontello
+FONTELLO_HOST ?= http://fontello.com
+
+fontopen:
+       @if test ! `which curl` ; then \
+               echo 'Install curl first.' >&2 ; \
+               exit 128 ; \
+               fi
+       curl --silent --show-error --fail --output .fontello \
+               --form "config=@fontello_config.json" \
+               ${FONTELLO_HOST}
+       x-www-browser ${FONTELLO_HOST}/`cat .fontello`
+
+
+fontsave:
+       @if test ! `which unzip` ; then \
+               echo 'Install unzip first.' >&2 ; \
+               exit 128 ; \
+               fi
+       @if test ! -e .fontello ; then \
+               echo 'Run `make fontopen` first.' >&2 ; \
+               exit 128 ; \
+               fi
+       rm -rf .fontello.src .fontello.zip
+       curl --silent --show-error --fail --output .fontello.zip \
+               ${FONTELLO_HOST}/`cat .fontello`/get
+       unzip .fontello.zip -d .fontello.src
+       rm -rf ${FONT_DIR}
+       mv `find ./.fontello.src -maxdepth 1 -name 'fontello-*'` ${FONT_DIR}
+       rm -rf .fontello.src .fontello.zip
+       cp ${FONT_DIR}/font/* static/fonts/
+       cp ${FONT_DIR}/css/fontello-codes.css static/fontello.css
+       rm -rf ${FONT_DIR}
\ No newline at end of file
diff --git a/cmd/web/fontello_config.json b/cmd/web/fontello_config.json
new file mode 100644 (file)
index 0000000..4ebb1f0
--- /dev/null
@@ -0,0 +1,34 @@
+{
+  "name": "",
+  "css_prefix_text": "icon-",
+  "css_use_suffix": false,
+  "hinting": true,
+  "units_per_em": 1000,
+  "ascent": 850,
+  "glyphs": [
+    {
+      "uid": "43ab845088317bd348dee1d975700c48",
+      "css": "ok-circled",
+      "code": 59392,
+      "src": "fontawesome"
+    },
+    {
+      "uid": "0f4cae16f34ae243a6144c18a003f2d8",
+      "css": "cancel-circled",
+      "code": 59393,
+      "src": "fontawesome"
+    },
+    {
+      "uid": "f2aa28a2548ed3d2be718d087b65ee21",
+      "css": "key",
+      "code": 59394,
+      "src": "fontawesome"
+    },
+    {
+      "uid": "8b80d36d4ef43889db10bc1f0dc9a862",
+      "css": "user",
+      "code": 59395,
+      "src": "fontawesome"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/cmd/web/static/fontello.css b/cmd/web/static/fontello.css
new file mode 100644 (file)
index 0000000..ba4e933
--- /dev/null
@@ -0,0 +1,6 @@
+
+.icon-ok-circled:before { content: '\e800'; } /* '' */
+.icon-cancel-circled:before { content: '\e801'; } /* '' */
+.icon-key:before { content: '\e802'; } /* '' */
+.icon-user:before { content: '\e803'; } /* '' */
+.icon-hourglass-2:before { content: '\f252'; } /* '' */
\ No newline at end of file
diff --git a/cmd/web/static/fonts/fontello.eot b/cmd/web/static/fonts/fontello.eot
new file mode 100644 (file)
index 0000000..14932cc
Binary files /dev/null and b/cmd/web/static/fonts/fontello.eot differ
diff --git a/cmd/web/static/fonts/fontello.svg b/cmd/web/static/fonts/fontello.svg
new file mode 100644 (file)
index 0000000..dce8334
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>Copyright (C) 2018 by original authors @ fontello.com</metadata>
+<defs>
+<font id="fontello" horiz-adv-x="1000" >
+<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
+<missing-glyph horiz-adv-x="1000" />
+<glyph glyph-name="ok-circled" unicode="&#xe800;" d="M717 440q0 16-10 26l-51 50q-11 11-25 11t-25-11l-228-227-126 126q-11 11-25 11t-25-11l-51-50q-10-10-10-26 0-15 10-25l202-202q10-10 25-10 15 0 26 10l303 303q10 10 10 25z m140-90q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
+
+<glyph glyph-name="cancel-circled" unicode="&#xe801;" d="M641 224q0 14-10 25l-101 101 101 101q10 11 10 25 0 15-10 26l-51 50q-10 11-25 11-15 0-25-11l-101-101-101 101q-11 11-25 11-16 0-26-11l-50-50q-11-11-11-26 0-14 11-25l101-101-101-101q-11-11-11-25 0-15 11-26l50-50q10-11 26-11 14 0 25 11l101 101 101-101q10-11 25-11 15 0 25 11l51 50q10 11 10 26z m216 126q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
+
+<glyph glyph-name="key" unicode="&#xe802;" d="M464 564q0 45-31 76t-76 31-76-31-31-76q0-23 11-46-23 11-47 11-44 0-76-32t-31-76 31-75 76-32 76 32 31 75q0 24-10 47 23-11 46-11 45 0 76 31t31 76z m475-393q0-9-27-36t-37-28q-5 0-16 9t-20 19-22 22-13 14l-54-53 123-123q15-16 15-38 0-23-21-45t-46-22q-22 0-37 16l-375 374q-98-73-204-73-91 0-148 57t-57 149q0 89 53 174t138 139 175 53q91 0 148-58t57-148q0-105-73-203l198-199 54 54q-2 2-14 14t-23 21-18 21-9 15q0 10 27 37t37 28q7 0 13-6 3-3 26-25t45-44 49-48 40-44 16-23z" horiz-adv-x="1000" />
+
+<glyph glyph-name="user" unicode="&#xe803;" d="M714 69q0-60-35-104t-84-44h-476q-49 0-84 44t-35 104q0 48 5 90t17 85 33 73 52 50 76 19q73-72 174-72t175 72q42 0 75-19t52-50 33-73 18-85 4-90z m-143 495q0-88-62-151t-152-63-151 63-63 151 63 152 151 63 152-63 62-152z" horiz-adv-x="714.3" />
+
+<glyph glyph-name="hourglass-2" unicode="&#xf252;" d="M786 779q0-146-60-258t-148-171q89-59 148-171t60-258h53q8 0 13-5t5-12v-36q0-8-5-13t-13-5h-821q-8 0-13 5t-5 13v36q0 7 5 12t13 5h53q0 146 60 258t149 171q-90 59-149 171t-60 258h-53q-8 0-13 5t-5 12v36q0 8 5 13t13 5h821q8 0 13-5t5-13v-36q0-7-5-12t-13-5h-53z m-72 0h-571q0-115 47-215h477q47 100 47 215z m-31-679q-31 79-82 135t-108 79h-129q-57-23-108-79t-81-135h508z" horiz-adv-x="857.1" />
+</font>
+</defs>
+</svg>
\ No newline at end of file
diff --git a/cmd/web/static/fonts/fontello.ttf b/cmd/web/static/fonts/fontello.ttf
new file mode 100644 (file)
index 0000000..ab1efb3
Binary files /dev/null and b/cmd/web/static/fonts/fontello.ttf differ
diff --git a/cmd/web/static/fonts/fontello.woff b/cmd/web/static/fonts/fontello.woff
new file mode 100644 (file)
index 0000000..6faf045
Binary files /dev/null and b/cmd/web/static/fonts/fontello.woff differ
diff --git a/cmd/web/static/fonts/fontello.woff2 b/cmd/web/static/fonts/fontello.woff2
new file mode 100644 (file)
index 0000000..8e41726
Binary files /dev/null and b/cmd/web/static/fonts/fontello.woff2 differ
index bf3bd19ed7ddb3d8d7da872595cf4c6c82e4f951..6e68a217ed43b7de669f36fabc4d809760ba53bb 100644 (file)
@@ -11,8 +11,8 @@
     <title>Cryptoportfolio</title>
     <link href='https://fonts.googleapis.com/css?family=Fira+Mono' rel='stylesheet' type='text/css'>
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
-    <link rel="stylesheet" type="text/css" href="/public/cryptocoins.css"/>
     <link rel="stylesheet" type="text/css" href="/public/style.css"/>
+    <link rel="stylesheet" type="text/css" href="/public/fontello.css"/>
     <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
     <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
     <!--[if lt IE 9]>
index 589c0b018c8215fc404c50bc6650b2a94a4bd3bd..5e49c55d8378385cbdc8716fd1332d6419e5ceff 100644 (file)
@@ -124,3 +124,50 @@ h1 {
   padding-top: 10px;
   padding-bottom: 10px;
 }
+
+@font-face {
+  font-family: 'fontello';
+  src: url('fonts/fontello.eot?12278570');
+  src: url('fonts/fontello.eot?12278570#iefix') format('embedded-opentype'),
+       url('fonts/fontello.woff2?12278570') format('woff2'),
+       url('fonts/fontello.woff?12278570') format('woff'),
+       url('fonts/fontello.ttf?12278570') format('truetype'),
+       url('fonts/fontello.svg?12278570#fontello') format('svg');
+  font-weight: normal;
+  font-style: normal;
+}
+
+ [class^="icon-"]:before, [class*=" icon-"]:before {
+  font-family: "fontello";
+  font-style: normal;
+  font-weight: normal;
+  speak: none;
+
+  display: inline-block;
+  text-decoration: inherit;
+  width: 1em;
+  margin-right: .2em;
+  text-align: center;
+  /* opacity: .8; */
+
+  /* For safety - reset parent styles, that can break glyph codes*/
+  font-variant: normal;
+  text-transform: none;
+
+  /* fix buttons height, for twitter bootstrap */
+  line-height: 1em;
+
+  /* Animation center compensation - margins should be symmetric */
+  /* remove if not needed */
+  margin-left: .2em;
+
+  /* you can be more comfortable with increased icons size */
+  /* font-size: 120%; */
+
+  /* Font smoothing. That was taken from TWBS */
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+
+  /* Uncomment for 3D effect */
+  /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
+}
\ No newline at end of file