Anonymous
×
Create a new article
Write your page title here:
We currently have 15 articles on TwistedFates Database. Type your article name above or click on one of the titles below and start writing!



TwistedFates Database
15Articles

MediaWiki:Common.css and Module:File link: Difference between pages

(Difference between pages)
No edit summary
 
m (1 revision imported)
 
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
-- This module provides a library for formatting file wikilinks.
/*MediaWiki:Common.css*/


/* changes the background color of the bottom and left of each page, up to behind half of the logo */
local yesno = require('Module:Yesno')
local checkType = require('libraryUtil').checkType


body {
local p = {}
background-image: url(/w/resources/assets/ambrosiapattern.jpg);
background-repeat: repeat;
font-family: 'Roboto Mono', monospace;
font-weight:500;
}


function p._main(args)
checkType('_main', 1, args, 'table')


/* changes the background color behind the top half of the logo and at top of each page */
-- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our
-- own function to get the right error level.
local function checkArg(key, val, level)
if type(val) ~= 'string' then
error(string.format(
"type error in '%s' parameter of '_main' (expected string, got %s)",
key, type(val)
), level)
end
end


#mw-page-base {background: #0A0A0A}
local ret = {}


-- Adds a positional parameter to the buffer.
local function addPositional(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = val
end


/****Edit Link Appearance****/
-- Adds a named parameter to the buffer. We assume that the parameter name
-- is the same as the argument key.
local function addNamed(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = key .. '=' .. val
end


div#mw-panel div.portal div.body ul li a {
-- Filename
color: #e4A732;
checkArg('file', args.file, 3)
font-size: 16px;
ret[#ret + 1] = 'File:' .. args.file
}


div#mw-panel div.portal div.body ul li a:hover {
-- Format
text-decoration: none;
if args.format then
color: #a178a6 !important;
checkArg('format', args.format)
}
if args.formatfile then
checkArg('formatfile', args.formatfile)
ret[#ret + 1] = args.format .. '=' .. args.formatfile
else
ret[#ret + 1] = args.format
end
end


div#mw-panel div.portal div.body ul li a:visited {color: #e4a732}
-- Border
if yesno(args.border) then
ret[#ret + 1] = 'border'
end


.ve-activated #catlinks a, a.new:visited, #p-personal a.new:visited{color:#E4A732}
addPositional('location')
a:link{
addPositional('alignment')
color: #e4a732;
addPositional('size')
text-decoration: none;
addNamed('upright')
}
addNamed('link')
addNamed('alt')
addNamed('page')
addNamed('class')
addNamed('lang')
addNamed('start')
addNamed('end')
addNamed('thumbtime')
addPositional('caption')


@media screen {
return string.format('[[%s]]', table.concat(ret, '|'))
    a {
end
color: #e4a732;
text-decoration: none !important;
}


a:hover {
function p.main(frame)
color: #a178a6 !important;
local origArgs = require('Module:Arguments').getArgs(frame, {
}
wrappers = 'Template:File link'
})
if not origArgs.file then
error("'file' parameter missing from [[Template:File link]]", 0)
end


div.vectorTabs span > a {
-- Copy the arguments that were passed to a new table to avoid looking up
    float: left;
-- every possible parameter in the frame object.
    display: block;
local args = {}
color: #fefde2;
for k, v in pairs(origArgs) do
font-weight: 800;
-- Make _BLANK a special argument to add a blank parameter. For use in
font-size: 14px;
-- conditional templates etc. it is useful for blank arguments to be
border: none;
-- ignored, but we still need a way to specify them so that we can do
}
-- things like [[File:Example.png|link=]].
if v == '_BLANK' then
v = ''
end
args[k] = v
end
return p._main(args)
end


div.vectorTabs li.selected a, div.vectorTabs li.selected a:visited {
return p
color: #fefde2;
font-weight: 800;
text-shadow:
  -.5px -.5px 0 #000,
    .5px -.5px 0 #000,
    -.5px .5px 0 #000,
    .5px .5px 0 #000;
font-size: 16px;
border: none;
}
 
div.vectorTabs li a {
color: #fefde2;
font-weight: 800;
font-size: 14px;
        background-color: #200D24;
}
 
div.vectorTabs li a:hover {
color: #a178a6;
        background-color: #200D24;
}
 
div.vectorTabs li.new a, div.vectorTabs li.new a:visited {
background-color: #200D24;
border: none;
}
 
a:visited{color:#e4a732}
 
/*Edit Gallery Appearance*/
 
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper, ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper, ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper{background-color:rgba(0,0,0,0.3)}
 
 
/*Edit Table Appearance*/
 
table.wikitable > ,tr > th, table.wikitable > tr > td, table.wikitable > * > tr > th, table.wikitable > * > tr > td{border: 0 !important;
border-radius: 4px !important;
padding: 3px !important;}
table.wikitable {
border: 0;
}
th {
border: 0;
background-color: rgba(255,255,255,0.0);
}
tr{
border: 0;
}
 
 
/*Edit UI Appearance*/
#wpSaveWidget{
background-color: #e4a732;
border: 0;
border-radius: 4px;
}
 
 
/*Edit DIV Appearance*/
 
.catlinks{
background-color: rgba(255,255,255,0.3);
border: 0;
border-radius: 4px;
padding-left: 5%;
}
 
div.thumbinner, table.wikitable, tbody, .toc, .mw-warning, .toccolours {
    border: 0;
    background-color: rgba(255,255,255,0.4) !important;
    padding: 5px;
    font-size: 95%;
    border-radius: 4px;
    color: #200D24;
}
 
#content {background-color: #200D24}
 
#mw-content-text {background-color: #200D24;
color: #EFF6F8;}
.mw-editform .editOptions{
background-color: rgba(255,255,255,0.4) !important;
border: 0 !important;
border-radius: 4px !important;
}
.mw-body .firstHeading {
color: #fefde2;
font-family: 'Roboto Mono', monospace;
text-shadow:
  -.5px -.5px 0 #000,
    .5px -.5px 0 #000,
    -.5px .5px 0 #000,
    .5px .5px 0 #000;
}
div#mw-panel{position:fixed}
 
/*Edit List Appearance*/
div.vectorTabs ul li {background-color: #200D24;
border: 0;
}
div.vectorTabs li{border-radius: 4px 4px 0px 0px}
div.vectorTabs{
background-image: none;
background-color: transparent;}
 
div.vectorTabs li.selected {background-color: #200D24;
border: 0;
}
 
 
/*Edit Global Text Appearance*/
 
div#mw-panel div.portal
h3 {
    display: block;
    font-size: 1.17em;
color: #fefde2;
    -webkit-margin-before: 3px;
    -webkit-margin-after: 3px;
    -webkit-margin-start: 0px;
    -webkit-margin-end: 0px;
    font-weight: bold;
text-align: center;
}
.mw-body{border:none;
color: #fff;
}
h1, h2, h3, h4, h5 {
font-family: 'Roboto Mono', monospace !important;
font-weight: bold;
color: #EFF6F8;
}
.mw-body h1, .mw-body-content h1, .mw-body-content h2 {
  font-family: 'Roboto Mono', monospace !important;
font-weight: bold;
color: #EFF6F8;
}
 
 
/* OTHER CONFIGURATIONS */
 
/** Hide Main Page Heading **/
h1#firstHeading.firstHeading{
display: none;
margin-top: -5%;
}
 
 
 
/* TAB MODIFICATIONS */
 
/**** VECTOR TABS & VECTOR MENU ****/
 
.vector-menu-tabs, .vector-menu-tabs a, #mw-head .vector-menu-dropdown h3 {
background-color: #200D24 !important;
background-image: none !important;
border-radius: 4px;
}
 
 
  /*Remove annoying white shit around edges of the tabs*/
.vector-menu-tabs li
{
background-image: none;
}
 
  /* remove borders between tabs */
    span {
        background: none;
 
        /* move tab text up */
        a {
            padding-top: 1em;
            height: 2.25em;
        }
 
    }
 
}
 
/* hide "read" tab */
#ca-view {
    display: none;
}

Latest revision as of 21:26, 21 May 2021

Documentation for this module may be created at Module:File link/doc

-- This module provides a library for formatting file wikilinks.

local yesno = require('Module:Yesno')
local checkType = require('libraryUtil').checkType

local p = {}

function p._main(args)
	checkType('_main', 1, args, 'table')

	-- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our
	-- own function to get the right error level.
	local function checkArg(key, val, level)
		if type(val) ~= 'string' then
			error(string.format(
				"type error in '%s' parameter of '_main' (expected string, got %s)",
				key, type(val)
			), level)
		end
	end

	local ret = {}

	-- Adds a positional parameter to the buffer.
	local function addPositional(key)
		local val = args[key]
		if not val then
			return nil
		end
		checkArg(key, val, 4)
		ret[#ret + 1] = val
	end

	-- Adds a named parameter to the buffer. We assume that the parameter name
	-- is the same as the argument key.
	local function addNamed(key)
		local val = args[key]
		if not val then
			return nil
		end
		checkArg(key, val, 4)
		ret[#ret + 1] = key .. '=' .. val
	end

	-- Filename
	checkArg('file', args.file, 3)
	ret[#ret + 1] = 'File:' .. args.file

	-- Format
	if args.format then
		checkArg('format', args.format)
		if args.formatfile then
			checkArg('formatfile', args.formatfile)
			ret[#ret + 1] = args.format .. '=' .. args.formatfile
		else
			ret[#ret + 1] = args.format
		end
	end

	-- Border
	if yesno(args.border) then
		ret[#ret + 1] = 'border'
	end

	addPositional('location')
	addPositional('alignment')
	addPositional('size')
	addNamed('upright')
	addNamed('link')
	addNamed('alt')
	addNamed('page')
	addNamed('class')
	addNamed('lang')
	addNamed('start')
	addNamed('end')
	addNamed('thumbtime')
	addPositional('caption')

	return string.format('[[%s]]', table.concat(ret, '|'))
end

function p.main(frame)
	local origArgs = require('Module:Arguments').getArgs(frame, {
		wrappers = 'Template:File link'
	})
	if not origArgs.file then
		error("'file' parameter missing from [[Template:File link]]", 0)
	end

	-- Copy the arguments that were passed to a new table to avoid looking up
	-- every possible parameter in the frame object.
	local args = {}
	for k, v in pairs(origArgs) do
		-- Make _BLANK a special argument to add a blank parameter. For use in
		-- conditional templates etc. it is useful for blank arguments to be
		-- ignored, but we still need a way to specify them so that we can do
		-- things like [[File:Example.png|link=]].
		if v == '_BLANK' then
			v = ''
		end
		args[k] = v
	end
	return p._main(args)
end

return p