layerinfo type = "layout";
layerinfo "name" = "Minimalism";
layerinfo redist_uniq = "sup/layout";
layerinfo des = "…";
propgroup presentation {
#start NOUI props
property string active_theme {
noui = 1;
} set active_theme = "x0";
property string theme_css {
noui = 1;
} set theme_css = "";
property MonthPage _MonthPage { noui = 1; }
property RecentPage _RecentPage { noui = 1; }
property FriendsPage _FriendsPage { noui = 1; }
property DayPage _DayPage { noui = 1; }
property TagsPage _TagsPage { noui = 1; }
property YearPage _YearPage { noui = 1; }
property string theme_designer { des = "Theme Designer";
noui = 1;
} set theme_designer = "";
property string theme_designer_url { des = "Theme Designer URL";
noui = 1;
} set theme_designer_url = "";
property string base_url {
noui = 1;
} set base_url = "";
property string exact_view {
noui = 1;
} set exact_view = "";
property string body_classes {
noui = 1;
} set body_classes = "";
property string text_user_posts_in {
noui = 1;
} set text_user_posts_in = "wrote� in";
#end NOUI props
property string layout_type { des = "Sidebar position";
values = "2CR|Sidebar on the right|2CL|Sidebar on the left";
} set layout_type = "2CR";
property bool recent_show_date { des = "Show dates on Recent Entries page";
} set recent_show_date = true;
property bool friends_show_date { des = "Show dates on Friends page";
} set friends_show_date = false;
property bool recent_show_upic { des = "Show userpics on Recent Entries page";
} set recent_show_upic = false;
property bool friends_show_upic { des = "Show userpics on Friends page";
} set friends_show_upic = true;
property bool recent_show_meta { des = "Show meta (mood, music, location etc.) on Recent Entries page";
} set recent_show_meta = true;
property bool friends_show_meta { des = "Show meta (mood, music, location etc.) on Friends page";
} set friends_show_meta = true;
property use page_recent_items;
property use page_friends_items;
property use page_day_sortorder;
property use page_year_sortorder;
property use use_shared_pic;
property use view_entry_disabled;
}
propgroup colors {
property use control_strip_bgcolor;
property use control_strip_fgcolor;
property use control_strip_bordercolor;
property use control_strip_linkcolor;
}
propgroup text {
property use text_post_comment;
property use text_post_comment_friends;
property use text_view_recent;
property use text_view_archive;
property use text_view_friends;
property use text_view_userinfo;
property use text_meta_location;
property use text_meta_mood;
property use text_meta_music;
property use text_nosubject;
property use text_page_summary;
property use text_skiplinks_back;
property use text_skiplinks_forward;
property use text_edit_entry;
property use text_edit_tags;
property use text_mem_add;
property use text_tell_friend;
property use text_watch_comments;
property use text_unwatch_comments;
property string text_friend_add { des="Text for “Add to friends” link";
} set text_friend_add = "Add to friends";
property string sticky_subject { des = "Sticky post's subject";
} set sticky_subject = "Sticky Post";
property string sticky_post { des = "Sticky post";
note = "If you'd like to have text display at the top of each page, enter it here.";
cols = 40;
rows = 10;
string_mode = "html";
} set sticky_post = "";
}
propgroup sidebars = "Sidebars";
propgroup sidebars {
property bool layout_show_calendar { des = "Show calendar in sidebar";
} set layout_show_calendar = true;
property bool layout_show_summary { des = "Show page summary in sidebar";
} set layout_show_summary = true;
property bool layout_show_links { des = "Show links in sidebar";
} set layout_show_links = true;
property bool layout_show_tags { des = "Show list of tags in sidebar";
} set layout_show_tags = true;
property bool layout_show_custom { des = "Show custom block in sidebar";
} set layout_show_custom = true;
property string layout_customHTML { des = "Content of custom block (HTML is available)";
cols = 40;
rows = 10;
string_mode = "html";
} set layout_customHTML = "";
property string tag_display { des = "Display of tags in sidebar";
values = "list|list|cloud|cloud";
} set tag_display = "cloud";
property bool tag_limit { des = "Limit number of tags displayed";
} set tag_limit = true;
property int tag_cloud_max { des = "Number of tags to display in Tags sidebar (if limited)";
min = 1;
note = "Minimum 1 tag";
} set tag_cloud_max = 50;
}
propgroup customcss {
property bool use_stylesheets { des = "Use layout's stylesheets";
note = "Disable this only if you want to re-style this layout completely from scratch using a custom stylesheet.";
} set use_stylesheets = true;
property bool use_theme_stylesheet { des = "Use layout's theme's stylesheet";
note = "Disable this if you want to re-style this layout, but want to use base stylesheets.";
} set use_theme_stylesheet = true;
property string linked_stylesheet {
des = "Custom external stylesheet URL";
}
set linked_stylesheet = "";
property string custom_css {
des = "Custom stylesheet";
cols = 50;
rows = 20;
string_mode = "css";
}
set custom_css = "";
}
function bool(string input) : bool {
return $input?true:false;
}
function _global_init_ {
var Page p = get_page();
$*base_url = $p.journal->base_url();
$*body_classes = "view-$p.view type-$p.journal.journal_type";
# if (viewer_sees_control_strip()) {
# $*body_classes = $*body_classes + " ljcs";
# }
if (((($p.view=="recent")or($p.view=="day")) and not $*recent_show_upic)or($p.view=="friends" and not $*friends_show_upic)) {
$*body_classes = $*body_classes + " hide_upic";
}
if (((($p.view=="recent")or($p.view=="day")) and not $*recent_show_date)or($p.view=="friends" and not $*friends_show_date)) {
$*body_classes = $*body_classes + " hide_date";
}
if (((($p.view=="recent")or($p.view=="day")) and not $*recent_show_meta)or($p.view=="friends" and not $*friends_show_meta)) {
$*body_classes = $*body_classes + " hide_meta";
}
if ($*layout_type == "2CR") {
$*body_classes = $*body_classes + " column-right";
} else {
$*body_classes = $*body_classes + " column-left";
}
if ($*tag_display == "list") {
$*body_classes = $*body_classes + " tags-list";
} else {
$*body_classes = $*body_classes + " tags-cloud";
}
$*body_classes = $*body_classes + " theme-$*active_theme";
$*exact_view = $p.view;
if ($*_RecentPage) { if(not bool($*_RecentPage.nav.forward_url) and not ($p.data_link{"rss"}.url->contains("/rss?tag"))) {
$*exact_view = "recent_first";
}} elseif ($*_FriendsPage) { if(not bool($*_FriendsPage.nav.forward_url) and $*_FriendsPage.friends_mode!="friendsfriends") {
$*exact_view = "friends_first";
}} elseif ($*_YearPage) {
var YearMonth YearMonth = $*_YearPage->get_latest_month();
if ($*_YearPage.year == $YearMonth.year) {
$*exact_view = "archive_first";
}
}
if ($*lang_current == "ru") {
$*text_user_posts_in = "пишет� в";
if ($*text_friend_add == "Add to friends") {
$*text_friend_add = "Добавить в друзья";
}
}
}
function _month_case_ru(int month) : string {
#backwards compatibility
var string result = "";
if ($*lang_current == "ru") {
var string[] months = ["","января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"];
$result = $months[$month];
} else {
$result = $*lang_monthname_long[$month];
}
return $result;
}
function _dateTime (DateTime time) : string {
var string result = "";
var DateTime currentDate = journal_current_datetime();
var int month = int($time->date_format("%%m%%"));
if ($*lang_current == "ru") {
var string[] months = ["","января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"];
if (string($currentDate.year) != $time->date_format("%%yyyy%%")) {
$result = $time->date_format("%%d%% ${months[$month]}, %%yyyy%%");
} else {
$result = $time->date_format("%%d%% ${months[$month]}, %%H%%:%%min%%");
}
} else {
if (string($currentDate.year) != $time->date_format("%%yyyy%%")) {
$result = $time->date_format("long");
} else {
$result = $time->date_format("%%month%% %%dayord%%, %%H%%:%%min%%");
}
}
return $result;
}
function _print_CSS {
if ($*use_stylesheets) {
"""\n """;
"""\n """;
if ($*use_theme_stylesheet) {
if ($*active_theme == "x0") {
"""\n """;
} elseif ($*active_theme == "x1") {
"""\n """;
} elseif ($*active_theme == "x2") {
"""\n """;
} elseif ($*active_theme == "x3") {
"""\n """;
} elseif ($*active_theme == "x4") {
"""\n """;
} elseif ($*active_theme == "x5") {
"""\n """;
}
if ($*theme_css) {
"""\n """;
}
"""\n """;
}
}
if ($*linked_stylesheet) {
print safe """\n """;
}
if ($*custom_css) {
print safe """\n \n""";
}
}
function _user_print(UserLite user, string mode) : string {
# var string result = "";
# var string link = $user->base_url();
# var string profile = get_url($user,"userinfo");
# var Image icon = userinfoicon($user);
# if ($mode == "microformatted") {
# $result = """$user.username""";
# } elseif($mode == "inside") {
# $result = """
$user.username""";
# } elseif($mode == "simple") {
# $result = """
$user.username""";
# }
# return $result;
return $user->ljuser();
}
function _designer() : string {
var string result = "";
if ($*theme_designer_url == "") {
var UserLite u = UserLite($*theme_designer);
var string name = $u.name ? _user_print($u,"simple") : $*theme_designer;
$result = """
${*lang_dayname_shorter[$d]} | """;
$i++;
}
"""
---|
"""; if ($day.num_entries > 0) { """"""; } print $day.day == 0?"� ":string($day.day); if ($day.num_entries > 0) { """"""; } """ | """; if ($counter%7 == 0) { """
$*text_reply_nocomments
"; } else { if ($.replyto isa Entry) { } else { """$poster
"; """""" + $c->time_display() + ""; $c->print_linkbar(); "
"; if ($c.metadata{"poster_ip"}) { "(" + $c.metadata{"poster_ip"} + ")
"; } "$*text_noentries_day
$poster
"; """""" + $c->time_display() + ""; if ($this.multiform_on) { print safe """ """; $c->print_multiform_check(); } $c->print_linkbar(); "
"; if ($c.metadata{"poster_ip"}) { "(" + $c.metadata{"poster_ip"} + ")
"; } "