From f0de83a64096b16d6dbae1aa958447a67fca44f6 Mon Sep 17 00:00:00 2001 From: hylom Date: Thu, 31 May 2018 21:14:53 +0900 Subject: [PATCH] css: add uncommited files --- src/newslash_web/css/newslash/alert.less | 66 +++++++++++ src/newslash_web/css/newslash/comment.less | 146 ++++++++++++++++++++++++ src/newslash_web/css/newslash/content.less | 36 ++++++ src/newslash_web/css/newslash/motd.less | 21 ++++ src/newslash_web/css/newslash/poll.less | 58 ++++++++++ src/newslash_web/css/newslash/progress_bar.less | 58 ++++++++++ src/newslash_web/css/newslash/search.less | 56 +++++++++ src/newslash_web/css/newslash/sidebar.less | 31 +++++ src/newslash_web/css/newslash/site_footer.less | 13 +++ src/newslash_web/css/newslash/site_header.less | 30 +++++ 10 files changed, 515 insertions(+) create mode 100644 src/newslash_web/css/newslash/alert.less create mode 100644 src/newslash_web/css/newslash/comment.less create mode 100644 src/newslash_web/css/newslash/content.less create mode 100644 src/newslash_web/css/newslash/motd.less create mode 100644 src/newslash_web/css/newslash/poll.less create mode 100644 src/newslash_web/css/newslash/progress_bar.less create mode 100644 src/newslash_web/css/newslash/search.less create mode 100644 src/newslash_web/css/newslash/sidebar.less create mode 100644 src/newslash_web/css/newslash/site_footer.less create mode 100644 src/newslash_web/css/newslash/site_header.less diff --git a/src/newslash_web/css/newslash/alert.less b/src/newslash_web/css/newslash/alert.less new file mode 100644 index 00000000..b264639e --- /dev/null +++ b/src/newslash_web/css/newslash/alert.less @@ -0,0 +1,66 @@ +/* alerts related styles */ + + +@alert-success-bg: #dff0d8; +@alert-success-text: #3c763d; +@alert-success-border: darken(spin(@alert-success-bg, -10), 5%); + +@alert-info-text: #31708f; +@alert-info-bg: #d9edf7; +@alert-info-border: darken(spin(@alert-info-bg, -10), 7%); + +@alert-warning-text: #8a6d3b; +@alert-warning-bg: #fcf8e3; +@alert-warning-border: darken(spin(@alert-warning-bg, -10), 5%); + +@alert-danger-text: #a94442; +@alert-danger-bg: #f2dede; +@alert-danger-border: darken(spin(@alert-danger-bg, -10), 5%); + +@alert-border-radius: 4px; + +.alert { + &:extend(.medium-text); + padding-left: 4px; + padding-right: 4px; + border: 1px solid transparent; + border-radius: @alert-border-radius; +} + +.alert-dismissible { + .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; + } +} + +.alert-variant(@background; @border; @text-color) { + background-color: @background; + border-color: @border; + color: @text-color; + + hr { + border-top-color: darken(@border, 5%); + } + .alert-link { + color: darken(@text-color, 10%); + } +} + +.alert-success { + .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); +} + +.alert-info { + .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); +} + +.alert-warning { + .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); +} + +.alert-danger { + .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); +} diff --git a/src/newslash_web/css/newslash/comment.less b/src/newslash_web/css/newslash/comment.less new file mode 100644 index 00000000..26b8c60d --- /dev/null +++ b/src/newslash_web/css/newslash/comment.less @@ -0,0 +1,146 @@ +/* for comment and comment-tree */ + +.comment-form { + &:extend(.bordered-box); + @media @mobile { + margin: 10px 0; + padding: 2px; + } +} + +.post-comment { + padding: 12px 6px; +} + +#comments { + clear: both; + padding: 0 10px; + @media @mobile { + padding: 0; + h1[title-orig="no"] { display: none; } + .btn { border: none; } + .cid { display: none; } + .comment-tree-body > ol { + margin-left: 0; + li { margin-left: 0; }; + } + } + ol { + margin: 0; + padding: 0; + margin-left: 16px; + @media @mobile { margin-left: 8px; } + list-style-type: none; + } +} + +#comment-header { + &:extend(.bordered-box); + .alert { + margin-bottom: 8px; + } + .form-inline { + margin-bottom: 0; + } + @media @mobile { + border: none; + padding: 0; + margin: 0 0 4px; + font-size: 85%; + text-align: center; + } +} + +@comment-property-text-color: #997a49; + +.comment-item { + &:extend(.bordered-box); + + .body { + margin: 0.8em 4px; + + } + header { + h1 { + &:extend(.rectangle-header); + margin-bottom: 0; + @media @mobile { h1 { padding: 3px 6px; } }; + } + .property { + margin-left: 4px; + margin-right: 4px; + font-size: 80%; + color: @comment-property-text-color; + } + .score { + margin-left: 4px; + margin-right: 4px; + cursor: pointer; + } + .moderate-reasons { + margin-left: 4px; + margin-right: 4px; + + &:extend(.bordered-box); + color: @comment-property-text-color; + .m2 { + .m2-nod, .m2-nix { + cursor: pointer; + } + } + } + } + footer { + .signature { + border-top: 1px solid @component-border-color; + color: @comment-property-text-color; + padding: 6px 0 2px; + } + .moderation { + display: inline; + } + .footer-menu { + .footer-item { display: inline-block; } + @media @mobile { + button { color: @anchor-color; } + .btn { + padding: 3px 3px 3px 0; + margin-right: 9px; + } + } + } + select, .btn { width: auto; } + .dropdown-menu li a:hover { background: #ccc; } + } + +} +.comment-item.folded { + border: none; + overflow: hidden; + display: block; + height: 1.2em; + line-height: 100%; + white-space: nowrap; + padding: 0; + margin-bottom: 10px; + + * { + display: inline; + background: none; + } + .date {display: none}; + .cid {display: none}; + br { display: none;} + .body {color: gray;} + footer { display: none; } + h1[title-orig="no"] .subject {display: none;} + h1[title-orig="no"]:before {content: "Re:";} + h1 { cursor: pointer; } +} + +.hidden-box { + &:extend(.bordered-box); + display: inline-block; + cursor: pointer; +} + diff --git a/src/newslash_web/css/newslash/content.less b/src/newslash_web/css/newslash/content.less new file mode 100644 index 00000000..323495ee --- /dev/null +++ b/src/newslash_web/css/newslash/content.less @@ -0,0 +1,36 @@ + +.contents-text { + word-break: break-all; + word-wrap: break-word; + + p, ul, ol, blockquote, pre, code { + margin-bottom: 1em; + } + + a { text-decoration: underline; } + a:hover { color: #C33; } + ul { + list-style-type: disc; + } + ol { + } + div.quote, + blockquote { + border-left: 3px solid #DDDDDD; + padding-left: 0.75em; + margin-left: 0; + } +} + +@media(max-width:480px) { + .contents-text { + blockquote, + div.quote { + margin: 0 0 0 -6px; + padding-left: 6px; + } + p { + line-height: 160%; + } + } +} \ No newline at end of file diff --git a/src/newslash_web/css/newslash/motd.less b/src/newslash_web/css/newslash/motd.less new file mode 100644 index 00000000..e9ace883 --- /dev/null +++ b/src/newslash_web/css/newslash/motd.less @@ -0,0 +1,21 @@ + +section.motd { + clear: left; + margin: 8px; + font-size: 130%; + font-weight: bold; + font-style: italic; + color: gray; + text-align: center; + + border-top: 1px solid @component-border-color; + padding-top: 8px; + clear: both; + + blockquote { + border: none; + padding: 0; + margin: 0; + } + p { display: inline; } +} \ No newline at end of file diff --git a/src/newslash_web/css/newslash/poll.less b/src/newslash_web/css/newslash/poll.less new file mode 100644 index 00000000..f47e75c1 --- /dev/null +++ b/src/newslash_web/css/newslash/poll.less @@ -0,0 +1,58 @@ + +article .body { + ol.poll-answers { + list-style-type: circle; + } +} + +#vote-body { + .vote { + margin-left: 8px; + } +} +#poll-body { + .total { + clear: both; + font-weight: bold; + margin-top: 1.5em; + } + + .poll-answer { + margin-top: 1.5em; + clear: both; + } + + .answer-text { + font-weight: bold; + margin-bottom: 4px; + } + + .votes { + font-weight: bold; + } + + .poll-graph-wrapper { + box-shadow: 0 0 1px @component-shadow-color; + border: 1px solid @component-border-color; + margin: 0; + padding: 0; + height: 1.5em; + } + + .poll-graph-bar { + margin: 0 8px 0 0; + padding: 0; + background: @primary-color; + height: 100%; + float: left; + height: 1.5em; + } + + .poll-graph-spacing { + margin: 0 0 0 8px; + padding: 0; + color: @color-weak; + height: 1.5em; + } + +} \ No newline at end of file diff --git a/src/newslash_web/css/newslash/progress_bar.less b/src/newslash_web/css/newslash/progress_bar.less new file mode 100644 index 00000000..ed29a5bf --- /dev/null +++ b/src/newslash_web/css/newslash/progress_bar.less @@ -0,0 +1,58 @@ +#status-bar { + display: none; + width: 100%; + height: 1.5em; + background: @color-weaker; + color: @foreground-color; + position: fixed; + bottom: 0; + left: 0; + padding: 2px; +} +.spinner-icon { + -webkit-animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} + +#status-bar-remove-icon { + cursor: pointer; +} + + +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(359deg); + } +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + } +} +@-o-keyframes spin { + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(359deg); + } +} +@keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + diff --git a/src/newslash_web/css/newslash/search.less b/src/newslash_web/css/newslash/search.less new file mode 100644 index 00000000..4a1bc5d8 --- /dev/null +++ b/src/newslash_web/css/newslash/search.less @@ -0,0 +1,56 @@ +/* search related styles */ + +.site-search-box { + margin: 0 8px; + padding: 0; + + @media @mobile { + &:focus-within { + width: 100%; + text-align: center; + margin: 0; + } + } + + input[type="text"] { + border: 1px solid @color-weaker; + padding: 2px 4px; + @media @mobile { + width: 10em; + &:focus { width: 100%; } + } + } + label { + color: @color-weak; + } +} + +.search-form { + padding: 4px; + .search-box { width: 80%; } +} + +.search-result { + clear: left; + margin-bottom: 2em; + padding: 0 4px; + + .result-header { + margin-bottom: 4px; + } + + strong { background: yellow; } + .title { + font-weight: bold; + margin: 0; + } + .header { + margin-bottom: 10px; + font-size: 85%; + color: @color-weak; + } + .contents-text { + font-size: 90%; + } +} + diff --git a/src/newslash_web/css/newslash/sidebar.less b/src/newslash_web/css/newslash/sidebar.less new file mode 100644 index 00000000..72a1c789 --- /dev/null +++ b/src/newslash_web/css/newslash/sidebar.less @@ -0,0 +1,31 @@ +/* sidebar related styles */ + +.sidebar-item { + &:extend(.small-text); + &:extend(.bordered-box); + padding: 6px; + + h2 { + &:extend(.rectangle-header); + &:extend(.medium-text); + } + + li { + &:extend(.unstyled); + margin-bottom: 8px; + } +} + +.thisday { + .year { + &:extend(.rectangle-header); + float: left; + font-weight: bold; + line-height: 250%; + margin-right: 0.5em; + } + li { + clear: left; + min-height: 2.5em; + } +} \ No newline at end of file diff --git a/src/newslash_web/css/newslash/site_footer.less b/src/newslash_web/css/newslash/site_footer.less new file mode 100644 index 00000000..0a3982b4 --- /dev/null +++ b/src/newslash_web/css/newslash/site_footer.less @@ -0,0 +1,13 @@ +/* site footer styles */ + +#organization-navigation { + &:extend(.small-text); + li { &:extend(.flatten); } + text-align: center; +} + +#trademark-notice { + &:extend(.small-text); + color: @color-weak; + text-align: center; +} diff --git a/src/newslash_web/css/newslash/site_header.less b/src/newslash_web/css/newslash/site_header.less new file mode 100644 index 00000000..f3caab22 --- /dev/null +++ b/src/newslash_web/css/newslash/site_header.less @@ -0,0 +1,30 @@ +/* side header style */ + +#site-header { + margin: 4px @component-horizontal-margin 0; + + #srad-brand { + display: block; + float: left; + } + + .site-search-box { + display: block; + float: right; + } + + #account-menu { + display: block; + float: right; + li { &:extend(.flatten); } + } + +} + +#site-navigation { + clear: both; + margin: 0 @component-horizontal-margin; + li { &:extend(.flatten); } + + @media @mobile { text-align: center; } +} \ No newline at end of file -- 2.11.0