mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 10:44:12 +01:00 
			
		
		
		
	Remove font-awesome and fomantic icon module (#24471)
				
					
				
			Fixes https://github.com/go-gitea/gitea/issues/10410. This PR removes around 120kB of CSS.
This commit is contained in:
		
							parent
							
								
									3e7101dd64
								
							
						
					
					
						commit
						fa506cd571
					
				@ -40,7 +40,7 @@ gitea embedded list [--include-vendored] [patterns...]
 | 
			
		||||
 | 
			
		||||
The `--include-vendored` flag makes the command include vendored files, which are
 | 
			
		||||
normally excluded; that is, files from external libraries that are required for Gitea
 | 
			
		||||
(e.g. [font-awesome](https://fontawesome.com/), [octicons](https://octicons.github.com/), etc).
 | 
			
		||||
(e.g. [octicons](https://octicons.github.com/), etc).
 | 
			
		||||
 | 
			
		||||
A list of file search patterns can be provided. Gitea uses [gobwas/glob](https://github.com/gobwas/glob)
 | 
			
		||||
for its glob syntax. Here are some examples:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										9
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -29,7 +29,6 @@
 | 
			
		||||
        "esbuild-loader": "3.0.1",
 | 
			
		||||
        "escape-goat": "4.0.0",
 | 
			
		||||
        "fast-glob": "3.2.12",
 | 
			
		||||
        "font-awesome": "4.7.0",
 | 
			
		||||
        "jquery": "3.6.4",
 | 
			
		||||
        "jquery.are-you-sure": "1.9.0",
 | 
			
		||||
        "katex": "0.16.6",
 | 
			
		||||
@ -4945,14 +4944,6 @@
 | 
			
		||||
      "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/font-awesome": {
 | 
			
		||||
      "version": "4.7.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz",
 | 
			
		||||
      "integrity": "sha512-U6kGnykA/6bFmg1M/oT9EkFeIYv7JlX3bozwQJWiiLz6L0w3F5vBVPxHlwyX/vtNq1ckcpRKOB9f2Qal/VtFpg==",
 | 
			
		||||
      "engines": {
 | 
			
		||||
        "node": ">=0.10.3"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/for-each": {
 | 
			
		||||
      "version": "0.3.3",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,6 @@
 | 
			
		||||
    "esbuild-loader": "3.0.1",
 | 
			
		||||
    "escape-goat": "4.0.0",
 | 
			
		||||
    "fast-glob": "3.2.12",
 | 
			
		||||
    "font-awesome": "4.7.0",
 | 
			
		||||
    "jquery": "3.6.4",
 | 
			
		||||
    "jquery.are-you-sure": "1.9.0",
 | 
			
		||||
    "katex": "0.16.6",
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,6 @@
 | 
			
		||||
{{template "base/head" .}}
 | 
			
		||||
<div class="page-content repository">
 | 
			
		||||
	{{template "repo/header" .}}
 | 
			
		||||
 | 
			
		||||
	<div class="ui container">
 | 
			
		||||
		<div class="ui stackable grid">
 | 
			
		||||
			<div class="four wide column">
 | 
			
		||||
@ -12,7 +11,7 @@
 | 
			
		||||
						<a class="item{{if eq .Entry.Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Entry.Name}}">{{.Entry.Name}}
 | 
			
		||||
							{{if .ErrMsg}}
 | 
			
		||||
								<span data-tooltip-content="{{.ErrMsg}}">
 | 
			
		||||
									<i class="warning icon red"></i>
 | 
			
		||||
									{{svg "octicon-alert" 16 "text red"}}
 | 
			
		||||
								</span>
 | 
			
		||||
							{{end}}
 | 
			
		||||
						</a>
 | 
			
		||||
 | 
			
		||||
@ -57,7 +57,7 @@
 | 
			
		||||
			{{.locale.Tr "cancel"}}
 | 
			
		||||
		</button>
 | 
			
		||||
		<button class="ui primary small approve button">
 | 
			
		||||
			<i class="save icon"></i>
 | 
			
		||||
			{{svg "fontawesome-save"}}
 | 
			
		||||
			{{.locale.Tr "save"}}
 | 
			
		||||
		</button>
 | 
			
		||||
	</div>
 | 
			
		||||
 | 
			
		||||
@ -249,7 +249,7 @@
 | 
			
		||||
						{{$.locale.Tr "repo.pulls.require_signed_wont_sign"}}
 | 
			
		||||
					</div>
 | 
			
		||||
					<div class="item">
 | 
			
		||||
						<i class="icon unlock"></i>
 | 
			
		||||
						<i class="icon icon-octicon">{{svg "octicon-unlock"}}</i>
 | 
			
		||||
						{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
 | 
			
		||||
					</div>
 | 
			
		||||
				{{end}}
 | 
			
		||||
@ -274,12 +274,12 @@
 | 
			
		||||
					{{end}}
 | 
			
		||||
					{{if .WillSign}}
 | 
			
		||||
						<div class="item">
 | 
			
		||||
							<i class="icon lock green"></i>
 | 
			
		||||
							<i class="icon icon-octicon">{{svg "octicon-lock" 16 "text green"}}</i>
 | 
			
		||||
							{{$.locale.Tr "repo.signing.will_sign" .SigningKey}}
 | 
			
		||||
						</div>
 | 
			
		||||
					{{else if .IsSigned}}
 | 
			
		||||
						<div class="item">
 | 
			
		||||
							<i class="icon unlock"></i>
 | 
			
		||||
							<i class="icon icon-octicon">{{svg "octicon-unlock"}}</i>
 | 
			
		||||
							{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
 | 
			
		||||
						</div>
 | 
			
		||||
					{{end}}
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,3 @@
 | 
			
		||||
@import "font-awesome/css/font-awesome.css";
 | 
			
		||||
 | 
			
		||||
@import "./animations.css";
 | 
			
		||||
@import "./shared/issuelist.css";
 | 
			
		||||
@import "./shared/repoorg.css";
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8903
									
								
								web_src/fomantic/build/semantic.css
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8903
									
								
								web_src/fomantic/build/semantic.css
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -33,7 +33,6 @@
 | 
			
		||||
    "form",
 | 
			
		||||
    "grid",
 | 
			
		||||
    "header",
 | 
			
		||||
    "icon",
 | 
			
		||||
    "input",
 | 
			
		||||
    "item",
 | 
			
		||||
    "label",
 | 
			
		||||
 | 
			
		||||
@ -40,10 +40,6 @@ const filterCssImport = (url, ...args) => {
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (cssFile.includes('font-awesome') && /(eot|ttf|otf|woff|svg)$/.test(importedFile)) {
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -205,9 +201,6 @@ export default {
 | 
			
		||||
      },
 | 
			
		||||
      emitError: true,
 | 
			
		||||
      allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR ISC OR CPAL-1.0 OR Unlicense OR EPL-1.0 OR EPL-2.0)',
 | 
			
		||||
      ignore: [
 | 
			
		||||
        'font-awesome',
 | 
			
		||||
      ],
 | 
			
		||||
    }) : new AddAssetPlugin('js/licenses.txt', `Licenses are disabled during development`),
 | 
			
		||||
  ],
 | 
			
		||||
  performance: {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user