mirror of
https://github.com/konpa/devicon.git
synced 2025-02-24 01:02:22 +01:00
Merge pull request #401 from devicons/amacado/feature/395-auto-update-version
fix gh-page in master branch / enhance auto-versioning
This commit is contained in:
commit
ca2f948ddf
2
devicon.min.css
vendored
2
devicon.min.css
vendored
File diff suppressed because one or more lines are too long
@ -8,9 +8,25 @@ var devicon = angular.module('devicon', ['ngSanitize', 'ngAnimate']);
|
||||
|
||||
devicon.controller('IconListCtrl', function($scope, $http, $compile) {
|
||||
|
||||
var baseUrl = window.location.origin;
|
||||
// Determination of the latest release tagging
|
||||
// which is used for showing in the header of the page
|
||||
// as well as for CDN links
|
||||
var gitHubPath = 'devicons/devicon';
|
||||
var url = 'https://api.github.com/repos/' + gitHubPath + '/tags';
|
||||
|
||||
// Get devicon.json
|
||||
$scope.latestReleaseTagging = 'master';
|
||||
$http.get(url).success(function (data) {
|
||||
if(data.length > 0) {
|
||||
$scope.latestReleaseTagging = data[0].name;
|
||||
}
|
||||
}).error(function () {
|
||||
console.log('Unable to determine latest release version, fallback to master.')
|
||||
});
|
||||
|
||||
|
||||
var baseUrl = 'https://raw.githubusercontent.com/' + gitHubPath + '/master/'
|
||||
|
||||
// Get devicon.json
|
||||
$http.get(baseUrl + '/devicon.json').success(function(data) {
|
||||
|
||||
/*
|
||||
@ -69,7 +85,6 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
|
||||
/*------ End of "Re-format devicon.json" ------*/
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
| Change selected icon
|
||||
|--------------------------------
|
||||
|
@ -33,11 +33,13 @@
|
||||
<meta name="msapplication-TileImage" content="./logos/mstile-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link rel="stylesheet" href="../devicon.min.css">
|
||||
<link rel="stylesheet" href="https://raw.githubusercontent.com/devicons/devicon/master/devicon.min.css">
|
||||
<link rel="stylesheet" href="./assets/css/style.css">
|
||||
</head>
|
||||
|
||||
<body ng-app="devicon" ng-controller="IconListCtrl">
|
||||
<link rel="stylesheet" ng-if="latestReleaseTagging" ng-href="https://cdn.jsdelivr.net/gh/devicons/devicon@{{ latestReleaseTagging }}/devicon.min.css">
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
|
||||
<![endif]-->
|
||||
@ -46,7 +48,7 @@
|
||||
|
||||
<div class="container">
|
||||
<header class="clearfix">
|
||||
<h1>Devicon <span>2.7</span></h1>
|
||||
<h1>Devicon <span><a href="https://github.com/devicons/devicon/releases">{{ latestReleaseTagging }}</a></span></h1>
|
||||
<h2>Devicon is a set of icons representing programming languages, designing & development tools. You can use it as a font or directly copy/paste the svg code into your project.</h2>
|
||||
<h3>(Super) Quick Setup</h3>
|
||||
<h5>First select an icon on the right, then select the version below and copy/paste the code into your project.</h5>
|
||||
@ -65,7 +67,7 @@
|
||||
</ul>
|
||||
<div class="cde">
|
||||
<div class="cde-com"><!-- in your header --></div>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@master/devicon.min.css"><br />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@{{ latestReleaseTagging }}/devicon.min.css"><br />
|
||||
<br />
|
||||
<div class="cde-com"><!-- in your body --></div>
|
||||
<i class="devicon-{{selectedIcon.name}}-{{selectedFontIcon}}<span ng-if="colored"> colored</span>"></i><br />
|
||||
@ -75,7 +77,7 @@
|
||||
<h4>SVG versions</h4>
|
||||
<ul class="icons-list">
|
||||
<li ng-repeat="svgVersion in selectedIcon.svg" ng-click="selectSvg(svgVersion, $index)" ng-class="{'selected-version' : $index == selectedSvgIndex}">
|
||||
<img ng-src="../icons/{{selectedIcon.name}}/{{selectedIcon.name}}-{{svgVersion}}.svg">
|
||||
<img ng-src="https://raw.githubusercontent.com/devicons/devicon/master/icons/{{selectedIcon.name}}/{{selectedIcon.name}}-{{svgVersion}}.svg">
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cde">
|
||||
@ -89,13 +91,13 @@
|
||||
<h3>Github Repo</h3>
|
||||
<h5>If you prefer a local install, you can download all the files on the github repo.</h5>
|
||||
<p class="download">
|
||||
<a href="https://github.com/devicons/devicon/archive/master.zip"><i class="icon-github"></i>DOWNLOAD</a>
|
||||
<a href="https://github.com/devicons/devicon/archive/master.zip"><i class="devicon-github-original"></i>DOWNLOAD</a>
|
||||
</p>
|
||||
<p class="download">
|
||||
<a href="https://github.com/devicons/devicon/" target="blank"><i class="icon-github"></i>GO TO REPO</a>
|
||||
<a href="https://github.com/devicons/devicon/" target="blank"><i class="devicon-github-original"></i>GO TO REPO</a>
|
||||
</p>
|
||||
<p class="download">
|
||||
<a href="https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md" target="blank"><i class="icon-github"></i>CONTRIBUTE</a>
|
||||
<a href="https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md" target="blank"><i class="devicon-github-original"></i>CONTRIBUTE</a>
|
||||
</p>
|
||||
|
||||
<p class="footer">
|
||||
|
@ -149,4 +149,4 @@ function cleanUp() {
|
||||
|
||||
|
||||
exports.updateCss = createDeviconMinCSS;
|
||||
exports.clean = cleanUp;
|
||||
exports.clean = cleanUp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user