Blogs: Setting up asset compilation

This commit is contained in:
Benedek Farkas
2025-10-01 12:25:46 +02:00
parent 15100724ad
commit 3a38a952ac
10 changed files with 122 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
[
{
"inputs": [ "Assets/Scripts/orchard-blogs-archives.js" ],
"output": "Scripts/orchard-blogs-archives.js"
},
{
"inputs": [ "Assets/Styles/orchard-blogs-admin.css" ],
"output": "Styles/orchard-blogs-admin.css"
},
{
"inputs": [ "Assets/Styles/orchard-blogs-archives.css" ],
"output": "Styles/orchard-blogs-archives.css"
}
]

View File

@@ -0,0 +1,13 @@
(function ($) {
$(function () {
$('.archives ul.years li.previous').each(function () {
$(this).click(function (ev) {
if (!ev || $(ev.target).not("a").length) {
$(this).toggleClass("open");
$(this).find("h4>span").toggle();
$(this).children("ul").toggle();
}
});
});
});
})(jQuery);

View File

@@ -0,0 +1,3 @@
#main .blog-description p {
margin-bottom:1em;
}

View File

@@ -0,0 +1,68 @@
/* todo: (heskew) come up with some real style for this. pretty much a copy/paste from oxite */
/* ARCHIVES
----------------------------------------------------------*/
.archives h3 {
margin-bottom:0;
}
.archives ul {
margin:0;
padding:0;
}
.archives ul
.archives li {
list-style-type:none;
}
.archives ul.years li {
list-style-type:none;
margin:.6em 0 0;
/*background:url(images/bullet_toggle_minus_onoff.png) no-repeat -9999px 0;*/
}
.archives ul.archiveMonthList li
{
margin:.2em 0;
}
.archives ul.archiveMonthList li.first {
margin-top:0;
}
.archives ul.archiveMonthList li.last {
margin-bottom:0;
}
.archives ul.years li.previous h4 span {
display:none;
}
/* todo: (heskew) style for "html.dyn" by default, target html.static for non-javascript */
html.dyn .archives ul.years li.previous h4 span {
display:inline;
}
html.dyn .archives ul.years li h4,
html.dyn .archives ul.years li ul {
margin:.2em .2ex;
}
/* todo: (heskew) very, very, very temporary. do something like the commented-out background image past the :before selector */
html.dyn .archives ul.years li.previous h4:before {
content:"⇓ ";
}
html.dyn .archives ul.years li.previous {
cursor:pointer;
padding:.1em .2ex .2em 2ex;
/*background:url(images/bullet_toggle_plus_onoff.png) no-repeat 0 -25px;*/
margin:0 -2ex;
}
html.dyn .archives ul.years li.previous.hover {
background-position:0 6px;
}
/* todo: (heskew) very, very, very temporary. do something like the commented-out background image past the :before selector */
html.dyn .archives ul.years li.previous.open h4:before {
content:"⇑ ";
}
html.dyn .archives ul.years li.previous.open {
/*background:url(images/bullet_toggle_minus_onoff.png) no-repeat -689px 6px;*/
}
html.dyn .archives ul.years li.previous.open.hover {
background-position:0 6px;
}
html.dyn .archives ul.years li.previous ul {
display:none;
margin-left:2ex;
}

View File

@@ -146,6 +146,9 @@
<Compile Include="ViewModels\RecentBlogPostsViewModel.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\Scripts\orchard-blogs-archives.js" />
<Content Include="Assets\Styles\orchard-blogs-admin.css" />
<Content Include="Assets\Styles\orchard-blogs-archives.css" />
<Content Include="Content\Admin\images\draft.gif" />
<Content Include="Content\Admin\images\offline.gif" />
<Content Include="Content\Admin\images\online.gif" />
@@ -240,6 +243,7 @@
<Content Include="Views\Content-BlogPost.SummaryAdmin.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets.json" />
<None Include="packages.config" />
</ItemGroup>
<PropertyGroup>

View File

@@ -1,3 +1,8 @@
/*
** NOTE: This file is generated by Gulp and should not be edited directly!
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
*/
(function ($) {
$(function () {
$('.archives ul.years li.previous').each(function () {

View File

@@ -1,3 +1,8 @@
#main .blog-description p {
/*
** NOTE: This file is generated by Gulp and should not be edited directly!
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
*/
#main .blog-description p {
margin-bottom:1em;
}

View File

@@ -1 +1 @@
#main .blog-description p{margin-bottom:1em}
#main .blog-description p{margin-bottom:1em}

View File

@@ -1,4 +1,9 @@
/* todo: (heskew) come up with some real style for this. pretty much a copy/paste from oxite */
/*
** NOTE: This file is generated by Gulp and should not be edited directly!
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
*/
/* todo: (heskew) come up with some real style for this. pretty much a copy/paste from oxite */
/* ARCHIVES
----------------------------------------------------------*/
@@ -65,4 +70,4 @@ html.dyn .archives ul.years li.previous.open.hover {
html.dyn .archives ul.years li.previous ul {
display:none;
margin-left:2ex;
}
}

View File

@@ -1 +1 @@
.archives h3{margin-bottom:0}.archives ul{margin:0;padding:0}.archives ul .archives li{list-style-type:none}.archives ul.years li{list-style-type:none;margin:.6em 0 0}.archives ul.archiveMonthList li{margin:.2em 0}.archives ul.archiveMonthList li.first{margin-top:0}.archives ul.archiveMonthList li.last{margin-bottom:0}.archives ul.years li.previous h4 span{display:none}html.dyn .archives ul.years li.previous h4 span{display:inline}html.dyn .archives ul.years li h4,html.dyn .archives ul.years li ul{margin:.2em .2ex}html.dyn .archives ul.years li.previous h4:before{content:"⇓ "}html.dyn .archives ul.years li.previous{cursor:pointer;padding:.1em .2ex .2em 2ex;margin:0 -2ex}html.dyn .archives ul.years li.previous.hover{background-position:0 6px}html.dyn .archives ul.years li.previous.open h4:before{content:"⇑ "}html.dyn .archives ul.years li.previous.open.hover{background-position:0 6px}html.dyn .archives ul.years li.previous ul{display:none;margin-left:2ex}
.archives h3{margin-bottom:0}.archives ul{margin:0;padding:0}.archives ul .archives li{list-style-type:none}.archives ul.years li{list-style-type:none;margin:.6em 0 0}.archives ul.archiveMonthList li{margin:.2em 0}.archives ul.archiveMonthList li.first{margin-top:0}.archives ul.archiveMonthList li.last{margin-bottom:0}.archives ul.years li.previous h4 span{display:none}html.dyn .archives ul.years li.previous h4 span{display:inline}html.dyn .archives ul.years li h4,html.dyn .archives ul.years li ul{margin:.2em .2ex}html.dyn .archives ul.years li.previous h4:before{content:"⇓ "}html.dyn .archives ul.years li.previous{cursor:pointer;padding:.1em .2ex .2em 2ex;margin:0 -2ex}html.dyn .archives ul.years li.previous.hover{background-position:0 6px}html.dyn .archives ul.years li.previous.open h4:before{content:"⇑ "}html.dyn .archives ul.years li.previous.open.hover{background-position:0 6px}html.dyn .archives ul.years li.previous ul{display:none;margin-left:2ex}