loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove fomantic site module (#29980)

Had to fiddle a bit with the css ordering, but seems to work well now
and should render exactly like before. Some of the CSS may be
unnecessary, but I kept it for now.

(cherry picked from commit 6845717158991d41fc52690de857e2a4987f1c5c)

authored by

silverwind and committed by
Earl Warren
f63ed420 9cf4ab03

+79 -681
+79 -9
web_src/css/base.css
··· 37 37 border-color: currentcolor; 38 38 } 39 39 40 + html, body { 41 + height: 100%; 42 + font-size: 14px; 43 + } 44 + 45 + body { 46 + line-height: 1.4285rem; 47 + font-family: var(--fonts-regular); 48 + color: var(--color-text); 49 + background-color: var(--color-body); 50 + tab-size: var(--tab-size); 51 + display: flex; 52 + flex-direction: column; 53 + overflow-x: visible; 54 + overflow-wrap: break-word; 55 + } 56 + 40 57 textarea { 41 58 font-family: var(--fonts-regular); 42 59 } ··· 60 77 font-weight: var(--font-weight-semibold); 61 78 } 62 79 63 - body { 64 - color: var(--color-text); 65 - background-color: var(--color-body); 66 - tab-size: var(--tab-size); 67 - display: flex; 68 - flex-direction: column; 69 - overflow-wrap: break-word; 80 + h1, 81 + h2, 82 + h3, 83 + h4, 84 + h5 { 85 + line-height: 1.28571429; 86 + margin: calc(2rem - 0.1428571428571429em) 0 1rem; 87 + font-weight: var(--font-weight-medium); 88 + padding: 0; 89 + } 90 + 91 + h1 { 92 + min-height: 1rem; 93 + font-size: 2rem; 94 + } 95 + 96 + h2 { 97 + font-size: 1.71428571rem; 98 + } 99 + 100 + h3 { 101 + font-size: 1.28571429rem; 102 + } 103 + 104 + h4 { 105 + font-size: 1.07142857rem; 106 + } 107 + 108 + h5 { 109 + font-size: 1rem; 110 + } 111 + 112 + h1:first-child, 113 + h2:first-child, 114 + h3:first-child, 115 + h4:first-child, 116 + h5:first-child { 117 + margin-top: 0; 118 + } 119 + 120 + h1:last-child, 121 + h2:last-child, 122 + h3:last-child, 123 + h4:last-child, 124 + h5:last-child { 125 + margin-bottom: 0; 126 + } 127 + 128 + p { 129 + margin: 0 0 1em; 130 + line-height: 1.4285; 131 + } 132 + 133 + p:first-child { 134 + margin-top: 0; 135 + } 136 + 137 + p:last-child { 138 + margin-bottom: 0; 70 139 } 71 140 72 141 table { ··· 132 201 } 133 202 134 203 ::selection { 135 - background: var(--color-primary-light-1) !important; 136 - color: var(--color-white) !important; 204 + background: var(--color-primary-light-1); 205 + color: var(--color-white); 137 206 } 138 207 139 208 ::placeholder, ··· 157 226 a { 158 227 color: var(--color-primary); 159 228 cursor: pointer; 229 + text-decoration: none; 160 230 text-decoration-skip-ink: all; 161 231 } 162 232
-177
web_src/fomantic/build/semantic.css
··· 14956 14956 Site Overrides 14957 14957 *******************************/ 14958 14958 /*! 14959 - * # Fomantic-UI - Site 14960 - * http://github.com/fomantic/Fomantic-UI/ 14961 - * 14962 - * 14963 - * Released under the MIT license 14964 - * http://opensource.org/licenses/MIT 14965 - * 14966 - */ 14967 - 14968 - /******************************* 14969 - Page 14970 - *******************************/ 14971 - 14972 - html, 14973 - body { 14974 - height: 100%; 14975 - } 14976 - 14977 - html { 14978 - font-size: 14px; 14979 - } 14980 - 14981 - body { 14982 - margin: 0; 14983 - padding: 0; 14984 - overflow-x: visible; 14985 - min-width: 320px; 14986 - background: #FFFFFF; 14987 - font-family: var(--fonts-regular); 14988 - font-size: 14px; 14989 - line-height: 1.4285em; 14990 - color: rgba(0, 0, 0, 0.87); 14991 - } 14992 - 14993 - /******************************* 14994 - Headers 14995 - *******************************/ 14996 - 14997 - h1, 14998 - h2, 14999 - h3, 15000 - h4, 15001 - h5 { 15002 - font-family: var(--fonts-regular); 15003 - line-height: 1.28571429em; 15004 - margin: calc(2rem - 0.1428571428571429em) 0 1rem; 15005 - font-weight: 500; 15006 - padding: 0; 15007 - } 15008 - 15009 - h1 { 15010 - min-height: 1rem; 15011 - font-size: 2rem; 15012 - } 15013 - 15014 - h2 { 15015 - font-size: 1.71428571rem; 15016 - } 15017 - 15018 - h3 { 15019 - font-size: 1.28571429rem; 15020 - } 15021 - 15022 - h4 { 15023 - font-size: 1.07142857rem; 15024 - } 15025 - 15026 - h5 { 15027 - font-size: 1rem; 15028 - } 15029 - 15030 - h1:first-child, 15031 - h2:first-child, 15032 - h3:first-child, 15033 - h4:first-child, 15034 - h5:first-child { 15035 - margin-top: 0; 15036 - } 15037 - 15038 - h1:last-child, 15039 - h2:last-child, 15040 - h3:last-child, 15041 - h4:last-child, 15042 - h5:last-child { 15043 - margin-bottom: 0; 15044 - } 15045 - 15046 - /******************************* 15047 - Text 15048 - *******************************/ 15049 - 15050 - p { 15051 - margin: 0 0 1em; 15052 - line-height: 1.4285em; 15053 - } 15054 - 15055 - p:first-child { 15056 - margin-top: 0; 15057 - } 15058 - 15059 - p:last-child { 15060 - margin-bottom: 0; 15061 - } 15062 - 15063 - /*------------------- 15064 - Links 15065 - --------------------*/ 15066 - 15067 - a { 15068 - color: #4183C4; 15069 - text-decoration: none; 15070 - } 15071 - 15072 - a:hover { 15073 - color: #1e70bf; 15074 - text-decoration: underline; 15075 - } 15076 - 15077 - /******************************* 15078 - Scrollbars 15079 - *******************************/ 15080 - 15081 - /******************************* 15082 - Highlighting 15083 - *******************************/ 15084 - 15085 - /* Site */ 15086 - 15087 - ::-webkit-selection { 15088 - background-color: #CCE2FF; 15089 - color: rgba(0, 0, 0, 0.87); 15090 - } 15091 - 15092 - ::-moz-selection { 15093 - background-color: #CCE2FF; 15094 - color: rgba(0, 0, 0, 0.87); 15095 - } 15096 - 15097 - ::selection { 15098 - background-color: #CCE2FF; 15099 - color: rgba(0, 0, 0, 0.87); 15100 - } 15101 - 15102 - /* Form */ 15103 - 15104 - textarea::-webkit-selection, 15105 - input::-webkit-selection { 15106 - background-color: rgba(100, 100, 100, 0.4); 15107 - color: rgba(0, 0, 0, 0.87); 15108 - } 15109 - 15110 - textarea::-moz-selection, 15111 - input::-moz-selection { 15112 - background-color: rgba(100, 100, 100, 0.4); 15113 - color: rgba(0, 0, 0, 0.87); 15114 - } 15115 - 15116 - textarea::-moz-selection, 15117 - input::-moz-selection { 15118 - background-color: rgba(100, 100, 100, 0.4); 15119 - color: rgba(0, 0, 0, 0.87); 15120 - } 15121 - 15122 - textarea::selection, 15123 - input::selection { 15124 - background-color: rgba(100, 100, 100, 0.4); 15125 - color: rgba(0, 0, 0, 0.87); 15126 - } 15127 - 15128 - /******************************* 15129 - Global Overrides 15130 - *******************************/ 15131 - 15132 - /******************************* 15133 - Site Overrides 15134 - *******************************/ 15135 - /*! 15136 14959 * # Fomantic-UI - Tab 15137 14960 * http://github.com/fomantic/Fomantic-UI/ 15138 14961 *
-494
web_src/fomantic/build/semantic.js
··· 11867 11867 })( jQuery, window, document ); 11868 11868 11869 11869 /*! 11870 - * # Fomantic-UI - Site 11871 - * http://github.com/fomantic/Fomantic-UI/ 11872 - * 11873 - * 11874 - * Released under the MIT license 11875 - * http://opensource.org/licenses/MIT 11876 - * 11877 - */ 11878 - 11879 - ;(function ($, window, document, undefined) { 11880 - 11881 - $.isFunction = $.isFunction || function(obj) { 11882 - return typeof obj === "function" && typeof obj.nodeType !== "number"; 11883 - }; 11884 - 11885 - $.site = $.fn.site = function(parameters) { 11886 - var 11887 - time = new Date().getTime(), 11888 - performance = [], 11889 - 11890 - query = arguments[0], 11891 - methodInvoked = (typeof query == 'string'), 11892 - queryArguments = [].slice.call(arguments, 1), 11893 - 11894 - settings = ( $.isPlainObject(parameters) ) 11895 - ? $.extend(true, {}, $.site.settings, parameters) 11896 - : $.extend({}, $.site.settings), 11897 - 11898 - namespace = settings.namespace, 11899 - error = settings.error, 11900 - 11901 - moduleNamespace = 'module-' + namespace, 11902 - 11903 - $document = $(document), 11904 - $module = $document, 11905 - element = this, 11906 - instance = $module.data(moduleNamespace), 11907 - 11908 - module, 11909 - returnedValue 11910 - ; 11911 - module = { 11912 - 11913 - initialize: function() { 11914 - module.instantiate(); 11915 - }, 11916 - 11917 - instantiate: function() { 11918 - module.verbose('Storing instance of site', module); 11919 - instance = module; 11920 - $module 11921 - .data(moduleNamespace, module) 11922 - ; 11923 - }, 11924 - 11925 - normalize: function() { 11926 - module.fix.console(); 11927 - module.fix.requestAnimationFrame(); 11928 - }, 11929 - 11930 - fix: { 11931 - console: function() { 11932 - module.debug('Normalizing window.console'); 11933 - if (console === undefined || console.log === undefined) { 11934 - module.verbose('Console not available, normalizing events'); 11935 - module.disable.console(); 11936 - } 11937 - if (typeof console.group == 'undefined' || typeof console.groupEnd == 'undefined' || typeof console.groupCollapsed == 'undefined') { 11938 - module.verbose('Console group not available, normalizing events'); 11939 - window.console.group = function() {}; 11940 - window.console.groupEnd = function() {}; 11941 - window.console.groupCollapsed = function() {}; 11942 - } 11943 - if (typeof console.markTimeline == 'undefined') { 11944 - module.verbose('Mark timeline not available, normalizing events'); 11945 - window.console.markTimeline = function() {}; 11946 - } 11947 - }, 11948 - consoleClear: function() { 11949 - module.debug('Disabling programmatic console clearing'); 11950 - window.console.clear = function() {}; 11951 - }, 11952 - requestAnimationFrame: function() { 11953 - module.debug('Normalizing requestAnimationFrame'); 11954 - if(window.requestAnimationFrame === undefined) { 11955 - module.debug('RequestAnimationFrame not available, normalizing event'); 11956 - window.requestAnimationFrame = window.requestAnimationFrame 11957 - || window.mozRequestAnimationFrame 11958 - || window.webkitRequestAnimationFrame 11959 - || window.msRequestAnimationFrame 11960 - || function(callback) { setTimeout(callback, 0); } 11961 - ; 11962 - } 11963 - } 11964 - }, 11965 - 11966 - moduleExists: function(name) { 11967 - return ($.fn[name] !== undefined && $.fn[name].settings !== undefined); 11968 - }, 11969 - 11970 - enabled: { 11971 - modules: function(modules) { 11972 - var 11973 - enabledModules = [] 11974 - ; 11975 - modules = modules || settings.modules; 11976 - $.each(modules, function(index, name) { 11977 - if(module.moduleExists(name)) { 11978 - enabledModules.push(name); 11979 - } 11980 - }); 11981 - return enabledModules; 11982 - } 11983 - }, 11984 - 11985 - disabled: { 11986 - modules: function(modules) { 11987 - var 11988 - disabledModules = [] 11989 - ; 11990 - modules = modules || settings.modules; 11991 - $.each(modules, function(index, name) { 11992 - if(!module.moduleExists(name)) { 11993 - disabledModules.push(name); 11994 - } 11995 - }); 11996 - return disabledModules; 11997 - } 11998 - }, 11999 - 12000 - change: { 12001 - setting: function(setting, value, modules, modifyExisting) { 12002 - modules = (typeof modules === 'string') 12003 - ? (modules === 'all') 12004 - ? settings.modules 12005 - : [modules] 12006 - : modules || settings.modules 12007 - ; 12008 - modifyExisting = (modifyExisting !== undefined) 12009 - ? modifyExisting 12010 - : true 12011 - ; 12012 - $.each(modules, function(index, name) { 12013 - var 12014 - namespace = (module.moduleExists(name)) 12015 - ? $.fn[name].settings.namespace || false 12016 - : true, 12017 - $existingModules 12018 - ; 12019 - if(module.moduleExists(name)) { 12020 - module.verbose('Changing default setting', setting, value, name); 12021 - $.fn[name].settings[setting] = value; 12022 - if(modifyExisting && namespace) { 12023 - $existingModules = $(':data(module-' + namespace + ')'); 12024 - if($existingModules.length > 0) { 12025 - module.verbose('Modifying existing settings', $existingModules); 12026 - $existingModules[name]('setting', setting, value); 12027 - } 12028 - } 12029 - } 12030 - }); 12031 - }, 12032 - settings: function(newSettings, modules, modifyExisting) { 12033 - modules = (typeof modules === 'string') 12034 - ? [modules] 12035 - : modules || settings.modules 12036 - ; 12037 - modifyExisting = (modifyExisting !== undefined) 12038 - ? modifyExisting 12039 - : true 12040 - ; 12041 - $.each(modules, function(index, name) { 12042 - var 12043 - $existingModules 12044 - ; 12045 - if(module.moduleExists(name)) { 12046 - module.verbose('Changing default setting', newSettings, name); 12047 - $.extend(true, $.fn[name].settings, newSettings); 12048 - if(modifyExisting && namespace) { 12049 - $existingModules = $(':data(module-' + namespace + ')'); 12050 - if($existingModules.length > 0) { 12051 - module.verbose('Modifying existing settings', $existingModules); 12052 - $existingModules[name]('setting', newSettings); 12053 - } 12054 - } 12055 - } 12056 - }); 12057 - } 12058 - }, 12059 - 12060 - enable: { 12061 - console: function() { 12062 - module.console(true); 12063 - }, 12064 - debug: function(modules, modifyExisting) { 12065 - modules = modules || settings.modules; 12066 - module.debug('Enabling debug for modules', modules); 12067 - module.change.setting('debug', true, modules, modifyExisting); 12068 - }, 12069 - verbose: function(modules, modifyExisting) { 12070 - modules = modules || settings.modules; 12071 - module.debug('Enabling verbose debug for modules', modules); 12072 - module.change.setting('verbose', true, modules, modifyExisting); 12073 - } 12074 - }, 12075 - disable: { 12076 - console: function() { 12077 - module.console(false); 12078 - }, 12079 - debug: function(modules, modifyExisting) { 12080 - modules = modules || settings.modules; 12081 - module.debug('Disabling debug for modules', modules); 12082 - module.change.setting('debug', false, modules, modifyExisting); 12083 - }, 12084 - verbose: function(modules, modifyExisting) { 12085 - modules = modules || settings.modules; 12086 - module.debug('Disabling verbose debug for modules', modules); 12087 - module.change.setting('verbose', false, modules, modifyExisting); 12088 - } 12089 - }, 12090 - 12091 - console: function(enable) { 12092 - if(enable) { 12093 - if(instance.cache.console === undefined) { 12094 - module.error(error.console); 12095 - return; 12096 - } 12097 - module.debug('Restoring console function'); 12098 - window.console = instance.cache.console; 12099 - } 12100 - else { 12101 - module.debug('Disabling console function'); 12102 - instance.cache.console = window.console; 12103 - window.console = { 12104 - clear : function(){}, 12105 - error : function(){}, 12106 - group : function(){}, 12107 - groupCollapsed : function(){}, 12108 - groupEnd : function(){}, 12109 - info : function(){}, 12110 - log : function(){}, 12111 - markTimeline : function(){}, 12112 - warn : function(){} 12113 - }; 12114 - } 12115 - }, 12116 - 12117 - destroy: function() { 12118 - module.verbose('Destroying previous site for', $module); 12119 - $module 12120 - .removeData(moduleNamespace) 12121 - ; 12122 - }, 12123 - 12124 - cache: {}, 12125 - 12126 - setting: function(name, value) { 12127 - if( $.isPlainObject(name) ) { 12128 - $.extend(true, settings, name); 12129 - } 12130 - else if(value !== undefined) { 12131 - settings[name] = value; 12132 - } 12133 - else { 12134 - return settings[name]; 12135 - } 12136 - }, 12137 - internal: function(name, value) { 12138 - if( $.isPlainObject(name) ) { 12139 - $.extend(true, module, name); 12140 - } 12141 - else if(value !== undefined) { 12142 - module[name] = value; 12143 - } 12144 - else { 12145 - return module[name]; 12146 - } 12147 - }, 12148 - debug: function() { 12149 - if(settings.debug) { 12150 - if(settings.performance) { 12151 - module.performance.log(arguments); 12152 - } 12153 - else { 12154 - module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); 12155 - module.debug.apply(console, arguments); 12156 - } 12157 - } 12158 - }, 12159 - verbose: function() { 12160 - if(settings.verbose && settings.debug) { 12161 - if(settings.performance) { 12162 - module.performance.log(arguments); 12163 - } 12164 - else { 12165 - module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); 12166 - module.verbose.apply(console, arguments); 12167 - } 12168 - } 12169 - }, 12170 - error: function() { 12171 - module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); 12172 - module.error.apply(console, arguments); 12173 - }, 12174 - performance: { 12175 - log: function(message) { 12176 - var 12177 - currentTime, 12178 - executionTime, 12179 - previousTime 12180 - ; 12181 - if(settings.performance) { 12182 - currentTime = new Date().getTime(); 12183 - previousTime = time || currentTime; 12184 - executionTime = currentTime - previousTime; 12185 - time = currentTime; 12186 - performance.push({ 12187 - 'Element' : element, 12188 - 'Name' : message[0], 12189 - 'Arguments' : [].slice.call(message, 1) || '', 12190 - 'Execution Time' : executionTime 12191 - }); 12192 - } 12193 - clearTimeout(module.performance.timer); 12194 - module.performance.timer = setTimeout(module.performance.display, 500); 12195 - }, 12196 - display: function() { 12197 - var 12198 - title = settings.name + ':', 12199 - totalTime = 0 12200 - ; 12201 - time = false; 12202 - clearTimeout(module.performance.timer); 12203 - $.each(performance, function(index, data) { 12204 - totalTime += data['Execution Time']; 12205 - }); 12206 - title += ' ' + totalTime + 'ms'; 12207 - if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { 12208 - console.groupCollapsed(title); 12209 - if(console.table) { 12210 - console.table(performance); 12211 - } 12212 - else { 12213 - $.each(performance, function(index, data) { 12214 - console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); 12215 - }); 12216 - } 12217 - console.groupEnd(); 12218 - } 12219 - performance = []; 12220 - } 12221 - }, 12222 - invoke: function(query, passedArguments, context) { 12223 - var 12224 - object = instance, 12225 - maxDepth, 12226 - found, 12227 - response 12228 - ; 12229 - passedArguments = passedArguments || queryArguments; 12230 - context = element || context; 12231 - if(typeof query == 'string' && object !== undefined) { 12232 - query = query.split(/[\. ]/); 12233 - maxDepth = query.length - 1; 12234 - $.each(query, function(depth, value) { 12235 - var camelCaseValue = (depth != maxDepth) 12236 - ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) 12237 - : query 12238 - ; 12239 - if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { 12240 - object = object[camelCaseValue]; 12241 - } 12242 - else if( object[camelCaseValue] !== undefined ) { 12243 - found = object[camelCaseValue]; 12244 - return false; 12245 - } 12246 - else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { 12247 - object = object[value]; 12248 - } 12249 - else if( object[value] !== undefined ) { 12250 - found = object[value]; 12251 - return false; 12252 - } 12253 - else { 12254 - module.error(error.method, query); 12255 - return false; 12256 - } 12257 - }); 12258 - } 12259 - if ( $.isFunction( found ) ) { 12260 - response = found.apply(context, passedArguments); 12261 - } 12262 - else if(found !== undefined) { 12263 - response = found; 12264 - } 12265 - if(Array.isArray(returnedValue)) { 12266 - returnedValue.push(response); 12267 - } 12268 - else if(returnedValue !== undefined) { 12269 - returnedValue = [returnedValue, response]; 12270 - } 12271 - else if(response !== undefined) { 12272 - returnedValue = response; 12273 - } 12274 - return found; 12275 - } 12276 - }; 12277 - 12278 - if(methodInvoked) { 12279 - if(instance === undefined) { 12280 - module.initialize(); 12281 - } 12282 - module.invoke(query); 12283 - } 12284 - else { 12285 - if(instance !== undefined) { 12286 - module.destroy(); 12287 - } 12288 - module.initialize(); 12289 - } 12290 - return (returnedValue !== undefined) 12291 - ? returnedValue 12292 - : this 12293 - ; 12294 - }; 12295 - 12296 - $.site.settings = { 12297 - 12298 - name : 'Site', 12299 - namespace : 'site', 12300 - 12301 - error : { 12302 - console : 'Console cannot be restored, most likely it was overwritten outside of module', 12303 - method : 'The method you called is not defined.' 12304 - }, 12305 - 12306 - debug : false, 12307 - verbose : false, 12308 - performance : true, 12309 - 12310 - modules: [ 12311 - 'accordion', 12312 - 'api', 12313 - 'calendar', 12314 - 'checkbox', 12315 - 'dimmer', 12316 - 'dropdown', 12317 - 'embed', 12318 - 'form', 12319 - 'modal', 12320 - 'nag', 12321 - 'popup', 12322 - 'slider', 12323 - 'rating', 12324 - 'shape', 12325 - 'sidebar', 12326 - 'state', 12327 - 'sticky', 12328 - 'tab', 12329 - 'toast', 12330 - 'transition', 12331 - 'visibility', 12332 - 'visit' 12333 - ], 12334 - 12335 - siteNamespace : 'site', 12336 - namespaceStub : { 12337 - cache : {}, 12338 - config : {}, 12339 - sections : {}, 12340 - section : {}, 12341 - utilities : {} 12342 - } 12343 - 12344 - }; 12345 - 12346 - // allows for selection of elements with data attributes 12347 - $.extend($.expr[ ":" ], { 12348 - data: ($.expr.createPseudo) 12349 - ? $.expr.createPseudo(function(dataName) { 12350 - return function(elem) { 12351 - return !!$.data(elem, dataName); 12352 - }; 12353 - }) 12354 - : function(elem, i, match) { 12355 - // support: jQuery < 1.8 12356 - return !!$.data(elem, match[ 3 ]); 12357 - } 12358 - }); 12359 - 12360 - 12361 - })( jQuery, window, document ); 12362 - 12363 - /*! 12364 11870 * # Fomantic-UI - Tab 12365 11871 * http://github.com/fomantic/Fomantic-UI/ 12366 11872 *
-1
web_src/fomantic/semantic.json
··· 36 36 "modal", 37 37 "search", 38 38 "segment", 39 - "site", 40 39 "tab", 41 40 "table" 42 41 ]