2016-09-11 19:58:22 +02:00
|
|
|
////
|
2020-02-10 12:34:58 +01:00
|
|
|
/// Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
|
2016-09-11 19:58:22 +02:00
|
|
|
///
|
|
|
|
/// 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 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 NON-INFRINGEMENT. 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
|
|
|
|
////
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2017-05-31 15:22:59 +02:00
|
|
|
// Keyframes
|
2016-09-11 19:58:22 +02:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2016-12-15 15:55:40 +01:00
|
|
|
// Show source facts
|
|
|
|
@keyframes md-source__facts--done {
|
|
|
|
0% {
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
2019-02-12 19:13:08 +01:00
|
|
|
height: px2rem(13px);
|
2016-12-15 15:55:40 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Show source fact
|
|
|
|
@keyframes md-source__fact--done {
|
|
|
|
0% {
|
|
|
|
transform: translateY(100%);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
50% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
|
|
|
transform: translateY(0%);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Rules
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2016-10-06 12:14:33 +02:00
|
|
|
// Source container
|
2016-09-11 19:58:22 +02:00
|
|
|
.md-source {
|
2016-09-23 17:46:16 +02:00
|
|
|
display: block;
|
2019-02-12 19:13:08 +01:00
|
|
|
padding-right: px2rem(12px);
|
2020-02-17 10:04:12 +01:00
|
|
|
transition: opacity 250ms;
|
2019-02-12 19:13:08 +01:00
|
|
|
font-size: px2rem(13px);
|
2016-09-13 20:58:28 +02:00
|
|
|
line-height: 1.2;
|
2016-09-11 19:58:22 +02:00
|
|
|
white-space: nowrap;
|
2020-03-03 14:59:57 +01:00
|
|
|
// Hack: reduce jitter
|
|
|
|
backface-visibility: hidden;
|
2016-09-11 19:58:22 +02:00
|
|
|
|
2020-02-24 18:07:50 +01:00
|
|
|
// Adjust for right-to-left languages
|
2018-01-13 16:54:08 +01:00
|
|
|
[dir="rtl"] & {
|
|
|
|
padding-right: initial;
|
2019-02-12 19:13:08 +01:00
|
|
|
padding-left: px2rem(12px);
|
2018-01-13 16:54:08 +01:00
|
|
|
}
|
|
|
|
|
2017-02-25 17:13:50 +01:00
|
|
|
// Hovered source container
|
2016-09-11 19:58:22 +02:00
|
|
|
&:hover {
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
|
2016-12-28 14:47:53 +01:00
|
|
|
// Repository platform icon
|
|
|
|
&__icon {
|
|
|
|
display: inline-block;
|
2019-02-12 19:13:08 +01:00
|
|
|
width: px2rem(48px);
|
|
|
|
height: px2rem(48px);
|
2016-12-28 14:47:53 +01:00
|
|
|
vertical-align: middle;
|
2016-09-30 13:29:45 +02:00
|
|
|
|
2020-02-24 18:07:50 +01:00
|
|
|
// Align with margin only (as opposed to normal button alignment)
|
2016-12-28 17:59:29 +01:00
|
|
|
svg {
|
2019-02-12 19:13:08 +01:00
|
|
|
margin-top: px2rem(12px);
|
|
|
|
margin-left: px2rem(12px);
|
2018-01-13 16:54:08 +01:00
|
|
|
|
2020-02-24 18:07:50 +01:00
|
|
|
// Adjust for right-to-left languages
|
2018-01-13 16:54:08 +01:00
|
|
|
[dir="rtl"] & {
|
2019-02-12 19:13:08 +01:00
|
|
|
margin-right: px2rem(12px);
|
2018-01-13 16:54:08 +01:00
|
|
|
margin-left: initial;
|
|
|
|
}
|
2016-12-28 17:59:29 +01:00
|
|
|
}
|
|
|
|
|
2016-12-28 14:47:53 +01:00
|
|
|
// Correct alignment, if icon is present
|
|
|
|
+ .md-source__repository {
|
2019-05-17 21:35:11 +02:00
|
|
|
margin-left: px2rem(-40px);
|
2019-02-12 19:13:08 +01:00
|
|
|
padding-left: px2rem(40px);
|
2018-01-13 16:54:08 +01:00
|
|
|
|
2020-02-24 18:07:50 +01:00
|
|
|
// Adjust for right-to-left languages
|
2018-01-13 16:54:08 +01:00
|
|
|
[dir="rtl"] & {
|
2019-05-17 21:35:11 +02:00
|
|
|
margin-right: px2rem(-40px);
|
2018-01-13 16:54:08 +01:00
|
|
|
margin-left: initial;
|
2019-02-12 19:13:08 +01:00
|
|
|
padding-right: px2rem(40px);
|
2018-01-13 16:54:08 +01:00
|
|
|
padding-left: initial;
|
|
|
|
}
|
2016-09-11 19:58:22 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Repository name
|
|
|
|
&__repository {
|
2016-09-23 17:46:16 +02:00
|
|
|
display: inline-block;
|
|
|
|
max-width: 100%;
|
2019-02-12 19:13:08 +01:00
|
|
|
margin-left: px2rem(12px);
|
2016-09-11 19:58:22 +02:00
|
|
|
font-weight: 700;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2016-09-23 17:46:16 +02:00
|
|
|
vertical-align: middle;
|
2016-09-11 19:58:22 +02:00
|
|
|
}
|
|
|
|
|
2016-09-13 20:58:28 +02:00
|
|
|
// Source facts (statistics etc.)
|
|
|
|
&__facts {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2019-02-12 19:13:08 +01:00
|
|
|
font-size: px2rem(11px);
|
2016-09-11 19:58:22 +02:00
|
|
|
font-weight: 700;
|
2017-01-01 15:59:44 +01:00
|
|
|
list-style-type: none;
|
2016-09-23 17:46:16 +02:00
|
|
|
opacity: 0.75;
|
2017-01-14 22:55:58 +01:00
|
|
|
overflow: hidden;
|
2016-12-15 15:55:40 +01:00
|
|
|
|
|
|
|
// Show after the data was loaded
|
|
|
|
[data-md-state="done"] & {
|
2020-02-17 10:04:12 +01:00
|
|
|
animation: md-source__facts--done 250ms ease-in;
|
2016-12-15 15:55:40 +01:00
|
|
|
}
|
2016-09-13 20:58:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Fact
|
|
|
|
&__fact {
|
|
|
|
float: left;
|
|
|
|
|
2020-02-24 18:07:50 +01:00
|
|
|
// Adjust for right-to-left languages
|
2018-01-13 16:54:08 +01:00
|
|
|
[dir="rtl"] & {
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
|
2016-12-15 15:55:40 +01:00
|
|
|
// Show after the data was loaded
|
|
|
|
[data-md-state="done"] & {
|
2020-02-17 10:04:12 +01:00
|
|
|
animation: md-source__fact--done 400ms ease-out;
|
2016-09-13 20:58:28 +02:00
|
|
|
}
|
|
|
|
|
2016-12-15 15:55:40 +01:00
|
|
|
// Middle dot before fact
|
2016-09-13 20:58:28 +02:00
|
|
|
&::before {
|
2019-02-12 19:13:08 +01:00
|
|
|
margin: 0 px2rem(2px);
|
2016-09-13 20:58:28 +02:00
|
|
|
content: "\00B7";
|
|
|
|
}
|
|
|
|
|
2016-09-23 17:46:16 +02:00
|
|
|
// Remove middle dot on first fact
|
|
|
|
&:first-child::before {
|
|
|
|
display: none;
|
2016-09-13 20:58:28 +02:00
|
|
|
}
|
2016-09-11 19:58:22 +02:00
|
|
|
}
|
|
|
|
}
|