Browse Source

Initial commit

master
Nicolas Petton 2 years ago
commit
cd0750700b
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
5 changed files with 122 additions and 0 deletions
  1. +19
    -0
      LICENSE
  2. +19
    -0
      README.md
  3. +28
    -0
      plugins/shields/tiddlers/LICENSE.tid
  4. +13
    -0
      plugins/shields/tiddlers/shield.tid
  5. +43
    -0
      plugins/shields/tiddlers/stylesheet.tid

+ 19
- 0
LICENSE View File

@ -0,0 +1,19 @@
MIT License Copyright (c) 2020 Nicolas Petton <nicolas@petton.fr>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 19
- 0
README.md View File

@ -0,0 +1,19 @@
# Shields - Add project badges to your tiddlers
Shields provides a single macro `shield` to render a badge.
## Usage
```
<<shield label:License status:MIT>>
```
The `shield` macro takes three arguments: `label`, `status`, and optionally `colour`.
Four colours are available: `green` (the default), `red`, `blue`, and `purple`.
## Demo
This project is used in https://nicolas.petton.fr/tw/projectify.html to render
badges in the main tiddler.

+ 28
- 0
plugins/shields/tiddlers/LICENSE.tid View File

@ -0,0 +1,28 @@
created: 20200419141443144
creator: nico
modified: 20201211132900439
modifier: nico
tags:
title: $:/plugins/nico/projectify/LICENSE
type: text/vnd.tiddlywiki
MIT License Copyright (c) 2020 [[Nicolas Petton|https://nicolas.petton.fr]] nicolas@petton.fr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 13
- 0
plugins/shields/tiddlers/shield.tid View File

@ -0,0 +1,13 @@
created: 20201215172057193
modified: 20201215172122777
tags: $:/tags/Macro
title: $:/plugins/nico/shields/shield
type: text/vnd.tiddlywiki
\define shield(label,status,colour)
\whitespace trim
<div class="shield shield-$colour$">
<span class="label">$label$</span>
<span class="status">$status$</span>
</div>
\end

+ 43
- 0
plugins/shields/tiddlers/stylesheet.tid View File

@ -0,0 +1,43 @@
created: 20201215172003456
modified: 20201215173919738
tags: $:/tags/Stylesheet
title: $:/plugins/nico/shields/stylesheet
type: text/vnd.tiddlywiki
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline
.shield {
font-weight: normal;
display: inline-block;
color: white;
font-size: .8em;
}
.shield:hover {
text-decoration: none;
}
.shield .label {
background: #555;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
padding: 3px 6px;
}
.shield .status {
background: #40ba12;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
padding: 3px 6px;
}
.shield.shield-purple .status {
background: #923293;
}
.shield.shield-red .status {
background: #cc5640;
}
.shield.shield-blue .status {
background: #0e7fbf;
}

Loading…
Cancel
Save