انجمنهای فارسی اوبونتو
کمک و پشتیبانی => میزکارهای گنو/لینوکس => پوستههای Unity و Gnome Shell => نویسنده: afrod در 23 امرداد 1393، 02:37 بظ
-
این عکس بالای پوشه Templates نمایش داده میشه. منظور از اون عبارت جیه؟
-
پرونده هایی که در اون پوشه قرار بدید به صورت تمپلیت برای ایجاد فایل های جدید در New Document Menu استفاده میشن.
برای نمونه، در همون پوشه کلیک راست کنید و یک پرونده ی متنی ایجاد کنید، حالا اسمش رو index.html بگذارید. دوباره در (هر پوشه ای) کلیک راست کنید. میبینید که تمپلیتی از اون فایل براتون در New Document Menu ایجاد شده.
نکته: هر چیزی که داخل اون فایل بنویسید به تمپلیت اعمال میشه.
پ.ن: گنوم ندارم، اگر اشتباهی تو اسم ها شکل گرفته اصلاح کنید :)
-
به چه کاری میاد؟ مثلا چه جور تمپلیت هایی؟ Untitled.txt تا حالا ساختم! چیز دیگه به نظرم نرسید! فایلهای لیبره شاید، اما اونا خود نرم افزار رو فرابخونی بهتره!
-
به چه کاری میاد؟ مثلا چه جور تمپلیت هایی؟ Untitled.txt تا حالا ساختم! چیز دیگه به نظرم نرسید! فایلهای لیبره شاید، اما اونا خود نرم افزار رو فرابخونی بهتره!
برای نمونه، یه سری دستورات تو Html ثابته:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="CSS-default.css">
</head>
<body>
<div id="wrapper"></div>
</body>
</html>
همینطور CSS
/* --------- 1. defaults --------- */
* {
margin: 0;
padding: 0;
}
body {
}
/* --------- 2. structure --------- */
#wrapper {
}
#masthead {
}
#logo {
}
#navContainer {
}
#content {
}
#footer {
}
/* float-clearing rules */
.separator {
clear: both;
}
.separatorInvisible {
clear: both;
height: 1px;
}
.clearFix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
/* ---------- 3. links and navigation ---------- */
a {
}
a:hover {
}
#navigation {
}
#navigation a {
}
#navigation ul {
}
#navigation li {
}
/* ---------- 4. fonts ---------- */
html {
font-size: 100%;
}
body {
font-size: 62.5%;
}
h1, h2, h3, h4, p, ul {
}
h1 {
}
h2 {
}
h3 {
}
h4 {
}
p {
}
ul {
}
/* ---------- 5. images ---------- */
a img {
}
و همینطور C
#include <stdio.h>
int main(void) {
return 0;
}
و ...
خوب اگر اینارو تو تمپلیت ها ذخیره کنید، خیلی میتونید تو وقتتون صرفه جویی کنید :)
-
مثلاُ من برای پروندههای تک این الگو رو ذخیره کردم:
\documentclass[11pt,a4paper]{article}
% Danial Behzadi, http://wiki.ubuntu.ir/danialbehzadi
% dani.behzi@ubuntu.com
\title{} %عنوان
\author{دانیال بهزادی} %نگارنده
\date{}%تاریخ
\usepackage{xepersian} %افزودن امکان فارسی نویسی و تعریف قلمها
\settextfont[Scale=1.4]{Nazli}
\setlatintextfont[Scale=1.2]{Times New Roman}
\setdigitfont[Scale=1.4]{Nazli}
\linespread{1.5}
\begin{document} %شروع سند
\maketitle
\part{}
\section{}
\end{document}
هربار بخوام یه پرونده تک بسازم، راست کلیک میکنم. این رو میآرم و شروع میکنم به نوشتن متن.
همینطور برای HTML:
<!DOCTYPE HTML>
<!--
Copyright 2011 Danial Behzadi <danialbehzadi@danial-HP>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="creator" content="Danial Behzadi" />
</head>
<body>
</body>
</html>
یا php:
<!DOCTYPE HTML>
<!--
Copyright 2012 Danial Behzadi <dani.behzi@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled</title>
<meta http-equiv="content-type" content="text/html" charset="utf-8" />
<meta name="creator" content="Danial Behzadi" />
</head>
<body>
<?php
?>
</body>
</html>
یا حتا پایتون:
#! /usr/bin/env python2
# Danial Behzadi - 2014
# Published under GPL3+
#